@openclaw/codex 2026.10.1-beta.2 → 2026.10.5-beta.1

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 (161) hide show
  1. package/dist/.setup/{account-usage-runtime-DGqFpAud.mjs → account-usage-runtime-QBZsvZS8.mjs} +8 -7
  2. package/dist/.setup/{app-server-policy-Bg4FZw1f.mjs → app-server-policy-D_zv8J7V.mjs} +3 -4
  3. package/dist/.setup/{apply-CXTudl9p.mjs → apply-CBMV8LN0.mjs} +40 -51
  4. package/dist/.setup/{attempt-client-cleanup-BH0hW2xU.mjs → attempt-client-cleanup-t-kd_1ys.mjs} +6 -6
  5. package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +2 -0
  6. package/dist/.setup/{attempt-workspace-context-BY0jprWJ.mjs → attempt-workspace-context-CcwP3DA3.mjs} +21 -18
  7. package/dist/.setup/{auth-binding-BoMwpuPN.mjs → auth-binding-BaxlhaNx.mjs} +2 -2
  8. package/dist/.setup/{auth-cache-key-CGm0UJOr.mjs → auth-cache-key-DyfUvsSa.mjs} +30 -41
  9. package/dist/.setup/{binding-connection-C-08ez1w.mjs → binding-connection-B7HAAZSI.mjs} +2 -2
  10. package/dist/.setup/{binding-connection.runtime-Dn2p-fdy.mjs → binding-connection.runtime-DAXn7iFl.mjs} +6 -5
  11. package/dist/.setup/{bounded-turn-pGsfXcmH.mjs → bounded-turn-CyQVQwGe.mjs} +21 -17
  12. package/dist/.setup/{bounded-turn-isolation-DklXNk3k.mjs → bounded-turn-isolation-BfDAo-qZ.mjs} +4 -4
  13. package/dist/.setup/{build-state-CqQnsg7T.mjs → build-state-CzLMy1S9.mjs} +1 -1
  14. package/dist/.setup/{capabilities-kQntafj_.mjs → capabilities-DbOzOglY.mjs} +1 -1
  15. package/dist/.setup/{client-catalog-response-Bqp7WG51.mjs → client-catalog-response-DsbEAtpd.mjs} +25 -32
  16. package/dist/.setup/{client-C8lgBOoO.mjs → client-y7nO6X9c.mjs} +198 -247
  17. package/dist/.setup/{command-dispatch-DhBbFIQ5.mjs → command-dispatch-uA9lz2Kf.mjs} +3 -4
  18. package/dist/.setup/{command-formatters-DV3DHhdr.mjs → command-formatters-xW9KpoSZ.mjs} +16 -26
  19. package/dist/.setup/{command-handlers-ztOOzm6O.mjs → command-handlers-VBaJnpZo.mjs} +270 -360
  20. package/dist/.setup/{command-rpc-CuC5fPom.mjs → command-rpc-C9VxOLuG.mjs} +19 -18
  21. package/dist/.setup/{compact-tUb9AYfH.mjs → compact-CD8xJxXS.mjs} +41 -61
  22. package/dist/.setup/{computer-use-BBN9y326.mjs → computer-use-CiToXF5C.mjs} +109 -147
  23. package/dist/.setup/{config-0Gxk3_eq.mjs → config-C1YVVLEA.mjs} +32 -59
  24. package/dist/.setup/config-contracts.shared-D85SGEuq.mjs +4 -0
  25. package/dist/.setup/{config-options-HG_Rr3W_.mjs → config-options-DDzeNQ8m.mjs} +52 -90
  26. package/dist/.setup/{config-parsing-BQq-CHTF.mjs → config-parsing-DsWSCPHO.mjs} +19 -55
  27. package/dist/.setup/{config-runtime-cUYrqu_a.mjs → config-runtime-DWzK-k0n.mjs} +2 -2
  28. package/dist/.setup/{config-security-KAPScztc.mjs → config-security-clxAZYWX.mjs} +35 -39
  29. package/dist/.setup/config-utils-DN_YT7dE.mjs +47 -0
  30. package/dist/.setup/{context-engine-projection-CsgYSQhW.mjs → context-engine-projection-ps-yn_ci.mjs} +10 -22
  31. package/dist/.setup/{conversation-binding-B3MNMVzb.mjs → conversation-binding-CTSLDM9S.mjs} +85 -119
  32. package/dist/.setup/{conversation-binding-data-DJ4ix-W5.mjs → conversation-binding-data-UgLuTSQT.mjs} +9 -8
  33. package/dist/.setup/{conversation-control-CYsMlCuE.mjs → conversation-control-GXM3unE4.mjs} +7 -10
  34. package/dist/.setup/{cyber-failover-Bb1J6hS1.mjs → cyber-failover-D4dgNfFf.mjs} +2 -5
  35. package/dist/.setup/{cyber-failover-notice-XR03ef31.mjs → cyber-failover-notice-ljgGGL0s.mjs} +1 -1
  36. package/dist/.setup/{doctor-start-options-DPW9JxIE.mjs → doctor-start-options-JjTAl-q_.mjs} +5 -5
  37. package/dist/.setup/{dynamic-tool-build-C8xGEXmR.mjs → dynamic-tool-build-D731PCdv.mjs} +57 -69
  38. package/dist/.setup/{dynamic-tools-DyERJnR6.mjs → dynamic-tools-D0pYbxHH.mjs} +689 -710
  39. package/dist/.setup/{effective-mcp-catalog-C26Mio5l.mjs → effective-mcp-catalog-1hWFKghy.mjs} +11 -20
  40. package/dist/.setup/{elicitation-input-r9axtppm.mjs → elicitation-input-DXG_qaXr.mjs} +14 -20
  41. package/dist/.setup/{ephemeral-turn-D8VcDTNo.mjs → ephemeral-turn-Cphy5Qr_.mjs} +3 -3
  42. package/dist/.setup/{event-projector-assistant-message-BN7CNUB5.mjs → event-projector-assistant-message-CLMKN4x-.mjs} +2 -2
  43. package/dist/.setup/{event-projector-usage-03R0I2dM.mjs → event-projector-usage-BpKfdoTm.mjs} +20 -33
  44. package/dist/.setup/{event-projector-values-DTqZHizf.mjs → event-projector-values-CLvG1Hil.mjs} +4 -5
  45. package/dist/.setup/history-rejection-B4nOXNXF.mjs +13 -0
  46. package/dist/.setup/{inference-context-D-9gWlTR.mjs → inference-context-DNlGwzwy.mjs} +10 -11
  47. package/dist/.setup/{inference-dispatch-B5UKEUyC.mjs → inference-dispatch-CO6tTs4q.mjs} +5 -4
  48. package/dist/.setup/{inference-metadata-CgIf7sOx.mjs → inference-metadata-DCvcG_N_.mjs} +36 -41
  49. package/dist/.setup/{inference-proxy-DUO5E2QQ.mjs → inference-proxy-BDWV0djM.mjs} +10 -14
  50. package/dist/.setup/{isolated-completion-C0jrcplS.mjs → isolated-completion-Bhqd2yBq.mjs} +8 -8
  51. package/dist/.setup/local-runtime-attribution-CZz2DJ4q.mjs +15 -0
  52. package/dist/.setup/{managed-binary-C1VFoVPf.mjs → managed-binary-BtIjV7yN.mjs} +16 -36
  53. package/dist/.setup/{mcp-app-session-preparation-BxN0_CYe.mjs → mcp-app-session-preparation-DqSvxFqc.mjs} +24 -25
  54. package/dist/.setup/{mcp-tool-metadata-j10HhfTC.mjs → mcp-tool-metadata-DW41snf3.mjs} +1 -1
  55. package/dist/.setup/{model-catalog-DZyNeDKG.mjs → model-catalog-B227ST3D.mjs} +6 -6
  56. package/dist/.setup/{models-DSseKSMg.mjs → models-DdRyi93L.mjs} +6 -10
  57. package/dist/.setup/{native-auth-Cjb9y7IZ.mjs → native-auth-esN5MdIv.mjs} +5 -5
  58. package/dist/.setup/{native-execution-policy-ClzpdG3D.mjs → native-execution-policy-MXEe7PB3.mjs} +11 -28
  59. package/dist/.setup/native-hook-relay-BUWIOrSr.mjs +561 -0
  60. package/dist/.setup/{native-mcp-app-CqcPVmhH.mjs → native-mcp-app-CjxJQ4F7.mjs} +6 -6
  61. package/dist/.setup/native-skill-isolation-UMVoNjZz.mjs +391 -0
  62. package/dist/.setup/{native-subagent-monitor-BUYOUp9X.mjs → native-subagent-monitor-iHc8oLg5.mjs} +505 -639
  63. package/dist/.setup/{native-subagent-pending-assignments-BDqhOdJp.mjs → native-subagent-pending-assignments-DmVhedNs.mjs} +11 -23
  64. package/dist/.setup/{native-task-assignments-C6KVqiN1.mjs → native-task-assignments-DimsQ9Qa.mjs} +73 -27
  65. package/dist/.setup/{node-cli-sessions-B5oNDkUS.mjs → node-cli-sessions-CzKg2nGq.mjs} +18 -26
  66. package/dist/.setup/{node-exec-server.runtime-0xSEjKYt.mjs → node-exec-server.runtime-BWkULhBM.mjs} +5 -8
  67. package/dist/.setup/{plan-BJ37d2Og.mjs → plan-C_F3aio0.mjs} +40 -50
  68. package/dist/.setup/{plugin-activation-BcyBv8PG.mjs → plugin-activation-D7WkJMvU.mjs} +4 -5
  69. package/dist/.setup/{plugin-app-cache-key-BW8rd98k.mjs → plugin-app-cache-key-Bg9DbDI6.mjs} +18 -23
  70. package/dist/.setup/{plugin-approval-roundtrip-CuahdPLC.mjs → plugin-approval-roundtrip-BSV-51ig.mjs} +4 -6
  71. package/dist/.setup/{plugin-inventory-Bf0_piTw.mjs → plugin-inventory-CYgdo14P.mjs} +28 -43
  72. package/dist/.setup/{plugin-marketplace-discovery-SQPhSuic.mjs → plugin-marketplace-discovery-BblHM3DU.mjs} +7 -10
  73. package/dist/.setup/{plugin-metadata-cache-DWnB7VMj.mjs → plugin-metadata-cache-Bi8TAPwX.mjs} +5 -10
  74. package/dist/.setup/project-doc-thread-config-BVcvnps8.mjs +490 -0
  75. package/dist/.setup/{provider-BnwHVD_z.mjs → provider-BJ4xhaGX.mjs} +4 -4
  76. package/dist/.setup/{provider-capabilities-D68Whix6.mjs → provider-capabilities-CjRaV3bx.mjs} +1 -1
  77. package/dist/.setup/{rate-limits-CMPy24F5.mjs → rate-limits-CI8pTPqL.mjs} +15 -32
  78. package/dist/.setup/reasoning-effort-CS9kKWB9.mjs +37 -0
  79. package/dist/.setup/{request-jSbhc1sg.mjs → request-Y8dmbqZ3.mjs} +28 -48
  80. package/dist/.setup/{rpc-error-hmWM21RB.mjs → rpc-error-C98SHchT.mjs} +3 -6
  81. package/dist/.setup/{run-attempt-BLDZeYLD.mjs → run-attempt-Dx7a4Mfm.mjs} +927 -849
  82. package/dist/.setup/{run-attempt-lifecycle-BuZgVbDA.mjs → run-attempt-lifecycle-KN4oh-7O.mjs} +13 -4
  83. package/dist/.setup/{runtime-artifact-CUTOOnKw.mjs → runtime-artifact-C13pR7tD.mjs} +18 -22
  84. package/dist/.setup/{runtime-artifact-connection-CADz3_BY.mjs → runtime-artifact-connection-jS5DeCok.mjs} +3 -3
  85. package/dist/.setup/{sandbox-guard-WqE8yPge.mjs → sandbox-guard-DIImwCy1.mjs} +4 -6
  86. package/dist/.setup/service-tier-normalization-BPgw2Wdt.mjs +9 -0
  87. package/dist/.setup/{session-binding-Ce7BqiPN.mjs → session-binding-JEHNMPsr.mjs} +13 -40
  88. package/dist/.setup/{session-binding-record-BZB8RgcF.mjs → session-binding-record-DU_0biMD.mjs} +4 -4
  89. package/dist/.setup/{session-binding-record-codec-z4ZpDn6E.mjs → session-binding-record-codec-BpH8u_G9.mjs} +16 -39
  90. package/dist/.setup/{session-binding-sidecars-BrdV95Fg.mjs → session-binding-sidecars-DD-enC8w.mjs} +49 -54
  91. package/dist/.setup/{session-catalog-adoption-CPIP4S_y.mjs → session-catalog-adoption-Ca3OYGYM.mjs} +23 -27
  92. package/dist/.setup/{session-catalog-archive-DcgwvSbF.mjs → session-catalog-archive-Bv6gV7x9.mjs} +6 -6
  93. package/dist/.setup/{session-catalog-events-Bdjw9HEn.mjs → session-catalog-events-DzFlXNUe.mjs} +6 -5
  94. package/dist/.setup/{session-catalog-index-DufISKJ6.mjs → session-catalog-index-DozvkUPd.mjs} +111 -105
  95. package/dist/.setup/{session-catalog-index-order-nhyO0wdW.mjs → session-catalog-index-order-CTfoefow.mjs} +28 -5
  96. package/dist/.setup/{session-catalog-limits-DEU36Qlo.mjs → session-catalog-limits-BynIoOYm.mjs} +1 -1
  97. package/dist/.setup/{session-catalog-list-request-tXephOB4.mjs → session-catalog-list-request-D4MYNgDB.mjs} +11 -8
  98. package/dist/.setup/{session-catalog-native-projection-D6IiLtMb.mjs → session-catalog-native-projection-rCKnZud1.mjs} +5 -61
  99. package/dist/.setup/{session-catalog-node-adoption-7-WEQTB1.mjs → session-catalog-node-adoption-BdP9Zjqo.mjs} +2 -2
  100. package/dist/.setup/{session-catalog-node-continue-DLWBwAAO.mjs → session-catalog-node-continue-CNJibO4_.mjs} +27 -49
  101. package/dist/.setup/{session-catalog-node-lookup-Uufckwcm.mjs → session-catalog-node-lookup-BH_DBGa9.mjs} +3 -3
  102. package/dist/.setup/{session-catalog-parsing-B-qWJh2x.mjs → session-catalog-parsing-DkeoVn60.mjs} +9 -19
  103. package/dist/.setup/{session-catalog-projection-8aHNwzWD.mjs → session-catalog-projection-DDVmALHj.mjs} +8 -22
  104. package/dist/.setup/session-catalog-source-CygTGmrb.mjs +58 -0
  105. package/dist/.setup/{session-cli-kH4vuGod.mjs → session-cli-GwU0izn-.mjs} +20 -41
  106. package/dist/.setup/{session-history-BogBHKLk.mjs → session-history-BO6i_pfk.mjs} +1 -1
  107. package/dist/.setup/{session-history-import-NWKPa4ZO.mjs → session-history-import-CaO8s6ta.mjs} +4 -4
  108. package/dist/.setup/{session-history-read-CNN8zwbD.mjs → session-history-read-BI_2jRED.mjs} +4 -15
  109. package/dist/.setup/{session-history.worker-Cq_4DYgN.mjs → session-history.worker-DJQfek5p.mjs} +147 -159
  110. package/dist/.setup/{session-initialization-D6dtFQkE.mjs → session-initialization-Bi_2DKhc.mjs} +3 -5
  111. package/dist/.setup/{session-permission-policy-BxIUJ0Zd.mjs → session-permission-policy-CD2MAWU8.mjs} +12 -20
  112. package/dist/.setup/{session-retirement-Czbchv_O.mjs → session-retirement-IoS3zr17.mjs} +7 -7
  113. package/dist/.setup/{settled-turn-context-BZsMjkIO.mjs → settled-turn-context-BPL6D3RO.mjs} +1 -1
  114. package/dist/.setup/{settled-turn-finalizer-DjZsIwbZ.mjs → settled-turn-finalizer-X-Fylp-u.mjs} +12 -11
  115. package/dist/.setup/{shared-client-qhyYWbew.mjs → shared-client-ByIwuAC-.mjs} +172 -229
  116. package/dist/.setup/{side-question-D3NJlgbl.mjs → side-question-BDUdozFy.mjs} +116 -137
  117. package/dist/.setup/{source-BYu0T780.mjs → source-Bxbqf3S1.mjs} +37 -56
  118. package/dist/.setup/thread-archive-guard-LKdwQKyr.mjs +56 -0
  119. package/dist/.setup/{thread-lifecycle-Cbz_7ySv.mjs → thread-lifecycle-run-CfP4PnEf.mjs} +348 -484
  120. package/dist/.setup/thread-model-selection-DcVebr8N.mjs +61 -0
  121. package/dist/.setup/{thread-ownership-DwuSrt3s.mjs → thread-ownership-Be53aiaG.mjs} +5 -5
  122. package/dist/.setup/{thread-ownership-queue-Dp24d7-F.mjs → thread-ownership-queue-CeyYScUC.mjs} +5 -6
  123. package/dist/.setup/{thread-policy-DoNxbhqt.mjs → thread-policy-CHgY-KNl.mjs} +4 -4
  124. package/dist/.setup/thread-requests-BgzJwJtS.mjs +745 -0
  125. package/dist/.setup/{thread-resume-BT6NHMkM.mjs → thread-resume-B2EmMcgE.mjs} +5 -5
  126. package/dist/.setup/{timeout-CXOfNoaX.mjs → timeout-D0mEWSGG.mjs} +6 -12
  127. package/dist/.setup/{transcript-history-projection-B9a7HwUV.mjs → transcript-history-projection-DfKcoZCB.mjs} +3 -4
  128. package/dist/.setup/{transcript-mirror-BfLRARNL.mjs → transcript-mirror-Bee2o6jj.mjs} +68 -68
  129. package/dist/.setup/{transcript-mirror-attestation-YSegaktH.mjs → transcript-mirror-attestation-BzUXnrvv.mjs} +5 -2
  130. package/dist/.setup/{transport-stdio-a0HDa2Mj.mjs → transport-stdio-CRWTkKOn.mjs} +67 -77
  131. package/dist/.setup/{transport-websocket-zqJ0Cmtn.mjs → transport-websocket-DIyPfkHo.mjs} +8 -16
  132. package/dist/.setup/{turn-router-sS69wYnI.mjs → turn-router-DKDAziUW.mjs} +30 -31
  133. package/dist/.setup/upstream-prompt-provenance-Ccd9MFRJ.mjs +44 -0
  134. package/dist/.setup/{upstream-session-fork-ChSld66u.mjs → upstream-session-fork-Djp_yssT.mjs} +50 -43
  135. package/dist/.setup/{usage-D8e8Xiqf.mjs → usage-DQA-peQC.mjs} +4 -4
  136. package/dist/.setup/{usage-limit-error-GbT-5NcW.mjs → usage-limit-error-2t3KBqiX.mjs} +12 -21
  137. package/dist/.setup/web-search-item-CvokaZOo.mjs +20 -0
  138. package/dist/.setup/{web-search-provider.runtime-dL2GD1Kl.mjs → web-search-provider.runtime-BsuCMNix.mjs} +3 -3
  139. package/dist/.setup/{workspace-write-sandbox-probe-DmUHLrrl.mjs → workspace-write-sandbox-probe-BDWO2Qkh.mjs} +4 -4
  140. package/dist/api.js +15 -15
  141. package/dist/catalog-page.worker.js +1 -1
  142. package/dist/cli-metadata.js +1 -1
  143. package/dist/doctor-contract-api.js +5 -6
  144. package/dist/harness.js +32 -61
  145. package/dist/index.js +302 -416
  146. package/dist/media-understanding-provider.js +32 -43
  147. package/dist/migration-provider-api.js +1 -1
  148. package/dist/native-session-binding-api.js +1 -1
  149. package/dist/native-tool-policy.js +23 -1
  150. package/dist/provider-discovery.js +1 -1
  151. package/dist/session-history-worker-runtime.js +52 -31
  152. package/dist/session-history.worker.js +1 -1
  153. package/openclaw.plugin.json +20 -3
  154. package/package.json +7 -7
  155. package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +0 -5
  156. package/dist/.setup/plugin-thread-config-deadline-B8LGaZNW.mjs +0 -124
  157. package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +0 -15
  158. package/dist/.setup/shell-dynamic-tools-D3Brj3g9.mjs +0 -85
  159. package/dist/.setup/thread-archive-guard-C9frICzX.mjs +0 -60
  160. package/dist/.setup/thread-requests-CL1e8Wmx.mjs +0 -2111
  161. package/dist/.setup/upstream-prompt-provenance-fXkKbPVC.mjs +0 -37
@@ -1,8 +1,8 @@
1
1
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
2
- import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-CMPy24F5.mjs";
3
- import { t as readCodexAppServerUsage } from "./request-jSbhc1sg.mjs";
4
- import "./config-0Gxk3_eq.mjs";
5
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
2
+ import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-CI8pTPqL.mjs";
3
+ import { t as readCodexAppServerUsage } from "./request-Y8dmbqZ3.mjs";
4
+ import "./config-C1YVVLEA.mjs";
5
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
6
6
  import { a as resolveCodexAppServerAuthProfileStore } from "./auth-profile-CgHQ8Vot.mjs";
7
7
  import { isDeepStrictEqual } from "node:util";
8
8
  import { listAgentIds, resolveAgentDir } from "openclaw/plugin-sdk/agent-scope-runtime";
@@ -14,15 +14,16 @@ const paramsSchema = z.object({
14
14
  profileId: z.string().min(1)
15
15
  }).strict();
16
16
  async function handleCodexAccountUsage({ params, respond, context, signal, hasCurrentClientAuthority }) {
17
+ const invalid = (message) => respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, message));
17
18
  const parsed = paramsSchema.safeParse(params);
18
19
  if (!parsed.success) {
19
- respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Expected agentId and profileId."));
20
+ invalid("Expected agentId and profileId.");
20
21
  return;
21
22
  }
22
23
  const { agentId, profileId } = parsed.data;
23
24
  const config = context.getRuntimeConfig();
24
25
  if (!listAgentIds(config).includes(agentId)) {
25
- respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Unknown agent."));
26
+ invalid("Unknown agent.");
26
27
  return;
27
28
  }
28
29
  try {
@@ -35,7 +36,7 @@ async function handleCodexAccountUsage({ params, respond, context, signal, hasCu
35
36
  const store = structuredClone(readStore());
36
37
  const credential = store.profiles[profileId];
37
38
  if (!credential || credential.provider !== "openai" || credential.type === "api_key") {
38
- respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Select a saved Codex subscription login."));
39
+ invalid("Select a saved Codex subscription login.");
39
40
  return;
40
41
  }
41
42
  const assertCurrent = () => {
@@ -1,7 +1,7 @@
1
- import { n as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-0Gxk3_eq.mjs";
1
+ import { n as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-C1YVVLEA.mjs";
2
2
  //#region extensions/codex/src/app-server/app-server-policy.ts
3
3
  function resolveCodexAppServerForModelProvider(params) {
4
- if (params.appServer.approvalsReviewer === "user" || canUseCodexModelBackedApprovalsReviewerForModel({
4
+ return params.appServer.approvalsReviewer === "user" || canUseCodexModelBackedApprovalsReviewerForModel({
5
5
  modelProvider: params.provider,
6
6
  model: params.model,
7
7
  config: params.config,
@@ -13,8 +13,7 @@ function resolveCodexAppServerForModelProvider(params) {
13
13
  codexConfigToml: params.codexConfigToml,
14
14
  homeScope: params.appServer.start.homeScope,
15
15
  codexArgs: params.appServer.start.args
16
- })) return params.appServer;
17
- return {
16
+ }) ? params.appServer : {
18
17
  ...params.appServer,
19
18
  approvalsReviewer: "user"
20
19
  };
@@ -1,14 +1,13 @@
1
- import { d as readCodexPluginConfig } from "./config-parsing-BQq-CHTF.mjs";
2
- import { s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-CGm0UJOr.mjs";
3
- import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BW8rd98k.mjs";
4
- import { r as requestCodexAppServerJson } from "./request-jSbhc1sg.mjs";
5
- import { l as CODEX_PLUGINS_MARKETPLACE_NAME, n as isOpenAiCuratedMarketplaceName } from "./plugin-inventory-Bf0_piTw.mjs";
6
- import "./config-0Gxk3_eq.mjs";
7
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
1
+ import { s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-DyfUvsSa.mjs";
2
+ import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
3
+ import { r as requestCodexAppServerJson } from "./request-Y8dmbqZ3.mjs";
4
+ import { r as isOpenAiCuratedMarketplaceName, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-CYgdo14P.mjs";
5
+ import "./config-C1YVVLEA.mjs";
6
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
8
7
  import { i as resolveCodexAppServerAuthProfileIdForAgent } from "./auth-profile-CgHQ8Vot.mjs";
9
- import { c as getLeasedSharedCodexAppServerClient, et as resolveCodexAppServerAuthAccountCacheKey, h as releaseLeasedSharedCodexAppServerClient, o as clearSharedCodexAppServerClientIfCurrentAndWait } from "./shared-client-qhyYWbew.mjs";
10
- import { t as ensureCodexPluginActivation } from "./plugin-activation-BcyBv8PG.mjs";
11
- import { CODEX_PLUGIN_CONFIG_PATH, buildCodexMigrationPlan, buildCodexPluginsConfigValue, hasCodexPluginConfigConflict, n as resolveCodexConfigPatchMode, readCodexPluginMigrationConfigEntry, t as createCodexAuthItemApplier } from "./plan-BJ37d2Og.mjs";
8
+ import { c as getLeasedSharedCodexAppServerClient, et as resolveCodexAppServerAuthAccountCacheKey, h as releaseLeasedSharedCodexAppServerClient, o as clearSharedCodexAppServerClientIfCurrentAndWait } from "./shared-client-ByIwuAC-.mjs";
9
+ import { t as ensureCodexPluginActivation } from "./plugin-activation-D7WkJMvU.mjs";
10
+ import { CODEX_PLUGIN_CONFIG_PATH, buildCodexMigrationPlan, buildCodexPluginsConfigValue, hasCodexPluginConfigConflict, n as resolveCodexConfigPatchMode, readCodexPluginMigrationConfigEntry, t as createCodexAuthItemApplier } from "./plan-C_F3aio0.mjs";
12
11
  import { uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
13
12
  import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
14
13
  import path from "node:path";
@@ -67,17 +66,14 @@ var CodexPluginConfigConflictError = class extends Error {
67
66
  function prepareTargetCodexAppServer(ctx) {
68
67
  const appServer = resolveTargetCodexAppServer(ctx);
69
68
  const targets = resolvePlannedMigrationTargets(ctx);
70
- let warmedClient;
71
69
  const ready = getLeasedSharedCodexAppServerClient({
72
70
  startOptions: appServer.start,
73
71
  timeoutMs: 6e4,
74
72
  agentDir: targets.agentDir,
75
73
  config: ctx.config
76
- }).then((client) => {
77
- warmedClient = client;
78
- }, () => void 0);
74
+ }).catch(() => void 0);
79
75
  return { async dispose() {
80
- await ready;
76
+ const warmedClient = await ready;
81
77
  if (warmedClient) releaseLeasedSharedCodexAppServerClient(warmedClient);
82
78
  await clearSharedCodexAppServerClientIfCurrentAndWait(warmedClient, {
83
79
  exitTimeoutMs: 2e3,
@@ -163,49 +159,42 @@ async function applyCodexPluginInstallItem(ctx, item) {
163
159
  appCache: defaultCodexAppInventoryCache,
164
160
  appCacheKey
165
161
  });
166
- const baseDetails = {
167
- ...item.details,
168
- code: result.reason,
169
- activationReason: result.reason,
170
- ...PLUGIN_ACTIVATION_REPORT_STATE[result.reason],
171
- installAttempted: result.installAttempted,
172
- diagnostics: result.diagnostics.map((diagnostic) => diagnostic.message)
173
- };
174
- if (result.ok) return {
175
- ...item,
176
- status: "migrated",
177
- ...result.reason === "already_active" ? { reason: "already active" } : {},
178
- details: baseDetails
179
- };
180
- if (result.reason === CODEX_PLUGIN_AUTH_REQUIRED_REASON) return {
162
+ const applied = {
181
163
  ...item,
182
- status: "skipped",
183
- reason: CODEX_PLUGIN_AUTH_REQUIRED_REASON,
164
+ status: result.ok ? "migrated" : "error",
184
165
  details: {
185
- ...baseDetails,
166
+ ...item.details,
167
+ code: result.reason,
168
+ activationReason: result.reason,
169
+ ...PLUGIN_ACTIVATION_REPORT_STATE[result.reason],
170
+ installAttempted: result.installAttempted,
171
+ diagnostics: result.diagnostics.map((diagnostic) => diagnostic.message)
172
+ }
173
+ };
174
+ if (result.ok) {
175
+ if (result.reason === "already_active") applied.reason = "already active";
176
+ return applied;
177
+ }
178
+ applied.reason = result.reason;
179
+ if (result.reason === CODEX_PLUGIN_AUTH_REQUIRED_REASON) {
180
+ applied.status = "skipped";
181
+ applied.details = {
182
+ ...applied.details,
186
183
  appsNeedingAuth: (result.installResponse?.appsNeedingAuth ?? []).map(({ id, name }) => ({
187
184
  id,
188
185
  name,
189
186
  needsAuth: true
190
187
  }))
191
- }
192
- };
193
- if (result.reason === "plugin_missing" || result.reason === "marketplace_missing") return {
194
- ...item,
195
- status: "warning",
196
- reason: result.reason,
197
- message: `Codex plugin "${policy.pluginName}" could not be migrated automatically`,
198
- details: {
199
- ...baseDetails,
188
+ };
189
+ } else if (result.reason === "plugin_missing" || result.reason === "marketplace_missing") {
190
+ applied.status = "warning";
191
+ applied.message = `Codex plugin "${policy.pluginName}" could not be migrated automatically`;
192
+ applied.details = {
193
+ ...applied.details,
200
194
  warningReason: CODEX_PLUGIN_LOAD_WARNING
201
- }
202
- };
203
- return {
204
- ...item,
205
- status: "error",
206
- reason: result.reason,
207
- details: baseDetails
208
- };
195
+ };
196
+ }
197
+ return applied;
209
198
  } catch (error) {
210
199
  if (coerceErrorMessage(error).includes("codex app-server plugin/list timed out")) return {
211
200
  ...item,
@@ -231,7 +220,7 @@ async function applyCodexPluginInstallItem(ctx, item) {
231
220
  }
232
221
  }
233
222
  function resolveTargetCodexAppServer(ctx) {
234
- return resolveCodexAppServerRuntimeOptions({ pluginConfig: readCodexPluginConfig(ctx.config) });
223
+ return resolveCodexAppServerRuntimeOptions({ pluginConfig: ctx.config.plugins?.entries?.codex?.config });
235
224
  }
236
225
  async function requestTargetCodexAppServerJson(params) {
237
226
  if (params.method !== "plugin/list") return await requestCodexAppServerJson(params);
@@ -1,9 +1,9 @@
1
- import { w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-CGm0UJOr.mjs";
2
- import { a as codexPrewriteRejectionCause, o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-hmWM21RB.mjs";
3
- import { J as unsubscribeCodexAppServerLiveThread, ft as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-qhyYWbew.mjs";
4
- import { V as isCodexAppServerBrokenPipeError, c as isCodexAppServerRequestTimeoutError } from "./client-C8lgBOoO.mjs";
5
- import { n as getCodexAppServerTurnRouter } from "./turn-router-sS69wYnI.mjs";
6
- import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
1
+ import { w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-DyfUvsSa.mjs";
2
+ import { a as codexPrewriteRejectionCause, o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
3
+ import { J as unsubscribeCodexAppServerLiveThread, ft as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-ByIwuAC-.mjs";
4
+ import { I as isCodexAppServerBrokenPipeError, c as isCodexAppServerRequestTimeoutError } from "./client-y7nO6X9c.mjs";
5
+ import { n as getCodexAppServerTurnRouter } from "./turn-router-DKDAziUW.mjs";
6
+ import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
7
7
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
8
8
  import { AgentHarnessPreflightError, embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
9
9
  //#region extensions/codex/src/app-server/attempt-client-cleanup.ts
@@ -0,0 +1,2 @@
1
+ import { agentHarnessAttemptTerminal as attemptTerminal } from "openclaw/plugin-sdk/agent-harness-runtime";
2
+ export { attemptTerminal as t };
@@ -1,5 +1,5 @@
1
1
  import { r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
2
- import { ut as isMessageOnlyCodexSourceReply } from "./thread-requests-CL1e8Wmx.mjs";
2
+ import { I as isMessageOnlyCodexSourceReply } from "./thread-requests-BgzJwJtS.mjs";
3
3
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import path from "node:path";
5
5
  import { buildAgentWorkspaceInstructionSnapshot, buildBootstrapContextForFiles, embeddedAgentLog, prepareAgentWorkspaceContext } from "openclaw/plugin-sdk/agent-harness-runtime";
@@ -102,31 +102,34 @@ async function buildCodexWorkspaceBootstrapContext(params) {
102
102
  }
103
103
  function renderCodexWorkspaceBootstrapPromptContext(contextFiles) {
104
104
  if (contextFiles.length === 0) return;
105
- const lines = [
105
+ return [
106
106
  "OpenClaw loaded these user-editable workspace files for the current turn. Codex loads project-local AGENTS.md natively. When execution uses another folder, OpenClaw supplies the agent workspace AGENTS.md as thread-level developer instructions. SOUL.md, IDENTITY.md, and USER.md are prepared separately from user input and are not repeated here.",
107
107
  "",
108
108
  "# Project Context",
109
109
  "",
110
110
  "The following project context files have been loaded:",
111
- ""
112
- ];
113
- for (const file of contextFiles) lines.push(`## ${file.path}`, "", file.content, "");
114
- return lines.join("\n").trim();
115
- }
116
- function renderCodexWorkspaceMemoryReference(params) {
117
- if (params.files.length === 0) return;
118
- const lines = [
119
- "## OpenClaw Workspace Memory",
120
111
  "",
121
- `MEMORY.md exists in the active agent workspace as a memory file, not an instruction file. OpenClaw does not paste its contents into native Codex turns; use ${(params.toolNames?.length ? params.toolNames : Array.from(CODEX_MEMORY_TOOL_NAMES)).join(" or ")} when durable memory is relevant and the tools are available.`,
122
- ""
123
- ];
124
- for (const file of params.files) lines.push(`- ${file.path}`);
125
- return lines.join("\n").trim();
112
+ ...contextFiles.flatMap((file) => [
113
+ `## ${file.path}`,
114
+ "",
115
+ file.content,
116
+ ""
117
+ ])
118
+ ].join("\n").trim();
126
119
  }
127
120
  function renderCodexWorkspaceMemoryInstructions(params) {
128
- const sections = [params.memoryRecallInstructions ? [params.memoryRecallInstructions, renderCodexMemoryToolSearchBridge(params.toolNames)].filter(isNonEmptyString).join("\n").trim() : void 0, renderCodexWorkspaceMemoryReference(params)].filter(isNonEmptyString);
129
- return sections.length > 0 ? sections.join("\n\n") : void 0;
121
+ const sections = [params.memoryRecallInstructions ? [params.memoryRecallInstructions, renderCodexMemoryToolSearchBridge(params.toolNames)].filter(isNonEmptyString).join("\n").trim() : void 0];
122
+ if (params.files.length > 0) {
123
+ const toolNames = params.toolNames.length ? params.toolNames : Array.from(CODEX_MEMORY_TOOL_NAMES);
124
+ sections.push([
125
+ "## OpenClaw Workspace Memory",
126
+ "",
127
+ `MEMORY.md exists in the active agent workspace as a memory file, not an instruction file. OpenClaw does not paste its contents into native Codex turns; use ${toolNames.join(" or ")} when durable memory is relevant and the tools are available.`,
128
+ "",
129
+ ...params.files.map((file) => `- ${file.path}`)
130
+ ].join("\n").trim());
131
+ }
132
+ return sections.filter(isNonEmptyString).join("\n\n") || void 0;
130
133
  }
131
134
  function renderCodexMemoryToolSearchBridge(toolNames) {
132
135
  const memoryToolNames = toolNames.map(normalizeLowercaseStringOrEmpty).filter((name) => CODEX_MEMORY_TOOL_NAMES.has(name)).toSorted();
@@ -1,7 +1,7 @@
1
1
  import { i as isCodexResponsesOAuthCredential, o as resolveCodexResponsesOAuthProfileFingerprint } from "./responses-oauth-twnuTaAa.mjs";
2
- import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
3
- import { fingerprintResolvedAuthProfileCredential } from "openclaw/plugin-sdk/agent-harness-runtime";
2
+ import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
4
3
  import { resolveApiKeyForProfile } from "openclaw/plugin-sdk/agent-runtime";
4
+ import { fingerprintResolvedAuthProfileCredential } from "openclaw/plugin-sdk/agent-harness-runtime";
5
5
  import { resolveOpenAICodexAuthIdentity } from "openclaw/plugin-sdk/provider-auth";
6
6
  //#region extensions/codex/src/app-server/auth-binding.ts
7
7
  var auth_binding_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
- import { n as defineCodexBuildState } from "./build-state-CqQnsg7T.mjs";
2
- import { u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-C1VFoVPf.mjs";
3
- import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-a0HDa2Mj.mjs";
1
+ import { n as defineCodexBuildState } from "./build-state-CzLMy1S9.mjs";
2
+ import { u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-BtIjV7yN.mjs";
3
+ import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-CRWTkKOn.mjs";
4
4
  import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { createHash } from "node:crypto";
6
6
  import fs, { constants, existsSync, watch } from "node:fs";
@@ -52,18 +52,14 @@ function resolveComputerUseArtifactRoots(candidate) {
52
52
  }
53
53
  /** Stable roots that cover bundle replacement and recursive artifact updates. */
54
54
  function resolveMacOSDesktopGenerationWatchPaths(candidates = resolveMacOSDesktopCodexAppPathCandidates("darwin")) {
55
- const watched = /* @__PURE__ */ new Set(["/Applications"]);
56
- for (const candidate of candidates) watched.add(candidate.appBundlePath);
57
- return [...watched];
55
+ return [.../* @__PURE__ */ new Set(["/Applications", ...candidates.map((candidate) => candidate.appBundlePath)])];
58
56
  }
59
57
  async function readCodexDesktopArtifactTreeFingerprint(root) {
60
58
  let rootStat;
61
59
  try {
62
60
  rootStat = await fs$1.lstat(root, { bigint: true });
63
61
  } catch (error) {
64
- const code = extractErrorCode(error);
65
- if (code === "ENOENT" || code === "ENOTDIR") return "missing";
66
- throw error;
62
+ return missingFingerprint(error);
67
63
  }
68
64
  if (!rootStat.isDirectory()) return statFingerprint(root);
69
65
  let entryCount = 0;
@@ -100,9 +96,7 @@ async function statFingerprint(filePath) {
100
96
  const content = target.isFile() ? await readFileFingerprint(filePath, target, true) : "";
101
97
  return `${type}:${own}:${link}:${realPath}:${statTuple(target)}:${content}`;
102
98
  } catch (error) {
103
- const code = extractErrorCode(error);
104
- if (code === "ENOENT" || code === "ENOTDIR") return "missing";
105
- throw error;
99
+ return missingFingerprint(error);
106
100
  }
107
101
  }
108
102
  async function readFileFingerprint(filePath, expected, followsSymlink) {
@@ -132,6 +126,11 @@ function statTuple(stat) {
132
126
  stat.ctimeNs
133
127
  ].join(":");
134
128
  }
129
+ function missingFingerprint(error) {
130
+ const code = extractErrorCode(error);
131
+ if (code === "ENOENT" || code === "ENOTDIR") return "missing";
132
+ throw error;
133
+ }
135
134
  //#endregion
136
135
  //#region extensions/codex/src/app-server/desktop-generation-owner.ts
137
136
  const SETTLE_DELAY_MS = 1e3;
@@ -139,11 +138,10 @@ const SETTLE_DELAY_MS = 1e3;
139
138
  function createCodexDesktopGenerationOwner(params) {
140
139
  let generation = params.initialGeneration;
141
140
  let invalidation = 0;
142
- let dirty = false;
141
+ let settledInvalidation = 0;
143
142
  let refresh;
144
143
  const markDirty = () => {
145
144
  invalidation += 1;
146
- dirty = true;
147
145
  };
148
146
  const reconcile = () => {
149
147
  if (refresh) return refresh;
@@ -162,7 +160,7 @@ function createCodexDesktopGenerationOwner(params) {
162
160
  epoch: (previous?.epoch ?? 0) + 1,
163
161
  fingerprint: second
164
162
  };
165
- dirty = false;
163
+ settledInvalidation = invalidation;
166
164
  if (previous && generation !== previous) params.onGenerationChange?.(generation);
167
165
  return generation;
168
166
  }
@@ -174,12 +172,12 @@ function createCodexDesktopGenerationOwner(params) {
174
172
  return {
175
173
  read: () => generation,
176
174
  markDirty,
177
- wait: () => dirty ? reconcile() : Promise.resolve(generation),
175
+ wait: () => settledInvalidation !== invalidation ? reconcile() : Promise.resolve(generation),
178
176
  refresh: () => {
179
177
  markDirty();
180
178
  return reconcile();
181
179
  },
182
- isCurrent: (candidate) => Boolean(candidate && !params.signal.aborted && !dirty && generation && candidate.epoch === generation.epoch && candidate.fingerprint === generation.fingerprint),
180
+ isCurrent: (candidate) => Boolean(candidate && !params.signal.aborted && settledInvalidation === invalidation && generation && candidate.epoch === generation.epoch && candidate.fingerprint === generation.fingerprint),
183
181
  waitForIdle: async () => {
184
182
  await refresh?.catch(() => {});
185
183
  }
@@ -229,7 +227,6 @@ function createCodexDesktopGenerationService(params, runtime = {
229
227
  scheduler?.beginClose();
230
228
  current.lastGeneration = current.owner?.read() ?? current.lastGeneration;
231
229
  current.owner = void 0;
232
- current.armEpoch = (current.armEpoch ?? 0) + 1;
233
230
  current.context = void 0;
234
231
  current.runtime = void 0;
235
232
  current.watchHealthy = void 0;
@@ -244,8 +241,6 @@ function armWatchers(current) {
244
241
  const owner = current.owner;
245
242
  const runtime = current.runtime;
246
243
  if (!owner || !runtime || current.watchers) return false;
247
- const armEpoch = (current.armEpoch ?? 0) + 1;
248
- current.armEpoch = armEpoch;
249
244
  const watchers = /* @__PURE__ */ new Set();
250
245
  current.watchers = watchers;
251
246
  const candidateNames = new Set(resolveMacOSDesktopCodexAppPathCandidates("darwin").map((candidate) => candidate.appName));
@@ -254,14 +249,14 @@ function armWatchers(current) {
254
249
  if (!runtime.pathExists(watchedPath)) continue;
255
250
  try {
256
251
  const watcher = runtime.watchPath(watchedPath, { recursive: watchedPath !== APPLICATIONS_PATH }, (_eventType, filename) => {
257
- if (!isCurrentArm(current, owner, watchers, armEpoch)) return;
252
+ if (!isCurrentArm(current, owner, watchers)) return;
258
253
  if (watchedPath === APPLICATIONS_PATH && filename && !candidateNames.has(filename.toString().split(path.sep)[0] ?? "")) return;
259
254
  owner.markDirty();
260
255
  scheduleRearm(current, owner);
261
256
  });
262
257
  watchers.add(watcher);
263
258
  watcher.on("error", (error) => {
264
- if (!isCurrentArm(current, owner, watchers, armEpoch)) return;
259
+ if (!isCurrentArm(current, owner, watchers)) return;
265
260
  reportWatcherFailure(current, owner, error);
266
261
  scheduleRearm(current, owner);
267
262
  });
@@ -282,8 +277,8 @@ function reportWatcherFailure(current, owner, error) {
282
277
  current.context?.serviceHealth?.reportFailure(error);
283
278
  current.context?.logger.warn(`codex desktop generation watcher failed: ${String(error)}`);
284
279
  }
285
- function isCurrentArm(current, owner, watchers, armEpoch) {
286
- return current.owner === owner && !current.context?.scheduler.signal.aborted && current.watchers === watchers && current.armEpoch === armEpoch;
280
+ function isCurrentArm(current, owner, watchers) {
281
+ return isCurrentOwner(current, owner) && current.watchers === watchers;
287
282
  }
288
283
  function scheduleRearm(current, owner) {
289
284
  if (current.rearmPending && current.watchHealthy === false) return;
@@ -295,7 +290,7 @@ function scheduleRearm(current, owner) {
295
290
  delayMs,
296
291
  run: async () => {
297
292
  current.rearmPending = false;
298
- if (current.owner !== owner || current.context?.scheduler.signal.aborted) return;
293
+ if (!isCurrentOwner(current, owner)) return;
299
294
  const wasUnhealthy = current.watchHealthy === false;
300
295
  closeWatchers(current);
301
296
  if (!armWatchers(current) || wasUnhealthy) owner.markDirty();
@@ -305,9 +300,9 @@ function scheduleRearm(current, owner) {
305
300
  }
306
301
  function refreshGeneration(current, owner, refresh) {
307
302
  return refresh.then(() => {
308
- if (current.owner === owner && !current.context?.scheduler.signal.aborted && current.watchHealthy) current.context?.serviceHealth?.clearFailure();
303
+ if (isCurrentOwner(current, owner) && current.watchHealthy) current.context?.serviceHealth?.clearFailure();
309
304
  }).catch((error) => {
310
- if (current.owner !== owner || current.context?.scheduler.signal.aborted) return;
305
+ if (!isCurrentOwner(current, owner)) return;
311
306
  current.context?.serviceHealth?.reportFailure(error);
312
307
  current.context?.logger.warn(`codex desktop generation refresh failed: ${String(error)}`);
313
308
  });
@@ -317,6 +312,9 @@ function closeWatchers(current) {
317
312
  current.watchers = void 0;
318
313
  for (const watcher of watchers ?? []) watcher.close();
319
314
  }
315
+ function isCurrentOwner(current, owner) {
316
+ return current.owner === owner && !current.context?.scheduler.signal.aborted;
317
+ }
320
318
  //#endregion
321
319
  //#region extensions/codex/src/app-server/shared-client-lifecycle.ts
322
320
  /** Client ownership and synchronous retirement, independent of startup/auth execution. */
@@ -453,7 +451,6 @@ function retirePendingSharedClientEntryIfUnclaimed(entry) {
453
451
  entry.closeWhenIdle = true;
454
452
  const state = getSharedCodexAppServerClientState();
455
453
  if (state.clients.get(entry.key) === entry) state.clients.delete(entry.key);
456
- if (!entry.client) return;
457
454
  closeRetiredSharedClientEntry(entry);
458
455
  }
459
456
  /** Failed final claimants join physical cleanup; healthy peers keep their startup. */
@@ -512,9 +509,6 @@ function releaseSharedClientEntry(entry, counter) {
512
509
  //#endregion
513
510
  //#region extensions/codex/src/app-server/auth-cache-key.ts
514
511
  /** Auth cache identity and native CLI credential reads, without login or refresh. */
515
- const CODEX_HOME_ENV_VAR = "CODEX_HOME";
516
- const HOME_ENV_VAR = "HOME";
517
- const CODEX_HOME_DIRNAME = ".codex";
518
512
  const CODEX_AUTH_JSON_FILENAME = "auth.json";
519
513
  const CODEX_APP_SERVER_API_KEY_ENV_VARS = ["CODEX_API_KEY", "OPENAI_API_KEY"];
520
514
  function resolveCodexAppServerFallbackApiKeyCacheKey(params) {
@@ -538,17 +532,12 @@ function fingerprintAuthCacheKey(prefix, domain, ...parts) {
538
532
  return `${prefix}:sha256:${createHash("sha256").update(`openclaw:codex:app-server-${domain}:v1\0`).update(parts.join("\0")).digest("hex")}`;
539
533
  }
540
534
  function resolveCodexCliAuthFilePath(env) {
541
- const configuredCodexHome = env[CODEX_HOME_ENV_VAR]?.trim();
542
- if (configuredCodexHome) return path.join(resolveHomeRelativePath(configuredCodexHome, env), CODEX_AUTH_JSON_FILENAME);
543
- const home = env[HOME_ENV_VAR]?.trim() || env.USERPROFILE?.trim() || os.homedir();
544
- return path.join(home, CODEX_HOME_DIRNAME, CODEX_AUTH_JSON_FILENAME);
545
- }
546
- function resolveHomeRelativePath(value, env) {
547
- if (value === "~" || value.startsWith("~/") || value.startsWith("~\\")) {
548
- const home = env[HOME_ENV_VAR]?.trim() || env.USERPROFILE?.trim() || os.homedir();
549
- return path.join(home, value.slice(value === "~" ? 1 : 2));
535
+ const codexHome = env.CODEX_HOME?.trim() || "~/.codex";
536
+ if (codexHome === "~" || codexHome.startsWith("~/") || codexHome.startsWith("~\\")) {
537
+ const home = env.HOME?.trim() || env.USERPROFILE?.trim() || os.homedir();
538
+ return path.join(home, codexHome.slice(codexHome === "~" ? 1 : 2), CODEX_AUTH_JSON_FILENAME);
550
539
  }
551
- return value;
540
+ return path.join(codexHome, CODEX_AUTH_JSON_FILENAME);
552
541
  }
553
542
  function parseCodexCliAuthFileApiKey(raw) {
554
543
  let parsed;
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
1
+ import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
2
2
  import { AgentHarnessPreflightError } from "openclaw/plugin-sdk/agent-harness-registration";
3
3
  import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
4
4
  //#region extensions/codex/src/app-server/binding-connection.ts
@@ -44,7 +44,7 @@ function requireCodexSupervisionModelSelection(binding) {
44
44
  }
45
45
  /** Registration publishes the resolver; connection policy loads only for an actual request. */
46
46
  async function resolveCodexBindingAppServerConnection(params) {
47
- return (await import("./binding-connection.runtime-Dn2p-fdy.mjs")).resolveCodexBindingAppServerConnection(params, catalogHomes.tryGetRuntime());
47
+ return (await import("./binding-connection.runtime-DAXn7iFl.mjs")).resolveCodexBindingAppServerConnection(params, catalogHomes.tryGetRuntime());
48
48
  }
49
49
  //#endregion
50
50
  export { setCodexCatalogConnectionHomeResolver as a, resolveCodexBindingAppServerConnection as i, binding_connection_exports as n, requireCodexSupervisionModelSelection as r, assertCodexSessionRuntimeOwnership as t };
@@ -1,7 +1,7 @@
1
- import { d as readCodexPluginConfig } from "./config-parsing-BQq-CHTF.mjs";
1
+ import { d as readCodexPluginConfig } from "./config-parsing-DsWSCPHO.mjs";
2
2
  import { n as resolveCodexAppServerLocalHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
3
- import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-BW8rd98k.mjs";
4
- import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
3
+ import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
4
+ import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
5
5
  //#region extensions/codex/src/app-server/binding-connection.runtime.ts
6
6
  /** Resolves connection and auth ownership exclusively from the private thread binding. */
7
7
  async function resolveCodexBindingAppServerConnection(params, discoverHomes) {
@@ -13,7 +13,8 @@ async function resolveCodexBindingAppServerConnection(params, discoverHomes) {
13
13
  let appServer = resolveRuntimeOptions(runtimeParams);
14
14
  if (usesSupervisionConnection) {
15
15
  const persistedFingerprint = binding.pendingSupervisionBranch?.connectionFingerprint ?? binding.appServerRuntimeFingerprint;
16
- let currentFingerprint = buildCodexAppServerConnectionFingerprint(appServer, runtimeParams.agentDir);
16
+ const fingerprint = () => buildCodexAppServerConnectionFingerprint(appServer, runtimeParams.agentDir);
17
+ let currentFingerprint = fingerprint();
17
18
  if (persistedFingerprint && currentFingerprint !== persistedFingerprint && runtimeParams.agentDir) {
18
19
  const home = (await discoverHomes?.(runtimeParams.agentDir))?.find((source) => source.appServer.start.transport === "stdio" && buildCodexAppServerConnectionFingerprint(source.appServer, source.agentDir) === persistedFingerprint);
19
20
  if (home) {
@@ -31,7 +32,7 @@ async function resolveCodexBindingAppServerConnection(params, discoverHomes) {
31
32
  }
32
33
  }
33
34
  };
34
- currentFingerprint = buildCodexAppServerConnectionFingerprint(appServer, runtimeParams.agentDir);
35
+ currentFingerprint = fingerprint();
35
36
  }
36
37
  }
37
38
  if (!persistedFingerprint || persistedFingerprint !== currentFingerprint) throw new Error("Codex supervision connection changed; refusing to operate on its bound native thread");
@@ -1,17 +1,18 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
2
  import { a as resolveCodexPrivateLauncher, i as readCodexAppServerConfigOptions } from "./launch-args-DbFCehO7.mjs";
3
- import { d as readCodexEffectiveConfig } from "./config-options-HG_Rr3W_.mjs";
4
- import { a as codexPrewriteRejectionCause } from "./rpc-error-hmWM21RB.mjs";
5
- import "./config-0Gxk3_eq.mjs";
6
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
7
- import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-qhyYWbew.mjs";
8
- import { _ as assertCodexTurnStartResponse, b as readCodexErrorNotification, g as assertCodexThreadStartResponse, w as createCodexElicitationResponse } from "./client-C8lgBOoO.mjs";
9
- import { o as closeCodexStartupClientBestEffort, s as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-BH0hW2xU.mjs";
10
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-D8VcDTNo.mjs";
11
- import { i as readModelListResult } from "./models-DSseKSMg.mjs";
12
- import { Ct as mergeCodexThreadConfigs, n as buildCodexRingZeroThreadConfigPatch, r as buildCodexRuntimeThreadConfig, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexInheritedMcpServerNames, z as attestCodexRestrictedToolSurfaceMcpServersDisabled } from "./thread-requests-CL1e8Wmx.mjs";
13
- import { b as resolveCodexAppServerReasoningEffort } from "./thread-lifecycle-Cbz_7ySv.mjs";
14
- import { a as resolveCodexPromptError } from "./usage-limit-error-GbT-5NcW.mjs";
3
+ import { d as readCodexEffectiveConfig } from "./config-options-DDzeNQ8m.mjs";
4
+ import { a as codexPrewriteRejectionCause } from "./rpc-error-C98SHchT.mjs";
5
+ import "./config-C1YVVLEA.mjs";
6
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
7
+ import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-ByIwuAC-.mjs";
8
+ import { _ as assertCodexTurnStartResponse, b as readCodexErrorNotification, g as assertCodexThreadStartResponse, w as createCodexElicitationResponse } from "./client-y7nO6X9c.mjs";
9
+ import { o as closeCodexStartupClientBestEffort, s as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-t-kd_1ys.mjs";
10
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-Cphy5Qr_.mjs";
11
+ import { i as readModelListResult } from "./models-DdRyi93L.mjs";
12
+ import { d as mergeCodexThreadConfigs } from "./project-doc-thread-config-BVcvnps8.mjs";
13
+ import { n as resolveCodexAppServerReasoningEffort } from "./reasoning-effort-CS9kKWB9.mjs";
14
+ import { n as buildCodexRingZeroThreadConfigPatch, p as attestCodexRestrictedToolSurfaceMcpServersDisabled, r as buildCodexRuntimeThreadConfig, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexInheritedMcpServerNames } from "./thread-requests-BgzJwJtS.mjs";
15
+ import { a as resolveCodexPromptError } from "./usage-limit-error-2t3KBqiX.mjs";
15
16
  import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
16
17
  import { parse } from "smol-toml";
17
18
  import path from "node:path";
@@ -145,7 +146,7 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
145
146
  assertCurrent: params.assertCurrent,
146
147
  ...params.signal ? { abandonSignal: params.signal } : {}
147
148
  };
148
- const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-qhyYWbew.mjs").then((n) => n.v).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
149
+ const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-ByIwuAC-.mjs").then((n) => n.v).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
149
150
  ...clientOptions,
150
151
  authProfileStore: params.authProfileStore
151
152
  }));
@@ -285,10 +286,13 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
285
286
  });
286
287
  }
287
288
  function resolveBoundedThreadConfig(params, workspace, inheritedMcpServerNames, enableManagedHooks) {
288
- const boundedConfig = mergeCodexThreadConfigs(CODEX_BOUNDED_THREAD_CONFIG, params.threadConfig) ?? CODEX_BOUNDED_THREAD_CONFIG;
289
- const privateConfig = workspace.codexHome ? mergeCodexThreadConfigs(boundedConfig, CODEX_PRIVATE_BOUNDED_THREAD_CONFIG) ?? boundedConfig : boundedConfig;
290
- if (!params.requireNoExternalCapabilities) return privateConfig;
291
- return mergeCodexThreadConfigs(privateConfig, CODEX_SETTLED_FINALIZER_THREAD_CONFIG, buildCodexRingZeroThreadConfigPatch({ toolsAllow: ["openclaw"] }, true, inheritedMcpServerNames), enableManagedHooks ? { "features.hooks": true } : void 0) ?? privateConfig;
289
+ const configs = [
290
+ CODEX_BOUNDED_THREAD_CONFIG,
291
+ params.threadConfig,
292
+ workspace.codexHome ? CODEX_PRIVATE_BOUNDED_THREAD_CONFIG : void 0
293
+ ];
294
+ if (params.requireNoExternalCapabilities) configs.push(CODEX_SETTLED_FINALIZER_THREAD_CONFIG, buildCodexRingZeroThreadConfigPatch({ toolsAllow: ["openclaw"] }, true, inheritedMcpServerNames), enableManagedHooks ? { "features.hooks": true } : void 0);
295
+ return mergeCodexThreadConfigs(...configs) ?? CODEX_BOUNDED_THREAD_CONFIG;
292
296
  }
293
297
  function buildPrivateCodexAppServerStartOptions(start, codexHome, cwd, inspectManagedHooks) {
294
298
  const launchCwd = start.cwd ?? process.cwd();
@@ -1,8 +1,8 @@
1
- import { d as readCodexPluginConfig } from "./config-parsing-BQq-CHTF.mjs";
1
+ import { d as readCodexPluginConfig } from "./config-parsing-DsWSCPHO.mjs";
2
2
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
3
- import { i as resolveCodexAppServerHomeScope } from "./config-options-HG_Rr3W_.mjs";
4
- import "./config-0Gxk3_eq.mjs";
5
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
3
+ import { i as resolveCodexAppServerHomeScope } from "./config-options-DDzeNQ8m.mjs";
4
+ import "./config-C1YVVLEA.mjs";
5
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
6
6
  //#region extensions/codex/src/app-server/bounded-turn-isolation.ts
7
7
  function resolveCodexBoundedTurnIsolation(options) {
8
8
  const pluginConfig = readCodexPluginConfig(options.pluginConfig);
@@ -1,5 +1,5 @@
1
1
  //#region extensions/codex/package.json
2
- var version = "2026.10.1-beta.2";
2
+ var version = "2026.10.5-beta.1";
3
3
  //#endregion
4
4
  //#region extensions/codex/src/build-state.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { r as CodexAppServerRpcError } from "./rpc-error-hmWM21RB.mjs";
1
+ import { r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
2
2
  //#region extensions/codex/src/app-server/capabilities.ts
3
3
  const CODEX_CONTROL_METHODS = {
4
4
  account: "account/read",