@openclaw/codex 2026.9.34 → 2026.9.36

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 (99) hide show
  1. package/dist/.setup/{account-usage-runtime-CD8HYWaz.mjs → account-usage-runtime-BOmEegZv.mjs} +3 -3
  2. package/dist/.setup/{apply-DN-qPbcH.mjs → apply-DhLjXde1.mjs} +8 -8
  3. package/dist/.setup/{attempt-client-cleanup-93r-CLTi.mjs → attempt-client-cleanup-C9dwStbK.mjs} +5 -5
  4. package/dist/.setup/{attempt-workspace-context-ejEuxrY1.mjs → attempt-workspace-context-DJrvhJDC.mjs} +1 -1
  5. package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-Bnaj0_iV.mjs} +1 -1
  6. package/dist/.setup/{auth-cache-key-Bs_3kRJD.mjs → auth-cache-key-DWIq3Lzf.mjs} +3 -3
  7. package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-DRPlnIgg.mjs} +2 -2
  8. package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-DC3oUqo-.mjs} +1 -1
  9. package/dist/.setup/{bounded-turn-I8Vb-qq3.mjs → bounded-turn-Csc9Qvpm.mjs} +11 -11
  10. package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-Ce-oOk-D.mjs} +2 -2
  11. package/dist/.setup/{build-state--SrHyc6r.mjs → build-state-CmeL24P5.mjs} +1 -1
  12. package/dist/.setup/{client-CyquSiJ2.mjs → client-BdNoDUaQ.mjs} +268 -7
  13. package/dist/.setup/{command-dispatch-BPLz7tlx.mjs → command-dispatch-9sYDmuIo.mjs} +1 -1
  14. package/dist/.setup/{command-handlers-95-WVrcl.mjs → command-handlers-C-uyeN_H.mjs} +22 -22
  15. package/dist/.setup/{command-rpc-BDfCWgc_.mjs → command-rpc-BHE3OG7z.mjs} +11 -11
  16. package/dist/.setup/{compact-5zzFlH-W.mjs → compact-DsrYq-_j.mjs} +12 -12
  17. package/dist/.setup/{config-DKhXquav.mjs → config-DqmrqI23.mjs} +2 -2
  18. package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-DDhvIeUC.mjs} +1 -1
  19. package/dist/.setup/{conversation-binding-C-0jWdSo.mjs → conversation-binding-CfIcWNVS.mjs} +15 -15
  20. package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DlsG-dQu.mjs} +1 -1
  21. package/dist/.setup/{conversation-control-BEotI-gH.mjs → conversation-control-BWzVNh-v.mjs} +5 -5
  22. package/dist/.setup/{dynamic-tools-D3NAwGw3.mjs → dynamic-tools-CAWsGyFZ.mjs} +7 -7
  23. package/dist/.setup/{effective-mcp-catalog-C0DfQNYU.mjs → effective-mcp-catalog-BYzIV1DD.mjs} +4 -4
  24. package/dist/.setup/{ephemeral-turn-ksZ9NfsS.mjs → ephemeral-turn-CIcaAzR4.mjs} +2 -2
  25. package/dist/.setup/{event-projector-assistant-message-BmWQXFLV.mjs → event-projector-assistant-message-CDe3ohIy.mjs} +1 -1
  26. package/dist/.setup/{isolated-completion-Ci27cKqA.mjs → isolated-completion-DLV0kBu2.mjs} +6 -6
  27. package/dist/.setup/{managed-binary-B6hQ1UKR.mjs → managed-binary-Ckgvm_4V.mjs} +1 -1
  28. package/dist/.setup/{model-catalog-qzAfnHzR.mjs → model-catalog-CbhJ0pMa.mjs} +7 -7
  29. package/dist/.setup/{models-BbEE4EWS.mjs → models-DXVC1KpU.mjs} +3 -3
  30. package/dist/.setup/{native-auth-BN-BD2AV.mjs → native-auth-BNGz77PF.mjs} +3 -3
  31. package/dist/.setup/{native-subagent-monitor-B9aAqfnU.mjs → native-subagent-monitor-GOGINNw0.mjs} +116 -27
  32. package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-XHNn4k5q.mjs} +51 -14
  33. package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-Dna952zv.mjs} +2 -2
  34. package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-BwhIYgCZ.mjs} +2 -2
  35. package/dist/.setup/{node-exec-server.runtime-BS7jsvK-.mjs → node-exec-server.runtime-9IZtsOmo.mjs} +2 -2
  36. package/dist/.setup/{plan-DTyFfTkk.mjs → plan-BB5rf7qh.mjs} +5 -5
  37. package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BaDnJKJd.mjs} +2 -2
  38. package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-B4uqIw4J.mjs} +1 -1
  39. package/dist/.setup/{plugin-metadata-cache-Q4ZFn6UH.mjs → plugin-metadata-cache-DuaAXtXC.mjs} +7 -7
  40. package/dist/.setup/{provider-Cnr_icbk.mjs → provider-BEDFjTWv.mjs} +4 -4
  41. package/dist/.setup/{provider-capabilities-ByhBukaD.mjs → provider-capabilities-DcF-V_3D.mjs} +2 -2
  42. package/dist/.setup/{request-DxKAfWyy.mjs → request-DZKa6YSy.mjs} +5 -5
  43. package/dist/.setup/{run-attempt-BZKhzSrb.mjs → run-attempt-EMGdmQqt.mjs} +75 -40
  44. package/dist/.setup/{runtime-artifact-D7lCXdhV.mjs → runtime-artifact-Riq878B2.mjs} +3 -3
  45. package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-Bjv8P6Sx.mjs} +2 -2
  46. package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-OIYEmTRF.mjs} +1 -1
  47. package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Fn7Ekzuv.mjs} +19 -4
  48. package/dist/.setup/{session-binding-record-Oe9L-CNY.mjs → session-binding-record-CUKpUKVm.mjs} +1 -1
  49. package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BuEALwJY.mjs} +1 -1
  50. package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-58bqOngU.mjs} +5 -5
  51. package/dist/.setup/{session-catalog-BaVqm4-Q.mjs → session-catalog-apN5C2Oz.mjs} +22 -22
  52. package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-BM9gCB82.mjs} +5 -5
  53. package/dist/.setup/{session-catalog-events-D9zC7gRb.mjs → session-catalog-events-DHPtqvWu.mjs} +3 -3
  54. package/dist/.setup/{session-catalog-index-CNKpHanP.mjs → session-catalog-index-JJogsGuf.mjs} +8 -8
  55. package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-DQhmgM3b.mjs} +1 -1
  56. package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-index-state-DhLoAnfy.mjs} +3 -3
  57. package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-bz5ZvjtY.mjs} +1 -1
  58. package/dist/.setup/{session-catalog-list-request-CvtxrYSe.mjs → session-catalog-list-request-A1wN4sKw.mjs} +2 -2
  59. package/dist/.setup/{session-catalog-native-projection-DhId_sl8.mjs → session-catalog-native-projection-C_xvyztm.mjs} +4 -4
  60. package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-BdS7zDuY.mjs} +2 -2
  61. package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-XFJG3JGh.mjs} +5 -5
  62. package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-D9AP5D5o.mjs} +2 -2
  63. package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-CnEH565l.mjs} +1 -1
  64. package/dist/.setup/{session-catalog-projection-DcqN7DuI.mjs → session-catalog-projection-C6PSmTcX.mjs} +4 -4
  65. package/dist/.setup/{session-cli-TEVHpWaE.mjs → session-cli-B5RvT_Rs.mjs} +3 -3
  66. package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-tquj9DCz.mjs} +4 -4
  67. package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-DefAI1_5.mjs} +2 -2
  68. package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-7lM447LW.mjs} +1 -1
  69. package/dist/.setup/{session-retirement-CW0ciVbW.mjs → session-retirement-Bdygfnxa.mjs} +6 -6
  70. package/dist/.setup/{settled-turn-finalizer-DlPT87wW.mjs → settled-turn-finalizer-BzVjkwgJ.mjs} +7 -7
  71. package/dist/.setup/{shared-client-tOOyadmg.mjs → shared-client-B__jQti1.mjs} +44 -31
  72. package/dist/.setup/{shared-client-lifecycle-CJ0lYVCW.mjs → shared-client-lifecycle-wN_lOZkB.mjs} +24 -2
  73. package/dist/.setup/{side-question-BbnuMFTT.mjs → side-question-B25zswMS.mjs} +15 -15
  74. package/dist/.setup/{source-Cr8STZpF.mjs → source-DuNxTQoz.mjs} +4 -4
  75. package/dist/.setup/{thread-lifecycle-DcNw9n7E.mjs → thread-lifecycle-Cw5Nsciw.mjs} +13 -13
  76. package/dist/.setup/{thread-ownership-DDban_4i.mjs → thread-ownership-Cxb01Uwq.mjs} +4 -4
  77. package/dist/.setup/{thread-policy-TTAb-1yF.mjs → thread-policy-BHr4QsDO.mjs} +3 -3
  78. package/dist/.setup/{thread-requests-DmkmrGIt.mjs → thread-requests-D-GTNAnZ.mjs} +8 -8
  79. package/dist/.setup/{thread-resume-eo3IhOhh.mjs → thread-resume-BNdEFZpM.mjs} +5 -5
  80. package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BRNhyb1o.mjs} +1 -1
  81. package/dist/.setup/{transport-stdio-CbutOIEh.mjs → transport-stdio-DU8dIOCj.mjs} +1 -1
  82. package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zu3jRPnu.mjs} +1 -1
  83. package/dist/.setup/{upstream-session-fork-BbUNlJPZ.mjs → upstream-session-fork-D8rqW9ad.mjs} +14 -14
  84. package/dist/.setup/{usage-CDiI_zkr.mjs → usage-D_W8Be4u.mjs} +3 -3
  85. package/dist/.setup/{usage-limit-error-BLnJh1mB.mjs → usage-limit-error-CpasNGjp.mjs} +1 -1
  86. package/dist/.setup/{web-search-provider.runtime-B_E2kpZN.mjs → web-search-provider.runtime-CyRLuVOO.mjs} +2 -2
  87. package/dist/.source-module-urls/0560e3825cf513bbe9e095a85951c1215dfced0c1e581c5f32b007a3e759636e.json +1 -0
  88. package/dist/.source-module-urls/89af8e902f34481d87fbb497cd5ac223d504b1fa22d95d3038b6d33a3b97c3da.json +1 -0
  89. package/dist/api.js +3 -3
  90. package/dist/catalog-page.worker.js +338 -1
  91. package/dist/cli-metadata.js +1 -1
  92. package/dist/doctor-contract-api.js +5 -5
  93. package/dist/harness.js +19 -19
  94. package/dist/index.js +52 -42
  95. package/dist/media-understanding-provider.js +2 -2
  96. package/dist/migration-provider-api.js +1 -1
  97. package/dist/provider-discovery.js +1 -1
  98. package/package.json +5 -5
  99. package/dist/.setup/client-catalog-response-B9pLl58Y.mjs +0 -285
@@ -166,7 +166,7 @@ const assignmentSchema = z.object({
166
166
  const inventorySchema = z.object({
167
167
  version: z.literal(1),
168
168
  assignments: z.array(assignmentSchema)
169
- }).strict().refine(({ assignments }) => new Set(assignments.map((entry) => entry.runId)).size === assignments.length);
169
+ }).strict();
170
170
  /** Native parent rotation is not physical requester or connection adoption. */
171
171
  function matchesNativeAssignmentLifecycle(saved, current) {
172
172
  return saved.sessionId === current.sessionId && saved.lifecycleRevision === current.lifecycleRevision && saved.connectionFingerprint === current.connectionFingerprint;
@@ -174,29 +174,66 @@ function matchesNativeAssignmentLifecycle(saved, current) {
174
174
  function readNativePendingAssignments(value) {
175
175
  if (value === void 0) return;
176
176
  const parsed = inventorySchema.safeParse(value);
177
- if (!parsed.success) throw new Error("Invalid Codex native pending assignment metadata.");
177
+ if (!parsed.success || new Set(parsed.data.assignments.map((entry) => entry.runId)).size !== parsed.data.assignments.length) throw new Error("Invalid Codex native pending assignment metadata.");
178
178
  return parsed.data;
179
179
  }
180
+ function mergeNativeAssignmentMetadata(current, incoming) {
181
+ const genericRunId = codexNativeSubagentRunId(current.childThreadId);
182
+ if (current.runId !== incoming.runId && current.runId !== genericRunId && incoming.runId !== genericRunId || current.submission && incoming.submission && !isDeepStrictEqual(current.submission, incoming.submission) || current.recordedCompletion && incoming.recordedCompletion && !isDeepStrictEqual(current.recordedCompletion, incoming.recordedCompletion)) throw new Error("Conflicting Codex native pending assignment metadata.");
183
+ if (current.runId === genericRunId) current.runId = incoming.runId;
184
+ if (incoming.submission) current.submission = incoming.submission;
185
+ if (incoming.recordedCompletion) current.recordedCompletion = incoming.recordedCompletion;
186
+ }
187
+ /** Doctor and binding writes merge compatible facts for one obligation, never distinct turns. */
188
+ function normalizeNativePendingAssignments(value) {
189
+ if (value === void 0) return;
190
+ return {
191
+ version: 1,
192
+ assignments: mergeNativePendingAssignments(inventorySchema.parse(value).assignments)
193
+ };
194
+ }
195
+ function mergeNativePendingAssignments(entries) {
196
+ const assignments = [];
197
+ for (const entry of entries) {
198
+ const existing = assignments.find((saved) => saved.childThreadId === entry.childThreadId && saved.nativeTurnId === entry.nativeTurnId && (entry.nativeTurnId !== void 0 || saved.runId === entry.runId));
199
+ if (!existing) {
200
+ assignments.push(entry);
201
+ continue;
202
+ }
203
+ if (existing.nativeParentThreadId !== entry.nativeParentThreadId || !isDeepStrictEqual(existing.owner, entry.owner)) throw new Error("Conflicting Codex native pending assignment metadata.");
204
+ mergeNativeAssignmentMetadata(existing, entry);
205
+ }
206
+ if (new Set(assignments.map((entry) => entry.runId)).size !== assignments.length) throw new Error("Conflicting Codex native pending assignment metadata.");
207
+ return assignments;
208
+ }
180
209
  function mutateNativePendingAssignments(params) {
181
- const current = readNativePendingAssignments(params.current);
182
- const assignment = assignmentSchema.parse(params.assignment);
210
+ const current = normalizeNativePendingAssignments(params.current);
211
+ let assignment = assignmentSchema.parse(params.assignment);
183
212
  const owner = codexNativeSubagentHistoryOwnerSchema.parse(params.owner);
184
213
  if (!matchesNativeAssignmentLifecycle(assignment.owner, owner)) return { applied: false };
185
214
  const assignments = current?.assignments ?? [];
186
- const existing = assignments.find((entry) => entry.runId === assignment.runId);
187
- if (existing && (!isDeepStrictEqual(existing.owner, assignment.owner) || existing.nativeParentThreadId !== assignment.nativeParentThreadId || existing.childThreadId !== assignment.childThreadId)) return { applied: false };
188
- if (params.consume && (!existing || existing.nativeTurnId !== assignment.nativeTurnId)) return { applied: false };
215
+ const existing = assignments.find((entry) => entry.runId === assignment.runId) ?? assignments.find((entry) => assignment.nativeTurnId !== void 0 && entry.childThreadId === assignment.childThreadId && entry.nativeTurnId === assignment.nativeTurnId);
216
+ if (params.consume && !existing) return {
217
+ applied: false,
218
+ absent: true
219
+ };
220
+ if (existing && (!isDeepStrictEqual(existing.owner, assignment.owner) || existing.nativeParentThreadId !== assignment.nativeParentThreadId || existing.childThreadId !== assignment.childThreadId) || params.consume && existing?.nativeTurnId !== assignment.nativeTurnId) return { applied: false };
189
221
  const remaining = assignments.filter((entry) => entry !== existing);
190
- if (!params.consume) remaining.push(existing?.recordedCompletion && !assignment.recordedCompletion ? {
191
- ...assignment,
192
- recordedCompletion: existing.recordedCompletion
193
- } : assignment);
222
+ if (!params.consume) {
223
+ if (existing && existing.nativeTurnId === assignment.nativeTurnId) {
224
+ mergeNativeAssignmentMetadata(existing, assignment);
225
+ assignment = existing;
226
+ } else if (existing?.recordedCompletion && !assignment.recordedCompletion) assignment.recordedCompletion = existing.recordedCompletion;
227
+ remaining.push(assignment);
228
+ }
229
+ const next = !params.consume && existing && existing.nativeTurnId !== assignment.nativeTurnId ? mergeNativePendingAssignments(remaining) : remaining;
194
230
  return {
195
231
  applied: true,
196
- next: remaining.length ? {
232
+ next: next.length ? {
197
233
  version: 1,
198
- assignments: remaining
199
- } : void 0
234
+ assignments: next
235
+ } : void 0,
236
+ consumed: params.consume ? existing : void 0
200
237
  };
201
238
  }
202
239
  //#endregion
@@ -1,5 +1,5 @@
1
- import { _ as readCodexNativeSubagentHistoryOwner, h as codexNativeSubagentHistoryConnectionFingerprint, r as readNativePendingAssignments, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-DwkCzLvD.mjs";
2
- import { _ as readStoredCodexAppServerBinding, r as bindingStoreKey } from "./session-binding-record-Oe9L-CNY.mjs";
1
+ import { _ as readCodexNativeSubagentHistoryOwner, h as codexNativeSubagentHistoryConnectionFingerprint, r as readNativePendingAssignments, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-XHNn4k5q.mjs";
2
+ import { _ as readStoredCodexAppServerBinding, r as bindingStoreKey } from "./session-binding-record-CUKpUKVm.mjs";
3
3
  import { n as CODEX_APP_SERVER_BINDING_NAMESPACE, t as CODEX_APP_SERVER_BINDING_MAX_ENTRIES } from "./session-binding-meta-B7aEMU7g.mjs";
4
4
  import { isDeepStrictEqual } from "node:util";
5
5
  import { z } from "zod";
@@ -1,4 +1,4 @@
1
- import { A as unwrapNodeInvokePayload, x as readBoundedOptionalString } from "./session-catalog-parsing-CPGaPYr-.mjs";
1
+ import { A as unwrapNodeInvokePayload, x as readBoundedOptionalString } from "./session-catalog-parsing-CnEH565l.mjs";
2
2
  import { r as resolveCodexAppServerUserHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
3
3
  import { o as formatCodexDisplayText } from "./command-formatters-R3ckE3Co.mjs";
4
4
  import { t as codexCatalogHomeId } from "./session-catalog-home-id-vlih0B_g.mjs";
@@ -187,7 +187,7 @@ async function resumeCodexCliSessionOnNode(params) {
187
187
  let catalogAgentId;
188
188
  let catalogHomeId;
189
189
  if (params.sessionKey) {
190
- const { adoptionSessionKeyRest, CODEX_NODE_SESSION_KEY_PREFIX, readNodeSessionMarker } = await import("./session-catalog-node-adoption-DgXvSGu0.mjs");
190
+ const { adoptionSessionKeyRest, CODEX_NODE_SESSION_KEY_PREFIX, readNodeSessionMarker } = await import("./session-catalog-node-adoption-BdS7zDuY.mjs");
191
191
  const entry = params.runtime.agent.session.getSessionEntry({
192
192
  sessionKey: params.sessionKey,
193
193
  readConsistency: "latest"
@@ -1,5 +1,5 @@
1
- import { i as resolveManagedCodexNativeCommand, r as resolveManagedCodexAppServerStartOptions, t as isManagedCodexDesktopCommand } from "./managed-binary-B6hQ1UKR.mjs";
2
- import { a as closeCodexAppServerTransportAndWait, t as createStdioTransport } from "./transport-stdio-CbutOIEh.mjs";
1
+ import { i as resolveManagedCodexNativeCommand, r as resolveManagedCodexAppServerStartOptions, t as isManagedCodexDesktopCommand } from "./managed-binary-Ckgvm_4V.mjs";
2
+ import { a as closeCodexAppServerTransportAndWait, t as createStdioTransport } from "./transport-stdio-DU8dIOCj.mjs";
3
3
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { stripVTControlCharacters } from "node:util";
5
5
  import { killProcessTree } from "openclaw/plugin-sdk/process-runtime";
@@ -1,7 +1,7 @@
1
- import { u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-Cky2XJUw.mjs";
1
+ import { u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-B4uqIw4J.mjs";
2
2
  import { t as isOnlyMigrationKind } from "./scope-DOC1Xjc8.mjs";
3
- import "./config-DKhXquav.mjs";
4
- import { i as hasCodexSource, n as defaultCodexHome, o as readJsonObject, r as discoverCodexSource, s as sanitizeName, t as codexPluginMigrationSubscriptionWarning } from "./source-Cr8STZpF.mjs";
3
+ import "./config-DqmrqI23.mjs";
4
+ import { i as hasCodexSource, n as defaultCodexHome, o as readJsonObject, r as discoverCodexSource, s as sanitizeName, t as codexPluginMigrationSubscriptionWarning } from "./source-DuNxTQoz.mjs";
5
5
  import { asBoolean, asOptionalRecord, isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { createHash } from "node:crypto";
7
7
  import { runCommandBuffered } from "openclaw/plugin-sdk/process-runtime";
@@ -97,8 +97,8 @@ async function readCodexCliCredentialsAsync(options) {
97
97
  options.signal?.throwIfAborted();
98
98
  if (!options.allowKeychainPrompt) return;
99
99
  const home = await fs.realpath(options.codexHome).catch(() => path.resolve(options.codexHome));
100
- const { CodexAppServerClient } = await import("./client-CyquSiJ2.mjs").then((n) => n.n);
101
- const { resolveManagedCodexPackageEntrypoint, resolveManagedCodexNativeCommand } = await import("./managed-binary-B6hQ1UKR.mjs").then((n) => n.n);
100
+ const { CodexAppServerClient } = await import("./client-BdNoDUaQ.mjs").then((n) => n.n);
101
+ const { resolveManagedCodexPackageEntrypoint, resolveManagedCodexNativeCommand } = await import("./managed-binary-Ckgvm_4V.mjs").then((n) => n.n);
102
102
  const launcher = resolveManagedCodexPackageEntrypoint(path.dirname(fileURLToPath(import.meta.url)));
103
103
  const command = launcher ? resolveManagedCodexNativeCommand(launcher) : void 0;
104
104
  if (!command) return;
@@ -1,6 +1,6 @@
1
- import { i as listCodexPluginMetadata, n as isOpenAiCuratedMarketplace, o as pluginReadParams, r as isOpenAiCuratedMarketplaceName, t as findCodexMarketplacePluginSummary, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-Cky2XJUw.mjs";
1
+ import { i as listCodexPluginMetadata, n as isOpenAiCuratedMarketplace, o as pluginReadParams, r as isOpenAiCuratedMarketplaceName, t as findCodexMarketplacePluginSummary, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-B4uqIw4J.mjs";
2
2
  import { n as CodexAppServerRpcError } from "./rpc-error-BlD2vuzn.mjs";
3
- import "./config-DKhXquav.mjs";
3
+ import "./config-DqmrqI23.mjs";
4
4
  import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
5
  //#region extensions/codex/src/app-server/plugin-activation.ts
6
6
  /** Activates legacy curated plugins without granting install authority to other marketplaces. */
@@ -1,6 +1,6 @@
1
1
  import { f as resolveCodexPluginsPolicy } from "./config-parsing-b088LyhT.mjs";
2
2
  import { c as findCodexAppById } from "./plugin-app-cache-key-BL9B5H0L.mjs";
3
- import "./config-DKhXquav.mjs";
3
+ import "./config-DqmrqI23.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";
@@ -1,13 +1,13 @@
1
+ import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-BdNoDUaQ.mjs";
1
2
  import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
2
3
  import { o as resolveCodexComputerUseConfig } from "./config-options-CzyWLTJt.mjs";
3
- import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-B6hQ1UKR.mjs";
4
+ import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-Ckgvm_4V.mjs";
4
5
  import { n as describeControlFailure } from "./capabilities-B3WEZl4e.mjs";
5
- import { r as requestCodexAppServerClientJson } from "./request-DxKAfWyy.mjs";
6
- import "./config-DKhXquav.mjs";
7
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
8
- import { O as acquireCodexNativeConfigFence, at as resolveClientManagedBundledMarketplacePath, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, ct as resolveManagedCodexComputerUseConfig, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, it as resolveBundledComputerUseMarketplacePath, lt as ensureCodexComputerUseSharedPluginCache, ot as hasLegacyCodexComputerUseMcpPolicy, p as readCodexAppServerClientProcessIdentity, st as isLegacyCodexComputerUsePluginDisabled, t as assertCodexAppServerClientStartSelectionCurrent, tt as reconcileCodexComputerUseStartArtifacts, u as isCodexAppServerStartSelectionChangedError, ut as assertNotSymlink, y as waitForCodexAppServerClientDesktopGenerationDrain } from "./shared-client-tOOyadmg.mjs";
9
- import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-CyquSiJ2.mjs";
10
- import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-93r-CLTi.mjs";
6
+ import { r as requestCodexAppServerClientJson } from "./request-DZKa6YSy.mjs";
7
+ import "./config-DqmrqI23.mjs";
8
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
9
+ import { O as acquireCodexNativeConfigFence, at as resolveClientManagedBundledMarketplacePath, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, ct as resolveManagedCodexComputerUseConfig, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, it as resolveBundledComputerUseMarketplacePath, lt as ensureCodexComputerUseSharedPluginCache, ot as hasLegacyCodexComputerUseMcpPolicy, p as readCodexAppServerClientProcessIdentity, st as isLegacyCodexComputerUsePluginDisabled, t as assertCodexAppServerClientStartSelectionCurrent, tt as reconcileCodexComputerUseStartArtifacts, u as isCodexAppServerStartSelectionChangedError, ut as assertNotSymlink, y as waitForCodexAppServerClientDesktopGenerationDrain } from "./shared-client-B__jQti1.mjs";
10
+ import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-C9dwStbK.mjs";
11
11
  import path from "node:path";
12
12
  import fs from "node:fs/promises";
13
13
  import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
@@ -11,7 +11,7 @@ function buildCodexMigrationProvider(params = {}) {
11
11
  ].join(" "),
12
12
  supportedItemKinds: ["memory", "auth"],
13
13
  async detect(ctx) {
14
- const { discoverCodexSource, hasCodexSource } = await import("./source-Cr8STZpF.mjs").then((n) => n.a);
14
+ const { discoverCodexSource, hasCodexSource } = await import("./source-DuNxTQoz.mjs").then((n) => n.a);
15
15
  const memoryOnly = isOnlyMigrationKind(ctx, "memory");
16
16
  const authOnly = isOnlyMigrationKind(ctx, "auth");
17
17
  const source = await discoverCodexSource({
@@ -29,16 +29,16 @@ function buildCodexMigrationProvider(params = {}) {
29
29
  };
30
30
  },
31
31
  async plan(ctx) {
32
- const { buildCodexMigrationPlan } = await import("./plan-DTyFfTkk.mjs");
32
+ const { buildCodexMigrationPlan } = await import("./plan-BB5rf7qh.mjs");
33
33
  return buildCodexMigrationPlan(ctx);
34
34
  },
35
35
  deferredApply: { retrySafe: true },
36
36
  prepareApply(ctx) {
37
37
  if (isOnlyMigrationKind(ctx, "memory") || isOnlyMigrationKind(ctx, "auth")) return;
38
- return import("./apply-DN-qPbcH.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
38
+ return import("./apply-DhLjXde1.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
39
39
  },
40
40
  async apply(ctx, plan) {
41
- const { applyCodexMigrationPlan } = await import("./apply-DN-qPbcH.mjs");
41
+ const { applyCodexMigrationPlan } = await import("./apply-DhLjXde1.mjs");
42
42
  return await applyCodexMigrationPlan({
43
43
  ctx,
44
44
  plan,
@@ -1,5 +1,5 @@
1
- import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-tOOyadmg.mjs";
2
- import { dt as normalizeCodexDynamicToolName } from "./thread-requests-DmkmrGIt.mjs";
1
+ import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-B__jQti1.mjs";
2
+ import { dt as normalizeCodexDynamicToolName } from "./thread-requests-D-GTNAnZ.mjs";
3
3
  import { pinExecToolTarget } from "openclaw/plugin-sdk/codex-mcp-projection";
4
4
  import { loadNodeExecAvailability } from "openclaw/plugin-sdk/node-selection-runtime";
5
5
  //#region extensions/codex/src/app-server/shell-dynamic-tools.ts
@@ -1,6 +1,6 @@
1
1
  import { n as CodexAppServerRpcError } from "./rpc-error-BlD2vuzn.mjs";
2
2
  import { i as withTimeout, r as withAbortableTimeout } from "./timeout-CXOfNoaX.mjs";
3
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
3
+ import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
4
4
  //#region extensions/codex/src/app-server/request.ts
5
5
  var request_exports = /* @__PURE__ */ __exportAll({
6
6
  CodexAppServerScopedRequestRejectedError: () => CodexAppServerScopedRequestRejectedError,
@@ -29,7 +29,7 @@ async function requestCodexAppServerClientJson(params) {
29
29
  let phase = "prepare";
30
30
  observeControlPhase(params.controlObservation, phase);
31
31
  try {
32
- const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-DjCz2eOw.mjs").then((n) => n.r);
32
+ const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-OIYEmTRF.mjs").then((n) => n.r);
33
33
  const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock({
34
34
  method: params.method,
35
35
  requestParams: params.requestParams,
@@ -58,7 +58,7 @@ async function requestCodexAppServerClientJson(params) {
58
58
  }
59
59
  async function requestCodexAppServerJson(params) {
60
60
  observeControlPhase(params.controlObservation, "prepare");
61
- const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-DjCz2eOw.mjs").then((n) => n.r);
61
+ const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-OIYEmTRF.mjs").then((n) => n.r);
62
62
  const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock({
63
63
  method: params.method,
64
64
  requestParams: params.requestParams,
@@ -179,8 +179,8 @@ async function withCodexAppServerJsonClient(params, run) {
179
179
  timeoutMs,
180
180
  timeoutMessage,
181
181
  promise: (async () => {
182
- const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-DjCz2eOw.mjs").then((n) => n.r);
183
- const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-tOOyadmg.mjs").then((n) => n.v);
182
+ const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-OIYEmTRF.mjs").then((n) => n.r);
183
+ const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-B__jQti1.mjs").then((n) => n.v);
184
184
  for (let attempt = 0; attempt < 2; attempt += 1) {
185
185
  errorPhase = void 0;
186
186
  activePhase = "prepare";
@@ -1,16 +1,17 @@
1
1
  import { n as readCodexRuntimeModelId } from "./model-runtime-BdqzOMkU.mjs";
2
- import { c as resolveRecoverableCodexPluginConfigKeys } from "./plugin-inventory-Cky2XJUw.mjs";
3
- import { g as createCodexNativeSubagentHistoryOwner } from "./native-subagent-pending-assignments-DwkCzLvD.mjs";
2
+ import { c as resolveRecoverableCodexPluginConfigKeys } from "./plugin-inventory-B4uqIw4J.mjs";
3
+ import { g as createCodexNativeSubagentHistoryOwner } from "./native-subagent-pending-assignments-XHNn4k5q.mjs";
4
+ import { A as handleDynamicToolCallWithTimeout, E as readCodexTurnCompletedNotification, F as resolveTerminalDynamicToolBatchAction, I as shouldBlockTerminalReleaseForNonTerminalDynamicToolResult, L as shouldReleaseTurnAfterTerminalDynamicTool, M as isDynamicToolTerminalDiagnosticEvent, N as isMatchingDynamicToolTerminalDiagnostic, P as resolveDynamicToolCallTimeoutMs, R as toCodexDynamicToolProgressResponse, S as assertCodexTurnStartResponse, U as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS, c as isCodexAppServerIndeterminateTransportError, i as isCodexAppServerApprovalRequest, j as hasPendingDynamicToolTerminalDiagnostic, k as createCodexElicitationResponse, m as CodexServerRequestResolvedError, o as isCodexAppServerConnectionClosedError, p as resolveCodexAppServerClientInstanceId, r as getCodexAppServerClientInstanceId, s as isCodexAppServerIndeterminateRequestCancellationError, w as readCodexDynamicToolCallParams, z as toCodexDynamicToolProtocolResponse } from "./client-BdNoDUaQ.mjs";
4
5
  import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
5
- import { i as matchesCodexNativeSubagentSubmissionBinding, n as assertCodexBindingMayBeReplaced, v as sessionBindingIdentity } from "./session-binding-record-Oe9L-CNY.mjs";
6
- import { n as defineCodexBuildState } from "./build-state--SrHyc6r.mjs";
6
+ import { i as matchesCodexNativeSubagentSubmissionBinding, n as assertCodexBindingMayBeReplaced, v as sessionBindingIdentity } from "./session-binding-record-CUKpUKVm.mjs";
7
+ import { n as defineCodexBuildState } from "./build-state-CmeL24P5.mjs";
7
8
  import { c as shouldAutoApproveCodexAppServerApprovals, l as withMcpElicitationsApprovalPolicy, m as readCodexRequirementsToml, n as hasCodexMcpToolApprovalOverrides } from "./config-security-CE-FcGw9.mjs";
8
9
  import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, f as resolveCodexPluginsPolicy, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-b088LyhT.mjs";
9
10
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
10
11
  import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
11
12
  import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext, o as resolveCodexComputerUseConfig } from "./config-options-CzyWLTJt.mjs";
12
- import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-Bs_3kRJD.mjs";
13
- import { d as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-lifecycle-CJ0lYVCW.mjs";
13
+ import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-DWIq3Lzf.mjs";
14
+ import { f as retireSharedCodexAppServerClientIfCurrent } from "./shared-client-lifecycle-wN_lOZkB.mjs";
14
15
  import { o as formatCodexDisplayText } from "./command-formatters-R3ckE3Co.mjs";
15
16
  import { t as isIncognitoSessionKey } from "./incognito-session-C5ve_-63.mjs";
16
17
  import { n as CodexAppServerRpcError } from "./rpc-error-BlD2vuzn.mjs";
@@ -19,41 +20,40 @@ import { t as readCodexAsyncQuestions } from "./async-questions-DdhOCwGi.mjs";
19
20
  import { a as readCodexProviderRefusal, d as splitPlanText, i as readCodexErrorNotificationMessage, l as readNonNegativeInteger, n as extractRawAssistantText, s as readItem, u as readNullableString } from "./event-projector-values-DJSz8BTk.mjs";
20
21
  import { r as readMirrorIdentity, t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
21
22
  import { a as defaultCodexAppInventoryCache, n as buildCodexAppServerRuntimeFingerprint, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BL9B5H0L.mjs";
22
- import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-DTtN1KrX.mjs";
23
- import { r as requestCodexAppServerClientJson, t as CodexAppServerScopedRequestRejectedError } from "./request-DxKAfWyy.mjs";
24
- import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DKhXquav.mjs";
23
+ import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-DRPlnIgg.mjs";
24
+ import { r as requestCodexAppServerClientJson, t as CodexAppServerScopedRequestRejectedError } from "./request-DZKa6YSy.mjs";
25
+ import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DqmrqI23.mjs";
25
26
  import { a as isCodexDurableCustomMessage, c as resolveCodexContextEngineProjectionMaxChars, i as fitCodexProjectedContextForTurnStart, l as resolveCodexContinuityProjectionMaxChars, n as CodexContextAttachmentError, o as neutralizeCodexExplicitMentionSigils, r as buildCodexContinuityCalibration, s as projectContextEngineAssemblyForCodex, t as CODEX_TURN_START_TEXT_INPUT_MAX_CHARS } from "./context-engine-projection-PezSESth.mjs";
26
27
  import { o as hasCodexMirrorOrigin, t as applyCodexTranscriptTaint } from "./transcript-mirror-attestation-YSegaktH.mjs";
27
28
  import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-D83lJWHG.mjs";
28
29
  import { i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-B0okYl2D.mjs";
29
- import { E as isCodexContextRestartSelectionChangedError, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, U as prepareCodexWorkspaceReferences, W as protectCodexAppServerLiveThread, X as readCodexRateLimitsRevision, Z as readRecentCodexRateLimits, _ as retainSharedCodexAppServerClientIfCurrent, _t as withCodexStartupTimeout, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, c as getLeasedSharedCodexAppServerClient, dt as CodexAppServerStartupError, f as readCodexAppServerClientDesktopGenerationFingerprint, ft as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, gt as resolveCodexStartupTimeoutMs, h as releaseLeasedSharedCodexAppServerClient, i as clearSharedCodexAppServerClientIfCurrent, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, nt as resolveCodexAppServerAuthAccountCacheKey, pt as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, rt as resolveCodexAppServerPreparedAuthHandoff, s as createIsolatedCodexAppServerClient, u as isCodexAppServerStartSelectionChangedError, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED } from "./shared-client-tOOyadmg.mjs";
30
+ import { E as isCodexContextRestartSelectionChangedError, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, U as prepareCodexWorkspaceReferences, W as protectCodexAppServerLiveThread, X as readCodexRateLimitsRevision, Z as readRecentCodexRateLimits, _ as retainSharedCodexAppServerClientIfCurrent, _t as withCodexStartupTimeout, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, c as getLeasedSharedCodexAppServerClient, dt as CodexAppServerStartupError, f as readCodexAppServerClientDesktopGenerationFingerprint, ft as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, gt as resolveCodexStartupTimeoutMs, h as releaseLeasedSharedCodexAppServerClient, i as clearSharedCodexAppServerClientIfCurrent, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, nt as resolveCodexAppServerAuthAccountCacheKey, pt as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, rt as resolveCodexAppServerPreparedAuthHandoff, s as createIsolatedCodexAppServerClient, u as isCodexAppServerStartSelectionChangedError, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED } from "./shared-client-B__jQti1.mjs";
30
31
  import { a as isCodexResponsesOAuthRun, r as isCodexResponsesOAuth } from "./responses-oauth-twnuTaAa.mjs";
31
- import { A as handleDynamicToolCallWithTimeout, E as readCodexTurnCompletedNotification, F as resolveTerminalDynamicToolBatchAction, I as shouldBlockTerminalReleaseForNonTerminalDynamicToolResult, L as shouldReleaseTurnAfterTerminalDynamicTool, M as isDynamicToolTerminalDiagnosticEvent, N as isMatchingDynamicToolTerminalDiagnostic, P as resolveDynamicToolCallTimeoutMs, R as toCodexDynamicToolProgressResponse, S as assertCodexTurnStartResponse, U as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS, c as isCodexAppServerIndeterminateTransportError, i as isCodexAppServerApprovalRequest, j as hasPendingDynamicToolTerminalDiagnostic, k as createCodexElicitationResponse, m as CodexServerRequestResolvedError, o as isCodexAppServerConnectionClosedError, p as resolveCodexAppServerClientInstanceId, r as getCodexAppServerClientInstanceId, s as isCodexAppServerIndeterminateRequestCancellationError, w as readCodexDynamicToolCallParams, z as toCodexDynamicToolProtocolResponse } from "./client-CyquSiJ2.mjs";
32
- import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-BTBE-LD9.mjs";
33
- import { M as matchesCodexSnapshotTurn, N as shouldClearTerminalPresentationForNativeItem, _ as CodexProjectionDiagnostics, d as shouldRetireCodexStartupClient, f as terminateCodexBackgroundTerminals, h as getCodexAppServerTurnRouter, k as itemName, m as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as interruptCodexTurnAndWaitBestEffort, u as retireUnsafeCodexTurnClientBestEffort, v as isCodexNotificationForTurn, y as readCodexNotificationThreadId } from "./attempt-client-cleanup-93r-CLTi.mjs";
34
- import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BLWz7stm.mjs";
32
+ import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-zu3jRPnu.mjs";
33
+ import { M as matchesCodexSnapshotTurn, N as shouldClearTerminalPresentationForNativeItem, _ as CodexProjectionDiagnostics, d as shouldRetireCodexStartupClient, f as terminateCodexBackgroundTerminals, h as getCodexAppServerTurnRouter, k as itemName, m as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as interruptCodexTurnAndWaitBestEffort, u as retireUnsafeCodexTurnClientBestEffort, v as isCodexNotificationForTurn, y as readCodexNotificationThreadId } from "./attempt-client-cleanup-C9dwStbK.mjs";
34
+ import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-Bnaj0_iV.mjs";
35
35
  import { a as isRawFunctionToolOutputCompletionNotification, c as readNotificationItemId, i as isPendingOpenClawDynamicToolCompletionNotification, l as readRawResponseToolCallId, o as isTerminalTurnStatus, r as isCodexTurnAbortMarkerNotification, s as readCodexNotificationItem, t as CodexUsageProjection, u as updateActiveTurnItemIds } from "./event-projector-usage-03R0I2dM.mjs";
36
- import { n as listAllCodexAppServerModels } from "./models-BbEE4EWS.mjs";
37
- import { A as createCodexNativeHookRelay, B as loadCodexNativeToolCatalog, D as buildCodexNativeHookRelayConfig, E as assertCodexNativeHookRelayAllowed, K as codexDynamicToolsFingerprint, M as resolveCodexNativeHookRelayEvents, N as resolveCodexNativeHookRelayTtlMs, O as buildCodexNativeHookRelayDisabledConfig, P as scheduleCodexNativeHookRelayUnregister, St as mergeCodexThreadConfigs, T as CodexManagedHooksOnlyError, W as areCodexDynamicToolFingerprintsCompatible, X as fingerprintJsonObject, _t as buildCodexPluginThreadConfigTimeoutFallback, gt as buildCodexPluginThreadConfigInputFingerprint, h as buildDeveloperInstructions, ht as buildCodexPluginThreadConfig, ot as filterCodexDynamicTools, p as resolveCodexWebSearchPlan, pt as resolveCodexDynamicToolsLoadingForRuntime, q as codexLegacyDynamicToolsFingerprint, tt as stabilizeJsonValue, ut as isSystemAgentOnlyCodexDynamicToolAllowlist, w as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, wt as shouldBuildCodexPluginThreadConfig, x as joinPresentSections, y as resolveCodexAppServerThreadModelSelection, z as hasCodexNativeToolCatalog } from "./thread-requests-DmkmrGIt.mjs";
38
- import { _ as readCodexMcpToolUiVisibility, a as buildTurnStartParams, b as isContextEngineBindingCompatible, c as assertScheduledCodexAppAuthorityRuntime, d as buildScheduledCodexAppServerConnectionIdentity, f as captureScheduledCodexAppAuthority, g as readCodexMcpToolConnectorId, h as resolveScheduledCodexAppCreatorCaptureDecision, i as buildTurnCollaborationMode, l as buildLegacyScheduledCodexAppRecoveryPrompt, m as readCurrentCodexScheduledAppPolicy, n as buildCodexParentLocalInstructions, o as buildCodexUserInput, p as intersectCodexPluginThreadConfigWithScheduledAuthority, s as startOrResumeThread, t as buildCodexHistoryProvenancePrefix, u as buildScheduledCodexAppAuthorityInputFingerprint, v as isCodexAppServerProfilerEnabled, y as buildContextEngineBinding } from "./thread-lifecycle-DcNw9n7E.mjs";
39
- import { a as resolveCodexRunSessionBindingAuthority, n as createCodexSessionGenerationSupersededError, o as resolveCodexSessionBinding } from "./session-binding-DGCYAfvD.mjs";
40
- import { a as CodexToolTranscriptProjection, b as sanitizeCodexAgentEventRecord, c as shouldEmitTranscriptToolProgress, i as emitCodexAgentEvent, p as requestPluginApprovalOutcome, r as CodexEventProjection, s as CodexToolProgressProjection, t as codexNativeSubagentMonitorRuntime, v as isCodexCommandBearingToolCall, x as sanitizeCodexToolArguments, y as resolveCodexToolProgressDetailMode } from "./native-subagent-monitor-B9aAqfnU.mjs";
41
- import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadSkillsCatalogAfterCompaction } from "./thread-policy-TTAb-1yF.mjs";
42
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DDban_4i.mjs";
43
- import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-kxmCYsuF.mjs";
44
- import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-BLnJh1mB.mjs";
36
+ import { n as listAllCodexAppServerModels } from "./models-DXVC1KpU.mjs";
37
+ import { A as createCodexNativeHookRelay, B as loadCodexNativeToolCatalog, D as buildCodexNativeHookRelayConfig, E as assertCodexNativeHookRelayAllowed, K as codexDynamicToolsFingerprint, M as resolveCodexNativeHookRelayEvents, N as resolveCodexNativeHookRelayTtlMs, O as buildCodexNativeHookRelayDisabledConfig, P as scheduleCodexNativeHookRelayUnregister, St as mergeCodexThreadConfigs, T as CodexManagedHooksOnlyError, W as areCodexDynamicToolFingerprintsCompatible, X as fingerprintJsonObject, _t as buildCodexPluginThreadConfigTimeoutFallback, gt as buildCodexPluginThreadConfigInputFingerprint, h as buildDeveloperInstructions, ht as buildCodexPluginThreadConfig, ot as filterCodexDynamicTools, p as resolveCodexWebSearchPlan, pt as resolveCodexDynamicToolsLoadingForRuntime, q as codexLegacyDynamicToolsFingerprint, tt as stabilizeJsonValue, ut as isSystemAgentOnlyCodexDynamicToolAllowlist, w as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, wt as shouldBuildCodexPluginThreadConfig, x as joinPresentSections, y as resolveCodexAppServerThreadModelSelection, z as hasCodexNativeToolCatalog } from "./thread-requests-D-GTNAnZ.mjs";
38
+ import { _ as readCodexMcpToolUiVisibility, a as buildTurnStartParams, b as isContextEngineBindingCompatible, c as assertScheduledCodexAppAuthorityRuntime, d as buildScheduledCodexAppServerConnectionIdentity, f as captureScheduledCodexAppAuthority, g as readCodexMcpToolConnectorId, h as resolveScheduledCodexAppCreatorCaptureDecision, i as buildTurnCollaborationMode, l as buildLegacyScheduledCodexAppRecoveryPrompt, m as readCurrentCodexScheduledAppPolicy, n as buildCodexParentLocalInstructions, o as buildCodexUserInput, p as intersectCodexPluginThreadConfigWithScheduledAuthority, s as startOrResumeThread, t as buildCodexHistoryProvenancePrefix, u as buildScheduledCodexAppAuthorityInputFingerprint, v as isCodexAppServerProfilerEnabled, y as buildContextEngineBinding } from "./thread-lifecycle-Cw5Nsciw.mjs";
39
+ import { a as resolveCodexRunSessionBindingAuthority, n as createCodexSessionGenerationSupersededError, o as resolveCodexSessionBinding } from "./session-binding-Fn7Ekzuv.mjs";
40
+ import { a as CodexToolTranscriptProjection, b as sanitizeCodexAgentEventRecord, c as shouldEmitTranscriptToolProgress, i as emitCodexAgentEvent, p as requestPluginApprovalOutcome, r as CodexEventProjection, s as CodexToolProgressProjection, t as codexNativeSubagentMonitorRuntime, v as isCodexCommandBearingToolCall, x as sanitizeCodexToolArguments, y as resolveCodexToolProgressDetailMode } from "./native-subagent-monitor-GOGINNw0.mjs";
41
+ import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadSkillsCatalogAfterCompaction } from "./thread-policy-BHr4QsDO.mjs";
42
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-Cxb01Uwq.mjs";
43
+ import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-BRNhyb1o.mjs";
44
+ import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-CpasNGjp.mjs";
45
45
  import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
46
46
  import { t as attemptTerminal } from "./attempt-terminal-gZrxQ35N.mjs";
47
47
  import { a as shouldKeepCodexSharedAbortOpen, i as runCodexAgentEndHook, n as ensureCodexWorkspaceDirOnce, o as withCodexAppServerFastModeServiceTier, r as estimateCodexAppServerProjectedTurnTokens, t as emitCodexAppServerEvent } from "./run-attempt-lifecycle-C-6O3Exn.mjs";
48
48
  import { t as CODEX_INFERENCE_GENERATION_KEY } from "./inference-metadata-CgIf7sOx.mjs";
49
49
  import "./inference-context-D-9gWlTR.mjs";
50
- import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-BmWQXFLV.mjs";
51
- import { C as readCodexRetainedBackgroundCommands, E as CodexNativeToolLifecycleProjector, S as hasCodexNativeBackgroundProcesses, T as mapCodexAppServerRemoteWorkspacePath, _ as shouldWarnCodexDynamicToolBuildStageSummary, a as emitDynamicToolStartedDiagnostic, b as createCodexNativePreToolUseFailureBuffer, c as buildDynamicTools, d as resolveCodexAppServerHookChannelId, f as resolveCodexExternalSandboxPolicyForOpenClawSandbox, g as shouldRequireCodexSandboxExecServerEnvironment, h as shouldEnableCodexAppServerNativeToolSurface, i as emitDynamicToolErrorDiagnostic, l as disableCodexPluginThreadConfig, m as resolveCodexSandboxEnvironmentSelection, n as projectCodexExecutableDynamicTools, o as emitDynamicToolTerminalDiagnostic, p as resolveCodexMessageToolProvider, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as resolveCodexAppServerExecutionCwd, v as ensureCodexSandboxExecServerEnvironment, w as readBoundedCodexRemoteWorkspaceFile, x as CodexNativeProcessAuthority, y as releaseCodexSandboxExecServerEnvironment } from "./dynamic-tools-D3NAwGw3.mjs";
52
- import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy } from "./session-permission-policy-Ci_fVX6y.mjs";
53
- import { a as getCodexContextFileDisplayBasename, c as normalizeCodexDynamicToolName, i as getCodexContextFileBasename, n as CODEX_NATIVE_PROJECT_DOC_BASENAMES, o as isNonEmptyString, r as buildCodexWorkspaceBootstrapContext, s as normalizeCodexContextFilePath } from "./attempt-workspace-context-ejEuxrY1.mjs";
50
+ import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-CDe3ohIy.mjs";
51
+ import { C as readCodexRetainedBackgroundCommands, E as CodexNativeToolLifecycleProjector, S as hasCodexNativeBackgroundProcesses, T as mapCodexAppServerRemoteWorkspacePath, _ as shouldWarnCodexDynamicToolBuildStageSummary, a as emitDynamicToolStartedDiagnostic, b as createCodexNativePreToolUseFailureBuffer, c as buildDynamicTools, d as resolveCodexAppServerHookChannelId, f as resolveCodexExternalSandboxPolicyForOpenClawSandbox, g as shouldRequireCodexSandboxExecServerEnvironment, h as shouldEnableCodexAppServerNativeToolSurface, i as emitDynamicToolErrorDiagnostic, l as disableCodexPluginThreadConfig, m as resolveCodexSandboxEnvironmentSelection, n as projectCodexExecutableDynamicTools, o as emitDynamicToolTerminalDiagnostic, p as resolveCodexMessageToolProvider, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as resolveCodexAppServerExecutionCwd, v as ensureCodexSandboxExecServerEnvironment, w as readBoundedCodexRemoteWorkspaceFile, x as CodexNativeProcessAuthority, y as releaseCodexSandboxExecServerEnvironment } from "./dynamic-tools-CAWsGyFZ.mjs";
52
+ import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy } from "./session-permission-policy-7lM447LW.mjs";
53
+ import { a as getCodexContextFileDisplayBasename, c as normalizeCodexDynamicToolName, i as getCodexContextFileBasename, n as CODEX_NATIVE_PROJECT_DOC_BASENAMES, o as isNonEmptyString, r as buildCodexWorkspaceBootstrapContext, s as normalizeCodexContextFilePath } from "./attempt-workspace-context-DJrvhJDC.mjs";
54
54
  import { n as captureCodexSettledTurnFinalizationContext } from "./settled-turn-context-D4yj4rxf.mjs";
55
- import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-ByhBukaD.mjs";
56
- import { a as createComputerUseRequest, n as ensureCodexComputerUse, o as runCodexComputerUseLiveTest, t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-Q4ZFn6UH.mjs";
55
+ import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-DcF-V_3D.mjs";
56
+ import { a as createComputerUseRequest, n as ensureCodexComputerUse, o as runCodexComputerUseLiveTest, t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-DuaAXtXC.mjs";
57
57
  import { asOptionalRecord, normalizeOptionalString, readNonBlankString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
58
58
  import { createHash } from "node:crypto";
59
59
  import { isDeepStrictEqual } from "node:util";
@@ -77,7 +77,7 @@ import { getSessionEntry } from "openclaw/plugin-sdk/session-store-runtime";
77
77
  import { acknowledgeInternalToolResult, createAgentHarnessToolExecutionRegistry } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
78
78
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
79
79
  import { captureFinalCodexCronCreatorToolAllowlist, formatMcpCodexApprovalRemedy, materializeStaticMcpToolsForHarnessRun, resolveCodexMcpToolOverridesForAgent, resolveCodexTtsProvenanceTransfer } from "openclaw/plugin-sdk/codex-mcp-projection";
80
- import { appendSessionYieldContext, hasPromptImageInput } from "openclaw/plugin-sdk/session-transcript-runtime";
80
+ import { appendSessionTranscriptMessageByIdentityStrict, appendSessionYieldContext, hasPromptImageInput } from "openclaw/plugin-sdk/session-transcript-runtime";
81
81
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
82
82
  import { isSilentReplyPayloadText } from "openclaw/plugin-sdk/reply-chunking";
83
83
  import { generatedImageAssetFromBase64 } from "openclaw/plugin-sdk/image-generation";
@@ -2807,7 +2807,7 @@ function activateCodexAttemptTurn(resources, turnRuntime, lifecycle, notificatio
2807
2807
  isStreaming: () => !state.completed && !runAbortController.signal.aborted,
2808
2808
  isAborted: () => runAbortController.signal.aborted,
2809
2809
  isStopped: () => state.completed || runAbortController.signal.aborted,
2810
- ownsLiveness: () => deadlines.ownsExecutionWait() && resourceState.turnRoute?.signal.aborted === false && !state.completed && !state.terminalTurnNotificationQueued && state.activeAppServerTurnRequests === 0 && state.activeLocalProjections === 0,
2810
+ ownsLiveness: () => deadlines.ownsExecutionWait() && resourceState.turnRoute?.signal.aborted === false && !state.completed && !state.terminalTurnNotificationQueued,
2811
2811
  isAbortable: () => !terminalState.terminalOutcomeFrozen || terminalState.sharedAbortAllowedAfterTerminalOutcome,
2812
2812
  isCompacting: () => projectorRef.current?.isCompacting() ?? false,
2813
2813
  supportsTranscriptCommitWait: true,
@@ -5540,14 +5540,49 @@ function createNativeSubagentAssignmentStore(params) {
5540
5540
  assertCurrent();
5541
5541
  assertSourceCurrent();
5542
5542
  }),
5543
- consume: (assignment, assertSourceCurrent) => bindingStore.mutate(identity, {
5544
- kind: "consume-native-subagent-assignment",
5545
- owner,
5546
- assignment
5547
- }, () => {
5548
- assertCurrent();
5549
- assertSourceCurrent();
5550
- })
5543
+ consume: async (assignment, assertSourceCurrent, undelivered) => {
5544
+ const applied = await bindingStore.mutate(identity, {
5545
+ kind: "consume-native-subagent-assignment",
5546
+ owner,
5547
+ assignment,
5548
+ ...undelivered ? { undelivered: true } : {}
5549
+ }, () => {
5550
+ assertCurrent();
5551
+ assertSourceCurrent();
5552
+ });
5553
+ if (applied && undelivered) {
5554
+ embeddedAgentLog.warn("Native subagent completion retired without delivery", {
5555
+ childThreadId: assignment.childThreadId,
5556
+ nativeTurnId: assignment.nativeTurnId,
5557
+ status: undelivered.status,
5558
+ childSessionKey: assignment.runId
5559
+ });
5560
+ try {
5561
+ if (identity.kind !== "session" || !identity.sessionKey) throw new Error("Native completion has no parent transcript target.");
5562
+ const note = await appendSessionTranscriptMessageByIdentityStrict({
5563
+ agentId: identity.agentId,
5564
+ sessionId: owner.sessionId,
5565
+ sessionKey: identity.sessionKey,
5566
+ updateMode: "inline",
5567
+ message: {
5568
+ role: "custom",
5569
+ customType: "openclaw.system-note",
5570
+ display: true,
5571
+ content: `Native subagent ${assignment.childThreadId} finished with status ${undelivered.status}, but its completion could not be delivered. Automatic delivery has stopped. Inspect its native Codex thread history${assignment.nativeTurnId ? ` at turn ${assignment.nativeTurnId}` : ""}; child session key: ${assignment.runId}.`.slice(0, 2048),
5572
+ timestamp: Date.now(),
5573
+ idempotencyKey: `codex-undelivered:${owner.lifecycleRevision ?? owner.sessionId}:${assignment.childThreadId}:${assignment.nativeTurnId ?? "initial"}`
5574
+ }
5575
+ });
5576
+ if (note.kind !== "result") throw new Error(`Native completion note was ${note.kind}.`);
5577
+ } catch (error) {
5578
+ embeddedAgentLog.warn("Could not persist native completion retirement note", {
5579
+ childSessionKey: assignment.runId,
5580
+ error: formatErrorMessage(error)
5581
+ });
5582
+ }
5583
+ }
5584
+ return applied;
5585
+ }
5551
5586
  };
5552
5587
  }
5553
5588
  //#endregion
@@ -6637,7 +6672,7 @@ function createCodexAttemptServerRequestController(resources, turnRuntime, lifec
6637
6672
  //#region extensions/codex/src/app-server/attempt-runtime-artifact.ts
6638
6673
  async function verifyStartupArtifact(params) {
6639
6674
  if (!params.request) return;
6640
- const { readCodexAppServerClientRuntimeArtifact, validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-D7lCXdhV.mjs");
6675
+ const { readCodexAppServerClientRuntimeArtifact, validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-Riq878B2.mjs");
6641
6676
  const runtimeArtifact = readCodexAppServerClientRuntimeArtifact(params.client);
6642
6677
  const expected = params.request.expected;
6643
6678
  const matchesExpected = !expected || runtimeArtifact?.id === expected.id && runtimeArtifact.fingerprint === expected.fingerprint;
@@ -1,7 +1,7 @@
1
1
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
2
- import { a as resolvePackagedCodexNativeCommand } from "./managed-binary-B6hQ1UKR.mjs";
3
- import { n as resolveCodexAppServerSpawnEnv, r as resolveCodexAppServerSpawnInvocation } from "./transport-stdio-CbutOIEh.mjs";
4
- import { captureCodexConfiguredConnection, finalizeCodexConfiguredConnection, isCodexConfiguredConnectionArtifact, validateCodexConfiguredConnectionCapture } from "./runtime-artifact-connection-D68qQn1m.mjs";
2
+ import { a as resolvePackagedCodexNativeCommand } from "./managed-binary-Ckgvm_4V.mjs";
3
+ import { n as resolveCodexAppServerSpawnEnv, r as resolveCodexAppServerSpawnInvocation } from "./transport-stdio-DU8dIOCj.mjs";
4
+ import { captureCodexConfiguredConnection, finalizeCodexConfiguredConnection, isCodexConfiguredConnectionArtifact, validateCodexConfiguredConnectionCapture } from "./runtime-artifact-connection-Bjv8P6Sx.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { resolveWindowsExecutablePath } from "openclaw/plugin-sdk/windows-spawn";
7
7
  import { constants } from "node:fs";
@@ -1,6 +1,6 @@
1
1
  import { t as codexAppServerStartOptionsKey } from "./config-options-CzyWLTJt.mjs";
2
- import "./config-runtime-C0NbLms1.mjs";
3
- import { r as resolveCodexAppServerUnixSocketPath } from "./transport-websocket-BTBE-LD9.mjs";
2
+ import "./config-runtime-DDhvIeUC.mjs";
3
+ import { r as resolveCodexAppServerUnixSocketPath } from "./transport-websocket-zu3jRPnu.mjs";
4
4
  import { createHash } from "node:crypto";
5
5
  import path from "node:path";
6
6
  //#region extensions/codex/src/app-server/runtime-artifact-connection.ts
@@ -1,6 +1,6 @@
1
1
  import { l as isCodexRemoteExecPlacementSandbox } from "./config-parsing-b088LyhT.mjs";
2
2
  import { n as resolveCodexNativeExecutionPolicy, t as formatCodexNativeNodeExecBlock } from "./native-execution-policy-BxZJy5mP.mjs";
3
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
3
+ import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
4
4
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { tryResolveDefaultAgentId } from "openclaw/plugin-sdk/agent-scope-runtime";
6
6
  import { parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
@@ -1,8 +1,8 @@
1
- import { i as adoptCodexNativeSubagentSubmissions, n as mutateNativePendingAssignments, o as mutateCodexNativeSubagentSubmissions } from "./native-subagent-pending-assignments-DwkCzLvD.mjs";
2
- import { _ as readStoredCodexAppServerBinding, a as matchesPendingSupervisionBranch, b as validateBindingForWrite, c as preserveNativePendingAssignments, d as readCodexBindingTimestamp, f as readCurrentCodexAppServerBinding, g as readPluginAppPolicyContext, h as readCurrentNativePendingAssignments, i as matchesCodexNativeSubagentSubmissionBinding, l as preserveNativeTaskImport, m as readCurrentCodexNativeSubagentSubmissions, n as assertCodexBindingMayBeReplaced, o as ownsStoredSessionGeneration, p as readCurrentCodexAppServerBindings, r as bindingStoreKey, s as preserveCodexNativeSubagentSubmissions, t as CodexSupervisionBindingReplacementError, u as readCodexAppServerThreadBinding, v as sessionBindingIdentity, y as stripUndefinedBinding } from "./session-binding-record-Oe9L-CNY.mjs";
1
+ import { a as matchesCodexNativeSubagentSubmissionOwner, c as codexNativeSubagentRunId, i as adoptCodexNativeSubagentSubmissions, n as mutateNativePendingAssignments, o as mutateCodexNativeSubagentSubmissions, s as readCodexNativeSubagentSubmissions } from "./native-subagent-pending-assignments-XHNn4k5q.mjs";
2
+ import { _ as readStoredCodexAppServerBinding, a as matchesPendingSupervisionBranch, b as validateBindingForWrite, c as preserveNativePendingAssignments, d as readCodexBindingTimestamp, f as readCurrentCodexAppServerBinding, g as readPluginAppPolicyContext, h as readCurrentNativePendingAssignments, i as matchesCodexNativeSubagentSubmissionBinding, l as preserveNativeTaskImport, m as readCurrentCodexNativeSubagentSubmissions, n as assertCodexBindingMayBeReplaced, o as ownsStoredSessionGeneration, p as readCurrentCodexAppServerBindings, r as bindingStoreKey, s as preserveCodexNativeSubagentSubmissions, t as CodexSupervisionBindingReplacementError, u as readCodexAppServerThreadBinding, v as sessionBindingIdentity, y as stripUndefinedBinding } from "./session-binding-record-CUKpUKVm.mjs";
3
3
  import { n as CODEX_APP_SERVER_BINDING_NAMESPACE, t as CODEX_APP_SERVER_BINDING_MAX_ENTRIES } from "./session-binding-meta-B7aEMU7g.mjs";
4
4
  import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-B0okYl2D.mjs";
5
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
5
+ import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
6
6
  import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { createHash } from "node:crypto";
8
8
  import { AgentHarnessSessionSupersededError, embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
@@ -20,8 +20,23 @@ function mutateNativeSubagentBinding({ identity, current, mutation, assertCurren
20
20
  assignment: mutation.assignment,
21
21
  consume: mutation.kind === "consume-native-subagent-assignment"
22
22
  });
23
- if (!changed.applied) return { result: false };
23
+ if (!changed.applied) return { result: mutation.kind === "consume-native-subagent-assignment" && mutation.undelivered === true && changed.absent === true };
24
24
  const { nativeSubagentAssignments: _previous, ...bindingOwner } = current;
25
+ const retired = changed.consumed;
26
+ if (retired && mutation.kind === "consume-native-subagent-assignment" && mutation.undelivered) {
27
+ let submissions;
28
+ try {
29
+ submissions = readCodexNativeSubagentSubmissions(bindingOwner.nativeSubagentSubmissions);
30
+ } catch {}
31
+ if (submissions && matchesCodexNativeSubagentSubmissionOwner(submissions.owner, mutation.owner)) {
32
+ const receipts = submissions.receipts.filter((receipt) => receipt.childThreadId !== retired.childThreadId || receipt.submissionId !== retired.nativeTurnId && codexNativeSubagentRunId(receipt.childThreadId, receipt.submissionId) !== retired.runId);
33
+ delete bindingOwner.nativeSubagentSubmissions;
34
+ if (receipts.length) bindingOwner.nativeSubagentSubmissions = {
35
+ ...submissions,
36
+ receipts
37
+ };
38
+ }
39
+ }
25
40
  return {
26
41
  result: true,
27
42
  next: {
@@ -1,5 +1,5 @@
1
1
  import { d as CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN, r as normalizeCodexServiceTier } from "./config-utils-D0CXecki.mjs";
2
- import { a as matchesCodexNativeSubagentSubmissionOwner, h as codexNativeSubagentHistoryConnectionFingerprint, r as readNativePendingAssignments, s as readCodexNativeSubagentSubmissions, t as matchesNativeAssignmentLifecycle } from "./native-subagent-pending-assignments-DwkCzLvD.mjs";
2
+ import { a as matchesCodexNativeSubagentSubmissionOwner, h as codexNativeSubagentHistoryConnectionFingerprint, r as readNativePendingAssignments, s as readCodexNativeSubagentSubmissions, t as matchesNativeAssignmentLifecycle } from "./native-subagent-pending-assignments-XHNn4k5q.mjs";
3
3
  import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { createHash } from "node:crypto";
5
5
  import { isDeepStrictEqual } from "node:util";
@@ -478,7 +478,7 @@ async function migrateSource(source, candidates, params, store) {
478
478
  return await withFileLock(source.sidecarPath, LEGACY_BINDING_LOCK_OPTIONS, async () => {
479
479
  const [contents, stat] = await Promise.all([fs.readFile(source.sidecarPath, "utf8"), fs.stat(source.sidecarPath)]);
480
480
  const raw = JSON.parse(contents);
481
- const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-DGCYAfvD.mjs").then((n) => n.s), import("./conversation-binding-data-C746z5Pn.mjs").then((n) => n.t)]);
481
+ const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-Fn7Ekzuv.mjs").then((n) => n.s), import("./conversation-binding-data-DlsG-dQu.mjs").then((n) => n.t)]);
482
482
  const agentId = owner?.agentId ?? (source.agentIds.size === 1 ? [...source.agentIds][0] : void 0);
483
483
  const baseStored = createStoredCodexAppServerBinding(raw, {
484
484
  now: stat.mtime.toISOString(),
@@ -1,8 +1,8 @@
1
- import { T as requireBoundThread, d as boundedCatalogString, o as CatalogParamsError } from "./session-catalog-parsing-CPGaPYr-.mjs";
2
- import { v as sessionBindingIdentity } from "./session-binding-record-Oe9L-CNY.mjs";
1
+ import { T as requireBoundThread, d as boundedCatalogString, o as CatalogParamsError } from "./session-catalog-parsing-CnEH565l.mjs";
2
+ import { v as sessionBindingIdentity } from "./session-binding-record-CUKpUKVm.mjs";
3
3
  import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
4
- import { i as reclaimCurrentCodexSessionGeneration } from "./session-binding-DGCYAfvD.mjs";
5
- import { adoptionSessionKeyRest, catalogSessionActions } from "./session-catalog-node-adoption-DgXvSGu0.mjs";
4
+ import { i as reclaimCurrentCodexSessionGeneration } from "./session-binding-Fn7Ekzuv.mjs";
5
+ import { adoptionSessionKeyRest, catalogSessionActions } from "./session-catalog-node-adoption-BdS7zDuY.mjs";
6
6
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { listSessionCatalogEntries, sessionCatalogAdoptedSessionKey, sessionCatalogAdoptedSourceKey } from "openclaw/plugin-sdk/session-catalog";
8
8
  //#region extensions/codex/src/session-catalog-adoption.ts
@@ -152,7 +152,7 @@ async function createOrReuseAdoptedSession(params) {
152
152
  sourceThreadId: params.sourceThread.id,
153
153
  ...params.sourceHomeId ? { sourceHomeId: params.sourceHomeId } : {}
154
154
  };
155
- const { createImportedCodexSession } = await import("./session-history-import-WhX-X33a.mjs");
155
+ const { createImportedCodexSession } = await import("./session-history-import-tquj9DCz.mjs");
156
156
  const created = await createImportedCodexSession({
157
157
  runtime: params.api.runtime,
158
158
  bindingStore: params.bindingStore,