mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 04:15:48 -06:00
aee46707ba
* feat(plugins): load native manifest MCP servers * fix(gateway): advertise proxied plugin surface ports * fix(codex): retain MCP App transcript previews * fix(codex): render native MCP apps inline * fix(mcp-apps): resolve harness-native views by session * fix(codex): normalize null MCP result metadata * fix(ui): give inline MCP apps full message width * test(codex): use generic native MCP App fixtures * chore(plugin-sdk): refresh harness runtime baseline * refactor(codex): isolate native MCP App contracts * fix(codex): satisfy native app CI contracts * fix(ci): scope automation app tokens * chore(ci): defer token scopes to current main
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
import type { CodexDynamicToolRuntimeResponse } from "./dynamic-tool-response-state.js";
|
|
import type { CodexAppServerEventProjector } from "./event-projector.js";
|
|
import type { CodexDynamicToolCallParams, CodexDynamicToolCallResponse } from "./protocol.js";
|
|
|
|
/** Project one OpenClaw dynamic-tool response with its executed mutation identity. */
|
|
export function recordCodexDynamicToolResult(
|
|
projector: CodexAppServerEventProjector | undefined,
|
|
call: CodexDynamicToolCallParams,
|
|
response: CodexDynamicToolRuntimeResponse,
|
|
protocolResponse: CodexDynamicToolCallResponse,
|
|
): void {
|
|
projector?.recordDynamicToolResult({
|
|
callId: call.callId,
|
|
tool: call.tool,
|
|
asyncStarted: response.asyncStarted === true,
|
|
terminalResolution: response.terminalResolution,
|
|
success: protocolResponse.success,
|
|
terminalType:
|
|
response.diagnosticTerminalType ?? (protocolResponse.success ? "completed" : "error"),
|
|
sideEffectEvidence:
|
|
response.sideEffectEvidence === true ||
|
|
response.terminalResolution?.sideEffectEvidence === true,
|
|
contentItems: protocolResponse.contentItems,
|
|
details: response.transcriptDetails,
|
|
});
|
|
}
|