refactor(plugins): remove unused helper accessors · openclaw/openclaw@97ce204
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1509,14 +1509,6 @@ export function resolveLatestVersionFromPackage(detail: ClawHubPackageDetail): s
|
1509 | 1509 | return detail.package?.latestVersion ?? detail.package?.tags?.latest ?? null; |
1510 | 1510 | } |
1511 | 1511 | |
1512 | | -/** Detects package or skill detail payloads that represent skill-family packages. */ |
1513 | | -export function isClawHubFamilySkill(detail: ClawHubPackageDetail | ClawHubSkillDetail): boolean { |
1514 | | -if ("package" in detail) { |
1515 | | -return detail.package?.family === "skill"; |
1516 | | -} |
1517 | | -return Boolean(detail.skill); |
1518 | | -} |
1519 | | - |
1520 | 1512 | /** Checks whether a host plugin API version satisfies a ClawHub plugin API range. */ |
1521 | 1513 | export function satisfiesPluginApiRange( |
1522 | 1514 | pluginApiVersion: string, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2532,28 +2532,6 @@ async function installPluginFromInstalledPackageDirInternal(
|
2532 | 2532 | return result; |
2533 | 2533 | } |
2534 | 2534 | |
2535 | | -export async function preflightPluginPackageInstallSource( |
2536 | | -params: { |
2537 | | -packageDir: string; |
2538 | | -} & PackageInstallCommonParams, |
2539 | | -): Promise<PluginInstallFailureResult | null> { |
2540 | | -const runtime = await loadPluginInstallRuntime(); |
2541 | | -const { logger } = runtime.resolveTimedInstallModeOptions(params, defaultLogger); |
2542 | | -const validated = await validatePackagePluginInstallSource({ |
2543 | | - runtime, |
2544 | | -packageDir: params.packageDir, |
2545 | | -expectedPluginId: params.expectedPluginId, |
2546 | | -requirePluginManifest: params.requirePluginManifest, |
2547 | | -allowSourceTypeScriptEntries: params.allowSourceTypeScriptEntries, |
2548 | | -dangerouslyForceUnsafeInstall: params.dangerouslyForceUnsafeInstall, |
2549 | | -trustedSourceLinkedOfficialInstall: params.trustedSourceLinkedOfficialInstall, |
2550 | | -config: params.config, |
2551 | | -installPolicyRequest: params.installPolicyRequest, |
2552 | | - logger, |
2553 | | -mode: params.mode ?? "install", |
2554 | | -}); |
2555 | | -return validated.ok ? null : validated; |
2556 | | -} |
2557 | 2535 | |
2558 | 2536 | async function installPluginFromPackageDir( |
2559 | 2537 | params: { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -199,5 +199,3 @@ export function restoreRegisteredMemoryEmbeddingProviders(
|
199 | 199 | export function clearMemoryEmbeddingProviders(): void { |
200 | 200 | getMemoryEmbeddingProviders().clear(); |
201 | 201 | } |
202 | | - |
203 | | -export const resetMemoryEmbeddingProviders = clearMemoryEmbeddingProviders; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -249,10 +249,6 @@ function normalizeMemoryPromptLines(value: unknown): string[] {
|
249 | 249 | return value.filter((line): line is string => typeof line === "string"); |
250 | 250 | } |
251 | 251 | |
252 | | -export function getMemoryPromptSectionBuilder(): MemoryPromptSectionBuilder | undefined { |
253 | | -return memoryPluginState.capability?.capability.promptBuilder; |
254 | | -} |
255 | | - |
256 | 252 | export function listMemoryPromptSupplements(): MemoryPromptSupplementRegistration[] { |
257 | 253 | return [...memoryPluginState.promptSupplements]; |
258 | 254 | } |
@@ -276,10 +272,6 @@ export function resolveMemoryFlushPlan(params: {
|
276 | 272 | return memoryPluginState.capability?.capability.flushPlanResolver?.(params) ?? null; |
277 | 273 | } |
278 | 274 | |
279 | | -export function getMemoryFlushPlanResolver(): MemoryFlushPlanResolver | undefined { |
280 | | -return memoryPluginState.capability?.capability.flushPlanResolver; |
281 | | -} |
282 | | - |
283 | 275 | /** @deprecated Use registerMemoryCapability(pluginId, { runtime }) instead. */ |
284 | 276 | export function registerMemoryRuntime(runtime: MemoryPluginRuntime): void { |
285 | 277 | registerMemoryRuntimeForPlugin(LEGACY_MEMORY_COMPAT_PLUGIN_ID, runtime); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -97,15 +97,6 @@ export function getPluginModuleLoaderStats(): PluginModuleLoaderStatsSnapshot {
|
97 | 97 | }; |
98 | 98 | } |
99 | 99 | |
100 | | -export function resetPluginModuleLoaderStatsForTest(): void { |
101 | | -pluginModuleLoaderStats.calls = 0; |
102 | | -pluginModuleLoaderStats.nativeHits = 0; |
103 | | -pluginModuleLoaderStats.nativeMisses = 0; |
104 | | -pluginModuleLoaderStats.sourceTransformForced = 0; |
105 | | -pluginModuleLoaderStats.sourceTransformFallbacks = 0; |
106 | | -pluginModuleLoaderStats.sourceTransformTargets.clear(); |
107 | | -} |
108 | | - |
109 | 100 | function loadCreateJitiLoaderFactory(): PluginModuleLoaderFactory { |
110 | 101 | if (createJitiLoaderFactory) { |
111 | 102 | return createJitiLoaderFactory; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,6 @@ import fs from "node:fs";
|
3 | 3 | import path from "node:path"; |
4 | 4 | import { isRecord as isJsonObject } from "@openclaw/normalization-core/record-coerce"; |
5 | 5 | import { listAgentIds, resolveAgentDir } from "../agents/agent-scope.js"; |
6 | | -import { resolveAuthProfileDatabasePath } from "../agents/auth-profiles/sqlite.js"; |
7 | 6 | import type { OpenClawConfig } from "../config/types.openclaw.js"; |
8 | 7 | import { formatErrorMessage } from "../infra/errors.js"; |
9 | 8 | import { resolveUserPath } from "../utils.js"; |
@@ -15,13 +14,6 @@ export function parseEnvAssignmentValue(raw: string): string {
|
15 | 14 | return parseEnvValue(raw); |
16 | 15 | } |
17 | 16 | |
18 | | -/** Lists canonical auth-profile stores visible to secrets audit/apply storage scanners. */ |
19 | | -export function listAuthProfileStorePaths(config: OpenClawConfig, stateDir: string): string[] { |
20 | | -return listAuthProfileStoreAgentDirs(config, stateDir).map((agentDir) => |
21 | | -resolveAuthProfileDatabasePath(agentDir), |
22 | | -); |
23 | | -} |
24 | | - |
25 | 17 | /** Lists agent directories that own canonical auth-profile stores. */ |
26 | 18 | export function listAuthProfileStoreAgentDirs(config: OpenClawConfig, stateDir: string): string[] { |
27 | 19 | return listAuthProfileStoreAgentDirsFromAuthStorePaths(config, stateDir); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。