mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-27 23:43:37 +00:00
refactor(runtime): drop unused exported helpers
This commit is contained in:
@@ -63,11 +63,6 @@ export const SHORT_TERM_PHASE_SIGNAL_RELATIVE_PATH = path.join(
|
||||
".dreams",
|
||||
"phase-signals.json",
|
||||
);
|
||||
export const SHORT_TERM_LOCK_RELATIVE_PATH = path.join(
|
||||
"memory",
|
||||
".dreams",
|
||||
"short-term-promotion.lock",
|
||||
);
|
||||
const SHORT_TERM_LOCK_WAIT_TIMEOUT_MS = 10_000;
|
||||
const SHORT_TERM_LOCK_STALE_MS = 60_000;
|
||||
const SHORT_TERM_LOCK_RETRY_DELAY_MS = 40;
|
||||
|
||||
@@ -79,23 +79,6 @@ export function getPluginCommandSpecs(
|
||||
return listProviderPluginCommandSpecs(providerName);
|
||||
}
|
||||
|
||||
export function getPluginCommandSpecsFromRegistrations(
|
||||
commands: readonly PluginCommandRegistration[],
|
||||
provider?: string,
|
||||
options: PluginCommandSpecOptions = {},
|
||||
): Array<{
|
||||
name: string;
|
||||
description: string;
|
||||
descriptionLocalizations?: Record<string, string>;
|
||||
acceptsArgs: boolean;
|
||||
}> {
|
||||
const providerName = normalizeOptionalLowercaseString(provider);
|
||||
if (!pluginNativeCommandsEnabled(providerName, options)) {
|
||||
return [];
|
||||
}
|
||||
return listProviderPluginCommandSpecsFromRegistrations(commands, providerName);
|
||||
}
|
||||
|
||||
export function getPluginCommandEntrySpecs(
|
||||
provider?: string,
|
||||
options: PluginCommandSpecOptions = {},
|
||||
@@ -133,21 +116,6 @@ export function listProviderPluginCommandSpecs(provider?: string): Array<{
|
||||
.map((cmd) => serializePluginCommandSpec(cmd, provider));
|
||||
}
|
||||
|
||||
export function listProviderPluginCommandSpecsFromRegistrations(
|
||||
commands: readonly PluginCommandRegistration[],
|
||||
provider?: string,
|
||||
): Array<{
|
||||
name: string;
|
||||
description: string;
|
||||
descriptionLocalizations?: Record<string, string>;
|
||||
acceptsArgs: boolean;
|
||||
}> {
|
||||
return commands
|
||||
.map((entry) => entry.command)
|
||||
.filter((cmd) => pluginCommandSupportsChannel(cmd, provider))
|
||||
.map((cmd) => serializePluginCommandSpec(cmd, provider));
|
||||
}
|
||||
|
||||
function serializePluginCommandSpec(
|
||||
cmd: OpenClawPluginCommandDefinition,
|
||||
provider?: string,
|
||||
|
||||
Reference in New Issue
Block a user