@openclaw/codex 2026.9.3 → 2026.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/assets/activity.svg +30 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/.setup/account-usage-runtime-C2MOIvfq.mjs +75 -0
  4. package/dist/{apply-B6el6hdO.js → .setup/apply-CJ0ZfmBG.mjs} +12 -13
  5. package/dist/.setup/async-questions-DdhOCwGi.mjs +27 -0
  6. package/dist/{attempt-client-cleanup-D6cR54TV.js → .setup/attempt-client-cleanup-BpYKdTA0.mjs} +30 -211
  7. package/dist/{attempt-context-AO4DSjE0.js → .setup/attempt-context-VXVwTCfS.mjs} +6 -6
  8. package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +5 -0
  9. package/dist/{auth-binding-Co2Vfcf_.js → .setup/auth-binding-DhLWa_7K.mjs} +2 -2
  10. package/dist/{auth-cache-key-Kq6oerr6.js → .setup/auth-cache-key-QirmgiCo.mjs} +3 -3
  11. package/dist/{auth-profile-CwzO4_RG.js → .setup/auth-profile-WqZtZfXN.mjs} +1 -1
  12. package/dist/.setup/binding-connection-Bm38niE8.mjs +50 -0
  13. package/dist/.setup/binding-connection.runtime-CnRMC0ta.mjs +48 -0
  14. package/dist/{bounded-turn-lRpmZHFv.js → .setup/bounded-turn-BtlZcivC.mjs} +19 -14
  15. package/dist/{build-state-6RL6qohz.js → .setup/build-state-Xx9ybZqa.mjs} +1 -1
  16. package/dist/{capabilities-BeqLPbtM.js → .setup/capabilities-_vXcZGSx.mjs} +1 -1
  17. package/dist/{client-BEKu4yDx.js → .setup/client-vXs2929Q.mjs} +355 -164
  18. package/dist/{command-dispatch-CisT9Jqq.js → .setup/command-dispatch-naHIZwwF.mjs} +3 -3
  19. package/dist/{command-formatters-DeTfrapr.js → .setup/command-formatters-CGEkdawF.mjs} +4 -3
  20. package/dist/{command-handlers-BfIsJEuA.js → .setup/command-handlers-BtAJEW1X.mjs} +812 -152
  21. package/dist/{command-rpc-BMqRQOFX.js → .setup/command-rpc-DHFpn4le.mjs} +37 -21
  22. package/dist/{compact-CGJZ2rlb.js → .setup/compact-C3i3qlzj.mjs} +28 -43
  23. package/dist/{config-JDfTI4VI.js → .setup/config-CedDWjM-.mjs} +5 -4
  24. package/dist/{config-options-jnIFvwxD.js → .setup/config-options-BsanJ8QG.mjs} +9 -421
  25. package/dist/{protocol-CAAcVIKF.js → .setup/config-parsing-CcB9iPoq.mjs} +9 -51
  26. package/dist/{config-runtime-BWf6JLWG.js → .setup/config-runtime-CeAhl_h4.mjs} +2 -2
  27. package/dist/.setup/config-security-BRQ2mgW9.mjs +465 -0
  28. package/dist/{config-utils-C57JiJrU.js → .setup/config-utils-DujwEnhg.mjs} +2 -4
  29. package/dist/{conversation-binding-CxOlHiix.js → .setup/conversation-binding-DhzrpTM6.mjs} +60 -47
  30. package/dist/{conversation-binding-data-BiodpIzq.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +1 -1
  31. package/dist/{conversation-control-CUCrSIQI.js → .setup/conversation-control-DN53ns41.mjs} +17 -13
  32. package/dist/.setup/cyber-failover-DYwbmf1o.mjs +123 -0
  33. package/dist/.setup/cyber-failover-notice-e9G3J9-e.mjs +17 -0
  34. package/dist/{dynamic-tools-D-JBoaLt.js → .setup/dynamic-tools-D16lOp67.mjs} +168 -61
  35. package/dist/{effective-mcp-catalog-J_5Ep5Um.js → .setup/effective-mcp-catalog-K6kLCN8X.mjs} +3 -3
  36. package/dist/{ephemeral-turn-DSwzP8YY.js → .setup/ephemeral-turn-R1gA8Sn6.mjs} +4 -5
  37. package/dist/{event-projector-assistant-message-BmBM4qBV.js → .setup/event-projector-assistant-message-DNUR1s0A.mjs} +6 -3
  38. package/dist/.setup/event-projector-items-DyTQ_XqL.mjs +200 -0
  39. package/dist/{attempt-notifications--H8zXR5-.js → .setup/event-projector-usage-C7Ntzs-f.mjs} +102 -9
  40. package/dist/{harness-FR6eQgyO.js → .setup/harness-rxaaoN-o.mjs} +90 -19
  41. package/dist/.setup/inference-context-fulhZuz8.mjs +94 -0
  42. package/dist/.setup/inference-proxy-CC15HuSi.mjs +311 -0
  43. package/dist/{isolated-completion-DHBefrzg.js → .setup/isolated-completion-B6srt48J.mjs} +7 -7
  44. package/dist/{launch-args-RXQwn8zV.js → .setup/launch-args-DnMak49W.mjs} +22 -1
  45. package/dist/{managed-binary-DrjjRRUD.js → .setup/managed-binary-DP6Rib3P.mjs} +11 -2
  46. package/dist/{managed-thread-store-D1t5jh3G.js → .setup/managed-thread-store-BMqgThVL.mjs} +48 -14
  47. package/dist/{model-catalog-B_6M04Wo.js → .setup/model-catalog-DkvUuBey.mjs} +35 -10
  48. package/dist/{models-P9k2qAof.js → .setup/models-BDFgm_G-.mjs} +3 -3
  49. package/dist/.setup/native-auth-BLZGqFjw.mjs +57 -0
  50. package/dist/.setup/native-subagent-history-YXaL6dMd.mjs +135 -0
  51. package/dist/.setup/native-subagent-monitor-B1hxzIOy.mjs +5031 -0
  52. package/dist/.setup/native-subagent-task-ids-DsuOonKv.mjs +411 -0
  53. package/dist/{node-cli-sessions-rj0ysJwM.js → .setup/node-cli-sessions-Cl8b2ZF3.mjs} +1 -1
  54. package/dist/{node-exec-server.runtime-BY_ctYnT.js → .setup/node-exec-server.runtime-BaViBKNz.mjs} +5 -5
  55. package/dist/{plan-BMJdMOEF.js → .setup/plan-xD7WKYTM.mjs} +331 -79
  56. package/dist/{plugin-activation-BQK-f5sV.js → .setup/plugin-activation-r8nq5Jzp.mjs} +24 -19
  57. package/dist/{plugin-app-cache-key-CdSQzWyX.js → .setup/plugin-app-cache-key-BOxKP7db.mjs} +29 -25
  58. package/dist/{plugin-approval-roundtrip-DeW95wB5.js → .setup/plugin-approval-roundtrip-CjfzafAZ.mjs} +1 -1
  59. package/dist/{plugin-inventory-CoRCzWW4.js → .setup/plugin-inventory-DUle8DLz.mjs} +12 -8
  60. package/dist/{plugin-marketplace-discovery-3akBizzF.js → .setup/plugin-marketplace-discovery-P-Vndfqq.mjs} +18 -15
  61. package/dist/{plugin-metadata-cache-DgNfRAGA.js → .setup/plugin-metadata-cache-DsS5buNa.mjs} +33 -14
  62. package/dist/{provider-capabilities-W4tfK5Y5.js → .setup/provider-capabilities-B8J4Dy-O.mjs} +2 -2
  63. package/dist/.setup/provider-fFh_-VR3.mjs +50 -0
  64. package/dist/{rate-limits-Bqnx1N4z.js → .setup/rate-limits-DOEGYRNs.mjs} +90 -46
  65. package/dist/.setup/request-BioXJLYa.mjs +292 -0
  66. package/dist/.setup/run-attempt-lifecycle-B7JbY4-F.mjs +71 -0
  67. package/dist/{run-attempt-DwKds3DN.js → .setup/run-attempt-rlA07pUv.mjs} +644 -491
  68. package/dist/{runtime-artifact-T-NwqeSH.js → .setup/runtime-artifact-Dy38Z5iU.mjs} +2 -2
  69. package/dist/{sandbox-guard-BcT66fWy.js → .setup/sandbox-guard-BBP-RbTf.mjs} +4 -3
  70. package/dist/{session-binding-CKSepwIC.js → .setup/session-binding-_0W_fHRr.mjs} +45 -63
  71. package/dist/{session-binding-record-CaZjYwNS.js → .setup/session-binding-record-TH3xA0zj.mjs} +181 -3
  72. package/dist/.setup/session-binding-sidecars-CKYEcfNn.mjs +543 -0
  73. package/dist/{session-catalog-adoption-BKLtSrwi.js → .setup/session-catalog-adoption-CR_whkEW.mjs} +6 -6
  74. package/dist/{session-catalog-archive-D0i2pGj2.js → .setup/session-catalog-archive-CwZaPacf.mjs} +6 -6
  75. package/dist/.setup/session-catalog-events-jMcYfQyd.mjs +250 -0
  76. package/dist/.setup/session-catalog-fUdWDx-U.mjs +2464 -0
  77. package/dist/.setup/session-catalog-index-B141u15s.mjs +1070 -0
  78. package/dist/.setup/session-catalog-index-order-Cc5BzlQr.mjs +48 -0
  79. package/dist/.setup/session-catalog-index-state-BAuDztHN.mjs +180 -0
  80. package/dist/{session-catalog-parsing-CdD3JhdM.js → .setup/session-catalog-native-projection-ChV3cCtm.mjs} +213 -21
  81. package/dist/{session-catalog-node-adoption-BUuDYY8R.js → .setup/session-catalog-node-adoption-BVRsYOSh.mjs} +3 -3
  82. package/dist/{session-catalog-node-continue-CBtc4wkI.js → .setup/session-catalog-node-continue-Dowv8osw.mjs} +7 -7
  83. package/dist/.setup/session-catalog-projection-C1Bj9Jl-.mjs +414 -0
  84. package/dist/{session-cli-CbgaHh0f.js → .setup/session-cli-DIj-IE-E.mjs} +4 -4
  85. package/dist/{session-history-Cz-tOOYj.js → .setup/session-history-C--SrLI8.mjs} +10 -5
  86. package/dist/{session-history-import-DFN7sWRU.js → .setup/session-history-import-JHXT5Xfi.mjs} +4 -4
  87. package/dist/{session-history-read-cxPUxyVV.js → .setup/session-history-read-B3ZfSUbF.mjs} +2 -2
  88. package/dist/{session-history.worker-CNEvGaU5.js → .setup/session-history.worker-CpNj7H_P.mjs} +192 -89
  89. package/dist/{session-initialization-Jo86C60I.js → .setup/session-initialization-DH1z6fXn.mjs} +2 -2
  90. package/dist/{session-permission-policy-B22InTp_.js → .setup/session-permission-policy-DhurXY0l.mjs} +2 -2
  91. package/dist/{session-retirement-BSNG_mhf.js → .setup/session-retirement-CU87AOg9.mjs} +6 -6
  92. package/dist/{settled-turn-context-Du6gdUDd.js → .setup/settled-turn-context-fmwouT5I.mjs} +2 -2
  93. package/dist/{settled-turn-finalizer-BuLUrZl2.js → .setup/settled-turn-finalizer-CiY2bLFK.mjs} +10 -10
  94. package/dist/{shared-client-CVhez2Uo.js → .setup/shared-client-BpTtuLQ5.mjs} +495 -156
  95. package/dist/{side-question-DLbr2vUU.js → .setup/side-question-DSCZyoBD.mjs} +64 -47
  96. package/dist/{source-Da-h6f7e.js → .setup/source-Bjp4UQij.mjs} +15 -14
  97. package/dist/{thread-archive-guard-D1bP04Tf.js → .setup/thread-archive-guard-jmecf6OJ.mjs} +1 -1
  98. package/dist/.setup/thread-history-page-BTx-4xsg.mjs +83 -0
  99. package/dist/{thread-lifecycle-D1pzRwHB.js → .setup/thread-lifecycle-Cik28qWn.mjs} +330 -150
  100. package/dist/{thread-ownership-D6oASVRu.js → .setup/thread-ownership-skomxnIt.mjs} +4 -4
  101. package/dist/{thread-policy-D8kI7yAO.js → .setup/thread-policy-Cjs4B8xf.mjs} +3 -3
  102. package/dist/{thread-resume-T5cveyxA.js → .setup/thread-resume-BkNpj9Pz.mjs} +8 -5
  103. package/dist/.setup/timeout-DZF05XrR.mjs +63 -0
  104. package/dist/{session-catalog-home-id-D7-aLiNt.js → .setup/transcript-history-projection-DHNBDhCU.mjs} +73 -20
  105. package/dist/{transcript-mirror-t5TOccct.js → .setup/transcript-mirror-D4qp_leP.mjs} +15 -6
  106. package/dist/{transcript-mirror-attestation-DibE0krH.js → .setup/transcript-mirror-attestation-CzM-94NC.mjs} +4 -1
  107. package/dist/{transport-stdio-BGjHoYLr.js → .setup/transport-stdio-Cmx94Oiy.mjs} +149 -44
  108. package/dist/{upstream-session-fork-De-sLJ2r.js → .setup/upstream-session-fork-D3UKxgVD.mjs} +27 -26
  109. package/dist/{usage-CPPTmBvZ.js → .setup/usage-BOgBEKso.mjs} +4 -4
  110. package/dist/.setup/usage-limit-error-C0ow7DOc.mjs +166 -0
  111. package/dist/{version-omm6IPI3.js → .setup/version-CoqzXPgK.mjs} +1 -1
  112. package/dist/{web-search-provider.runtime-CSVgQL0w.js → .setup/web-search-provider.runtime-CTGuJt6i.mjs} +3 -3
  113. package/dist/api.js +28 -20
  114. package/dist/cli-metadata.js +1 -1
  115. package/dist/doctor-contract-api.js +8 -528
  116. package/dist/harness.js +1 -1
  117. package/dist/index.js +130 -135
  118. package/dist/media-understanding-provider.js +3 -3
  119. package/dist/migration-provider-api.js +2 -0
  120. package/dist/native-tool-policy.js +12 -0
  121. package/dist/provider-discovery.js +18 -0
  122. package/dist/session-history-worker-runtime.js +23 -5
  123. package/dist/session-history.worker.js +2 -2
  124. package/dist/web-search-contract-api.js +1 -1
  125. package/openclaw.plugin.json +354 -68
  126. package/package.json +11 -8
  127. package/dist/binding-connection-QqgcPCgk.js +0 -60
  128. package/dist/event-projector-usage-CIyrYYid.js +0 -102
  129. package/dist/native-subagent-monitor-BbCUKRwC.js +0 -3350
  130. package/dist/request-CGvGOpeR.js +0 -198
  131. package/dist/session-catalog-HaDcp7Sv.js +0 -1533
  132. package/dist/session-catalog-provenance-DkJHo735.js +0 -124
  133. package/dist/timeout-BVw8aaM1.js +0 -33
  134. package/dist/{auth-profile-selection-DFu9e167.js → .setup/auth-profile-selection-DFu9e167.mjs} +0 -0
  135. package/dist/{context-compaction-activity-CMla5FPJ.js → .setup/context-compaction-activity-CMla5FPJ.mjs} +0 -0
  136. package/dist/{elicitation-input-DPoK8F7w.js → .setup/elicitation-input-DPoK8F7w.mjs} +0 -0
  137. package/dist/{history-rejection-B4nOXNXF.js → .setup/history-rejection-B4nOXNXF.mjs} +0 -0
  138. package/dist/{image-payload-sanitizer-tupAr-2o.js → .setup/image-payload-sanitizer-tupAr-2o.mjs} +0 -0
  139. package/dist/{incognito-session-uhrBF6wJ.js → .setup/incognito-session-uhrBF6wJ.mjs} +0 -0
  140. package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
  141. package/dist/{native-execution-policy-umd0tgh4.js → .setup/native-execution-policy-YBMHSzC4.mjs} +1 -1
  142. /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
  143. /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
  144. /package/dist/{session-upstream-marker-D15C9NHp.js → .setup/session-upstream-marker-D15C9NHp.mjs} +0 -0
  145. /package/dist/{upstream-prompt-provenance-LphB8slG.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +0 -0
  146. /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
@@ -1,13 +1,17 @@
1
- import { a as flattenCodexDynamicToolFunctions, o as isJsonObject, r as CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE, x as readCodexPluginConfig, y as isCodexRemoteExecPlacementSandbox } from "./protocol-CAAcVIKF.js";
2
- import { B as withDynamicToolTranscriptDetails, E as createCodexElicitationResponse, L as resolveCodexToolAbortTerminalReason, R as createFailedDynamicToolResponse, w as readCodexTurn, z as withDynamicToolExecutionState } from "./client-BEKu4yDx.js";
3
- import { a as formatCodexDisplayText } from "./command-formatters-DeTfrapr.js";
4
- import "./config-JDfTI4VI.js";
5
- import { r as sanitizeInlineImageDataUrl, t as invalidInlineImageText } from "./image-payload-sanitizer-tupAr-2o.js";
6
- import { E as itemStatus, L as readItem, T as itemName, b as auditNativeToolUnfinishedStatus, h as isCodexNotificationForTurn, k as shouldClearTerminalPresentationForNativeItem, v as auditNativeToolName, y as auditNativeToolTerminalStatus } from "./attempt-client-cleanup-D6cR54TV.js";
7
- import { B as emitCodexNativePreToolUseFailureDiagnostic, S as resolveCodexWebSearchPlan, it as isForcedPrivateQaCodexRuntime, nt as filterCodexDynamicTools, ot as isSystemAgentOnlyCodexDynamicToolAllowlist, rt as filterCodexDynamicToolsForDisabledNativeSurface, st as normalizeCodexDynamicToolName } from "./thread-lifecycle-D1pzRwHB.js";
8
- import { n as resolveCodexNativeExecutionPolicy, r as resolveCodexNodeExecToolOverrides } from "./native-execution-policy-umd0tgh4.js";
9
- import { a as CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME, c as createNodeExecAliasDynamicTool, i as CODEX_GATEWAY_PROCESS_DYNAMIC_TOOL_NAME, l as isCodexDynamicToolExcluded, o as createGatewayExecProjection, r as CODEX_GATEWAY_EXEC_DYNAMIC_TOOL_NAME, s as createGatewayProcessProjection } from "./provider-capabilities-W4tfK5Y5.js";
10
- import { a as requestPluginApprovalOutcome, c as truncateCodexApprovalDisplayText, i as requestPluginApproval, l as waitForPluginApprovalDecision, n as codexApprovalTimeoutText, o as sanitizeCodexApprovalVisibleText, r as mapExecDecisionToOutcome, s as stripDanglingCodexApprovalTerminalSequence, t as approvalRequestExplicitlyUnavailable } from "./plugin-approval-roundtrip-DeW95wB5.js";
1
+ import { CODEX_NATIVE_TOOL_REQUIREMENTS } from "../native-tool-policy.js";
2
+ import { d as CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE, m as isJsonObject, p as flattenCodexDynamicToolFunctions } from "./config-security-BRQ2mgW9.mjs";
3
+ import { d as readCodexPluginConfig, l as isCodexRemoteExecPlacementSandbox } from "./config-parsing-CcB9iPoq.mjs";
4
+ import { B as withDynamicToolTranscriptDetails, E as createCodexElicitationResponse, L as resolveCodexToolAbortTerminalReason, R as createFailedDynamicToolResponse, w as readCodexTurn, z as withDynamicToolExecutionState } from "./client-vXs2929Q.mjs";
5
+ import { o as formatCodexDisplayText } from "./command-formatters-CGEkdawF.mjs";
6
+ import { c as itemName, f as shouldClearTerminalPresentationForNativeItem, l as itemStatus, n as auditNativeToolTerminalStatus, r as auditNativeToolUnfinishedStatus, t as auditNativeToolName, x as readItem } from "./event-projector-items-DyTQ_XqL.mjs";
7
+ import { s as codexAppIdentityKey } from "./plugin-app-cache-key-BOxKP7db.mjs";
8
+ import "./config-CedDWjM-.mjs";
9
+ import { r as sanitizeInlineImageDataUrl, t as invalidInlineImageText } from "./image-payload-sanitizer-tupAr-2o.mjs";
10
+ import { v as isCodexNotificationForTurn } from "./attempt-client-cleanup-BpYKdTA0.mjs";
11
+ import { H as emitCodexNativePreToolUseFailureDiagnostic, at as filterCodexDynamicToolsForDisabledNativeSurface, ct as isSystemAgentOnlyCodexDynamicToolAllowlist, it as filterCodexDynamicTools, lt as normalizeCodexDynamicToolName, ot as isForcedPrivateQaCodexRuntime, w as resolveCodexWebSearchPlan } from "./thread-lifecycle-Cik28qWn.mjs";
12
+ import { n as resolveCodexNativeExecutionPolicy, r as resolveCodexNodeExecToolOverrides } from "./native-execution-policy-YBMHSzC4.mjs";
13
+ import { a as CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME, c as createNodeExecAliasDynamicTool, i as CODEX_GATEWAY_PROCESS_DYNAMIC_TOOL_NAME, l as isCodexDynamicToolExcluded, o as createGatewayExecProjection, r as CODEX_GATEWAY_EXEC_DYNAMIC_TOOL_NAME, s as createGatewayProcessProjection } from "./provider-capabilities-B8J4Dy-O.mjs";
14
+ import { a as requestPluginApprovalOutcome, c as truncateCodexApprovalDisplayText, i as requestPluginApproval, l as waitForPluginApprovalDecision, n as codexApprovalTimeoutText, o as sanitizeCodexApprovalVisibleText, r as mapExecDecisionToOutcome, s as stripDanglingCodexApprovalTerminalSequence, t as approvalRequestExplicitlyUnavailable } from "./plugin-approval-roundtrip-CjfzafAZ.mjs";
11
15
  import { createRequire } from "node:module";
12
16
  import { asNonArrayRecord, asOptionalRecord, isRecord, normalizeOptionalString, normalizeTrimmedStringList, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
13
17
  import { createHash, randomUUID } from "node:crypto";
@@ -20,22 +24,22 @@ import { once } from "node:events";
20
24
  import { spawn } from "node:child_process";
21
25
  import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
22
26
  import { DEFAULT_MAX_LIVE_TOOL_RESULT_CHARS, estimateToolResultTextChars, resolveLiveToolResultMaxChars, sliceToolResultTextToBudget, sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
27
+ import { emitTrustedDiagnosticEvent } from "openclaw/plugin-sdk/diagnostic-runtime";
23
28
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
24
29
  import { createStageTimingTracker, formatStageTimings } from "openclaw/plugin-sdk/time-runtime";
25
30
  import { isPathStrictlyInside, root } from "openclaw/plugin-sdk/file-access-runtime";
26
31
  import { fileURLToPath, pathToFileURL } from "node:url";
27
32
  import { resolveAgentDir } from "openclaw/plugin-sdk/agent-runtime";
28
- import { HEARTBEAT_RESPONSE_TOOL_NAME, buildAgentHookContextChannelFields, buildEmbeddedAttemptToolRunContext, consumeAdjustedParamsForToolCall, consumePreExecutionBlockedToolCall, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, embeddedAgentLog, extractMessagingToolSend, extractMessagingToolSendResult, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeAgentToolAvailability, finalizeToolTerminalPresentation, formatApprovalDisplayPath, formatToolExecutionErrorMessage, getBeforeToolCallFailureDisposition, getChannelAgentToolMeta, getPluginToolMeta, getPluginToolSideEffectOwnerKey, hasNativeHookRelayInvocation, invokeNativeHookRelay, isDeliveredMessageToolOnlySourceReplyResult, isDeliveredMessagingToolResult, isHostScopedAgentToolActive, isMessagingTool, isMessagingToolSendAction, isReplaySafeToolCall, isSubagentSessionKey, isToolResultError, isToolWrappedWithBeforeToolCallHook, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, projectRuntimeToolInputSchema, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, resolveToolExecutionErrorKind, resolveToolResultFailureKind, runAgentHarnessAfterToolCallHook, sanitizeToolResult, setBeforeToolCallDiagnosticsEnabled, supportsModelTools, wrapToolWithBeforeToolCallHook } from "openclaw/plugin-sdk/agent-harness-runtime";
33
+ import { HEARTBEAT_RESPONSE_TOOL_NAME, applyEmbeddedAttemptToolsAllow, buildAgentHookContextChannelFields, buildEmbeddedAttemptToolRunContext, consumeAdjustedParamsForToolCall, consumePreExecutionBlockedToolCall, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, embeddedAgentLog, extractMessagingToolSend, extractMessagingToolSendResult, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeAgentToolAvailability, finalizeToolTerminalPresentation, formatApprovalDisplayPath, formatToolExecutionErrorMessage, getBeforeToolCallFailureDisposition, getChannelAgentToolMeta, getPluginToolMeta, getPluginToolSideEffectOwnerKey, hasNativeHookRelayInvocation, invokeNativeHookRelay, isDeliveredMessageToolOnlySourceReplyResult, isDeliveredMessagingToolResult, isHostScopedAgentToolActive, isMessagingTool, isMessagingToolSendAction, isReplaySafeToolCall, isSubagentSessionKey, isToolResultError, isToolWrappedWithBeforeToolCallHook, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, projectRuntimeToolInputSchema, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, resolveToolExecutionErrorKind, resolveToolResultFailureKind, runAgentHarnessAfterToolCallHook, sanitizeToolResult, setBeforeToolCallDiagnosticsEnabled, supportsModelTools, wrapToolWithBeforeToolCallHook } from "openclaw/plugin-sdk/agent-harness-runtime";
29
34
  import { formatErrorMessage as formatErrorMessage$2, redactSensitiveText } from "openclaw/plugin-sdk/security-runtime";
30
- import { emitTrustedDiagnosticEvent } from "openclaw/plugin-sdk/diagnostic-runtime";
35
+ import { consumeTrustedToolNoStartError, copyInternalToolResultState, getCoreTtsToolResultMediaUrls } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
31
36
  import { isIP } from "node:net";
32
37
  import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
33
38
  import { formatMcpCodexApprovalRemedy, requiresMcpCodexToolApproval, resolveCodexScheduledToolProjectionFactory, resolveProjectedMcpCodexToolApprovalMode, runWithCronCreatorAuthorityCapabilityResolver } from "openclaw/plugin-sdk/codex-mcp-projection";
34
39
  import { buildRemoteCommand, isToolAllowed, sanitizeEnvVars } from "openclaw/plugin-sdk/sandbox";
40
+ import { SsrFBlockedError, isBlockedHostnameOrIp } from "openclaw/plugin-sdk/ssrf-runtime";
35
41
  import { saveMediaBuffer } from "openclaw/plugin-sdk/media-store";
36
42
  import { getMediaDir } from "openclaw/plugin-sdk/media-runtime";
37
- import { consumeTrustedToolNoStartError, copyInternalToolResultState, getCoreTtsToolResultMediaUrls } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
38
- import { SsrFBlockedError, isBlockedHostnameOrIp } from "openclaw/plugin-sdk/ssrf-runtime";
39
43
  import { normalizeOpenAIStrictCompatSchema } from "openclaw/plugin-sdk/provider-tools";
40
44
  //#region extensions/codex/src/app-server/dynamic-tool-build-state.ts
41
45
  /** Mutable dependency seam shared by dynamic-tool construction and its behavioral tests. */
@@ -105,14 +109,6 @@ function filterCodexVisionTools(tools, params) {
105
109
  * OpenClaw-owned tools, Codex native-tool fallback rules, sandbox shell shims,
106
110
  * and provider allowlist normalization.
107
111
  */
108
- const CODEX_NATIVE_SANDBOX_TOOL_REQUIREMENTS = [
109
- "exec",
110
- "process",
111
- "read",
112
- "write",
113
- "edit",
114
- "apply_patch"
115
- ];
116
112
  const CODEX_MEMORY_FLUSH_DYNAMIC_TOOL_ALLOW = /* @__PURE__ */ new Set(["read", "write"]);
117
113
  const CODEX_DISABLED_NATIVE_SHELL_DYNAMIC_TOOLS = /* @__PURE__ */ new Set([
118
114
  "exec",
@@ -209,6 +205,7 @@ async function buildDynamicTools(input) {
209
205
  nativeToolSurfaceEnabled: input.nativeToolSurfaceEnabled,
210
206
  nativeProviderWebSearchSupport: input.nativeProviderWebSearchSupport
211
207
  });
208
+ const messageToolProvider = resolveCodexMessageToolProvider(params);
212
209
  const webFetchHostnameAllowlistRef = {};
213
210
  const toolConstructionPlan = resolveCodexNodePlacementToolConstructionPlan(input.sandbox, input.nativeToolSurfaceEnabled);
214
211
  const options = {
@@ -228,11 +225,11 @@ async function buildDynamicTools(input) {
228
225
  } : void 0,
229
226
  sandbox: input.sandbox,
230
227
  ...toolConstructionPlan ? { toolConstructionPlan } : {},
231
- messageProvider: resolveCodexMessageToolProvider(params),
228
+ messageProvider: messageToolProvider,
232
229
  toolPolicyMessageProvider: params.messageProvider ?? params.messageChannel,
233
230
  ...params.onToolResult ? { questionPrompt: {
234
231
  send: params.onToolResult,
235
- ...params.messageChannel ? { messageChannel: params.messageChannel } : {}
232
+ messageChannel: messageToolProvider
236
233
  } } : {},
237
234
  inputProvenance: params.inputProvenance,
238
235
  trustedInternalHandoff: params.trustedInternalHandoff,
@@ -335,7 +332,7 @@ async function buildDynamicTools(input) {
335
332
  agentId: input.policyAgentId,
336
333
  sessionKey: input.sandboxSessionKey,
337
334
  sandboxToolPolicy: input.sandbox?.tools,
338
- messageProvider: resolveCodexMessageToolProvider(params),
335
+ messageProvider: messageToolProvider,
339
336
  agentAccountId: params.agentAccountId,
340
337
  groupId: params.groupId,
341
338
  groupChannel: params.groupChannel,
@@ -456,7 +453,7 @@ function canCodexAppServerNativeToolSurfaceHonorSandbox(sandbox, options = {}) {
456
453
  return false;
457
454
  }
458
455
  function canSandboxToolPolicyExposeCodexNativeToolSurface(sandbox) {
459
- return CODEX_NATIVE_SANDBOX_TOOL_REQUIREMENTS.every((toolName) => isToolAllowed(sandbox.tools, toolName));
456
+ return CODEX_NATIVE_TOOL_REQUIREMENTS.every((toolName) => isToolAllowed(sandbox.tools, toolName));
460
457
  }
461
458
  function isCodexMemoryFlushRun(params) {
462
459
  return params?.trigger === "memory" && Boolean(params.memoryFlushWritePath?.trim());
@@ -565,13 +562,12 @@ function placeDisabledNativeShellToolsInDirectNamespace(tools, nativeToolSurface
565
562
  }
566
563
  /** Applies a normalized tool allowlist while preserving shell aliases for exec/process. */
567
564
  function filterCodexDynamicToolsForAllowlist(tools, toolsAllow) {
568
- if (!toolsAllow) return tools;
569
- if (toolsAllow.length === 0) return [];
570
- if (hasWildcardCodexToolsAllow(toolsAllow)) return tools;
571
- const allowSet = new Set(toolsAllow.map((name) => normalizeCodexDynamicToolName(name)).filter(Boolean));
572
- return tools.filter((tool) => {
573
- const normalized = normalizeCodexDynamicToolName(tool.name);
574
- return allowSet.has(normalized) || normalized === "sandbox_exec" && allowSet.has("exec") || normalized === "sandbox_process" && (allowSet.has("exec") || allowSet.has("process")) || normalized === "gateway_exec" && allowSet.has("exec") || normalized === "gateway_process" && (allowSet.has("exec") || allowSet.has("process")) || normalized === "node_exec" && allowSet.has("exec");
565
+ return applyEmbeddedAttemptToolsAllow(tools, toolsAllow, {
566
+ toolMeta: getPluginToolMeta,
567
+ toolAliases: (tool) => {
568
+ const normalized = normalizeCodexDynamicToolName(tool.name);
569
+ return normalized === "sandbox_exec" || normalized === "gateway_exec" || normalized === "node_exec" ? ["exec"] : normalized === "sandbox_process" || normalized === "gateway_process" ? ["exec", "process"] : [];
570
+ }
575
571
  });
576
572
  }
577
573
  /** Detects the wildcard allowlist marker after Codex tool-name normalization. */
@@ -1854,32 +1850,50 @@ async function readFile(execServer, params) {
1854
1850
  async function writeFile(execServer, params) {
1855
1851
  const record = requireObject(params, "fs/writeFile params");
1856
1852
  const filePath = resolveExecServerPath(requireString(record.path, "path"), "write path");
1853
+ const fsBridge = execServer.fsBridge;
1854
+ const canonicalDestination = await fsBridge.resolvePinnedMutationTarget?.({
1855
+ filePath,
1856
+ action: "write"
1857
+ });
1857
1858
  assertFsSandboxAccess(execServer, record, [{
1858
1859
  path: filePath,
1859
1860
  access: "write"
1860
- }]);
1861
- const fsBridge = execServer.fsBridge;
1861
+ }, ...canonicalDestination ? [{
1862
+ path: canonicalDestination.policyPath,
1863
+ access: "write"
1864
+ }] : []]);
1862
1865
  if ((await fsBridge.stat({ filePath: posix.dirname(filePath) }))?.type !== "directory") throw new JsonRpcProtocolError(JSON_RPC_NOT_FOUND, "parent directory not found");
1863
1866
  await fsBridge.writeFile({
1864
1867
  filePath,
1865
1868
  data: Buffer.from(requireBase64String(record.dataBase64, "dataBase64"), "base64"),
1866
- mkdir: false
1869
+ mkdir: false,
1870
+ pinnedPath: canonicalDestination?.pinnedPath
1867
1871
  });
1868
1872
  }
1869
1873
  /** Creates a sandbox directory, respecting recursive and parent-directory semantics. */
1870
1874
  async function createDirectory(execServer, params) {
1871
1875
  const record = requireObject(params, "fs/createDirectory params");
1872
1876
  const filePath = resolveExecServerPath(requireString(record.path, "path"), "create-directory path");
1877
+ const fsBridge = execServer.fsBridge;
1878
+ const canonicalDestination = await fsBridge.resolvePinnedMutationTarget?.({
1879
+ filePath,
1880
+ action: "mkdir"
1881
+ });
1873
1882
  assertFsSandboxAccess(execServer, record, [{
1874
1883
  path: filePath,
1875
1884
  access: "write"
1876
- }]);
1877
- const fsBridge = execServer.fsBridge;
1885
+ }, ...canonicalDestination ? [{
1886
+ path: canonicalDestination.policyPath,
1887
+ access: "write"
1888
+ }] : []]);
1878
1889
  if (record.recursive === false) {
1879
1890
  const parentPath = posix.dirname(filePath);
1880
1891
  if ((await fsBridge.stat({ filePath: parentPath }))?.type !== "directory") throw new JsonRpcProtocolError(JSON_RPC_NOT_FOUND, "parent directory not found");
1881
1892
  }
1882
- await fsBridge.mkdirp({ filePath });
1893
+ await fsBridge.mkdirp({
1894
+ filePath,
1895
+ pinnedPath: canonicalDestination?.pinnedPath
1896
+ });
1883
1897
  }
1884
1898
  /** Returns normalized metadata for a sandbox path. */
1885
1899
  async function getMetadata(execServer, params) {
@@ -1928,15 +1942,26 @@ async function removePath(execServer, params) {
1928
1942
  const record = requireObject(params, "fs/remove params");
1929
1943
  const filePath = resolveExecServerPath(requireString(record.path, "path"), "remove path");
1930
1944
  const fsSandboxPolicy = resolveFsSandboxPolicy(execServer, record);
1945
+ const canonicalDestination = await execServer.fsBridge.resolvePinnedMutationTarget?.({
1946
+ filePath,
1947
+ action: "remove"
1948
+ });
1931
1949
  assertResolvedFsSandboxAccess(fsSandboxPolicy, [{
1932
1950
  path: filePath,
1933
1951
  access: "write"
1934
- }]);
1935
- if (record.recursive !== false) assertNoReadOnlyDescendant(fsSandboxPolicy, filePath, "remove");
1952
+ }, ...canonicalDestination ? [{
1953
+ path: canonicalDestination.policyPath,
1954
+ access: "write"
1955
+ }] : []]);
1956
+ if (record.recursive !== false) {
1957
+ assertNoReadOnlyDescendant(fsSandboxPolicy, filePath, "remove");
1958
+ if (canonicalDestination) assertNoReadOnlyDescendant(fsSandboxPolicy, canonicalDestination.policyPath, "remove");
1959
+ }
1936
1960
  await execServer.fsBridge.remove({
1937
1961
  filePath,
1938
1962
  recursive: record.recursive !== false,
1939
- force: record.force !== false
1963
+ force: record.force !== false,
1964
+ pinnedPath: canonicalDestination?.pinnedPath
1940
1965
  });
1941
1966
  }
1942
1967
  /** Copies sandbox files or recursive directories while enforcing source and destination policy. */
@@ -1970,10 +1995,25 @@ async function copySandboxPath(execServer, params) {
1970
1995
  }]);
1971
1996
  const sourceStat = await fsBridge.stat({ filePath: params.sourcePath });
1972
1997
  if (!sourceStat) throw new JsonRpcProtocolError(JSON_RPC_NOT_FOUND, "file not found");
1973
- if (sourceStat?.type === "directory") {
1998
+ const canonicalDestination = await fsBridge.resolvePinnedMutationTarget?.({
1999
+ filePath: params.destinationPath,
2000
+ action: sourceStat.type === "directory" ? "mkdir" : "copy-destination"
2001
+ });
2002
+ const canonicalPolicyEntries = canonicalDestination ? [{
2003
+ path: canonicalDestination.policyPath,
2004
+ access: "write"
2005
+ }] : [];
2006
+ assertResolvedFsSandboxAccess(params.fsSandboxPolicy, canonicalPolicyEntries);
2007
+ if (sourceStat.type === "directory") {
1974
2008
  if (!params.recursive) throw new Error(`Cannot copy directory without recursive=true: ${params.sourcePath}`);
1975
- if (pathContains(normalizeSandboxAbsolutePath(params.sourcePath, "copy source path"), normalizeSandboxAbsolutePath(params.destinationPath, "copy destination path"))) throw new Error("Cannot recursively copy a directory into itself.");
1976
- await fsBridge.mkdirp({ filePath: params.destinationPath });
2009
+ if (pathContains(normalizeSandboxAbsolutePath((await fsBridge.resolvePinnedMutationTarget?.({
2010
+ filePath: params.sourcePath,
2011
+ action: "mkdir"
2012
+ }))?.policyPath ?? params.sourcePath, "copy source path"), normalizeSandboxAbsolutePath(canonicalDestination?.policyPath ?? params.destinationPath, "copy destination path"))) throw new Error("Cannot recursively copy a directory into itself.");
2013
+ await fsBridge.mkdirp({
2014
+ filePath: params.destinationPath,
2015
+ pinnedPath: canonicalDestination?.pinnedPath
2016
+ });
1977
2017
  for (const entry of await listDirectoryEntries(execServer, params.sourcePath, params.fsSandboxPolicy)) {
1978
2018
  if (!entry.isDirectory && !entry.isFile) throw new Error(`Cannot copy unsupported filesystem entry: ${entry.fileName}`);
1979
2019
  await copySandboxPath(execServer, {
@@ -1989,7 +2029,8 @@ async function copySandboxPath(execServer, params) {
1989
2029
  await fsBridge.copyFile({
1990
2030
  sourcePath: params.sourcePath,
1991
2031
  destinationPath: params.destinationPath,
1992
- mkdir: true
2032
+ mkdir: true,
2033
+ pinnedPath: canonicalDestination?.pinnedPath
1993
2034
  });
1994
2035
  return;
1995
2036
  }
@@ -2001,7 +2042,8 @@ async function copySandboxPath(execServer, params) {
2001
2042
  await fsBridge.writeFile({
2002
2043
  filePath: params.destinationPath,
2003
2044
  data,
2004
- mkdir: true
2045
+ mkdir: true,
2046
+ pinnedPath: canonicalDestination?.pinnedPath
2005
2047
  });
2006
2048
  }
2007
2049
  function assertSandboxFileReadWithinLimit(stat) {
@@ -4220,7 +4262,7 @@ function resolvePluginElicitation(params) {
4220
4262
  const appId = readFirstString$1(meta, PLUGIN_APP_ID_META_KEYS) ?? readFirstString$1(requestParams, PLUGIN_APP_ID_META_KEYS);
4221
4263
  const connectorId = readFirstString$1(meta, PLUGIN_CONNECTOR_ID_META_KEYS);
4222
4264
  const isCodexConnectorApproval = isCodexConnectorApprovalElicitation(requestParams, meta);
4223
- if (isCodexConnectorApproval && appId && connectorId && appId !== connectorId) return {
4265
+ if (isCodexConnectorApproval && appId && connectorId && codexAppIdentityKey(appId) !== codexAppIdentityKey(connectorId)) return {
4224
4266
  kind: "decline",
4225
4267
  reason: "app_id_connector_id_mismatch"
4226
4268
  };
@@ -4229,20 +4271,19 @@ function resolvePluginElicitation(params) {
4229
4271
  kind: "decline",
4230
4272
  reason: "missing_policy_context"
4231
4273
  };
4232
- const entry = context.apps[appId];
4233
- if (entry?.source === "account" && !isCodexConnectorApproval) return {
4274
+ const matches = Object.entries(context.apps).filter(([id]) => codexAppIdentityKey(id) === codexAppIdentityKey(appId)).map(([, entry]) => entry);
4275
+ if (matches.some((entry) => entry.source === "account") && !isCodexConnectorApproval) return {
4234
4276
  kind: "decline",
4235
4277
  reason: "account_app_source_mismatch"
4236
4278
  };
4237
- return uniquePluginMatch(entry ? [entry] : [], "app_id");
4279
+ return uniquePluginMatch(matches, "app_id");
4238
4280
  }
4239
4281
  if (isCodexConnectorApproval && connectorId) {
4240
4282
  if (!context) return {
4241
4283
  kind: "decline",
4242
4284
  reason: "missing_policy_context"
4243
4285
  };
4244
- const entry = context.apps[connectorId];
4245
- return uniquePluginMatch(entry ? [entry] : [], "connector_id");
4286
+ return uniquePluginMatch(Object.entries(context.apps).filter(([id]) => codexAppIdentityKey(id) === codexAppIdentityKey(connectorId)).map(([, entry]) => entry), "connector_id");
4246
4287
  }
4247
4288
  const serverName = readNonBlankStringField(requestParams, "serverName");
4248
4289
  if (serverName && context) {
@@ -4662,6 +4703,64 @@ function readFirstString$1(record, keys) {
4662
4703
  }
4663
4704
  }
4664
4705
  //#endregion
4706
+ //#region extensions/codex/src/app-server/dynamic-tool-automations-allowlist.ts
4707
+ function createCodexAutomationsToolsAllowResolver(specs) {
4708
+ const names = /* @__PURE__ */ new Set();
4709
+ const qualifiedNames = /* @__PURE__ */ new Map();
4710
+ for (const spec of specs) {
4711
+ if (spec.type === "function") {
4712
+ names.add(spec.name);
4713
+ continue;
4714
+ }
4715
+ for (const tool of spec.tools) {
4716
+ names.add(tool.name);
4717
+ const separator = spec.name.endsWith("_") || tool.name.startsWith("_") ? "" : "__";
4718
+ qualifiedNames.set(`${spec.name}${separator}${tool.name}`, tool.name);
4719
+ }
4720
+ }
4721
+ function resolveList(value) {
4722
+ const resolved = value.map((name) => typeof name !== "string" || names.has(name) ? name : qualifiedNames.get(name) ?? name);
4723
+ return resolved.every((name, index) => name === value[index]) ? value : resolved;
4724
+ }
4725
+ function resolvePayload(value) {
4726
+ if (!isJsonObject(value) || !Array.isArray(value.toolsAllow)) return value;
4727
+ const toolsAllow = resolveList(value.toolsAllow);
4728
+ return toolsAllow === value.toolsAllow ? value : {
4729
+ ...value,
4730
+ toolsAllow
4731
+ };
4732
+ }
4733
+ function resolveJobFields(value, paddedKeys) {
4734
+ let resolved = value;
4735
+ for (const [key, entry] of Object.entries(value)) {
4736
+ const field = paddedKeys ? key.trim() : key;
4737
+ if (key !== field && Object.hasOwn(value, field)) continue;
4738
+ const next = field === "toolsAllow" && Array.isArray(entry) ? resolveList(entry) : field === "payload" || field === "namePayload" ? resolvePayload(entry) : entry;
4739
+ if (next !== entry) {
4740
+ if (resolved === value) resolved = { ...value };
4741
+ resolved[key] = next;
4742
+ }
4743
+ }
4744
+ return resolved;
4745
+ }
4746
+ return (args) => {
4747
+ if (!isJsonObject(args)) return args;
4748
+ const job = args.job;
4749
+ if (!job || isJsonObject(job) && Object.keys(job).length === 0) return resolveJobFields(args, false);
4750
+ if (!isJsonObject(job)) return args;
4751
+ const wrapper = isJsonObject(job.data) ? "data" : isJsonObject(job.job) ? "job" : void 0;
4752
+ const wrapped = wrapper ? job[wrapper] : void 0;
4753
+ const resolved = wrapper && isJsonObject(wrapped) ? {
4754
+ ...job,
4755
+ [wrapper]: resolveJobFields(wrapped, true)
4756
+ } : resolveJobFields(job, true);
4757
+ return resolved === job ? args : {
4758
+ ...args,
4759
+ job: resolved
4760
+ };
4761
+ };
4762
+ }
4763
+ //#endregion
4665
4764
  //#region extensions/codex/src/app-server/dynamic-tool-catalog.ts
4666
4765
  /** Namespace attached to OpenClaw-owned dynamic tools exposed to Codex. */
4667
4766
  const CODEX_OPENCLAW_DYNAMIC_TOOL_NAMESPACE = "openclaw";
@@ -5083,6 +5182,11 @@ function createCodexDynamicToolBridge(params) {
5083
5182
  const registrationNames = inheritedNames ?? new Set(registeredProjection.tools.map((entry) => entry.name));
5084
5183
  const finalized = finalizeCodexToolAvailability(availableProjection.tools.filter((entry) => registrationNames.has(entry.name)));
5085
5184
  const availableTools = finalized.tools;
5185
+ const pluginLocalMediaTrustByToolName = /* @__PURE__ */ new Map();
5186
+ for (const { name, tool } of availableTools) {
5187
+ const pluginMeta = getPluginToolMeta(tool);
5188
+ if (pluginMeta) pluginLocalMediaTrustByToolName.set(name, new Set(pluginMeta.trustedLocalMedia === true ? [name] : []));
5189
+ }
5086
5190
  availableProjection.quarantinedTools.push(...finalized.quarantinedTools);
5087
5191
  const toolMap = new Map(availableTools.map((entry) => [entry.name, entry]));
5088
5192
  const quarantinedAvailableToolNames = new Set(availableProjection.quarantinedTools.map((tool) => tool.tool));
@@ -5121,6 +5225,12 @@ function createCodexDynamicToolBridge(params) {
5121
5225
  const legacyExtensionRunner = createCodexAppServerToolResultExtensionRunner(toolResultHookContext);
5122
5226
  const executionSnapshotStates = /* @__PURE__ */ new Map();
5123
5227
  const directToolNames = params.directToolNames;
5228
+ const specs = inheritedSpecs ?? createCodexDynamicToolSpecs({
5229
+ entries: registeredSpecTools,
5230
+ loading: params.loading ?? "searchable",
5231
+ directToolNames
5232
+ });
5233
+ const resolveAutomationsToolsAllow = createCodexAutomationsToolsAllowResolver(specs);
5124
5234
  let readRemoteWorkspaceFile;
5125
5235
  return {
5126
5236
  availableTools: availableTools.map((entry) => entry.tool),
@@ -5136,11 +5246,7 @@ function createCodexDynamicToolBridge(params) {
5136
5246
  loading: params.loading ?? "searchable",
5137
5247
  directToolNames
5138
5248
  }),
5139
- specs: inheritedSpecs ?? createCodexDynamicToolSpecs({
5140
- entries: registeredSpecTools,
5141
- loading: params.loading ?? "searchable",
5142
- directToolNames
5143
- }),
5249
+ specs,
5144
5250
  resultContentSourceForTool: (toolName) => toolMap.get(toolName)?.tool.resultContentSource,
5145
5251
  sideEffectOwnerKeyForTool: (toolName) => {
5146
5252
  const tool = toolMap.get(toolName)?.tool;
@@ -5177,7 +5283,7 @@ function createCodexDynamicToolBridge(params) {
5177
5283
  });
5178
5284
  }
5179
5285
  const { tool, name: toolName } = toolEntry;
5180
- const rawArguments = call.arguments;
5286
+ const rawArguments = toolName === "automations" ? resolveAutomationsToolsAllow(call.arguments) : call.arguments;
5181
5287
  const args = asNonArrayRecord(rawArguments);
5182
5288
  const startedAt = Date.now();
5183
5289
  const signal = composeAbortSignals(params.signal, options?.signal);
@@ -5338,7 +5444,8 @@ function createCodexDynamicToolBridge(params) {
5338
5444
  autoDeliveryTtsMediaUrls,
5339
5445
  coreTtsToolResult: autoDeliveryTtsMediaUrls?.length ? rawResult : void 0,
5340
5446
  messagingTarget: confirmedMessagingTarget,
5341
- sourceReplyFinal
5447
+ sourceReplyFinal,
5448
+ trustedLocalMediaToolNames: pluginLocalMediaTrustByToolName.get(toolName)
5342
5449
  });
5343
5450
  if (deliveredSourceReply || receiptConfirmedSourceReply || toolConfirmedSourceReply) telemetry.didDeliverSourceReplyViaMessageTool = true;
5344
5451
  const continuesSourceReplyProgress = confirmedSourceReply && sourceReplyFinal === false;
@@ -5512,7 +5619,7 @@ function collectToolTelemetry(params) {
5512
5619
  if (params.result && !params.signal.aborted) {
5513
5620
  const media = extractToolResultMediaArtifact(params.result);
5514
5621
  if (media) {
5515
- const mediaUrls = filterToolResultMediaUrls(params.toolName, media.mediaUrls, params.mediaTrustResult ?? params.result);
5622
+ const mediaUrls = filterToolResultMediaUrls(params.toolName, media.mediaUrls, params.coreTtsToolResult ?? params.mediaTrustResult ?? params.result, params.trustedLocalMediaToolNames);
5516
5623
  const seen = new Set(params.telemetry.toolMediaUrls);
5517
5624
  const autoDeliveryMediaUrls = new Set(params.telemetry.toolAutoDeliveryMediaUrls);
5518
5625
  const rawAutoDeliveryMediaUrls = new Set(params.autoDeliveryTtsMediaUrls);
@@ -1,6 +1,6 @@
1
- import { l as sessionBindingIdentity } from "./session-binding-record-CaZjYwNS.js";
2
- import { _ as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-CVhez2Uo.js";
3
- import "./session-binding-CKSepwIC.js";
1
+ import { p as sessionBindingIdentity } from "./session-binding-record-TH3xA0zj.mjs";
2
+ import { _ as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-BpTtuLQ5.mjs";
3
+ import "./session-binding-_0W_fHRr.mjs";
4
4
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { assignMcpCatalogSafeServerNames } from "openclaw/plugin-sdk/agent-harness-runtime";
6
6
  //#region extensions/codex/src/app-server/effective-mcp-catalog.ts
@@ -1,8 +1,7 @@
1
- import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
2
- import { T as readCodexTurnCompletedNotification } from "./client-BEKu4yDx.js";
3
- import { p as getCodexAppServerTurnRouter } from "./attempt-client-cleanup-D6cR54TV.js";
4
- import { o as isTerminalTurnStatus, s as readCodexNotificationItem } from "./attempt-notifications--H8zXR5-.js";
5
- import { t as CodexUsageProjection } from "./event-projector-usage-CIyrYYid.js";
1
+ import { m as isJsonObject } from "./config-security-BRQ2mgW9.mjs";
2
+ import { T as readCodexTurnCompletedNotification } from "./client-vXs2929Q.mjs";
3
+ import { m as getCodexAppServerTurnRouter } from "./attempt-client-cleanup-BpYKdTA0.mjs";
4
+ import { c as readCodexNotificationItem, s as isTerminalTurnStatus, t as CodexUsageProjection } from "./event-projector-usage-C7Ntzs-f.mjs";
6
5
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
7
6
  import { toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
8
7
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
@@ -1,4 +1,4 @@
1
- import { t as resolveCodexLocalRuntimeAttribution } from "./local-runtime-attribution-B_2mnqhb.js";
1
+ import { t as resolveCodexLocalRuntimeAttribution } from "./local-runtime-attribution-B_2mnqhb.mjs";
2
2
  import { formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
3
3
  //#region extensions/codex/src/app-server/event-projector-assistant-message.ts
4
4
  const ZERO_USAGE = {
@@ -70,13 +70,16 @@ function createAssistantCommentaryMessage(params, text, itemId, timestamp) {
70
70
  }
71
71
  };
72
72
  }
73
- function createAssistantAsyncMessage(params, text, itemId, timestamp) {
73
+ function createAssistantAsyncMessage(params, text, itemId, timestamp, questions) {
74
74
  return {
75
75
  ...createNonterminalAssistantMessage(params, [{
76
76
  type: "text",
77
77
  text
78
78
  }], timestamp),
79
- openclawAsyncDelivery: { itemId }
79
+ openclawAsyncDelivery: {
80
+ itemId,
81
+ ...questions ? { questions } : {}
82
+ }
80
83
  };
81
84
  }
82
85
  function createAssistantReasoningMessage(params, text) {