refactor(agents): eliminate export name collisions (#121768)

* refactor(auth): consolidate profile helper owners

* refactor(agents): consolidate subagent registry reads

* refactor(agents): disambiguate runtime placement helpers

* refactor(agents): disambiguate helper exports

* chore(scripts): burn export collision debt

* test(agents): follow moved subagent read owner
This commit is contained in:
Peter Steinberger
2026-08-10 22:24:33 -07:00
committed by GitHub
parent 03f9f29a86
commit 36fbd869ed
161 changed files with 775 additions and 1042 deletions
+70 -70
View File
@@ -53,17 +53,17 @@
{"closureHash":"ff3c4616cd6212a6d698831a8b287ad87e3968c8663f4090d095bb30ec40fc1c","declaration":"export function abortAndDrainAgentHarnessRun(params: { sessionId: string; sessionKey?: string; settleMs?: number; forceClear?: boolean; reason?: string; }): Promise<AbortAndDrainEmbeddedAgentRunResult>;","entrypoint":"agent-harness","exportName":"abortAndDrainAgentHarnessRun","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"58989e3fa91eecf2e05202e36548e6e64a3b9219e83154bd99866c851604e34e","declaration":"export function createAgentToolResultMiddlewareRunner(ctx: AgentToolResultMiddlewareContext, handlers?: AgentToolResultMiddleware[]): { applyToolResultMiddleware(event: AgentToolResultMiddlewareEvent): Promise<OpenClawAgentToolResult>; };","entrypoint":"agent-harness","exportName":"createAgentToolResultMiddlewareRunner","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"b8f6355d7ad1700aceecddaa6e9ccf43091a792d5b481a1ee3f55294a881a67d","declaration":"export function createCodexAppServerToolResultExtensionRunner(ctx: CodexAppServerExtensionContext, factories?: CodexAppServerExtensionFactory[]): { applyToolResultExtensions(event: CodexAppServerToolResultEvent): Promise<AgentToolResult<unknown>>; };","entrypoint":"agent-harness","exportName":"createCodexAppServerToolResultExtensionRunner","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"c4e5a9433c43e733147472f80b0669afd4521aca58d17aa914ab1615c88aeeeb","declaration":"export function createOpenClawCodingTools(options?: OpenClawCodingToolsOptions): AnyAgentTool[];","entrypoint":"agent-harness","exportName":"createOpenClawCodingTools","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"25ff7f2385cc4945b0242d4e8142701ca11dcb43caf79c13be98d3d7057aa16b","declaration":"export function createOpenClawCodingTools(options?: OpenClawCodingToolsOptions): AnyAgentTool[];","entrypoint":"agent-harness","exportName":"createOpenClawCodingTools","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"13649ee853485319e7449fda25c106b3f3f53d3090e53cdbb28e220a8529eb80","declaration":"export function disposeRegisteredAgentHarnesses(): Promise<void>;","entrypoint":"agent-harness","exportName":"disposeRegisteredAgentHarnesses","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"f255a91162ece4c239bb8fa745efa14a1054bc024a291e9954f75f239b2b87c3","declaration":"export function resolveActiveEmbeddedRunSessionId(sessionKey: string): string | undefined;","entrypoint":"agent-harness","exportName":"resolveActiveEmbeddedRunSessionId","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"27d9f61df9ccf68615cb2002a6da891e36ab0c07623bc37c4d07aa980b446881","declaration":"export function resolveWebSearchToolPolicy(params: WebSearchToolPolicyParams): WebSearchToolPolicyResolution;","entrypoint":"agent-harness","exportName":"resolveWebSearchToolPolicy","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"function","recordType":"export"}
{"closureHash":"89d1232faa739ea7bb8b305d5e92ff1057759b833cd9994ef0923634234741e7","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"agent-harness","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"795de260f25641a5b8da3aebe153b44e06327ee13bf9a05f7e42c3b38f3c2ce3","declaration":"export type AgentHarnessV2 = AgentHarnessV2;","entrypoint":"agent-harness","exportName":"AgentHarnessV2","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"49e181db775c3ee735cef6900062306c81f598b8a5b696379e55a21f3b011741","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"agent-harness","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"b6715292b8d6d9052693092945f171f0c92cd02e816f04e0eef46bd021220691","declaration":"export type AgentHarnessV2 = AgentHarnessV2;","entrypoint":"agent-harness","exportName":"AgentHarnessV2","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"4ad0f830bf11a2db48faefb1439b7fbb08d9f22d22083f5e301327e1696f2310","declaration":"export type AgentToolResultMiddleware = AgentToolResultMiddleware;","entrypoint":"agent-harness","exportName":"AgentToolResultMiddleware","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"008b6c78d5e44a9d1df1d7e32e6015382ee9ba1cb9b10bd4c2b467619d1c89d4","declaration":"export type AgentToolResultMiddlewareEvent = AgentToolResultMiddlewareEvent;","entrypoint":"agent-harness","exportName":"AgentToolResultMiddlewareEvent","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"7414a2a79c2d78c1d52538250c827305bba1a2bb25010448837c8524a9f95b3c","declaration":"export type AnyAgentTool = AnyAgentTool;","entrypoint":"agent-harness","exportName":"AnyAgentTool","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"67d52689459e750067ca4d122d5169a1032fa5a806cdc66b0bf189f702ddbf57","declaration":"export type EmbeddedRunAttemptParams = EmbeddedRunAttemptParams;","entrypoint":"agent-harness","exportName":"EmbeddedRunAttemptParams","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"3c8261189c5490b5f8938dde6c1fd39e05ad9a3156041fcc8b20df8040147986","declaration":"export type EmbeddedRunAttemptParamsV2 = EmbeddedRunAttemptParamsV2;","entrypoint":"agent-harness","exportName":"EmbeddedRunAttemptParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"e56cb7e08a025e371381ce766f210b1eb87cd20cf342ec4257a6ed901dee1161","declaration":"export type EmbeddedRunAttemptParams = EmbeddedRunAttemptParams;","entrypoint":"agent-harness","exportName":"EmbeddedRunAttemptParams","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"91ab1bc755e8eed0932ece9b7dbb5509e93abcb017dee7a0cd2ebaca4616f497","declaration":"export type EmbeddedRunAttemptParamsV2 = EmbeddedRunAttemptParamsV2;","entrypoint":"agent-harness","exportName":"EmbeddedRunAttemptParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"closureHash":"25c6985c3bef2c6efc6a96e70af6d66fe073be0b0d311681cfc0dfc186528d9a","declaration":"export type OpenClawAgentToolResult<TResult = unknown> = OpenClawAgentToolResult<TResult>;","entrypoint":"agent-harness","exportName":"OpenClawAgentToolResult","importSpecifier":"openclaw/plugin-sdk/agent-harness","kind":"type","recordType":"export"}
{"category":"runtime","entrypoint":"agent-harness-runtime","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","recordType":"module"}
{"closureHash":"fab99dfcb01d475a1bfdbe7a8fac9be10a93dac5f12ac78c2dea673c8ab86abf","declaration":"export function abortAgentHarnessRun(sessionId: string): boolean;\nexport function abortAgentHarnessRun(sessionId: undefined, opts: { mode: \"all\" | \"compacting\"; reason?: \"restart\"; }): boolean;","entrypoint":"agent-harness-runtime","exportName":"abortAgentHarnessRun","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
@@ -82,8 +82,8 @@
{"closureHash":"f8ad3d762c9753fdc36b2b9af0980167fdc54090c7bcca2f3dbe7c8951e86821","declaration":"export function buildAgentRuntimePlan(params: BuildAgentRuntimePlanParams): AgentRuntimePlan;","entrypoint":"agent-harness-runtime","exportName":"buildAgentRuntimePlan","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"528d11abf061b0b303722737de5a6406e7e55bffa38c45144c77d896ae1b3b0a","declaration":"export function buildBootstrapContextForFiles(bootstrapFiles: WorkspaceBootstrapFile[], params: { config?: OpenClawConfig; agentId?: string | null; warn?: (message: string) => void; }): EmbeddedContextFile[];","entrypoint":"agent-harness-runtime","exportName":"buildBootstrapContextForFiles","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"44d5a4667d2f3dc3a28e5c9d7b46765b1fb3c62820288e40251f5174911c8a6a","declaration":"export function buildEmbeddedAttemptToolRunContext(params: { trigger?: EmbeddedRunTrigger; jobId?: string; memoryFlushWritePath?: string; toolsAllow?: string[]; conversationToolPolicy?: GroupToolPolicyConfig; trace?: DiagnosticTraceContext; }): { trigger?: EmbeddedRunTrigger; jobId?: string; memoryFlushWritePath?: string; runtimeToolAllowlist?: string[]; conversationToolPolicy?: GroupToolPolicyConfig; trace?: DiagnosticTraceContext; };","entrypoint":"agent-harness-runtime","exportName":"buildEmbeddedAttemptToolRunContext","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"b1299f24e1c39c4f7ee73c0fd858e78a72b908e25e4fe8efce18bee53bf0f09b","declaration":"export function buildHarnessContextEngineRuntimeContext(params: Parameters<typeof buildAfterTurnRuntimeContext>[0]): ContextEngineRuntimeContext;","entrypoint":"agent-harness-runtime","exportName":"buildHarnessContextEngineRuntimeContext","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"265665427d4b24c4d76c70928a2ccfa363db7ea51e9a9c3279efb30f199290d6","declaration":"export function buildHarnessContextEngineRuntimeContextFromUsage(params: Parameters<typeof buildAfterTurnRuntimeContextFromUsage>[0]): ContextEngineRuntimeContext;","entrypoint":"agent-harness-runtime","exportName":"buildHarnessContextEngineRuntimeContextFromUsage","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"92201c182e890e489de0ded2606be4118d1ec3bf9cf4aa873628cb962304b7f0","declaration":"export function buildHarnessContextEngineRuntimeContext(params: Parameters<typeof buildAfterTurnRuntimeContext>[0]): ContextEngineRuntimeContext;","entrypoint":"agent-harness-runtime","exportName":"buildHarnessContextEngineRuntimeContext","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"9217a0d9284005c47780dac9d842b331d2cafeb1eed7e5f17ab63c8cc2a2225f","declaration":"export function buildHarnessContextEngineRuntimeContextFromUsage(params: Parameters<typeof buildAfterTurnRuntimeContextFromUsage>[0]): ContextEngineRuntimeContext;","entrypoint":"agent-harness-runtime","exportName":"buildHarnessContextEngineRuntimeContextFromUsage","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"33a7cd8d63d4ef045ee3a42f806026a8b621e7dd32d8d6fbf4e7b44452d5e0ce","declaration":"export function buildNativeHookRelayCommand(params: { provider: NativeHookRelayProvider; relayId: string; generation?: string; event: NativeHookRelayEvent; preToolUseUnavailable?: \"noop\"; timeoutMs?: number; executable?: string; nice?: number | false; nodeExecutable?: string; }): string;","entrypoint":"agent-harness-runtime","exportName":"buildNativeHookRelayCommand","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"3846647c3c2fb0242f70591cf95c2e02f2a5a3c44447efb4cf7a31b2dc2122fd","declaration":"export function buildSkillWorkshopPromptSection(): string[];","entrypoint":"agent-harness-runtime","exportName":"buildSkillWorkshopPromptSection","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"32e977ece65144a83ae1b0a3c8d1b9b00a2a2506ad9ef1db3b2b9770ce762dbe","declaration":"export function buildWatchedSessionsHarnessContext(params: { config?: OpenClawConfig; sessionKey?: string; sandboxed?: boolean; toolNames: Iterable<string>; capabilityToolNames?: Iterable<string>; }): string | undefined;","entrypoint":"agent-harness-runtime","exportName":"buildWatchedSessionsHarnessContext","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
@@ -100,7 +100,7 @@
{"closureHash":"51f76e9e37b65b358f0313e10152d950b003bc3e50f4bb26fe29a988237772e2","declaration":"export function consumePreExecutionBlockedToolCall(toolCallId: string, runId?: string): boolean;","entrypoint":"agent-harness-runtime","exportName":"consumePreExecutionBlockedToolCall","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"58989e3fa91eecf2e05202e36548e6e64a3b9219e83154bd99866c851604e34e","declaration":"export function createAgentToolResultMiddlewareRunner(ctx: AgentToolResultMiddlewareContext, handlers?: AgentToolResultMiddleware[]): { applyToolResultMiddleware(event: AgentToolResultMiddlewareEvent): Promise<OpenClawAgentToolResult>; };","entrypoint":"agent-harness-runtime","exportName":"createAgentToolResultMiddlewareRunner","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"b8f6355d7ad1700aceecddaa6e9ccf43091a792d5b481a1ee3f55294a881a67d","declaration":"export function createCodexAppServerToolResultExtensionRunner(ctx: CodexAppServerExtensionContext, factories?: CodexAppServerExtensionFactory[]): { applyToolResultExtensions(event: CodexAppServerToolResultEvent): Promise<AgentToolResult<unknown>>; };","entrypoint":"agent-harness-runtime","exportName":"createCodexAppServerToolResultExtensionRunner","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"3f09dd665045d4010e22633cc51d48c75484c5d77c96e2b6235042cdfa778d96","declaration":"export function deliverAgentHarnessUserInputPrompt(params: PromptDeliveryParams, questions: readonly AgentHarnessUserInputQuestion[], options?: AgentHarnessUserInputPromptOptions): Promise<void>;","entrypoint":"agent-harness-runtime","exportName":"deliverAgentHarnessUserInputPrompt","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"7fee754eed7542b76b75703ecb942d42dd60d3d982e1d97cfe199140093a3458","declaration":"export function deliverAgentHarnessUserInputPrompt(params: PromptDeliveryParams, questions: readonly AgentHarnessUserInputQuestion[], options?: AgentHarnessUserInputPromptOptions): Promise<void>;","entrypoint":"agent-harness-runtime","exportName":"deliverAgentHarnessUserInputPrompt","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"6f436485257f69fa07a18203b91d4341690522f12aff4f25805c7a1e21326ee3","declaration":"export function detectAndLoadAgentHarnessPromptImages(params: { prompt: string; workspaceDir: string; model: { input?: string[]; }; existingImages?: ImageContent[]; imageOrder?: PromptImageOrderEntry[]; media?: MediaFact[]; config?: OpenClawConfig; workspaceOnly?: boolean; localRoots?: readonly string[]; sandbox?: { root: string; bridge: SandboxFsBridge; }; }): Promise<{ images: ImageContent[]; detectedRefs: Array<{ raw: string; resolved: string; type: \"path\" | \"media-uri\"; }>; loadedCount: number; skippedCount: number; }>;","entrypoint":"agent-harness-runtime","exportName":"detectAndLoadAgentHarnessPromptImages","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"13649ee853485319e7449fda25c106b3f3f53d3090e53cdbb28e220a8529eb80","declaration":"export function disposeRegisteredAgentHarnesses(): Promise<void>;","entrypoint":"agent-harness-runtime","exportName":"disposeRegisteredAgentHarnesses","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"c38cd390190bb07ddcd247420d6e0b489a0229bd402ddca0440417217a57251a","declaration":"export function emitAgentEvent(event: Omit<AgentEventPayload, \"seq\" | \"ts\">): void;","entrypoint":"agent-harness-runtime","exportName":"emitAgentEvent","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
@@ -162,7 +162,7 @@
{"closureHash":"40154c3b7b2a7179df33f4a3fbef5e56078be2759d5aab29f39eb0f3c92fc631","declaration":"export function projectRuntimeToolInputSchema(schema: unknown, path?: string): RuntimeToolInputSchemaProjection;","entrypoint":"agent-harness-runtime","exportName":"projectRuntimeToolInputSchema","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"e42e3dc63e8545bb9a6056336fbd6c1dc8f356dce4f0f1c6d9765254c974390e","declaration":"export function projectSettledTurnFinalizationAttemptResult(result: AgentHarnessAttemptResult): AgentHarnessSettledTurnFinalizationResult;","entrypoint":"agent-harness-runtime","exportName":"projectSettledTurnFinalizationAttemptResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"3fbe470f065d2c2f16de538d8347934ec2daee2081d8903db1777b0afd2a8043","declaration":"export function queueAgentHarnessMessage(sessionId: string, text: string, options?: EmbeddedAgentQueueMessageOptions): boolean;","entrypoint":"agent-harness-runtime","exportName":"queueAgentHarnessMessage","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"c1ef32674ceeac32818c97821305d634fbe1b592d6d5bdfa0ed6298c7f842ebc","declaration":"export function registerNativeHookRelay(params: RegisterNativeHookRelayParams): ActiveNativeHookRelayRegistrationHandle;","entrypoint":"agent-harness-runtime","exportName":"registerNativeHookRelay","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"fd0056a173ac764c39e15310e6ad70477ac2971677e172d4161ca234080795d0","declaration":"export function registerNativeHookRelay(params: RegisterNativeHookRelayParams): ActiveNativeHookRelayRegistrationHandle;","entrypoint":"agent-harness-runtime","exportName":"registerNativeHookRelay","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"b7cc6c35506dc6955e0359aa5c53c15a4d0db23639da8c1717f8fefda953c119","declaration":"export function requestDeferredPluginToolApproval(params: { deferredApproval: DeferredPluginToolApproval; signal?: AbortSignal; }): Promise<HookOutcome>;","entrypoint":"agent-harness-runtime","exportName":"requestDeferredPluginToolApproval","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"a2306cba08cb05ff8430c8362c0cc3c821706da5a4e65a06849ad0d0fb007ae3","declaration":"export function resetAgentEventsForTest(options?: { preserveListeners?: boolean; }): void;","entrypoint":"agent-harness-runtime","exportName":"resetAgentEventsForTest","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"f255a91162ece4c239bb8fa745efa14a1054bc024a291e9954f75f239b2b87c3","declaration":"export function resolveActiveEmbeddedRunSessionId(sessionKey: string): string | undefined;","entrypoint":"agent-harness-runtime","exportName":"resolveActiveEmbeddedRunSessionId","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
@@ -197,7 +197,7 @@
{"closureHash":"e4784aeda4c24b60cd49b7f5983e70a380a4759d5176c74d30f2900952ba848f","declaration":"export function runAgentHarnessBeforeAgentFinalizeHook(params: { event: PluginHookBeforeAgentFinalizeEvent; ctx: AgentHarnessHookContext; hookRunner?: AgentHarnessHookRunner; }): Promise<AgentHarnessBeforeAgentFinalizeOutcome>;","entrypoint":"agent-harness-runtime","exportName":"runAgentHarnessBeforeAgentFinalizeHook","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"8fec73ee8c7c9be3335bd6dc1bac9278f0be5beef22a5975eb06e56f504f4bd6","declaration":"export function runAgentHarnessBeforeCompactionHook(params: { sessionFile: string; messages?: AgentMessage[]; ctx: AgentHarnessHookContext; }): Promise<void>;","entrypoint":"agent-harness-runtime","exportName":"runAgentHarnessBeforeCompactionHook","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"021b81820bef2e8d54c50a5fc159d6665b23b50a1f5c40dae76a4833839d89c9","declaration":"export function runAgentHarnessBeforeMessageWriteHook(params: { message: AgentMessage; agentId?: string; sessionKey?: string; }): AgentMessage | null;","entrypoint":"agent-harness-runtime","exportName":"runAgentHarnessBeforeMessageWriteHook","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"8208fa9bd35c5df9d5169347760ecca5002a9a97cfb2006965e40986dba954a4","declaration":"export function runAgentHarnessGatewayQuestion(params: RunAgentHarnessGatewayQuestionParams): Promise<QuestionWaitAnswerResult>;","entrypoint":"agent-harness-runtime","exportName":"runAgentHarnessGatewayQuestion","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"b3f400ee23218012467ec7f373655abf0547591357fa8e828bdca455fb5cf06f","declaration":"export function runAgentHarnessGatewayQuestion(params: RunAgentHarnessGatewayQuestionParams): Promise<QuestionWaitAnswerResult>;","entrypoint":"agent-harness-runtime","exportName":"runAgentHarnessGatewayQuestion","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"50a4d7cb20dd8f884abbcb62d77b5b2df183fbfcd058cc7aa76edacd1f7b90d8","declaration":"export function runAgentHarnessLlmInputHook(params: { event: PluginHookLlmInputEvent; ctx: AgentHarnessHookContext; hookRunner?: AgentHarnessHookRunner; }): void;","entrypoint":"agent-harness-runtime","exportName":"runAgentHarnessLlmInputHook","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"1bd55c141c249b1c04470cafe0cd4d41dce334ea2883ce83235af56d24a15cca","declaration":"export function runAgentHarnessLlmOutputHook(params: { event: PluginHookLlmOutputEvent; ctx: AgentHarnessHookContext; hookRunner?: AgentHarnessHookRunner; }): void;","entrypoint":"agent-harness-runtime","exportName":"runAgentHarnessLlmOutputHook","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
{"closureHash":"c4c5131ab7065decd8d8e935ac3779e3baa2c52fbbbd95a6ccb624377db09ca1","declaration":"export function runBeforeToolCallHook(args: { toolName: string; params: unknown; toolKind?: PluginHookToolKind; toolInputKind?: PluginHookToolInputKind; toolCallId?: string; ctx?: HookContext; signal?: AbortSignal; approvalMode?: \"request\" | \"report\" | \"deny\" | \"defer\"; }): Promise<HookOutcome>;","entrypoint":"agent-harness-runtime","exportName":"runBeforeToolCallHook","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"function","recordType":"export"}
@@ -219,13 +219,13 @@
{"closureHash":"0701a22057edc3b733da7e05948db94aa98b337b224a5718efdd85212a8602bf","declaration":"export const TRANSCRIPT_CREDENTIAL_SAFETY_PROMPT: string;","entrypoint":"agent-harness-runtime","exportName":"TRANSCRIPT_CREDENTIAL_SAFETY_PROMPT","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"const","recordType":"export"}
{"closureHash":"b5845c99df6c2a834a16678c320e0111bad96a3a7ac245d379aa5e6d2555d29b","declaration":"export const agentHarnessAttemptTerminal: { merge: (current: AgentRunAttemptTerminal, incoming: AgentRunAttemptTerminal) => AgentRunAttemptTerminal; normalize: (input: { aborted?: boolean; externalAbort?: boolean; idleTimedOut?: boolean; promptError?: unknown; promptErrorSource?: AgentRunAttemptFailureSource | null; timedOut?: boolean; timedOutByRunBudget?: boolean; timedOutDuringCompaction?: boolean; timedOutDuringToolExecution?: boolean; }) => AgentRunAttemptTerminal; project: (terminal: AgentRunAttemptTerminal) => { aborted: boolean; cleanupYieldAborted: boolean; externalAbort: boolean; failed: boolean; idleTimedOut: boolean; interrupted: boolean; promptError: unknown; promptErrorSource: AgentRunAttemptFailureSource | null; timedOut: boolean; timedOutByRunBudget: boolean; timedOutDuringCompaction: boolean; timedOutDuringToolExecution: boolean; }; setFailure: (terminal: AgentRunAttemptTerminal, failure: { source: AgentRunAttemptFailureSource; error: unknown; } | null) => AgentRunAttemptTerminal;};","entrypoint":"agent-harness-runtime","exportName":"agentHarnessAttemptTerminal","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"const","recordType":"export"}
{"closureHash":"22bcf962aa76c76074c4ed4ad7d6558edbc3588e239263e09af74c1000bbe012","declaration":"export const embeddedAgentLog: SubsystemLogger;","entrypoint":"agent-harness-runtime","exportName":"embeddedAgentLog","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"const","recordType":"export"}
{"closureHash":"2d557ae3f21edf5b81e36ed42915c0b44188ad04730348db803f30fce54fe47a","declaration":"export const nativeHookRelayTesting: { readonly clearNativeHookRelaysForTests: () => void; readonly getNativeHookRelayInvocationsForTests: () => NativeHookRelayInvocation[]; readonly getNativeHookRelayRegistrationForTests: (relayId: string) => NativeHookRelayRegistration | undefined; readonly getNativeHookRelayBridgeDirForTests: () => string; readonly getNativeHookRelayBridgeRegistryPathForTests: (relayId: string) => string; readonly getNativeHookRelayBridgeRecordForTests: (relayId: string) => Record<string, unknown> | undefined; readonly isNativeHookRelayBridgeLookupRetryableForTests: (error: unknown, elapsedMs?: number) => boolean; readonly formatPermissionApprovalDescriptionForTests: (request: NativeHookRelayPermissionApprovalRequest) => string; readonly permissionRequestContentFingerprintForTests: (request: NativeHookRelayPermissionApprovalRequest) => string; readonly permissionRequestToolInputKeyFingerprintForTests: (toolInput: Record<string, unknown>) => string; readonly setNativeHookRelayPermissionApprovalRequesterForTests: (requester: NativeHookRelayPermissionApprovalRequester) => void; readonly setNativeHookRelayDeferredToolApprovalRequesterForTests: (requester: NativeHookRelayDeferredToolApprovalRequester) => void;};","entrypoint":"agent-harness-runtime","exportName":"nativeHookRelayTesting","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"const","recordType":"export"}
{"closureHash":"b786f0ddfb551440de9e0abdbec0a26f69fe429d6d466cfdf09391b86a372bb2","declaration":"export const nativeHookRelayTesting: { readonly clearNativeHookRelaysForTests: () => void; readonly getNativeHookRelayInvocationsForTests: () => NativeHookRelayInvocation[]; readonly getNativeHookRelayRegistrationForTests: (relayId: string) => NativeHookRelayRegistration | undefined; readonly getNativeHookRelayBridgeDirForTests: () => string; readonly getNativeHookRelayBridgeRegistryPathForTests: (relayId: string) => string; readonly getNativeHookRelayBridgeRecordForTests: (relayId: string) => Record<string, unknown> | undefined; readonly isNativeHookRelayBridgeLookupRetryableForTests: (error: unknown, elapsedMs?: number) => boolean; readonly formatPermissionApprovalDescriptionForTests: (request: NativeHookRelayPermissionApprovalRequest) => string; readonly permissionRequestContentFingerprintForTests: (request: NativeHookRelayPermissionApprovalRequest) => string; readonly permissionRequestToolInputKeyFingerprintForTests: (toolInput: Record<string, unknown>) => string; readonly setNativeHookRelayPermissionApprovalRequesterForTests: (requester: NativeHookRelayPermissionApprovalRequester) => void; readonly setNativeHookRelayDeferredToolApprovalRequesterForTests: (requester: NativeHookRelayDeferredToolApprovalRequester) => void;};","entrypoint":"agent-harness-runtime","exportName":"nativeHookRelayTesting","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"const","recordType":"export"}
{"closureHash":"f237bbc11e1d389679cd4e2ad7aa9055951b3029348e3374b81f769786a51d55","declaration":"export type AbortAndDrainAgentHarnessRunResult = AbortAndDrainEmbeddedAgentRunResult;","entrypoint":"agent-harness-runtime","exportName":"AbortAndDrainAgentHarnessRunResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"6f802f46717d28d260bbcb2cf4790dfed4e9ab28c4fe822d259228189cca4665","declaration":"export type AgentApprovalEventData = AgentApprovalEventData;","entrypoint":"agent-harness-runtime","exportName":"AgentApprovalEventData","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"12aac3a57ce200b0f082002be237625729f84ed7c337f1bac90bcd0688a53319","declaration":"export type AgentEventPayload = AgentEventPayload;","entrypoint":"agent-harness-runtime","exportName":"AgentEventPayload","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"89d1232faa739ea7bb8b305d5e92ff1057759b833cd9994ef0923634234741e7","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"agent-harness-runtime","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"89d1232faa739ea7bb8b305d5e92ff1057759b833cd9994ef0923634234741e7","declaration":"export type AgentHarnessAttemptParams = AgentHarnessAttemptParams;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessAttemptParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"ee3f133d91eaa071727c7e182f4448cd13fec510ea6b2b575283dc548f60c9cf","declaration":"export type AgentHarnessAttemptParamsV2 = AgentHarnessAttemptParamsV2;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessAttemptParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"49e181db775c3ee735cef6900062306c81f598b8a5b696379e55a21f3b011741","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"agent-harness-runtime","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"49e181db775c3ee735cef6900062306c81f598b8a5b696379e55a21f3b011741","declaration":"export type AgentHarnessAttemptParams = AgentHarnessAttemptParams;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessAttemptParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"51819376b167aefcfed0bb08c6bdf8d78099eed5ab54df9f33ee74e4da838ac3","declaration":"export type AgentHarnessAttemptParamsV2 = AgentHarnessAttemptParamsV2;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessAttemptParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"2dc2a62deea63b316142cc28d40afb88fb0d1e5ce3e048f141420726cda38248","declaration":"export type AgentHarnessAttemptResult = AgentHarnessAttemptResult;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessAttemptResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"c7e642234081160830fd9e18a301900f8ee1ea8c88382e5a286f0102de65b714","declaration":"export type AgentHarnessAuthBindingFingerprintParams = AgentHarnessAuthBindingFingerprintParams;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessAuthBindingFingerprintParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"8f496ce75f294f2aa440a49c3c5b065ddff3a4714df775116af5e53f7fd14fe5","declaration":"export type AgentHarnessCompactParams = CompactEmbeddedAgentSessionParams;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessCompactParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
@@ -239,8 +239,8 @@
{"closureHash":"95741b872a194687696eba4a96d6e887ec6e81922695fa0282cb2f0a46ff9f97","declaration":"export type AgentHarnessSessionForkParams = AgentHarnessSessionForkParams;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSessionForkParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"f3c46fef2a6c3393b0b6ad09915abcd6f57bb58ddddde1d60ebd113c7a1c5fa6","declaration":"export type AgentHarnessSessionForkResult = AgentHarnessSessionForkResult;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSessionForkResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"4b5a59730309e446f59a8ec1c554c3193aca1959916594cc657347098bd67a35","declaration":"export type AgentHarnessSettledTurnFinalizationResult = AgentHarnessSettledTurnFinalizationResult;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSettledTurnFinalizationResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"e62cfeeba660873901af9d26f7bb425ddc82063d115fc3f900d272676883b49a","declaration":"export type AgentHarnessSideQuestionParams = AgentHarnessSideQuestionParams;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSideQuestionParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"a0037263e721edda60c398822f5db2731f46db96b2922e8e5a00c5e20df67ec4","declaration":"export type AgentHarnessSideQuestionParamsV2 = AgentHarnessSideQuestionParamsV2;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSideQuestionParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"7aa583ac9beee165d1b7b3827a322f5e1ce6d0562a82f395c238eec73a125c5c","declaration":"export type AgentHarnessSideQuestionParams = AgentHarnessSideQuestionParams;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSideQuestionParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"7198f77981a1e645eaa441650aa3f02b0f4cc07d18fd081dd6c16f2d8b0e3f5a","declaration":"export type AgentHarnessSideQuestionParamsV2 = AgentHarnessSideQuestionParamsV2;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSideQuestionParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"e84173055503c40dd0ef1cb67c6d333e9257fcf995252b27c1d58f5c904e8de9","declaration":"export type AgentHarnessSideQuestionResult = AgentHarnessSideQuestionResult;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSideQuestionResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"50214d08dac98e3c1031ac7bc733b85cb2247d2eef3b6b2045758ae403af7647","declaration":"export type AgentHarnessSupport = AgentHarnessSupport;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSupport","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"50ce26ea22bc225e6064d2e5f37356b6f4ce4a57f8b9fa42baa4c421da48aad5","declaration":"export type AgentHarnessSupportContext = AgentHarnessSupportContext;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessSupportContext","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
@@ -250,7 +250,7 @@
{"closureHash":"20a8a7c9d5ebf425c30d04eea3856c6c889a210f1fa53c99299df24882afbf92","declaration":"export type AgentHarnessUserInputOption = AgentHarnessUserInputOption;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessUserInputOption","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"6224f51b4189f10a642ad7a8f50a902ec9c6a6a4f8dac0c0de5f7bc0271a27e5","declaration":"export type AgentHarnessUserInputPromptOptions = AgentHarnessUserInputPromptOptions;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessUserInputPromptOptions","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"d8f1d0d118e1536d1f442d11aeae5334a1ed7949a6c61824f547e12931278e1d","declaration":"export type AgentHarnessUserInputQuestion = AgentHarnessUserInputQuestion;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessUserInputQuestion","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"795de260f25641a5b8da3aebe153b44e06327ee13bf9a05f7e42c3b38f3c2ce3","declaration":"export type AgentHarnessV2 = AgentHarnessV2;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"b6715292b8d6d9052693092945f171f0c92cd02e816f04e0eef46bd021220691","declaration":"export type AgentHarnessV2 = AgentHarnessV2;","entrypoint":"agent-harness-runtime","exportName":"AgentHarnessV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"6f2af683e6a31cde5a473c77e4f03b8f0ec0351a43ea6c0af979d5b394a33f95","declaration":"export type AgentMessage = AgentMessage;","entrypoint":"agent-harness-runtime","exportName":"AgentMessage","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"4ad0f830bf11a2db48faefb1439b7fbb08d9f22d22083f5e301327e1696f2310","declaration":"export type AgentToolResultMiddleware = AgentToolResultMiddleware;","entrypoint":"agent-harness-runtime","exportName":"AgentToolResultMiddleware","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"185abd2870d4df65e9f94623061a30167d17ef1279a395201fe429398bf23500","declaration":"export type AgentToolResultMiddlewareContext = AgentToolResultMiddlewareContext;","entrypoint":"agent-harness-runtime","exportName":"AgentToolResultMiddlewareContext","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
@@ -276,8 +276,8 @@
{"closureHash":"f30b66fd82f4cd61c60880c42a3b8f152ca64a2216036c99ab4129648ed329e7","declaration":"export type EmbeddedAgentCompactResult = EmbeddedAgentCompactResult;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedAgentCompactResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"1bbefad0193436f7340f9d0dec50be5d482973325c3c65170b1053dd05566f0a","declaration":"export type EmbeddedContextFile = EmbeddedContextFile;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedContextFile","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"f30b66fd82f4cd61c60880c42a3b8f152ca64a2216036c99ab4129648ed329e7","declaration":"export type EmbeddedPiCompactResult = EmbeddedAgentCompactResult;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedPiCompactResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"67d52689459e750067ca4d122d5169a1032fa5a806cdc66b0bf189f702ddbf57","declaration":"export type EmbeddedRunAttemptParams = EmbeddedRunAttemptParams;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedRunAttemptParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"3c8261189c5490b5f8938dde6c1fd39e05ad9a3156041fcc8b20df8040147986","declaration":"export type EmbeddedRunAttemptParamsV2 = EmbeddedRunAttemptParamsV2;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedRunAttemptParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"e56cb7e08a025e371381ce766f210b1eb87cd20cf342ec4257a6ed901dee1161","declaration":"export type EmbeddedRunAttemptParams = EmbeddedRunAttemptParams;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedRunAttemptParams","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"91ab1bc755e8eed0932ece9b7dbb5509e93abcb017dee7a0cd2ebaca4616f497","declaration":"export type EmbeddedRunAttemptParamsV2 = EmbeddedRunAttemptParamsV2;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedRunAttemptParamsV2","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"a6cd2eebe0d06e6578ec8438a207c5acda10ddf01041102d84e4c576a0b6a42f","declaration":"export type EmbeddedRunAttemptResult = EmbeddedRunAttemptResult;","entrypoint":"agent-harness-runtime","exportName":"EmbeddedRunAttemptResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"f6cb2d6411db22cb04220777720d97bcca977351de1cb344ce2ff6ab126a3a08","declaration":"export type ExecApprovalDecision = ExecApprovalDecision;","entrypoint":"agent-harness-runtime","exportName":"ExecApprovalDecision","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"7acb0dffc7bcda6c727e4afc49c955fa8e14f4f8b7b45d197ed794dfa0d73b8e","declaration":"export type ExecAutoReviewDecision = ExecAutoReviewDecision;","entrypoint":"agent-harness-runtime","exportName":"ExecAutoReviewDecision","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
@@ -293,7 +293,7 @@
{"closureHash":"d8a720bf250da8daf4dc6a52087aa8728ec33b650b3ad3906fcb40e184de66a0","declaration":"export type NativeHookRelayEvent = \"pre_tool_use\" | \"post_tool_use\" | \"permission_request\" | \"before_agent_finalize\";","entrypoint":"agent-harness-runtime","exportName":"NativeHookRelayEvent","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"cb72ca18e056e52e779d0bf5b67606e1dc160f225225b55937304541105027f4","declaration":"export type NativeHookRelayProcessResponse = NativeHookRelayProcessResponse;","entrypoint":"agent-harness-runtime","exportName":"NativeHookRelayProcessResponse","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"6ee390ae4784b987e22255c16884fb4171033bbfaefaef655e3dd2a2513814a5","declaration":"export type NativeHookRelayProvider = \"codex\";","entrypoint":"agent-harness-runtime","exportName":"NativeHookRelayProvider","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"3026ea832c52143a13ef1ddfa6428f1f284c07b9d6ca27b4a341f61885b4a171","declaration":"export type NativeHookRelayRegistrationHandle = NativeHookRelayRegistrationHandle;","entrypoint":"agent-harness-runtime","exportName":"NativeHookRelayRegistrationHandle","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"eaf2557fd50ea67653a18b1eeb6c93671d6e2b05315f27212275b6450fc57966","declaration":"export type NativeHookRelayRegistrationHandle = NativeHookRelayRegistrationHandle;","entrypoint":"agent-harness-runtime","exportName":"NativeHookRelayRegistrationHandle","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"90fea3155b5d32c22da90460fdaea94e4fd6895d1ca18613d5036ba9835153f9","declaration":"export type NodeListNode = NodeListNode;","entrypoint":"agent-harness-runtime","exportName":"NodeListNode","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"cefe1325c866f0cf7edbec5dcca2fe420237eedc0da172e54094e365894d205d","declaration":"export type NormalizedUsage = NormalizedUsage;","entrypoint":"agent-harness-runtime","exportName":"NormalizedUsage","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
{"closureHash":"25c6985c3bef2c6efc6a96e70af6d66fe073be0b0d311681cfc0dfc186528d9a","declaration":"export type OpenClawAgentToolResult<TResult = unknown> = OpenClawAgentToolResult<TResult>;","entrypoint":"agent-harness-runtime","exportName":"OpenClawAgentToolResult","importSpecifier":"openclaw/plugin-sdk/agent-harness-runtime","kind":"type","recordType":"export"}
@@ -321,7 +321,7 @@
{"closureHash":"ae0f930ec291a0345c4e99e247711465a5d29a8bbdd63968900fa69f382b3a78","declaration":"export function clearExpiredCooldowns(store: AuthProfileStore, now?: number): boolean;","entrypoint":"agent-runtime","exportName":"clearExpiredCooldowns","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"8f29d0208e6502b8721cf83f4c1d777fa8bd7dab4364829e94b3e9b7911b024b","declaration":"export function clearRuntimeAuthProfileStoreSnapshots(): void;","entrypoint":"agent-runtime","exportName":"clearRuntimeAuthProfileStoreSnapshots","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"5bd1a22a2fa52949d3db056103bbdaf44227a3c9f75b2b632451f9c84beb62e7","declaration":"export function ensureAuthProfileStore(agentDir?: string, options?: { allowKeychainPrompt?: boolean; config?: OpenClawConfig; externalCli?: ExternalCliAuthDiscovery; externalCliProviderIds?: Iterable<string>; externalCliProfileIds?: Iterable<string>; inheritedAuthDir?: string; readOnly?: boolean; syncExternalCli?: boolean; }): AuthProfileStore;","entrypoint":"agent-runtime","exportName":"ensureAuthProfileStore","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"76c8f30e776465fd8ee9c33a042ba69d95bc73ff2e204f48890fe02b0f6967b3","declaration":"export function extractAssistantText(msg: AssistantMessage): string;","entrypoint":"agent-runtime","exportName":"extractAssistantText","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"ebd540867ea8426b55adab693bbc67ae5f9e27f985dffbdfb47ac6b48645abe0","declaration":"export function extractAssistantText(msg: AssistantMessage): string;","entrypoint":"agent-runtime","exportName":"extractAssistantText","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"0442a4cf63e80019a759354e7110abc2470e3785780e93d716cca7396d832459","declaration":"export function findModelInCatalog(catalog: ModelCatalogEntry[], provider: string, modelId: string): ModelCatalogEntry | undefined;","entrypoint":"agent-runtime","exportName":"findModelInCatalog","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"9c27564112dd2de275d9882b7bd6492a4e200e9fe47b49c636e72486a0d9d8dd","declaration":"export function findNormalizedProviderValue<T>(entries: Record<string, T> | undefined, provider: string): T | undefined;","entrypoint":"agent-runtime","exportName":"findNormalizedProviderValue","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"c60b1693951ef119d2b7f5665db2505db610505c57ced28bfde97211e594f616","declaration":"export function findPersistedAuthProfileCredential(params: { agentDir?: string; profileId: string; }): AuthProfileStore[\"profiles\"][string] | undefined;","entrypoint":"agent-runtime","exportName":"findPersistedAuthProfileCredential","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
@@ -343,7 +343,7 @@
{"closureHash":"3ce045b2af784cfd7d86a697116758e7ace98d1275a0192c5a815b2f1a5ccd83","declaration":"export function readNonNegativeIntegerParam(params: Record<string, unknown>, key: string, options?: { message?: string; max?: number; }): number | undefined;","entrypoint":"agent-runtime","exportName":"readNonNegativeIntegerParam","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"d32342291ad7c19b5b7066499a65a5b76c8f0e268bbb8852cb0bda67685037bf","declaration":"export function readPositiveIntegerParam(params: Record<string, unknown>, key: string, options?: { message?: string; max?: number; }): number | undefined;","entrypoint":"agent-runtime","exportName":"readPositiveIntegerParam","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"7830262486cedbb4b8e156de295bbcea8596738742c39961e429a3cea6836e0b","declaration":"export function readStringArrayParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string[];\nexport function readStringArrayParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string[] | undefined;","entrypoint":"agent-runtime","exportName":"readStringArrayParam","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"1bb870618265ff3d1feb750d975fce5f5b87fe3bd9c458f056eea28933ac7092","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"agent-runtime","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"9ec34afffcb58733bf81e79b036e4cd9fb963dd0c3b1e29758c469e4ea6a5c96","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"agent-runtime","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"9f4c4659aacb655f2e7b4421b9c9b077baea6f61c097f2c050d0e2ae395ff0c8","declaration":"export function refreshOAuthCredentialForRuntime(params: { credential: OAuthCredential; cfg?: OpenClawConfig; }): Promise<OAuthCredential | null>;","entrypoint":"agent-runtime","exportName":"refreshOAuthCredentialForRuntime","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"cd8f2e82a8e169f1986cfd44c5271c769bc5d6d0f2c0166fc62fcd2c46689397","declaration":"export function replaceRuntimeAuthProfileStoreSnapshots(entries: Array<{ agentDir?: string; store: AuthProfileStore; }>): void;","entrypoint":"agent-runtime","exportName":"replaceRuntimeAuthProfileStoreSnapshots","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
{"closureHash":"e766fc46bf0893f80b12770ed52c6f8bb40ae69d5d60c26998f65bdeed911a11","declaration":"export function resolveAckReaction(cfg: OpenClawConfig, agentId: string, opts?: { channel?: string; accountId?: string; }): string;","entrypoint":"agent-runtime","exportName":"resolveAckReaction","importSpecifier":"openclaw/plugin-sdk/agent-runtime","kind":"function","recordType":"export"}
@@ -618,7 +618,7 @@
{"closureHash":"650210a986670f4fc6928fcb58f076c28653cc5c1a7cd605120c714b589b7b14","declaration":"export function readReactionParams(params: Record<string, unknown>, options: { emojiKey?: string; removeKey?: string; removeErrorMessage: string; }): ReactionParams;","entrypoint":"channel-actions","exportName":"readReactionParams","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
{"closureHash":"7830262486cedbb4b8e156de295bbcea8596738742c39961e429a3cea6836e0b","declaration":"export function readStringArrayParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string[];\nexport function readStringArrayParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string[] | undefined;","entrypoint":"channel-actions","exportName":"readStringArrayParam","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
{"closureHash":"818ea0efd869633f87abb325bb187725079ffb661b088bb4661668485d4355cf","declaration":"export function readStringOrNumberParam(params: Record<string, unknown>, key: string, options?: { required?: boolean; label?: string; }): string | undefined;","entrypoint":"channel-actions","exportName":"readStringOrNumberParam","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
{"closureHash":"1bb870618265ff3d1feb750d975fce5f5b87fe3bd9c458f056eea28933ac7092","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"channel-actions","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
{"closureHash":"9ec34afffcb58733bf81e79b036e4cd9fb963dd0c3b1e29758c469e4ea6a5c96","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"channel-actions","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
{"closureHash":"83fb16e40ff0dc51e79eff07c5fd30c19e72f5de3d4b37f0ea9f70acd88ea900","declaration":"export function resolvePollMaxSelections(optionCount: number, allowMultiselect: boolean | undefined): number;","entrypoint":"channel-actions","exportName":"resolvePollMaxSelections","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
{"closureHash":"4ce2ea713aa7d89aa255b8e88e5adb88905d8e08e731db424052397fbb89bea0","declaration":"export function resolveReactionMessageId(params: { args: Record<string, unknown>; toolContext?: ReactionToolContext; }): string | number | undefined;","entrypoint":"channel-actions","exportName":"resolveReactionMessageId","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
{"closureHash":"bc4e0894807d6511076fc919718736279bb288e2046a45a27849701053d09286","declaration":"export function stringEnum<T extends readonly string[]>(values: T, options?: StringEnumOptions<T>): Type.TUnsafe<T[number]> | Type.TEnum<T[number][]>;","entrypoint":"channel-actions","exportName":"stringEnum","importSpecifier":"openclaw/plugin-sdk/channel-actions","kind":"function","recordType":"export"}
@@ -762,7 +762,7 @@
{"closureHash":"9fc7e45343d7bfbc6ed56d05c9f824e2f9cf6dafc3ca4b25437d1f65c2200727","declaration":"export function clearAccountEntryFields<TAccountEntry extends object>(params: { accounts?: Record<string, TAccountEntry>; accountId: string; fields: string[]; isValueSet?: (value: unknown) => boolean; markClearedOnFieldPresence?: boolean; }): { nextAccounts?: Record<string, TAccountEntry>; changed: boolean; cleared: boolean; };","entrypoint":"channel-core","exportName":"clearAccountEntryFields","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
{"closureHash":"f4e084b64b5376268885a73fe507aa5d72bee17a88ec2d7ae1d19b36ea5f1ccb","declaration":"export function createChannelConfigUiHints(params: { channelLabel: string; dmPolicy?: { channelKey: string; includeLegacyNestedPolicy?: boolean; legacyNestedPolicyOrder?: \"before\" | \"after\"; }; configWrites?: boolean; mentionPatterns?: { targetDescription: string; policyTargetDescription?: string; policyNote?: string; denyNote?: string; }; nativeCommands?: boolean; implicitMentions?: boolean; progress?: { includeCommentary?: boolean; commentaryOrder?: \"before-command\" | \"after-command\"; labels?: \"openclaw\"; titleWording?: boolean; }; streaming?: Partial<Record<StreamingHintKey, StreamingHintValue>>; retry?: boolean; }): HintMap;","entrypoint":"channel-core","exportName":"createChannelConfigUiHints","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
{"closureHash":"ed8c322fac76968f7f059b65eaa881098ed918b22705b27101166b052213a9d9","declaration":"export function createChatChannelPlugin<TResolvedAccount extends { accountId?: string | null; }, Probe = unknown, Audit = unknown>(params: { base: ChatChannelPluginBase<TResolvedAccount, Probe, Audit>; security?: ChannelSecurityAdapter<TResolvedAccount> | ChatChannelSecurityOptions<TResolvedAccount>; pairing?: ChannelPairingAdapter | ChatChannelPairingOptions; threading?: ChannelThreadingAdapter | ChatChannelThreadingOptions<TResolvedAccount>; outbound?: ChannelOutboundAdapter | ChatChannelAttachedOutboundOptions; }): ChannelPlugin<TResolvedAccount, Probe, Audit>;","entrypoint":"channel-core","exportName":"createChatChannelPlugin","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
{"closureHash":"ce9c9e8c168d4f87a32d87b0aba10d5a917d997e2f5e35c4ce6728ba15310dbc","declaration":"export function defineChannelPluginEntry<TPlugin>({ id, name, description, plugin, configSchema, setRuntime, registerCliMetadata, registerFull, registerCapabilities, }: DefineChannelPluginEntryOptions<TPlugin>): DefinedChannelPluginEntry<TPlugin>;","entrypoint":"channel-core","exportName":"defineChannelPluginEntry","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
{"closureHash":"c168c97c02922332295ee07f0bd9e80cff5ed9047f05fb9824a3e6bd46bab5dc","declaration":"export function defineChannelPluginEntry<TPlugin>({ id, name, description, plugin, configSchema, setRuntime, registerCliMetadata, registerFull, registerCapabilities, }: DefineChannelPluginEntryOptions<TPlugin>): DefinedChannelPluginEntry<TPlugin>;","entrypoint":"channel-core","exportName":"defineChannelPluginEntry","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
{"closureHash":"0e0a9f6b22c433bdb1165e7707b1f9a1ddac1a544a8add00b503048cf157921f","declaration":"export function defineSetupPluginEntry<TPlugin>(plugin: TPlugin): { plugin: TPlugin; };","entrypoint":"channel-core","exportName":"defineSetupPluginEntry","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
{"closureHash":"8895f7af11b994dcd383ebc45d8cfb3c3b1e6d88a64a001b04f604a83f77e517","declaration":"export function parseOptionalDelimitedEntries(value?: string): string[] | undefined;","entrypoint":"channel-core","exportName":"parseOptionalDelimitedEntries","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
{"closureHash":"3f97534b10d08eda6a556044eaba623b3744b200a2033877e48d2f2ca924d298","declaration":"export function recoverCurrentThreadSessionId(params: { route: ChannelOutboundSessionRoute; currentSessionKey?: string | null; canRecover?: (context: ThreadAwareOutboundSessionRouteRecoveryContext) => boolean; }): string | undefined;","entrypoint":"channel-core","exportName":"recoverCurrentThreadSessionId","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"function","recordType":"export"}
@@ -774,24 +774,24 @@
{"closureHash":"8126b651a679d5435eaa5d346916792c3600e5f0f75d8492b077dd361854f7dd","declaration":"export type ChannelOutboundSessionRouteParams = { cfg: OpenClawConfig; agentId: string; accountId?: string | null; target: string; currentSessionKey?: string; resolvedTarget?: { to: string; kind: ChannelDirectoryEntryKind | \"channel\"; display?: string; source: \"normalized\" | \"directory\"; }; replyToId?: string | null; threadId?: string | number | null;};","entrypoint":"channel-core","exportName":"ChannelOutboundSessionRouteParams","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"type","recordType":"export"}
{"closureHash":"37b373e93fe7f86fdbce119947c9e49b17e71ce50fe47e118c4d078c5cea20ec","declaration":"export type ChannelPlugin<ResolvedAccount = any, Probe = unknown, Audit = unknown> = ChannelPlugin<ResolvedAccount, Probe, Audit>;","entrypoint":"channel-core","exportName":"ChannelPlugin","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"type","recordType":"export"}
{"closureHash":"8054ffbe71b91afced900ef8a06f5e368ac10c4f99ffc1c6f538a802856f61c6","declaration":"export type OpenClawConfig = OpenClawConfig;","entrypoint":"channel-core","exportName":"OpenClawConfig","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"type","recordType":"export"}
{"closureHash":"9dc2f147a95856891b1a644b8863a3ae3c45db0c56b28ee7c5954562148cde17","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"channel-core","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"type","recordType":"export"}
{"closureHash":"51e15f7b32488d2f964dc3e5e7df9924429b74ee04aa5e7e95763d495ef1682c","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"channel-core","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"type","recordType":"export"}
{"closureHash":"86553d1dbbbe0b04d6a233ab33dee847c2cf5f9809032d41c5bff6bec06b78da","declaration":"export type PluginCommandContext = PluginCommandContext;","entrypoint":"channel-core","exportName":"PluginCommandContext","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"type","recordType":"export"}
{"closureHash":"4180509522e17f8afdf5014bc51f5601952dfa403503e66f8f53e92b0c6ddd45","declaration":"export type PluginRuntime = PluginRuntime;","entrypoint":"channel-core","exportName":"PluginRuntime","importSpecifier":"openclaw/plugin-sdk/channel-core","kind":"type","recordType":"export"}
{"category":"channel","entrypoint":"channel-dm-policy","importSpecifier":"openclaw/plugin-sdk/channel-dm-policy","recordType":"module"}
{"closureHash":"821fe6ccd0d9323322bf70c4d1ca5697071a0e32032f44c1e14157162c2c729d","declaration":"export function createChannelDmPolicy<TConfig extends DmPolicyAccountConfig>(params: CreateChannelDmPolicyParams<TConfig>): ChannelSetupDmPolicy & { promptAllowFrom: NonNullable<ChannelSetupDmPolicy[\"promptAllowFrom\"]>; };","entrypoint":"channel-dm-policy","exportName":"createChannelDmPolicy","importSpecifier":"openclaw/plugin-sdk/channel-dm-policy","kind":"function","recordType":"export"}
{"category":null,"entrypoint":"channel-entry-contract","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","recordType":"module"}
{"closureHash":"1d424a5413b9e7f29440f748416ad227ea8a00c33fcea1a039d749c492673289","declaration":"export function defineBundledChannelEntry<TPlugin = ChannelPlugin>({ id, name, description, importMetaUrl, plugin, outbound, secrets, configSchema, runtime, accountInspect, features, registerCliMetadata, registerFull, registerCapabilities, }: DefineBundledChannelEntryOptions<TPlugin>): BundledChannelEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"defineBundledChannelEntry","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"function","recordType":"export"}
{"closureHash":"068956e11ec24ed43f2c259ddd62503f71ff39b4c51626f9597274cb62786478","declaration":"export function defineBundledChannelSetupEntry<TPlugin = ChannelPlugin>({ importMetaUrl, plugin, secrets, runtime, legacyStateMigrations, legacySessionSurface, registerSetupRuntime, features, }: DefineBundledChannelSetupEntryOptions): BundledChannelSetupEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"defineBundledChannelSetupEntry","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"function","recordType":"export"}
{"closureHash":"d85ca5b27543b7e5106cdc31dc11fc776505c22cd79448d70bd1813b3b302041","declaration":"export function defineBundledChannelEntry<TPlugin = ChannelPlugin>({ id, name, description, importMetaUrl, plugin, outbound, secrets, configSchema, runtime, accountInspect, features, registerCliMetadata, registerFull, registerCapabilities, }: DefineBundledChannelEntryOptions<TPlugin>): BundledChannelEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"defineBundledChannelEntry","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"function","recordType":"export"}
{"closureHash":"f098e62192fea9990f2b283199f8ab363df7702f124fe89b62ce1c6611eca85e","declaration":"export function defineBundledChannelSetupEntry<TPlugin = ChannelPlugin>({ importMetaUrl, plugin, secrets, runtime, legacyStateMigrations, legacySessionSurface, registerSetupRuntime, features, }: DefineBundledChannelSetupEntryOptions): BundledChannelSetupEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"defineBundledChannelSetupEntry","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"function","recordType":"export"}
{"closureHash":"cd150287d7e286e7a0d7d6caeb05d0a1efa63b5f351f75f69ba932510a108afd","declaration":"export function loadBundledEntryExportSync<T>(importMetaUrl: string, reference: BundledEntryModuleRef, options?: BundledEntryModuleLoadOptions): T;","entrypoint":"channel-entry-contract","exportName":"loadBundledEntryExportSync","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"function","recordType":"export"}
{"closureHash":"7781a3d570d08929af5b3b6cffbb9ef4b9c8e8f1bed55234e0015a681868c812","declaration":"export type AnyAgentTool = AnyAgentTool;","entrypoint":"channel-entry-contract","exportName":"AnyAgentTool","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"96a454f6a7accfc5955eca5e31b6554fbaa4b128c74990913b949626037aba74","declaration":"export type BundledChannelEntryContract<TPlugin = ChannelPlugin> = BundledChannelEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"BundledChannelEntryContract","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"f5a2f6cf7dbda0eba0aa53a66a6ffc41a6b9d3d029e77e3d260ad744b7c57a45","declaration":"export type BundledChannelEntryContract<TPlugin = ChannelPlugin> = BundledChannelEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"BundledChannelEntryContract","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"f4b82dfd995bd6f08b232984743389d1c854866cb845a8dbb3605acb28818688","declaration":"export type BundledChannelEntryFeatures = BundledChannelEntryFeatures;","entrypoint":"channel-entry-contract","exportName":"BundledChannelEntryFeatures","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"960693591b9bdc974bf3f0097076d90490078db3dceb35349a4f851736cde4fc","declaration":"export type BundledChannelLegacySessionSurface = BundledChannelLegacySessionSurface;","entrypoint":"channel-entry-contract","exportName":"BundledChannelLegacySessionSurface","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"edf79e6a736e5c4977e3b86ef21e7fdf0c0b2bc7deacd8edbee2ca76cb8cef43","declaration":"export type BundledChannelLegacyStateMigrationDetector = BundledChannelLegacyStateMigrationDetector;","entrypoint":"channel-entry-contract","exportName":"BundledChannelLegacyStateMigrationDetector","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"fd433c4c8cd02dfdf094953efca2f9b8239ea906dd046f40b74e68d6f5bc28b7","declaration":"export type BundledChannelSetupEntryContract<TPlugin = ChannelPlugin> = BundledChannelSetupEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"BundledChannelSetupEntryContract","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"b0aea7eaff08b2da8ea1c7a6c5f52da83bcc3d488a68689656b693fdfcad6099","declaration":"export type BundledChannelSetupEntryContract<TPlugin = ChannelPlugin> = BundledChannelSetupEntryContract<TPlugin>;","entrypoint":"channel-entry-contract","exportName":"BundledChannelSetupEntryContract","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"24679ecdf2ff34157b6345a37b58ec1363ec8cb1969b522599d0d92bb7a113b7","declaration":"export type BundledChannelSetupEntryFeatures = BundledChannelSetupEntryFeatures;","entrypoint":"channel-entry-contract","exportName":"BundledChannelSetupEntryFeatures","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"367219c821915e5be4d1ba3a86754475a5f8a4194512f0401de3be11cc649c60","declaration":"export type BundledEntryModuleLoadOptions = BundledEntryModuleLoadOptions;","entrypoint":"channel-entry-contract","exportName":"BundledEntryModuleLoadOptions","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"a314e825c2d1c948accf7d7b17af39ddfa85c43bccfd545051713bc7ab5b2704","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"channel-entry-contract","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"628ea7da08d0fb757509859ce690d9501dc1ff9caa48b0e22852f2b8d11a9799","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"channel-entry-contract","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"e54f9b270df967e0f857de804dbe989f2c55b637c449c9948c4baae8eee18c7b","declaration":"export type OpenClawPluginCommandDefinition = OpenClawPluginCommandDefinition;","entrypoint":"channel-entry-contract","exportName":"OpenClawPluginCommandDefinition","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"closureHash":"568b5ab033b4970cedd3916d948d31bcdd3c19ea8928c7cd7dc7abf7623b8af8","declaration":"export type PluginCommandContext = PluginCommandContext;","entrypoint":"channel-entry-contract","exportName":"PluginCommandContext","importSpecifier":"openclaw/plugin-sdk/channel-entry-contract","kind":"type","recordType":"export"}
{"category":null,"entrypoint":"channel-feedback","importSpecifier":"openclaw/plugin-sdk/channel-feedback","recordType":"module"}
@@ -1103,7 +1103,7 @@
{"closureHash":"9555a73ba2717bba0bf94888017be4cecef2c51cc3887ed34f8d8ef3c79d6abf","declaration":"export const DEFAULT_INGRESS_RETRY_DEAD_LETTER_MIN_AGE_MS: number;","entrypoint":"channel-message","exportName":"DEFAULT_INGRESS_RETRY_DEAD_LETTER_MIN_AGE_MS","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"const","recordType":"export"}
{"closureHash":"3a2df3ab656149630c004d2d9f71b8ceda99aa81eb6b72b0cc7b3982ed0ce044","declaration":"export const DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS: 8;","entrypoint":"channel-message","exportName":"DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"const","recordType":"export"}
{"closureHash":"38c735a14c65067aa7825390d1c5c8876c651d0603e84980dfaf947f5235747a","declaration":"export const INGRESS_CLAIM_PROCESS_ID: string;","entrypoint":"channel-message","exportName":"INGRESS_CLAIM_PROCESS_ID","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"const","recordType":"export"}
{"closureHash":"4ce46d95ad5a8623c0a3c0621b7d977a25280b4a983d62efdf02bfd140ea8da0","declaration":"export const deliverInboundReplyWithMessageSendContext: (params: DurableInboundReplyDeliveryParams) => Promise<{ status: \"not_applicable\"; reason: \"non_final\";} | { status: \"unsupported\"; reason: \"missing_channel\" | \"missing_target\" | \"missing_outbound_handler\" | \"capability_mismatch\"; capability?: DurableFinalDeliveryRequirement;} | { status: \"handled_visible\"; delivery: ChannelDeliveryResult;} | { status: \"handled_no_send\"; reason: \"no_visible_result\"; delivery: ChannelDeliveryResult;} | { status: \"failed\"; error: unknown; sentBeforeError?: true;}>;","entrypoint":"channel-message","exportName":"deliverInboundReplyWithMessageSendContext","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"const","recordType":"export"}
{"closureHash":"ddd39cfe6429b13a4870786c9366346cf7170f017eda88fad42314bba3301237","declaration":"export const deliverInboundReplyWithMessageSendContext: (params: DurableInboundReplyDeliveryParams) => Promise<{ status: \"not_applicable\"; reason: \"non_final\";} | { status: \"unsupported\"; reason: \"missing_channel\" | \"missing_target\" | \"missing_outbound_handler\" | \"capability_mismatch\"; capability?: DurableFinalDeliveryRequirement;} | { status: \"handled_visible\"; delivery: ChannelDeliveryResult;} | { status: \"handled_no_send\"; reason: \"no_visible_result\"; delivery: ChannelDeliveryResult;} | { status: \"failed\"; error: unknown; sentBeforeError?: true;}>;","entrypoint":"channel-message","exportName":"deliverInboundReplyWithMessageSendContext","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"const","recordType":"export"}
{"closureHash":"2c52eff200a5b9bd2d93ee72209c2626bbe165f59b538591db661b94773023b0","declaration":"export type AgentPlanStep = AgentPlanStep;","entrypoint":"channel-message","exportName":"AgentPlanStep","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"type","recordType":"export"}
{"closureHash":"1e8bcb2c8d8f5327f5b81b8c217f722f090dccba21ba3943324010f4f80a5a50","declaration":"export type AgentPlanStepStatus = AgentPlanStepStatus;","entrypoint":"channel-message","exportName":"AgentPlanStepStatus","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"type","recordType":"export"}
{"closureHash":"b036fc26e5330dfd7da1af8839bb3c23e85283b9e16e252a659dd4bb0c35cd5e","declaration":"export type ChannelDeliveryStreamingConfig = ChannelDeliveryStreamingConfig;","entrypoint":"channel-message","exportName":"ChannelDeliveryStreamingConfig","importSpecifier":"openclaw/plugin-sdk/channel-message","kind":"type","recordType":"export"}
@@ -1232,7 +1232,7 @@
{"closureHash":"9555a73ba2717bba0bf94888017be4cecef2c51cc3887ed34f8d8ef3c79d6abf","declaration":"export const DEFAULT_INGRESS_RETRY_DEAD_LETTER_MIN_AGE_MS: number;","entrypoint":"channel-outbound","exportName":"DEFAULT_INGRESS_RETRY_DEAD_LETTER_MIN_AGE_MS","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"const","recordType":"export"}
{"closureHash":"3a2df3ab656149630c004d2d9f71b8ceda99aa81eb6b72b0cc7b3982ed0ce044","declaration":"export const DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS: 8;","entrypoint":"channel-outbound","exportName":"DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"const","recordType":"export"}
{"closureHash":"38c735a14c65067aa7825390d1c5c8876c651d0603e84980dfaf947f5235747a","declaration":"export const INGRESS_CLAIM_PROCESS_ID: string;","entrypoint":"channel-outbound","exportName":"INGRESS_CLAIM_PROCESS_ID","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"const","recordType":"export"}
{"closureHash":"4ce46d95ad5a8623c0a3c0621b7d977a25280b4a983d62efdf02bfd140ea8da0","declaration":"export const deliverInboundReplyWithMessageSendContext: (params: DurableInboundReplyDeliveryParams) => Promise<{ status: \"not_applicable\"; reason: \"non_final\";} | { status: \"unsupported\"; reason: \"missing_channel\" | \"missing_target\" | \"missing_outbound_handler\" | \"capability_mismatch\"; capability?: DurableFinalDeliveryRequirement;} | { status: \"handled_visible\"; delivery: ChannelDeliveryResult;} | { status: \"handled_no_send\"; reason: \"no_visible_result\"; delivery: ChannelDeliveryResult;} | { status: \"failed\"; error: unknown; sentBeforeError?: true;}>;","entrypoint":"channel-outbound","exportName":"deliverInboundReplyWithMessageSendContext","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"const","recordType":"export"}
{"closureHash":"ddd39cfe6429b13a4870786c9366346cf7170f017eda88fad42314bba3301237","declaration":"export const deliverInboundReplyWithMessageSendContext: (params: DurableInboundReplyDeliveryParams) => Promise<{ status: \"not_applicable\"; reason: \"non_final\";} | { status: \"unsupported\"; reason: \"missing_channel\" | \"missing_target\" | \"missing_outbound_handler\" | \"capability_mismatch\"; capability?: DurableFinalDeliveryRequirement;} | { status: \"handled_visible\"; delivery: ChannelDeliveryResult;} | { status: \"handled_no_send\"; reason: \"no_visible_result\"; delivery: ChannelDeliveryResult;} | { status: \"failed\"; error: unknown; sentBeforeError?: true;}>;","entrypoint":"channel-outbound","exportName":"deliverInboundReplyWithMessageSendContext","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"const","recordType":"export"}
{"closureHash":"2c52eff200a5b9bd2d93ee72209c2626bbe165f59b538591db661b94773023b0","declaration":"export type AgentPlanStep = AgentPlanStep;","entrypoint":"channel-outbound","exportName":"AgentPlanStep","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"type","recordType":"export"}
{"closureHash":"1e8bcb2c8d8f5327f5b81b8c217f722f090dccba21ba3943324010f4f80a5a50","declaration":"export type AgentPlanStepStatus = AgentPlanStepStatus;","entrypoint":"channel-outbound","exportName":"AgentPlanStepStatus","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"type","recordType":"export"}
{"closureHash":"b036fc26e5330dfd7da1af8839bb3c23e85283b9e16e252a659dd4bb0c35cd5e","declaration":"export type ChannelDeliveryStreamingConfig = ChannelDeliveryStreamingConfig;","entrypoint":"channel-outbound","exportName":"ChannelDeliveryStreamingConfig","importSpecifier":"openclaw/plugin-sdk/channel-outbound","kind":"type","recordType":"export"}
@@ -1298,7 +1298,7 @@
{"closureHash":"cd6b0d3f962c8cb40d405e92bb06bb8e9285b386200897f550d21036022262c1","declaration":"export const PAIRING_APPROVED_MESSAGE: \"✅ OpenClaw access approved. Send a message to start chatting.\";","entrypoint":"channel-plugin-common","exportName":"PAIRING_APPROVED_MESSAGE","importSpecifier":"openclaw/plugin-sdk/channel-plugin-common","kind":"const","recordType":"export"}
{"closureHash":"712435252d2fe5135542ca6b5a4375a6edea24e83829338011dc6ae7e9802fbb","declaration":"export type ChannelMessageActionContext = ChannelMessageActionContext;","entrypoint":"channel-plugin-common","exportName":"ChannelMessageActionContext","importSpecifier":"openclaw/plugin-sdk/channel-plugin-common","kind":"type","recordType":"export"}
{"closureHash":"37b373e93fe7f86fdbce119947c9e49b17e71ce50fe47e118c4d078c5cea20ec","declaration":"export type ChannelPlugin<ResolvedAccount = any, Probe = unknown, Audit = unknown> = ChannelPlugin<ResolvedAccount, Probe, Audit>;","entrypoint":"channel-plugin-common","exportName":"ChannelPlugin","importSpecifier":"openclaw/plugin-sdk/channel-plugin-common","kind":"type","recordType":"export"}
{"closureHash":"9dc2f147a95856891b1a644b8863a3ae3c45db0c56b28ee7c5954562148cde17","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"channel-plugin-common","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/channel-plugin-common","kind":"type","recordType":"export"}
{"closureHash":"51e15f7b32488d2f964dc3e5e7df9924429b74ee04aa5e7e95763d495ef1682c","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"channel-plugin-common","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/channel-plugin-common","kind":"type","recordType":"export"}
{"closureHash":"4180509522e17f8afdf5014bc51f5601952dfa403503e66f8f53e92b0c6ddd45","declaration":"export type PluginRuntime = PluginRuntime;","entrypoint":"channel-plugin-common","exportName":"PluginRuntime","importSpecifier":"openclaw/plugin-sdk/channel-plugin-common","kind":"type","recordType":"export"}
{"category":null,"entrypoint":"channel-policy","importSpecifier":"openclaw/plugin-sdk/channel-policy","recordType":"module"}
{"closureHash":"017ab29d16d0f3d02d60f3513e65a373868d26496bc93d020d8fc8c17fd875f4","declaration":"export function buildAccountScopedDmSecurityPolicy(params: { cfg: OpenClawConfig; channelKey: string; accountId?: string | null; fallbackAccountId?: string | null; policy?: string | null; allowFrom?: Array<string | number> | null; defaultPolicy?: string; allowFromPathSuffix?: string; policyPathSuffix?: string; approveChannelId?: string; approveHint?: string; normalizeEntry?: (raw: string) => string; inheritSharedDefaultsFromDefaultAccount?: boolean; }): ChannelSecurityDmPolicy;","entrypoint":"channel-policy","exportName":"buildAccountScopedDmSecurityPolicy","importSpecifier":"openclaw/plugin-sdk/channel-policy","kind":"function","recordType":"export"}
@@ -1897,8 +1897,8 @@
{"closureHash":"ed8c322fac76968f7f059b65eaa881098ed918b22705b27101166b052213a9d9","declaration":"export function createChatChannelPlugin<TResolvedAccount extends { accountId?: string | null; }, Probe = unknown, Audit = unknown>(params: { base: ChatChannelPluginBase<TResolvedAccount, Probe, Audit>; security?: ChannelSecurityAdapter<TResolvedAccount> | ChatChannelSecurityOptions<TResolvedAccount>; pairing?: ChannelPairingAdapter | ChatChannelPairingOptions; threading?: ChannelThreadingAdapter | ChatChannelThreadingOptions<TResolvedAccount>; outbound?: ChannelOutboundAdapter | ChatChannelAttachedOutboundOptions; }): ChannelPlugin<TResolvedAccount, Probe, Audit>;","entrypoint":"core","exportName":"createChatChannelPlugin","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"785b0f750c5bd20f9f3ca081886a5af79ee0e4d2c38f78f769bf994b234f5076","declaration":"export function createDedupeCache(options: DedupeCacheOptions): DedupeCache;","entrypoint":"core","exportName":"createDedupeCache","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"e2df8d235401aebf58eb71652fbeaedb42ca00aaa5042a76909ff2c48ba6fd54","declaration":"export function createSubsystemLogger(subsystem: string): SubsystemLogger;","entrypoint":"core","exportName":"createSubsystemLogger","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"ce9c9e8c168d4f87a32d87b0aba10d5a917d997e2f5e35c4ce6728ba15310dbc","declaration":"export function defineChannelPluginEntry<TPlugin>({ id, name, description, plugin, configSchema, setRuntime, registerCliMetadata, registerFull, registerCapabilities, }: DefineChannelPluginEntryOptions<TPlugin>): DefinedChannelPluginEntry<TPlugin>;","entrypoint":"core","exportName":"defineChannelPluginEntry","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"e9633b4ca148dc6289c61a1d85b0e34cb244d926badbf4a591302267c691e62a","declaration":"export function definePluginEntry({ id, name, description, kind, configSchema, reload, nodeHostCommands, securityAuditCollectors, register, }: DefinePluginEntryOptions): DefinedPluginEntry;","entrypoint":"core","exportName":"definePluginEntry","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"c168c97c02922332295ee07f0bd9e80cff5ed9047f05fb9824a3e6bd46bab5dc","declaration":"export function defineChannelPluginEntry<TPlugin>({ id, name, description, plugin, configSchema, setRuntime, registerCliMetadata, registerFull, registerCapabilities, }: DefineChannelPluginEntryOptions<TPlugin>): DefinedChannelPluginEntry<TPlugin>;","entrypoint":"core","exportName":"defineChannelPluginEntry","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"c5135d933f690abcdf9cb6bd02dc8c3913d6b0db458fbba9ba7fb7e891a1d30b","declaration":"export function definePluginEntry({ id, name, description, kind, configSchema, reload, nodeHostCommands, securityAuditCollectors, register, }: DefinePluginEntryOptions): DefinedPluginEntry;","entrypoint":"core","exportName":"definePluginEntry","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"0e0a9f6b22c433bdb1165e7707b1f9a1ddac1a544a8add00b503048cf157921f","declaration":"export function defineSetupPluginEntry<TPlugin>(plugin: TPlugin): { plugin: TPlugin; };","entrypoint":"core","exportName":"defineSetupPluginEntry","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"3c5ce0c3733cbb038aeb914af1df5d701f362f0521921b8abd0c9214db9cc4b8","declaration":"export function delegateCompactionToRuntime(params: Parameters<ContextEngine[\"compact\"]>[0]): Promise<CompactResult>;","entrypoint":"core","exportName":"delegateCompactionToRuntime","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"2c282e0e308f9442bca7cdeb8e89a097531b1d54a692c9d86e5f39a8db1c2537","declaration":"export function deleteAccountFromConfigSection(params: { cfg: OpenClawConfig; sectionKey: string; accountId: string; clearBaseFields?: string[]; }): OpenClawConfig;","entrypoint":"core","exportName":"deleteAccountFromConfigSection","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
@@ -1927,7 +1927,7 @@
{"closureHash":"650210a986670f4fc6928fcb58f076c28653cc5c1a7cd605120c714b589b7b14","declaration":"export function readReactionParams(params: Record<string, unknown>, options: { emojiKey?: string; removeKey?: string; removeErrorMessage: string; }): ReactionParams;","entrypoint":"core","exportName":"readReactionParams","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":null,"declaration":"export function readSecretFileSync(filePath: string, label: string, options?: SecretFileReadOptions): string;","entrypoint":"core","exportName":"readSecretFileSync","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"7830262486cedbb4b8e156de295bbcea8596738742c39961e429a3cea6836e0b","declaration":"export function readStringArrayParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string[];\nexport function readStringArrayParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string[] | undefined;","entrypoint":"core","exportName":"readStringArrayParam","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"1bb870618265ff3d1feb750d975fce5f5b87fe3bd9c458f056eea28933ac7092","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"core","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"9ec34afffcb58733bf81e79b036e4cd9fb963dd0c3b1e29758c469e4ea6a5c96","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"core","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"3f97534b10d08eda6a556044eaba623b3744b200a2033877e48d2f2ca924d298","declaration":"export function recoverCurrentThreadSessionId(params: { route: ChannelOutboundSessionRoute; currentSessionKey?: string | null; canRecover?: (context: ThreadAwareOutboundSessionRouteRecoveryContext) => boolean; }): string | undefined;","entrypoint":"core","exportName":"recoverCurrentThreadSessionId","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"a8c46f142302860a8a054178f828da385f8f1f5449a4e320c3fbb49780ac42ed","declaration":"export function resolveClientIp(params: { remoteAddr?: string; forwardedFor?: string; realIp?: string; trustedProxies?: string[]; allowRealIpFallback?: boolean; }): string | undefined;","entrypoint":"core","exportName":"resolveClientIp","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"79d92f4fb2ad64711f9bab6b2ccede5fa213833f84738a610db53a34c41a1245","declaration":"export function resolveConfiguredAcpBindingRecord(params: { cfg: OpenClawConfig; channel: string; accountId: string; conversationId: string; parentConversationId?: string; }): ResolvedConfiguredAcpBinding | null;","entrypoint":"core","exportName":"resolveConfiguredAcpBindingRecord","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
@@ -1945,7 +1945,7 @@
{"closureHash":"2e6ce1f4c1692270a00dc0cf08e2752a26739c3143f8091cb270063c6034605d","declaration":"export function tryReadSecretFileSync(filePath: string | undefined, label: string, options: CredentialFileReadOptions): string | undefined;\nexport function tryReadSecretFileSync(filePath: string | undefined, label: string, options?: FsSafeSecretFileReadOptions): string | undefined;\nexport function tryReadSecretFileSync(filePath: string, label: string, options: FsSafeSecretFileReadOptions | undefined, diagnostic: { configPath: string; }): ConfiguredCredentialResult<string>;\nexport function tryReadSecretFileSync(filePath: string | undefined, label: string, options: FsSafeSecretFileReadOptions | undefined, diagnostic: { configPath: string; }): CredentialResult<string>;","entrypoint":"core","exportName":"tryReadSecretFileSync","importSpecifier":"openclaw/plugin-sdk/core","kind":"function","recordType":"export"}
{"closureHash":"b40933a11984425d14a7a479bda0d2cd14cbfa9371164774f39bebbf12861df7","declaration":"export const DEFAULT_ACCOUNT_ID: \"default\";","entrypoint":"core","exportName":"DEFAULT_ACCOUNT_ID","importSpecifier":"openclaw/plugin-sdk/core","kind":"const","recordType":"export"}
{"closureHash":null,"declaration":"export const DEFAULT_SECRET_FILE_MAX_BYTES: number;","entrypoint":"core","exportName":"DEFAULT_SECRET_FILE_MAX_BYTES","importSpecifier":"openclaw/plugin-sdk/core","kind":"const","recordType":"export"}
{"closureHash":"89d1232faa739ea7bb8b305d5e92ff1057759b833cd9994ef0923634234741e7","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"core","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"49e181db775c3ee735cef6900062306c81f598b8a5b696379e55a21f3b011741","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"core","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"d2ff4de9ee3fd111c2cc64a3ee7e557d9f161af1b6b437ee7886bcb16e426317","declaration":"export type AgentPromptGuidance = AgentPromptGuidance;","entrypoint":"core","exportName":"AgentPromptGuidance","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"2841127a90e04467adfea8126cbf03655f44ddb089ad9e0d48833c2beea39cbd","declaration":"export type AgentPromptGuidanceEntry = AgentPromptGuidanceEntry;","entrypoint":"core","exportName":"AgentPromptGuidanceEntry","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"aa0412acefe62caff12e5271ead0545504874e824380dc21cfc0566388a05f33","declaration":"export type AgentPromptSurfaceKind = \"openclaw_main\" | \"pi_main\" | \"codex_app_server\" | \"cli_backend\" | \"acp_backend\" | \"subagent\";","entrypoint":"core","exportName":"AgentPromptSurfaceKind","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
@@ -1977,10 +1977,10 @@
{"closureHash":"54ea426dde51859b572b4c1079d2b70b412096f73da2b8c265f2749d9f01cbb5","declaration":"export type NormalizedLocation = NormalizedLocation;","entrypoint":"core","exportName":"NormalizedLocation","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"8054ffbe71b91afced900ef8a06f5e368ac10c4f99ffc1c6f538a802856f61c6","declaration":"export type OpenClawConfig = OpenClawConfig;","entrypoint":"core","exportName":"OpenClawConfig","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"5189698d102b8b064eefe1442b008312973c3994fd6b203d2205725d7ee9d118","declaration":"export type OpenClawPluginActiveModelContext = OpenClawPluginActiveModelContext;","entrypoint":"core","exportName":"OpenClawPluginActiveModelContext","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"9dc2f147a95856891b1a644b8863a3ae3c45db0c56b28ee7c5954562148cde17","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"core","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"51e15f7b32488d2f964dc3e5e7df9924429b74ee04aa5e7e95763d495ef1682c","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"core","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"c968e96cdb5c97e92d26b7b15fb5255531b45a12e7c5c0a2e7e456d31cc6e358","declaration":"export type OpenClawPluginCommandDefinition = OpenClawPluginCommandDefinition;","entrypoint":"core","exportName":"OpenClawPluginCommandDefinition","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"365beb5cee974639c2f35fc7a39088721ca8e9c618442830298b98033e9c768c","declaration":"export type OpenClawPluginConfigSchema = OpenClawPluginConfigSchema;","entrypoint":"core","exportName":"OpenClawPluginConfigSchema","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"9303ba80fdfee2f9fae041231bc7482ae3dffcc8d451f1862aac7fc1c2a8b8f2","declaration":"export type OpenClawPluginDefinition = OpenClawPluginDefinition;","entrypoint":"core","exportName":"OpenClawPluginDefinition","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"1b2636e3bd55c40a8911396cf70dbca69bc43e50dfc13003266def91c69f50da","declaration":"export type OpenClawPluginDefinition = OpenClawPluginDefinition;","entrypoint":"core","exportName":"OpenClawPluginDefinition","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"a7ed83f0924f818b23cecb5a1f3591ff28b9499ccac9667a2b8505c2bc608ea9","declaration":"export type OpenClawPluginGatewayEventScope = OpenClawPluginGatewayEventScope;","entrypoint":"core","exportName":"OpenClawPluginGatewayEventScope","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"f81f224d9b837e6353b7a546c5a76b124bcf568fd1f1fd0c6881fda30c53120a","declaration":"export type OpenClawPluginGatewayEvents = OpenClawPluginGatewayEvents;","entrypoint":"core","exportName":"OpenClawPluginGatewayEvents","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
{"closureHash":"ddc2738dd0ece94ddde9a7c655f92c15ec6416645ecf932d4aa404c7b7761159","declaration":"export type OpenClawPluginService = OpenClawPluginService;","entrypoint":"core","exportName":"OpenClawPluginService","importSpecifier":"openclaw/plugin-sdk/core","kind":"type","recordType":"export"}
@@ -2215,7 +2215,7 @@
{"closureHash":"0db968dad99d84ecef5202167daadd092e3b4f456270283d3fd61585ac2bbd5a","declaration":"export type DiscordComponentSendResult = DiscordComponentSendResult;","entrypoint":"discord","exportName":"DiscordComponentSendResult","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
{"closureHash":"084b46d7dd510eb182a4705559251e824220b57dbfa6dc54392507b72ba1815e","declaration":"export type DiscordOutboundTargetResolution = DiscordOutboundTargetResolution;","entrypoint":"discord","exportName":"DiscordOutboundTargetResolution","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
{"closureHash":"8054ffbe71b91afced900ef8a06f5e368ac10c4f99ffc1c6f538a802856f61c6","declaration":"export type OpenClawConfig = OpenClawConfig;","entrypoint":"discord","exportName":"OpenClawConfig","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
{"closureHash":"9dc2f147a95856891b1a644b8863a3ae3c45db0c56b28ee7c5954562148cde17","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"discord","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
{"closureHash":"51e15f7b32488d2f964dc3e5e7df9924429b74ee04aa5e7e95763d495ef1682c","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"discord","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
{"closureHash":"4180509522e17f8afdf5014bc51f5601952dfa403503e66f8f53e92b0c6ddd45","declaration":"export type PluginRuntime = PluginRuntime;","entrypoint":"discord","exportName":"PluginRuntime","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
{"closureHash":"6b9967e919c1cd420c8356b4f9d40dbc81932b4b15a733eecdcfb2ad84f8e5d8","declaration":"export type ResolvedDiscordAccount = ResolvedDiscordAccount;","entrypoint":"discord","exportName":"ResolvedDiscordAccount","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
{"closureHash":"6bed5ca896b7034117e4757e2c6b4111dd5293dbad9416e3828dd6afa4e858ce","declaration":"export type ThreadBindingRecord = ThreadBindingRecord;","entrypoint":"discord","exportName":"ThreadBindingRecord","importSpecifier":"openclaw/plugin-sdk/discord","kind":"type","recordType":"export"}
@@ -2360,7 +2360,7 @@
{"closureHash":"98e0cc16352b7dfcceb4957f8cd2acfe3c2b3acb223c42a5cfb885e088fcb04c","declaration":"export function resolveInboundReplyDispatchCounts(result: ChannelTurnDispatchResultLike): Record<ReplyDispatchKind, number>;","entrypoint":"inbound-reply-dispatch","exportName":"resolveInboundReplyDispatchCounts","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"function","recordType":"export"}
{"closureHash":"4cd63266d379acc2cdf9aba02f50b8ceb55500cf820787c370fc98d173fb1950","declaration":"export function runChannelInboundEvent<TRaw, TDispatchResult = DispatchFromConfigResult>(params: RunChannelTurnParams<TRaw, TDispatchResult, ChannelProviderOwnedMessageSendingDeliveryAdapter>): Promise<ChannelTurnResult<TDispatchResult>>;\nexport function runChannelInboundEvent<TRaw, TDispatchResult = DispatchFromConfigResult>(params: ChannelInboundEventRunnerParams<TRaw, TDispatchResult>): Promise<ChannelTurnResult<TDispatchResult>>;","entrypoint":"inbound-reply-dispatch","exportName":"runChannelInboundEvent","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"function","recordType":"export"}
{"closureHash":"2c68496a174872b31aaf1ac8fad2789deb79d490c5ffbcb157325f1c95d1b51f","declaration":"export function runPreparedInboundReply<TDispatchResult>(params: PreparedChannelTurn<TDispatchResult>): Promise<ChannelTurnResult<TDispatchResult>>;","entrypoint":"inbound-reply-dispatch","exportName":"runPreparedInboundReply","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"function","recordType":"export"}
{"closureHash":"4ce46d95ad5a8623c0a3c0621b7d977a25280b4a983d62efdf02bfd140ea8da0","declaration":"export const deliverInboundReplyWithMessageSendContext: (params: DurableInboundReplyDeliveryParams) => Promise<{ status: \"not_applicable\"; reason: \"non_final\";} | { status: \"unsupported\"; reason: \"missing_channel\" | \"missing_target\" | \"missing_outbound_handler\" | \"capability_mismatch\"; capability?: DurableFinalDeliveryRequirement;} | { status: \"handled_visible\"; delivery: ChannelDeliveryResult;} | { status: \"handled_no_send\"; reason: \"no_visible_result\"; delivery: ChannelDeliveryResult;} | { status: \"failed\"; error: unknown; sentBeforeError?: true;}>;","entrypoint":"inbound-reply-dispatch","exportName":"deliverInboundReplyWithMessageSendContext","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"const","recordType":"export"}
{"closureHash":"ddd39cfe6429b13a4870786c9366346cf7170f017eda88fad42314bba3301237","declaration":"export const deliverInboundReplyWithMessageSendContext: (params: DurableInboundReplyDeliveryParams) => Promise<{ status: \"not_applicable\"; reason: \"non_final\";} | { status: \"unsupported\"; reason: \"missing_channel\" | \"missing_target\" | \"missing_outbound_handler\" | \"capability_mismatch\"; capability?: DurableFinalDeliveryRequirement;} | { status: \"handled_visible\"; delivery: ChannelDeliveryResult;} | { status: \"handled_no_send\"; reason: \"no_visible_result\"; delivery: ChannelDeliveryResult;} | { status: \"failed\"; error: unknown; sentBeforeError?: true;}>;","entrypoint":"inbound-reply-dispatch","exportName":"deliverInboundReplyWithMessageSendContext","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"const","recordType":"export"}
{"closureHash":"ab30d0470348e3af7c18a273afc0d169d91f204fba557c75c4694e8a0ea6c936","declaration":"export type AssembledInboundReply = AssembledChannelTurn;","entrypoint":"inbound-reply-dispatch","exportName":"AssembledInboundReply","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"type","recordType":"export"}
{"closureHash":"3de0d6d1bb8f9a83bd1c6e57aa8618e3fea71054236cd530c555e348bd0b7702","declaration":"export type ChannelBotLoopProtectionFacts = ChannelBotLoopProtectionFacts;","entrypoint":"inbound-reply-dispatch","exportName":"ChannelBotLoopProtectionFacts","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"type","recordType":"export"}
{"closureHash":"f0da845bbdf49b30f6718a4b7ff012a0536deb98f65418583555dc90825797ca","declaration":"export type ChannelInboundDroppedHistoryOptions = ChannelTurnDroppedHistoryOptions;","entrypoint":"inbound-reply-dispatch","exportName":"ChannelInboundDroppedHistoryOptions","importSpecifier":"openclaw/plugin-sdk/inbound-reply-dispatch","kind":"type","recordType":"export"}
@@ -3195,19 +3195,19 @@
{"closureHash":"3362ea0b650933db6db467ef8ae1c82e682e946761647c8dfae401eec1237bd6","declaration":"export function callMeetingBrowserProxyOnNode(params: { runtime: PluginRuntime; adapter: NodeAdapter; nodeId: string; } & MeetingBrowserRequestParams): Promise<unknown>;","entrypoint":"meeting-runtime","exportName":"callMeetingBrowserProxyOnNode","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"c5fcd1d157edcb4773235adfaf8051e3ec7ca428cb7916b6d55f2511affab56c","declaration":"export function convertMeetingBridgeAudioForStt(audio: Buffer, audioFormat: MeetingRealtimeAudioFormat): Buffer;","entrypoint":"meeting-runtime","exportName":"convertMeetingBridgeAudioForStt","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"aa9063c27c5ff714d3653571c4a2a71e9d2eea5609b161f03e4738e15411358b","declaration":"export function convertMeetingTtsAudioForBridge(audio: Buffer, sampleRate: number, audioFormat: MeetingRealtimeAudioFormat, outputFormat?: string, platformName?: string): Buffer;","entrypoint":"meeting-runtime","exportName":"convertMeetingTtsAudioForBridge","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"21c4eeafbcb8b35075e631d13184777bb1f9e1f5cb0d2316ed62d74de48e898a","declaration":"export function createLocalMeetingRealtimeAudioTransport(params: { inputCommand: string[]; outputCommand: string[]; bargeInInputCommand?: string[]; bargeInRmsThreshold: number; bargeInPeakThreshold: number; bargeInCooldownMs: number; logger: RuntimeLogger; logScope: string; audioFormat?: MeetingRealtimeAudioFormat; spawn?: MeetingRealtimeAudioSpawn; }): MeetingRealtimeAudioTransport;","entrypoint":"meeting-runtime","exportName":"createLocalMeetingRealtimeAudioTransport","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"df8c4f7f73fb734fba28be92cce6b67f6ce4e57a6f90729835c2f40762ba9266","declaration":"export function createLocalMeetingRealtimeAudioTransport(params: { inputCommand: string[]; outputCommand: string[]; bargeInInputCommand?: string[]; bargeInRmsThreshold: number; bargeInPeakThreshold: number; bargeInCooldownMs: number; logger: RuntimeLogger; logScope: string; audioFormat?: MeetingRealtimeAudioFormat; spawn?: MeetingRealtimeAudioSpawn; }): MeetingRealtimeAudioTransport;","entrypoint":"meeting-runtime","exportName":"createLocalMeetingRealtimeAudioTransport","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"0f81bc377d2158b9c8adb6878e454f34c2e57d53bdef9aa34d567d279800c240","declaration":"export function createMeetingBrowserNodeCaller(params: { runtime: PluginRuntime; adapter: NodeAdapter; nodeId: string; }): MeetingBrowserRequestCaller;","entrypoint":"meeting-runtime","exportName":"createMeetingBrowserNodeCaller","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"f244ca8c47f556c9f388953cf9a7581c7d4d413af93e0dfa1462779e6a687a7c","declaration":"export function createMeetingBrowserNodeInvokePolicy(options: MeetingBrowserNodePolicyOptions): OpenClawPluginNodeInvokePolicy;","entrypoint":"meeting-runtime","exportName":"createMeetingBrowserNodeInvokePolicy","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"1aa4e3ff39a2cbe162421c62b1fa4a362973381d4d9ff15c671249b1ebd566bc","declaration":"export function createMeetingNodeHost(options: MeetingNodeHostOptions): { handleCommand(paramsJSON?: string | null): Promise<string>; };","entrypoint":"meeting-runtime","exportName":"createMeetingNodeHost","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"c1ae05a3adf32d70779697f7f268b446587dacdd61492fb577b77d964ec3ea49","declaration":"export function createMeetingRealtimeEngineBindings(params: { platform: MeetingPlatformRuntimeMetadata; config: { realtime: { agentId?: string; toolPolicy: RealtimeVoiceAgentConsultToolPolicy; }; }; fullConfig: OpenClawConfig; runtime: PluginRuntime; logger: RuntimeLogger; }): { platform: MeetingRuntimePlatform; consultAgent: (consult: MeetingAgentConsultParams) => Promise<{ text: string; }>; tools: RealtimeVoiceTool[]; handleToolCall: (call: MeetingRealtimeToolCallParams) => Promise<void>; };","entrypoint":"meeting-runtime","exportName":"createMeetingRealtimeEngineBindings","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"63dd9c3c8c280b7fcefc2b80ff5eea3a7c643be30e8e60097938a65078c3ac38","declaration":"export function createMeetingRealtimeEngineBindings(params: { platform: MeetingPlatformRuntimeMetadata; config: { realtime: { agentId?: string; toolPolicy: RealtimeVoiceAgentConsultToolPolicy; }; }; fullConfig: OpenClawConfig; runtime: PluginRuntime; logger: RuntimeLogger; }): { platform: MeetingRuntimePlatform; consultAgent: (consult: MeetingAgentConsultParams) => Promise<{ text: string; }>; tools: RealtimeVoiceTool[]; handleToolCall: (call: MeetingRealtimeToolCallParams) => Promise<void>; };","entrypoint":"meeting-runtime","exportName":"createMeetingRealtimeEngineBindings","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"9124db05923060c467edb149bd8abdc8be1d00d00f867cf84600972923a58489","declaration":"export function createMeetingSession<TTransport extends string, TMode extends string, TToolPolicy extends string>(params: { platform: MeetingPlatformRuntimeMetadata; config: { realtime: { provider?: string; voiceProvider?: string; transcriptionProvider?: string; model?: string; toolPolicy: TToolPolicy; }; }; resolved: MeetingResolvedJoin<TTransport, TMode>; createdAt: string; }): MeetingSessionRecord<TTransport, TMode, { enabled: boolean; strategy: string; provider: string | undefined; model: string | undefined; transcriptionProvider: string | undefined; toolPolicy: TToolPolicy; }>;","entrypoint":"meeting-runtime","exportName":"createMeetingSession","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"fb276e07e395ab19177b3d7967fd0a8fcda79130883f15092a4a306b826481b9","declaration":"export function createMeetingSetupStatus(checks: MeetingSetupCheck[]): MeetingSetupStatus;","entrypoint":"meeting-runtime","exportName":"createMeetingSetupStatus","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"0457ac9dc4b0b2d11cdbe2070d75ae2e5c2fe5cee69017e92f849849cd06b0f3","declaration":"export function createMeetingVoiceCallGateway(params: { config: MeetingVoiceCallConfig; runtime: PluginRuntime; surface: MeetingVoiceCallSurface; connectClient: (params: { config: MeetingVoiceCallConfig; surface: MeetingVoiceCallSurface; }) => Promise<MeetingVoiceCallGatewayClient>; }): MeetingVoiceCallGateway;","entrypoint":"meeting-runtime","exportName":"createMeetingVoiceCallGateway","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"d15a559cde246e88f545db50addd2146b581642726e9a8a2ddecaa21cc332c71","declaration":"export function createNodeMeetingRealtimeAudioTransport(params: { runtime: PluginRuntime; nodeId: string; bridgeId: string; logger: RuntimeLogger; commandName: string; logScope: string; logPrefix: string; audioFormat?: MeetingRealtimeAudioFormat; }): MeetingRealtimeAudioTransport;","entrypoint":"meeting-runtime","exportName":"createNodeMeetingRealtimeAudioTransport","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"11258379bb5ef57583268d89e301f1815f74d1783024e6244ebe8d2515dac19a","declaration":"export function createNodeMeetingRealtimeAudioTransport(params: { runtime: PluginRuntime; nodeId: string; bridgeId: string; logger: RuntimeLogger; commandName: string; logScope: string; logPrefix: string; audioFormat?: MeetingRealtimeAudioFormat; }): MeetingRealtimeAudioTransport;","entrypoint":"meeting-runtime","exportName":"createNodeMeetingRealtimeAudioTransport","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"c0987b15a391a92d53d3e4e12b61eb122f9547fcf4f45478cdd3c5a8973a3e52","declaration":"export function endMeetingVoiceCallGatewayCall(params: { gateway: MeetingVoiceCallGateway; callId: string; }): Promise<void>;","entrypoint":"meeting-runtime","exportName":"endMeetingVoiceCallGatewayCall","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"b3ebc10fe7ab372e1317eaa8f78621cf277bba1e33fda57acf2254f6759d1e9d","declaration":"export function getMeetingVoiceCallGatewayCall(params: { gateway: MeetingVoiceCallGateway; callId: string; }): Promise<MeetingVoiceCallStatusResult>;","entrypoint":"meeting-runtime","exportName":"getMeetingVoiceCallGatewayCall","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"aac088df8e80d9ce89c45feccdb04ace3ae4417b3fcdd0f058410ddf25c96b46","declaration":"export function isMeetingVoiceCallMissingError(error: unknown): boolean;","entrypoint":"meeting-runtime","exportName":"isMeetingVoiceCallMissingError","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"5b913b7a7e1d23c37050fd007a9250109b9b787a0aaffd88008e03e5b7f4aae6","declaration":"export function joinMeetingViaVoiceCallGateway(params: { config: MeetingVoiceCallConfig; gateway: MeetingVoiceCallGateway; surface: MeetingVoiceCallSurface; dialInNumber: string; dtmfSequence?: string; logger?: RuntimeLogger; message?: string; requesterSessionKey?: string; agentId?: string; sessionKey?: string; }): Promise<MeetingVoiceCallJoinResult>;","entrypoint":"meeting-runtime","exportName":"joinMeetingViaVoiceCallGateway","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"bb84ecb8a89b6bddd40741261f2f2e82a0023f4db72c8dfedf4aecf7f91f3e77","declaration":"export function joinMeetingViaVoiceCallGateway(params: { config: MeetingVoiceCallConfig; gateway: MeetingVoiceCallGateway; surface: MeetingVoiceCallSurface; dialInNumber: string; dtmfSequence?: string; logger?: RuntimeLogger; message?: string; requesterSessionKey?: string; agentId?: string; sessionKey?: string; }): Promise<MeetingVoiceCallJoinResult>;","entrypoint":"meeting-runtime","exportName":"joinMeetingViaVoiceCallGateway","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"bac9621cd025754fbcd4c21409b06eb0503405db81f35cac993aaf0b881ab3e1","declaration":"export function leaveMeetingWithBrowser<Session, Mode extends string, Health extends MeetingBrowserHealth, Transcript extends MeetingTranscriptSnapshot>(params: { adapter: BrowserAdapter<Session, Mode, Health, Transcript>; callBrowser: MeetingBrowserRequestCaller; launch: boolean; meetingSessionId?: string; meetingUrl: string; tab: MeetingBrowserTab; timeoutMs: number; }): Promise<{ left: boolean; note: string; }>;","entrypoint":"meeting-runtime","exportName":"leaveMeetingWithBrowser","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"c7b1aeac134b2070d053adf33026d876998b852ccd65cd2c9667119b1a1abee2","declaration":"export function openMeetingWithBrowser<Session extends MeetingBrowserJoinSession<Mode>, Mode extends string, Health extends MeetingBrowserHealth & { browserTitle?: string; browserUrl?: string; notes?: string[]; }, Transcript extends MeetingTranscriptSnapshot>(params: { adapter: BrowserAdapter<Session, Mode, Health, Transcript>; callBrowser: MeetingBrowserRequestCaller; config: MeetingBrowserControllerConfig; session: Session; }): Promise<{ launched: boolean; browser?: Health; tab?: MeetingBrowserTab; }>;","entrypoint":"meeting-runtime","exportName":"openMeetingWithBrowser","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"34858979bd248799c2215d9c7bdd5d4a6b27660c9173bfca2e50dd4373ac27db","declaration":"export function readMeetingBrowserTab(result: unknown): MeetingBrowserCandidateTab | undefined;","entrypoint":"meeting-runtime","exportName":"readMeetingBrowserTab","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
@@ -3218,8 +3218,8 @@
{"closureHash":"a1c367ec2dd927543d490a1393128d475e10c7bd131ffd789c80d88a2d2d0cb2","declaration":"export function resolveMeetingBrowserNodeInfo(params: { runtime: PluginRuntime; adapter: NodeAdapter; requestedNode?: string; }): Promise<MeetingBrowserNodeInfo>;","entrypoint":"meeting-runtime","exportName":"resolveMeetingBrowserNodeInfo","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"f21196c9ea8ab90248ffdcdef3e942f1247ee2b9064ddb9757fffe352362c779","declaration":"export function resolveMeetingRealtimeAudioFormat(audioFormat: MeetingRealtimeAudioFormat): RealtimeVoiceAudioFormat;","entrypoint":"meeting-runtime","exportName":"resolveMeetingRealtimeAudioFormat","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"521dc5c262524a709cdd27cdc88e95004073da8223537bcbc73d5d423172dc2b","declaration":"export function speakMeetingViaVoiceCallGateway(params: { gateway: MeetingVoiceCallGateway; callId: string; message: string; }): Promise<void>;","entrypoint":"meeting-runtime","exportName":"speakMeetingViaVoiceCallGateway","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"89fa36fac0b12eafa92caa88fda8625141750a29f0351fd4f2b3b14c458c6e2b","declaration":"export function startMeetingAgentRealtimeEngine(params: { config: MeetingRealtimeEngineConfig; fullConfig: OpenClawConfig; runtime: PluginRuntime; platform: MeetingRuntimePlatform; meetingSessionId: string; requesterSessionKey?: string; logPrefix?: \"node\"; transport: MeetingRealtimeAudioTransport; logger: RuntimeLogger; providers?: RealtimeTranscriptionProviderPlugin[]; consultAgent: (params: MeetingAgentConsultParams) => Promise<{ text: string; }>; }): Promise<MeetingRealtimeAudioEngineHandle>;","entrypoint":"meeting-runtime","exportName":"startMeetingAgentRealtimeEngine","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"cc9193c9bd57a8a86c439adef3ae5875ddec06f5f272b6b7c7c585560eebad09","declaration":"export function startMeetingRealtimeEngine(params: { config: MeetingRealtimeEngineConfig; fullConfig: OpenClawConfig; runtime: PluginRuntime; platform: MeetingRuntimePlatform; meetingSessionId: string; requesterSessionKey?: string; logPrefix?: \"node\"; talkSessionId?: string; talkContext?: { nodeId: string; bridgeId: string; }; transport: MeetingRealtimeAudioTransport; logger: RuntimeLogger; providers?: RealtimeVoiceProviderPlugin[]; consultAgent: (params: MeetingAgentConsultParams) => Promise<{ text: string; }>; tools: RealtimeVoiceTool[]; handleToolCall: (params: MeetingRealtimeToolCallParams) => Promise<void>; }): Promise<MeetingRealtimeAudioEngineHandle>;","entrypoint":"meeting-runtime","exportName":"startMeetingRealtimeEngine","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"d0528236feb8086dc39e52299ec4eb87c8577f665385e1507c943e4437c19628","declaration":"export function startMeetingAgentRealtimeEngine(params: { config: MeetingRealtimeEngineConfig; fullConfig: OpenClawConfig; runtime: PluginRuntime; platform: MeetingRuntimePlatform; meetingSessionId: string; requesterSessionKey?: string; logPrefix?: \"node\"; transport: MeetingRealtimeAudioTransport; logger: RuntimeLogger; providers?: RealtimeTranscriptionProviderPlugin[]; consultAgent: (params: MeetingAgentConsultParams) => Promise<{ text: string; }>; }): Promise<MeetingRealtimeAudioEngineHandle>;","entrypoint":"meeting-runtime","exportName":"startMeetingAgentRealtimeEngine","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"28206695e8368aa410a89350f58eca4be9cfbc3a77ca4f847ea0593a5dcb4e3b","declaration":"export function startMeetingRealtimeEngine(params: { config: MeetingRealtimeEngineConfig; fullConfig: OpenClawConfig; runtime: PluginRuntime; platform: MeetingRuntimePlatform; meetingSessionId: string; requesterSessionKey?: string; logPrefix?: \"node\"; talkSessionId?: string; talkContext?: { nodeId: string; bridgeId: string; }; transport: MeetingRealtimeAudioTransport; logger: RuntimeLogger; providers?: RealtimeVoiceProviderPlugin[]; consultAgent: (params: MeetingAgentConsultParams) => Promise<{ text: string; }>; tools: RealtimeVoiceTool[]; handleToolCall: (params: MeetingRealtimeToolCallParams) => Promise<void>; }): Promise<MeetingRealtimeAudioEngineHandle>;","entrypoint":"meeting-runtime","exportName":"startMeetingRealtimeEngine","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"function","recordType":"export"}
{"closureHash":"663b9c77231b21af697efd5042e22d1c33e9ee972adeb312ad86d81a2b2e36f7","declaration":"export type MeetingAgentConsultParams = MeetingAgentConsultParams;","entrypoint":"meeting-runtime","exportName":"MeetingAgentConsultParams","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"adf0745c611bf737fc28978d766fc2a25b7104e71b6b2fed4e9b95e519c7b115","declaration":"export type MeetingBrowserCandidateTab = MeetingBrowserCandidateTab;","entrypoint":"meeting-runtime","exportName":"MeetingBrowserCandidateTab","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"59b1526172b7491b85f14f13c1ee26d8d6726f33093770748580c767b1689a17","declaration":"export type MeetingBrowserControllerConfig = MeetingBrowserControllerConfig;","entrypoint":"meeting-runtime","exportName":"MeetingBrowserControllerConfig","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
@@ -3251,7 +3251,7 @@
{"closureHash":"8244b408803f57cf2004157e96f2ce11bb036cdf864123b15ba2fac7f03b5d43","declaration":"export type MeetingSessionRuntimeHandles<THealth extends MeetingBrowserHealth> = MeetingSessionRuntimeHandles<THealth>;","entrypoint":"meeting-runtime","exportName":"MeetingSessionRuntimeHandles","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"aa8054fc2c442891197e89bdad61e79999ea15d813c4b127fb6150607b9e67e7","declaration":"export type MeetingSessionRuntimeJoinContext<TSession extends MeetingSessionRecord<TTransport, TMode>, TTransport extends string, TMode extends string, THealth extends MeetingBrowserHealth, TTab extends MeetingBrowserTab> = MeetingSessionRuntimeJoinContext<TSession, TTransport, TMode, THealth, TTab>;","entrypoint":"meeting-runtime","exportName":"MeetingSessionRuntimeJoinContext","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"325241724edd38da439c5df03d225e2a7cb8e56d817e98ed7c37850656d3744b","declaration":"export type MeetingSessionRuntimeMessages<TSpeechBlockedReason extends string> = MeetingSessionRuntimeMessages<TSpeechBlockedReason>;","entrypoint":"meeting-runtime","exportName":"MeetingSessionRuntimeMessages","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"c1464291329d4b78d23a9fbf815b214ad5edb2adb2584e85707167c25e2c45d5","declaration":"export type MeetingSessionRuntimeOptions<TSession extends MeetingSessionRecord<TTransport, TMode>, TRequest, TTransport extends string, TMode extends string, THealth extends MeetingBrowserHealth<TManualReason, TSpeechBlockedReason>, TTab extends MeetingBrowserTab, TManualReason extends string, TSpeechBlockedReason extends string> = MeetingSessionRuntimeOptions<TSession, TRequest, TTransport, TMode, THealth, TTab, TManualReason, TSpeechBlockedReason>;","entrypoint":"meeting-runtime","exportName":"MeetingSessionRuntimeOptions","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"ef707c79fc8a5d095e5bc50392a123699fd038c2becd4572b0f3b06281b5cb7e","declaration":"export type MeetingSessionRuntimeOptions<TSession extends MeetingSessionRecord<TTransport, TMode>, TRequest, TTransport extends string, TMode extends string, THealth extends MeetingBrowserHealth<TManualReason, TSpeechBlockedReason>, TTab extends MeetingBrowserTab, TManualReason extends string, TSpeechBlockedReason extends string> = MeetingSessionRuntimeOptions<TSession, TRequest, TTransport, TMode, THealth, TTab, TManualReason, TSpeechBlockedReason>;","entrypoint":"meeting-runtime","exportName":"MeetingSessionRuntimeOptions","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"d3c730cba02d30512c4cdae6e2367c662982e2c25671833ecd8701283924c642","declaration":"export type MeetingSessionState = MeetingSessionState;","entrypoint":"meeting-runtime","exportName":"MeetingSessionState","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"2496931157bf64fdb16013172ab9c023e60c5f85b98f46a3ee9532ce58d636d6","declaration":"export type MeetingSetupCheck = MeetingSetupCheck;","entrypoint":"meeting-runtime","exportName":"MeetingSetupCheck","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"f0aed6f7955a43fc387d8bbc072cb6276b0f2d18e7f829441a2ad45974bb3831","declaration":"export type MeetingSetupStatus = MeetingSetupStatus;","entrypoint":"meeting-runtime","exportName":"MeetingSetupStatus","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
@@ -3265,9 +3265,9 @@
{"closureHash":"20c70a94483aeddda4d1500cfcc5e71fab844b474ba4061c55d6c8693d40821b","declaration":"export type MeetingVoiceCallJoinResult = MeetingVoiceCallJoinResult;","entrypoint":"meeting-runtime","exportName":"MeetingVoiceCallJoinResult","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"4fb2c5928aa6f809dd4c604d71c5c99cdfe3e98b6e9c1662601c9b4ad9738162","declaration":"export type MeetingVoiceCallStatusResult = MeetingVoiceCallStatusResult;","entrypoint":"meeting-runtime","exportName":"MeetingVoiceCallStatusResult","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"5ef812397b6409a4ca228943dd1080661365959477b42e705a9aaa219757d14f","declaration":"export type MeetingVoiceCallSurface = MeetingVoiceCallSurface;","entrypoint":"meeting-runtime","exportName":"MeetingVoiceCallSurface","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"type","recordType":"export"}
{"closureHash":"3bc9c8a87d4f47b40d630bd37d05960f8263c32dd175ecd568aac283a7ff44f7","declaration":"export interface MeetingPlatformAdapter<Session, Mode extends string, Health extends MeetingBrowserHealth, Transcript extends MeetingTranscriptSnapshot, CreateParams = never, CreateResult = never, DialInParams = never, DialInPlan = never> extends MeetingPlatformAdapterContract<Session, Mode, Health, Transcript, CreateParams, CreateResult, DialInParams, DialInPlan> {\n}","entrypoint":"meeting-runtime","exportName":"MeetingPlatformAdapter","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"interface","recordType":"export"}
{"closureHash":"c396bd350aaf1cb4f2ffa22e908ec4fcc2123a75c8405554b4ce641c53e74ebd","declaration":"export interface MeetingPlatformAdapter<Session, Mode extends string, Health extends MeetingBrowserHealth, Transcript extends MeetingTranscriptSnapshot, CreateParams = never, CreateResult = never, DialInParams = never, DialInPlan = never> extends MeetingPlatformAdapterContract<Session, Mode, Health, Transcript, CreateParams, CreateResult, DialInParams, DialInPlan> {\n}","entrypoint":"meeting-runtime","exportName":"MeetingPlatformAdapter","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"interface","recordType":"export"}
{"closureHash":"79884bd1df1ea0d07d5ceb4c62d93c1ee744b75d31c94c988845869c0f3cbd2d","declaration":"export interface MeetingRealtimeAudioTransport {\n onFatal(handler: () => void): void;\n startInput(onAudio: (audio: Buffer) => void): void;\n beginOutput?(): void;\n stop(): Promise<void>;\n writeOutput(audio: Buffer): Promise<void>;\n clearOutput(): Promise<void>;\n dispose(): Promise<void>;\n getHealth?(): MeetingRealtimeAudioTransportHealth;\n startBargeInMonitor?(onBargeIn: (audio: Buffer) => boolean): void;\n}","entrypoint":"meeting-runtime","exportName":"MeetingRealtimeAudioTransport","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"interface","recordType":"export"}
{"closureHash":"641b9b525dbf62fbfffa58409e4358e22ad0832b18e8ef5f286908ef7999c028","declaration":"export class MeetingSessionRuntime<TSession extends MeetingSessionRecord<TTransport, TMode>, TRequest, TTransport extends string, TMode extends string, THealth extends MeetingBrowserHealth<TManualReason, TSpeechBlockedReason>, TTab extends MeetingBrowserTab, TManualReason extends string, TSpeechBlockedReason extends string> {\n readonly #sessions: Map<string, TSession>;\n readonly #sessionLeaves: Map<string, Promise<MeetingSessionLeaveResult<TSession>>>;\n readonly #sessionCleanup: MeetingSessionCleanupTracker;\n readonly #meetingLock: MeetingSessionJoinLock;\n readonly #sessionStops: Map<string, () => Promise<void>>;\n readonly #sessionSpeakers: Map<string, (instructions?: string) => void>;\n readonly #sessionHealth: Map<string, () => Partial<THealth>>;\n readonly #durableTranscripts: MeetingSessionDurableTranscripts<TSession>;\n readonly #transcriptStore: MeetingSessionTranscriptStore<TSession>;\n constructor(private readonly options: MeetingSessionRuntimeOptions<TSession, TRequest, TTransport, TMode, THealth, TTab, TManualReason, TSpeechBlockedReason>);\n list(): TSession[];\n getSession(sessionId: string): TSession | undefined;\n async status(sessionId?: string): Promise<{\n found: boolean;\n session?: TSession;\n sessions?: TSession[];\n }>;\n async transcript(sessionId: string, options: {\n sinceIndex?: number;\n }): Promise<{ found: boolean; sessionId?: string; startIndex?: number; nextIndex?: number; droppedLines?: number; evicted?: boolean; lines?: MeetingTranscriptLine[]; }>;\n async startTranscriptSource(request: TranscriptStartRequest): Promise<TranscriptsStartResult>;\n async stopTranscriptSource(request: TranscriptStopRequest): Promise<TranscriptsStopResult>;\n isReusableSession(session: TSession, resolved: MeetingResolvedJoin<TTransport, TMode>): boolean;\n async join(request: TRequest): Promise<{\n session: TSession;\n spoken?: boolean;\n }>;\n async leave(sessionId: string, options?: {\n keepBrowserTab?: boolean;\n }): Promise<MeetingSessionLeaveResult<TSession>>;\n async speak(sessionId: string, instructions?: string): Promise<{\n found: boolean;\n spoken: boolean;\n session?: TSession;\n }>;\n async speakWhenReady(session: TSession, instructions: string): Promise<boolean>;\n hasHealthHandle(sessionId: string): boolean;\n refreshHealth(sessionId?: string): void;\n async refreshBrowserHealth(session: TSession, options: {\n force?: boolean;\n readOnly?: boolean;\n }): Promise<void>;\n async refreshCaptionHealth(session: TSession): Promise<void>;\n refreshSpeechReadiness(session: TSession): {\n ready: boolean;\n reason?: TSpeechBlockedReason;\n message?: string;\n };\n markSessionEnded(session: TSession, reason: string): void;\n async #joinUnlocked(request: TRequest, resolved: MeetingResolvedJoin<TTransport, TMode>): Promise<{\n session: TSession;\n spoken?: boolean;\n }>;\n async #leaveUnlocked(sessionId: string, options?: {\n keepBrowserTab?: boolean;\n }): Promise<MeetingSessionLeaveResult<TSession>>;\n async #leaveSession(session: TSession, options?: {\n keepBrowserTab?: boolean;\n }): Promise<MeetingSessionLeaveResult<TSession>>;\n #meetingKey(transport: TTransport, url: string): string;\n #inheritBrowserTabOwnership(params: {\n session: TSession;\n transport: TTransport;\n nodeId?: string;\n meetingUrl: string;\n tab?: TTab;\n }): TTab | undefined;\n async #settleRetainedBrowserTabs(retained: Array<{\n session: TSession;\n tab: TTab;\n }>, adopted?: {\n transport: TTransport;\n nodeId?: string;\n tab: TTab;\n }): Promise<boolean>;\n async #rollbackFailedJoinSession(session: TSession): Promise<void>;\n async #settleRetainedBrowserTabsAfterFailure(retained: Array<{\n session: TSession;\n tab: TTab;\n }>): Promise<void>;\n #attachRuntimeHandles(session: TSession, handles: MeetingSessionRuntimeHandles<THealth>): void;\n #dropRuntimeHandles(sessionId: string): void;\n #isManagedBrowserSession(session: TSession): boolean;\n #evaluateSpeechReadiness(session: TSession): {\n ready: boolean;\n reason?: TSpeechBlockedReason;\n message?: string;\n };\n #noteSession(session: TSession, note: string): void;\n}","entrypoint":"meeting-runtime","exportName":"MeetingSessionRuntime","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"class","recordType":"export"}
{"closureHash":"f20d2bb07c1d92abfd17a3fa90698a3795bf7ca88cecaf43f29311bc6555b6fc","declaration":"export class MeetingSessionRuntime<TSession extends MeetingSessionRecord<TTransport, TMode>, TRequest, TTransport extends string, TMode extends string, THealth extends MeetingBrowserHealth<TManualReason, TSpeechBlockedReason>, TTab extends MeetingBrowserTab, TManualReason extends string, TSpeechBlockedReason extends string> {\n readonly #sessions: Map<string, TSession>;\n readonly #sessionLeaves: Map<string, Promise<MeetingSessionLeaveResult<TSession>>>;\n readonly #sessionCleanup: MeetingSessionCleanupTracker;\n readonly #meetingLock: MeetingSessionJoinLock;\n readonly #sessionStops: Map<string, () => Promise<void>>;\n readonly #sessionSpeakers: Map<string, (instructions?: string) => void>;\n readonly #sessionHealth: Map<string, () => Partial<THealth>>;\n readonly #durableTranscripts: MeetingSessionDurableTranscripts<TSession>;\n readonly #transcriptStore: MeetingSessionTranscriptStore<TSession>;\n constructor(private readonly options: MeetingSessionRuntimeOptions<TSession, TRequest, TTransport, TMode, THealth, TTab, TManualReason, TSpeechBlockedReason>);\n list(): TSession[];\n getSession(sessionId: string): TSession | undefined;\n async status(sessionId?: string): Promise<{\n found: boolean;\n session?: TSession;\n sessions?: TSession[];\n }>;\n async transcript(sessionId: string, options: {\n sinceIndex?: number;\n }): Promise<{ found: boolean; sessionId?: string; startIndex?: number; nextIndex?: number; droppedLines?: number; evicted?: boolean; lines?: MeetingTranscriptLine[]; }>;\n async startTranscriptSource(request: TranscriptStartRequest): Promise<TranscriptsStartResult>;\n async stopTranscriptSource(request: TranscriptStopRequest): Promise<TranscriptsStopResult>;\n isReusableSession(session: TSession, resolved: MeetingResolvedJoin<TTransport, TMode>): boolean;\n async join(request: TRequest): Promise<{\n session: TSession;\n spoken?: boolean;\n }>;\n async leave(sessionId: string, options?: {\n keepBrowserTab?: boolean;\n }): Promise<MeetingSessionLeaveResult<TSession>>;\n async speak(sessionId: string, instructions?: string): Promise<{\n found: boolean;\n spoken: boolean;\n session?: TSession;\n }>;\n async speakWhenReady(session: TSession, instructions: string): Promise<boolean>;\n hasHealthHandle(sessionId: string): boolean;\n refreshHealth(sessionId?: string): void;\n async refreshBrowserHealth(session: TSession, options: {\n force?: boolean;\n readOnly?: boolean;\n }): Promise<void>;\n async refreshCaptionHealth(session: TSession): Promise<void>;\n refreshSpeechReadiness(session: TSession): {\n ready: boolean;\n reason?: TSpeechBlockedReason;\n message?: string;\n };\n markSessionEnded(session: TSession, reason: string): void;\n async #joinUnlocked(request: TRequest, resolved: MeetingResolvedJoin<TTransport, TMode>): Promise<{\n session: TSession;\n spoken?: boolean;\n }>;\n async #leaveUnlocked(sessionId: string, options?: {\n keepBrowserTab?: boolean;\n }): Promise<MeetingSessionLeaveResult<TSession>>;\n async #leaveSession(session: TSession, options?: {\n keepBrowserTab?: boolean;\n }): Promise<MeetingSessionLeaveResult<TSession>>;\n #meetingKey(transport: TTransport, url: string): string;\n #inheritBrowserTabOwnership(params: {\n session: TSession;\n transport: TTransport;\n nodeId?: string;\n meetingUrl: string;\n tab?: TTab;\n }): TTab | undefined;\n async #settleRetainedBrowserTabs(retained: Array<{\n session: TSession;\n tab: TTab;\n }>, adopted?: {\n transport: TTransport;\n nodeId?: string;\n tab: TTab;\n }): Promise<boolean>;\n async #rollbackFailedJoinSession(session: TSession): Promise<void>;\n async #settleRetainedBrowserTabsAfterFailure(retained: Array<{\n session: TSession;\n tab: TTab;\n }>): Promise<void>;\n #attachRuntimeHandles(session: TSession, handles: MeetingSessionRuntimeHandles<THealth>): void;\n #dropRuntimeHandles(sessionId: string): void;\n #isManagedBrowserSession(session: TSession): boolean;\n #evaluateSpeechReadiness(session: TSession): {\n ready: boolean;\n reason?: TSpeechBlockedReason;\n message?: string;\n };\n #noteSession(session: TSession, note: string): void;\n}","entrypoint":"meeting-runtime","exportName":"MeetingSessionRuntime","importSpecifier":"openclaw/plugin-sdk/meeting-runtime","kind":"class","recordType":"export"}
{"category":null,"entrypoint":"memory-core-host-engine-foundation","importSpecifier":"openclaw/plugin-sdk/memory-core-host-engine-foundation","recordType":"module"}
{"closureHash":"e2df8d235401aebf58eb71652fbeaedb42ca00aaa5042a76909ff2c48ba6fd54","declaration":"export function createSubsystemLogger(subsystem: string): SubsystemLogger;","entrypoint":"memory-core-host-engine-foundation","exportName":"createSubsystemLogger","importSpecifier":"openclaw/plugin-sdk/memory-core-host-engine-foundation","kind":"function","recordType":"export"}
{"closureHash":null,"declaration":"export function isPathInside(root: string, target: string): boolean;","entrypoint":"memory-core-host-engine-foundation","exportName":"isPathInside","importSpecifier":"openclaw/plugin-sdk/memory-core-host-engine-foundation","kind":"function","recordType":"export"}
@@ -3360,7 +3360,7 @@
{"closureHash":"d32342291ad7c19b5b7066499a65a5b76c8f0e268bbb8852cb0bda67685037bf","declaration":"export function readPositiveIntegerParam(params: Record<string, unknown>, key: string, options?: { message?: string; max?: number; }): number | undefined;","entrypoint":"param-readers","exportName":"readPositiveIntegerParam","importSpecifier":"openclaw/plugin-sdk/param-readers","kind":"function","recordType":"export"}
{"closureHash":"7830262486cedbb4b8e156de295bbcea8596738742c39961e429a3cea6836e0b","declaration":"export function readStringArrayParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string[];\nexport function readStringArrayParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string[] | undefined;","entrypoint":"param-readers","exportName":"readStringArrayParam","importSpecifier":"openclaw/plugin-sdk/param-readers","kind":"function","recordType":"export"}
{"closureHash":"818ea0efd869633f87abb325bb187725079ffb661b088bb4661668485d4355cf","declaration":"export function readStringOrNumberParam(params: Record<string, unknown>, key: string, options?: { required?: boolean; label?: string; }): string | undefined;","entrypoint":"param-readers","exportName":"readStringOrNumberParam","importSpecifier":"openclaw/plugin-sdk/param-readers","kind":"function","recordType":"export"}
{"closureHash":"1bb870618265ff3d1feb750d975fce5f5b87fe3bd9c458f056eea28933ac7092","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"param-readers","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/param-readers","kind":"function","recordType":"export"}
{"closureHash":"9ec34afffcb58733bf81e79b036e4cd9fb963dd0c3b1e29758c469e4ea6a5c96","declaration":"export function readStringParam(params: Record<string, unknown>, key: string, options: StringParamOptions & { required: true; }): string;\nexport function readStringParam(params: Record<string, unknown>, key: string, options?: StringParamOptions): string | undefined;","entrypoint":"param-readers","exportName":"readStringParam","importSpecifier":"openclaw/plugin-sdk/param-readers","kind":"function","recordType":"export"}
{"category":null,"entrypoint":"persistent-dedupe","importSpecifier":"openclaw/plugin-sdk/persistent-dedupe","recordType":"module"}
{"closureHash":"1bcc14224cbe52a98a97a6d767a8b2f2bbc8473439358417dc913e300c1b0abd","declaration":"export function createChannelReplayGuard<TEvent>(params: ChannelReplayGuardParams<TEvent>): ChannelReplayGuard<TEvent>;","entrypoint":"persistent-dedupe","exportName":"createChannelReplayGuard","importSpecifier":"openclaw/plugin-sdk/persistent-dedupe","kind":"function","recordType":"export"}
{"closureHash":"7a3917f9b21766441f3ceda2e888d24d38d8943b5fa57965affddd24732a7289","declaration":"export function createClaimableDedupe(options: ClaimableDedupeOptions): ClaimableDedupe & Required<Pick<ClaimableDedupe, \"forget\">>;","entrypoint":"persistent-dedupe","exportName":"createClaimableDedupe","importSpecifier":"openclaw/plugin-sdk/persistent-dedupe","kind":"function","recordType":"export"}
@@ -3403,9 +3403,9 @@
{"category":"core","entrypoint":"plugin-entry","importSpecifier":"openclaw/plugin-sdk/plugin-entry","recordType":"module"}
{"closureHash":"3d27406644141af2733cfca6e8c1240fc62327910109f585ce9073cafd7fd89c","declaration":"export function buildJsonPluginConfigSchema(schema: JsonSchemaObject, options?: BuildJsonPluginConfigSchemaOptions): OpenClawPluginConfigSchema;","entrypoint":"plugin-entry","exportName":"buildJsonPluginConfigSchema","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"function","recordType":"export"}
{"closureHash":"aff66c792d532642afb9c6e5a03c8d220f219250c3a8b49733f32058f22f98ca","declaration":"export function buildPluginConfigSchema(schema: ZodTypeAny, options?: BuildPluginConfigSchemaOptions): OpenClawPluginConfigSchema;","entrypoint":"plugin-entry","exportName":"buildPluginConfigSchema","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"function","recordType":"export"}
{"closureHash":"e9633b4ca148dc6289c61a1d85b0e34cb244d926badbf4a591302267c691e62a","declaration":"export function definePluginEntry({ id, name, description, kind, configSchema, reload, nodeHostCommands, securityAuditCollectors, register, }: DefinePluginEntryOptions): DefinedPluginEntry;","entrypoint":"plugin-entry","exportName":"definePluginEntry","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"function","recordType":"export"}
{"closureHash":"c5135d933f690abcdf9cb6bd02dc8c3913d6b0db458fbba9ba7fb7e891a1d30b","declaration":"export function definePluginEntry({ id, name, description, kind, configSchema, reload, nodeHostCommands, securityAuditCollectors, register, }: DefinePluginEntryOptions): DefinedPluginEntry;","entrypoint":"plugin-entry","exportName":"definePluginEntry","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"function","recordType":"export"}
{"closureHash":"0ef1dfa3b5deeb456480e292c0e835c3cd6d13e7bb7059fc735546507da51594","declaration":"export function emptyPluginConfigSchema(): OpenClawPluginConfigSchema;","entrypoint":"plugin-entry","exportName":"emptyPluginConfigSchema","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"function","recordType":"export"}
{"closureHash":"89d1232faa739ea7bb8b305d5e92ff1057759b833cd9994ef0923634234741e7","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"plugin-entry","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"49e181db775c3ee735cef6900062306c81f598b8a5b696379e55a21f3b011741","declaration":"export type AgentHarness = AgentHarness;","entrypoint":"plugin-entry","exportName":"AgentHarness","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"d2ff4de9ee3fd111c2cc64a3ee7e557d9f161af1b6b437ee7886bcb16e426317","declaration":"export type AgentPromptGuidance = AgentPromptGuidance;","entrypoint":"plugin-entry","exportName":"AgentPromptGuidance","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"2841127a90e04467adfea8126cbf03655f44ddb089ad9e0d48833c2beea39cbd","declaration":"export type AgentPromptGuidanceEntry = AgentPromptGuidanceEntry;","entrypoint":"plugin-entry","exportName":"AgentPromptGuidanceEntry","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"aa0412acefe62caff12e5271ead0545504874e824380dc21cfc0566388a05f33","declaration":"export type AgentPromptSurfaceKind = \"openclaw_main\" | \"pi_main\" | \"codex_app_server\" | \"cli_backend\" | \"acp_backend\" | \"subagent\";","entrypoint":"plugin-entry","exportName":"AgentPromptSurfaceKind","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
@@ -3421,10 +3421,10 @@
{"closureHash":"8054ffbe71b91afced900ef8a06f5e368ac10c4f99ffc1c6f538a802856f61c6","declaration":"export type OpenClawConfig = OpenClawConfig;","entrypoint":"plugin-entry","exportName":"OpenClawConfig","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"2f6e368fff73e942044cdf95c7c751b46c741e22ac0d2d4d97f45a3158f758ae","declaration":"export type OpenClawGatewayDiscoveryAdvertiseContext = OpenClawGatewayDiscoveryAdvertiseContext;","entrypoint":"plugin-entry","exportName":"OpenClawGatewayDiscoveryAdvertiseContext","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"b198058e0065e5c60b729a5bdf568f7e2436a006d8c4a7c63de764c7283f96ba","declaration":"export type OpenClawGatewayDiscoveryService = OpenClawGatewayDiscoveryService;","entrypoint":"plugin-entry","exportName":"OpenClawGatewayDiscoveryService","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"9dc2f147a95856891b1a644b8863a3ae3c45db0c56b28ee7c5954562148cde17","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"plugin-entry","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"51e15f7b32488d2f964dc3e5e7df9924429b74ee04aa5e7e95763d495ef1682c","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"plugin-entry","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"c968e96cdb5c97e92d26b7b15fb5255531b45a12e7c5c0a2e7e456d31cc6e358","declaration":"export type OpenClawPluginCommandDefinition = OpenClawPluginCommandDefinition;","entrypoint":"plugin-entry","exportName":"OpenClawPluginCommandDefinition","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"365beb5cee974639c2f35fc7a39088721ca8e9c618442830298b98033e9c768c","declaration":"export type OpenClawPluginConfigSchema = OpenClawPluginConfigSchema;","entrypoint":"plugin-entry","exportName":"OpenClawPluginConfigSchema","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"9303ba80fdfee2f9fae041231bc7482ae3dffcc8d451f1862aac7fc1c2a8b8f2","declaration":"export type OpenClawPluginDefinition = OpenClawPluginDefinition;","entrypoint":"plugin-entry","exportName":"OpenClawPluginDefinition","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"1b2636e3bd55c40a8911396cf70dbca69bc43e50dfc13003266def91c69f50da","declaration":"export type OpenClawPluginDefinition = OpenClawPluginDefinition;","entrypoint":"plugin-entry","exportName":"OpenClawPluginDefinition","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"a7ed83f0924f818b23cecb5a1f3591ff28b9499ccac9667a2b8505c2bc608ea9","declaration":"export type OpenClawPluginGatewayEventScope = OpenClawPluginGatewayEventScope;","entrypoint":"plugin-entry","exportName":"OpenClawPluginGatewayEventScope","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"f81f224d9b837e6353b7a546c5a76b124bcf568fd1f1fd0c6881fda30c53120a","declaration":"export type OpenClawPluginGatewayEvents = OpenClawPluginGatewayEvents;","entrypoint":"plugin-entry","exportName":"OpenClawPluginGatewayEvents","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
{"closureHash":"7470b211ac4d3449cd0fc353ee2eb48e9fbc2dbc9259d21c680d0203577aa94f","declaration":"export type OpenClawPluginHttpRouteHandler = OpenClawPluginHttpRouteHandler;","entrypoint":"plugin-entry","exportName":"OpenClawPluginHttpRouteHandler","importSpecifier":"openclaw/plugin-sdk/plugin-entry","kind":"type","recordType":"export"}
@@ -3574,14 +3574,14 @@
{"closureHash":"ad45bb1eb13e99e3217eb7e7e2d29fa456bc1930059dd5e94d7500e05e54c6bc","declaration":"export function executePluginCommand(params: { command: RegisteredPluginCommand; args?: string; senderId?: string; channel: string; channelId?: PluginCommandContext[\"channelId\"]; isAuthorizedSender: boolean; senderIsOwner?: boolean; gatewayClientScopes?: PluginCommandContext[\"gatewayClientScopes\"]; agentId?: string; sessionKey?: PluginCommandContext[\"sessionKey\"]; sessionId?: PluginCommandContext[\"sessionId\"]; sessionTarget?: PluginCommandContext[\"sessionTarget\"]; sessionFile?: PluginCommandContext[\"sessionFile\"]; authProfileId?: string; commandBody: string; config: OpenClawConfig; from?: PluginCommandContext[\"from\"]; to?: PluginCommandContext[\"to\"]; originatingTo?: string; accountId?: PluginCommandContext[\"accountId\"]; messageThreadId?: PluginCommandContext[\"messageThreadId\"]; threadParentId?: PluginCommandContext[\"threadParentId\"]; diagnosticsSessions?: PluginCommandContext[\"diagnosticsSessions\"]; diagnosticsUploadApproved?: PluginCommandContext[\"diagnosticsUploadApproved\"]; diagnosticsPreviewOnly?: PluginCommandContext[\"diagnosticsPreviewOnly\"]; diagnosticsPrivateRouted?: PluginCommandContext[\"diagnosticsPrivateRouted\"]; }): Promise<PluginCommandResult>;","entrypoint":"plugin-runtime","exportName":"executePluginCommand","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"7e75fc04d621dc8d12f459d5b5b0c039a39b77c30c2b51af481e123c352f57b8","declaration":"export function getGlobalHookRunner(): HookRunner | null;","entrypoint":"plugin-runtime","exportName":"getGlobalHookRunner","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"db6583607237e4081814e2c5d4f8fb6f216ad3bbfe623bf16fc1a9c09c15f64b","declaration":"export function getPluginCommandSpecs(provider?: string, options?: PluginCommandSpecOptions): Array<{ name: string; description: string; descriptionLocalizations?: Record<string, string>; acceptsArgs: boolean; }>;","entrypoint":"plugin-runtime","exportName":"getPluginCommandSpecs","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"1b287439685d4de1b6ad946a43783fafa28fb7d66c1c0f71c9dbde0d9eec3698","declaration":"export function getPluginRuntimeGatewayRequestScope(): PluginRuntimeGatewayRequestScope | undefined;","entrypoint":"plugin-runtime","exportName":"getPluginRuntimeGatewayRequestScope","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"ab0c17b46e336c7be975c557239bdcdadaad972ad5d07c862cae9da3670dbed6","declaration":"export function getPluginRuntimeGatewayRequestScope(): PluginRuntimeGatewayRequestScope | undefined;","entrypoint":"plugin-runtime","exportName":"getPluginRuntimeGatewayRequestScope","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"cfe277ce6de0c6ed50f1f54b66c889f6c95e91b058e8bcdc27aa37317a93a447","declaration":"export function listRegisteredPluginAgentPromptGuidance(params?: { surface?: AgentPromptSurfaceKind; includeLegacyGlobalGuidance?: boolean; }): string[];","entrypoint":"plugin-runtime","exportName":"listRegisteredPluginAgentPromptGuidance","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"693462c2a5c07646277169ede37b71ed12dc8d56c648b7fed73712900be34dcf","declaration":"export function matchPluginCommand(commandBody: string, options?: { channel?: string; }): { command: RegisteredPluginCommand; args?: string; } | null;","entrypoint":"plugin-runtime","exportName":"matchPluginCommand","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"8d575a525d165780642e70ff1385311c3422429c2e26c479a85baae491d62efe","declaration":"export function registerPluginCommand(pluginId: string, command: OpenClawPluginCommandDefinition, opts?: { pluginName?: string; pluginRoot?: string; allowReservedCommandNames?: boolean; allowOwnerStatusExposure?: boolean; }): CommandRegistrationResult;","entrypoint":"plugin-runtime","exportName":"registerPluginCommand","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"16986e5d431f584c2d5053289eca3d2225bbe47a92cdfbbc2af91b264a165846","declaration":"export function registerPluginInteractiveHandler(pluginId: string, registration: PluginInteractiveHandlerRegistration, opts?: { pluginName?: string; pluginRoot?: string; }): InteractiveRegistrationResult;","entrypoint":"plugin-runtime","exportName":"registerPluginInteractiveHandler","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"f20c07a48e2c949fbc889e7a32760f4e52339d9f6d3eab49e00ff249266e2396","declaration":"export function startLazyPluginServiceModule(params: { skipEnvVar?: string; overrideEnvVar?: string; validateOverrideSpecifier?: (specifier: string) => string; loadDefaultModule: () => Promise<LazyServiceModule>; loadOverrideModule?: (specifier: string) => Promise<LazyServiceModule>; startExportNames: string[]; stopExportNames?: string[]; }): Promise<LazyPluginServiceHandle | null>;","entrypoint":"plugin-runtime","exportName":"startLazyPluginServiceModule","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"function","recordType":"export"}
{"closureHash":"bad43ffe69d1d9d6c92c79df4c388b3dda685013a92392daef456f1622ade659","declaration":"export type LazyPluginServiceHandle = LazyPluginServiceHandle;","entrypoint":"plugin-runtime","exportName":"LazyPluginServiceHandle","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"type","recordType":"export"}
{"closureHash":"9dc2f147a95856891b1a644b8863a3ae3c45db0c56b28ee7c5954562148cde17","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"plugin-runtime","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"type","recordType":"export"}
{"closureHash":"51e15f7b32488d2f964dc3e5e7df9924429b74ee04aa5e7e95763d495ef1682c","declaration":"export type OpenClawPluginApi = OpenClawPluginApi;","entrypoint":"plugin-runtime","exportName":"OpenClawPluginApi","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"type","recordType":"export"}
{"closureHash":"365beb5cee974639c2f35fc7a39088721ca8e9c618442830298b98033e9c768c","declaration":"export type OpenClawPluginConfigSchema = OpenClawPluginConfigSchema;","entrypoint":"plugin-runtime","exportName":"OpenClawPluginConfigSchema","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"type","recordType":"export"}
{"closureHash":"f06379ada10ce0eca4e66bdf978db2c0035e054a135dc044c6d831ac7797c08f","declaration":"export type PluginConversationBinding = PluginConversationBinding;","entrypoint":"plugin-runtime","exportName":"PluginConversationBinding","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"type","recordType":"export"}
{"closureHash":"a1223d674b2b66918a576ae05b04318d7b8cbe9b1d3bc6dd7a08d1a4fa79b291","declaration":"export type PluginConversationBindingRequestParams = PluginConversationBindingRequestParams;","entrypoint":"plugin-runtime","exportName":"PluginConversationBindingRequestParams","importSpecifier":"openclaw/plugin-sdk/plugin-runtime","kind":"type","recordType":"export"}
@@ -3671,10 +3671,10 @@
{"closureHash":"e66adcb55dec79be73a52bc76594b7e9210fd93c69a85b56098fbb58cecbb354","declaration":"export type WriteOAuthCredentialsOptions = WriteOAuthCredentialsOptions;","entrypoint":"provider-auth","exportName":"WriteOAuthCredentialsOptions","importSpecifier":"openclaw/plugin-sdk/provider-auth","kind":"type","recordType":"export"}
{"category":null,"entrypoint":"provider-catalog-runtime","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","recordType":"module"}
{"closureHash":"b5665596a3f011454a5614681513516acd50b6c749536c43842d811980cf7ad3","declaration":"export function augmentModelCatalogWithProviderPlugins(params: { config?: OpenClawConfig; workspaceDir?: string; env?: NodeJS.ProcessEnv; metadataSnapshot?: PluginMetadataSnapshot; context: ProviderAugmentModelCatalogContext; }): Promise<ModelCatalogEntry[]>;","entrypoint":"provider-catalog-runtime","exportName":"augmentModelCatalogWithProviderPlugins","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"d561ea4f471fb702c19f765bb646301a6eb7524149642c1c5e05616fb54e5cdc","declaration":"export function isPluginProvidersLoadInFlight(params: Parameters<typeof resolvePluginProviders>[0]): boolean;","entrypoint":"provider-catalog-runtime","exportName":"isPluginProvidersLoadInFlight","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"b2a1c23ff9b65dcb5ae03052bbaec7f71d4a156a1e7ba6e5c8ae04e894295771","declaration":"export function resolveCatalogHookProviderPluginIds(params: { config?: PluginLoadOptions[\"config\"]; workspaceDir?: string; env?: PluginLoadOptions[\"env\"]; metadataSnapshot?: ProviderManifestLoadParams[\"metadataSnapshot\"]; }): string[];","entrypoint":"provider-catalog-runtime","exportName":"resolveCatalogHookProviderPluginIds","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"c759181919675a4c4b158629a51cfab8f40aaba54f8ee64be8a5a063efd3825a","declaration":"export function resolveOwningPluginIdsForProvider(params: { provider: string; config?: PluginLoadOptions[\"config\"]; workspaceDir?: string; env?: PluginLoadOptions[\"env\"]; manifestRegistry?: PluginManifestRegistry; metadataSnapshot?: Pick<PluginMetadataSnapshot, \"owners\" | \"manifestRegistry\" | \"byPluginId\">; }): string[] | undefined;","entrypoint":"provider-catalog-runtime","exportName":"resolveOwningPluginIdsForProvider","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"ed971738e812ee35a0fb8cdda2972251cd613b40cbcfec6c68c64c7c9a89977c","declaration":"export function resolvePluginProviders(params: { config?: PluginLoadOptions[\"config\"]; workspaceDir?: string; env?: PluginLoadOptions[\"env\"]; bundledProviderVitestCompat?: boolean; onlyPluginIds?: string[]; providerRefs?: readonly string[]; modelRefs?: readonly string[]; activate?: boolean; cache?: boolean; applyAutoEnable?: boolean; pluginSdkResolution?: PluginLoadOptions[\"pluginSdkResolution\"]; mode?: \"runtime\" | \"setup\"; includeUntrustedWorkspacePlugins?: boolean; pluginMetadataSnapshot?: PluginMetadataRegistryView; skipIfLoadInFlight?: boolean; }): ProviderPlugin[];","entrypoint":"provider-catalog-runtime","exportName":"resolvePluginProviders","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"cc888869112db13beb81336c29df4a6a9314cdbc564a10f71cffc472798ff356","declaration":"export function isPluginProvidersLoadInFlight(params: Parameters<typeof resolvePluginProviders>[0]): boolean;","entrypoint":"provider-catalog-runtime","exportName":"isPluginProvidersLoadInFlight","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"a44ab9ee11889f84d728239f33b9fdaad169e9491aac2a783854986c6c63953b","declaration":"export function resolveCatalogHookProviderPluginIds(params: { config?: PluginLoadOptions[\"config\"]; workspaceDir?: string; env?: PluginLoadOptions[\"env\"]; metadataSnapshot?: ProviderManifestLoadParams[\"metadataSnapshot\"]; }): string[];","entrypoint":"provider-catalog-runtime","exportName":"resolveCatalogHookProviderPluginIds","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"68a4d7403ea221d30e280d779b6443555c13cb7cc618e06b546919dd1f33b52d","declaration":"export function resolveOwningPluginIdsForProvider(params: { provider: string; config?: PluginLoadOptions[\"config\"]; workspaceDir?: string; env?: PluginLoadOptions[\"env\"]; manifestRegistry?: PluginManifestRegistry; metadataSnapshot?: Pick<PluginMetadataSnapshot, \"owners\" | \"manifestRegistry\" | \"byPluginId\">; }): string[] | undefined;","entrypoint":"provider-catalog-runtime","exportName":"resolveOwningPluginIdsForProvider","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"closureHash":"ed8468a1d225b3171b733b152ef60d7a25de0c8a6521df328e278b674b073b50","declaration":"export function resolvePluginProviders(params: { config?: PluginLoadOptions[\"config\"]; workspaceDir?: string; env?: PluginLoadOptions[\"env\"]; bundledProviderVitestCompat?: boolean; onlyPluginIds?: string[]; providerRefs?: readonly string[]; modelRefs?: readonly string[]; activate?: boolean; cache?: boolean; applyAutoEnable?: boolean; pluginSdkResolution?: PluginLoadOptions[\"pluginSdkResolution\"]; mode?: \"runtime\" | \"setup\"; includeUntrustedWorkspacePlugins?: boolean; pluginMetadataSnapshot?: PluginMetadataRegistryView; skipIfLoadInFlight?: boolean; }): ProviderPlugin[];","entrypoint":"provider-catalog-runtime","exportName":"resolvePluginProviders","importSpecifier":"openclaw/plugin-sdk/provider-catalog-runtime","kind":"function","recordType":"export"}
{"category":null,"entrypoint":"proxy-capture","importSpecifier":"openclaw/plugin-sdk/proxy-capture","recordType":"module"}
{"closureHash":"d0e4e026d736bc00b1758d1089c44c3c5f3a09c7254291584de8cb297365804c","declaration":"export function acquireDebugProxyCaptureStore(dbPath: string, blobDir: string): { store: LegacyDebugProxyCaptureStore; release: () => void; };\nexport function acquireDebugProxyCaptureStore(options?: DebugProxyCaptureStoreOptions): { store: SharedDebugProxyCaptureStore; release: () => void; };","entrypoint":"proxy-capture","exportName":"acquireDebugProxyCaptureStore","importSpecifier":"openclaw/plugin-sdk/proxy-capture","kind":"function","recordType":"export"}
{"closureHash":"d41cbb9de51b7aee1c6cf8c713b0bc44f27ac926fbb6422c05726f196d11964e","declaration":"export function captureHttpExchange(params: { url: string; method: string; requestHeaders?: Headers | Record<string, string> | undefined; requestBody?: BodyInit | Buffer | string | null; response: Response; transport?: \"http\" | \"sse\"; flowId?: string; meta?: Record<string, unknown>; }, resolved?: DebugProxySettings, deps?: DebugProxyCaptureRuntimeDeps): void;","entrypoint":"proxy-capture","exportName":"captureHttpExchange","importSpecifier":"openclaw/plugin-sdk/proxy-capture","kind":"function","recordType":"export"}
@@ -4636,16 +4636,16 @@
{"closureHash":"e365d7ad911453b5139ba700931b061e560cff80b50d4cbe5e9615b5d7e13a52","declaration":"export type ScopedExpiringIdCache<TScope extends string | number, TId extends string | number> = ScopedExpiringIdCache<TScope, TId>;","entrypoint":"text-runtime","exportName":"ScopedExpiringIdCache","importSpecifier":"openclaw/plugin-sdk/text-runtime","kind":"type","recordType":"export"}
{"closureHash":"af5502c92594c2e9049a4b4994e17c00d3adee3f6d1e68edd818a539c74c8787","declaration":"export interface CodeRegion {\n start: number;\n end: number;\n}","entrypoint":"text-runtime","exportName":"CodeRegion","importSpecifier":"openclaw/plugin-sdk/text-runtime","kind":"interface","recordType":"export"}
{"category":null,"entrypoint":"tool-plugin","importSpecifier":"openclaw/plugin-sdk/tool-plugin","recordType":"module"}
{"closureHash":"9ec5a3e49b3df340966e826f8b460e22a79567fea9c11b358de4d3270501ac9e","declaration":"export function defineToolPlugin<TConfigSchema extends TSchema | undefined = undefined>(definition: DefineToolPluginOptions<TConfigSchema>): DefinedToolPluginEntry;","entrypoint":"tool-plugin","exportName":"defineToolPlugin","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"function","recordType":"export"}
{"closureHash":"2fd083315b242569261a7067fc2b0ed41241a23db8f763b10e09c74cf54128e4","declaration":"export function defineToolPlugin<TConfigSchema extends TSchema | undefined = undefined>(definition: DefineToolPluginOptions<TConfigSchema>): DefinedToolPluginEntry;","entrypoint":"tool-plugin","exportName":"defineToolPlugin","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"function","recordType":"export"}
{"closureHash":"36ef907ce20f885b5f3068cbf0475dc442a68da9652579bb5bf8fb83ad34c38b","declaration":"export function getToolPluginMetadata(entry: unknown): ToolPluginMetadata | undefined;","entrypoint":"tool-plugin","exportName":"getToolPluginMetadata","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"function","recordType":"export"}
{"closureHash":"bdc58154e36b2625fb3daccca3eab248d981077d04d747f0ad507cb2ff565198","declaration":"export const toolPluginMetadataSymbol: typeof toolPluginMetadataSymbol;","entrypoint":"tool-plugin","exportName":"toolPluginMetadataSymbol","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"const","recordType":"export"}
{"closureHash":"0b4ce6957b84279fb94b47176ebec6b77add2f35a18d2173fc8f0d4edb69c215","declaration":"export type DefineToolPluginOptions<TConfigSchema extends TSchema | undefined = undefined> = DefineToolPluginOptions<TConfigSchema>;","entrypoint":"tool-plugin","exportName":"DefineToolPluginOptions","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"7fa0cb56f407285ecd68a46229a296a5ea4eb23c05beaaa57c8f27f2650a10b9","declaration":"export type DefinedToolPluginEntry = DefinedToolPluginEntry;","entrypoint":"tool-plugin","exportName":"DefinedToolPluginEntry","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"62546d559009261caca328206579908755922bc2f0e5f7af07e20fb763226a8e","declaration":"export type ToolPluginExecutionContext = ToolPluginExecutionContext;","entrypoint":"tool-plugin","exportName":"ToolPluginExecutionContext","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"ea764b6acc9c66784f615f4eda111d6831df8b7afe51658c589e5dc84fff2057","declaration":"export type ToolPluginFactoryContext<TConfig> = ToolPluginFactoryContext<TConfig>;","entrypoint":"tool-plugin","exportName":"ToolPluginFactoryContext","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"019018ba58a0da36dd91f9d35f99348d423daaaa000fad15a669662b080883a6","declaration":"export type DefineToolPluginOptions<TConfigSchema extends TSchema | undefined = undefined> = DefineToolPluginOptions<TConfigSchema>;","entrypoint":"tool-plugin","exportName":"DefineToolPluginOptions","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"2532ddbf95230699a9079e94c842e4cd9668ea3c686239b95e9f16900b1c2178","declaration":"export type DefinedToolPluginEntry = DefinedToolPluginEntry;","entrypoint":"tool-plugin","exportName":"DefinedToolPluginEntry","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"efc38b997c27f13230fad5dd998ac04a75afb4ded77c7a45ed88565478636900","declaration":"export type ToolPluginExecutionContext = ToolPluginExecutionContext;","entrypoint":"tool-plugin","exportName":"ToolPluginExecutionContext","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"e1ffdffbfbc1fe3483bdec816765a1951fb5c45e6b02443b9d015a34a5023088","declaration":"export type ToolPluginFactoryContext<TConfig> = ToolPluginFactoryContext<TConfig>;","entrypoint":"tool-plugin","exportName":"ToolPluginFactoryContext","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"f774bd092f51a31fbb34847213f9583234f585f66918d0af55e81bbbae40463b","declaration":"export type ToolPluginMetadata = ToolPluginMetadata;","entrypoint":"tool-plugin","exportName":"ToolPluginMetadata","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"414a89d0c80eaaf682dc25d306e7223c981c6fd25366adb973a106f4268a6a54","declaration":"export type ToolPluginStaticToolMetadata = ToolPluginStaticToolMetadata;","entrypoint":"tool-plugin","exportName":"ToolPluginStaticToolMetadata","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"4b3f25d036f97031b2b17a813d6e3a250958a085fd4008cf1f21e6bc2ee29bb1","declaration":"export type ToolPluginToolDefinition<TConfig, TParamsSchema extends TSchema> = ToolPluginToolDefinition<TConfig, TParamsSchema>;","entrypoint":"tool-plugin","exportName":"ToolPluginToolDefinition","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"closureHash":"8fb933209e8b65204db497c1eebb3a5e809424fbf5f1dc1ff90e9d7da08eacae","declaration":"export type ToolPluginToolDefinition<TConfig, TParamsSchema extends TSchema> = ToolPluginToolDefinition<TConfig, TParamsSchema>;","entrypoint":"tool-plugin","exportName":"ToolPluginToolDefinition","importSpecifier":"openclaw/plugin-sdk/tool-plugin","kind":"type","recordType":"export"}
{"category":null,"entrypoint":"tool-results","importSpecifier":"openclaw/plugin-sdk/tool-results","recordType":"module"}
{"closureHash":"c5b0951c3629834dff78f92317cf1421a6bbc0faf9307be1cabb915055665280","declaration":"export function jsonResult<TDetails>(payload: TDetails): AgentToolResult<TDetails>;","entrypoint":"tool-results","exportName":"jsonResult","importSpecifier":"openclaw/plugin-sdk/tool-results","kind":"function","recordType":"export"}
{"closureHash":"b9aefc637a694c74e028e92006004bef18185ed569af48ac43d36b646b0af2f3","declaration":"export function textResult<TDetails>(text: string, details: TDetails): AgentToolResult<TDetails>;","entrypoint":"tool-results","exportName":"textResult","importSpecifier":"openclaw/plugin-sdk/tool-results","kind":"function","recordType":"export"}
@@ -4679,9 +4679,9 @@
{"closureHash":"9f9174f1023a8a451232f5d97d1e922b7faa88b76b58cffbfbe246a1488e0ddd","declaration":"export function readJsonWebhookBodyOrReject(params: { req: IncomingMessage; res: ServerResponse; maxBytes?: number; timeoutMs?: number; profile?: WebhookBodyReadProfile; emptyObjectOnEmpty?: boolean; invalidJsonMessage?: string; }): Promise<{ ok: true; value: unknown; } | { ok: false; }>;","entrypoint":"webhook-ingress","exportName":"readJsonWebhookBodyOrReject","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"1bbddd5d1c8297e315275db4d5e1c8748ff09c0be7c37b0cf456db4fc69f8909","declaration":"export function readRequestBodyWithLimit(req: IncomingMessage, options: ReadRequestBodyOptions): Promise<string>;","entrypoint":"webhook-ingress","exportName":"readRequestBodyWithLimit","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"e8a1174cac83ce346a231fd25e82bb5f7618ffb57cdd9af6eaa208411f70646d","declaration":"export function readWebhookBodyOrReject(params: { req: IncomingMessage; res: ServerResponse; maxBytes?: number; timeoutMs?: number; profile?: WebhookBodyReadProfile; invalidBodyMessage?: string; }): Promise<{ ok: true; value: string; } | { ok: false; }>;","entrypoint":"webhook-ingress","exportName":"readWebhookBodyOrReject","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"16f74b7dfedf2874a05eab5305bf87a98e77d4d5e84818f9374b9b5c24031bb0","declaration":"export function registerPluginHttpRoute(params: { path?: string | null; fallbackPath?: string | null; handler: PluginHttpRouteHandler; auth: PluginHttpRouteRegistration[\"auth\"]; match?: PluginHttpRouteRegistration[\"match\"]; gatewayRuntimeScopeSurface?: PluginHttpRouteRegistration[\"gatewayRuntimeScopeSurface\"]; replaceExisting?: boolean; reuseExistingSameOwner?: boolean; throwOnFailure?: boolean; pluginId?: string; source?: string; accountId?: string; log?: (message: string) => void; registry?: PluginRegistry; }): () => void;","entrypoint":"webhook-ingress","exportName":"registerPluginHttpRoute","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"380f4705f5df9dfa68ce8f989a0e8e6c8f34881d49dc5814c04f03cf2958c012","declaration":"export function registerPluginHttpRoute(params: { path?: string | null; fallbackPath?: string | null; handler: PluginHttpRouteHandler; auth: PluginHttpRouteRegistration[\"auth\"]; match?: PluginHttpRouteRegistration[\"match\"]; gatewayRuntimeScopeSurface?: PluginHttpRouteRegistration[\"gatewayRuntimeScopeSurface\"]; replaceExisting?: boolean; reuseExistingSameOwner?: boolean; throwOnFailure?: boolean; pluginId?: string; source?: string; accountId?: string; log?: (message: string) => void; registry?: PluginRegistry; }): () => void;","entrypoint":"webhook-ingress","exportName":"registerPluginHttpRoute","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"05835f2f66f906f736b82b332a84a9714bc3a6b211890a62d8fc4dbf9258a7d4","declaration":"export function registerWebhookTarget<T extends { path: string; }>(targetsByPath: Map<string, T[]>, target: T, opts?: RegisterWebhookTargetOptions<T>): RegisteredWebhookTarget<T>;","entrypoint":"webhook-ingress","exportName":"registerWebhookTarget","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"c3c217bf6e657834d414a4289eb7b117ab1f8bd105ae1d8e75731d22ab900c9d","declaration":"export function registerWebhookTargetWithPluginRoute<T extends { path: string; }>(params: { targetsByPath: Map<string, T[]>; target: T; route: RegisterWebhookPluginRouteOptions; onLastPathTargetRemoved?: RegisterWebhookTargetOptions<T>[\"onLastPathTargetRemoved\"]; }): RegisteredWebhookTarget<T>;","entrypoint":"webhook-ingress","exportName":"registerWebhookTargetWithPluginRoute","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"844e417748d2413ce87c01b14fa8eed0332e1ae77fbc0053882fc3a0e89c687e","declaration":"export function registerWebhookTargetWithPluginRoute<T extends { path: string; }>(params: { targetsByPath: Map<string, T[]>; target: T; route: RegisterWebhookPluginRouteOptions; onLastPathTargetRemoved?: RegisterWebhookTargetOptions<T>[\"onLastPathTargetRemoved\"]; }): RegisteredWebhookTarget<T>;","entrypoint":"webhook-ingress","exportName":"registerWebhookTargetWithPluginRoute","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"ec2f47e9bd7a075a3dd4302ac9e4c0bfe20630445db6735cf803f2d354275841","declaration":"export function requestBodyErrorToText(code: RequestBodyLimitErrorCode): string;","entrypoint":"webhook-ingress","exportName":"requestBodyErrorToText","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"5e1f3b468d56eb0f82104184077fdf4b6bd0c1444aa10b71a65fcaa2ec0298a2","declaration":"export function resolveRequestClientIp(req?: IncomingMessage, trustedProxies?: string[], allowRealIpFallback?: boolean): string | undefined;","entrypoint":"webhook-ingress","exportName":"resolveRequestClientIp","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
{"closureHash":"56c3e9868dfa6ee2a7a128eb02039a16b52696759adadbd3fe0a3bd7a6a07eeb","declaration":"export function resolveSingleWebhookTarget<T>(targets: readonly T[], isMatch: (target: T) => boolean): WebhookTargetMatchResult<T>;","entrypoint":"webhook-ingress","exportName":"resolveSingleWebhookTarget","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"function","recordType":"export"}
@@ -4699,7 +4699,7 @@
{"closureHash":"efb74e84339c15d6f607b38d1d477b0504d47d04ae78e77083a1893c756a0b54","declaration":"export const WEBHOOK_RATE_LIMIT_DEFAULTS: Readonly<{ windowMs: 60000; maxRequests: 120; maxTrackedKeys: 4096;}>;","entrypoint":"webhook-ingress","exportName":"WEBHOOK_RATE_LIMIT_DEFAULTS","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"const","recordType":"export"}
{"closureHash":"13b28ec9acae43c3bdcd683b9831154f88118dee8142e42b7eebfd59f08c602c","declaration":"export type BoundedCounter = BoundedCounter;","entrypoint":"webhook-ingress","exportName":"BoundedCounter","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"type","recordType":"export"}
{"closureHash":"9e737ae8c17038ef7becbd2bf1b756cfeaed571e2ded368c0fe3a446ebd1f666","declaration":"export type FixedWindowRateLimiter = FixedWindowRateLimiter;","entrypoint":"webhook-ingress","exportName":"FixedWindowRateLimiter","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"type","recordType":"export"}
{"closureHash":"6c4d74ddcfebaa9ed020a15e5076553b08f68c1461af40bb01caca22eed9612a","declaration":"export type RegisterWebhookPluginRouteOptions = RegisterWebhookPluginRouteOptions;","entrypoint":"webhook-ingress","exportName":"RegisterWebhookPluginRouteOptions","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"type","recordType":"export"}
{"closureHash":"77120f64d0e4c0f52498e606f90ef9457df7dea318dc333acde75f826f331ffa","declaration":"export type RegisterWebhookPluginRouteOptions = RegisterWebhookPluginRouteOptions;","entrypoint":"webhook-ingress","exportName":"RegisterWebhookPluginRouteOptions","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"type","recordType":"export"}
{"closureHash":"b3e98619854462acfac6538ac9a2d0cefb88704a0eac712563f0996b07364152","declaration":"export type RegisterWebhookTargetOptions<T extends {\n path: string;\n}> = RegisterWebhookTargetOptions<T>;","entrypoint":"webhook-ingress","exportName":"RegisterWebhookTargetOptions","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"type","recordType":"export"}
{"closureHash":"964c2bfd8f268c411ee7b982c9de02c207f4bec402dd62c9f998a59752bb9d1f","declaration":"export type RegisteredWebhookTarget<T> = RegisteredWebhookTarget<T>;","entrypoint":"webhook-ingress","exportName":"RegisteredWebhookTarget","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"type","recordType":"export"}
{"closureHash":"aa552e5bdaefc9eb94d3b5a5cdf8c413fad555d9f452c6a2a6af5a3ce695c9d1","declaration":"export type WebhookAnomalyTracker = WebhookAnomalyTracker;","entrypoint":"webhook-ingress","exportName":"WebhookAnomalyTracker","importSpecifier":"openclaw/plugin-sdk/webhook-ingress","kind":"type","recordType":"export"}
@@ -15,7 +15,7 @@ export {
asToolParamsRecord,
jsonResult,
readNumberParam,
readStringParam,
readToolStringParam as readStringParam,
} from "../../../../src/agents/tools/common.js";
export type { AnyAgentTool } from "../../../../src/agents/tools/common.js";
export {
@@ -131,14 +131,6 @@
"src/plugins/loader-cache.ts"
]
},
{
"name": "clearRuntimeAuthProfileStoreSnapshots",
"files": [
"src/agents/auth-profiles/runtime-snapshots.ts",
"src/agents/auth-profiles/store.ts"
],
"sdk": true
},
{
"name": "clearSecretsRuntimeSnapshot",
"files": [
@@ -162,13 +154,6 @@
],
"sdk": true
},
{
"name": "compactEmbeddedAgentSessionDirect",
"files": [
"src/agents/embedded-agent-runner/compact.runtime.ts",
"src/agents/embedded-agent-runner/compact.ts"
]
},
{
"name": "containsConfigIncludeDirective",
"files": [
@@ -176,27 +161,6 @@
"src/plugins/install-persistence.ts"
]
},
{
"name": "countActiveDescendantRuns",
"files": [
"src/agents/subagents/registry/subagent-registry-read.ts",
"src/agents/subagents/registry/subagent-registry.ts"
]
},
{
"name": "countPendingDescendantRuns",
"files": [
"src/agents/subagents/registry/subagent-registry-announce-read.ts",
"src/agents/subagents/registry/subagent-registry.ts"
]
},
{
"name": "createCompactionDiagId",
"files": [
"src/agents/embedded-agent-runner/compaction-diagnostics.ts",
"src/agents/embedded-agent-runner/run/helpers.ts"
]
},
{
"name": "createFixedWindowRateLimiter",
"files": [
@@ -219,13 +183,6 @@
"src/plugins/logger.ts"
]
},
{
"name": "createSessionId",
"files": [
"src/agents/sessions/session-manager-id.ts",
"src/agents/tools/transcripts-tool-runtime.ts"
]
},
{
"name": "createSuiteTempRootTracker",
"files": [
@@ -312,14 +269,6 @@
"src/config/legacy.shared.ts"
]
},
{
"name": "extractAssistantText",
"files": [
"src/agents/embedded-agent-utils.ts",
"src/agents/tools/chat-history-text.ts"
],
"sdk": true
},
{
"name": "extractAssistantVisibleText",
"files": [
@@ -419,13 +368,6 @@
"src/test-utils/ports.ts"
]
},
{
"name": "getLatestSubagentRunByChildSessionKey",
"files": [
"src/agents/subagents/registry/subagent-registry-read.ts",
"src/agents/subagents/registry/subagent-registry.ts"
]
},
{
"name": "getReplyFromConfig",
"files": [
@@ -450,14 +392,6 @@
],
"sdk": true
},
{
"name": "hasUsableOAuthCredential",
"files": [
"src/agents/auth-profiles/credential-state.ts",
"src/agents/auth-profiles/oauth-shared.ts"
],
"sdk": true
},
{
"name": "inferToolMetaFromArgs",
"files": [
@@ -567,13 +501,6 @@
"src/daemon/test-helpers/schtasks-fixtures.ts"
]
},
{
"name": "listDescendantRunsForRequester",
"files": [
"src/agents/subagents/registry/subagent-registry-read.ts",
"src/agents/subagents/registry/subagent-registry.ts"
]
},
{
"name": "listManagedPluginNpmRoots",
"files": [
@@ -597,13 +524,6 @@
],
"sdk": true
},
{
"name": "listSubagentRunsForController",
"files": [
"src/agents/subagents/registry/subagent-registry-read.ts",
"src/agents/subagents/registry/subagent-registry.ts"
]
},
{
"name": "loadBundledPluginPublicSurface",
"files": [
@@ -754,13 +674,6 @@
"src/infra/state-migrations.session-store.ts"
]
},
{
"name": "normalizeContainerPath",
"files": [
"src/agents/sandbox/path-utils.ts",
"src/agents/sandbox/remote-fs-bridge-paths.ts"
]
},
{
"name": "normalizeCronRunDiagnostics",
"files": [
@@ -948,14 +861,6 @@
],
"sdk": true
},
{
"name": "readStringParam",
"files": [
"src/agents/tools/common.ts",
"src/agents/tools/transcripts-tool-runtime.ts"
],
"sdk": true
},
{
"name": "recordHookInstall",
"files": [
@@ -993,21 +898,6 @@
],
"sdk": true
},
{
"name": "replaceRuntimeAuthProfileStoreSnapshots",
"files": [
"src/agents/auth-profiles/runtime-snapshots.ts",
"src/agents/auth-profiles/store.ts"
],
"sdk": true
},
{
"name": "replaceSubagentRunAfterSteer",
"files": [
"src/agents/subagents/registry/subagent-registry-runtime.ts",
"src/agents/subagents/registry/subagent-registry.ts"
]
},
{
"name": "reportClawHubPluginInstallTelemetry",
"files": [
@@ -1037,13 +927,6 @@
],
"sdk": true
},
{
"name": "resolveAllowlistModelKey",
"files": [
"src/agents/model-selection-shared.ts",
"src/agents/model-selection.ts"
]
},
{
"name": "resolveApiKeyForProvider",
"files": [
@@ -1074,13 +957,6 @@
],
"sdk": true
},
{
"name": "resolveEffectiveOAuthCredential",
"files": [
"src/agents/auth-profiles/effective-oauth.ts",
"src/agents/auth-profiles/oauth-manager.ts"
]
},
{
"name": "resolveEffectivePluginActivationState",
"files": [
@@ -1138,13 +1014,6 @@
"src/cli/nodes-cli/rpc.ts"
]
},
{
"name": "resolveNodeClaudePlacement",
"files": [
"src/agents/cli-runner/execute-node-claude.ts",
"src/agents/cli-runner/prepare-claude.ts"
]
},
{
"name": "resolveNodeId",
"files": [
@@ -1355,14 +1224,6 @@
],
"sdk": true
},
{
"name": "truncateText",
"files": [
"src/agents/harness/native-hook-relay-utils.ts",
"src/agents/tools/web-fetch-utils.ts"
],
"sdk": true
},
{
"name": "updateNpmInstalledHookPacks",
"files": [
@@ -14,11 +14,6 @@
"wrapped": "src/agents/auth-profiles/runtime-snapshots.ts",
"wrapper": "src/agents/auth-profiles/store.ts"
},
{
"name": "clearRuntimeAuthProfileStoreSnapshots",
"wrapped": "src/agents/auth-profiles/runtime-snapshots.ts",
"wrapper": "src/agents/auth-profiles/store.ts"
},
{
"name": "clearSecretsRuntimeSnapshot",
"wrapped": "src/secrets/runtime-state.ts",
@@ -147,11 +142,6 @@
"wrapped": "src/plugins/config-normalization-shared.ts",
"wrapper": "src/plugins/config-state.ts"
},
{
"name": "hasUsableOAuthCredential",
"wrapped": "src/agents/auth-profiles/credential-state.ts",
"wrapper": "src/agents/auth-profiles/oauth-shared.ts"
},
{
"name": "isAllowedParsedChatSender",
"wrapped": "src/channels/plugins/chat-target-prefixes.ts",
@@ -208,11 +198,6 @@
"wrapped": "src/tts/tts-payload.ts",
"wrapper": "src/tts/tts.ts"
},
{
"name": "normalizeContainerPath",
"wrapped": "src/agents/sandbox/path-utils.ts",
"wrapper": "src/agents/sandbox/remote-fs-bridge-paths.ts"
},
{
"name": "normalizeCronRunDiagnostics",
"wrapped": "src/cron/run-diagnostics-normalize.ts",
@@ -259,32 +244,17 @@
"wrapper": "src/plugin-sdk/session-transcript-runtime.ts",
"via": "src/config/sessions/session-accessor.ts"
},
{
"name": "replaceRuntimeAuthProfileStoreSnapshots",
"wrapped": "src/agents/auth-profiles/runtime-snapshots.ts",
"wrapper": "src/agents/auth-profiles/store.ts"
},
{
"name": "resolveAllowedModelRef",
"wrapped": "src/agents/model-selection-resolve.ts",
"wrapper": "src/agents/model-selection.ts"
},
{
"name": "resolveAllowlistModelKey",
"wrapped": "src/agents/model-selection-shared.ts",
"wrapper": "src/agents/model-selection.ts"
},
{
"name": "resolveApiKeyForProvider",
"wrapped": "src/agents/model-auth-provider.ts",
"wrapper": "src/plugins/runtime/runtime-model-auth.runtime.ts",
"via": "src/agents/model-auth.ts"
},
{
"name": "resolveEffectiveOAuthCredential",
"wrapped": "src/agents/auth-profiles/oauth-manager.ts",
"wrapper": "src/agents/auth-profiles/effective-oauth.ts"
},
{
"name": "resolveHeartbeatPrompt",
"wrapped": "src/auto-reply/heartbeat.ts",
@@ -2,7 +2,7 @@
import type { AssistantMessage, Tool } from "openclaw/plugin-sdk/llm";
import { Type } from "typebox";
import { describe, expect, it } from "vitest";
import { extractAssistantText } from "./embedded-agent-utils.js";
import { extractEmbeddedAssistantText } from "./embedded-agent-utils.js";
import {
buildAssistantHistoryTurn,
buildStableCachePrefix,
@@ -80,7 +80,7 @@ async function runToolOnlyTurn(params: ToolOnlyTurnParams) {
let response = await completeToolOnlyTurn(params, prompt, "openai mcp-style tool-only turn");
let toolCall = extractFirstToolCall(response);
let text = extractAssistantText(response);
let text = extractEmbeddedAssistantText(response);
for (let attempt = 0; attempt < 2 && (!toolCall || text.length > 0); attempt += 1) {
prompt = `Return only a tool call for \`${MCP_TOOL.name}\` with {}. No text.`;
response = await completeToolOnlyTurn(
@@ -89,7 +89,7 @@ async function runToolOnlyTurn(params: ToolOnlyTurnParams) {
`openai mcp-style tool-only retry ${attempt + 1}`,
);
toolCall = extractFirstToolCall(response);
text = extractAssistantText(response);
text = extractEmbeddedAssistantText(response);
}
expect(text.length).toBe(0);
@@ -145,7 +145,7 @@ async function runOpenAiMcpStyleCacheProbe(params: {
`openai mcp-style cache probe ${params.suffix}`,
OPENAI_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
expect(text.toLowerCase()).toContain(params.suffix.toLowerCase());
return {
suffix: params.suffix,
@@ -17,7 +17,7 @@ const mocks = vi.hoisted(() => ({
let readExternalCliBootstrapCredential: typeof import("./auth-profiles/external-cli-sync.js").readExternalCliBootstrapCredential;
let resolveExternalCliAuthProfiles: typeof import("./auth-profiles/external-cli-sync.js").resolveExternalCliAuthProfiles;
let hasUsableOAuthCredential: typeof import("./auth-profiles/oauth-shared.js").hasUsableOAuthCredential;
let hasUsableOAuthCredential: typeof import("./auth-profiles/credential-state.js").hasUsableOAuthCredential;
let shouldBootstrapFromExternalCliCredential: typeof import("./auth-profiles/oauth-shared.js").shouldBootstrapFromExternalCliCredential;
let shouldReplaceStoredOAuthCredential: typeof import("./auth-profiles/oauth-shared.js").shouldReplaceStoredOAuthCredential;
let CLAUDE_CLI_PROFILE_ID: typeof import("./auth-profiles/constants.js").CLAUDE_CLI_PROFILE_ID;
@@ -119,11 +119,9 @@ describe("external cli oauth resolution", () => {
mocks.readMiniMaxCliCredentialsCached.mockReset().mockReturnValue(null);
({ readExternalCliBootstrapCredential, resolveExternalCliAuthProfiles } =
await import("./auth-profiles/external-cli-sync.js"));
({
hasUsableOAuthCredential,
shouldBootstrapFromExternalCliCredential,
shouldReplaceStoredOAuthCredential,
} = await import("./auth-profiles/oauth-shared.js"));
({ hasUsableOAuthCredential } = await import("./auth-profiles/credential-state.js"));
({ shouldBootstrapFromExternalCliCredential, shouldReplaceStoredOAuthCredential } =
await import("./auth-profiles/oauth-shared.js"));
({ CLAUDE_CLI_PROFILE_ID, OPENAI_CODEX_DEFAULT_PROFILE_ID, MINIMAX_CLI_PROFILE_ID } =
await import("./auth-profiles/constants.js"));
});
@@ -19,11 +19,8 @@ vi.mock("../plugins/provider-runtime.js", () => ({
resolveExternalAuthProfilesWithPlugins: () => [],
}));
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "./auth-profiles/store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./auth-profiles/runtime-snapshots.js";
import { ensureAuthProfileStore, saveAuthProfileStore } from "./auth-profiles/store.js";
import {
calculateAuthProfileCooldownMs,
markAuthProfileFailure,
+2 -2
View File
@@ -26,12 +26,12 @@ const {
} = await import("./auth-profiles/sqlite.js");
const {
captureAuthProfileStorePersistenceSnapshot,
clearRuntimeAuthProfileStoreSnapshots,
getRuntimeAuthProfileStoreSnapshot,
replaceRuntimeAuthProfileStoreSnapshots,
saveAuthProfileStore,
saveAuthProfileStoreIfPersistenceSnapshotMatches,
} = await import("./auth-profiles/store.js");
const { clearRuntimeAuthProfileStoreSnapshots, replaceRuntimeAuthProfileStoreSnapshots } =
await import("./auth-profiles/runtime-snapshots.js");
const { closeOpenClawAgentDatabasesForTest } = await import("../state/openclaw-agent-db.js");
const { closeOpenClawStateDatabaseForTest } = await import("../state/openclaw-state-db.js");
const tempDirs = useAutoCleanupTempDirTracker(afterEach);
@@ -21,16 +21,18 @@ import { resolveOpenClawStateSqlitePath } from "../state/openclaw-state-db.paths
import { withEnvAsync } from "../test-utils/env.js";
import { resolveAgentDir } from "./agent-scope.js";
import { loadPersistedAuthProfileStore } from "./auth-profiles/persisted.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
replaceRuntimeAuthProfileStoreSnapshots,
} from "./auth-profiles/runtime-snapshots.js";
import {
inspectPersistedAuthProfileStateRaw,
inspectPersistedAuthProfileStoreRaw,
resolveAuthProfileDatabasePath,
} from "./auth-profiles/sqlite.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
getRuntimeAuthProfileStoreSnapshotRevision,
replaceRuntimeAuthProfileStoreSnapshots,
saveAuthProfileStore,
} from "./auth-profiles/store.js";
import type { AuthProfileStore, OAuthCredential } from "./auth-profiles/types.js";
+4 -2
View File
@@ -58,7 +58,6 @@ export {
} from "./auth-profiles/portability.js";
export {
clearRuntimeAuthProfileStoreSnapshot,
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
ensureAuthProfileStoreWithoutExternalProfiles,
getPreparedRuntimeAuthProfileStoreSnapshot,
@@ -70,7 +69,6 @@ export {
loadAuthProfileStoreForSecretsRuntime,
loadAuthProfileStoreWithoutExternalProfiles,
loadAuthProfileStoreForRuntime,
replaceRuntimeAuthProfileStoreSnapshots,
loadAuthProfileStore,
saveAuthProfileStore,
findPersistedAuthProfileCredential,
@@ -78,6 +76,10 @@ export {
withEnvOnlyAuthProfileStore,
withAuthProfileStoreAgentDir,
} from "./auth-profiles/store.js";
export {
clearRuntimeAuthProfileStoreSnapshots,
replaceRuntimeAuthProfileStoreSnapshots,
} from "./auth-profiles/runtime-snapshots.js";
export type {
ApiKeyCredential,
AuthProfileBlockedReason,
+2 -2
View File
@@ -4,7 +4,7 @@
* bootstrap credentials to fill unusable local profile state.
*/
import { readExternalCliBootstrapCredential } from "./external-cli-sync.js";
import { resolveEffectiveOAuthCredential as resolveManagedOAuthCredential } from "./oauth-manager.js";
import { resolveEffectiveOAuthCredentialCore } from "./oauth-manager.js";
import type { AuthProfileStore, OAuthCredential } from "./types.js";
/** Resolves the effective OAuth credential, optionally reading external CLI bootstrap state. */
@@ -14,7 +14,7 @@ export function resolveEffectiveOAuthCredential(params: {
credential: OAuthCredential;
allowKeychainPrompt?: boolean;
}): OAuthCredential {
return resolveManagedOAuthCredential({
return resolveEffectiveOAuthCredentialCore({
store: params.store,
profileId: params.profileId,
credential: params.credential,
@@ -16,10 +16,10 @@ import {
OPENAI_CODEX_DEFAULT_PROFILE_ID,
} from "./constants.js";
import { log } from "./constants.js";
import { hasUsableOAuthCredential } from "./credential-state.js";
import { isSafeToCopyOAuthIdentity } from "./oauth-identity.js";
import {
areOAuthCredentialsEquivalent,
hasUsableOAuthCredential,
isSafeToAdoptBootstrapOAuthIdentity,
shouldBootstrapFromExternalCliCredential,
} from "./oauth-shared.js";
@@ -359,7 +359,7 @@ export function resolveExternalCliAuthProfiles(
if (
existingOAuth &&
!providerConfig.bootstrapOnly &&
hasUsableOAuthCredential(existingOAuth, now)
hasUsableOAuthCredential(existingOAuth, { now })
) {
// Profiles synced before identity capture carry no email; backfill the
// non-secret metadata once the CLI read proves it is the same login.
@@ -11,13 +11,12 @@ import { addEnvBackedAgentCredentials } from "../agent-auth-discovery-core.js";
import { overlayExternalAuthProfiles } from "./external-auth.js";
import { testing } from "./external-auth.test-support.js";
import { readExternalCliBootstrapCredential } from "./external-cli-sync.js";
import { registerRuntimeAuthProfileStoreMutationListener } from "./runtime-snapshots.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
getRuntimeAuthProfileStoreSnapshot,
registerRuntimeAuthProfileStoreMutationListener,
replaceRuntimeAuthProfileStoreSnapshots,
} from "./store.js";
} from "./runtime-snapshots.js";
import { ensureAuthProfileStore, getRuntimeAuthProfileStoreSnapshot } from "./store.js";
import type { AuthProfileStore, OAuthCredential } from "./types.js";
const resolveExternalAuthProfilesWithPluginsMock = vi.fn<
@@ -17,8 +17,8 @@ import {
isSafeToAdoptBootstrapOAuthIdentity,
isSafeToAdoptMainStoreOAuthIdentity,
} from "./oauth-shared.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./runtime-snapshots.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
ensureAuthProfileStoreWithoutExternalProfiles,
saveAuthProfileStore,
+3 -3
View File
@@ -11,6 +11,7 @@ import { redactSensitiveText } from "../../logging/redact.js";
import { KeyedAsyncQueue } from "../../plugin-sdk/keyed-async-queue.js";
import { asDateTimestampMs } from "../../shared/number-coercion.js";
import { OAUTH_REFRESH_CALL_TIMEOUT_MS, OAUTH_REFRESH_LOCK_OPTIONS, log } from "./constants.js";
import { hasUsableOAuthCredential } from "./credential-state.js";
import { shouldMirrorRefreshedOAuthCredential } from "./oauth-identity.js";
import { OAuthRefreshFailureError } from "./oauth-refresh-failure.js";
import {
@@ -20,7 +21,6 @@ import {
import {
areOAuthCredentialsEquivalent,
hasMatchingOAuthIdentity,
hasUsableOAuthCredential,
isSafeToAdoptBootstrapOAuthIdentity,
isSafeToAdoptMainStoreOAuthIdentity,
shouldBootstrapFromExternalCliCredential,
@@ -258,7 +258,7 @@ async function loadFreshStoredOAuthCredential(params: {
}
/** Select local OAuth unless a safe external bootstrap credential should win. */
export function resolveEffectiveOAuthCredential(params: {
export function resolveEffectiveOAuthCredentialCore(params: {
store: AuthProfileStore;
profileId: string;
credential: OAuthCredential;
@@ -712,7 +712,7 @@ export function createOAuthManager(adapter: OAuthManagerAdapter) {
agentDir: params.agentDir,
credential: params.credential,
}) ?? params.credential;
const effectiveCredential = resolveEffectiveOAuthCredential({
const effectiveCredential = resolveEffectiveOAuthCredentialCore({
store: params.store,
profileId: params.profileId,
credential: adoptedCredential,
@@ -21,11 +21,8 @@ import {
} from "./oauth-test-utils.js";
import { resolveApiKeyForProfile } from "./oauth.js";
import { resetOAuthRefreshQueuesForTest } from "./oauth.test-support.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "./store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./runtime-snapshots.js";
import { ensureAuthProfileStore, saveAuthProfileStore } from "./store.js";
const {
refreshProviderOAuthCredentialWithPluginMock,
+3 -11
View File
@@ -5,7 +5,7 @@
*/
import { asDateTimestampMs } from "../../shared/number-coercion.js";
import { cloneAuthProfileStore } from "./clone.js";
import { hasUsableOAuthCredential as hasUsableStoredOAuthCredential } from "./credential-state.js";
import { hasUsableOAuthCredential } from "./credential-state.js";
import {
isSafeToCopyOAuthIdentity,
normalizeAuthEmailToken,
@@ -73,14 +73,6 @@ export function shouldReplaceStoredOAuthCredential(
return !hasNewerStoredOAuthCredential(existing, incoming);
}
/** Returns true when an OAuth credential has a usable access token. */
export function hasUsableOAuthCredential(
credential: OAuthCredential | undefined,
now = Date.now(),
): boolean {
return hasUsableStoredOAuthCredential(credential, { now });
}
/** Returns true when an OAuth credential has account or email identity. */
export function hasOAuthIdentity(
credential: Pick<OAuthCredential, "accountId" | "email">,
@@ -155,10 +147,10 @@ export function shouldBootstrapFromExternalCliCredential(params: {
now?: number;
}): boolean {
const now = params.now ?? Date.now();
if (hasUsableOAuthCredential(params.existing, now)) {
if (hasUsableOAuthCredential(params.existing, { now })) {
return false;
}
return hasUsableOAuthCredential(params.imported, now);
return hasUsableOAuthCredential(params.imported, { now });
}
/** Overlays runtime external OAuth profiles on a cloned store. */
@@ -25,11 +25,8 @@ import {
} from "./oauth-test-utils.js";
import { resolveApiKeyForProfile } from "./oauth.js";
import { resetOAuthRefreshQueuesForTest } from "./oauth.test-support.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "./store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./runtime-snapshots.js";
import { ensureAuthProfileStore, saveAuthProfileStore } from "./store.js";
import type { AuthProfileStore } from "./types.js";
const {
@@ -19,11 +19,8 @@ import {
resolveApiKeyForProfileInTest,
resetOAuthProviderRuntimeMocks,
} from "./oauth-test-utils.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "./store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./runtime-snapshots.js";
import { ensureAuthProfileStore, saveAuthProfileStore } from "./store.js";
const {
refreshProviderOAuthCredentialWithPluginMock,
@@ -12,11 +12,8 @@ import { closeOpenClawAgentDatabasesForTest } from "../../state/openclaw-agent-d
import { captureEnv, setTestEnvValue } from "../../test-utils/env.js";
import { resolveApiKeyForProfile } from "./oauth.js";
import { loadPersistedAuthProfileStore } from "./persisted.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "./store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./runtime-snapshots.js";
import { ensureAuthProfileStore, saveAuthProfileStore } from "./store.js";
import type { AuthProfileStore } from "./types.js";
const { getOAuthApiKeyMock } = vi.hoisted(() => {
vi.resetModules();
@@ -24,11 +24,8 @@ import {
} from "./oauth-test-utils.js";
import { resolveApiKeyForProfile } from "./oauth.js";
import { resetOAuthRefreshQueuesForTest } from "./oauth.test-support.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "./store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./runtime-snapshots.js";
import { ensureAuthProfileStore, saveAuthProfileStore } from "./store.js";
import type { AuthProfileStore, OAuthCredential } from "./types.js";
const {
@@ -18,11 +18,8 @@ import {
createExpiredOauthStore,
readAuthProfileStoreForTest,
} from "./oauth-test-utils.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
saveAuthProfileStore,
} from "./store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./runtime-snapshots.js";
import { ensureAuthProfileStore, saveAuthProfileStore } from "./store.js";
import type { AuthProfileStore, OAuthCredential } from "./types.js";
let resolveApiKeyForProfile: typeof import("./oauth.js").resolveApiKeyForProfile;
let resolveApiKeyForProvider: typeof import("../model-auth.js").resolveApiKeyForProvider;
+1 -1
View File
@@ -10,10 +10,10 @@ import { coerceSecretRef } from "../../config/types.secrets.js";
import type { OpenClawAgentDatabase } from "../../state/openclaw-agent-db.js";
import { asBoolean } from "../../utils/boolean.js";
import { AUTH_STORE_VERSION, log } from "./constants.js";
import { hasUsableOAuthCredential } from "./credential-state.js";
import { isLegacyOAuthRef } from "./legacy-oauth-ref.js";
import {
hasOAuthIdentity,
hasUsableOAuthCredential,
isSafeToAdoptMainStoreOAuthIdentity,
normalizeAuthEmailToken,
normalizeAuthIdentityToken,
+2 -2
View File
@@ -28,20 +28,20 @@ import {
upsertAuthProfileWithLock,
} from "./profiles.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
getRuntimeAuthProfileStoreSnapshot as getInternalRuntimeAuthProfileStoreSnapshot,
getRuntimeAuthProfileStoreCredentialMutationToken,
getRuntimeAuthProfileStoreCredentialsRevision,
getRuntimeAuthProfileStoreStateMutationToken,
replaceRuntimeAuthProfileStoreSnapshots,
} from "./runtime-snapshots.js";
import { resolveAuthProfileDatabasePath, runAuthProfileWriteTransaction } from "./sqlite.js";
import {
captureAuthProfileStorePersistenceSnapshot,
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStoreWithoutExternalProfiles,
getRuntimeAuthProfileStoreSnapshot,
loadAuthProfileStoreForRuntime,
loadAuthProfileStoreWithoutExternalProfiles,
replaceRuntimeAuthProfileStoreSnapshots,
restoreAuthProfileStorePersistenceSnapshot,
saveAuthProfileStoreIfPersistenceSnapshotMatches,
saveAuthProfileStore,
@@ -293,7 +293,7 @@ export function hasAnyRuntimeAuthProfileStoreSource(agentDir?: string): boolean
/** Replaces all runtime auth profile snapshots with cloned entries. */
export function replaceRuntimeAuthProfileStoreSnapshots(
entries: Array<{ agentDir?: string; store: RuntimeAuthProfileStore }>,
entries: Array<{ agentDir?: string; store: AuthProfileStore }>,
): void {
const credentialsChanged = replaceChangesCredentials(entries);
const ownerChanged = replaceChangesOwner(entries);
+4 -16
View File
@@ -45,13 +45,13 @@ import {
} from "./persisted.js";
import {
clearRuntimeAuthProfileStoreSnapshot as clearRuntimeAuthProfileStoreSnapshotImpl,
clearRuntimeAuthProfileStoreSnapshots as clearRuntimeAuthProfileStoreSnapshotsImpl,
clearRuntimeAuthProfileStoreSnapshots,
getPreparedRuntimeAuthProfileStoreSnapshot as getPreparedRuntimeAuthProfileStoreSnapshotImpl,
getRuntimeAuthProfileStoreSnapshot as getRuntimeAuthProfileStoreSnapshotImpl,
getRuntimeAuthProfileStoreSnapshotRevision,
noteRuntimeAuthProfileStorePersistedMutation,
listRuntimeAuthProfileStoreSnapshots,
replaceRuntimeAuthProfileStoreSnapshots as replaceRuntimeAuthProfileStoreSnapshotsImpl,
replaceRuntimeAuthProfileStoreSnapshots,
setRuntimeAuthProfileStoreSnapshot,
} from "./runtime-snapshots.js";
import {
@@ -209,7 +209,7 @@ function publishRuntimeSnapshotsAfterCommit(publish: (() => void) | undefined):
}
return true;
} catch (err) {
clearRuntimeAuthProfileStoreSnapshotsImpl();
clearRuntimeAuthProfileStoreSnapshots();
log.warn("auth profile store committed but runtime snapshot publication failed", { err });
return false;
}
@@ -1322,18 +1322,6 @@ export function getPreparedRuntimeAuthProfileStoreSnapshot(
export { getRuntimeAuthProfileStoreSnapshotRevision };
/** Replace runtime auth-profile snapshots, used by tests and prepared runtimes. */
export function replaceRuntimeAuthProfileStoreSnapshots(
entries: Array<{ agentDir?: string; store: AuthProfileStore }>,
): void {
replaceRuntimeAuthProfileStoreSnapshotsImpl(entries);
}
/** Clear all runtime auth-profile snapshots. */
export function clearRuntimeAuthProfileStoreSnapshots(): void {
clearRuntimeAuthProfileStoreSnapshotsImpl();
}
/** Clear one runtime auth-profile snapshot. */
export function clearRuntimeAuthProfileStoreSnapshot(agentDir?: string): boolean {
return clearRuntimeAuthProfileStoreSnapshotImpl(agentDir);
@@ -1588,7 +1576,7 @@ function replaceRuntimeAuthProfileStoreSnapshot(
return;
}
const replacedAuthPath = resolveAuthStorePath(agentDir);
replaceRuntimeAuthProfileStoreSnapshotsImpl(
replaceRuntimeAuthProfileStoreSnapshots(
listRuntimeAuthProfileStoreSnapshots().filter(
(entry) => resolveAuthStorePath(entry.agentDir) !== replacedAuthPath,
),
+1 -1
View File
@@ -14,7 +14,7 @@ const NODE_CLI_MAX_IDLE_TIMEOUT_MS = 30 * 60 * 1000;
type NodeClaudePlacement = { nodeId: string; cwd?: string };
export function resolveNodeClaudePlacement(
export function resolveNodeClaudeTarget(
context: PreparedCliRunContext,
): NodeClaudePlacement | null {
const entry = context.params.sessionEntry;
+2 -2
View File
@@ -19,7 +19,7 @@ import type { CliEventHandlers } from "./execute-events.js";
import {
createCliAbortError,
executeNodeClaudeRun,
type resolveNodeClaudePlacement,
type resolveNodeClaudeTarget,
} from "./execute-node-claude.js";
import { appendCliOutputTail } from "./execute-output-buffer.js";
import type { CliToolTracking } from "./execute-tool-tracking.js";
@@ -66,7 +66,7 @@ export async function executeCliProcess(params: {
events: CliEventHandlers;
toolTracking: CliToolTracking;
diagnostics: ReturnType<typeof createClaudeCliModelCallDiagnostics>;
nodePlacement: ReturnType<typeof resolveNodeClaudePlacement>;
nodePlacement: ReturnType<typeof resolveNodeClaudeTarget>;
nodeSystemPrompt?: string;
nodeEnv?: Record<string, string>;
nodeClearEnv?: string[];
+2 -2
View File
@@ -38,7 +38,7 @@ import {
} from "./execute-logging.js";
import {
createCliAbortError,
resolveNodeClaudePlacement,
resolveNodeClaudeTarget,
stripGatewayLocalClaudeArgs,
} from "./execute-node-claude.js";
import { executeCliProcess } from "./execute-process.js";
@@ -138,7 +138,7 @@ export async function executePreparedCliRun(
throw createCliAbortError();
}
const backend = context.preparedBackend.backend;
const nodePlacement = resolveNodeClaudePlacement(context);
const nodePlacement = resolveNodeClaudeTarget(context);
const { sessionId: resolvedSessionId, isNew } = resolveSessionIdToSend({
backend,
cliSessionId: cliSessionIdToUse,
+1 -1
View File
@@ -15,7 +15,7 @@ export const CLAUDE_CLI_CONTEXT_MODEL_ALIASES: Record<string, string> = {
"fable-5": "claude-fable-5",
};
export function resolveNodeClaudePlacement(params: {
export function detectNodeClaudePlacement(params: {
backendId: string;
execHost?: string;
execNode?: string;
+2 -2
View File
@@ -131,7 +131,7 @@ import {
import { buildCliAgentSystemPrompt, isClaudeCliProvider, normalizeCliModel } from "./helpers.js";
import { cliBackendLog } from "./log.js";
import { buildCliMcpGrantContext, normalizeOptionalMcpContextValue } from "./mcp-grant-context.js";
import { CLAUDE_CLI_CONTEXT_MODEL_ALIASES, resolveNodeClaudePlacement } from "./prepare-claude.js";
import { CLAUDE_CLI_CONTEXT_MODEL_ALIASES, detectNodeClaudePlacement } from "./prepare-claude.js";
import {
buildCliSessionHistoryPrompt,
hasCliSessionTranscript,
@@ -517,7 +517,7 @@ export async function prepareCliRunContext(
};
}
const internalParams = params as RunCliAgentPrepareParams;
const nodeClaudePlacement = resolveNodeClaudePlacement({
const nodeClaudePlacement = detectNodeClaudePlacement({
backendId: backendResolved.id,
execHost: params.sessionEntry?.execHost,
execNode: params.sessionEntry?.execNode,
@@ -30,10 +30,8 @@ import { resetGeneratedMediaTaskActivityForTests } from "../../tasks/task-runtim
import { createSuiteTempRootTracker } from "../../test-helpers/temp-dir.js";
import { captureEnv, setTestEnvValue } from "../../test-utils/env.js";
import { createTestPreparedRunAdmission } from "../admitted-run-context.test-support.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
saveAuthProfileStore,
} from "../auth-profiles/store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "../auth-profiles/runtime-snapshots.js";
import { saveAuthProfileStore } from "../auth-profiles/store.js";
import { testing as cliBackendsTesting } from "../cli-backends.test-support.js";
import type { EmbeddedAgentRunResult } from "../embedded-agent.js";
import { FailoverError } from "../failover-error.js";
@@ -2,7 +2,7 @@
import type { Message, Model } from "openclaw/plugin-sdk/llm";
import { describe, expect, it, vi } from "vitest";
import { wrapStreamFnSanitizeMalformedToolCalls } from "./embedded-agent-runner/run/attempt.tool-call-normalization.js";
import { extractAssistantText } from "./embedded-agent-utils.js";
import { extractEmbeddedAssistantText } from "./embedded-agent-utils.js";
import { completeSimpleWithLiveTimeout, logLiveCache } from "./live-cache-test-support.js";
import { isLiveTestEnabled } from "./live-test-helpers.js";
import { buildAssistantMessage, buildUsageWithNoCost } from "./stream-message-shared.js";
@@ -100,7 +100,7 @@ describeLive("embedded agent anthropic replay sanitization (live)", () => {
ANTHROPIC_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
logLiveCache(`anthropic regular replay live result=${JSON.stringify(text)}`);
if (shouldSkipEmptyAnthropicReplayResult("regular replay", text)) {
return;
@@ -147,7 +147,7 @@ describeLive("embedded agent anthropic replay sanitization (live)", () => {
ANTHROPIC_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
logLiveCache(`anthropic omitted-reasoning replay live result=${JSON.stringify(text)}`);
if (shouldSkipEmptyAnthropicReplayResult("omitted reasoning replay", text)) {
return;
@@ -216,7 +216,7 @@ describeLive("embedded agent anthropic replay sanitization (live)", () => {
ANTHROPIC_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
logLiveCache(`anthropic replay live result=${JSON.stringify(text)}`);
expect(response.content.length).toBeGreaterThanOrEqual(0);
},
@@ -9,8 +9,8 @@ import type { OpenClawConfig } from "../config/config.js";
import { deleteTestEnvValue, setTestEnvValue } from "../test-utils/env.js";
import { createTestAdmittedRunContext } from "./admitted-run-context.test-support.js";
import { runEmbeddedAgent } from "./embedded-agent-runner.js";
import { compactEmbeddedAgentSessionDirect } from "./embedded-agent-runner/compact.runtime.js";
import { extractAssistantText } from "./embedded-agent-utils.js";
import { compactEmbeddedAgentSessionOnDemand } from "./embedded-agent-runner/compact.runtime.js";
import { extractEmbeddedAssistantText } from "./embedded-agent-utils.js";
import {
buildAssistantHistoryTurn as buildTypedAssistantHistoryTurn,
buildStableCachePrefix,
@@ -370,7 +370,7 @@ async function compactLiveCacheSession(params: {
const sessionPaths = buildRunnerSessionPaths(params.sessionId);
await fs.mkdir(sessionPaths.workspaceDir, { recursive: true });
return await withLiveCacheHeartbeat(
compactEmbeddedAgentSessionDirect({
compactEmbeddedAgentSessionOnDemand({
sessionId: params.sessionId,
sessionKey: `live-cache:${params.providerTag}:${params.sessionId}`,
sessionFile: sessionPaths.sessionFile,
@@ -449,7 +449,7 @@ async function runToolOnlyTurn(params: {
);
let toolCall = extractFirstToolCall(response);
let text = extractAssistantText(response);
let text = extractEmbeddedAssistantText(response);
for (let attempt = 0; attempt < 2 && (!toolCall || text.length > 0); attempt += 1) {
prompt = `Return only a tool call for \`${params.tool.name}\` with {}. No text.`;
response = await completeSimpleWithLiveTimeout(
@@ -477,7 +477,7 @@ async function runToolOnlyTurn(params: {
params.providerTag === "openai" ? OPENAI_TIMEOUT_MS : ANTHROPIC_TIMEOUT_MS,
);
toolCall = extractFirstToolCall(response);
text = extractAssistantText(response);
text = extractEmbeddedAssistantText(response);
}
expect(text.length).toBe(0);
@@ -542,7 +542,7 @@ async function runOpenAiToolCacheProbe(params: {
`openai cache probe ${params.suffix}`,
OPENAI_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
expect(text.toLowerCase()).toContain(params.suffix.toLowerCase());
return {
suffix: params.suffix,
@@ -580,7 +580,7 @@ async function runOpenAiCacheProbe(params: {
`openai cache probe ${params.suffix}`,
OPENAI_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
expect(text.toLowerCase()).toContain(params.suffix.toLowerCase());
return {
suffix: params.suffix,
@@ -621,7 +621,7 @@ async function runOpenAiImageCacheProbe(params: {
`openai image cache probe ${params.suffix}`,
OPENAI_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
expect(text.toLowerCase()).toContain(params.suffix.toLowerCase());
return {
suffix: params.suffix,
@@ -660,7 +660,7 @@ async function runAnthropicCacheProbe(params: {
`anthropic cache probe ${params.suffix} (${params.cacheRetention})`,
ANTHROPIC_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
expect(text.toLowerCase()).toContain(params.suffix.toLowerCase());
return {
suffix: params.suffix,
@@ -719,7 +719,7 @@ async function runAnthropicToolCacheProbe(params: {
`anthropic cache probe ${params.suffix} (${params.cacheRetention})`,
ANTHROPIC_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
expect(text.toLowerCase()).toContain(params.suffix.toLowerCase());
return {
suffix: params.suffix,
@@ -760,7 +760,7 @@ async function runAnthropicImageCacheProbe(params: {
`anthropic image cache probe ${params.suffix} (${params.cacheRetention})`,
ANTHROPIC_TIMEOUT_MS,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
expect(text.toLowerCase()).toContain(params.suffix.toLowerCase());
return {
suffix: params.suffix,
@@ -12,10 +12,9 @@ function loadCompactRuntime() {
}
/** Loads the compaction runtime on demand and forwards the direct compaction call. */
export async function compactEmbeddedAgentSessionDirect(
export async function compactEmbeddedAgentSessionOnDemand(
params: CompactEmbeddedAgentSessionRuntimeParams,
): Promise<EmbeddedAgentCompactResult> {
const { compactEmbeddedAgentSessionDirect: compactEmbeddedAgentSessionDirectLocal } =
await loadCompactRuntime();
return compactEmbeddedAgentSessionDirectLocal(params);
const { compactEmbeddedAgentSessionDirect } = await loadCompactRuntime();
return compactEmbeddedAgentSessionDirect(params);
}
@@ -11,7 +11,7 @@ import type { CompactionMessageMetrics } from "./compact.types.js";
export const hasRealConversationContent = isRealConversationMessage;
export function createCompactionDiagId(): string {
export function createDirectCompactionDiagId(): string {
return `cmp-${Date.now().toString(36)}-${generateSecureToken(4)}`;
}
@@ -35,7 +35,7 @@ import {
formatUnknownCompactionReasonDetail,
} from "./compact-reasons.js";
import type { CompactEmbeddedAgentSessionRuntimeParams } from "./compact.types.js";
import { createCompactionDiagId } from "./compaction-diagnostics.js";
import { createDirectCompactionDiagId } from "./compaction-diagnostics.js";
import { resolveEmbeddedCompactionThinkingLevel } from "./compaction-runtime-context.js";
import {
prepareCompactionHarnessAuth,
@@ -54,7 +54,7 @@ export async function prepareDirectCompactionAttempt(
params: PreparedCompactEmbeddedAgentSessionParams,
) {
const startedAt = Date.now();
const diagId = params.diagId?.trim() || createCompactionDiagId();
const diagId = params.diagId?.trim() || createDirectCompactionDiagId();
const trigger = params.trigger ?? "manual";
const attempt = params.attempt ?? 1;
const maxAttempts = params.maxAttempts ?? 1;
@@ -113,7 +113,7 @@ export function resolveEmbeddedAttemptBasePrompt(params: {
return scrubAnthropicRefusalMagic(params.prompt);
}
export function createCompactionDiagId(): string {
export function createRunRecoveryDiagId(): string {
return `ovf-${Date.now().toString(36)}-${generateSecureToken(4)}`;
}
@@ -25,7 +25,7 @@ import {
compactEmbeddedRunForRecovery,
type EmbeddedRunCompactionRecoveryInput,
} from "./compaction-runtime.js";
import { createCompactionDiagId } from "./helpers.js";
import { createRunRecoveryDiagId } from "./helpers.js";
import {
isNoRealConversationCompactionNoop,
resetNoRealConversationTokenSnapshot,
@@ -102,7 +102,7 @@ export async function recoverEmbeddedRunOverflow(
: undefined;
const runParams = input.runParams;
const overflowDiagId = createCompactionDiagId();
const overflowDiagId = createRunRecoveryDiagId();
const errorText = contextOverflowError.text;
const observedOverflowTokens = extractObservedOverflowTokenCount(errorText);
const preflightRecovery = input.attempt.preflightRecovery;
@@ -5,7 +5,7 @@ import {
compactEmbeddedRunForRecovery,
type EmbeddedRunCompactionRecoveryInput,
} from "./compaction-runtime.js";
import { createCompactionDiagId } from "./helpers.js";
import { createRunRecoveryDiagId } from "./helpers.js";
const MAX_TIMEOUT_COMPACTION_ATTEMPTS = 2;
@@ -50,7 +50,7 @@ export async function recoverEmbeddedRunTimeout(
return false;
}
const timeoutDiagId = createCompactionDiagId();
const timeoutDiagId = createRunRecoveryDiagId();
input.state.timeoutCompactionAttempts += 1;
log.warn(
`[timeout-compaction] LLM timed out with high prompt token usage (${Math.round(tokenUsedRatio * 100)}%); ` +
@@ -38,7 +38,7 @@ import { isPromiseLike } from "./embedded-agent-subscribe.promise.js";
import { appendRawStream } from "./embedded-agent-subscribe.raw-stream.js";
import { warnIfAssistantEmittedSuspiciousText } from "./embedded-agent-subscribe.tool-text-diagnostics.js";
import {
extractAssistantText,
extractEmbeddedAssistantText,
extractAssistantThinking,
extractAssistantCommentaryText,
extractAssistantVisibleText,
@@ -1292,7 +1292,7 @@ export function handleMessageEnd(
event: "assistant_message_end",
runId: ctx.params.runId,
sessionId: (ctx.params.session as { id?: string }).id,
rawText: coerceChatContentText(extractAssistantText(assistantMessage)),
rawText: coerceChatContentText(extractEmbeddedAssistantText(assistantMessage)),
rawThinking: extractAssistantThinking(assistantMessage),
});
const commentaryAlreadyStreamed =
@@ -1329,7 +1329,7 @@ export function handleMessageEnd(
}
promoteThinkingTagsToBlocks(assistantMessage);
const rawText = coerceChatContentText(extractAssistantText(assistantMessage));
const rawText = coerceChatContentText(extractEmbeddedAssistantText(assistantMessage));
const rawVisibleText = coerceChatContentText(extractAssistantVisibleText(assistantMessage));
appendRawStream({
ts: Date.now(),
@@ -88,7 +88,7 @@ describe("subscribeEmbeddedAgentSession", () => {
});
// With enforceFinalTag, content is emitted via streaming (text_delta path),
// NOT recovered from message_end fallback. extractAssistantText strips
// NOT recovered from message_end fallback. extractEmbeddedAssistantText strips
// <final> tags, so message_end would see plain text with no <final> markers
// and correctly suppress it (treated as reasoning leak).
emit({ type: "message_start", message: { role: "assistant" } });
+18 -18
View File
@@ -5,7 +5,7 @@
import type { AssistantMessage } from "openclaw/plugin-sdk/llm";
import { describe, expect, it } from "vitest";
import {
extractAssistantText,
extractEmbeddedAssistantText,
extractAssistantThinking,
extractAssistantVisibleText,
createThinkingTagStreamState,
@@ -112,7 +112,7 @@ describe("extractThinkingFromTaggedStream", () => {
});
});
describe("extractAssistantText", () => {
describe("extractEmbeddedAssistantText", () => {
it("strips tool-only Minimax invocation XML from text", () => {
const cases = [
`<invoke name="Bash">
@@ -130,7 +130,7 @@ describe("extractAssistantText", () => {
content: [{ type: "text", text }],
timestamp: Date.now(),
});
expect(extractAssistantText(msg)).toBe("");
expect(extractEmbeddedAssistantText(msg)).toBe("");
}
});
@@ -246,7 +246,7 @@ Back to the user.`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
expect(result).toBe(expected);
});
@@ -262,7 +262,7 @@ Back to the user.`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
expect(result).toBe(
`Example:\n<invoke name="Bash">\n<parameter name="command">ls</parameter>\n</invoke>`,
);
@@ -277,7 +277,7 @@ Back to the user.`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
expect(result).toBe("HTTP 500: Internal Server Error");
});
@@ -293,7 +293,7 @@ Back to the user.`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
expect(result).toBe(
"Firebase downgraded Chore Champ to the Spark plan; confirm whether billing should be re-enabled.",
);
@@ -309,7 +309,7 @@ Back to the user.`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
expect(result).toBe(responseText);
});
@@ -336,7 +336,7 @@ Back to the user.`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
expect(result).toBe("First block.\nThird block.");
});
@@ -366,7 +366,7 @@ File contents here`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
expect(result).toBe("Here's what I found:\nDone checking.");
});
@@ -382,7 +382,7 @@ File contents here`,
timestamp: Date.now(),
});
expect(extractAssistantText(msg)).toBe("Let me check.\n\n Done.");
expect(extractEmbeddedAssistantText(msg)).toBe("Let me check.\n\n Done.");
});
it("strips raw <tool_result> XML blocks from assistant text", () => {
@@ -397,7 +397,7 @@ File contents here`,
timestamp: Date.now(),
});
expect(extractAssistantText(msg)).toBe("Prefix\n\nSuffix");
expect(extractEmbeddedAssistantText(msg)).toBe("Prefix\n\nSuffix");
});
it("strips raw <function_response> workflow blocks from assistant text", () => {
@@ -419,7 +419,7 @@ File contents here`,
timestamp: Date.now(),
});
expect(extractAssistantText(msg)).toBe("Prefix\n\nSuffix");
expect(extractEmbeddedAssistantText(msg)).toBe("Prefix\n\nSuffix");
});
it("strips dangling <tool_call> XML content to end-of-string", () => {
@@ -434,7 +434,7 @@ File contents here`,
timestamp: Date.now(),
});
expect(extractAssistantText(msg)).toBe("Let me run.");
expect(extractEmbeddedAssistantText(msg)).toBe("Let me run.");
});
it("strips mixed <tool_call> and <tool_result> XML blocks from assistant text", () => {
@@ -454,7 +454,7 @@ File contents here`,
timestamp: Date.now(),
});
expect(extractAssistantText(msg)).toBe(
expect(extractEmbeddedAssistantText(msg)).toBe(
"I will read the file.\n\n\nThe file contains: hello world",
);
});
@@ -472,7 +472,7 @@ File contents here`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
// The mismatched closing tag should still exit the block, stripping the
// tool XML while preserving legitimate trailing prose.
expect(result).not.toContain("<tool_result>");
@@ -493,7 +493,7 @@ File contents here`,
timestamp: Date.now(),
});
const result = extractAssistantText(msg);
const result = extractEmbeddedAssistantText(msg);
// </tool_result> must NOT exit a <tool_call> block; the block should
// continue until the matching </tool_call>, preventing payload leaks.
expect(result).not.toContain("LEAK");
@@ -557,7 +557,7 @@ File contents here`,
content: [{ type: "text", text: testCase.text }],
timestamp: Date.now(),
});
expect(extractAssistantText(msg), testCase.name).toBe(testCase.expected);
expect(extractEmbeddedAssistantText(msg), testCase.name).toBe(testCase.expected);
}
});
});
+6 -5
View File
@@ -52,7 +52,7 @@ type AssistantTextExtractionResult = {
hadRequestedPhase: boolean;
};
function extractAssistantTextForPhase(
function extractEmbeddedAssistantTextForPhase(
msg: AssistantMessage,
phase?: AssistantPhase,
options?: { unphasedSignedFinalAnswer?: boolean },
@@ -124,21 +124,22 @@ function extractAssistantTextForPhase(
/** Extract text intended for users, preferring explicit final-answer phase blocks. */
export function extractAssistantVisibleText(msg: AssistantMessage): string {
const finalAnswerExtraction = extractAssistantTextForPhase(msg, "final_answer");
const finalAnswerExtraction = extractEmbeddedAssistantTextForPhase(msg, "final_answer");
if (finalAnswerExtraction.hadRequestedPhase) {
return finalAnswerExtraction.text.trim() ? finalAnswerExtraction.text : "";
}
return extractAssistantTextForPhase(msg, undefined, { unphasedSignedFinalAnswer: true }).text;
return extractEmbeddedAssistantTextForPhase(msg, undefined, { unphasedSignedFinalAnswer: true })
.text;
}
/** Extract the commentary/narration text of a commentary-phase assistant message. */
export function extractAssistantCommentaryText(msg: AssistantMessage): string {
return extractAssistantTextForPhase(msg, "commentary").text;
return extractEmbeddedAssistantTextForPhase(msg, "commentary").text;
}
/** Extract sanitized assistant text across all text content blocks. */
export function extractAssistantText(msg: AssistantMessage): string {
export function extractEmbeddedAssistantText(msg: AssistantMessage): string {
const extracted =
extractTextFromChatContent(msg.content, {
sanitizeText: (text) => sanitizeAssistantText(text),
@@ -36,7 +36,7 @@ import type {
NativeHookRelayProviderAdapter,
NativeHookRelayRegistration,
} from "./native-hook-relay-types.js";
import { readOptionalString, truncateText } from "./native-hook-relay-utils.js";
import { readOptionalString, truncateRelayText } from "./native-hook-relay-utils.js";
export type NativeHookRelayDeferredToolApprovalRequester = typeof requestDeferredPluginToolApproval;
@@ -282,7 +282,7 @@ function nativeHookRelayPermissionAllowAlwaysKey(params: {
function permissionRequestFallbackKey(request: NativeHookRelayPermissionApprovalRequest): string {
const command = readOptionalString(request.toolInput.command);
if (command) {
return `${request.toolName}:command:${truncateText(command, 240)}`;
return `${request.toolName}:command:${truncateRelayText(command, 240)}`;
}
return `${request.toolName}:keys:${permissionRequestToolInputKeyFingerprint(request.toolInput)}`;
}
@@ -482,11 +482,11 @@ async function requestNativeHookRelayPermissionApproval(
{ timeoutMs: timeoutMs + 10_000 },
{
pluginId: `openclaw-native-hook-relay-${request.provider}`,
title: truncateText(
title: truncateRelayText(
`${nativeHookRelayProviderDisplayName(request.provider)} permission request`,
MAX_APPROVAL_TITLE_LENGTH,
),
description: truncateText(
description: truncateRelayText(
formatPermissionApprovalDescription(request),
MAX_APPROVAL_DESCRIPTION_LENGTH,
),
@@ -592,7 +592,7 @@ function formatPermissionApprovalDescription(
function formatToolInputPreview(toolInput: Record<string, unknown>): string | undefined {
const command = readOptionalString(toolInput.command);
if (command) {
return `Command: ${truncateText(sanitizeApprovalText(command), 240)}`;
return `Command: ${truncateRelayText(sanitizeApprovalText(command), 240)}`;
}
const keys = Object.keys(toolInput).map(sanitizeApprovalText).filter(Boolean).toSorted();
if (!keys.length) {
@@ -212,6 +212,6 @@ function snapshotString(value: string, state: { remainingStringLength: number })
return `${prefix}...[truncated]`;
}
export function truncateText(value: string, maxLength: number): string {
export function truncateRelayText(value: string, maxLength: number): string {
return truncateWithMarker(value, maxLength, { marker: "...", reserve: 3, trimEnd: false });
}
+2 -4
View File
@@ -7,10 +7,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../config/types.openclaw.js";
import { withEnvAsync } from "../test-utils/env.js";
import { withOpenClawTestState } from "../test-utils/openclaw-test-state.js";
import {
clearRuntimeAuthProfileStoreSnapshots,
ensureAuthProfileStore,
} from "./auth-profiles/store.js";
import { clearRuntimeAuthProfileStoreSnapshots } from "./auth-profiles/runtime-snapshots.js";
import { ensureAuthProfileStore } from "./auth-profiles/store.js";
import type {
AuthProfileCredential,
AuthProfileStore,
+1 -1
View File
@@ -501,7 +501,7 @@ function resolveExactConfiguredProviderRef(
}
/** Normalize a configured allowlist entry into the canonical provider/model key. */
export function resolveAllowlistModelKey(
function resolveAllowlistModelKey(
params: {
cfg?: OpenClawConfig;
raw: string;
-10
View File
@@ -43,7 +43,6 @@ import {
inferUniqueProviderFromConfiguredModels,
normalizeModelSelection,
resolveBareModelDefaultProvider,
resolveAllowlistModelKey as resolveAllowlistModelKeyFromShared,
resolveConfiguredModelRef,
resolveHooksGmailModel,
resolveModelAliasFromPair,
@@ -210,15 +209,6 @@ export function normalizeStoredOverrideModel(params: {
};
}
export function resolveAllowlistModelKey(
raw: string,
defaultProvider: string,
cfg?: OpenClawConfig,
manifestPlugins?: ModelManifestNormalizationContext["manifestPlugins"],
): string | null {
return resolveAllowlistModelKeyFromShared({ cfg, raw, defaultProvider, manifestPlugins });
}
export async function canonicalizeCaseOnlyCatalogModelRef(params: {
raw: string | undefined;
cfg?: OpenClawConfig;
@@ -8,7 +8,7 @@ import { testing as externalAuthTesting } from "./auth-profiles/external-auth.te
import {
clearRuntimeAuthProfileStoreSnapshots,
replaceRuntimeAuthProfileStoreSnapshots,
} from "./auth-profiles/store.js";
} from "./auth-profiles/runtime-snapshots.js";
import { unsetEnv, withTempEnv } from "./models-config.e2e-harness.js";
import {
planOpenClawModelsJsonWithDeps,
@@ -102,7 +102,7 @@ installModelsConfigTestHooks();
let clearConfigCache: typeof import("../config/config.js").clearConfigCache;
let clearRuntimeConfigSnapshot: typeof import("../config/config.js").clearRuntimeConfigSnapshot;
let clearRuntimeAuthProfileStoreSnapshots: typeof import("./auth-profiles/store.js").clearRuntimeAuthProfileStoreSnapshots;
let clearRuntimeAuthProfileStoreSnapshots: typeof import("./auth-profiles/runtime-snapshots.js").clearRuntimeAuthProfileStoreSnapshots;
let ensureOpenClawModelsJson: typeof import("./models-config.js").ensureOpenClawModelsJson;
let resetModelsJsonReadyCacheForTest: typeof import("./models-config-state.test-support.js").resetModelsJsonReadyCacheForTest;
@@ -154,7 +154,8 @@ describe("models-config", () => {
beforeAll(async () => {
vi.resetModules();
({ clearConfigCache, clearRuntimeConfigSnapshot } = await import("../config/config.js"));
({ clearRuntimeAuthProfileStoreSnapshots } = await import("./auth-profiles/store.js"));
({ clearRuntimeAuthProfileStoreSnapshots } =
await import("./auth-profiles/runtime-snapshots.js"));
({ ensureOpenClawModelsJson } = await import("./models-config.js"));
({ resetModelsJsonReadyCacheForTest } = await import("./models-config-state.test-support.js"));
});
+5 -5
View File
@@ -21,7 +21,7 @@ import {
import { resolveDefaultAgentDir } from "./agent-scope.js";
import { externalCliDiscoveryForProviders } from "./auth-profiles/external-cli-discovery.js";
import { ensureCustomApiRegistered } from "./custom-api-registry.js";
import { extractAssistantText } from "./embedded-agent-utils.js";
import { extractEmbeddedAssistantText } from "./embedded-agent-utils.js";
import { isRateLimitErrorMessage } from "./failover/classify.js";
import { collectProviderApiKeys } from "./live-auth-keys.js";
import { isModelNotFoundErrorMessage } from "./live-model-errors.js";
@@ -1597,7 +1597,7 @@ async function runDeepSeekV4ReplayRegression(params: {
if (second.stopReason === "error") {
throw new Error(second.errorMessage || "DeepSeek V4 replay followup returned error");
}
expect(extractAssistantText(second).length).toBeGreaterThan(0);
expect(extractEmbeddedAssistantText(second).length).toBeGreaterThan(0);
}
async function runExtraTurnProbes(params: {
@@ -1627,7 +1627,7 @@ async function runExtraTurnProbes(params: {
if (file.stopReason === "error") {
throw new Error(file.errorMessage || "file-read probe returned error with no message");
}
let fileText = extractAssistantText(file);
let fileText = extractEmbeddedAssistantText(file);
if (!fileProbeTextMatches(fileText)) {
logProgress(`${params.progressLabel}: file-read probe retry`);
const retry = await completeSimpleWithTimeout(
@@ -1644,7 +1644,7 @@ async function runExtraTurnProbes(params: {
retry.errorMessage || "file-read probe retry returned error with no message",
);
}
fileText = extractAssistantText(retry);
fileText = extractEmbeddedAssistantText(retry);
}
if (!fileProbeTextMatches(fileText)) {
if (fileText.length === 0) {
@@ -1689,7 +1689,7 @@ async function runExtraTurnProbes(params: {
: `${attemptLabel} returned error with no message`;
throw new Error(image.errorMessage || fallback);
}
return extractAssistantText(image);
return extractEmbeddedAssistantText(image);
},
onRetry: (firstText) => {
const reason = firstText.length === 0 ? "was empty" : "did not return ok";
@@ -16,10 +16,8 @@ import {
setSessionsSpawnConfigOverride,
waitForSessionsSpawnEvent,
} from "./openclaw-tools.subagents.sessions-spawn.test-harness.js";
import {
getLatestSubagentRunByChildSessionKey,
resetSubagentRegistryForTests,
} from "./subagents/registry/subagent-registry.test-helpers.js";
import { getLatestSubagentRunByChildSessionKey } from "./subagents/registry/subagent-registry-read.js";
import { resetSubagentRegistryForTests } from "./subagents/registry/subagent-registry.test-helpers.js";
const fastModeEnv = vi.hoisted(() => {
const previous = process.env.OPENCLAW_TEST_FAST;
+1 -1
View File
@@ -1,6 +1,6 @@
import type { OpenClawConfig } from "../config/types.openclaw.js";
import { getLatestSubagentRunByChildSessionKey } from "./subagents/registry/subagent-registry-read.js";
import {
getLatestSubagentRunByChildSessionKey,
getSubagentRunByRunId,
recordSwarmStructuredOutput,
} from "./subagents/registry/subagent-registry.js";
+2 -2
View File
@@ -34,7 +34,7 @@ import {
normalizeProviderStarted,
type AgentRunTimeoutPhase,
} from "./run-timeout-attribution.js";
import { extractAssistantText, stripToolMessages } from "./tools/chat-history-text.js";
import { extractStoredAssistantText, stripToolMessages } from "./tools/chat-history-text.js";
type GatewayCaller = typeof callGateway;
@@ -197,7 +197,7 @@ function isWaitedReplyTurnBoundary(message: unknown): boolean {
}
function snapshotAssistantReply(message: unknown): AssistantReplySnapshot | undefined {
const text = extractAssistantText(message);
const text = extractStoredAssistantText(message);
if (!text?.trim()) {
return undefined;
}
+3 -3
View File
@@ -10,7 +10,7 @@ import type { OutboundMediaReadFile } from "../media/load-options.js";
import { resolveMediaReferenceSandboxPath } from "../media/media-reference.js";
import { assertSandboxPath } from "./sandbox-paths.js";
import type { SandboxFsBridge, SandboxResolvedPath } from "./sandbox/fs-bridge.js";
import { isPathInsideContainerRoot, normalizeContainerPath } from "./sandbox/path-utils.js";
import { isPathInsideContainerRoot, normalizeContainerPathCore } from "./sandbox/path-utils.js";
export type SandboxedBridgeMediaPathConfig = {
root: string;
@@ -70,8 +70,8 @@ export async function resolveSandboxedBridgeMediaPath(params: {
});
if (
!isPathInsideContainerRoot(
normalizeContainerPath(workspaceRoot.containerPath),
normalizeContainerPath(resolved.containerPath),
normalizeContainerPathCore(workspaceRoot.containerPath),
normalizeContainerPathCore(resolved.containerPath),
)
) {
throw new Error(`Sandbox path escapes workspace root: ${resolved.containerPath}`);
+6 -6
View File
@@ -11,7 +11,7 @@ import { openRootFile, type RootFileOpenResult } from "./fs-bridge-path-safety.r
import type { SandboxResolvedFsPath, SandboxFsMount } from "./fs-paths.js";
import {
isPathInsideContainerRoot,
normalizeContainerPath,
normalizeContainerPathCore,
relativePathEscapesContainerRoot,
} from "./path-utils.js";
@@ -189,7 +189,7 @@ export class SandboxFsPathGuard {
if (!basename || basename === "." || basename === "/") {
throw new Error(`Invalid sandbox entry target: ${target.containerPath}`);
}
const parentPath = normalizeContainerPath(path.posix.dirname(target.containerPath));
const parentPath = normalizeContainerPathCore(path.posix.dirname(target.containerPath));
const mount = this.resolveRequiredMount(parentPath, action);
return this.finalizePinnedEntry({
mount,
@@ -208,7 +208,7 @@ export class SandboxFsPathGuard {
if (!basename || basename === "." || basename === "/") {
throw new Error(`Invalid sandbox entry target: ${target.containerPath}`);
}
const parentPath = normalizeContainerPath(path.posix.dirname(target.containerPath));
const parentPath = normalizeContainerPathCore(path.posix.dirname(target.containerPath));
const canonicalParentPath = await this.resolveCanonicalContainerPath({
containerPath: parentPath,
allowFinalSymlinkForUnlink: false,
@@ -262,9 +262,9 @@ export class SandboxFsPathGuard {
}
private resolveMountByContainerPath(containerPath: string): SandboxFsMount | null {
const normalized = normalizeContainerPath(containerPath);
const normalized = normalizeContainerPathCore(containerPath);
for (const mount of this.mountsByContainer) {
if (isPathInsideContainerRoot(normalizeContainerPath(mount.containerRoot), normalized)) {
if (isPathInsideContainerRoot(normalizeContainerPathCore(mount.containerRoot), normalized)) {
return mount;
}
}
@@ -301,6 +301,6 @@ export class SandboxFsPathGuard {
if (!canonical.startsWith("/")) {
throw new Error(`Failed to resolve canonical sandbox path: ${params.containerPath}`);
}
return normalizeContainerPath(canonical);
return normalizeContainerPathCore(canonical);
}
}
+10 -8
View File
@@ -16,7 +16,7 @@ import { SANDBOX_AGENT_WORKSPACE_MOUNT } from "./constants.js";
import { resolveSandboxHostPathViaExistingAncestor } from "./host-paths.js";
import {
isPathInsideContainerRoot,
normalizeContainerPath,
normalizeContainerPathCore,
relativePathEscapesContainerRoot,
} from "./path-utils.js";
import {
@@ -65,7 +65,7 @@ function parseSandboxBindMount(spec: string): ParsedBindMount | null {
const writable = !optionParts.includes("ro");
return {
hostRoot: path.resolve(hostToken),
containerRoot: normalizeContainerPath(containerToken),
containerRoot: normalizeContainerPathCore(containerToken),
writable,
};
}
@@ -74,7 +74,7 @@ export function buildSandboxFsMounts(sandbox: SandboxFsBridgeContext): SandboxFs
const mounts: SandboxFsMount[] = [
{
hostRoot: path.resolve(sandbox.workspaceDir),
containerRoot: normalizeContainerPath(sandbox.containerWorkdir),
containerRoot: normalizeContainerPathCore(sandbox.containerWorkdir),
writable: sandbox.workspaceAccess === "rw",
source: "workspace",
},
@@ -103,7 +103,7 @@ export function buildSandboxFsMounts(sandbox: SandboxFsBridgeContext): SandboxFs
for (const mount of protectedSkillMounts) {
mounts.push({
hostRoot: path.resolve(mount.hostPath),
containerRoot: normalizeContainerPath(mount.containerPath),
containerRoot: normalizeContainerPathCore(mount.containerPath),
writable: false,
source: "protectedSkill",
});
@@ -296,13 +296,15 @@ function resolveRelativeContainerCandidate(params: {
const containerCwd = relPosix
? path.posix.join(cwdMount.containerRoot, relPosix)
: cwdMount.containerRoot;
return normalizeContainerPath(path.posix.resolve(containerCwd, params.inputPosix));
return normalizeContainerPathCore(path.posix.resolve(containerCwd, params.inputPosix));
}
const cwdPosix = normalizePosixInput(params.cwd);
if (path.posix.isAbsolute(cwdPosix)) {
return normalizeContainerPath(path.posix.resolve(cwdPosix, params.inputPosix));
return normalizeContainerPathCore(path.posix.resolve(cwdPosix, params.inputPosix));
}
return normalizeContainerPath(path.posix.resolve(params.defaultContainerRoot, params.inputPosix));
return normalizeContainerPathCore(
path.posix.resolve(params.defaultContainerRoot, params.inputPosix),
);
}
function formatSandboxRootEscapeMessage(params: {
@@ -310,7 +312,7 @@ function formatSandboxRootEscapeMessage(params: {
defaultWorkspaceRoot: string;
defaultContainerRoot: string;
}): string {
const containerRoot = normalizeContainerPath(params.defaultContainerRoot);
const containerRoot = normalizeContainerPathCore(params.defaultContainerRoot);
const workspaceRoot = shortenHomePath(path.resolve(params.defaultWorkspaceRoot));
return `Path escapes sandbox root (${workspaceRoot}; container root ${containerRoot}): ${params.input}. Use a path under ${containerRoot}/ instead.`;
}
+3 -3
View File
@@ -6,15 +6,15 @@
import path from "node:path";
/** Normalizes a container path and treats "." as the container root. */
export function normalizeContainerPath(value: string): string {
export function normalizeContainerPathCore(value: string): string {
const normalized = path.posix.normalize(value);
return normalized === "." ? "/" : normalized;
}
/** Returns whether target is lexically inside root after container-path normalization. */
export function isPathInsideContainerRoot(root: string, target: string): boolean {
const normalizedRoot = normalizeContainerPath(root);
const normalizedTarget = normalizeContainerPath(target);
const normalizedRoot = normalizeContainerPathCore(root);
const normalizedTarget = normalizeContainerPathCore(target);
if (normalizedRoot === "/") {
return true;
}
+2 -2
View File
@@ -1,6 +1,6 @@
/** Pure mount and path helpers for the remote sandbox filesystem bridge. */
import path from "node:path";
import { normalizeContainerPath as normalizeSandboxContainerPath } from "./path-utils.js";
import { normalizeContainerPathCore } from "./path-utils.js";
import {
isExistingWorkspaceSkillMountSource,
resolveMaterializedSandboxSkillsWorkspaceDir,
@@ -132,7 +132,7 @@ function mountPriority(mount: RemoteMountInfo): number {
}
export function normalizeContainerPath(value: string): string {
const normalized = normalizeSandboxContainerPath(value.trim() || "/");
const normalized = normalizeContainerPathCore(value.trim() || "/");
return normalized.startsWith("/") ? normalized : `/${normalized}`;
}
+2 -2
View File
@@ -9,7 +9,7 @@ import { isPathInside } from "../../infra/path-guards.js";
import { splitSandboxBindSpec } from "./bind-spec.js";
import { SANDBOX_AGENT_WORKSPACE_MOUNT } from "./constants.js";
import { resolveSandboxHostPathViaExistingAncestor } from "./host-paths.js";
import { normalizeContainerPath } from "./path-utils.js";
import { normalizeContainerPathCore } from "./path-utils.js";
import type { SandboxWorkspaceAccess } from "./types.js";
export const SANDBOX_MOUNT_FORMAT_VERSION = 3;
@@ -39,7 +39,7 @@ function containerJoin(root: string, ...parts: string[]): string {
}
function normalizeMountContainerPath(containerPath: string): string {
return normalizeContainerPath(containerPath).replace(/\/+$/, "") || "/";
return normalizeContainerPathCore(containerPath).replace(/\/+$/, "") || "/";
}
/** Hidden workspace used to materialize non-workspace skills for rw sandboxes. */
@@ -9,7 +9,7 @@ import { projectCanonicalSessionEntryShape } from "../../config/sessions/store-e
import { CURRENT_SESSION_VERSION } from "../../config/sessions/version.js";
import { parseOpaqueLeafEntry, parseParentLinkedOpaqueEntry } from "./session-manager-codec.js";
import { SessionManagerEntries } from "./session-manager-entries.js";
import { createSessionId, generateSessionEntryId } from "./session-manager-id.js";
import { createManagedSessionId, generateSessionEntryId } from "./session-manager-id.js";
import type {
LabelEntry,
PreservedOpaqueFileEntry,
@@ -108,7 +108,7 @@ export class SessionManagerBranching extends SessionManagerEntries {
throw new Error(`Entry ${leafId} not found`);
}
const newSessionId = createSessionId();
const newSessionId = createManagedSessionId();
const timestamp = new Date().toISOString();
const persistenceTarget = this.persistenceTarget;
+3 -3
View File
@@ -12,7 +12,7 @@ import {
parseParentLinkedOpaqueEntry,
partitionSessionFileEntries,
} from "./session-manager-codec.js";
import { createSessionId, generateSessionEntryId } from "./session-manager-id.js";
import { createManagedSessionId, generateSessionEntryId } from "./session-manager-id.js";
import type {
FileEntry,
NewSessionOptions,
@@ -91,7 +91,7 @@ export class SessionManagerCore {
this.persistenceTarget = target ? { ...target } : undefined;
this.fileEntries = partitioned.fileEntries;
this.opaqueFileEntries = partitioned.opaqueEntries;
this.sessionId = header?.id ?? target?.sessionId ?? createSessionId();
this.sessionId = header?.id ?? target?.sessionId ?? createManagedSessionId();
this.migrated = migrateToCurrentVersion(
this.fileEntries,
partitioned.fileEntriesByOriginalIndex,
@@ -115,7 +115,7 @@ export class SessionManagerCore {
}
private initializeSession(options?: NewSessionOptions): string | undefined {
this.sessionId = options?.id ?? this.persistenceTarget?.sessionId ?? createSessionId();
this.sessionId = options?.id ?? this.persistenceTarget?.sessionId ?? createManagedSessionId();
this.migrated = false;
const timestamp = new Date().toISOString();
const header: SessionHeader = {
+1 -1
View File
@@ -1,7 +1,7 @@
import { randomUUID } from "node:crypto";
import { uuidv7 } from "../runtime/index.js";
export function createSessionId(): string {
export function createManagedSessionId(): string {
return uuidv7();
}
@@ -12,7 +12,7 @@ import { isFastTestRuntimeEnv } from "../../../infra/env.js";
import { formatDurationCompact } from "../../../infra/format-time/format-duration.js";
import { buildAgentRunTerminalOutcomeFromWaitResult } from "../../agent-run-terminal-outcome.js";
import { wrapPromptDataBlock } from "../../sanitize-for-prompt.js";
import { extractAssistantText, sanitizeTextContent } from "../../tools/chat-history-text.js";
import { extractStoredAssistantText, sanitizeTextContent } from "../../tools/chat-history-text.js";
import {
isAnnounceSkip,
selectDeliverableSessionsReply,
@@ -130,7 +130,7 @@ function extractSubagentAssistantText(message: unknown): string {
if (typeof content === "string") {
return sanitizeTextContent(content);
}
return extractAssistantText(message) ?? "";
return extractStoredAssistantText(message) ?? "";
}
function countAssistantToolCalls(message: unknown): number {
@@ -40,7 +40,7 @@ import {
SUBAGENT_ENDED_REASON_COMPLETE,
SUBAGENT_ENDED_REASON_KILLED,
} from "./subagent-lifecycle-events.js";
import { replaceSubagentRunAfterSteer } from "./subagent-registry.js";
import { replaceSubagentRunAfterSteerCore } from "./subagent-registry.js";
import {
testing as subagentRegistryTesting,
addSubagentRunForTests,
@@ -2011,7 +2011,7 @@ describe("killControlledSubagentRun", () => {
onInterrupt: () => undefined,
});
expect(
replaceSubagentRunAfterSteer({
replaceSubagentRunAfterSteerCore({
previousRunId: source.runId,
nextRunId: recoveryRunId,
expected: source,
@@ -2485,7 +2485,7 @@ describe("steerControlledSubagentRun", () => {
addSubagentRunForTests(entry);
const replaceSpy = vi
.spyOn(await import("./subagent-registry.js"), "replaceSubagentRunAfterSteer")
.spyOn(await import("./subagent-registry.js"), "replaceSubagentRunAfterSteerCore")
.mockReturnValue(false);
const callGatewayImplementation: GatewayCaller = async <T = Record<string, unknown>>(
@@ -41,6 +41,7 @@ import { resolveStoredSubagentCapabilities } from "../spawn/subagent-capabilitie
import { terminateAcceptedCollectorRun } from "../spawn/subagent-spawn-cleanup.js";
import { SUBAGENT_ENDED_REASON_KILLED } from "./subagent-lifecycle-events.js";
import { resolveSessionEntryForKey } from "./subagent-list.js";
import { countPendingDescendantRuns } from "./subagent-registry-announce-read.js";
import {
resolveFinalizedSubagentTaskState,
resolveKilledSubagentTaskEndedAt,
@@ -55,11 +56,10 @@ import { getSubagentRunsSnapshotForRead } from "./subagent-registry-state.js";
import {
claimSubagentRunKill,
clearSubagentRunSteerRestart,
countPendingDescendantRuns,
markSubagentRunTerminated,
markSubagentRunForSteerRestart,
releaseSubagentRunKillClaim,
replaceSubagentRunAfterSteer,
replaceSubagentRunAfterSteerCore,
} from "./subagent-registry.js";
import type { SubagentRunRecord } from "./subagent-registry.types.js";
@@ -1187,7 +1187,7 @@ export async function steerControlledSubagentRun(params: {
};
}
const replaced = replaceSubagentRunAfterSteer({
const replaced = replaceSubagentRunAfterSteerCore({
previousRunId: params.entry.runId,
nextRunId: runId,
fallback: currentEntry,
@@ -7,13 +7,9 @@ import type { SubagentRegistryDeps } from "./subagent-registry-deps.js";
import type { createSubagentRegistryLifecycleController } from "./subagent-registry-lifecycle.js";
import { getSubagentRunsForChildSession } from "./subagent-registry-memory.js";
import {
countActiveDescendantRunsFromRuns,
countActiveRunsForSessionFromRuns,
countPendingDescendantRunsFromRuns,
getLatestSubagentRunByChildSessionKeyFromRuns,
getSubagentRunByChildSessionKeyFromRuns,
listDescendantRunsForRequesterFromRuns,
listRunsForControllerFromRuns,
} from "./subagent-registry-queries.js";
import { markRequesterTurnYieldedInRuns } from "./subagent-registry-requester-yield.js";
import type { SubagentRunRecord, SwarmStructuredOutputState } from "./subagent-registry.types.js";
@@ -87,13 +83,6 @@ export function createSubagentRegistryPublicApi(config: {
return updated;
}
function listSubagentRunsForController(controllerSessionKey: string): SubagentRunRecord[] {
return listRunsForControllerFromRuns(
deps().getSubagentRunsSnapshotForController(runs, controllerSessionKey),
controllerSessionKey,
);
}
function getSubagentRunByRunId(runId: string): SubagentRunRecord | undefined {
return findRunById(readRuns(), runId.trim());
}
@@ -197,18 +186,6 @@ export function createSubagentRegistryPublicApi(config: {
return countActiveRunsForSessionFromRuns(readRuns(), requesterSessionKey, options);
}
function countActiveDescendantRuns(rootSessionKey: string): number {
return countActiveDescendantRunsFromRuns(readRuns(), rootSessionKey);
}
function countPendingDescendantRuns(rootSessionKey: string): number {
return countPendingDescendantRunsFromRuns(readRuns(), rootSessionKey);
}
function listDescendantRunsForRequester(rootSessionKey: string): SubagentRunRecord[] {
return listDescendantRunsForRequesterFromRuns(readRuns(), rootSessionKey);
}
function getSubagentRunByChildSessionKey(childSessionKey: string): SubagentRunRecord | null {
return getSubagentRunByChildSessionKeyFromRuns(
deps().getSubagentRunsSnapshotForChildSession(runs, childSessionKey),
@@ -216,17 +193,6 @@ export function createSubagentRegistryPublicApi(config: {
);
}
function getLatestSubagentRunByChildSessionKey(
childSessionKey: string,
): SubagentRunRecord | null {
return (
getLatestSubagentRunByChildSessionKeyFromRuns(
deps().getSubagentRunsSnapshotForChildSession(runs, childSessionKey),
childSessionKey,
) ?? null
);
}
/** Records sessions_yield before the active requester run is aborted. */
function markRequesterTurnYielded(params: {
requesterSessionKey: string;
@@ -244,7 +210,6 @@ export function createSubagentRegistryPublicApi(config: {
leasePendingAgentSteeringItems,
ackPendingAgentSteeringItems,
releasePendingAgentSteeringItems,
listSubagentRunsForController,
getSubagentRunByRunId,
getSubagentRunsByRunIds,
completeCollectorLaunchCleanup,
@@ -252,11 +217,7 @@ export function createSubagentRegistryPublicApi(config: {
listSwarmRunsForGroup,
getSwarmRunByLaunchReplayKey,
countActiveRunsForSession,
countActiveDescendantRuns,
countPendingDescendantRuns,
listDescendantRunsForRequester,
getSubagentRunByChildSessionKey,
getLatestSubagentRunByChildSessionKey,
settleRequesterAfterSessionSpawns: settleRequesterTurn,
markRequesterTurnYielded,
};
@@ -13,7 +13,7 @@ export {
} from "./subagent-registry-announce-read.js";
export async function replaceSubagentRunAfterSteer(
params: Parameters<typeof import("./subagent-registry.js").replaceSubagentRunAfterSteer>[0],
params: Parameters<typeof import("./subagent-registry.js").replaceSubagentRunAfterSteerCore>[0],
) {
return (await import("./subagent-registry.js")).replaceSubagentRunAfterSteer(params);
return (await import("./subagent-registry.js")).replaceSubagentRunAfterSteerCore(params);
}
@@ -962,7 +962,7 @@ describe("subagent registry archive behavior", () => {
cleanup: "keep",
});
const replaced = mod.replaceSubagentRunAfterSteer({
const replaced = mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-old",
nextRunId: "run-new",
});
@@ -991,7 +991,7 @@ describe("subagent registry archive behavior", () => {
await vi.advanceTimersByTimeAsync(5_000);
const replaced = mod.replaceSubagentRunAfterSteer({
const replaced = mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-delete-old",
nextRunId: "run-delete-new",
});
@@ -1022,7 +1022,7 @@ describe("subagent registry archive behavior", () => {
attachmentsDir,
});
const replaced = mod.replaceSubagentRunAfterSteer({
const replaced = mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-delete-attachments-old",
nextRunId: "run-delete-attachments-new",
});
@@ -9,6 +9,7 @@ import {
testing as settleWakeTesting,
} from "../announce/subagent-announce.requester-settle-wake.js";
import * as announceRead from "./subagent-registry-announce-read.js";
import * as registryRead from "./subagent-registry-read.js";
import * as mod from "./subagent-registry.test-helpers.js";
const noop = () => {};
@@ -129,14 +130,14 @@ vi.mock("../spawn/subagent-depth.js", () => ({
const loadSubagentRegistryRuntimeForTest = async () =>
({
countActiveDescendantRuns: mod.countActiveDescendantRuns,
countPendingDescendantRuns: mod.countPendingDescendantRuns,
countActiveDescendantRuns: registryRead.countActiveDescendantRuns,
countPendingDescendantRuns: announceRead.countPendingDescendantRuns,
countPendingDescendantRunsExcludingRun: mod.countPendingDescendantRunsExcludingRun,
hasDescendantRunAwaitingSettle: announceRead.hasDescendantRunAwaitingSettle,
getLatestSubagentRunByChildSessionKey: mod.getLatestSubagentRunByChildSessionKey,
getLatestSubagentRunByChildSessionKey: registryRead.getLatestSubagentRunByChildSessionKey,
isSubagentSessionRunActive: mod.isSubagentSessionRunActive,
listSubagentRunsForRequester: mod.listSubagentRunsForRequester,
replaceSubagentRunAfterSteer: mod.replaceSubagentRunAfterSteer,
replaceSubagentRunAfterSteer: mod.replaceSubagentRunAfterSteerCore,
resolveRequesterForChildSession: mod.resolveRequesterForChildSession,
shouldIgnorePostCompletionAnnounceForSession: mod.shouldIgnorePostCompletionAnnounceForSession,
}) as unknown as typeof import("./subagent-registry-runtime.js");
@@ -4,6 +4,8 @@
import { expectDefined } from "@openclaw/normalization-core";
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
import "./subagent-registry.mocks.shared.js";
import { countPendingDescendantRuns } from "./subagent-registry-announce-read.js";
import { countActiveDescendantRuns } from "./subagent-registry-read.js";
vi.mock("../../../config/config.js", async () => {
const actual = await vi.importActual<typeof import("../../../config/config.js")>(
@@ -141,7 +143,7 @@ describe("subagent registry nested agent tracking", () => {
});
it("countActiveDescendantRuns traverses through ended parents", () => {
const { addSubagentRunForTests, countActiveDescendantRuns } = subagentRegistry;
const { addSubagentRunForTests } = subagentRegistry;
addSubagentRunForTests({
runId: "run-parent-ended",
@@ -172,7 +174,7 @@ describe("subagent registry nested agent tracking", () => {
});
it("countPendingDescendantRuns includes ended descendants until cleanup completes", () => {
const { addSubagentRunForTests, countPendingDescendantRuns } = subagentRegistry;
const { addSubagentRunForTests } = subagentRegistry;
addSubagentRunForTests({
runId: "run-parent-ended-pending",
@@ -221,7 +223,7 @@ describe("subagent registry nested agent tracking", () => {
});
it("keeps parent pending for parallel children until both descendants complete cleanup", () => {
const { addSubagentRunForTests, countPendingDescendantRuns } = subagentRegistry;
const { addSubagentRunForTests } = subagentRegistry;
const parentSessionKey = "agent:main:subagent:orch-parallel";
addSubagentRunForTests({
@@ -15,6 +15,7 @@ import { captureEnv, setTestEnvValue, withEnv } from "../../../test-utils/env.js
import { cleanupSessionStateForTest } from "../../../test-utils/session-state-cleanup.js";
import { createAgentsWaitTool } from "../../tools/agents-wait-tool.js";
import { persistSubagentSessionTiming } from "./subagent-registry-helpers.js";
import { getLatestSubagentRunByChildSessionKey } from "./subagent-registry-read.js";
import { getSubagentRunsSnapshotForRead } from "./subagent-registry-state.js";
import {
canonicalSubagentRunFixtures,
@@ -32,7 +33,6 @@ import {
testing,
addSubagentRunForTests,
clearSubagentRunSteerRestart,
getLatestSubagentRunByChildSessionKey,
getSubagentRunByChildSessionKey,
initSubagentRegistry,
listSubagentRunsForRequester,
@@ -318,7 +318,7 @@ describe("subagent registry steer restarts", () => {
};
task?: string;
}) => {
const replaced = mod.replaceSubagentRunAfterSteer({
const replaced = mod.replaceSubagentRunAfterSteerCore({
previousRunId: params.previousRunId,
nextRunId: params.nextRunId,
fallback: params.fallback,
@@ -723,7 +723,7 @@ describe("subagent registry steer restarts", () => {
previous.accumulatedRuntimeMs = 0;
previous.execution.outcome = { status: "ok" };
const replaced = mod.replaceSubagentRunAfterSteer({
const replaced = mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-runtime-old",
nextRunId: "run-runtime-new",
fallback: previous,
@@ -752,7 +752,7 @@ describe("subagent registry steer restarts", () => {
});
expect(
mod.replaceSubagentRunAfterSteer({
mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-retired-generation-old",
nextRunId: "run-retired-generation-new",
lifecycleGeneration: "retired-generation",
@@ -771,7 +771,7 @@ describe("subagent registry steer restarts", () => {
});
expect(
mod.replaceSubagentRunAfterSteer({
mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-current-generation-old",
nextRunId: "run-current-generation-new",
lifecycleGeneration: "test-generation",
@@ -801,7 +801,7 @@ describe("subagent registry steer restarts", () => {
});
expect(
mod.replaceSubagentRunAfterSteer({
mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-generation-persist-old",
nextRunId: "run-generation-persist-new",
lifecycleGeneration: "test-generation",
@@ -832,7 +832,7 @@ describe("subagent registry steer restarts", () => {
lastDropReason: "sink_unavailable",
};
const replaced = mod.replaceSubagentRunAfterSteer({
const replaced = mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-delivery-old",
nextRunId: "run-delivery-new",
fallback: previous,
@@ -866,7 +866,7 @@ describe("subagent registry steer restarts", () => {
};
}
const replaced = mod.replaceSubagentRunAfterSteer({
const replaced = mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-wake-old",
nextRunId: "run-wake-new",
fallback: previous,
@@ -59,6 +59,7 @@ import {
SUBAGENT_ENDED_REASON_ERROR,
SUBAGENT_ENDED_REASON_KILLED,
} from "./subagent-lifecycle-events.js";
import { countPendingDescendantRuns } from "./subagent-registry-announce-read.js";
import { createSubagentRunManager } from "./subagent-registry-run-manager.js";
import type {
ContextEngineSubagentEndedParams,
@@ -542,35 +543,6 @@ describe("subagent registry seam flow", () => {
vi.useRealTimers();
});
it("routes controller and child lookups through scoped snapshots", () => {
const controllerSessionKey = "agent:main:controller";
const childSessionKey = "agent:main:subagent:scoped";
const run = {
runId: "run-scoped",
childSessionKey,
requesterSessionKey: "agent:main:main",
requesterDisplayKey: "main",
controllerSessionKey,
task: "scoped registry run",
cleanup: "keep" as const,
createdAt: Date.now(),
execution: { status: "running" as const },
};
mocks.getSubagentRunsSnapshotForController.mockReturnValue(new Map([[run.runId, run]]));
mocks.getSubagentRunsSnapshotForChildSession.mockReturnValue(new Map([[run.runId, run]]));
expect(mod.listSubagentRunsForController(controllerSessionKey)).toEqual([run]);
expect(mod.getLatestSubagentRunByChildSessionKey(childSessionKey)).toEqual(run);
expect(mocks.getSubagentRunsSnapshotForController).toHaveBeenCalledWith(
expect.any(Map),
controllerSessionKey,
);
expect(mocks.getSubagentRunsSnapshotForChildSession).toHaveBeenCalledWith(
expect.any(Map),
childSessionKey,
);
});
it("keeps a sweeper archive mutation root-admitted until deletion settles", async () => {
const now = Date.now();
mocks.loadSessionStore.mockReturnValue(
@@ -3313,10 +3285,10 @@ describe("subagent registry seam flow", () => {
expect(run?.pauseReason).toBe("sessions_yield");
});
expect(mocks.runSubagentAnnounceFlow).not.toHaveBeenCalled();
expect(mod.countPendingDescendantRuns("agent:main:main")).toBe(1);
expect(countPendingDescendantRuns("agent:main:main")).toBe(1);
expect(
mod.replaceSubagentRunAfterSteer({
mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-yield-paused",
nextRunId: "run-yield-continuation",
}),
@@ -3438,7 +3410,7 @@ describe("subagent registry seam flow", () => {
expect(mocks.runSubagentAnnounceFlow).not.toHaveBeenCalled();
// A yielded row is still unsettled work, so the parent's batch keeps
// deferring instead of waking on a run that has not produced a result.
expect(mod.countPendingDescendantRuns("agent:main:main")).toBe(1);
expect(countPendingDescendantRuns("agent:main:main")).toBe(1);
});
});
@@ -5212,7 +5184,7 @@ describe("subagent registry seam flow", () => {
});
expect(
mod.replaceSubagentRunAfterSteer({
mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-replacement-persist-old",
nextRunId: "run-replacement-persist-new",
}),
@@ -5774,7 +5746,7 @@ describe("subagent registry seam flow", () => {
});
expect(
mod.replaceSubagentRunAfterSteer({
mod.replaceSubagentRunAfterSteerCore({
previousRunId: "run-suspended-old",
nextRunId: "run-suspended-new",
}),
@@ -11,6 +11,7 @@ import {
import { prependAgentSteeringPrompt } from "../../agent-steering-queue.js";
import { terminateAcceptedCollectorRun } from "../spawn/subagent-spawn-cleanup.js";
import { isDeliverySuspended } from "./subagent-delivery-state.js";
import { countPendingDescendantRuns } from "./subagent-registry-announce-read.js";
import { createSubagentRegistryCompletionRuntime } from "./subagent-registry-completion-runtime.js";
import { emitSubagentProgressEndedHook } from "./subagent-registry-completion.js";
import { createSubagentRegistryContextCleanup } from "./subagent-registry-context-cleanup.js";
@@ -137,8 +138,7 @@ const subagentLifecycleController = createSubagentRegistryLifecycleController({
persist: persistSubagentRuns,
persistOrThrow: persistSubagentRunsOrThrow,
clearPendingLifecycleError,
countPendingDescendantRuns: (rootSessionKey) =>
publicApi.countPendingDescendantRuns(rootSessionKey),
countPendingDescendantRuns,
suppressAnnounceForSteerRestart: contextCleanup.suppressAnnounceForSteerRestart,
resolveSubagentTask: findSubagentTaskForRun,
shouldEmitEndedHookForRun: contextCleanup.shouldEmitEndedHookForRun,
@@ -469,7 +469,7 @@ const subagentRunManager = createSubagentRunManager({
export const markSubagentRunForSteerRestart = subagentRunManager.markSubagentRunForSteerRestart;
export const clearSubagentRunSteerRestart = subagentRunManager.clearSubagentRunSteerRestart;
export const replaceSubagentRunAfterSteer = subagentRunManager.replaceSubagentRunAfterSteer;
export const replaceSubagentRunAfterSteerCore = subagentRunManager.replaceSubagentRunAfterSteer;
export const claimSubagentRunKill = subagentRunManager.claimSubagentRunKill;
export const releaseSubagentRunKillClaim = subagentRunManager.releaseSubagentRunKillClaim;
export const registerSubagentRun: (params: RegisterSubagentRunParams) => void =
@@ -583,7 +583,6 @@ const publicApi = createSubagentRegistryPublicApi({
export const leasePendingAgentSteeringItems = publicApi.leasePendingAgentSteeringItems;
export const ackPendingAgentSteeringItems = publicApi.ackPendingAgentSteeringItems;
export const releasePendingAgentSteeringItems = publicApi.releasePendingAgentSteeringItems;
export const listSubagentRunsForController = publicApi.listSubagentRunsForController;
export const getSubagentRunByRunId = publicApi.getSubagentRunByRunId;
export const getSubagentRunsByRunIds = publicApi.getSubagentRunsByRunIds;
export const completeCollectorLaunchCleanup = publicApi.completeCollectorLaunchCleanup;
@@ -591,12 +590,7 @@ export const recordSwarmStructuredOutput = publicApi.recordSwarmStructuredOutput
export const listSwarmRunsForGroup = publicApi.listSwarmRunsForGroup;
export const getSwarmRunByLaunchReplayKey = publicApi.getSwarmRunByLaunchReplayKey;
export const countActiveRunsForSession = publicApi.countActiveRunsForSession;
export const countActiveDescendantRuns = publicApi.countActiveDescendantRuns;
export const countPendingDescendantRuns = publicApi.countPendingDescendantRuns;
export const listDescendantRunsForRequester = publicApi.listDescendantRunsForRequester;
export const getSubagentRunByChildSessionKey = publicApi.getSubagentRunByChildSessionKey;
export const getLatestSubagentRunByChildSessionKey =
publicApi.getLatestSubagentRunByChildSessionKey;
export function initSubagentRegistry() {
const state = getSubagentRegistryBootstrapState();
if (!state.ready || !state.restorer) {
@@ -9,7 +9,7 @@ import fs from "node:fs/promises";
import { normalizeLowercaseStringOrEmpty } from "@openclaw/normalization-core/string-coerce";
import { Type } from "typebox";
import type { AssistantMessage, Message, Tool } from "../../llm/types.js";
import { extractAssistantText } from "../embedded-agent-utils.js";
import { extractEmbeddedAssistantText } from "../embedded-agent-utils.js";
import {
assertAgainstBaseline,
type BaselineFindings,
@@ -159,7 +159,7 @@ async function runToolOnlyTurn(params: {
);
let toolCall = extractFirstToolCall(response);
let text = extractAssistantText(response);
let text = extractEmbeddedAssistantText(response);
for (let attempt = 0; attempt < 2 && (!toolCall || text.length > 0); attempt += 1) {
prompt = `Return only a tool call for \`${params.tool.name}\` with {}. No text.`;
response = await completeSimpleWithLiveTimeout(
@@ -174,7 +174,7 @@ async function runToolOnlyTurn(params: {
timeoutMs,
);
toolCall = extractFirstToolCall(response);
text = extractAssistantText(response);
text = extractEmbeddedAssistantText(response);
}
assert(toolCall, `expected tool call for ${params.tool.name}`);
@@ -226,7 +226,7 @@ async function completeCacheProbe(params: {
`${params.providerTag} cache lane ${params.suffix}`,
timeoutMs,
);
const text = extractAssistantText(response);
const text = extractEmbeddedAssistantText(response);
const usage = normalizeCacheUsage(response.usage);
if (
shouldAcceptEmptyCacheProbe({
@@ -1,7 +1,7 @@
// Assistant phase text tests cover extracting final-answer text from signed
// assistant message phases.
import { describe, expect, it } from "vitest";
import { extractAssistantText as extractChatHistoryAssistantText } from "./chat-history-text.js";
import { extractStoredAssistantText as extractChatHistoryAssistantText } from "./chat-history-text.js";
function assistantTextPart(id: string, phase: string, text: string) {
return {
+1 -1
View File
@@ -26,7 +26,7 @@ export function sanitizeTextContent(text: string): string {
return sanitizeAssistantVisibleTextWithProfile(text, "history");
}
export function extractAssistantText(message: unknown): string | undefined {
export function extractStoredAssistantText(message: unknown): string | undefined {
if (!message || typeof message !== "object") {
return undefined;
}
+4 -4
View File
@@ -124,17 +124,17 @@ function isBlankParamValue(raw: unknown): boolean {
return typeof raw === "string" && raw.trim() === "";
}
export function readStringParam(
export function readToolStringParam(
params: Record<string, unknown>,
key: string,
options: StringParamOptions & { required: true },
): string;
export function readStringParam(
export function readToolStringParam(
params: Record<string, unknown>,
key: string,
options?: StringParamOptions,
): string | undefined;
export function readStringParam(
export function readToolStringParam(
params: Record<string, unknown>,
key: string,
options: StringParamOptions = {},
@@ -388,7 +388,7 @@ export function readReactionParams(
const emojiKey = options.emojiKey ?? "emoji";
const removeKey = options.removeKey ?? "remove";
const remove = typeof params[removeKey] === "boolean" ? params[removeKey] : false;
const emoji = readStringParam(params, emojiKey, {
const emoji = readToolStringParam(params, emojiKey, {
required: true,
allowEmpty: true,
});
+5 -3
View File
@@ -32,7 +32,7 @@ import {
type AnyAgentTool,
readFiniteNumberParam,
readPositiveIntegerParam,
readStringParam,
readToolStringParam,
} from "./common.js";
import { gatewayCallOptionSchemaProperties } from "./gateway-schema.js";
import { callGatewayTool, type GatewayCallOptions, readGatewayCallOptions } from "./gateway.js";
@@ -296,7 +296,7 @@ function buildComputerActParams(params: {
}
case "key":
case "hold_key": {
const keys = readStringParam(input, "text", { required: true });
const keys = readToolStringParam(input, "text", { required: true });
wire.keys = keys;
if (action === "hold_key") {
const seconds =
@@ -655,7 +655,9 @@ export function createComputerTool(options?: {
serialize(async () => {
signal?.throwIfAborted();
const params = args as Record<string, unknown>;
const action = readStringParam(params, "action", { required: true }) as ComputerToolAction;
const action = readToolStringParam(params, "action", {
required: true,
}) as ComputerToolAction;
const gatewayOpts = readGatewayCallOptions(params);
const explicitNode = typeof params.node === "string" ? params.node : undefined;
const explicitScreenIndex = (() => {
+7 -7
View File
@@ -17,7 +17,7 @@ import type { AnyAgentTool } from "./common.js";
import {
jsonResult,
readPositiveIntegerParam,
readStringParam,
readToolStringParam,
ToolAuthorizationError,
ToolInputError,
} from "./common.js";
@@ -122,8 +122,8 @@ export function createConversationsListTool(
requireOwner(options);
const params = args as Record<string, unknown>;
const limit = Math.min(readPositiveIntegerParam(params, "limit") ?? 50, 100);
const channel = readStringParam(params, "channel");
const query = readStringParam(params, "query");
const channel = readToolStringParam(params, "channel");
const query = readToolStringParam(params, "query");
const result = await deps.callGateway<ConversationListResult>({
method: "conversations.list",
params: {
@@ -156,9 +156,9 @@ export function createConversationsSendTool(
requireOwner(options);
const params = args as Record<string, unknown>;
const conversationRef = readConversationRef(
readStringParam(params, "conversationRef", { required: true }),
readToolStringParam(params, "conversationRef", { required: true }),
);
const message = readStringParam(params, "message", { required: true });
const message = readToolStringParam(params, "message", { required: true });
const operationId = buildConversationOperationId({
options,
toolCallId,
@@ -199,9 +199,9 @@ export function createConversationsTurnTool(
requireOwner(options);
const params = args as Record<string, unknown>;
const conversationRef = readConversationRef(
readStringParam(params, "conversationRef", { required: true }),
readToolStringParam(params, "conversationRef", { required: true }),
);
const message = readStringParam(params, "message", { required: true });
const message = readToolStringParam(params, "message", { required: true });
const timeoutSeconds = readPositiveIntegerParam(params, "timeoutSeconds") ?? 30;
const timeoutMs = timeoutSeconds * 1_000;
const agentId = resolveToolAgentId(options);
+7 -7
View File
@@ -24,7 +24,7 @@ import {
jsonResult,
readNonNegativeIntegerParam,
readPositiveIntegerParam,
readStringParam,
readToolStringParam,
} from "./common.js";
import {
assertCronToolAgentFieldMatchesScope,
@@ -76,7 +76,7 @@ function isMissingOrEmptyObject(value: unknown): boolean {
}
function readCronJobIdParam(params: Record<string, unknown>) {
return readStringParam(params, "jobId") ?? readStringParam(params, "id");
return readToolStringParam(params, "jobId") ?? readToolStringParam(params, "id");
}
const CRON_SELF_REMOVE_SCOPE_ERROR = "Automations tool is restricted to the current automation.";
@@ -204,7 +204,7 @@ Job wakeMode (main jobs): "now"(default)|"next-heartbeat". Restricted automation
execute: async (_toolCallId, args, operationSignal) => {
operationSignal?.throwIfAborted();
const params = args as Record<string, unknown>;
const action = readStringParam(params, "action", { required: true });
const action = readToolStringParam(params, "action", { required: true });
assertCronSelfRemoveScope(opts, action, params);
const parsedGatewayOpts = readGatewayCallOptions(params);
const gatewayOpts: GatewayCallOptions = {
@@ -596,7 +596,7 @@ Job wakeMode (main jobs): "now"(default)|"next-heartbeat". Restricted automation
if (!jobId || !runId) {
throw new Error("cron next_check is only available to the currently running job");
}
const rawDuration = readStringParam(params, "in", { required: true });
const rawDuration = readToolStringParam(params, "in", { required: true });
let delayMs: number;
try {
delayMs = parseDurationMs(rawDuration);
@@ -610,7 +610,7 @@ Job wakeMode (main jobs): "now"(default)|"next-heartbeat". Restricted automation
return jsonResult({ ok: true, delayMs });
}
case "wake": {
const text = readStringParam(params, "text", { required: true });
const text = readToolStringParam(params, "text", { required: true });
const mode =
params.mode === "now" || params.mode === "next-heartbeat"
? params.mode
@@ -627,8 +627,8 @@ Job wakeMode (main jobs): "now"(default)|"next-heartbeat". Restricted automation
// calling agent.
const cfg = getRuntimeConfig();
const { mainKey, alias } = resolveMainSessionAlias(cfg);
const explicitSessionKey = readStringParam(params, "sessionKey");
const explicitAgentId = readStringParam(params, "agentId");
const explicitSessionKey = readToolStringParam(params, "sessionKey");
const explicitAgentId = readToolStringParam(params, "agentId");
if (callerScope) {
assertCronToolAgentFieldMatchesScope({
value: explicitAgentId,
+15 -15
View File
@@ -9,7 +9,7 @@ import type { AnyAgentTool } from "./common.js";
import {
readNumberParam,
readStringArrayParam,
readStringParam,
readToolStringParam,
textResult,
ToolInputError,
} from "./common.js";
@@ -111,7 +111,7 @@ function readDock(
params: Record<string, unknown>,
key: "chatDock" | "dock",
): "left" | "right" | "bottom" | "hidden" | undefined {
const value = readStringParam(params, key);
const value = readToolStringParam(params, key);
if (
value === undefined ||
value === "left" ||
@@ -133,7 +133,7 @@ function requireInteger(params: Record<string, unknown>, key: string): number {
}
function readTabId(params: Record<string, unknown>): string {
const tabId = readStringParam(params, "tabId", { required: true });
const tabId = readToolStringParam(params, "tabId", { required: true });
if (!BOARD_TAB_ID_REGEX.test(tabId)) {
throw new ToolInputError("tabId must be a lowercase slug up to 40 characters");
}
@@ -141,7 +141,7 @@ function readTabId(params: Record<string, unknown>): string {
}
function readOptionalTabId(params: Record<string, unknown>): string | undefined {
const tabId = readStringParam(params, "tabId");
const tabId = readToolStringParam(params, "tabId");
if (tabId !== undefined && !BOARD_TAB_ID_REGEX.test(tabId)) {
throw new ToolInputError("tabId must be a lowercase slug up to 40 characters");
}
@@ -160,17 +160,17 @@ function readPluginProps(params: Record<string, unknown>): Record<string, unknow
}
function opForAction(action: string, params: Record<string, unknown>): BoardOp {
const name = () => readStringParam(params, "name", { required: true });
const name = () => readToolStringParam(params, "name", { required: true });
switch (action) {
case "tab_create":
return {
kind: "tab_create",
tabId: readTabId(params),
title: readStringParam(params, "title", { required: true }),
title: readToolStringParam(params, "title", { required: true }),
...(readDock(params, "chatDock") ? { chatDock: readDock(params, "chatDock") } : {}),
};
case "tab_update": {
const title = readStringParam(params, "title");
const title = readToolStringParam(params, "title");
const chatDock = readDock(params, "chatDock");
const position = readNumberParam(params, "position", { integer: true, strict: true });
if (title === undefined && chatDock === undefined && position === undefined) {
@@ -192,9 +192,9 @@ function opForAction(action: string, params: Record<string, unknown>): BoardOp {
tabIds: readStringArrayParam(params, "tabIds", { required: true }),
};
case "widget_move": {
const targetTabId = readStringParam(params, "tabId");
const targetTabId = readToolStringParam(params, "tabId");
const position = readNumberParam(params, "position", { integer: true, strict: true });
const after = readStringParam(params, "after");
const after = readToolStringParam(params, "after");
if (position !== undefined && after !== undefined) {
throw new ToolInputError("widget_move accepts either position or after, not both");
}
@@ -251,7 +251,7 @@ export function createDashboardTool(opts: DashboardToolOptions = {}): AnyAgentTo
parameters: DashboardToolSchema,
execute: async (_toolCallId, rawArgs) => {
const params = rawArgs as Record<string, unknown>;
const action = readStringParam(params, "action", { required: true });
const action = readToolStringParam(params, "action", { required: true });
const sessionKey = requireSessionKey(opts.agentSessionKey);
if (action === "read") {
return snapshotResult(await gatewayCall<BoardSnapshot>("board.get", { sessionKey }));
@@ -281,19 +281,19 @@ export function createDashboardTool(opts: DashboardToolOptions = {}): AnyAgentTo
});
}
if (action === "widget_put") {
const pluginKind = readStringParam(params, "pluginKind", { required: true });
const pluginKind = readToolStringParam(params, "pluginKind", { required: true });
if (!BOARD_PLUGIN_KIND_REGEX.test(pluginKind)) {
throw new ToolInputError("pluginKind must use the <pluginId>:<name> format");
}
const title = readStringParam(params, "title");
const title = readToolStringParam(params, "title");
const tabId = readOptionalTabId(params);
const size = readStringParam(params, "size");
const after = readStringParam(params, "after");
const size = readToolStringParam(params, "size");
const after = readToolStringParam(params, "after");
const props = readPluginProps(params);
return snapshotResult(
await gatewayCall<BoardSnapshot>("board.widget.put", {
sessionKey,
name: readStringParam(params, "name", { required: true }),
name: readToolStringParam(params, "name", { required: true }),
...(title !== undefined ? { title } : {}),
content: {
kind: "plugin",
+4 -4
View File
@@ -7,7 +7,7 @@ import { stringEnum } from "../schema/typebox.js";
import {
type AnyAgentTool,
jsonResult,
readStringParam,
readToolStringParam,
textResult,
ToolInputError,
} from "./common.js";
@@ -113,17 +113,17 @@ export function createGatewayTool(): AnyAgentTool {
parameters: GatewayToolSchema,
execute: async (_toolCallId, args, signal) => {
const params = args as Record<string, unknown>;
const action = readStringParam(params, "action", { required: true });
const action = readToolStringParam(params, "action", { required: true });
const gatewayOpts = readGatewayCallOptions(params);
if (action === "config.get") {
const path = readStringParam(params, "path");
const path = readToolStringParam(params, "path");
const snapshot = await callGatewayTool("config.get", gatewayOpts, {}, { signal });
const result = selectGatewayConfigGetResult(snapshot, path);
return createGatewayConfigGetToolResult(result);
}
if (action === "config.schema.lookup") {
const path = readStringParam(params, "path", {
const path = readToolStringParam(params, "path", {
required: true,
label: "path",
});
+3 -3
View File
@@ -30,7 +30,7 @@ import {
type DeviceIdentity,
} from "../../infra/device-identity.js";
import { formatErrorMessage } from "../../infra/errors.js";
import { readPositiveIntegerParam, readStringParam } from "./common.js";
import { readPositiveIntegerParam, readToolStringParam } from "./common.js";
import { getGatewayToolCallerIdentity } from "./gateway-caller-context.js";
import { getGatewaySessionSpawnContext } from "./gateway-session-spawn-context.js";
@@ -46,8 +46,8 @@ type GatewayOverrideTarget = "local" | "remote";
/** Reads common gateway options from tool parameters while preserving explicit token whitespace. */
export function readGatewayCallOptions(params: Record<string, unknown>): GatewayCallOptions {
return {
gatewayUrl: readStringParam(params, "gatewayUrl", { trim: false }),
gatewayToken: readStringParam(params, "gatewayToken", { trim: false }),
gatewayUrl: readToolStringParam(params, "gatewayUrl", { trim: false }),
gatewayToken: readToolStringParam(params, "gatewayToken", { trim: false }),
timeoutMs: readPositiveIntegerParam(params, "timeoutMs"),
};
}
+4 -4
View File
@@ -19,7 +19,7 @@ import {
ToolInputError,
jsonResult,
readPositiveIntegerParam,
readStringParam,
readToolStringParam,
} from "./common.js";
type GoalToolOptions = {
@@ -103,7 +103,7 @@ export function createCreateGoalTool(options: GoalToolOptions): AnyAgentTool {
parameters: CreateGoalToolSchema,
execute: async (_toolCallId, args) => {
const params = args as Record<string, unknown>;
const objective = readStringParam(params, "objective", { required: true });
const objective = readToolStringParam(params, "objective", { required: true });
const tokenBudget = readPositiveIntegerParam(params, "token_budget", {
message: "token_budget must be a positive integer",
});
@@ -130,7 +130,7 @@ export function createUpdateGoalTool(options: GoalToolOptions): AnyAgentTool {
parameters: UpdateGoalToolSchema,
execute: async (_toolCallId, args) => {
const params = args as Record<string, unknown>;
const status = readStringParam(params, "status", { required: true });
const status = readToolStringParam(params, "status", { required: true });
if (
!MODEL_UPDATABLE_SESSION_GOAL_STATUSES.includes(
status as (typeof MODEL_UPDATABLE_SESSION_GOAL_STATUSES)[number],
@@ -140,7 +140,7 @@ export function createUpdateGoalTool(options: GoalToolOptions): AnyAgentTool {
`status must be one of ${MODEL_UPDATABLE_SESSION_GOAL_STATUSES.join(", ")}`,
);
}
const note = readStringParam(params, "note");
const note = readToolStringParam(params, "note");
const scope = resolveGoalSessionScope(options);
const goal = await updateSessionGoalStatus({
...scope,
+14 -14
View File
@@ -56,7 +56,7 @@ import {
ToolInputError,
readNonNegativeIntegerParam,
readPositiveIntegerParam,
readStringParam,
readToolStringParam,
} from "./common.js";
import { persistGeneratedMediaBatch } from "./generated-media-batch-persistence.js";
import {
@@ -398,15 +398,15 @@ function readRecordParam(params: Record<string, unknown>, key: string): Record<s
function normalizeOpenAIOptions(args: Record<string, unknown>): ImageGenerationOpenAIOptions {
const raw = readRecordParam(args, "openai");
const background = normalizeOpenAIBackground(readStringParam(raw, "background"));
const moderation = normalizeOpenAIModeration(readStringParam(raw, "moderation"));
const background = normalizeOpenAIBackground(readToolStringParam(raw, "background"));
const moderation = normalizeOpenAIModeration(readToolStringParam(raw, "moderation"));
if (readSnakeCaseParamRaw(raw, "outputCompression") === null) {
throw new ToolInputError("openai.outputCompression must be between 0 and 100");
}
const outputCompression = readNonNegativeIntegerParam(raw, "outputCompression", {
message: "openai.outputCompression must be between 0 and 100",
});
const user = readStringParam(raw, "user");
const user = readToolStringParam(raw, "user");
if (outputCompression !== undefined && (outputCompression < 0 || outputCompression > 100)) {
throw new ToolInputError("openai.outputCompression must be between 0 and 100");
}
@@ -422,7 +422,7 @@ function normalizeProviderOptions(
args: Record<string, unknown>,
): ImageGenerationProviderOptions | undefined {
const falRaw = readRecordParam(args, "fal");
const falCreativity = normalizeFalCreativity(readStringParam(falRaw, "creativity"));
const falCreativity = normalizeFalCreativity(readToolStringParam(falRaw, "creativity"));
const openai = normalizeOpenAIOptions(args);
const fal = falCreativity ? { creativity: falCreativity } : undefined;
return fal || Object.keys(openai).length > 0
@@ -927,7 +927,7 @@ export function createImageGenerateTool(options?: {
return createImageGenerateStatusActionResult(options?.agentSessionKey);
}
const model = readStringParam(params, "model");
const model = readToolStringParam(params, "model");
const configuredImageGenerationModelConfig = coerceToolModelConfig(
cfg.agents?.defaults?.mediaModels?.image,
);
@@ -945,7 +945,7 @@ export function createImageGenerateTool(options?: {
const effectiveCfg =
applyImageGenerationModelConfigDefaults(cfg, imageGenerationModelConfig) ?? cfg;
const remoteMediaSsrfPolicy = resolveRemoteMediaSsrfPolicy(effectiveCfg);
const prompt = readStringParam(params, "prompt", { required: true });
const prompt = readToolStringParam(params, "prompt", { required: true });
const activeDuplicateGuardResult = createImageGenerateDuplicateGuardResult(
options?.agentSessionKey,
@@ -956,14 +956,14 @@ export function createImageGenerateTool(options?: {
}
const imageInputs = normalizeReferenceImages(params);
const filename = readStringParam(params, "filename");
const size = readStringParam(params, "size");
const aspectRatio = normalizeAspectRatio(readStringParam(params, "aspectRatio"));
const explicitResolution = normalizeResolution(readStringParam(params, "resolution"));
const filename = readToolStringParam(params, "filename");
const size = readToolStringParam(params, "size");
const aspectRatio = normalizeAspectRatio(readToolStringParam(params, "aspectRatio"));
const explicitResolution = normalizeResolution(readToolStringParam(params, "resolution"));
const timeoutMs = readGenerationTimeoutMs(params) ?? imageGenerationModelConfig.timeoutMs;
const quality = normalizeQuality(readStringParam(params, "quality"));
const outputFormat = normalizeOutputFormat(readStringParam(params, "outputFormat"));
const background = normalizeBackground(readStringParam(params, "background"));
const quality = normalizeQuality(readToolStringParam(params, "quality"));
const outputFormat = normalizeOutputFormat(readToolStringParam(params, "outputFormat"));
const background = normalizeBackground(readToolStringParam(params, "background"));
const providerOptions = normalizeProviderOptions(params);
const imageGenerationProviders =
preparedProviders ?? listRuntimeImageGenerationProviders({ config: effectiveCfg });
+3 -3
View File
@@ -7,7 +7,7 @@ import { estimateBase64DecodedBytes } from "@openclaw/media-core/base64";
import { normalizeLowercaseStringOrEmpty } from "@openclaw/normalization-core/string-coerce";
import type { OpenClawConfig } from "../../config/types.openclaw.js";
import type { AssistantMessage } from "../../llm/types.js";
import { extractAssistantText } from "../embedded-agent-utils.js";
import { extractEmbeddedAssistantText } from "../embedded-agent-utils.js";
import { isMinimaxVlmProvider } from "../minimax-vlm.js";
import { findNormalizedProviderValue, normalizeProviderId } from "../model-selection.js";
import { coerceToolModelConfig, type ToolModelConfig } from "./model-config.helpers.js";
@@ -62,7 +62,7 @@ function isImageReasoningFallbackSignature(value: unknown): boolean {
/** Detects provider responses that contain only reasoning blocks and no usable image text. */
export function hasImageReasoningOnlyResponse(message: AssistantMessage): boolean {
if (extractAssistantText(message).trim() || !Array.isArray(message.content)) {
if (extractEmbeddedAssistantText(message).trim() || !Array.isArray(message.content)) {
return false;
}
let checkedBlocks = 0;
@@ -134,7 +134,7 @@ export function coerceImageAssistantText(params: {
if (errorMessage) {
throw new Error(`Image model failed (${params.provider}/${params.model}): ${errorMessage}`);
}
const text = extractAssistantText(params.message);
const text = extractEmbeddedAssistantText(params.message);
if (text.trim()) {
return text.trim();
}
+3 -3
View File
@@ -30,7 +30,7 @@ import {
ToolInputError,
readPositiveIntegerParam,
readStringArrayParam,
readStringParam,
readToolStringParam,
} from "./common.js";
import type { ImageModelConfig } from "./image-tool.helpers.js";
import {
@@ -482,7 +482,7 @@ export function resolveGenerateAction<TAction extends string>(params: {
allowed: readonly TAction[];
defaultAction: TAction;
}): TAction {
const raw = readStringParam(params.args, "action");
const raw = readToolStringParam(params.args, "action");
if (!raw) {
return params.defaultAction;
}
@@ -513,7 +513,7 @@ export function normalizeMediaReferenceInputs(params: {
maxCount: number;
label: string;
}): string[] {
const single = readStringParam(params.args, params.singularKey);
const single = readToolStringParam(params.args, params.singularKey);
const multiple = readStringArrayParam(params.args, params.pluralKey);
const combined = [...(single ? [single] : []), ...(multiple ?? [])];
const deduped: string[] = [];
+11 -11
View File
@@ -95,7 +95,7 @@ import {
stringEnum,
} from "../schema/typebox.js";
import type { AnyAgentTool } from "./common.js";
import { jsonResult, readStringArrayParam, readStringParam } from "./common.js";
import { jsonResult, readStringArrayParam, readToolStringParam } from "./common.js";
import { gatewayCallOptionSchemaProperties } from "./gateway-schema.js";
import {
readGatewayCallOptions,
@@ -514,7 +514,7 @@ function sanitizePresentationTextFieldsResult(
function readFirstStringParam(params: Record<string, unknown>, keys: readonly string[]): string {
for (const key of keys) {
const value = readStringParam(params, key);
const value = readToolStringParam(params, key);
if (value) {
return value;
}
@@ -533,7 +533,7 @@ function readStructuredAttachmentMediaParams(value: unknown): string[] {
}
const record = attachment as Record<string, unknown>;
for (const key of ["media", "mediaUrl", "path", "filePath", "fileUrl", "url"]) {
const candidate = readStringParam(record, key);
const candidate = readToolStringParam(record, key);
if (candidate) {
values.push(candidate);
}
@@ -1199,12 +1199,12 @@ function enforceSourceReplyOnlyMessageAction(params: {
throw new Error("Completion source replies require an authoritative current conversation.");
}
const requestedChannel = readStringParam(params.args, "channel");
const requestedChannel = readToolStringParam(params.args, "channel");
if (requestedChannel && normalizeMessageChannel(requestedChannel) !== sourceChannel) {
throw new Error("Completion source replies cannot target another channel.");
}
const requestedAccountId = readStringParam(params.args, "accountId");
const requestedAccountId = readToolStringParam(params.args, "accountId");
const sourceAccountId = params.trustedTurnContext
? params.trustedTurnContext.requesterAccountId
: params.currentAccountId;
@@ -1221,7 +1221,7 @@ function enforceSourceReplyOnlyMessageAction(params: {
throw new Error("Completion source replies cannot target another thread.");
}
const requestedReplyTo = readStringParam(params.args, "replyTo");
const requestedReplyTo = readToolStringParam(params.args, "replyTo");
const sourceMessageId = normalizeOptionalStringifiedId(sourceContext.currentMessageId);
if (
requestedReplyTo &&
@@ -1621,7 +1621,7 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool {
}
// Shallow-copy so we don't mutate the original event args (used for logging/dedup).
const params = { ...(args as Record<string, unknown>) };
const action = readStringParam(params, "action", {
const action = readToolStringParam(params, "action", {
required: true,
}) as ChannelMessageActionName;
const trustedTurnContext =
@@ -1739,7 +1739,7 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool {
const gatewayOpts = readGatewayCallOptions(params);
const rawConfig = options?.config ?? loadConfigForTool();
const requestedAccountId = readStringParam(params, "accountId");
const requestedAccountId = readToolStringParam(params, "accountId");
validateExplicitMessageAccountSelection({
cfg: rawConfig,
accountId: requestedAccountId,
@@ -1840,9 +1840,9 @@ export function createMessageTool(options?: MessageToolOptions): AnyAgentTool {
const vote = recentPollVote;
recentPollVoteBySession.delete(pollEchoSessionKey);
const outboundText =
readStringParam(params, "text") ??
readStringParam(params, "message") ??
readStringParam(params, "content");
readToolStringParam(params, "text") ??
readToolStringParam(params, "message") ??
readToolStringParam(params, "content");
if (outboundText && isPollVoteEchoText(vote.option, outboundText)) {
return jsonResult({
status: "suppressed",
+13 -13
View File
@@ -11,7 +11,7 @@ import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/s
import { Type } from "typebox";
import { formatErrorMessage } from "../../infra/errors.js";
import { stringEnum } from "../schema/typebox.js";
import { type AnyAgentTool, jsonResult, readStringParam, ToolInputError } from "./common.js";
import { type AnyAgentTool, jsonResult, readToolStringParam, ToolInputError } from "./common.js";
import { gatewayCallOptionSchemaProperties } from "./gateway-schema.js";
import { callGatewayTool, type GatewayCallOptions, readGatewayCallOptions } from "./gateway.js";
import {
@@ -152,26 +152,26 @@ function readMobileUiAction(input: Record<string, unknown>): MobileUiAction {
throw new ToolInputError("mobileAction required for act");
}
const action = input.mobileAction;
const type = readStringParam(action, "type", { required: true });
const type = readToolStringParam(action, "type", { required: true });
switch (type) {
case "activate":
return { type, ref: readStringParam(action, "ref", { required: true }) };
return { type, ref: readToolStringParam(action, "ref", { required: true }) };
case "set_text":
return {
type,
ref: readStringParam(action, "ref", { required: true }),
text: readStringParam(action, "text", {
ref: readToolStringParam(action, "ref", { required: true }),
text: readToolStringParam(action, "text", {
required: true,
trim: false,
allowEmpty: true,
}),
};
case "scroll": {
const direction = readStringParam(action, "direction", { required: true });
const direction = readToolStringParam(action, "direction", { required: true });
if (direction !== "forward" && direction !== "backward") {
throw new ToolInputError("direction must be forward or backward");
}
return { type, ref: readStringParam(action, "ref", { required: true }), direction };
return { type, ref: readToolStringParam(action, "ref", { required: true }), direction };
}
case "tap":
return {
@@ -192,7 +192,7 @@ function readMobileUiAction(input: Record<string, unknown>): MobileUiAction {
}),
};
case "global_action": {
const name = readStringParam(action, "name", { required: true });
const name = readToolStringParam(action, "name", { required: true });
if (!(GLOBAL_ACTION_NAMES as readonly string[]).includes(name)) {
throw new ToolInputError("name must be back, home, recents, or notifications");
}
@@ -321,7 +321,7 @@ function parseMobileUiNode(value: unknown): MobileUiNode {
if (!isRecord(value)) {
throw new Error("mobile.ui.observe returned an invalid node");
}
const ref = readStringParam(value, "ref", { required: true });
const ref = readToolStringParam(value, "ref", { required: true });
const role = typeof value.role === "string" ? value.role : "";
if (
!Array.isArray(value.bounds) ||
@@ -356,7 +356,7 @@ function parseMobileUiNode(value: unknown): MobileUiNode {
function parseMobileUiSnapshot(payload: unknown): MobileUiSnapshot {
const record = payloadRecord(payload, MOBILE_UI_OBSERVE_COMMAND);
const snapshotId = readStringParam(record, "snapshotId", { required: true });
const snapshotId = readToolStringParam(record, "snapshotId", { required: true });
if (!Array.isArray(record.nodes)) {
throw new Error("mobile.ui.observe response missing nodes");
}
@@ -371,7 +371,7 @@ function parseMobileUiSnapshot(payload: unknown): MobileUiSnapshot {
function parseMobileUiOutcome(payload: unknown): MobileUiOutcome {
const record = payloadRecord(payload, MOBILE_UI_ACT_COMMAND);
return {
code: readStringParam(record, "code", { required: true }),
code: readToolStringParam(record, "code", { required: true }),
message: nullableString(record.message, "message"),
};
}
@@ -542,7 +542,7 @@ export function createMobileUiTool(options?: {
serialize(async () => {
signal?.throwIfAborted();
const input = args as Record<string, unknown>;
const action = readStringParam(input, "action", { required: true });
const action = readToolStringParam(input, "action", { required: true });
if (action !== "observe" && action !== "act") {
throw new ToolInputError("action must be observe or act");
}
@@ -572,7 +572,7 @@ export function createMobileUiTool(options?: {
return jsonResult(await observe());
}
const snapshotId = readStringParam(input, "snapshotId", { required: true });
const snapshotId = readToolStringParam(input, "snapshotId", { required: true });
const mobileAction = readMobileUiAction(input);
const observed = observations.get(node.nodeId);
if (!observed || observed.snapshotId !== snapshotId) {
+6 -6
View File
@@ -39,7 +39,7 @@ import {
recordRecentMediaGenerationTaskStartForSession,
} from "../media-generation-task-status-shared.js";
import type { PreparedModelRuntimeSnapshot } from "../prepared-model-runtime.js";
import { ToolInputError, readNumberParam, readStringParam } from "./common.js";
import { ToolInputError, readNumberParam, readToolStringParam } from "./common.js";
import { persistGeneratedMediaBatch } from "./generated-media-batch-persistence.js";
import { decodeDataUrl } from "./image-tool.helpers.js";
import {
@@ -686,7 +686,7 @@ export function createMusicGenerateTool(options?: {
const explicitModelConfig = hasExplicitMusicGenerationModelConfig(cfg);
const effectiveCfg =
applyMusicGenerationModelConfigDefaults(cfg, musicGenerationModelConfig) ?? cfg;
const prompt = readStringParam(args, "prompt", { required: true });
const prompt = readToolStringParam(args, "prompt", { required: true });
const activeDuplicateGuardResult = createMusicGenerateDuplicateGuardResult(
options?.agentSessionKey,
@@ -696,9 +696,9 @@ export function createMusicGenerateTool(options?: {
return activeDuplicateGuardResult;
}
const lyrics = readStringParam(args, "lyrics");
const lyrics = readToolStringParam(args, "lyrics");
const instrumental = readBooleanToolParam(args, "instrumental");
const model = readStringParam(args, "model");
const model = readToolStringParam(args, "model");
const durationSeconds = readNumberParam(args, "durationSeconds", {
positiveInteger: true,
strict: true,
@@ -709,8 +709,8 @@ export function createMusicGenerateTool(options?: {
) {
throw new ToolInputError("durationSeconds must be a positive integer");
}
const format = normalizeOutputFormat(readStringParam(args, "format"));
const filename = readStringParam(args, "filename");
const format = normalizeOutputFormat(readToolStringParam(args, "format"));
const filename = readToolStringParam(args, "filename");
const timeout = normalizeMusicGenerationTimeoutMs(musicGenerationModelConfig.timeoutMs);
const timeoutMs = timeout.timeoutMs;
const imageInputs = normalizeReferenceImageInputs(args);
+12 -10
View File
@@ -12,7 +12,7 @@ import {
readNonNegativeIntegerParam,
readPositiveIntegerParam,
readStringArrayParam,
readStringParam,
readToolStringParam,
} from "./common.js";
import type { GatewayCallOptions } from "./gateway.js";
import { callGatewayTool } from "./gateway.js";
@@ -56,8 +56,8 @@ export async function executeNodeCommandAction(params: {
> {
switch (params.action) {
case "camera_ptz": {
const node = readStringParam(params.input, "node", { required: true });
const deviceId = readStringParam(params.input, "deviceId", { required: true });
const node = readToolStringParam(params.input, "node", { required: true });
const deviceId = readToolStringParam(params.input, "deviceId", { required: true });
const ptzOperation = normalizeLowercaseStringOrEmpty(params.input.ptzOperation);
if (
ptzOperation !== "status" &&
@@ -102,7 +102,7 @@ export async function executeNodeCommandAction(params: {
case "device_info":
case "device_permissions":
case "device_health": {
const node = readStringParam(params.input, "node", { required: true });
const node = readToolStringParam(params.input, "node", { required: true });
const payloadRaw = await invokeNodeCommandPayload({
gatewayOpts: params.gatewayOpts,
node,
@@ -113,8 +113,10 @@ export async function executeNodeCommandAction(params: {
return jsonResult(payload);
}
case "notifications_action": {
const node = readStringParam(params.input, "node", { required: true });
const notificationKey = readStringParam(params.input, "notificationKey", { required: true });
const node = readToolStringParam(params.input, "node", { required: true });
const notificationKey = readToolStringParam(params.input, "notificationKey", {
required: true,
});
const notificationAction = normalizeLowercaseStringOrEmpty(params.input.notificationAction);
if (
notificationAction !== "open" &&
@@ -145,7 +147,7 @@ export async function executeNodeCommandAction(params: {
return jsonResult(payload);
}
case "location_get": {
const node = readStringParam(params.input, "node", { required: true });
const node = readToolStringParam(params.input, "node", { required: true });
const maxAgeMs = readNonNegativeIntegerParam(params.input, "maxAgeMs");
const desiredAccuracy =
params.input.desiredAccuracy === "coarse" ||
@@ -167,7 +169,7 @@ export async function executeNodeCommandAction(params: {
return jsonResult(payload);
}
case "which": {
const node = readStringParam(params.input, "node", { required: true });
const node = readToolStringParam(params.input, "node", { required: true });
const bins = readStringArrayParam(params.input, "bins", { required: true });
const payload = await invokeNodeCommandPayload({
gatewayOpts: params.gatewayOpts,
@@ -178,9 +180,9 @@ export async function executeNodeCommandAction(params: {
return jsonResult(payload);
}
case "invoke": {
const node = readStringParam(params.input, "node", { required: true });
const node = readToolStringParam(params.input, "node", { required: true });
const nodeId = await resolveNodeId(params.gatewayOpts, node);
const invokeCommand = readStringParam(params.input, "invokeCommand", { required: true });
const invokeCommand = readToolStringParam(params.input, "invokeCommand", { required: true });
const invokeCommandNormalized = normalizeLowercaseStringOrEmpty(invokeCommand);
if (BLOCKED_INVOKE_COMMANDS.has(invokeCommandNormalized)) {
throw new Error(
+6 -6
View File
@@ -19,7 +19,7 @@ import {
optionalStringEnum,
stringEnum,
} from "../schema/typebox.js";
import { type AnyAgentTool, jsonResult, readStringParam } from "./common.js";
import { type AnyAgentTool, jsonResult, readToolStringParam } from "./common.js";
import { gatewayCallOptionSchemaProperties } from "./gateway-schema.js";
import { callGatewayTool, readGatewayCallOptions } from "./gateway.js";
import { executeNodeCommandAction, type NodeCommandAction } from "./nodes-tool-commands.js";
@@ -188,7 +188,7 @@ export function createNodesTool(options?: {
parameters: NodesToolSchema,
execute: async (_toolCallId, args) => {
const params = args as Record<string, unknown>;
const action = readStringParam(params, "action", { required: true });
const action = readToolStringParam(params, "action", { required: true });
const gatewayOpts = readGatewayCallOptions(params);
try {
@@ -196,7 +196,7 @@ export function createNodesTool(options?: {
case "status":
return jsonResult(await callGatewayTool("node.list", gatewayOpts, {}));
case "describe": {
const node = readStringParam(params, "node");
const node = readToolStringParam(params, "node");
if (!node) {
throw new Error(
'node required for describe; call nodes with action="status" to list nodes, then retry with node',
@@ -208,7 +208,7 @@ export function createNodesTool(options?: {
case "pending":
return jsonResult(await callGatewayTool("node.pair.list", gatewayOpts, {}));
case "approve": {
const requestId = readStringParam(params, "requestId", {
const requestId = readToolStringParam(params, "requestId", {
required: true,
});
const scopes = await resolveNodePairApproveScopes(gatewayOpts, requestId);
@@ -224,7 +224,7 @@ export function createNodesTool(options?: {
);
}
case "reject": {
const requestId = readStringParam(params, "requestId", {
const requestId = readToolStringParam(params, "requestId", {
required: true,
});
return jsonResult(
@@ -234,7 +234,7 @@ export function createNodesTool(options?: {
);
}
case "notify": {
const node = readStringParam(params, "node", { required: true });
const node = readToolStringParam(params, "node", { required: true });
const title = typeof params.title === "string" ? params.title : "";
const body = typeof params.body === "string" ? params.body : "";
if (!title.trim() && !body.trim()) {
+3 -3
View File
@@ -2,7 +2,7 @@
import { createHash, randomUUID } from "node:crypto";
import { Type } from "typebox";
import { SYSTEM_AGENT_ID } from "../../system-agent/agent-id.js";
import { jsonResult, readStringParam, type AnyAgentTool } from "./common.js";
import { jsonResult, readToolStringParam, type AnyAgentTool } from "./common.js";
import { callInProcessGatewayTool, type InProcessGatewayCaller } from "./in-process-gateway.js";
const OpenClawDelegateSchema = Type.Object({
@@ -53,8 +53,8 @@ function createOpenClawDelegateTool(options?: {
outputSchema: OpenClawDelegateOutputSchema,
execute: async (_toolCallId, args) => {
const params = (args ?? {}) as Record<string, unknown>;
const message = readStringParam(params, "message", { required: true });
const sessionId = readStringParam(params, "sessionId") ?? defaultSessionId;
const message = readToolStringParam(params, "message", { required: true });
const sessionId = readToolStringParam(params, "sessionId") ?? defaultSessionId;
const callGateway = options?.callGateway ?? callInProcessGatewayTool;
const result = await callGateway<OpenClawDelegateResult>("openclaw.chat", {
sessionId,
+2 -2
View File
@@ -10,7 +10,7 @@ import {
import type { OpenClawConfig } from "../../config/types.openclaw.js";
import type { AssistantMessage } from "../../llm/types.js";
import { providerSupportsNativePdfDocument } from "../../media-understanding/defaults.js";
import { extractAssistantText } from "../embedded-agent-utils.js";
import { extractEmbeddedAssistantText } from "../embedded-agent-utils.js";
/** Normalized PDF model preference used by tool registration and execution. */
type PdfModelConfig = { primary?: string; fallbacks?: string[] };
@@ -108,7 +108,7 @@ export function coercePdfAssistantText(params: {
if (errorMessage) {
fail(errorMessage);
}
const text = extractAssistantText(params.message);
const text = extractEmbeddedAssistantText(params.message);
const trimmed = text.trim();
if (trimmed) {
return trimmed;
+4 -4
View File
@@ -4,7 +4,7 @@ import type { UiCommand, UiCommandParams } from "../../../packages/gateway-proto
// The tool returns the Gateway result unchanged, so the wire schema remains the single owner.
import { UiCommandResultSchema } from "../../../packages/gateway-protocol/src/schema/ui-command.js";
import type { AnyAgentTool } from "./common.js";
import { jsonResult, readStringParam, ToolInputError } from "./common.js";
import { jsonResult, readToolStringParam, ToolInputError } from "./common.js";
import { callInProcessGatewayTool, type InProcessGatewayCaller } from "./in-process-gateway.js";
const ACTIONS = [
@@ -41,7 +41,7 @@ function resolveSessionKey(
params: Record<string, unknown>,
agentSessionKey: string | undefined,
): string {
const sessionKey = readStringParam(params, "sessionKey") ?? agentSessionKey?.trim();
const sessionKey = readToolStringParam(params, "sessionKey") ?? agentSessionKey?.trim();
if (!sessionKey) {
throw new ToolInputError("sessionKey required");
}
@@ -49,7 +49,7 @@ function resolveSessionKey(
}
function readDock(params: Record<string, unknown>): "bottom" | "right" | undefined {
const dock = readStringParam(params, "dock");
const dock = readToolStringParam(params, "dock");
if (dock === undefined || dock === "bottom" || dock === "right") {
return dock;
}
@@ -107,7 +107,7 @@ export function createScreenTool(opts: ScreenToolOptions = {}): AnyAgentTool {
requiredClientCaps: [GATEWAY_CLIENT_CAPS.UI_COMMANDS],
execute: async (_toolCallId, rawArgs) => {
const params = rawArgs as Record<string, unknown>;
const action = readStringParam(params, "action", { required: true });
const action = readToolStringParam(params, "action", { required: true });
const payload: UiCommandParams = {
command: commandForAction(action, params, opts.agentSessionKey),
...(opts.agentSessionKey ? { sessionKey: opts.agentSessionKey } : {}),
+3 -3
View File
@@ -70,7 +70,7 @@ import type { AnyAgentTool } from "./common.js";
import {
normalizeToolModelOverride,
readNonNegativeIntegerParam,
readStringParam,
readToolStringParam,
} from "./common.js";
import {
callAgentToolGatewayRequest,
@@ -634,7 +634,7 @@ export function createSessionStatusTool(opts?: {
callGateway: gatewayCall,
});
const requestedKeyParam = readStringParam(params, "sessionKey");
const requestedKeyParam = readToolStringParam(params, "sessionKey");
const isImplicitRunSessionStatus =
requestedKeyParam === undefined && Boolean(opts?.runSessionKey?.trim());
let requestedKeyRaw = requestedKeyParam ?? opts?.agentSessionKey;
@@ -878,7 +878,7 @@ export function createSessionStatusTool(opts?: {
const configured = resolveDefaultModelForAgent({ cfg, agentId });
const selectedAgentDir = resolveAgentDir(cfg, agentId);
const selectedWorkspaceDir = resolveAgentWorkspaceDir(cfg, agentId);
const modelRaw = readStringParam(params, "model");
const modelRaw = readToolStringParam(params, "model");
let changedModel = false;
if (typeof modelRaw === "string") {
const selection = await resolveModelOverride({
+4 -4
View File
@@ -22,7 +22,7 @@ import {
jsonResult,
readNonNegativeIntegerParam,
readPositiveIntegerParam,
readStringParam,
readToolStringParam,
ToolInputError,
} from "./common.js";
import {
@@ -365,13 +365,13 @@ export function createSessionsHistoryTool(opts?: {
execute: async (_toolCallId, args) => {
const params = args as Record<string, unknown>;
const gatewayCall = opts?.callGateway ?? callAgentToolGatewayRequest;
const sessionKeyParam = readStringParam(params, "sessionKey", {
const sessionKeyParam = readToolStringParam(params, "sessionKey", {
required: true,
});
const limit = readPositiveIntegerParam(params, "limit");
const offset = readOffsetParam(params);
const messageId = readStringParam(params, "messageId");
const sessionId = readStringParam(params, "sessionId");
const messageId = readToolStringParam(params, "messageId");
const sessionId = readToolStringParam(params, "sessionId");
if (offset !== undefined && messageId) {
throw new ToolInputError("offset and messageId cannot be used together");
}

Some files were not shown because too many files have changed in this diff Show More