@openclaw/codex 2026.9.5 → 2026.9.6

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 (120) hide show
  1. package/dist/.setup/{account-usage-runtime-C2MOIvfq.mjs → account-usage-runtime-Eem_WGqY.mjs} +5 -5
  2. package/dist/.setup/{apply-CJ0ZfmBG.mjs → apply-DDOi8uNx.mjs} +22 -28
  3. package/dist/.setup/{attempt-client-cleanup-BpYKdTA0.mjs → attempt-client-cleanup-CEv1cKwF.mjs} +58 -43
  4. package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +331 -0
  5. package/dist/.setup/{auth-cache-key-QirmgiCo.mjs → auth-cache-key-B2mpaI9D.mjs} +9 -81
  6. package/dist/.setup/auth-profile-health-oHizqgye.mjs +53 -0
  7. package/dist/.setup/auth-profile-recovery-BREezV0L.mjs +14 -0
  8. package/dist/.setup/{binding-connection-Bm38niE8.mjs → binding-connection-ThoatDcb.mjs} +1 -1
  9. package/dist/.setup/{binding-connection.runtime-CnRMC0ta.mjs → binding-connection.runtime-yoHrABt-.mjs} +4 -4
  10. package/dist/.setup/{bounded-turn-BtlZcivC.mjs → bounded-turn-B2HScEgT.mjs} +138 -32
  11. package/dist/.setup/{build-state-Xx9ybZqa.mjs → build-state-C7EnDVgr.mjs} +1 -1
  12. package/dist/.setup/{capabilities-_vXcZGSx.mjs → capabilities-CDXOOFdZ.mjs} +1 -1
  13. package/dist/.setup/{client-vXs2929Q.mjs → client-Cs08OXVQ.mjs} +583 -559
  14. package/dist/.setup/client-catalog-response-BMgt_4q4.mjs +285 -0
  15. package/dist/.setup/{command-dispatch-naHIZwwF.mjs → command-dispatch-B4JuOsOk.mjs} +8 -4
  16. package/dist/.setup/{command-formatters-CGEkdawF.mjs → command-formatters-Bmqvr9tO.mjs} +8 -4
  17. package/dist/.setup/{command-handlers-BtAJEW1X.mjs → command-handlers-DW7Lx9oH.mjs} +106 -172
  18. package/dist/.setup/{command-rpc-DHFpn4le.mjs → command-rpc-DixIj3HW.mjs} +36 -21
  19. package/dist/.setup/{compact-C3i3qlzj.mjs → compact-Du5UvtxA.mjs} +14 -21
  20. package/dist/.setup/{config-CedDWjM-.mjs → config-BoTP_mrL.mjs} +3 -3
  21. package/dist/.setup/{config-options-BsanJ8QG.mjs → config-options-BvaRs51b.mjs} +46 -30
  22. package/dist/.setup/{config-runtime-CeAhl_h4.mjs → config-runtime-C8Rw1m1m.mjs} +1 -1
  23. package/dist/.setup/{config-security-BRQ2mgW9.mjs → config-security-BEReZ6go.mjs} +35 -120
  24. package/dist/.setup/{conversation-binding-DhzrpTM6.mjs → conversation-binding-DP-gMrBP.mjs} +21 -32
  25. package/dist/.setup/{conversation-control-DN53ns41.mjs → conversation-control-uK9Jomlc.mjs} +28 -67
  26. package/dist/.setup/{dynamic-tools-D16lOp67.mjs → dynamic-tools-BDXl-8Cw.mjs} +848 -578
  27. package/dist/.setup/{effective-mcp-catalog-K6kLCN8X.mjs → effective-mcp-catalog-CvnvnGIe.mjs} +3 -3
  28. package/dist/.setup/{ephemeral-turn-R1gA8Sn6.mjs → ephemeral-turn-poidXgek.mjs} +9 -6
  29. package/dist/.setup/{event-projector-assistant-message-DNUR1s0A.mjs → event-projector-assistant-message-BsruvNrH.mjs} +2 -4
  30. package/dist/.setup/{event-projector-items-DyTQ_XqL.mjs → event-projector-items-C6L_5ZiT.mjs} +42 -8
  31. package/dist/.setup/{event-projector-usage-C7Ntzs-f.mjs → event-projector-usage-CnBS8Wa3.mjs} +1 -1
  32. package/dist/.setup/{harness-rxaaoN-o.mjs → harness-a_MsE4-_.mjs} +23 -17
  33. package/dist/.setup/{inference-context-fulhZuz8.mjs → inference-context-D96l9-ew.mjs} +1 -1
  34. package/dist/.setup/inference-proxy-b-aJMSxm.mjs +601 -0
  35. package/dist/.setup/{isolated-completion-B6srt48J.mjs → isolated-completion-BIZFhTNG.mjs} +17 -10
  36. package/dist/.setup/launch-args-DbFCehO7.mjs +196 -0
  37. package/dist/.setup/{managed-binary-DP6Rib3P.mjs → managed-binary-BnshlFag.mjs} +13 -2
  38. package/dist/.setup/{model-catalog-DkvUuBey.mjs → model-catalog-CfXJf9Ay.mjs} +9 -10
  39. package/dist/.setup/{models-BDFgm_G-.mjs → models-KnqBv0hE.mjs} +3 -3
  40. package/dist/.setup/{native-auth-BLZGqFjw.mjs → native-auth-rWbGbMn3.mjs} +4 -4
  41. package/dist/.setup/{native-subagent-history-YXaL6dMd.mjs → native-subagent-history-0nYYgo0k.mjs} +26 -13
  42. package/dist/.setup/{native-subagent-monitor-B1hxzIOy.mjs → native-subagent-monitor-D3filLY2.mjs} +145 -317
  43. package/dist/.setup/{native-subagent-task-ids-DsuOonKv.mjs → native-subagent-task-ids-wb8CKZGN.mjs} +69 -39
  44. package/dist/.setup/{node-cli-sessions-Cl8b2ZF3.mjs → node-cli-sessions-r3avj02l.mjs} +86 -68
  45. package/dist/.setup/node-exec-server.runtime-BDwWXVpK.mjs +247 -0
  46. package/dist/.setup/{plan-xD7WKYTM.mjs → plan-CN3VwfNU.mjs} +74 -76
  47. package/dist/.setup/{plugin-activation-r8nq5Jzp.mjs → plugin-activation-DT3MNtqj.mjs} +7 -16
  48. package/dist/.setup/{plugin-app-cache-key-BOxKP7db.mjs → plugin-app-cache-key-B2CsSdnV.mjs} +4 -20
  49. package/dist/.setup/{plugin-approval-roundtrip-CjfzafAZ.mjs → plugin-approval-roundtrip-C0MZzCuP.mjs} +1 -1
  50. package/dist/.setup/{plugin-inventory-DUle8DLz.mjs → plugin-inventory-BoRei8Z4.mjs} +16 -7
  51. package/dist/.setup/{plugin-marketplace-discovery-P-Vndfqq.mjs → plugin-marketplace-discovery-CDOi8IFs.mjs} +4 -1
  52. package/dist/.setup/{plugin-metadata-cache-DsS5buNa.mjs → plugin-metadata-cache-Ctmo83k_.mjs} +224 -154
  53. package/dist/.setup/protocol-CANUwXJ3.mjs +17 -0
  54. package/dist/.setup/{provider-fFh_-VR3.mjs → provider-BOsxQHOM.mjs} +9 -5
  55. package/dist/.setup/{provider-capabilities-B8J4Dy-O.mjs → provider-capabilities-BfE88FZ5.mjs} +31 -3
  56. package/dist/.setup/{rate-limits-DOEGYRNs.mjs → rate-limits-CMU3DUD0.mjs} +116 -137
  57. package/dist/.setup/{request-BioXJLYa.mjs → request-D2L0zMrq.mjs} +23 -15
  58. package/dist/.setup/{run-attempt-rlA07pUv.mjs → run-attempt-BHu11r7h.mjs} +1197 -617
  59. package/dist/.setup/{runtime-artifact-Dy38Z5iU.mjs → runtime-artifact-CLZ8udh-.mjs} +29 -45
  60. package/dist/.setup/{sandbox-guard-BBP-RbTf.mjs → sandbox-guard-C2sRMOEY.mjs} +1 -1
  61. package/dist/.setup/{session-binding-_0W_fHRr.mjs → session-binding-Cm0apEbd.mjs} +3 -32
  62. package/dist/.setup/{session-binding-record-TH3xA0zj.mjs → session-binding-record-BGoz8wOK.mjs} +22 -3
  63. package/dist/.setup/{session-binding-sidecars-CKYEcfNn.mjs → session-binding-sidecars-BlB5EvIS.mjs} +48 -45
  64. package/dist/.setup/{session-catalog-fUdWDx-U.mjs → session-catalog-Pno1xGcl.mjs} +482 -182
  65. package/dist/.setup/{session-catalog-adoption-CR_whkEW.mjs → session-catalog-adoption-BI6UTDZT.mjs} +57 -25
  66. package/dist/.setup/{session-catalog-archive-CwZaPacf.mjs → session-catalog-archive-lHBqzhaO.mjs} +6 -6
  67. package/dist/.setup/{session-catalog-events-jMcYfQyd.mjs → session-catalog-events-Bj6j94E_.mjs} +122 -25
  68. package/dist/.setup/{session-catalog-index-B141u15s.mjs → session-catalog-index-B9_VQIUz.mjs} +178 -78
  69. package/dist/.setup/{session-catalog-index-order-Cc5BzlQr.mjs → session-catalog-index-order-hcdz07yN.mjs} +2 -2
  70. package/dist/.setup/{session-catalog-index-state-BAuDztHN.mjs → session-catalog-index-state-Dgh8ORJm.mjs} +5 -2
  71. package/dist/.setup/{session-catalog-native-projection-ChV3cCtm.mjs → session-catalog-native-projection-DowriLid.mjs} +30 -13
  72. package/dist/.setup/{session-catalog-node-adoption-BVRsYOSh.mjs → session-catalog-node-adoption-ITddWx_X.mjs} +24 -12
  73. package/dist/.setup/{session-catalog-node-continue-Dowv8osw.mjs → session-catalog-node-continue-6g6qi4A9.mjs} +22 -13
  74. package/dist/.setup/{session-catalog-projection-C1Bj9Jl-.mjs → session-catalog-projection-zK_PUsiE.mjs} +13 -5
  75. package/dist/.setup/{session-cli-DIj-IE-E.mjs → session-cli-irrD-uo7.mjs} +4 -4
  76. package/dist/.setup/{session-history-C--SrLI8.mjs → session-history-BrqhSCf9.mjs} +17 -22
  77. package/dist/.setup/{session-history-import-JHXT5Xfi.mjs → session-history-import-D-3wAgOP.mjs} +4 -4
  78. package/dist/.setup/{session-history.worker-CpNj7H_P.mjs → session-history.worker-CaCh0xF_.mjs} +5 -18
  79. package/dist/.setup/{session-initialization-DH1z6fXn.mjs → session-initialization-rcgbZiid.mjs} +2 -2
  80. package/dist/.setup/{session-permission-policy-DhurXY0l.mjs → session-permission-policy-BI1QK_98.mjs} +2 -2
  81. package/dist/.setup/{session-retirement-CU87AOg9.mjs → session-retirement-BH-S6qkJ.mjs} +25 -6
  82. package/dist/.setup/{settled-turn-finalizer-CiY2bLFK.mjs → settled-turn-finalizer-DiAi6Kx6.mjs} +8 -8
  83. package/dist/.setup/{shared-client-BpTtuLQ5.mjs → shared-client-DA4VR4Eb.mjs} +59 -89
  84. package/dist/.setup/{side-question-DSCZyoBD.mjs → side-question-BJ1wSDcB.mjs} +147 -211
  85. package/dist/.setup/{source-Bjp4UQij.mjs → source-CUzJq5WN.mjs} +9 -9
  86. package/dist/.setup/spawn-error-CL3n6MAa.mjs +57 -0
  87. package/dist/.setup/{thread-archive-guard-jmecf6OJ.mjs → thread-archive-guard-C9frICzX.mjs} +10 -3
  88. package/dist/.setup/{thread-history-page-BTx-4xsg.mjs → thread-history-page-DoVpnHim.mjs} +1 -1
  89. package/dist/.setup/{thread-lifecycle-Cik28qWn.mjs → thread-lifecycle-B3mfz1TG.mjs} +172 -2271
  90. package/dist/.setup/{thread-ownership-skomxnIt.mjs → thread-ownership-DcTtAcXj.mjs} +4 -2
  91. package/dist/.setup/{thread-policy-Cjs4B8xf.mjs → thread-policy-DGuQsuFC.mjs} +19 -3
  92. package/dist/.setup/thread-requests-BLvGkP2R.mjs +2205 -0
  93. package/dist/.setup/{thread-resume-BkNpj9Pz.mjs → thread-resume-DIBXwOpE.mjs} +6 -6
  94. package/dist/.setup/{timeout-DZF05XrR.mjs → timeout-C910MdAB.mjs} +19 -2
  95. package/dist/.setup/{transcript-history-projection-DHNBDhCU.mjs → transcript-history-projection-ZZpkFkJ_.mjs} +94 -64
  96. package/dist/.setup/{transcript-mirror-D4qp_leP.mjs → transcript-mirror-BtHDBp1G.mjs} +218 -198
  97. package/dist/.setup/{transport-stdio-Cmx94Oiy.mjs → transport-stdio-h2VHOskC.mjs} +135 -55
  98. package/dist/.setup/{upstream-session-fork-D3UKxgVD.mjs → upstream-session-fork-BUr4OUbC.mjs} +44 -36
  99. package/dist/.setup/{usage-BOgBEKso.mjs → usage-BML0r-ua.mjs} +5 -4
  100. package/dist/.setup/{usage-limit-error-C0ow7DOc.mjs → usage-limit-error-DUMbefVY.mjs} +4 -4
  101. package/dist/.setup/{web-search-provider.runtime-CTGuJt6i.mjs → web-search-provider.runtime-CDKlN-Rv.mjs} +4 -3
  102. package/dist/api.js +23 -12
  103. package/dist/catalog-page-worker-entrypoint.js +12 -0
  104. package/dist/catalog-page.worker.js +9 -0
  105. package/dist/cli-metadata.js +1 -1
  106. package/dist/doctor-contract-api.js +2 -2
  107. package/dist/harness.js +1 -1
  108. package/dist/index.js +221 -170
  109. package/dist/media-understanding-provider.js +2 -2
  110. package/dist/migration-provider-api.js +1 -1
  111. package/dist/provider-discovery.js +1 -1
  112. package/dist/session-history-worker-runtime.js +15 -32
  113. package/dist/session-history.worker.js +1 -1
  114. package/package.json +9 -6
  115. package/dist/.setup/attempt-context-VXVwTCfS.mjs +0 -636
  116. package/dist/.setup/inference-proxy-CC15HuSi.mjs +0 -311
  117. package/dist/.setup/launch-args-DnMak49W.mjs +0 -111
  118. package/dist/.setup/node-exec-server.runtime-BaViBKNz.mjs +0 -226
  119. package/dist/.setup/version-CoqzXPgK.mjs +0 -12
  120. package/dist/.setup/{native-execution-policy-YBMHSzC4.mjs → native-execution-policy-umd0tgh4.mjs} +1 -1
@@ -1,4 +1,4 @@
1
- import { it as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-BpTtuLQ5.mjs";
1
+ import { it as resolveCodexGatewayTimeoutWithGraceMs } from "./shared-client-DA4VR4Eb.mjs";
2
2
  import { isApprovalNotFoundError, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
3
3
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
4
4
  //#region extensions/codex/src/app-server/plugin-approval-roundtrip.ts
@@ -1,6 +1,6 @@
1
1
  import { f as resolveCodexPluginsPolicy } from "./config-parsing-CcB9iPoq.mjs";
2
- import { c as findCodexAppById } from "./plugin-app-cache-key-BOxKP7db.mjs";
3
- import "./config-CedDWjM-.mjs";
2
+ import { c as findCodexAppById } from "./plugin-app-cache-key-B2CsSdnV.mjs";
3
+ import "./config-BoTP_mrL.mjs";
4
4
  import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
5
5
  //#region extensions/codex/src/app-server/config-contracts.ts
6
6
  const CODEX_PLUGINS_MARKETPLACE_NAME = "openai-curated";
@@ -114,8 +114,16 @@ async function readCodexPluginInventory(params) {
114
114
  apps
115
115
  });
116
116
  }
117
+ const missingKeys = /* @__PURE__ */ new Set();
118
+ for (const diagnostic of diagnostics) if (diagnostic.code === "plugin_missing" || diagnostic.code === "marketplace_missing") {
119
+ if (diagnostic.plugin) missingKeys.add(diagnostic.plugin.configKey);
120
+ embeddedAgentLog.error(diagnostic.message, { code: diagnostic.code });
121
+ }
117
122
  return {
118
- policy,
123
+ policy: {
124
+ ...policy,
125
+ pluginPolicies: policy.pluginPolicies.filter((plugin) => !missingKeys.has(plugin.configKey))
126
+ },
119
127
  records,
120
128
  diagnostics,
121
129
  ...appInventory ? { appInventory } : {}
@@ -196,7 +204,7 @@ function readCachedAppInventory(params) {
196
204
  if (!params.appCache || !params.appCacheKey) return;
197
205
  const request = async (method, requestParams) => await params.request(method, requestParams);
198
206
  return params.appCache.read({
199
- key: params.appCacheKey,
207
+ key: params.appInventoryCacheKey ?? params.appCacheKey,
200
208
  request,
201
209
  nowMs: params.nowMs,
202
210
  suppressRefresh: params.suppressAppInventoryRefresh
@@ -239,6 +247,7 @@ function resolveOwnedApps(params) {
239
247
  return [];
240
248
  }
241
249
  const appInfos = params.appInventory?.snapshot?.apps ?? [];
250
+ const installedApps = params.appInventory?.snapshot?.installedApps ?? [];
242
251
  return detailApps.map((app) => {
243
252
  const info = findCodexAppById(appInfos, app.id);
244
253
  if (!info) return {
@@ -251,9 +260,9 @@ function resolveOwnedApps(params) {
251
260
  return Object.assign({
252
261
  id: info.id,
253
262
  name: app.name,
254
- accessible: info.isAccessible,
255
- enabled: info.isEnabled,
256
- needsAuth: !info.isAccessible
263
+ accessible: true,
264
+ enabled: findCodexAppById(installedApps, info.id)?.enabled ?? false,
265
+ needsAuth: false
257
266
  }, resolveOwnedAppApprovalOverrideKeys(info));
258
267
  }).toSorted((left, right) => left.id.localeCompare(right.id));
259
268
  }
@@ -9,6 +9,9 @@ function hasCodexAdminScope(ctx) {
9
9
  function canMutateCodexHost(ctx) {
10
10
  return ctx.senderIsOwner === true || hasCodexAdminScope(ctx);
11
11
  }
12
+ function assertCodexHostOwnerCurrent(ctx) {
13
+ if (!hasCodexAdminScope(ctx)) ctx.assertOwnerCurrent?.();
14
+ }
12
15
  //#endregion
13
16
  //#region extensions/codex/src/plugin-marketplace-discovery.ts
14
17
  /** Read-only discovery of Codex-owned local, curated, and remote plugin marketplaces. */
@@ -134,4 +137,4 @@ function boundedCatalogText(value) {
134
137
  return sanitized.replace(/\s+/g, " ").trim().slice(0, MAX_PLUGIN_METADATA_LENGTH);
135
138
  }
136
139
  //#endregion
137
- export { CODEX_HOST_INSPECTION_AUTH_ERROR as a, hasCodexAdminScope as c, CODEX_FULL_PERMISSIONS_AUTH_ERROR as i, filterCodexMarketplacePlugins as n, CODEX_NATIVE_EXECUTION_AUTH_ERROR as o, parseCodexPluginMarketplaceId as r, canMutateCodexHost as s, discoverCodexMarketplacePlugins as t };
140
+ export { CODEX_HOST_INSPECTION_AUTH_ERROR as a, canMutateCodexHost as c, CODEX_FULL_PERMISSIONS_AUTH_ERROR as i, hasCodexAdminScope as l, filterCodexMarketplacePlugins as n, CODEX_NATIVE_EXECUTION_AUTH_ERROR as o, parseCodexPluginMarketplaceId as r, assertCodexHostOwnerCurrent as s, discoverCodexMarketplacePlugins as t };
@@ -1,15 +1,167 @@
1
- import { h as resolveCodexAppServerHomeDir } from "./config-security-BRQ2mgW9.mjs";
2
- import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-vXs2929Q.mjs";
3
- import { o as resolveCodexComputerUseConfig } from "./config-options-BsanJ8QG.mjs";
4
- import { l as resolveMacOSDesktopCodexBundledMarketplaceCandidates, s as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, t as isManagedCodexDesktopCommand } from "./managed-binary-DP6Rib3P.mjs";
5
- import { n as describeControlFailure } from "./capabilities-_vXcZGSx.mjs";
6
- import { i as requestCodexAppServerJson } from "./request-BioXJLYa.mjs";
7
- import "./config-CedDWjM-.mjs";
8
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-CeAhl_h4.mjs";
9
- import { $ as assertNotSymlink, D as acquireCodexNativeConfigFence, Q as resolveCodexManagedBundledMarketplacePath, Y as reconcileCodexComputerUseStartArtifacts, b as waitForCodexAppServerClientDesktopGenerationDrain, c as getLeasedSharedCodexAppServerClient, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, p as readCodexAppServerClientProcessIdentity, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-BpTtuLQ5.mjs";
1
+ import { d as resolveCodexAppServerHomeDir } from "./config-security-BEReZ6go.mjs";
2
+ import { o as resolveCodexComputerUseConfig } from "./config-options-BvaRs51b.mjs";
3
+ import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, l as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, t as isManagedCodexDesktopCommand } from "./managed-binary-BnshlFag.mjs";
4
+ import { n as describeControlFailure } from "./capabilities-CDXOOFdZ.mjs";
5
+ import { r as requestCodexAppServerClientJson } from "./request-D2L0zMrq.mjs";
6
+ import "./config-BoTP_mrL.mjs";
7
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C8Rw1m1m.mjs";
8
+ import { $ as assertNotSymlink, D as acquireCodexNativeConfigFence, Q as resolveCodexManagedBundledMarketplacePath, Y as reconcileCodexComputerUseStartArtifacts, b as waitForCodexAppServerClientDesktopGenerationDrain, c as getLeasedSharedCodexAppServerClient, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, p as readCodexAppServerClientProcessIdentity, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError, x as withLeasedCodexAppServerClientStartSelectionRetry } from "./shared-client-DA4VR4Eb.mjs";
9
+ import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-Cs08OXVQ.mjs";
10
+ import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-CEv1cKwF.mjs";
10
11
  import { existsSync } from "node:fs";
11
12
  import path from "node:path";
12
13
  import fs$1 from "node:fs/promises";
14
+ import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
15
+ //#region extensions/codex/src/app-server/computer-use-readiness.ts
16
+ /** Computer Use readiness probes and their native subscription lifecycle. */
17
+ function createComputerUseRequest(params) {
18
+ const assertCurrent = params.assertCurrent;
19
+ if (params.request) {
20
+ const request = params.request;
21
+ if (!assertCurrent) return request;
22
+ return async (method, requestParams, options) => {
23
+ if (method !== "thread/unsubscribe") assertCurrent();
24
+ return await request(method, requestParams, options);
25
+ };
26
+ }
27
+ const client = params.client;
28
+ if (!client) throw new Error("Computer Use setup requires an acquired app-server client");
29
+ return async (method, requestParams, options) => await client.request(method, requestParams, {
30
+ timeoutMs: options?.timeoutMs ?? params.timeoutMs,
31
+ signal: options?.signal ?? params.signal,
32
+ ...method === "thread/unsubscribe" ? {} : { assertCurrent }
33
+ });
34
+ }
35
+ const COMPUTER_USE_LIVE_TEST_RETRY_COUNT = 1;
36
+ const COMPUTER_USE_LIVE_TEST_THREAD_NAME = "OpenClaw Computer Use readiness probe";
37
+ const COMPUTER_USE_LIST_APPS_TOOL = "list_apps";
38
+ const COMPUTER_USE_UNIFIED_JS_TOOL = "js";
39
+ const COMPUTER_USE_UNIFIED_JS_PROBE = "await cua.getState();";
40
+ async function runCodexComputerUseLiveTest(params) {
41
+ const startedAt = Date.now();
42
+ let lastError;
43
+ let repair;
44
+ const probe = resolveComputerUseLiveTestProbe(params.tools);
45
+ for (let attempt = 0; attempt <= COMPUTER_USE_LIVE_TEST_RETRY_COUNT; attempt += 1) {
46
+ let threadId;
47
+ let outcome;
48
+ try {
49
+ threadId = (await params.request("thread/start", {
50
+ input: [],
51
+ developerInstructions: COMPUTER_USE_LIVE_TEST_THREAD_NAME,
52
+ ephemeral: true
53
+ }, { timeoutMs: params.config.liveTestTimeoutMs })).thread.id;
54
+ if ((await params.request("mcpServer/tool/call", {
55
+ threadId,
56
+ server: params.config.mcpServerName,
57
+ tool: probe.tool,
58
+ arguments: probe.arguments
59
+ }, { timeoutMs: params.config.toolCallTimeoutMs })).isError === true) throw new Error(`Computer Use readiness tool ${params.config.mcpServerName}.${probe.tool} returned an error result`);
60
+ outcome = {
61
+ ok: true,
62
+ liveTest: {
63
+ status: "passed",
64
+ ok: true,
65
+ attempted: true,
66
+ attempts: attempt + 1,
67
+ timeoutMs: params.config.liveTestTimeoutMs,
68
+ retried: attempt > 0,
69
+ repaired: Boolean(repair?.attempted && repair.warnings.length === 0),
70
+ durationMs: Math.max(0, Date.now() - startedAt),
71
+ message: "Computer Use live test passed."
72
+ }
73
+ };
74
+ } catch (error) {
75
+ outcome = {
76
+ ok: false,
77
+ error
78
+ };
79
+ }
80
+ let cleanupError;
81
+ if (threadId) try {
82
+ await cleanupComputerUseProbeThread(params, threadId);
83
+ } catch (error) {
84
+ cleanupError = toErrorObject(error, "Computer Use readiness cleanup failed");
85
+ }
86
+ if (!outcome.ok && (params.signal?.aborted || isCodexAppServerStartSelectionChangedError(outcome.error))) throw toErrorObject(outcome.error, "Computer Use live test failed");
87
+ if (cleanupError) throw cleanupError;
88
+ if (outcome.ok) return {
89
+ liveTest: outcome.liveTest,
90
+ ...repair ? { repair } : {}
91
+ };
92
+ lastError = outcome.error;
93
+ if (attempt < COMPUTER_USE_LIVE_TEST_RETRY_COUNT && params.config.autoRepair) repair = await repairComputerUseMcpRuntime(params.request, params.config);
94
+ }
95
+ const errorMessage = describeControlFailure(lastError);
96
+ return {
97
+ liveTest: {
98
+ status: "failed",
99
+ ok: false,
100
+ attempted: true,
101
+ attempts: 2,
102
+ timeoutMs: params.config.liveTestTimeoutMs,
103
+ retried: true,
104
+ repaired: Boolean(repair?.attempted && repair.warnings.length === 0),
105
+ durationMs: Math.max(0, Date.now() - startedAt),
106
+ message: `Computer Use live test failed after 2 attempts: ${errorMessage}`,
107
+ error: errorMessage
108
+ },
109
+ ...repair ? { repair } : {}
110
+ };
111
+ }
112
+ function resolveComputerUseLiveTestProbe(tools) {
113
+ if (tools?.includes(COMPUTER_USE_UNIFIED_JS_TOOL) && !tools.includes(COMPUTER_USE_LIST_APPS_TOOL)) return {
114
+ tool: COMPUTER_USE_UNIFIED_JS_TOOL,
115
+ arguments: { code: COMPUTER_USE_UNIFIED_JS_PROBE }
116
+ };
117
+ return {
118
+ tool: COMPUTER_USE_LIST_APPS_TOOL,
119
+ arguments: {}
120
+ };
121
+ }
122
+ async function repairComputerUseMcpRuntime(request, config) {
123
+ try {
124
+ await request("config/mcpServer/reload", void 0, { timeoutMs: config.liveTestTimeoutMs });
125
+ return {
126
+ attempted: true,
127
+ killedPids: [],
128
+ warnings: [],
129
+ message: "Reloaded Computer Use MCP servers through Codex app-server."
130
+ };
131
+ } catch (error) {
132
+ const message = `Could not reload Computer Use MCP servers: ${describeControlFailure(error)}`;
133
+ return {
134
+ attempted: true,
135
+ killedPids: [],
136
+ warnings: [message],
137
+ message
138
+ };
139
+ }
140
+ }
141
+ async function cleanupComputerUseProbeThread(params, threadId) {
142
+ try {
143
+ await params.request("thread/unsubscribe", { threadId }, {
144
+ timeoutMs: params.config.liveTestTimeoutMs,
145
+ signal: AbortSignal.timeout(params.config.liveTestTimeoutMs)
146
+ });
147
+ } catch (error) {
148
+ if (params.client) await retireUnsafeCodexTurnClientBestEffort(params.client, "Computer Use readiness cleanup");
149
+ throw new CodexAppServerUnsafeSubscriptionError("Computer Use readiness cleanup failed", { cause: error });
150
+ }
151
+ }
152
+ function skippedLiveTestStatus(config, message) {
153
+ return {
154
+ status: "skipped",
155
+ ok: false,
156
+ attempted: false,
157
+ attempts: 0,
158
+ timeoutMs: config.liveTestTimeoutMs,
159
+ retried: false,
160
+ repaired: false,
161
+ message
162
+ };
163
+ }
164
+ //#endregion
13
165
  //#region extensions/codex/src/app-server/computer-use.ts
14
166
  /**
15
167
  * Computer Use plugin/MCP readiness checks and optional install flow for Codex
@@ -31,11 +183,6 @@ const COMPUTER_USE_MARKETPLACE_NAME_PRIORITY = [
31
183
  "openai-curated-remote",
32
184
  "local"
33
185
  ];
34
- const COMPUTER_USE_LIVE_TEST_RETRY_COUNT = 1;
35
- const COMPUTER_USE_LIVE_TEST_THREAD_NAME = "OpenClaw Computer Use readiness probe";
36
- const COMPUTER_USE_LIST_APPS_TOOL = "list_apps";
37
- const COMPUTER_USE_UNIFIED_JS_TOOL = "js";
38
- const COMPUTER_USE_UNIFIED_JS_PROBE = "await cua.getState();";
39
186
  /** Reads Computer Use readiness without installing or mutating app-server state. */
40
187
  async function readCodexComputerUseStatus(params = {}) {
41
188
  const config = resolveComputerUseConfig(params);
@@ -44,6 +191,7 @@ async function readCodexComputerUseStatus(params = {}) {
44
191
  return await inspectCodexComputerUse({
45
192
  ...params,
46
193
  computerUseConfig: config,
194
+ runLiveTest: true,
47
195
  installPlugin: false
48
196
  });
49
197
  } catch (error) {
@@ -51,8 +199,8 @@ async function readCodexComputerUseStatus(params = {}) {
51
199
  }
52
200
  }
53
201
  /**
54
- * Ensures Computer Use is ready when enabled, optionally installing when config
55
- * allows safe auto-install.
202
+ * Ensures installation and MCP exposure before a turn, optionally installing when
203
+ * config allows safe auto-install. Only strict startup waits for a live probe.
56
204
  */
57
205
  async function ensureCodexComputerUse(params = {}) {
58
206
  const config = resolveComputerUseConfig(params);
@@ -60,19 +208,19 @@ async function ensureCodexComputerUse(params = {}) {
60
208
  const status = await inspectCodexComputerUse({
61
209
  ...params,
62
210
  computerUseConfig: config,
211
+ runLiveTest: config.strictReadiness,
63
212
  installPlugin: false
64
213
  });
65
214
  if (status.ready) return status;
66
- if (isNonStrictLiveTestStartupAllowed(status, config)) return status;
67
215
  if (config.autoInstall) {
68
216
  const blockedAutoInstallStatus = blockUnsafeAutoInstallStatus(config);
69
217
  if (blockedAutoInstallStatus) throw new CodexComputerUseSetupError(blockedAutoInstallStatus);
70
218
  const installedStatus = await inspectCodexComputerUse({
71
219
  ...params,
72
220
  computerUseConfig: config,
221
+ runLiveTest: config.strictReadiness,
73
222
  installPlugin: true
74
223
  });
75
- if (isNonStrictLiveTestStartupAllowed(installedStatus, config)) return installedStatus;
76
224
  if (!installedStatus.ready) throw new CodexComputerUseSetupError(installedStatus);
77
225
  return installedStatus;
78
226
  }
@@ -93,13 +241,13 @@ async function installCodexComputerUse(params = {}) {
93
241
  const status = await inspectCodexComputerUse({
94
242
  ...params,
95
243
  computerUseConfig: config,
244
+ runLiveTest: true,
96
245
  installPlugin: true
97
246
  });
98
247
  if (!status.ready) throw new CodexComputerUseSetupError(status);
99
248
  return status;
100
249
  }
101
250
  async function inspectCodexComputerUse(params) {
102
- if (!params.installPlugin) return await inspectCodexComputerUseWithoutFence(params);
103
251
  const resolvedRuntime = resolveCodexAppServerRuntimeOptions({
104
252
  pluginConfig: params.pluginConfig,
105
253
  managedCommandOrder: "desktop-first"
@@ -107,19 +255,57 @@ async function inspectCodexComputerUse(params) {
107
255
  const operationTimeoutMs = params.timeoutMs ?? resolvedRuntime.requestTimeoutMs;
108
256
  const deadline = operationTimeoutMs > 0 ? Date.now() + operationTimeoutMs : void 0;
109
257
  const remainingTimeoutMs = () => deadline === void 0 ? operationTimeoutMs : Math.max(1, deadline - Date.now());
110
- let leasedClient;
258
+ const clientOptions = {
259
+ startOptions: resolvedRuntime.start,
260
+ pluginConfig: params.pluginConfig,
261
+ config: params.config,
262
+ agentDir: params.agentDir,
263
+ abandonSignal: params.signal,
264
+ assertCurrent: params.assertCurrent
265
+ };
266
+ const lease = {};
111
267
  try {
112
268
  let client = params.client;
113
269
  if (!client && !params.request) {
114
270
  client = await getLeasedSharedCodexAppServerClient({
115
- startOptions: resolvedRuntime.start,
116
- pluginConfig: params.pluginConfig,
117
- timeoutMs: remainingTimeoutMs(),
118
- config: params.config,
119
- agentDir: params.agentDir,
120
- abandonSignal: params.signal
271
+ ...clientOptions,
272
+ timeoutMs: remainingTimeoutMs()
273
+ });
274
+ lease.client = client;
275
+ }
276
+ if (!params.installPlugin) {
277
+ if (!lease.client) return await inspectCodexComputerUseWithoutFence(params);
278
+ return await withLeasedCodexAppServerClientStartSelectionRetry({
279
+ lease,
280
+ options: {
281
+ ...clientOptions,
282
+ timeoutMs: remainingTimeoutMs()
283
+ },
284
+ signal: params.signal,
285
+ run: async (readClient, requestOptions) => {
286
+ const { assertCurrent } = requestOptions();
287
+ return await inspectCodexComputerUseWithoutFence({
288
+ ...params,
289
+ client: readClient,
290
+ request: async (method, requestParams, options) => {
291
+ const scopedOptions = method === "thread/unsubscribe" ? {
292
+ timeoutMs: options?.timeoutMs ?? operationTimeoutMs,
293
+ signal: options?.signal,
294
+ assertCurrent
295
+ } : requestOptions();
296
+ return await requestCodexAppServerClientJson({
297
+ client: readClient,
298
+ method,
299
+ requestParams,
300
+ config: params.config,
301
+ timeoutMs: Math.min(options?.timeoutMs ?? operationTimeoutMs, scopedOptions.timeoutMs),
302
+ signal: scopedOptions.signal,
303
+ assertCurrent: scopedOptions.assertCurrent
304
+ });
305
+ }
306
+ });
307
+ }
121
308
  });
122
- leasedClient = client;
123
309
  }
124
310
  const explicitManagedInstall = client && !resolveCodexComputerUseConfig({ pluginConfig: params.pluginConfig }).autoInstall ? await resolveExplicitManagedComputerUseInstallContext({
125
311
  ...params,
@@ -170,7 +356,7 @@ async function inspectCodexComputerUse(params) {
170
356
  if (releaseFenceOnReturn) release();
171
357
  }
172
358
  } finally {
173
- if (leasedClient) releaseLeasedSharedCodexAppServerClient(leasedClient);
359
+ if (lease.client) releaseLeasedSharedCodexAppServerClient(lease.client);
174
360
  }
175
361
  }
176
362
  async function inspectCodexComputerUseWithoutFence(params) {
@@ -201,8 +387,11 @@ async function inspectCodexComputerUseWithoutFence(params) {
201
387
  if (!pluginInspection.ok) return pluginInspection.status;
202
388
  return await readComputerUseTools({
203
389
  request,
390
+ client: params.client,
391
+ signal: params.signal,
204
392
  config: params.computerUseConfig,
205
393
  plugin: pluginInspection.plugin,
394
+ runLiveTest: params.runLiveTest,
206
395
  installPlugin: params.installPlugin,
207
396
  releaseNativeConfigFence: params.releaseNativeConfigFence
208
397
  });
@@ -227,7 +416,10 @@ async function prepareExplicitManagedComputerUseInstall(params) {
227
416
  ownsIsolatedCodexHome: true,
228
417
  desktopGeneration: context.desktopGeneration,
229
418
  forceCacheRefresh: true,
230
- assertCurrent: () => assertCodexAppServerClientStartSelectionCurrent({ client: context.client })
419
+ assertCurrent: () => {
420
+ params.assertCurrent?.();
421
+ assertCodexAppServerClientStartSelectionCurrent({ client: context.client });
422
+ }
231
423
  });
232
424
  }
233
425
  async function resolveExplicitManagedComputerUseInstallContext(params) {
@@ -318,9 +510,12 @@ async function readComputerUseTools(params) {
318
510
  reason: "ready",
319
511
  message: "Computer Use is ready."
320
512
  });
513
+ if (!params.runLiveTest) return status;
321
514
  params.releaseNativeConfigFence?.();
322
515
  const { liveTest, repair } = await runCodexComputerUseLiveTest({
323
516
  request: params.request,
517
+ client: params.client,
518
+ signal: params.signal,
324
519
  config: params.config,
325
520
  tools
326
521
  });
@@ -339,99 +534,6 @@ async function readComputerUseTools(params) {
339
534
  message: liveTest.ok ? "Computer Use is ready." : compatibilityStartupAllowed ? `${liveTest.message} Startup is allowed because computerUse.strictReadiness is false.` : liveTest.message
340
535
  };
341
536
  }
342
- function isNonStrictLiveTestStartupAllowed(status, config) {
343
- return !config.strictReadiness && status.reason === "live_test_failed" && status.installed && status.pluginEnabled && status.mcpServerAvailable && status.installation.ok && status.exposure.ok;
344
- }
345
- async function runCodexComputerUseLiveTest(params) {
346
- const startedAt = Date.now();
347
- let lastError;
348
- let repair;
349
- const probe = resolveComputerUseLiveTestProbe(params.tools);
350
- for (let attempt = 0; attempt <= COMPUTER_USE_LIVE_TEST_RETRY_COUNT; attempt += 1) {
351
- let threadId;
352
- try {
353
- threadId = (await params.request("thread/start", {
354
- input: [],
355
- developerInstructions: COMPUTER_USE_LIVE_TEST_THREAD_NAME,
356
- ephemeral: true
357
- }, { timeoutMs: params.config.liveTestTimeoutMs })).thread.id;
358
- if ((await params.request("mcpServer/tool/call", {
359
- threadId,
360
- server: params.config.mcpServerName,
361
- tool: probe.tool,
362
- arguments: probe.arguments
363
- }, { timeoutMs: params.config.toolCallTimeoutMs })).isError === true) throw new Error(`Computer Use readiness tool ${params.config.mcpServerName}.${probe.tool} returned an error result`);
364
- return {
365
- liveTest: {
366
- status: "passed",
367
- ok: true,
368
- attempted: true,
369
- attempts: attempt + 1,
370
- timeoutMs: params.config.liveTestTimeoutMs,
371
- retried: attempt > 0,
372
- repaired: Boolean(repair?.attempted && repair.warnings.length === 0),
373
- durationMs: Math.max(0, Date.now() - startedAt),
374
- message: "Computer Use live test passed."
375
- },
376
- ...repair ? { repair } : {}
377
- };
378
- } catch (error) {
379
- if (isCodexAppServerStartSelectionChangedError(error)) throw error;
380
- lastError = error;
381
- } finally {
382
- if (threadId) await cleanupComputerUseProbeThread(params.request, threadId, params.config);
383
- }
384
- if (attempt < COMPUTER_USE_LIVE_TEST_RETRY_COUNT && params.config.autoRepair) repair = await repairComputerUseMcpRuntime(params.request, params.config);
385
- }
386
- const errorMessage = describeControlFailure(lastError);
387
- return {
388
- liveTest: {
389
- status: "failed",
390
- ok: false,
391
- attempted: true,
392
- attempts: 2,
393
- timeoutMs: params.config.liveTestTimeoutMs,
394
- retried: true,
395
- repaired: Boolean(repair?.attempted && repair.warnings.length === 0),
396
- durationMs: Math.max(0, Date.now() - startedAt),
397
- message: `Computer Use live test failed after 2 attempts: ${errorMessage}`,
398
- error: errorMessage
399
- },
400
- ...repair ? { repair } : {}
401
- };
402
- }
403
- function resolveComputerUseLiveTestProbe(tools) {
404
- if (tools?.includes(COMPUTER_USE_UNIFIED_JS_TOOL) && !tools.includes(COMPUTER_USE_LIST_APPS_TOOL)) return {
405
- tool: COMPUTER_USE_UNIFIED_JS_TOOL,
406
- arguments: { code: COMPUTER_USE_UNIFIED_JS_PROBE }
407
- };
408
- return {
409
- tool: COMPUTER_USE_LIST_APPS_TOOL,
410
- arguments: {}
411
- };
412
- }
413
- async function repairComputerUseMcpRuntime(request, config) {
414
- try {
415
- await request("config/mcpServer/reload", void 0, { timeoutMs: config.liveTestTimeoutMs });
416
- return {
417
- attempted: true,
418
- killedPids: [],
419
- warnings: [],
420
- message: "Reloaded Computer Use MCP servers through Codex app-server."
421
- };
422
- } catch (error) {
423
- const message = `Could not reload Computer Use MCP servers: ${describeControlFailure(error)}`;
424
- return {
425
- attempted: true,
426
- killedPids: [],
427
- warnings: [message],
428
- message
429
- };
430
- }
431
- }
432
- async function cleanupComputerUseProbeThread(request, threadId, config) {
433
- await Promise.allSettled([request("thread/unsubscribe", { threadId }, { timeoutMs: config.liveTestTimeoutMs }), request("thread/archive", { threadId }, { timeoutMs: config.liveTestTimeoutMs })]);
434
- }
435
537
  async function resolveMarketplaceRef(params) {
436
538
  let preferredMarketplaceName = params.config.marketplaceName;
437
539
  if (params.config.marketplaceSource && params.allowAdd) {
@@ -694,44 +796,12 @@ function exposureStatusFromTools(config, tools) {
694
796
  message: `Computer Use MCP server ${config.mcpServerName} exposes ${tools.length} tools.`
695
797
  };
696
798
  }
697
- function skippedLiveTestStatus(config, message) {
698
- return {
699
- status: "skipped",
700
- ok: false,
701
- attempted: false,
702
- attempts: 0,
703
- timeoutMs: config.liveTestTimeoutMs,
704
- retried: false,
705
- repaired: false,
706
- message
707
- };
708
- }
709
799
  function pluginWarnings(plugin) {
710
800
  const warnings = [];
711
801
  const source = plugin.summary.source;
712
802
  if (source && typeof source === "object" && "type" in source && source.type === "remote") warnings.push("Computer Use plugin is resolved from a remote marketplace; live local bundles are preferred.");
713
803
  return warnings;
714
804
  }
715
- function createComputerUseRequest(params) {
716
- if (params.request) return params.request;
717
- if (params.client) return async (method, requestParams, options) => await params.client.request(method, requestParams, {
718
- timeoutMs: options?.timeoutMs ?? params.timeoutMs,
719
- signal: params.signal
720
- });
721
- const runtime = resolveCodexAppServerRuntimeOptions({
722
- pluginConfig: params.pluginConfig,
723
- managedCommandOrder: "desktop-first"
724
- });
725
- return async (method, requestParams, options) => await requestCodexAppServerJson({
726
- method,
727
- requestParams,
728
- timeoutMs: options?.timeoutMs ?? params.timeoutMs ?? runtime.requestTimeoutMs,
729
- pluginConfig: params.pluginConfig,
730
- startOptions: runtime.start,
731
- config: params.config,
732
- agentDir: params.agentDir
733
- });
734
- }
735
805
  function resolveComputerUseConfig(params) {
736
806
  const overrides = params.forceEnable ? {
737
807
  ...params.overrides,
@@ -0,0 +1,17 @@
1
+ import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ //#region extensions/codex/src/app-server/protocol.ts
3
+ /** Namespace Codex keeps directly model-visible without exposing it to Code Mode guests. */
4
+ const CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE = "openclaw_direct";
5
+ function flattenCodexDynamicToolFunctions(tools) {
6
+ return (tools ?? []).flatMap((tool) => tool.type === "namespace" ? tool.tools : [tool]);
7
+ }
8
+ /** Asserts the experimental beforeTurnId request field before it crosses the app-server boundary. */
9
+ function assertCodexThreadForkParams(value) {
10
+ if (!isRecord(value) || typeof value.threadId !== "string" || !value.threadId.trim() || value.beforeTurnId !== void 0 && value.beforeTurnId !== null && typeof value.beforeTurnId !== "string") throw new Error("Invalid Codex app-server thread/fork params");
11
+ return value;
12
+ }
13
+ function isJsonObject(value) {
14
+ return isRecord(value);
15
+ }
16
+ //#endregion
17
+ export { isJsonObject as i, assertCodexThreadForkParams as n, flattenCodexDynamicToolFunctions as r, CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE as t };
@@ -9,10 +9,14 @@ function buildCodexMigrationProvider(params = {}) {
9
9
  return {
10
10
  id: "codex",
11
11
  label: "Codex",
12
- description: "Import Codex memory and skills while keeping Codex native plugins and hooks explicit.",
12
+ description: [
13
+ "Import consolidated memories, selected Codex and personal AgentSkills, and selected eligible openai-curated plugins.",
14
+ "Auth credentials require separate consent. Sessions and chat history are not imported.",
15
+ "Codex config and hooks are saved for manual review, not activated. Source files are not moved or deleted."
16
+ ].join(" "),
13
17
  supportedItemKinds: ["memory", "auth"],
14
18
  async detect(ctx) {
15
- const { discoverCodexSource, hasCodexSource } = await import("./source-Bjp4UQij.mjs").then((n) => n.a);
19
+ const { discoverCodexSource, hasCodexSource } = await import("./source-CUzJq5WN.mjs").then((n) => n.a);
16
20
  const source = await discoverCodexSource({
17
21
  input: ctx.source,
18
22
  memoryOnly: isMemoryOnlyMigration(ctx),
@@ -28,16 +32,16 @@ function buildCodexMigrationProvider(params = {}) {
28
32
  };
29
33
  },
30
34
  async plan(ctx) {
31
- const { buildCodexMigrationPlan } = await import("./plan-xD7WKYTM.mjs");
35
+ const { buildCodexMigrationPlan } = await import("./plan-CN3VwfNU.mjs");
32
36
  return buildCodexMigrationPlan(ctx);
33
37
  },
34
38
  deferredApply: { retrySafe: true },
35
39
  prepareApply(ctx) {
36
40
  if (isMemoryOnlyMigration(ctx) || isAuthOnlyMigration(ctx)) return;
37
- return import("./apply-CJ0ZfmBG.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
41
+ return import("./apply-DDOi8uNx.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
38
42
  },
39
43
  async apply(ctx, plan) {
40
- const { applyCodexMigrationPlan } = await import("./apply-CJ0ZfmBG.mjs");
44
+ const { applyCodexMigrationPlan } = await import("./apply-DDOi8uNx.mjs");
41
45
  return await applyCodexMigrationPlan({
42
46
  ctx,
43
47
  plan,