@openclaw/codex 2026.9.6 → 2026.9.7

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 (158) hide show
  1. package/README.md +2 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/.setup/{account-usage-runtime-Eem_WGqY.mjs → account-usage-runtime-DFhbh1zz.mjs} +5 -5
  4. package/dist/.setup/{apply-DDOi8uNx.mjs → apply-D3GcSoSa.mjs} +22 -36
  5. package/dist/.setup/{attempt-client-cleanup-CEv1cKwF.mjs → attempt-client-cleanup-DOP-cW5j.mjs} +128 -37
  6. package/dist/.setup/attempt-workspace-context-C5HigshI.mjs +164 -0
  7. package/dist/.setup/{auth-binding-DhLWa_7K.mjs → auth-binding-BLWz7stm.mjs} +14 -1
  8. package/dist/.setup/{auth-cache-key-B2mpaI9D.mjs → auth-cache-key-Dbvq-QgB.mjs} +36 -34
  9. package/dist/.setup/{auth-profile-WqZtZfXN.mjs → auth-profile-B0okYl2D.mjs} +1 -2
  10. package/dist/.setup/auth-start-options-BPIPeEX8.mjs +44 -0
  11. package/dist/.setup/{binding-connection-ThoatDcb.mjs → binding-connection-DTtN1KrX.mjs} +2 -2
  12. package/dist/.setup/{binding-connection.runtime-yoHrABt-.mjs → binding-connection.runtime-6TpgD1M6.mjs} +4 -4
  13. package/dist/.setup/{bounded-turn-B2HScEgT.mjs → bounded-turn-CbjoN2OW.mjs} +15 -18
  14. package/dist/.setup/bounded-turn-isolation-B8K_ylqk.mjs +14 -0
  15. package/dist/.setup/{build-state-C7EnDVgr.mjs → build-state-Da1_z0kd.mjs} +1 -1
  16. package/dist/.setup/{capabilities-CDXOOFdZ.mjs → capabilities-B3WEZl4e.mjs} +2 -10
  17. package/dist/.setup/{client-Cs08OXVQ.mjs → client-N0JpgSzF.mjs} +138 -399
  18. package/dist/.setup/{client-catalog-response-BMgt_4q4.mjs → client-catalog-response-5HHLdcde.mjs} +1 -1
  19. package/dist/.setup/{command-dispatch-B4JuOsOk.mjs → command-dispatch-BeAoaovI.mjs} +5 -8
  20. package/dist/.setup/{command-formatters-Bmqvr9tO.mjs → command-formatters-R3ckE3Co.mjs} +29 -61
  21. package/dist/.setup/{command-handlers-DW7Lx9oH.mjs → command-handlers-ylTMS00z.mjs} +222 -343
  22. package/dist/.setup/{command-rpc-DixIj3HW.mjs → command-rpc-CGJGUQ6Y.mjs} +15 -18
  23. package/dist/.setup/compact-C2WamavS.mjs +776 -0
  24. package/dist/.setup/{config-BoTP_mrL.mjs → config-DKhXquav.mjs} +26 -28
  25. package/dist/.setup/{config-options-BvaRs51b.mjs → config-options-CzyWLTJt.mjs} +24 -37
  26. package/dist/.setup/{config-parsing-CcB9iPoq.mjs → config-parsing-b088LyhT.mjs} +57 -60
  27. package/dist/.setup/{config-runtime-C8Rw1m1m.mjs → config-runtime-C0NbLms1.mjs} +2 -2
  28. package/dist/.setup/{config-security-BEReZ6go.mjs → config-security-CE-FcGw9.mjs} +32 -111
  29. package/dist/.setup/{config-utils-DujwEnhg.mjs → config-utils-D0CXecki.mjs} +3 -13
  30. package/dist/.setup/context-engine-projection-PezSESth.mjs +387 -0
  31. package/dist/.setup/{conversation-binding-DP-gMrBP.mjs → conversation-binding-3Min8qvP.mjs} +67 -90
  32. package/dist/.setup/{conversation-binding-data-CrcyZk6O.mjs → conversation-binding-data-C746z5Pn.mjs} +8 -12
  33. package/dist/.setup/{conversation-control-uK9Jomlc.mjs → conversation-control-CEP8X5JC.mjs} +8 -8
  34. package/dist/.setup/{cyber-failover-DYwbmf1o.mjs → cyber-failover-XV0nNRZu.mjs} +1 -1
  35. package/dist/.setup/{cyber-failover-notice-e9G3J9-e.mjs → cyber-failover-notice-RNpGpTyP.mjs} +1 -1
  36. package/dist/.setup/{dynamic-tools-BDXl-8Cw.mjs → dynamic-tools-DzlsLUuS.mjs} +2305 -2606
  37. package/dist/.setup/{effective-mcp-catalog-CvnvnGIe.mjs → effective-mcp-catalog-CxUtC-xG.mjs} +8 -17
  38. package/dist/.setup/{ephemeral-turn-poidXgek.mjs → ephemeral-turn-CDsPJOa2.mjs} +3 -3
  39. package/dist/.setup/event-projector-assistant-message-CigreO4K.mjs +69 -0
  40. package/dist/.setup/{event-projector-usage-CnBS8Wa3.mjs → event-projector-usage-03R0I2dM.mjs} +3 -25
  41. package/dist/.setup/event-projector-values-DJSz8BTk.mjs +106 -0
  42. package/dist/.setup/incognito-session-DWYapfwf.mjs +2 -0
  43. package/dist/.setup/{inference-context-D96l9-ew.mjs → inference-context-D-9gWlTR.mjs} +16 -18
  44. package/dist/.setup/inference-dispatch-CMZtjQyz.mjs +359 -0
  45. package/dist/.setup/inference-metadata-CgIf7sOx.mjs +81 -0
  46. package/dist/.setup/{inference-proxy-b-aJMSxm.mjs → inference-proxy-DhcXOgUE.mjs} +174 -214
  47. package/dist/.setup/{isolated-completion-BIZFhTNG.mjs → isolated-completion-Dm3PzxJk.mjs} +9 -12
  48. package/dist/.setup/{managed-binary-BnshlFag.mjs → managed-binary-kiWRhNRE.mjs} +8 -12
  49. package/dist/.setup/{model-catalog-CfXJf9Ay.mjs → model-catalog-PAuZgJC6.mjs} +11 -10
  50. package/dist/.setup/model-runtime-BdqzOMkU.mjs +11 -0
  51. package/dist/.setup/{models-KnqBv0hE.mjs → models-DHXZtVVk.mjs} +9 -18
  52. package/dist/.setup/{native-auth-rWbGbMn3.mjs → native-auth-CuG53tu4.mjs} +4 -4
  53. package/dist/.setup/{native-execution-policy-umd0tgh4.mjs → native-execution-policy-BxZJy5mP.mjs} +5 -30
  54. package/dist/.setup/{native-subagent-monitor-D3filLY2.mjs → native-subagent-monitor-Dpsmf2wz.mjs} +4395 -3609
  55. package/dist/.setup/native-subagent-pending-assignments-DwkCzLvD.mjs +203 -0
  56. package/dist/.setup/native-task-assignments-DMQ0g3hu.mjs +194 -0
  57. package/dist/.setup/{node-cli-sessions-r3avj02l.mjs → node-cli-sessions-HC4W6FLI.mjs} +19 -49
  58. package/dist/.setup/{node-exec-server.runtime-BDwWXVpK.mjs → node-exec-server.runtime-BgBfWQqo.mjs} +3 -6
  59. package/dist/.setup/{plan-CN3VwfNU.mjs → plan-Y-QIvrKB.mjs} +49 -92
  60. package/dist/.setup/{plugin-activation-DT3MNtqj.mjs → plugin-activation-cNHRfaxU.mjs} +8 -36
  61. package/dist/.setup/{plugin-app-cache-key-B2CsSdnV.mjs → plugin-app-cache-key-BL9B5H0L.mjs} +6 -23
  62. package/dist/.setup/{plugin-inventory-BoRei8Z4.mjs → plugin-inventory-Cky2XJUw.mjs} +21 -21
  63. package/dist/.setup/{plugin-marketplace-discovery-CDOi8IFs.mjs → plugin-marketplace-discovery-D_dV9FXa.mjs} +18 -24
  64. package/dist/.setup/{plugin-metadata-cache-Ctmo83k_.mjs → plugin-metadata-cache-DsjsL1dr.mjs} +115 -175
  65. package/dist/.setup/{provider-BOsxQHOM.mjs → provider-DH8NSzGt.mjs} +11 -14
  66. package/dist/.setup/{provider-capabilities-BfE88FZ5.mjs → provider-capabilities-CAxoF-X1.mjs} +13 -18
  67. package/dist/.setup/{rate-limits-CMU3DUD0.mjs → rate-limits-B7-X2TgG.mjs} +9 -31
  68. package/dist/.setup/{request-D2L0zMrq.mjs → request-BHZ1nz8d.mjs} +7 -6
  69. package/dist/.setup/responses-oauth-twnuTaAa.mjs +93 -0
  70. package/dist/.setup/rpc-error-BlD2vuzn.mjs +31 -0
  71. package/dist/.setup/{run-attempt-BHu11r7h.mjs → run-attempt-D8RZUOzY.mjs} +1035 -1023
  72. package/dist/.setup/{run-attempt-lifecycle-B7JbY4-F.mjs → run-attempt-lifecycle-C-6O3Exn.mjs} +10 -24
  73. package/dist/.setup/{runtime-artifact-CLZ8udh-.mjs → runtime-artifact-DDQ-HGXf.mjs} +16 -4
  74. package/dist/.setup/runtime-artifact-connection-D68qQn1m.mjs +78 -0
  75. package/dist/.setup/sandbox-guard-DjCz2eOw.mjs +126 -0
  76. package/dist/.setup/scope-DOC1Xjc8.mjs +6 -0
  77. package/dist/.setup/session-binding-DGCYAfvD.mjs +443 -0
  78. package/dist/.setup/{session-binding-record-BGoz8wOK.mjs → session-binding-record-Oe9L-CNY.mjs} +52 -130
  79. package/dist/.setup/{session-binding-sidecars-BlB5EvIS.mjs → session-binding-sidecars-jo6H8dFr.mjs} +196 -17
  80. package/dist/.setup/{session-catalog-Pno1xGcl.mjs → session-catalog-4sCdv5qx.mjs} +170 -324
  81. package/dist/.setup/{session-catalog-adoption-BI6UTDZT.mjs → session-catalog-adoption-BU_pHWG7.mjs} +7 -6
  82. package/dist/.setup/{session-catalog-archive-lHBqzhaO.mjs → session-catalog-archive-spHfihri.mjs} +6 -6
  83. package/dist/.setup/session-catalog-events-DePDzzjc.mjs +139 -0
  84. package/dist/.setup/session-catalog-home-id-vlih0B_g.mjs +22 -0
  85. package/dist/.setup/{session-catalog-index-B9_VQIUz.mjs → session-catalog-index-CZvDzC6z.mjs} +126 -122
  86. package/dist/.setup/{session-catalog-index-order-hcdz07yN.mjs → session-catalog-index-order-BcQpHks3.mjs} +1 -1
  87. package/dist/.setup/{session-catalog-index-state-Dgh8ORJm.mjs → session-catalog-index-state-TeO7EyO-.mjs} +3 -2
  88. package/dist/.setup/session-catalog-limits-DDxOsQeC.mjs +14 -0
  89. package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +170 -0
  90. package/dist/.setup/session-catalog-native-projection-DjhwGL6x.mjs +178 -0
  91. package/dist/.setup/{session-catalog-node-adoption-ITddWx_X.mjs → session-catalog-node-adoption-DgXvSGu0.mjs} +10 -27
  92. package/dist/.setup/{session-catalog-node-continue-6g6qi4A9.mjs → session-catalog-node-continue-DjKXHBbi.mjs} +8 -10
  93. package/dist/.setup/session-catalog-node-lookup-CtAXI5W5.mjs +56 -0
  94. package/dist/.setup/{session-catalog-native-projection-DowriLid.mjs → session-catalog-parsing-CPGaPYr-.mjs} +11 -194
  95. package/dist/.setup/{session-catalog-projection-zK_PUsiE.mjs → session-catalog-projection-Cr5qP5Dj.mjs} +6 -4
  96. package/dist/.setup/session-catalog-provenance-DoAvktcj.mjs +95 -0
  97. package/dist/.setup/{session-cli-irrD-uo7.mjs → session-cli-Cn_nCqfq.mjs} +9 -22
  98. package/dist/.setup/{session-history-BrqhSCf9.mjs → session-history-D83lJWHG.mjs} +4 -6
  99. package/dist/.setup/{session-history-import-D-3wAgOP.mjs → session-history-import-WhX-X33a.mjs} +7 -10
  100. package/dist/.setup/session-history-read-Ov3StuL4.mjs +133 -0
  101. package/dist/.setup/{session-history.worker-CaCh0xF_.mjs → session-history.worker-MnPKncqP.mjs} +9 -5
  102. package/dist/.setup/session-initialization-6aveB9qb.mjs +22 -0
  103. package/dist/.setup/{session-permission-policy-BI1QK_98.mjs → session-permission-policy-Ci_fVX6y.mjs} +4 -8
  104. package/dist/.setup/{session-retirement-BH-S6qkJ.mjs → session-retirement-qMTxkNx2.mjs} +17 -17
  105. package/dist/.setup/{settled-turn-context-fmwouT5I.mjs → settled-turn-context-D4yj4rxf.mjs} +1 -1
  106. package/dist/.setup/{settled-turn-finalizer-DiAi6Kx6.mjs → settled-turn-finalizer-BsvEabkw.mjs} +14 -10
  107. package/dist/.setup/{shared-client-DA4VR4Eb.mjs → shared-client-DqyTMYug.mjs} +783 -412
  108. package/dist/.setup/shared-client-lifecycle-DJIgqgMw.mjs +153 -0
  109. package/dist/.setup/{side-question-BJ1wSDcB.mjs → side-question-C4kCmQy1.mjs} +79 -143
  110. package/dist/.setup/{source-CUzJq5WN.mjs → source-CS_7GFJZ.mjs} +80 -137
  111. package/dist/.setup/{thread-lifecycle-B3mfz1TG.mjs → thread-lifecycle-DPflntEJ.mjs} +294 -737
  112. package/dist/.setup/{incognito-session-uhrBF6wJ.mjs → thread-ownership-queue-Dp24d7-F.mjs} +1 -2
  113. package/dist/.setup/{thread-ownership-DcTtAcXj.mjs → thread-ownership-roNP0l1c.mjs} +45 -10
  114. package/dist/.setup/{thread-policy-DGuQsuFC.mjs → thread-policy-DTd-DtkX.mjs} +46 -7
  115. package/dist/.setup/{thread-requests-BLvGkP2R.mjs → thread-requests-B_bRnMGN.mjs} +199 -302
  116. package/dist/.setup/{thread-resume-DIBXwOpE.mjs → thread-resume-CdDaoc7T.mjs} +6 -6
  117. package/dist/.setup/{timeout-C910MdAB.mjs → timeout-CXOfNoaX.mjs} +1 -35
  118. package/dist/.setup/{transcript-history-projection-ZZpkFkJ_.mjs → transcript-history-projection-DRSifI-1.mjs} +17 -89
  119. package/dist/.setup/{transcript-mirror-attestation-CzM-94NC.mjs → transcript-mirror-attestation-YSegaktH.mjs} +3 -4
  120. package/dist/.setup/{transcript-mirror-BtHDBp1G.mjs → transcript-mirror-kxmCYsuF.mjs} +7 -9
  121. package/dist/.setup/{transport-stdio-h2VHOskC.mjs → transport-stdio-Bdegpn2V.mjs} +5 -22
  122. package/dist/.setup/transport-websocket-BTBE-LD9.mjs +211 -0
  123. package/dist/.setup/{upstream-prompt-provenance-LphB8slG.mjs → upstream-prompt-provenance-fXkKbPVC.mjs} +3 -9
  124. package/dist/.setup/{upstream-session-fork-BUr4OUbC.mjs → upstream-session-fork-CBeVjBpT.mjs} +23 -23
  125. package/dist/.setup/{usage-BML0r-ua.mjs → usage-BMzNxeR_.mjs} +4 -4
  126. package/dist/.setup/{usage-limit-error-DUMbefVY.mjs → usage-limit-error-QXerDo3i.mjs} +4 -19
  127. package/dist/.setup/{web-search-provider.runtime-CDKlN-Rv.mjs → web-search-provider.runtime-P77OUeoo.mjs} +8 -19
  128. package/dist/api.js +9 -11
  129. package/dist/catalog-page.worker.js +1 -1
  130. package/dist/cli-metadata.js +1 -1
  131. package/dist/doctor-contract-api.js +50 -8
  132. package/dist/harness.js +344 -1
  133. package/dist/index.js +193 -245
  134. package/dist/media-understanding-provider.js +9 -22
  135. package/dist/migration-provider-api.js +1 -1
  136. package/dist/provider-discovery.js +1 -1
  137. package/dist/session-history-worker-runtime.js +3 -3
  138. package/dist/session-history.worker.js +1 -1
  139. package/openclaw.plugin.json +14 -2
  140. package/package.json +7 -6
  141. package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +0 -331
  142. package/dist/.setup/compact-Du5UvtxA.mjs +0 -680
  143. package/dist/.setup/event-projector-assistant-message-BsruvNrH.mjs +0 -103
  144. package/dist/.setup/event-projector-items-C6L_5ZiT.mjs +0 -234
  145. package/dist/.setup/harness-a_MsE4-_.mjs +0 -355
  146. package/dist/.setup/history-rejection-B4nOXNXF.mjs +0 -13
  147. package/dist/.setup/image-payload-sanitizer-tupAr-2o.mjs +0 -79
  148. package/dist/.setup/local-runtime-attribution-B_2mnqhb.mjs +0 -19
  149. package/dist/.setup/native-subagent-history-0nYYgo0k.mjs +0 -148
  150. package/dist/.setup/native-subagent-task-ids-wb8CKZGN.mjs +0 -441
  151. package/dist/.setup/plugin-approval-roundtrip-C0MZzCuP.mjs +0 -122
  152. package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
  153. package/dist/.setup/sandbox-guard-C2sRMOEY.mjs +0 -166
  154. package/dist/.setup/session-binding-Cm0apEbd.mjs +0 -692
  155. package/dist/.setup/session-catalog-events-Bj6j94E_.mjs +0 -347
  156. package/dist/.setup/session-history-read-B3ZfSUbF.mjs +0 -50
  157. package/dist/.setup/session-initialization-rcgbZiid.mjs +0 -75
  158. package/dist/.setup/thread-history-page-DoVpnHim.mjs +0 -83
@@ -1,11 +1,12 @@
1
- import { n as defineCodexBuildState } from "./build-state-C7EnDVgr.mjs";
2
- import { u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-BnshlFag.mjs";
3
- import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-h2VHOskC.mjs";
1
+ import { n as defineCodexBuildState } from "./build-state-Da1_z0kd.mjs";
2
+ import { u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-kiWRhNRE.mjs";
3
+ import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-Bdegpn2V.mjs";
4
4
  import { createHash } from "node:crypto";
5
5
  import fs, { constants, existsSync, watch } from "node:fs";
6
6
  import path from "node:path";
7
7
  import os from "node:os";
8
8
  import fs$1 from "node:fs/promises";
9
+ import { extractErrorCode } from "openclaw/plugin-sdk/error-runtime";
9
10
  import { sha256File } from "openclaw/plugin-sdk/file-access-runtime";
10
11
  import { readSecretFile } from "openclaw/plugin-sdk/secret-file";
11
12
  //#region extensions/codex/src/app-server/desktop-generation-fingerprint.ts
@@ -13,12 +14,14 @@ const MAX_COMPUTER_USE_PLUGIN_TREE_ENTRIES = 4096;
13
14
  /** Fingerprints every desktop candidate that can own a managed fallback artifact. */
14
15
  async function readMacOSDesktopGenerationFingerprint(candidates = resolveMacOSDesktopCodexAppPathCandidates("darwin")) {
15
16
  const entries = [];
17
+ const bundles = /* @__PURE__ */ new Set();
16
18
  for (const candidate of candidates) {
17
19
  const command = await statFingerprint(candidate.appServerCommandPath);
18
20
  entries.push(`candidate:${candidate.appName}:${candidate.appServerCommandPath}:${command}`);
21
+ if (bundles.has(candidate.appBundlePath)) continue;
22
+ bundles.add(candidate.appBundlePath);
19
23
  for (const artifactPath of resolveMacOSDesktopGenerationPaths(candidate)) entries.push(`${artifactPath}\0${await statFingerprint(artifactPath)}`);
20
- const pluginRoot = resolveComputerUsePluginRoot(candidate);
21
- entries.push(`${pluginRoot}\0${await directoryTreeFingerprint(pluginRoot)}`);
24
+ for (const pluginRoot of resolveComputerUseArtifactRoots(candidate)) entries.push(`${pluginRoot}\0${await readCodexDesktopArtifactTreeFingerprint(pluginRoot)}`);
22
25
  }
23
26
  return createHash("sha256").update(entries.join("\0")).digest("hex");
24
27
  }
@@ -26,6 +29,8 @@ function resolveMacOSDesktopGenerationPaths(candidate) {
26
29
  return [
27
30
  candidate.appBundlePath,
28
31
  path.join(candidate.bundledMarketplacePath, ".agents", "plugins", "marketplace.json"),
32
+ path.join(candidate.appBundlePath, "Contents", "Resources", "cua_node", "bin", "node"),
33
+ path.join(candidate.appBundlePath, "Contents", "Resources", "cua_node", "bin", "node_repl"),
29
34
  ...candidate.computerUseServiceAppPaths.flatMap((servicePath) => [
30
35
  servicePath,
31
36
  path.join(servicePath, "Contents", "Info.plist"),
@@ -33,8 +38,15 @@ function resolveMacOSDesktopGenerationPaths(candidate) {
33
38
  ])
34
39
  ];
35
40
  }
36
- function resolveComputerUsePluginRoot(candidate) {
37
- return path.join(candidate.bundledMarketplacePath, "plugins", "computer-use");
41
+ function resolveComputerUseArtifactRoots(candidate) {
42
+ const modules = path.join(candidate.appBundlePath, "Contents", "Resources", "cua_node", "lib", "node_modules", "@oai");
43
+ return [
44
+ path.join(candidate.bundledMarketplacePath, "plugins", "computer-use"),
45
+ path.join(candidate.bundledMarketplacePath, "plugins", "unified-computer-use"),
46
+ path.join(modules, "cua-repl"),
47
+ path.join(modules, "cua"),
48
+ path.join(modules, "sky", "dist")
49
+ ];
38
50
  }
39
51
  /** Stable roots that cover bundle replacement and recursive artifact updates. */
40
52
  function resolveMacOSDesktopGenerationWatchPaths(candidates = resolveMacOSDesktopCodexAppPathCandidates("darwin")) {
@@ -42,12 +54,13 @@ function resolveMacOSDesktopGenerationWatchPaths(candidates = resolveMacOSDeskto
42
54
  for (const candidate of candidates) watched.add(candidate.appBundlePath);
43
55
  return [...watched];
44
56
  }
45
- async function directoryTreeFingerprint(root) {
57
+ async function readCodexDesktopArtifactTreeFingerprint(root) {
46
58
  let rootStat;
47
59
  try {
48
60
  rootStat = await fs$1.lstat(root, { bigint: true });
49
61
  } catch (error) {
50
- if (isNodeError(error, "ENOENT") || isNodeError(error, "ENOTDIR")) return "missing";
62
+ const code = extractErrorCode(error);
63
+ if (code === "ENOENT" || code === "ENOTDIR") return "missing";
51
64
  throw error;
52
65
  }
53
66
  if (!rootStat.isDirectory()) return statFingerprint(root);
@@ -85,7 +98,8 @@ async function statFingerprint(filePath) {
85
98
  const content = target.isFile() ? await readFileFingerprint(filePath, target, true) : "";
86
99
  return `${type}:${own}:${link}:${realPath}:${statTuple(target)}:${content}`;
87
100
  } catch (error) {
88
- if (isNodeError(error, "ENOENT") || isNodeError(error, "ENOTDIR")) return "missing";
101
+ const code = extractErrorCode(error);
102
+ if (code === "ENOENT" || code === "ENOTDIR") return "missing";
89
103
  throw error;
90
104
  }
91
105
  }
@@ -116,9 +130,6 @@ function statTuple(stat) {
116
130
  stat.ctimeNs
117
131
  ].join(":");
118
132
  }
119
- function isNodeError(error, code) {
120
- return Boolean(error && typeof error === "object" && "code" in error && error.code === code);
121
- }
122
133
  //#endregion
123
134
  //#region extensions/codex/src/app-server/desktop-generation-owner.ts
124
135
  const SETTLE_DELAY_MS = 1e3;
@@ -204,12 +215,9 @@ function createCodexDesktopGenerationService(params, runtime = {
204
215
  if (runtime.platform !== "darwin") return;
205
216
  const current = state();
206
217
  current.context = ctx;
207
- current.readFingerprint = runtime.readFingerprint;
208
- current.resolveWatchPaths = runtime.resolveWatchPaths;
209
- current.pathExists = runtime.pathExists;
210
- current.watchPath = runtime.watchPath;
218
+ current.runtime = { ...runtime };
211
219
  current.owner = createCodexDesktopGenerationOwner({
212
- readFingerprint: current.readFingerprint,
220
+ readFingerprint: runtime.readFingerprint,
213
221
  onGenerationChange: params.onGenerationChange,
214
222
  initialGeneration: current.lastGeneration
215
223
  });
@@ -223,10 +231,7 @@ function createCodexDesktopGenerationService(params, runtime = {
223
231
  current.owner = void 0;
224
232
  current.armEpoch = (current.armEpoch ?? 0) + 1;
225
233
  current.context = void 0;
226
- current.readFingerprint = void 0;
227
- current.resolveWatchPaths = void 0;
228
- current.pathExists = void 0;
229
- current.watchPath = void 0;
234
+ current.runtime = void 0;
230
235
  current.watchHealthy = void 0;
231
236
  current.rearmDelayMs = void 0;
232
237
  if (current.rearmTimer) {
@@ -246,10 +251,10 @@ function armWatchers(current) {
246
251
  current.watchers = watchers;
247
252
  const candidateNames = new Set(resolveMacOSDesktopCodexAppPathCandidates("darwin").map((candidate) => candidate.appName));
248
253
  let complete = true;
249
- for (const watchedPath of current.resolveWatchPaths?.() ?? []) {
250
- if (!current.pathExists?.(watchedPath)) continue;
254
+ for (const watchedPath of current.runtime?.resolveWatchPaths() ?? []) {
255
+ if (!current.runtime?.pathExists(watchedPath)) continue;
251
256
  try {
252
- const watcher = current.watchPath?.(watchedPath, { recursive: watchedPath !== APPLICATIONS_PATH }, (_eventType, filename) => {
257
+ const watcher = current.runtime?.watchPath(watchedPath, { recursive: watchedPath !== APPLICATIONS_PATH }, (_eventType, filename) => {
253
258
  if (!isCurrentArm(current, owner, watchers, armEpoch)) return;
254
259
  if (watchedPath === APPLICATIONS_PATH && filename && !candidateNames.has(filename.toString().split(path.sep)[0] ?? "")) return;
255
260
  owner.markDirty();
@@ -304,17 +309,14 @@ function scheduleRearm(current, owner) {
304
309
  }, delayMs);
305
310
  current.rearmTimer.unref();
306
311
  }
307
- function logRefreshFailure(current, owner) {
308
- return (error) => {
309
- if (current.owner !== owner) return;
310
- current.context?.serviceHealth?.reportFailure(error);
311
- current.context?.logger.warn(`codex desktop generation refresh failed: ${String(error)}`);
312
- };
313
- }
314
312
  function refreshGeneration(current, owner, refresh) {
315
313
  refresh.then(() => {
316
314
  if (current.owner === owner && current.watchHealthy) current.context?.serviceHealth?.clearFailure();
317
- }).catch(logRefreshFailure(current, owner));
315
+ }).catch((error) => {
316
+ if (current.owner !== owner) return;
317
+ current.context?.serviceHealth?.reportFailure(error);
318
+ current.context?.logger.warn(`codex desktop generation refresh failed: ${String(error)}`);
319
+ });
318
320
  }
319
321
  function closeWatchers(current) {
320
322
  const watchers = current.watchers;
@@ -423,4 +425,4 @@ function readFirstNonEmptyEnvEntry(env, keys) {
423
425
  }
424
426
  }
425
427
  //#endregion
426
- export { readCodexCliAuthFileApiKey as a, resolveCodexAppServerPreparedApiKeyCacheKey as c, waitForCodexDesktopGeneration as d, fingerprintTokenAuthProfileCacheKey as i, createCodexDesktopGenerationService as l, CODEX_AUTH_JSON_FILENAME as n, readFirstNonEmptyEnv as o, fingerprintApiKeyAuthProfileCacheKey as r, resolveCodexAppServerFallbackApiKeyCacheKey as s, CODEX_APP_SERVER_API_KEY_ENV_VARS as t, isCodexDesktopGenerationCurrent as u };
428
+ export { readCodexCliAuthFileApiKey as a, resolveCodexAppServerPreparedApiKeyCacheKey as c, waitForCodexDesktopGeneration as d, readCodexDesktopArtifactTreeFingerprint as f, fingerprintTokenAuthProfileCacheKey as i, createCodexDesktopGenerationService as l, CODEX_AUTH_JSON_FILENAME as n, readFirstNonEmptyEnv as o, fingerprintApiKeyAuthProfileCacheKey as r, resolveCodexAppServerFallbackApiKeyCacheKey as s, CODEX_APP_SERVER_API_KEY_ENV_VARS as t, isCodexDesktopGenerationCurrent as u };
@@ -10,7 +10,6 @@ const { resolveCodexAppServerAuthProfileId, resolveCodexAppServerAuthProfileIdFo
10
10
  ensureAuthProfileStore,
11
11
  resolveAuthProfileOrder
12
12
  });
13
- /** Returns true when an auth profile uses native Codex/OpenAI app-server auth. */
14
13
  function isCodexAppServerNativeAuthProfile(lookup) {
15
14
  const authProfileId = lookup.authProfileId?.trim();
16
15
  if (!authProfileId) return false;
@@ -21,7 +20,7 @@ function isCodexAppServerNativeAuthProfile(lookup) {
21
20
  externalCliProviderIds: [CODEX_APP_SERVER_NATIVE_AUTH_PROVIDER],
22
21
  externalCliProfileIds: [authProfileId]
23
22
  })).profiles[authProfileId];
24
- if (!credential || credential.type === "api_key") return false;
23
+ if (!credential || credential.type === "api_key" || credential.type === "oauth" && (credential.authFlow === "chatgpt-token-sharing" || credential.authFlow === "chatgpt-identity")) return false;
25
24
  const provider = credential.provider?.trim();
26
25
  return Boolean(provider && resolveProviderIdForAuth(provider, { config: lookup.config }) === CODEX_APP_SERVER_NATIVE_AUTH_PROVIDER);
27
26
  } catch (error) {
@@ -0,0 +1,44 @@
1
+ import { r as normalizeCodexAppServerArgs } from "./launch-args-DbFCehO7.mjs";
2
+ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
+ import path from "node:path";
4
+ import { homedir } from "node:os";
5
+ //#region extensions/codex/src/app-server/auth-start-options.ts
6
+ const CODEX_APP_SERVER_HOME_DIRNAME = "codex-home";
7
+ const CODEX_EPHEMERAL_AUTH_STORE_OVERRIDE = "cli_auth_credentials_store=\"ephemeral\"";
8
+ function resolveCodexAppServerHomeDir(agentDir) {
9
+ if (!agentDir) throw new Error("Agent-scoped Codex requires an OpenClaw agent directory");
10
+ return path.join(path.resolve(agentDir), CODEX_APP_SERVER_HOME_DIRNAME);
11
+ }
12
+ /** Resolves the native user Codex home used by Desktop and the CLI. */
13
+ function resolveCodexAppServerUserHomeDir(env = process.env, homedir$1 = homedir) {
14
+ const configured = normalizeOptionalString(env.CODEX_HOME);
15
+ return path.resolve(configured ?? path.join(homedir$1(), ".codex"));
16
+ }
17
+ /** Resolves the local CODEX_HOME used when starting one app-server connection. */
18
+ function resolveCodexAppServerLocalHomeDir(startOptions, agentDir, env = process.env) {
19
+ if (startOptions.codexHome) return startOptions.codexHome;
20
+ const configured = startOptions.env?.CODEX_HOME;
21
+ if (configured?.trim()) return configured;
22
+ return startOptions.homeScope === "user" ? resolveCodexAppServerUserHomeDir(env) : resolveCodexAppServerHomeDir(agentDir);
23
+ }
24
+ /** Forces OpenClaw-owned Codex auth to remain process-local. */
25
+ function withEphemeralCodexAuthStore(params) {
26
+ const { startOptions } = params;
27
+ if (!params.preparedAuth && params.authProfileId === null) return startOptions;
28
+ const args = normalizeCodexAppServerArgs(startOptions.args, CODEX_EPHEMERAL_AUTH_STORE_OVERRIDE);
29
+ return args === startOptions.args ? startOptions : {
30
+ ...startOptions,
31
+ args
32
+ };
33
+ }
34
+ function withClearedEnvironmentVariables(startOptions, envVars) {
35
+ const clearEnv = startOptions.clearEnv ?? [];
36
+ const missingEnvVars = envVars.filter((envVar) => !clearEnv.includes(envVar));
37
+ if (missingEnvVars.length === 0) return startOptions;
38
+ return {
39
+ ...startOptions,
40
+ clearEnv: [...clearEnv, ...missingEnvVars]
41
+ };
42
+ }
43
+ //#endregion
44
+ export { withEphemeralCodexAuthStore as a, withClearedEnvironmentVariables as i, resolveCodexAppServerLocalHomeDir as n, resolveCodexAppServerUserHomeDir as r, resolveCodexAppServerHomeDir as t };
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
1
+ import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.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-yoHrABt-.mjs")).resolveCodexBindingAppServerConnection(params, catalogHomes.tryGetRuntime());
47
+ return (await import("./binding-connection.runtime-6TpgD1M6.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 { f as resolveCodexAppServerLocalHomeDir } from "./config-security-BEReZ6go.mjs";
2
- import { d as readCodexPluginConfig } from "./config-parsing-CcB9iPoq.mjs";
3
- import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-B2CsSdnV.mjs";
4
- import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-C8Rw1m1m.mjs";
1
+ import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
2
+ import { n as resolveCodexAppServerLocalHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
3
+ import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-BL9B5H0L.mjs";
4
+ import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.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) {
@@ -1,16 +1,16 @@
1
- import { a as resolveCodexPrivateLauncher, i as readCodexAppServerConfigOptions } from "./launch-args-DbFCehO7.mjs";
2
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
3
- import { d as readCodexEffectiveConfig } from "./config-options-BvaRs51b.mjs";
4
- import "./config-BoTP_mrL.mjs";
5
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C8Rw1m1m.mjs";
6
- import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-DA4VR4Eb.mjs";
7
- import { E as createCodexElicitationResponse, S as assertCodexTurnStartResponse, w as readCodexErrorNotification, x as assertCodexThreadStartResponse } from "./client-Cs08OXVQ.mjs";
8
- import { o as closeCodexStartupClientBestEffort, s as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-CEv1cKwF.mjs";
9
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-poidXgek.mjs";
10
- import { r as readModelListResult } from "./models-KnqBv0hE.mjs";
11
- import { L as attestCodexRestrictedToolSurfaceMcpServersDisabled, l as readCodexInheritedMcpServerNames, n as buildCodexRingZeroThreadConfigPatch, r as buildCodexRuntimeThreadConfig, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, xt as mergeCodexThreadConfigs } from "./thread-requests-BLvGkP2R.mjs";
12
- import { M as resolveCodexAppServerReasoningEffort } from "./thread-lifecycle-B3mfz1TG.mjs";
13
- import { a as resolveCodexPromptError } from "./usage-limit-error-DUMbefVY.mjs";
2
+ import { a as resolveCodexPrivateLauncher, i as readCodexAppServerConfigOptions } from "./launch-args-DbFCehO7.mjs";
3
+ import { d as readCodexEffectiveConfig } from "./config-options-CzyWLTJt.mjs";
4
+ import "./config-DKhXquav.mjs";
5
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
6
+ import { u as isCodexAppServerStartSelectionChangedError } from "./shared-client-DqyTMYug.mjs";
7
+ import { S as assertCodexTurnStartResponse, T as readCodexErrorNotification, k as createCodexElicitationResponse, x as assertCodexThreadStartResponse } from "./client-N0JpgSzF.mjs";
8
+ import { o as closeCodexStartupClientBestEffort, s as interruptCodexTurnAndWaitBestEffort, t as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS } from "./attempt-client-cleanup-DOP-cW5j.mjs";
9
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-CDsPJOa2.mjs";
10
+ import { i as readModelListResult } from "./models-DHXZtVVk.mjs";
11
+ import { R as attestCodexRestrictedToolSurfaceMcpServersDisabled, St as mergeCodexThreadConfigs, l as readCodexInheritedMcpServerNames, n as buildCodexRingZeroThreadConfigPatch, r as buildCodexRuntimeThreadConfig, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy } from "./thread-requests-B_bRnMGN.mjs";
12
+ import { S as resolveCodexAppServerReasoningEffort } from "./thread-lifecycle-DPflntEJ.mjs";
13
+ import { a as resolveCodexPromptError } from "./usage-limit-error-QXerDo3i.mjs";
14
14
  import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
15
15
  import { parse } from "smol-toml";
16
16
  import path from "node:path";
@@ -144,7 +144,7 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
144
144
  assertCurrent: params.assertCurrent,
145
145
  ...params.signal ? { abandonSignal: params.signal } : {}
146
146
  };
147
- const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-DA4VR4Eb.mjs").then((n) => n.y).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
147
+ const client = params.options.clientFactory ? await params.options.clientFactory(clientOptions) : await import("./shared-client-DqyTMYug.mjs").then((n) => n.v).then(({ createIsolatedCodexAppServerClient }) => createIsolatedCodexAppServerClient({
148
148
  ...clientOptions,
149
149
  authProfileStore: params.authProfileStore
150
150
  }));
@@ -171,7 +171,6 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
171
171
  if (remainingRunMs <= 0) abortRun(timeoutError);
172
172
  const timeout = setTimeout(() => abortRun(timeoutError), Math.max(1, remainingRunMs));
173
173
  timeout.unref?.();
174
- let retrySelection = false;
175
174
  const requestOptions = {
176
175
  timeoutMs,
177
176
  signal: abortController.signal,
@@ -272,19 +271,17 @@ async function runBoundedCodexAppServerTurnInWorkspace(params, appServer, worksp
272
271
  }
273
272
  } catch (error) {
274
273
  if (abortController.signal.aborted) throw resolveCodexBoundedTurnAbortError(abortController.signal, params.taskLabel, timeoutError);
275
- if (ownsClient && isCodexAppServerStartSelectionChangedError(error) && selectionAttempt === 0) retrySelection = true;
276
- else throw error;
274
+ if (!ownsClient || !isCodexAppServerStartSelectionChangedError(error) || selectionAttempt !== 0) throw error;
277
275
  } finally {
278
276
  clearTimeout(timeout);
279
277
  params.signal?.removeEventListener("abort", abortFromCaller);
280
278
  await interruptPromise;
281
279
  if (ownsClient) await closeCodexStartupClientBestEffort(client);
282
280
  }
283
- if (retrySelection) return await runBoundedCodexAppServerTurnInWorkspace(params, appServer, workspace, selectionAttempt + 1, {
281
+ return await runBoundedCodexAppServerTurnInWorkspace(params, appServer, workspace, selectionAttempt + 1, {
284
282
  deadline,
285
283
  timeoutMs: totalTimeoutMs
286
284
  });
287
- throw new Error("Codex bounded turn selection retry exited unexpectedly");
288
285
  }
289
286
  function resolveBoundedThreadConfig(params, workspace, inheritedMcpServerNames, enableManagedHooks) {
290
287
  const boundedConfig = mergeCodexThreadConfigs(CODEX_BOUNDED_THREAD_CONFIG, params.threadConfig) ?? CODEX_BOUNDED_THREAD_CONFIG;
@@ -0,0 +1,14 @@
1
+ import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
2
+ import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
3
+ import { i as resolveCodexAppServerHomeScope } from "./config-options-CzyWLTJt.mjs";
4
+ import "./config-DKhXquav.mjs";
5
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
6
+ //#region extensions/codex/src/app-server/bounded-turn-isolation.ts
7
+ function resolveCodexBoundedTurnIsolation(options) {
8
+ const pluginConfig = readCodexPluginConfig(options.pluginConfig);
9
+ const homeScope = resolveCodexAppServerHomeScope({ appServer: pluginConfig.appServer });
10
+ const { start } = resolveCodexAppServerRuntimeOptions({ pluginConfig: options.pluginConfig });
11
+ return start.transport === "stdio" && (homeScope === "agent" || options.requireIsolatedAuth === true) && !isCodexAppServerProxyLaunch(start.args) ? "private-stdio" : "configured-transport";
12
+ }
13
+ //#endregion
14
+ export { resolveCodexBoundedTurnIsolation as t };
@@ -1,5 +1,5 @@
1
1
  //#region extensions/codex/package.json
2
- var version = "2026.9.6";
2
+ var version = "2026.9.7";
3
3
  //#endregion
4
4
  //#region extensions/codex/src/build-state.ts
5
5
  /**
@@ -1,9 +1,5 @@
1
- import { o as CodexAppServerRpcError } from "./timeout-C910MdAB.mjs";
1
+ import { n as CodexAppServerRpcError } from "./rpc-error-BlD2vuzn.mjs";
2
2
  //#region extensions/codex/src/app-server/capabilities.ts
3
- /**
4
- * Capability helpers for optional Codex app-server control-plane methods.
5
- */
6
- /** Known app-server methods used by OpenClaw control surfaces. */
7
3
  const CODEX_CONTROL_METHODS = {
8
4
  account: "account/read",
9
5
  installedApps: "app/installed",
@@ -31,13 +27,9 @@ const CODEX_CONTROL_METHODS = {
31
27
  setThreadGoal: "thread/goal/set",
32
28
  clearThreadGoal: "thread/goal/clear"
33
29
  };
34
- /** Formats unsupported control calls differently from ordinary RPC failures. */
35
30
  function describeControlFailure(error) {
36
- if (isUnsupportedControlError(error)) return "unsupported by this Codex app-server";
31
+ if (error instanceof CodexAppServerRpcError && error.code === -32601) return "unsupported by this Codex app-server";
37
32
  return error instanceof Error ? error.message : String(error);
38
33
  }
39
- function isUnsupportedControlError(error) {
40
- return error instanceof CodexAppServerRpcError && error.code === -32601;
41
- }
42
34
  //#endregion
43
35
  export { describeControlFailure as n, CODEX_CONTROL_METHODS as t };