@openclaw/codex 2026.9.8 → 2026.10.1-beta.2

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 (151) hide show
  1. package/README.md +8 -0
  2. package/dist/.setup/{account-usage-runtime-G348lY1q.mjs → account-usage-runtime-DGqFpAud.mjs} +5 -5
  3. package/dist/.setup/app-server-policy-Bg4FZw1f.mjs +23 -0
  4. package/dist/.setup/{apply-Cqb-YoCS.mjs → apply-CXTudl9p.mjs} +48 -39
  5. package/dist/.setup/attempt-client-cleanup-BH0hW2xU.mjs +155 -0
  6. package/dist/.setup/{attempt-workspace-context-BJ5Z_olH.mjs → attempt-workspace-context-BY0jprWJ.mjs} +11 -15
  7. package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-BoMwpuPN.mjs} +17 -25
  8. package/dist/.setup/{auth-cache-key-Dnps4W4_.mjs → auth-cache-key-CGm0UJOr.mjs} +244 -82
  9. package/dist/.setup/{auth-profile-B0okYl2D.mjs → auth-profile-CgHQ8Vot.mjs} +2 -1
  10. package/dist/.setup/{auth-profile-selection-DFu9e167.mjs → auth-profile-selection-hr8ocLtz.mjs} +5 -7
  11. package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-C-08ez1w.mjs} +2 -2
  12. package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-Dn2p-fdy.mjs} +3 -3
  13. package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-DklXNk3k.mjs} +4 -4
  14. package/dist/.setup/{bounded-turn-BNunZPtz.mjs → bounded-turn-pGsfXcmH.mjs} +14 -13
  15. package/dist/.setup/{build-state-DIQ5O_-S.mjs → build-state-CqQnsg7T.mjs} +1 -1
  16. package/dist/.setup/{capabilities-B3WEZl4e.mjs → capabilities-kQntafj_.mjs} +1 -1
  17. package/dist/.setup/{client-qyUBJlGZ.mjs → client-C8lgBOoO.mjs} +438 -160
  18. package/dist/.setup/{client-catalog-response-DRvx_wCC.mjs → client-catalog-response-Bqp7WG51.mjs} +57 -25
  19. package/dist/.setup/command-authorization-AikPDtcc.mjs +15 -0
  20. package/dist/.setup/{command-dispatch-Btrs1D6f.mjs → command-dispatch-DhBbFIQ5.mjs} +3 -3
  21. package/dist/.setup/{command-formatters-R3ckE3Co.mjs → command-formatters-DV3DHhdr.mjs} +7 -5
  22. package/dist/.setup/{command-handlers-DvlCHJch.mjs → command-handlers-ztOOzm6O.mjs} +82 -144
  23. package/dist/.setup/{command-rpc-skzRq4wD.mjs → command-rpc-CuC5fPom.mjs} +23 -31
  24. package/dist/.setup/{compact-8ttks5U5.mjs → compact-tUb9AYfH.mjs} +117 -65
  25. package/dist/.setup/{plugin-metadata-cache-BRwtRct9.mjs → computer-use-BBN9y326.mjs} +65 -202
  26. package/dist/.setup/{config-DKhXquav.mjs → config-0Gxk3_eq.mjs} +5 -6
  27. package/dist/.setup/{config-options-CzyWLTJt.mjs → config-options-HG_Rr3W_.mjs} +13 -23
  28. package/dist/.setup/{config-parsing-b088LyhT.mjs → config-parsing-BQq-CHTF.mjs} +41 -4
  29. package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-cUYrqu_a.mjs} +2 -2
  30. package/dist/.setup/{config-security-CE-FcGw9.mjs → config-security-KAPScztc.mjs} +20 -36
  31. package/dist/.setup/{context-engine-projection-PezSESth.mjs → context-engine-projection-CsgYSQhW.mjs} +11 -14
  32. package/dist/.setup/{conversation-binding-74LaGGH-.mjs → conversation-binding-B3MNMVzb.mjs} +36 -48
  33. package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DJ4ix-W5.mjs} +1 -1
  34. package/dist/.setup/{conversation-control-OrN6zuaY.mjs → conversation-control-CYsMlCuE.mjs} +19 -21
  35. package/dist/.setup/{cyber-failover-XV0nNRZu.mjs → cyber-failover-Bb1J6hS1.mjs} +1 -1
  36. package/dist/.setup/{cyber-failover-notice-RNpGpTyP.mjs → cyber-failover-notice-XR03ef31.mjs} +1 -1
  37. package/dist/.setup/doctor-start-options-DPW9JxIE.mjs +63 -0
  38. package/dist/.setup/dynamic-tool-build-C8xGEXmR.mjs +463 -0
  39. package/dist/.setup/{dynamic-tools-Db2sY5cZ.mjs → dynamic-tools-DyERJnR6.mjs} +238 -878
  40. package/dist/.setup/{effective-mcp-catalog-Bi6-SQ7i.mjs → effective-mcp-catalog-C26Mio5l.mjs} +83 -11
  41. package/dist/.setup/{elicitation-input-DPoK8F7w.mjs → elicitation-input-r9axtppm.mjs} +4 -2
  42. package/dist/.setup/{ephemeral-turn-DiCS1ijR.mjs → ephemeral-turn-D8VcDTNo.mjs} +2 -2
  43. package/dist/.setup/{event-projector-assistant-message-MV_1dj-3.mjs → event-projector-assistant-message-BN7CNUB5.mjs} +2 -2
  44. package/dist/.setup/{event-projector-values-DJSz8BTk.mjs → event-projector-values-DTqZHizf.mjs} +2 -12
  45. package/dist/.setup/{inference-dispatch-CMZtjQyz.mjs → inference-dispatch-B5UKEUyC.mjs} +12 -21
  46. package/dist/.setup/{inference-proxy-DhcXOgUE.mjs → inference-proxy-DUO5E2QQ.mjs} +6 -5
  47. package/dist/.setup/{isolated-completion-D80IXfQF.mjs → isolated-completion-C0jrcplS.mjs} +8 -8
  48. package/dist/.setup/{managed-binary-kiWRhNRE.mjs → managed-binary-C1VFoVPf.mjs} +31 -38
  49. package/dist/.setup/mcp-app-session-preparation-BxN0_CYe.mjs +223 -0
  50. package/dist/.setup/mcp-tool-metadata-j10HhfTC.mjs +43 -0
  51. package/dist/.setup/{model-catalog-DiC0Tkha.mjs → model-catalog-DZyNeDKG.mjs} +7 -7
  52. package/dist/.setup/{models-DfLmPV0k.mjs → models-DSseKSMg.mjs} +10 -7
  53. package/dist/.setup/{native-auth-CuG53tu4.mjs → native-auth-Cjb9y7IZ.mjs} +5 -6
  54. package/dist/.setup/{native-execution-policy-BxZJy5mP.mjs → native-execution-policy-ClzpdG3D.mjs} +1 -12
  55. package/dist/.setup/native-mcp-app-CqcPVmhH.mjs +310 -0
  56. package/dist/.setup/{native-subagent-monitor-BwkQXf9e.mjs → native-subagent-monitor-BUYOUp9X.mjs} +235 -318
  57. package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-BDqhOdJp.mjs} +0 -4
  58. package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-C6KVqiN1.mjs} +9 -8
  59. package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-B5oNDkUS.mjs} +11 -17
  60. package/dist/.setup/{node-exec-server.runtime-BgBfWQqo.mjs → node-exec-server.runtime-0xSEjKYt.mjs} +2 -2
  61. package/dist/.setup/{plan-DPdMk1Oy.mjs → plan-BJ37d2Og.mjs} +67 -89
  62. package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BcyBv8PG.mjs} +4 -4
  63. package/dist/.setup/{plugin-app-cache-key-BL9B5H0L.mjs → plugin-app-cache-key-BW8rd98k.mjs} +11 -15
  64. package/dist/.setup/plugin-approval-roundtrip-CuahdPLC.mjs +109 -0
  65. package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-Bf0_piTw.mjs} +29 -51
  66. package/dist/.setup/{plugin-marketplace-discovery-D_dV9FXa.mjs → plugin-marketplace-discovery-SQPhSuic.mjs} +2 -16
  67. package/dist/.setup/plugin-metadata-cache-DWnB7VMj.mjs +84 -0
  68. package/dist/.setup/plugin-thread-config-deadline-B8LGaZNW.mjs +124 -0
  69. package/dist/.setup/{provider-D6F_7p1I.mjs → provider-BnwHVD_z.mjs} +4 -4
  70. package/dist/.setup/provider-capabilities-D68Whix6.mjs +50 -0
  71. package/dist/.setup/{rate-limits-B7-X2TgG.mjs → rate-limits-CMPy24F5.mjs} +1 -5
  72. package/dist/.setup/{request-BZOfsSXW.mjs → request-jSbhc1sg.mjs} +189 -49
  73. package/dist/.setup/rpc-error-hmWM21RB.mjs +57 -0
  74. package/dist/.setup/{run-attempt-dYJhjZrp.mjs → run-attempt-BLDZeYLD.mjs} +553 -727
  75. package/dist/.setup/{run-attempt-lifecycle-C-6O3Exn.mjs → run-attempt-lifecycle-BuZgVbDA.mjs} +19 -3
  76. package/dist/.setup/{runtime-artifact-DDQ-HGXf.mjs → runtime-artifact-CUTOOnKw.mjs} +5 -6
  77. package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-CADz3_BY.mjs} +5 -4
  78. package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-WqE8yPge.mjs} +3 -3
  79. package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +15 -0
  80. package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Ce7BqiPN.mjs} +92 -102
  81. package/dist/.setup/session-binding-meta-Lkm5Lpf4.mjs +15 -0
  82. package/dist/.setup/session-binding-record-BZB8RgcF.mjs +179 -0
  83. package/dist/.setup/session-binding-record-codec-z4ZpDn6E.mjs +216 -0
  84. package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BrdV95Fg.mjs} +8 -2
  85. package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-CPIP4S_y.mjs} +34 -18
  86. package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-DcgwvSbF.mjs} +24 -29
  87. package/dist/.setup/{session-catalog-events-BMCFMZw-.mjs → session-catalog-events-Bdjw9HEn.mjs} +5 -5
  88. package/dist/.setup/{session-catalog-index-DwJjnF5k.mjs → session-catalog-index-DufISKJ6.mjs} +361 -72
  89. package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-nhyO0wdW.mjs} +1 -1
  90. package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-DEU36Qlo.mjs} +1 -1
  91. package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-list-request-tXephOB4.mjs} +180 -6
  92. package/dist/.setup/{session-catalog-native-projection-CuaFZuQE.mjs → session-catalog-native-projection-D6IiLtMb.mjs} +7 -6
  93. package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-7-WEQTB1.mjs} +12 -2
  94. package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-DLWBwAAO.mjs} +11 -15
  95. package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-Uufckwcm.mjs} +2 -2
  96. package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-B-qWJh2x.mjs} +70 -28
  97. package/dist/.setup/{session-catalog-projection-CGfzfP93.mjs → session-catalog-projection-8aHNwzWD.mjs} +6 -122
  98. package/dist/.setup/{session-catalog-provenance-DoAvktcj.mjs → session-catalog-provenance-CmsOE5mh.mjs} +6 -1
  99. package/dist/.setup/{session-cli-DlmBHYIe.mjs → session-cli-kH4vuGod.mjs} +1 -2
  100. package/dist/.setup/{session-history-D83lJWHG.mjs → session-history-BogBHKLk.mjs} +1 -1
  101. package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-NWKPa4ZO.mjs} +4 -4
  102. package/dist/.setup/{session-history-read-Ov3StuL4.mjs → session-history-read-CNN8zwbD.mjs} +8 -19
  103. package/dist/.setup/{session-history.worker-MnPKncqP.mjs → session-history.worker-Cq_4DYgN.mjs} +3 -3
  104. package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-D6dtFQkE.mjs} +2 -2
  105. package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-BxIUJ0Zd.mjs} +8 -37
  106. package/dist/.setup/{session-retirement-LlYWBKTJ.mjs → session-retirement-Czbchv_O.mjs} +14 -15
  107. package/dist/.setup/{settled-turn-context-D4yj4rxf.mjs → settled-turn-context-BZsMjkIO.mjs} +13 -6
  108. package/dist/.setup/{settled-turn-finalizer-DW9W3gza.mjs → settled-turn-finalizer-DjZsIwbZ.mjs} +8 -8
  109. package/dist/.setup/{shared-client-CJCTeFpQ.mjs → shared-client-qhyYWbew.mjs} +291 -272
  110. package/dist/.setup/{provider-capabilities-DG5qbsUZ.mjs → shell-dynamic-tools-D3Brj3g9.mjs} +16 -55
  111. package/dist/.setup/{side-question-BLeGj7TQ.mjs → side-question-D3NJlgbl.mjs} +99 -91
  112. package/dist/.setup/{source-CJis_1EF.mjs → source-BYu0T780.mjs} +24 -40
  113. package/dist/.setup/{thread-lifecycle-_bAbjedG.mjs → thread-lifecycle-Cbz_7ySv.mjs} +262 -305
  114. package/dist/.setup/{thread-ownership-B6pPt21M.mjs → thread-ownership-DwuSrt3s.mjs} +10 -8
  115. package/dist/.setup/{thread-policy-gNPzzpVp.mjs → thread-policy-DoNxbhqt.mjs} +22 -21
  116. package/dist/.setup/{thread-requests-OWGOiDaV.mjs → thread-requests-CL1e8Wmx.mjs} +107 -98
  117. package/dist/.setup/{thread-resume-GOry0AYh.mjs → thread-resume-BT6NHMkM.mjs} +10 -18
  118. package/dist/.setup/{transcript-history-projection-DRSifI-1.mjs → transcript-history-projection-B9a7HwUV.mjs} +11 -16
  119. package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BfLRARNL.mjs} +64 -67
  120. package/dist/.setup/{transport-stdio-Bdegpn2V.mjs → transport-stdio-a0HDa2Mj.mjs} +27 -8
  121. package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zqJ0Cmtn.mjs} +3 -8
  122. package/dist/.setup/{attempt-client-cleanup-B-S7ngS_.mjs → turn-router-sS69wYnI.mjs} +75 -170
  123. package/dist/.setup/{upstream-session-fork-gkdRj2yH.mjs → upstream-session-fork-ChSld66u.mjs} +35 -46
  124. package/dist/.setup/{usage-CApUvLOV.mjs → usage-D8e8Xiqf.mjs} +4 -4
  125. package/dist/.setup/{usage-limit-error-wSMQkbpV.mjs → usage-limit-error-GbT-5NcW.mjs} +4 -4
  126. package/dist/.setup/{web-search-provider.runtime-UKgeiBUG.mjs → web-search-provider.runtime-dL2GD1Kl.mjs} +4 -20
  127. package/dist/.setup/websocket-data-XlRvt8Ys.mjs +6 -0
  128. package/dist/.setup/workspace-write-sandbox-probe-DmUHLrrl.mjs +118 -0
  129. package/dist/api.js +34 -54
  130. package/dist/catalog-page.worker.js +1 -1
  131. package/dist/cli-metadata.js +1 -1
  132. package/dist/doctor-contract-api.js +15 -27
  133. package/dist/harness.js +37 -22
  134. package/dist/index.js +2880 -276
  135. package/dist/media-understanding-provider.js +2 -2
  136. package/dist/migration-provider-api.js +1 -1
  137. package/dist/native-session-binding-api.js +2 -0
  138. package/dist/provider-discovery.js +1 -1
  139. package/dist/session-history-worker-runtime.js +33 -4
  140. package/dist/session-history.worker.js +1 -1
  141. package/openclaw.plugin.json +3 -3
  142. package/package.json +6 -6
  143. package/dist/.setup/config-utils-D0CXecki.mjs +0 -57
  144. package/dist/.setup/incognito-session-DWYapfwf.mjs +0 -2
  145. package/dist/.setup/managed-thread-store-BMqgThVL.mjs +0 -100
  146. package/dist/.setup/rpc-error-BlD2vuzn.mjs +0 -31
  147. package/dist/.setup/session-binding-meta-B7aEMU7g.mjs +0 -6
  148. package/dist/.setup/session-binding-record-Oe9L-CNY.mjs +0 -375
  149. package/dist/.setup/session-catalog-BFafIiF6.mjs +0 -2599
  150. package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +0 -170
  151. package/dist/.setup/shared-client-lifecycle-7xgtlo15.mjs +0 -153
@@ -1,16 +1,17 @@
1
1
  import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
2
- import { o as resolveCodexComputerUseConfig } from "./config-options-CzyWLTJt.mjs";
3
- import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-kiWRhNRE.mjs";
4
- import { n as describeControlFailure } from "./capabilities-B3WEZl4e.mjs";
5
- import { r as requestCodexAppServerClientJson } from "./request-BZOfsSXW.mjs";
6
- import "./config-DKhXquav.mjs";
7
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
8
- import { $ as reconcileCodexComputerUseStartArtifacts, O as acquireCodexNativeConfigFence, at as isLegacyCodexComputerUsePluginDisabled, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, ct as assertNotSymlink, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, it as hasLegacyCodexComputerUseMcpPolicy, nt as resolveBundledComputerUseMarketplacePath, ot as resolveManagedCodexComputerUseConfig, p as readCodexAppServerClientProcessIdentity, rt as resolveClientManagedBundledMarketplacePath, st as ensureCodexComputerUseSharedPluginCache, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError, y as waitForCodexAppServerClientDesktopGenerationDrain } from "./shared-client-CJCTeFpQ.mjs";
9
- import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-qyUBJlGZ.mjs";
10
- import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-B-S7ngS_.mjs";
2
+ import { o as resolveCodexComputerUseConfig } from "./config-options-HG_Rr3W_.mjs";
3
+ import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-C1VFoVPf.mjs";
4
+ import { n as describeControlFailure } from "./capabilities-kQntafj_.mjs";
5
+ import { n as requestCodexAppServerClientJson } from "./request-jSbhc1sg.mjs";
6
+ import "./config-0Gxk3_eq.mjs";
7
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
8
+ import { $ as reconcileCodexComputerUseStartArtifacts, O as acquireCodexNativeConfigFence, at as isLegacyCodexComputerUsePluginDisabled, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, ct as assertNotSymlink, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, it as hasLegacyCodexComputerUseMcpPolicy, nt as resolveBundledComputerUseMarketplacePath, ot as resolveManagedCodexComputerUseConfig, p as readCodexAppServerClientProcessIdentity, rt as resolveClientManagedBundledMarketplacePath, st as ensureCodexComputerUseSharedPluginCache, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError, y as waitForCodexAppServerClientDesktopGenerationDrain } from "./shared-client-qhyYWbew.mjs";
9
+ import { a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, o as isCodexAppServerIndeterminateTransportError } from "./client-C8lgBOoO.mjs";
10
+ import { l as retireUnsafeCodexTurnClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-BH0hW2xU.mjs";
11
11
  import path from "node:path";
12
12
  import fs from "node:fs/promises";
13
13
  import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
14
+ import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
14
15
  //#region extensions/codex/src/app-server/computer-use-readiness.ts
15
16
  /** Computer Use readiness probes and their native subscription lifecycle. */
16
17
  function createComputerUseRequest(params) {
@@ -41,6 +42,18 @@ async function runCodexComputerUseLiveTest(params) {
41
42
  let lastError;
42
43
  let repair;
43
44
  const probe = resolveComputerUseLiveTestProbe(params.tools);
45
+ const liveTestStatus = (attempts, error) => ({
46
+ status: error === void 0 ? "passed" : "failed",
47
+ ok: error === void 0,
48
+ attempted: true,
49
+ attempts,
50
+ timeoutMs: params.config.liveTestTimeoutMs,
51
+ retried: attempts > 1,
52
+ repaired: Boolean(repair?.attempted && repair.warnings.length === 0),
53
+ durationMs: Math.max(0, Date.now() - startedAt),
54
+ message: error === void 0 ? "Computer Use live test passed." : `Computer Use live test failed after ${attempts} attempts: ${error}`,
55
+ ...error === void 0 ? {} : { error }
56
+ });
44
57
  for (let attempt = 0; attempt <= COMPUTER_USE_LIVE_TEST_RETRY_COUNT; attempt += 1) {
45
58
  let threadId;
46
59
  let outcome;
@@ -58,17 +71,7 @@ async function runCodexComputerUseLiveTest(params) {
58
71
  }, { timeoutMs: params.config.toolCallTimeoutMs })).isError === true) throw new Error(`Computer Use readiness tool ${params.config.mcpServerName}.${probe.tool} returned an error result`);
59
72
  outcome = {
60
73
  ok: true,
61
- liveTest: {
62
- status: "passed",
63
- ok: true,
64
- attempted: true,
65
- attempts: attempt + 1,
66
- timeoutMs: params.config.liveTestTimeoutMs,
67
- retried: attempt > 0,
68
- repaired: Boolean(repair?.attempted && repair.warnings.length === 0),
69
- durationMs: Math.max(0, Date.now() - startedAt),
70
- message: "Computer Use live test passed."
71
- }
74
+ liveTest: liveTestStatus(attempt + 1)
72
75
  };
73
76
  } catch (error) {
74
77
  outcome = {
@@ -91,20 +94,8 @@ async function runCodexComputerUseLiveTest(params) {
91
94
  lastError = outcome.error;
92
95
  if (attempt < COMPUTER_USE_LIVE_TEST_RETRY_COUNT && params.config.autoRepair) repair = await repairComputerUseMcpRuntime(params.request, params.config);
93
96
  }
94
- const errorMessage = describeControlFailure(lastError);
95
97
  return {
96
- liveTest: {
97
- status: "failed",
98
- ok: false,
99
- attempted: true,
100
- attempts: 2,
101
- timeoutMs: params.config.liveTestTimeoutMs,
102
- retried: true,
103
- repaired: Boolean(repair?.attempted && repair.warnings.length === 0),
104
- durationMs: Math.max(0, Date.now() - startedAt),
105
- message: `Computer Use live test failed after 2 attempts: ${errorMessage}`,
106
- error: errorMessage
107
- },
98
+ liveTest: liveTestStatus(2, describeControlFailure(lastError)),
108
99
  ...repair ? { repair } : {}
109
100
  };
110
101
  }
@@ -240,8 +231,7 @@ async function ensureCodexComputerUse(params = {}) {
240
231
  });
241
232
  if (status.ready) return status;
242
233
  if (config.autoInstall) {
243
- const blockedAutoInstallStatus = blockUnsafeAutoInstallStatus(config);
244
- if (blockedAutoInstallStatus) throw new CodexComputerUseSetupError(blockedAutoInstallStatus);
234
+ if (config.marketplaceSource) throw new CodexComputerUseSetupError(unavailableStatus(config, "auto_install_blocked", "Computer Use auto-install only uses marketplaces Codex app-server has already discovered. Run /codex computer-use install to install from a configured marketplace source."));
245
235
  const installedStatus = await inspectCodexComputerUse({
246
236
  ...params,
247
237
  computerUseConfig: config,
@@ -280,8 +270,8 @@ async function inspectCodexComputerUse(params) {
280
270
  managedCommandOrder: "desktop-first"
281
271
  });
282
272
  const operationTimeoutMs = params.timeoutMs ?? resolvedRuntime.requestTimeoutMs;
283
- const deadline = operationTimeoutMs > 0 ? Date.now() + operationTimeoutMs : void 0;
284
- const remainingTimeoutMs = () => deadline === void 0 ? operationTimeoutMs : Math.max(1, deadline - Date.now());
273
+ const deadline = operationTimeoutMs > 0 ? performance.now() + operationTimeoutMs : void 0;
274
+ const remainingTimeoutMs = () => deadline === void 0 ? operationTimeoutMs : Math.max(1, deadline - performance.now());
285
275
  const clientOptions = {
286
276
  startOptions: resolvedRuntime.start,
287
277
  pluginConfig: params.pluginConfig,
@@ -524,19 +514,12 @@ async function readComputerUseTools(params) {
524
514
  server = await readMcpServerStatus(params.request, params.config.mcpServerName);
525
515
  tools = Object.keys(server?.tools ?? {}).toSorted();
526
516
  }
527
- if (!server) return statusFromPlugin({
528
- config: params.config,
529
- plugin: params.plugin,
530
- tools: [],
531
- reason: "mcp_missing",
532
- message: `Computer Use is installed, but the ${params.config.mcpServerName} MCP server is not available.`
533
- });
534
- if (tools.length === 0) return statusFromPlugin({
517
+ if (!server || tools.length === 0) return statusFromPlugin({
535
518
  config: params.config,
536
519
  plugin: params.plugin,
537
520
  tools,
538
521
  reason: "mcp_missing",
539
- message: `Computer Use is installed, but the ${params.config.mcpServerName} MCP server exposes no tools.`
522
+ message: server ? `Computer Use is installed, but the ${params.config.mcpServerName} MCP server exposes no tools.` : `Computer Use is installed, but the ${params.config.mcpServerName} MCP server is not available.`
540
523
  });
541
524
  const status = statusFromPlugin({
542
525
  config: params.config,
@@ -585,7 +568,8 @@ async function resolveMarketplaceRef(params) {
585
568
  } };
586
569
  let candidates = await listComputerUseMarketplaceCandidates(params.request, params.config);
587
570
  const bundledMarketplacePath = resolveBundledComputerUseMarketplacePath(params);
588
- if (candidates.length === 0 && bundledMarketplacePath && shouldAddBundledComputerUseMarketplace(params)) {
571
+ const discoverDefaultMarketplace = params.allowAdd && !params.config.marketplaceSource && !params.config.marketplacePath && !params.config.marketplaceName;
572
+ if (candidates.length === 0 && bundledMarketplacePath && discoverDefaultMarketplace) {
589
573
  if (params.managedCodexHome) await migrateLegacyBundledMarketplaceSource({
590
574
  request: params.request,
591
575
  bundledMarketplacePath,
@@ -596,7 +580,7 @@ async function resolveMarketplaceRef(params) {
596
580
  preferredMarketplaceName ??= added.marketplaceName;
597
581
  candidates = await listComputerUseMarketplaceCandidates(params.request, params.config);
598
582
  }
599
- const waitUntil = marketplaceDiscoveryWaitUntil(params);
583
+ const waitUntil = discoverDefaultMarketplace ? Date.now() + params.config.marketplaceDiscoveryTimeoutMs : 0;
600
584
  if (candidates.length === 0 && waitUntil > Date.now() && await codexNativePluginsDisabled(params.request)) return { message: "Codex native plugin support is disabled (features.plugins = false). Enable it in the Codex config, then run /codex computer-use install." };
601
585
  while (candidates.length === 0) {
602
586
  if (Date.now() >= waitUntil) break;
@@ -633,13 +617,6 @@ async function listComputerUseMarketplaceCandidates(request, config) {
633
617
  async function codexNativePluginsDisabled(request) {
634
618
  return (await request("experimentalFeature/list", {})).data.find(({ name }) => name === "plugins")?.enabled === false;
635
619
  }
636
- function blockUnsafeAutoInstallStatus(config) {
637
- if (!config.marketplaceSource) return;
638
- return unavailableStatus(config, "auto_install_blocked", "Computer Use auto-install only uses marketplaces Codex app-server has already discovered. Run /codex computer-use install to install from a configured marketplace source.");
639
- }
640
- function shouldAddBundledComputerUseMarketplace(params) {
641
- return params.allowAdd && !params.config.marketplaceSource && !params.config.marketplacePath && !params.config.marketplaceName && Boolean(resolveBundledComputerUseMarketplacePath(params));
642
- }
643
620
  function findComputerUseMarketplaces(listed, pluginName) {
644
621
  return listed.marketplaces.flatMap((marketplace) => {
645
622
  const plugin = marketplace.plugins.find((candidate) => candidate.name === pluginName || candidate.id === pluginName || candidate.id === `${pluginName}@${marketplace.name}`);
@@ -654,7 +631,6 @@ function findComputerUseMarketplaces(listed, pluginName) {
654
631
  return [{
655
632
  kind: "remote",
656
633
  name: marketplace.name,
657
- remoteMarketplaceName: marketplace.name,
658
634
  remotePluginId
659
635
  }];
660
636
  });
@@ -665,28 +641,13 @@ function chooseKnownComputerUseMarketplace(candidates) {
665
641
  if (candidate) return candidate;
666
642
  }
667
643
  }
668
- function marketplaceDiscoveryWaitUntil(params) {
669
- if (params.allowAdd && !params.config.marketplaceSource && !params.config.marketplacePath && !params.config.marketplaceName) return Date.now() + params.config.marketplaceDiscoveryTimeoutMs;
670
- return 0;
671
- }
672
644
  async function delay(ms, signal) {
673
- if (signal?.aborted) throw abortError(signal);
674
- await new Promise((resolve, reject) => {
675
- const onAbort = () => {
676
- clearTimeout(timer);
677
- signal?.removeEventListener("abort", onAbort);
678
- reject(abortError(signal));
679
- };
680
- const timer = setTimeout(() => {
681
- signal?.removeEventListener("abort", onAbort);
682
- resolve();
683
- }, ms);
684
- signal?.addEventListener("abort", onAbort, { once: true });
685
- });
686
- }
687
- function abortError(signal) {
688
- const reason = signal?.reason;
689
- return reason instanceof Error ? reason : /* @__PURE__ */ new Error("Computer Use setup was aborted.");
645
+ try {
646
+ await sleepWithAbort(Math.max(1, ms), signal);
647
+ } catch (error) {
648
+ if (!signal?.aborted) throw error;
649
+ throw signal.reason instanceof Error ? signal.reason : /* @__PURE__ */ new Error("Computer Use setup was aborted.");
650
+ }
690
651
  }
691
652
  async function readComputerUsePlugin(request, marketplace, pluginName) {
692
653
  return (await request("plugin/read", pluginRequestParams(marketplace, pluginName))).plugin;
@@ -709,44 +670,39 @@ function pluginRequestParams(marketplace, pluginName) {
709
670
  marketplacePath: marketplace.path,
710
671
  pluginName
711
672
  } : {
712
- remoteMarketplaceName: marketplace.remoteMarketplaceName,
673
+ remoteMarketplaceName: marketplace.name,
713
674
  pluginName: marketplace.remotePluginId
714
675
  };
715
676
  }
716
677
  function statusFromPlugin(params) {
717
- return {
718
- enabled: true,
719
- ready: params.plugin.summary.installed && params.plugin.summary.enabled && params.tools.length > 0,
720
- reason: params.reason,
721
- installed: params.plugin.summary.installed,
722
- pluginEnabled: params.plugin.summary.enabled,
723
- mcpServerAvailable: params.tools.length > 0,
724
- pluginName: params.config.pluginName,
725
- mcpServerName: params.config.mcpServerName,
726
- marketplaceName: params.plugin.marketplaceName,
727
- ...params.plugin.marketplacePath ? { marketplacePath: params.plugin.marketplacePath } : {},
728
- tools: params.tools,
729
- installation: installationStatusFromPlugin(params.plugin, params.message),
730
- exposure: exposureStatusFromTools(params.config, params.tools),
731
- liveTest: skippedLiveTestStatus(params.config, "Computer Use live test was not run."),
732
- warnings: params.plugin.summary.source?.type === "remote" ? ["Computer Use plugin is resolved from a remote marketplace; live local bundles are preferred."] : [],
733
- message: params.message
734
- };
735
- }
736
- function installationStatusFromPlugin(plugin, message) {
678
+ const { config, plugin, tools, reason, message } = params;
737
679
  const installed = plugin.summary.installed && plugin.summary.enabled;
738
- return {
739
- status: !plugin.summary.installed ? "not_installed" : installed ? "installed" : "installed_disabled",
740
- ok: installed,
741
- message: installed ? "Computer Use plugin is installed and enabled." : message
742
- };
743
- }
744
- function exposureStatusFromTools(config, tools) {
745
680
  const available = tools.length > 0;
746
681
  return {
747
- status: available ? "available" : "missing",
748
- ok: available,
749
- message: available ? `Computer Use MCP server ${config.mcpServerName} exposes ${tools.length} tools.` : `Computer Use MCP server ${config.mcpServerName} is not exposed.`
682
+ enabled: true,
683
+ ready: installed && available,
684
+ reason,
685
+ installed: plugin.summary.installed,
686
+ pluginEnabled: plugin.summary.enabled,
687
+ mcpServerAvailable: available,
688
+ pluginName: config.pluginName,
689
+ mcpServerName: config.mcpServerName,
690
+ marketplaceName: plugin.marketplaceName,
691
+ ...plugin.marketplacePath ? { marketplacePath: plugin.marketplacePath } : {},
692
+ tools,
693
+ installation: {
694
+ status: !plugin.summary.installed ? "not_installed" : installed ? "installed" : "installed_disabled",
695
+ ok: installed,
696
+ message: installed ? "Computer Use plugin is installed and enabled." : message
697
+ },
698
+ exposure: {
699
+ status: available ? "available" : "missing",
700
+ ok: available,
701
+ message: available ? `Computer Use MCP server ${config.mcpServerName} exposes ${tools.length} tools.` : `Computer Use MCP server ${config.mcpServerName} is not exposed.`
702
+ },
703
+ liveTest: skippedLiveTestStatus(config, "Computer Use live test was not run."),
704
+ warnings: plugin.summary.source?.type === "remote" ? ["Computer Use plugin is resolved from a remote marketplace; live local bundles are preferred."] : [],
705
+ message
750
706
  };
751
707
  }
752
708
  function resolveComputerUseConfig(params) {
@@ -760,97 +716,4 @@ function resolveComputerUseConfig(params) {
760
716
  });
761
717
  }
762
718
  //#endregion
763
- //#region extensions/codex/src/app-server/plugin-metadata-cache.ts
764
- const CODEX_PLUGIN_METADATA_CACHE_TTL_MS = 36e5;
765
- var CodexPluginMetadataCache = class {
766
- constructor(nowMs = Date.now) {
767
- this.nowMs = nowMs;
768
- this.entries = /* @__PURE__ */ new Map();
769
- this.inFlight = /* @__PURE__ */ new Map();
770
- this.generations = /* @__PURE__ */ new Map();
771
- this.clearGeneration = 0;
772
- }
773
- read(appCacheKey, queryKind, requestParams, catalogScope) {
774
- const entryKey = buildMetadataCacheEntryKey(appCacheKey, queryKind, requestParams, catalogScope);
775
- const entry = this.entries.get(entryKey);
776
- if (!entry) return;
777
- if (entry.expiresAtMs <= this.nowMs()) {
778
- this.entries.delete(entryKey);
779
- return;
780
- }
781
- return entry.snapshot;
782
- }
783
- /** Returns a fresh snapshot or coalesces one catalog or installed-plugin request. */
784
- async load(params) {
785
- const entryKey = buildMetadataCacheEntryKey(params.appCacheKey, params.queryKind, params.requestParams, params.catalogScope);
786
- const cached = this.read(params.appCacheKey, params.queryKind, params.requestParams, params.catalogScope);
787
- if (cached) return cached;
788
- const pending = this.inFlight.get(entryKey);
789
- if (pending) try {
790
- return await pending.promise;
791
- } catch {
792
- if (this.inFlight.get(entryKey) === pending) this.inFlight.delete(entryKey);
793
- return await this.load(params);
794
- }
795
- const generation = this.generations.get(params.appCacheKey) ?? 0;
796
- const clearGeneration = this.clearGeneration;
797
- const promise = (async () => {
798
- const method = params.queryKind === "installed" ? "plugin/installed" : "plugin/list";
799
- const response = await params.request(method, params.requestParams);
800
- const snapshot = {
801
- appCacheKey: params.appCacheKey,
802
- queryKind: params.queryKind,
803
- response
804
- };
805
- if (generation === (this.generations.get(params.appCacheKey) ?? 0) && clearGeneration === this.clearGeneration && response.marketplaceLoadErrors.length === 0 && (params.cacheable?.(response) ?? true)) this.entries.set(entryKey, {
806
- snapshot,
807
- expiresAtMs: this.nowMs() + CODEX_PLUGIN_METADATA_CACHE_TTL_MS
808
- });
809
- return snapshot;
810
- })();
811
- this.inFlight.set(entryKey, {
812
- appCacheKey: params.appCacheKey,
813
- promise
814
- });
815
- try {
816
- return await promise;
817
- } finally {
818
- if (this.inFlight.get(entryKey)?.promise === promise) this.inFlight.delete(entryKey);
819
- }
820
- }
821
- invalidate(appCacheKey) {
822
- this.generations.set(appCacheKey, (this.generations.get(appCacheKey) ?? 0) + 1);
823
- for (const [entryKey, entry] of this.entries) if (entry.snapshot.appCacheKey === appCacheKey) this.entries.delete(entryKey);
824
- for (const [entryKey, pending] of this.inFlight) if (pending.appCacheKey === appCacheKey) this.inFlight.delete(entryKey);
825
- }
826
- /** Clears snapshots and prevents late in-flight loads from repopulating them. */
827
- clear() {
828
- this.clearGeneration += 1;
829
- this.generations.clear();
830
- this.entries.clear();
831
- this.inFlight.clear();
832
- }
833
- };
834
- const defaultCodexPluginMetadataCache = new CodexPluginMetadataCache();
835
- function buildMetadataCacheEntryKey(appCacheKey, queryKind, requestParams, catalogScope) {
836
- if (queryKind !== "installed") {
837
- const listParams = requestParams;
838
- const entry = [
839
- appCacheKey,
840
- queryKind,
841
- listParams?.cwds ?? [],
842
- Array.from(new Set(listParams?.marketplaceKinds ?? [])).toSorted(),
843
- ...catalogScope ? [catalogScope] : []
844
- ];
845
- return JSON.stringify(entry);
846
- }
847
- const installedParams = requestParams;
848
- return JSON.stringify([
849
- appCacheKey,
850
- queryKind,
851
- installedParams?.cwds ?? [],
852
- Array.from(new Set(installedParams?.installSuggestionPluginNames ?? [])).toSorted()
853
- ]);
854
- }
855
- //#endregion
856
- export { createComputerUseRequest as a, readCodexComputerUseStatus as i, ensureCodexComputerUse as n, runCodexComputerUseLiveTest as o, installCodexComputerUse as r, defaultCodexPluginMetadataCache as t };
719
+ export { runCodexComputerUseLiveTest as a, createComputerUseRequest as i, installCodexComputerUse as n, readCodexComputerUseStatus as r, ensureCodexComputerUse as t };
@@ -1,10 +1,9 @@
1
- import { a as readExecAsk, l as readRecord, o as readExecSecurity } from "./config-utils-D0CXecki.mjs";
2
- import "./config-security-CE-FcGw9.mjs";
3
- import "./config-parsing-b088LyhT.mjs";
1
+ import "./config-security-KAPScztc.mjs";
2
+ import { _ as readExecSecurity, b as readRecord, g as readExecAsk } from "./config-parsing-BQq-CHTF.mjs";
4
3
  import "./auth-start-options-BPIPeEX8.mjs";
5
- import { c as canUseCodexModelBackedApprovalsReviewerForModel$1 } from "./config-options-CzyWLTJt.mjs";
6
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
7
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
4
+ import { c as canUseCodexModelBackedApprovalsReviewerForModel$1 } from "./config-options-HG_Rr3W_.mjs";
5
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
6
+ import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
8
7
  import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
9
8
  import { execPolicy } from "openclaw/plugin-sdk/agent-harness-runtime";
10
9
  import { resolveExecApprovalsFromFile } from "openclaw/plugin-sdk/exec-approvals-runtime";
@@ -1,12 +1,12 @@
1
- import { c as readNumberEnv, i as normalizeHeaders, l as readRecord, r as normalizeCodexServiceTier, s as readNonEmptyString, t as hashSecretForKey, u as resolveArgs } from "./config-utils-D0CXecki.mjs";
2
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
3
- import { C as resolveSandbox, S as resolveEffectiveOpenClawExecModeForCodexAppServer, T as selectForcedPromptingSandbox, a as resolveDefaultCodexAppServerPolicy, b as resolveApprovalsReviewer, d as parseAllowedApprovalPoliciesFromCodexRequirements, i as resolveCodexAppServerNetworkProxy, m as readCodexRequirementsToml, o as resolvePolicyMode, r as inferCodexAppServerConnectionClass, s as resolveTransport, t as assertCodexAppServerConnectionSecurity, v as assertCodexAppServerAllowedForOpenClawExecMode, w as selectForcedDangerFullAccessSandbox, x as resolveCodexPolicyModeForOpenClawExecMode, y as resolveApprovalPolicy } from "./config-security-CE-FcGw9.mjs";
4
- import { a as DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME, d as readCodexPluginConfig, n as DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS, o as DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS, r as DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS, s as assertCodexAppServerCommandHasNoInlineArgs } from "./config-parsing-b088LyhT.mjs";
2
+ import { t as normalizeCodexServiceTier } from "./service-tier-normalization-Cei89SW6.mjs";
3
+ import { C as selectForcedPromptingSandbox, S as selectForcedDangerFullAccessSandbox, _ as resolveApprovalPolicy, a as resolveDefaultCodexAppServerPolicy, b as resolveEffectiveOpenClawExecModeForCodexAppServer, d as parseCodexRequirementsPolicy, f as readCodexRequirementsToml, g as assertCodexAppServerAllowedForOpenClawExecMode, i as resolveCodexAppServerNetworkProxy, o as resolvePolicyMode, r as inferCodexAppServerConnectionClass, s as resolveTransport, t as assertCodexAppServerConnectionSecurity, v as resolveApprovalsReviewer, x as resolveSandbox, y as resolveCodexPolicyModeForOpenClawExecMode } from "./config-security-KAPScztc.mjs";
4
+ import { a as DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME, b as readRecord, d as readCodexPluginConfig, h as normalizeHeaders, n as DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS, o as DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS, p as hashSecretForKey, r as DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS, s as assertCodexAppServerCommandHasNoInlineArgs, v as readNonEmptyString, x as resolveArgs, y as readNumberEnv } from "./config-parsing-BQq-CHTF.mjs";
5
5
  import { i as readCodexAppServerConfigOptions } from "./launch-args-DbFCehO7.mjs";
6
6
  import { r as resolveCodexAppServerUserHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
7
7
  import { normalizeTrimmedStringList, parseBooleanValue } from "openclaw/plugin-sdk/string-coerce-runtime";
8
- import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
9
8
  import { resolvePositiveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
9
+ import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
10
10
  import { parse } from "smol-toml";
11
11
  import { readFileSync } from "node:fs";
12
12
  import path from "node:path";
@@ -46,10 +46,10 @@ function isTrustedCodexReviewerConfig(config) {
46
46
  const providerRecords = providers == null ? void 0 : readRecord(providers);
47
47
  const provider = providerRecords?.openai;
48
48
  const openAIProvider = provider == null ? void 0 : readRecord(provider);
49
- return (modelProvider == null || modelProvider === "openai") && (providers == null || providerRecords !== void 0) && (provider == null || openAIProvider !== void 0) && isTrustedOptionalReviewerEndpoint(config.openai_base_url, isNativeOpenAIBaseUrl) && isTrustedOptionalReviewerEndpoint(config.chatgpt_base_url, isNativeChatGPTBaseUrl) && isTrustedOptionalReviewerEndpoint(openAIProvider?.base_url, isNativeOpenAIBaseUrl);
49
+ return (modelProvider == null || modelProvider === "openai") && (providers == null || providerRecords !== void 0) && (provider == null || openAIProvider !== void 0) && isTrustedOptionalReviewerEndpoint(config.openai_base_url, "api.openai.com") && isTrustedOptionalReviewerEndpoint(config.chatgpt_base_url, "chatgpt.com") && isTrustedOptionalReviewerEndpoint(openAIProvider?.base_url, "api.openai.com");
50
50
  }
51
- function isTrustedOptionalReviewerEndpoint(value, isTrusted) {
52
- return value == null || typeof value === "string" && isTrusted(value);
51
+ function isTrustedOptionalReviewerEndpoint(value, hostname) {
52
+ return value == null || typeof value === "string" && isNativeReviewerBaseUrl(value, hostname);
53
53
  }
54
54
  function canUseCodexModelBackedApprovalsReviewerForModel(params, resolveAuthProviderId) {
55
55
  const explicitProvider = params.modelProvider?.trim().toLowerCase();
@@ -211,22 +211,12 @@ function hasNonEmptyRecord(value) {
211
211
  return record !== void 0 && Object.keys(record).length > 0;
212
212
  }
213
213
  function isNativeOpenAIBaseUrl(value) {
214
- if (typeof value !== "string" || !value.trim()) return true;
215
- try {
216
- const url = new URL(value);
217
- return url.protocol === "https:" && url.hostname.toLowerCase() === "api.openai.com";
218
- } catch {
219
- return false;
220
- }
214
+ return isNativeReviewerBaseUrl(value, "api.openai.com");
221
215
  }
222
- function isNativeChatGPTBaseUrl(value) {
216
+ function isNativeReviewerBaseUrl(value, hostname) {
223
217
  if (typeof value !== "string" || !value.trim()) return true;
224
- try {
225
- const url = new URL(value);
226
- return url.protocol === "https:" && url.hostname.toLowerCase() === "chatgpt.com";
227
- } catch {
228
- return false;
229
- }
218
+ const url = URL.parse(value);
219
+ return url?.protocol === "https:" && url.hostname.toLowerCase() === hostname;
230
220
  }
231
221
  function normalizeCodexModelBackedReviewerPolicyProvider(provider) {
232
222
  return provider.toLowerCase() === "openai" ? "openai" : provider;
@@ -311,7 +301,7 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
311
301
  readRequirementsFile: params.readRequirementsFile,
312
302
  platform: params.platform
313
303
  }) ?? null : params.requirementsToml;
314
- if (forcePerCommandApprovals && requirementsToml && parseAllowedApprovalPoliciesFromCodexRequirements(requirementsToml)?.has("untrusted") === false) throw new Error("tools.exec.ask=always requires Codex app-server per-command approvals");
304
+ if (forcePerCommandApprovals && requirementsToml && parseCodexRequirementsPolicy(requirementsToml).allowedApprovalPolicies?.has("untrusted") === false) throw new Error("tools.exec.ask=always requires Codex app-server per-command approvals");
315
305
  const forceRuntimePolicy = forceUserReviewer || forceGuardianReviewer || forceDangerFullAccessSandbox;
316
306
  const defaultPolicy = explicitPolicyMode && !forceRuntimePolicy && !ignoreLegacyYoloPolicyMode ? void 0 : resolveDefaultCodexAppServerPolicy({
317
307
  transport,
@@ -392,7 +382,7 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
392
382
  sandbox: resolvedSandbox,
393
383
  approvalsReviewer: forcedPolicy?.approvalsReviewer ?? explicitApprovalsReviewer ?? defaultPolicy?.approvalsReviewer ?? (policyMode === "guardian" ? "auto_review" : "user"),
394
384
  ...serviceTier ? { serviceTier } : {},
395
- enableUltrafast: config.enableUltrafast === true,
385
+ enableUltrafast: config.enableUltrafast !== false,
396
386
  ...resolveCodexAppServerNetworkProxy(config.networkProxy, resolvedSandbox)
397
387
  };
398
388
  }
@@ -1,8 +1,45 @@
1
- import { d as CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN, r as normalizeCodexServiceTier } from "./config-utils-D0CXecki.mjs";
2
- import { asNullableRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { n as CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN, t as normalizeCodexServiceTier } from "./service-tier-normalization-Cei89SW6.mjs";
2
+ import { asNullableRecord, asOptionalRecord as readRecord, normalizeOptionalString as readNonEmptyString, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
3
+ import { createHmac, randomBytes } from "node:crypto";
3
4
  import { z } from "zod";
4
- import { buildSecretInputSchema } from "openclaw/plugin-sdk/secret-input";
5
+ import { buildSecretInputSchema, normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
5
6
  import { detectWindowsSpawnCommandInlineArgs } from "openclaw/plugin-sdk/windows-spawn";
7
+ import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
8
+ import { splitCommandArgs } from "openclaw/plugin-sdk/process-runtime";
9
+ //#region extensions/codex/src/app-server/config-utils.ts
10
+ const START_OPTIONS_KEY_SECRET = resolveGlobalSingleton(Symbol.for("openclaw.codexAppServerStartOptionsKeySecret"), () => randomBytes(32));
11
+ const PLAIN_DECIMAL_NUMBER_RE = /^[+-]?(?:(?:\d+\.?\d*)|(?:\.\d+))$/;
12
+ function isCodexFastServiceTier(value) {
13
+ return normalizeCodexServiceTier(value) === "priority";
14
+ }
15
+ function normalizeHeaders(value) {
16
+ if (!value || typeof value !== "object" || Array.isArray(value)) return {};
17
+ return Object.fromEntries(Object.entries(value).map(([key, child]) => [key.trim(), normalizeResolvedSecretInputString({
18
+ value: child,
19
+ path: `plugins.entries.codex.config.appServer.headers.${key}`
20
+ })]).filter((entry) => Boolean(entry[0] && entry[1])));
21
+ }
22
+ function readExecSecurity(value) {
23
+ return value === "deny" || value === "allowlist" || value === "full" ? value : void 0;
24
+ }
25
+ function readExecAsk(value) {
26
+ return value === "off" || value === "on-miss" || value === "always" ? value : void 0;
27
+ }
28
+ function readNumberEnv(value) {
29
+ const trimmed = value?.trim();
30
+ if (!trimmed || !PLAIN_DECIMAL_NUMBER_RE.test(trimmed)) return;
31
+ const parsed = Number(trimmed);
32
+ return Number.isFinite(parsed) ? parsed : void 0;
33
+ }
34
+ function resolveArgs(configArgs, envArgs) {
35
+ if (Array.isArray(configArgs)) return normalizeTrimmedStringList(configArgs);
36
+ return splitCommandArgs(typeof configArgs === "string" ? configArgs : envArgs ?? "", { allowUnclosedQuotes: true });
37
+ }
38
+ function hashSecretForKey(value, label) {
39
+ if (!value) return null;
40
+ return createHmac("sha256", START_OPTIONS_KEY_SECRET).update(label).update("\0").update(value).digest("hex");
41
+ }
42
+ //#endregion
6
43
  //#region extensions/codex/src/app-server/session-discovery-config.ts
7
44
  const codexSessionCatalogHomeSchema = z.union([z.string().trim().min(1), z.object({
8
45
  path: z.string().trim().min(1),
@@ -227,4 +264,4 @@ function resolveCodexPluginDestructivePolicy(policy) {
227
264
  };
228
265
  }
229
266
  //#endregion
230
- export { DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME as a, isCodexPairedNodeRemoteExecPlacementSandbox as c, readCodexPluginConfig as d, resolveCodexPluginsPolicy as f, DEFAULT_CODEX_COMPUTER_USE_MCP_SERVER_NAME as i, isCodexRemoteExecPlacementSandbox as l, DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS as n, DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS as o, DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS as r, assertCodexAppServerCommandHasNoInlineArgs as s, DEFAULT_CODEX_APP_SERVER_NETWORK_PROXY_PROFILE_PREFIX as t, isCodexSandboxExecServerEnabled as u };
267
+ export { readExecSecurity as _, DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME as a, readRecord as b, isCodexPairedNodeRemoteExecPlacementSandbox as c, readCodexPluginConfig as d, resolveCodexPluginsPolicy as f, readExecAsk as g, normalizeHeaders as h, DEFAULT_CODEX_COMPUTER_USE_MCP_SERVER_NAME as i, isCodexRemoteExecPlacementSandbox as l, isCodexFastServiceTier as m, DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS as n, DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS as o, hashSecretForKey as p, DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS as r, assertCodexAppServerCommandHasNoInlineArgs as s, DEFAULT_CODEX_APP_SERVER_NETWORK_PROXY_PROFILE_PREFIX as t, isCodexSandboxExecServerEnabled as u, readNonEmptyString as v, resolveArgs as x, readNumberEnv as y };
@@ -1,5 +1,5 @@
1
- import { r as createCodexAppServerConfig } from "./config-options-CzyWLTJt.mjs";
2
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
1
+ import { r as createCodexAppServerConfig } from "./config-options-HG_Rr3W_.mjs";
2
+ import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
3
3
  import { resolveProviderIdForAuth } from "openclaw/plugin-sdk/provider-auth-aliases";
4
4
  //#region extensions/codex/src/app-server/config-runtime.ts
5
5
  var config_runtime_exports = /* @__PURE__ */ __exportAll({