@openclaw/codex 2026.9.34 → 2026.9.35
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.
- package/dist/.setup/{account-usage-runtime-CD8HYWaz.mjs → account-usage-runtime-BaJamBiM.mjs} +3 -3
- package/dist/.setup/{apply-DN-qPbcH.mjs → apply-CxwOGLd_.mjs} +8 -8
- package/dist/.setup/{attempt-client-cleanup-93r-CLTi.mjs → attempt-client-cleanup-BVtNsTOE.mjs} +4 -4
- package/dist/.setup/{attempt-workspace-context-ejEuxrY1.mjs → attempt-workspace-context-XRsWP165.mjs} +1 -1
- package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-Bnaj0_iV.mjs} +1 -1
- package/dist/.setup/{auth-cache-key-Bs_3kRJD.mjs → auth-cache-key-CskfconU.mjs} +3 -3
- package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-DRPlnIgg.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-DC3oUqo-.mjs} +1 -1
- package/dist/.setup/{bounded-turn-I8Vb-qq3.mjs → bounded-turn-DBwLoFDR.mjs} +11 -11
- package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-Ce-oOk-D.mjs} +2 -2
- package/dist/.setup/{build-state--SrHyc6r.mjs → build-state-B3lvV1Op.mjs} +1 -1
- package/dist/.setup/{client-CyquSiJ2.mjs → client-DcTISXe3.mjs} +7 -7
- package/dist/.setup/{client-catalog-response-B9pLl58Y.mjs → client-catalog-response-BcbsrQXY.mjs} +1 -1
- package/dist/.setup/{command-dispatch-BPLz7tlx.mjs → command-dispatch-MOoD3rsD.mjs} +1 -1
- package/dist/.setup/{command-handlers-95-WVrcl.mjs → command-handlers-Cevt_YwM.mjs} +22 -22
- package/dist/.setup/{command-rpc-BDfCWgc_.mjs → command-rpc-kf7Uq4L-.mjs} +11 -11
- package/dist/.setup/{compact-5zzFlH-W.mjs → compact-BNKuKa7o.mjs} +12 -12
- package/dist/.setup/{config-DKhXquav.mjs → config-DqmrqI23.mjs} +2 -2
- package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-DDhvIeUC.mjs} +1 -1
- package/dist/.setup/{conversation-binding-C-0jWdSo.mjs → conversation-binding-CKYGEvcX.mjs} +15 -15
- package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DlsG-dQu.mjs} +1 -1
- package/dist/.setup/{conversation-control-BEotI-gH.mjs → conversation-control-CoWUL35l.mjs} +5 -5
- package/dist/.setup/{dynamic-tools-D3NAwGw3.mjs → dynamic-tools-Dr0ye5P3.mjs} +7 -7
- package/dist/.setup/{effective-mcp-catalog-C0DfQNYU.mjs → effective-mcp-catalog-BFJCwjSI.mjs} +4 -4
- package/dist/.setup/{ephemeral-turn-ksZ9NfsS.mjs → ephemeral-turn-Dj3iTfSP.mjs} +2 -2
- package/dist/.setup/{event-projector-assistant-message-BmWQXFLV.mjs → event-projector-assistant-message-DXDX94zH.mjs} +1 -1
- package/dist/.setup/{isolated-completion-Ci27cKqA.mjs → isolated-completion-GB52W-qA.mjs} +6 -6
- package/dist/.setup/{managed-binary-B6hQ1UKR.mjs → managed-binary-Ckgvm_4V.mjs} +1 -1
- package/dist/.setup/{model-catalog-qzAfnHzR.mjs → model-catalog-DxSrOSY0.mjs} +7 -7
- package/dist/.setup/{models-BbEE4EWS.mjs → models-BwkZaXXj.mjs} +3 -3
- package/dist/.setup/{native-auth-BN-BD2AV.mjs → native-auth-BNGz77PF.mjs} +3 -3
- package/dist/.setup/{native-subagent-monitor-B9aAqfnU.mjs → native-subagent-monitor-g-ZDkvCr.mjs} +116 -27
- package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-XHNn4k5q.mjs} +51 -14
- package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-Dna952zv.mjs} +2 -2
- package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-BwhIYgCZ.mjs} +2 -2
- package/dist/.setup/{node-exec-server.runtime-BS7jsvK-.mjs → node-exec-server.runtime-9IZtsOmo.mjs} +2 -2
- package/dist/.setup/{plan-DTyFfTkk.mjs → plan-Cwp_21m-.mjs} +5 -5
- package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BaDnJKJd.mjs} +2 -2
- package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-B4uqIw4J.mjs} +1 -1
- package/dist/.setup/{plugin-metadata-cache-Q4ZFn6UH.mjs → plugin-metadata-cache-C-LRxilF.mjs} +7 -7
- package/dist/.setup/{provider-Cnr_icbk.mjs → provider-DUotqBZ6.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-ByhBukaD.mjs → provider-capabilities-DBs9l8oL.mjs} +2 -2
- package/dist/.setup/{request-DxKAfWyy.mjs → request-CWERwKIL.mjs} +5 -5
- package/dist/.setup/{run-attempt-BZKhzSrb.mjs → run-attempt-ypT0LYSD.mjs} +75 -40
- package/dist/.setup/{runtime-artifact-D7lCXdhV.mjs → runtime-artifact-Riq878B2.mjs} +3 -3
- package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-Bjv8P6Sx.mjs} +2 -2
- package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-OIYEmTRF.mjs} +1 -1
- package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Fn7Ekzuv.mjs} +19 -4
- package/dist/.setup/{session-binding-record-Oe9L-CNY.mjs → session-binding-record-CUKpUKVm.mjs} +1 -1
- package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BuEALwJY.mjs} +1 -1
- package/dist/.setup/{session-catalog-BaVqm4-Q.mjs → session-catalog-DMagZcW-.mjs} +22 -22
- package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-58bqOngU.mjs} +5 -5
- package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-BM9gCB82.mjs} +5 -5
- package/dist/.setup/{session-catalog-events-D9zC7gRb.mjs → session-catalog-events-r59AxcQ4.mjs} +3 -3
- package/dist/.setup/{session-catalog-index-CNKpHanP.mjs → session-catalog-index-CY1lNpxF.mjs} +8 -8
- package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-DQhmgM3b.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-index-state-DhLoAnfy.mjs} +3 -3
- package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-bz5ZvjtY.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-CvtxrYSe.mjs → session-catalog-list-request-A1wN4sKw.mjs} +2 -2
- package/dist/.setup/{session-catalog-native-projection-DhId_sl8.mjs → session-catalog-native-projection-CXTe4qQr.mjs} +4 -4
- package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-BdS7zDuY.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-XFJG3JGh.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-D9AP5D5o.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-CnEH565l.mjs} +1 -1
- package/dist/.setup/{session-catalog-projection-DcqN7DuI.mjs → session-catalog-projection-DcDKizZd.mjs} +4 -4
- package/dist/.setup/{session-cli-TEVHpWaE.mjs → session-cli-C3GejWcm.mjs} +2 -2
- package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-tquj9DCz.mjs} +4 -4
- package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-DefAI1_5.mjs} +2 -2
- package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-7lM447LW.mjs} +1 -1
- package/dist/.setup/{session-retirement-CW0ciVbW.mjs → session-retirement-CQCMiDul.mjs} +6 -6
- package/dist/.setup/{settled-turn-finalizer-DlPT87wW.mjs → settled-turn-finalizer-w92T5Rbb.mjs} +7 -7
- package/dist/.setup/{shared-client-tOOyadmg.mjs → shared-client-ZXKMsK6f.mjs} +44 -31
- package/dist/.setup/{shared-client-lifecycle-CJ0lYVCW.mjs → shared-client-lifecycle-BH_y_i8l.mjs} +24 -2
- package/dist/.setup/{side-question-BbnuMFTT.mjs → side-question-BBZJibHK.mjs} +15 -15
- package/dist/.setup/{source-Cr8STZpF.mjs → source-Iusn97ly.mjs} +4 -4
- package/dist/.setup/{thread-lifecycle-DcNw9n7E.mjs → thread-lifecycle-CzzYMvTL.mjs} +13 -13
- package/dist/.setup/{thread-ownership-DDban_4i.mjs → thread-ownership-BT_SeSUp.mjs} +4 -4
- package/dist/.setup/{thread-policy-TTAb-1yF.mjs → thread-policy-MM5YD22L.mjs} +3 -3
- package/dist/.setup/{thread-requests-DmkmrGIt.mjs → thread-requests-y_MnVuWC.mjs} +8 -8
- package/dist/.setup/{thread-resume-eo3IhOhh.mjs → thread-resume-B9clyqXE.mjs} +5 -5
- package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BRNhyb1o.mjs} +1 -1
- package/dist/.setup/{transport-stdio-CbutOIEh.mjs → transport-stdio-DU8dIOCj.mjs} +1 -1
- package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zu3jRPnu.mjs} +1 -1
- package/dist/.setup/{upstream-session-fork-BbUNlJPZ.mjs → upstream-session-fork-2ipYynVl.mjs} +14 -14
- package/dist/.setup/{usage-CDiI_zkr.mjs → usage-BgB8DOas.mjs} +3 -3
- package/dist/.setup/{usage-limit-error-BLnJh1mB.mjs → usage-limit-error-B1FCZdeH.mjs} +1 -1
- package/dist/.setup/{web-search-provider.runtime-B_E2kpZN.mjs → web-search-provider.runtime-BWbZnYAL.mjs} +2 -2
- package/dist/.source-module-urls/78bb81623f5bb4c04c8cbd3fb1e9f10b4529f4811dc3cd99cedf5880f01c9b28.json +1 -0
- package/dist/api.js +3 -3
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +5 -5
- package/dist/harness.js +19 -19
- package/dist/index.js +52 -42
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as assertCodexModelListResponse } from "./client-
|
|
1
|
+
import { g as assertCodexModelListResponse } from "./client-DcTISXe3.mjs";
|
|
2
2
|
import { normalizeOptionalString, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/codex/src/app-server/models.ts
|
|
4
4
|
const DEFAULT_MODEL_DISCOVERY_TIMEOUT_MS = 1e4;
|
|
@@ -32,8 +32,8 @@ async function withCodexAppServerModelRequest(options, run) {
|
|
|
32
32
|
if (options.request) return await run(options.request);
|
|
33
33
|
const timeoutMs = options.timeoutMs ?? 1e4;
|
|
34
34
|
const useSharedClient = options.sharedClient !== false;
|
|
35
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-
|
|
36
|
-
const { requestCodexAppServerClientJson } = await import("./request-
|
|
35
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-ZXKMsK6f.mjs").then((n) => n.v);
|
|
36
|
+
const { requestCodexAppServerClientJson } = await import("./request-CWERwKIL.mjs").then((n) => n.a);
|
|
37
37
|
const client = await (useSharedClient ? getLeasedSharedCodexAppServerClient : createIsolatedCodexAppServerClient)({
|
|
38
38
|
startOptions: options.startOptions,
|
|
39
39
|
timeoutMs,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
2
2
|
import { n as isCodexAppServerProxyLaunch, t as buildCodexLoginStatusArgs } from "./launch-args-DbFCehO7.mjs";
|
|
3
|
-
import { r as resolveManagedCodexAppServerStartOptions } from "./managed-binary-
|
|
4
|
-
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-
|
|
5
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
3
|
+
import { r as resolveManagedCodexAppServerStartOptions } from "./managed-binary-Ckgvm_4V.mjs";
|
|
4
|
+
import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-DU8dIOCj.mjs";
|
|
5
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
|
|
6
6
|
import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
7
7
|
import { materializeWindowsSpawnProgram, resolveWindowsSpawnProgram } from "openclaw/plugin-sdk/windows-spawn";
|
|
8
8
|
//#region extensions/codex/src/app-server/native-auth.ts
|
package/dist/.setup/{native-subagent-monitor-B9aAqfnU.mjs → native-subagent-monitor-g-ZDkvCr.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as codexNativeSubagentRunId, d as readNativeSubagentThreadIds, f as readThreadParentThreadId, l as normalizeIdentifier, m as assertHistoryOwnerMatchesRegistration, p as readThreadSpawnSource, t as matchesNativeAssignmentLifecycle, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-
|
|
1
|
+
import { c as codexNativeSubagentRunId, d as readNativeSubagentThreadIds, f as readThreadParentThreadId, l as normalizeIdentifier, m as assertHistoryOwnerMatchesRegistration, p as readThreadSpawnSource, t as matchesNativeAssignmentLifecycle, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-XHNn4k5q.mjs";
|
|
2
2
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
3
3
|
import { c as readNonEmptyString, o as readHookOutputEntries, r as normalizeOptionalString$1, s as readItem, u as readNullableString } from "./event-projector-values-DJSz8BTk.mjs";
|
|
4
4
|
import { t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
|
|
5
5
|
import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-D83lJWHG.mjs";
|
|
6
|
-
import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, ht as resolveCodexGatewayTimeoutWithGraceMs, q as retainCodexAppServerLiveThread } from "./shared-client-
|
|
7
|
-
import { A as itemStatus, D as isSideEffectingNativeToolItem, E as isProjectedNativeToolItem, M as matchesCodexSnapshotTurn, O as itemKind, P as unknownItemStatus, S as auditNativeToolTerminalStatus, T as isNonSuccessItemStatus, j as itemTitle, k as itemName, s as interruptCodexTurnAndWaitBestEffort, w as isMutatingNativeToolItem, x as auditNativeToolName } from "./attempt-client-cleanup-
|
|
8
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
6
|
+
import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, ht as resolveCodexGatewayTimeoutWithGraceMs, q as retainCodexAppServerLiveThread } from "./shared-client-ZXKMsK6f.mjs";
|
|
7
|
+
import { A as itemStatus, D as isSideEffectingNativeToolItem, E as isProjectedNativeToolItem, M as matchesCodexSnapshotTurn, O as itemKind, P as unknownItemStatus, S as auditNativeToolTerminalStatus, T as isNonSuccessItemStatus, j as itemTitle, k as itemName, s as interruptCodexTurnAndWaitBestEffort, w as isMutatingNativeToolItem, x as auditNativeToolName } from "./attempt-client-cleanup-BVtNsTOE.mjs";
|
|
8
|
+
import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
|
|
9
9
|
import { asFiniteNumber, asNonArrayRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeTrimmedStringList, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { asDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -560,6 +560,7 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
560
560
|
this.dependencies = dependencies;
|
|
561
561
|
this.writes = /* @__PURE__ */ new Map();
|
|
562
562
|
this.snapshots = /* @__PURE__ */ new WeakMap();
|
|
563
|
+
this.acknowledged = /* @__PURE__ */ new WeakSet();
|
|
563
564
|
}
|
|
564
565
|
hasWrites(state) {
|
|
565
566
|
return this.writes.has(state);
|
|
@@ -597,7 +598,7 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
597
598
|
}
|
|
598
599
|
record(state, child) {
|
|
599
600
|
const assignment = this.fact(child);
|
|
600
|
-
if (!assignment || !state.assignmentStore || child.nativeCompletionDelivered || child.subscriptionClosed) return;
|
|
601
|
+
if (!assignment || !state.assignmentStore || child.nativeCompletionDelivered || child.completionDeliveryAbandoned || child.subscriptionClosed) return;
|
|
601
602
|
const snapshot = JSON.stringify(assignment);
|
|
602
603
|
if (this.snapshots.get(child) === snapshot) return;
|
|
603
604
|
this.snapshots.set(child, snapshot);
|
|
@@ -612,11 +613,46 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
612
613
|
}
|
|
613
614
|
settle(state, child) {
|
|
614
615
|
const assignment = this.fact(child);
|
|
615
|
-
if (!assignment || !state.assignmentStore || !child.nativeCompletionDelivered && (!child.subscriptionClosed || child.pendingCompletion)) return;
|
|
616
|
+
if (!assignment || !state.assignmentStore || this.acknowledged.has(child) || !child.nativeCompletionDelivered && (!child.subscriptionClosed || child.pendingCompletion)) return;
|
|
616
617
|
this.enqueue(state, async () => {
|
|
617
618
|
await state.assignmentStore?.consume(assignment, () => this.dependencies.assertCurrent(state));
|
|
618
619
|
});
|
|
619
620
|
}
|
|
621
|
+
abandon(state, child, assertCurrent) {
|
|
622
|
+
return this.enqueue(state, async () => {
|
|
623
|
+
const assignment = this.fact(child);
|
|
624
|
+
if (!assignment || !state.assignmentStore || !child.pendingCompletion) return;
|
|
625
|
+
if (!await state.assignmentStore.consume(assignment, () => {
|
|
626
|
+
this.dependencies.assertCurrent(state);
|
|
627
|
+
assertCurrent();
|
|
628
|
+
}, { status: child.pendingCompletion.status })) throw new Error("Undeliverable native assignment was not retired.");
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
async settleNestedCompletion(state, child, assertCurrent) {
|
|
632
|
+
const owner = child.historyOwner;
|
|
633
|
+
if (!owner || owner.parentThreadId === child.nativeParentThreadId || !await this.dependencies.isNativeChildThread(child.nativeParentThreadId)) return false;
|
|
634
|
+
await this.acknowledge(state, child, () => {
|
|
635
|
+
assertCurrent();
|
|
636
|
+
assertHistoryOwnerMatchesRegistration(owner, state.historyOwner, owner.parentThreadId, true);
|
|
637
|
+
});
|
|
638
|
+
child.nativeCompletionDelivered = true;
|
|
639
|
+
child.pendingCompletion = void 0;
|
|
640
|
+
return true;
|
|
641
|
+
}
|
|
642
|
+
acknowledge(state, child, assertCurrent) {
|
|
643
|
+
return this.enqueue(state, async () => {
|
|
644
|
+
const assertAdmission = () => {
|
|
645
|
+
this.dependencies.assertCurrent(state);
|
|
646
|
+
assertCurrent();
|
|
647
|
+
};
|
|
648
|
+
assertAdmission();
|
|
649
|
+
const assignment = this.fact(child);
|
|
650
|
+
if (!assignment || !state.assignmentStore || this.acknowledged.has(child)) return;
|
|
651
|
+
if (!await state.assignmentStore.consume(assignment, assertAdmission)) throw new Error("Native assignment was not acknowledged.");
|
|
652
|
+
this.acknowledged.add(child);
|
|
653
|
+
assertAdmission();
|
|
654
|
+
});
|
|
655
|
+
}
|
|
620
656
|
async restore(state, owner) {
|
|
621
657
|
const store = state.assignmentStore;
|
|
622
658
|
const current = state.historyOwner;
|
|
@@ -628,11 +664,15 @@ var CodexNativeSubagentAssignmentInventory = class {
|
|
|
628
664
|
for (const assignment of store.read()) {
|
|
629
665
|
if (!matchesNativeAssignmentLifecycle(assignment.owner, current)) continue;
|
|
630
666
|
const recovery = await this.dependencies.readHistory(assignment);
|
|
667
|
+
const pending = store.read();
|
|
631
668
|
if (!this.dependencies.isCurrent(state) || !custody.isCurrent()) return;
|
|
632
669
|
store.assertCurrent();
|
|
633
670
|
if (!recovery || recovery.parentThreadId !== assignment.nativeParentThreadId) continue;
|
|
634
|
-
|
|
635
|
-
|
|
671
|
+
const surviving = pending.find((entry) => entry.childThreadId === assignment.childThreadId && entry.nativeParentThreadId === assignment.nativeParentThreadId && matchesNativeAssignmentLifecycle(entry.owner, assignment.owner) && (entry.nativeTurnId === assignment.nativeTurnId && (entry.nativeTurnId !== void 0 || entry.runId === assignment.runId) || recovery.nativeTurnId !== void 0 && entry.nativeTurnId === recovery.nativeTurnId && (assignment.nativeTurnId === void 0 || entry.runId === assignment.runId)));
|
|
672
|
+
if (surviving) {
|
|
673
|
+
await this.dependencies.restore(state, surviving, recovery, custody);
|
|
674
|
+
await this.drain(state);
|
|
675
|
+
}
|
|
636
676
|
}
|
|
637
677
|
} catch (error) {
|
|
638
678
|
embeddedAgentLog.warn("Native pending assignments remain for reconciliation", { error: formatErrorMessage$1(error) });
|
|
@@ -993,7 +1033,18 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
993
1033
|
childState.deliveringCompletion = true;
|
|
994
1034
|
let deferredToForeground = false;
|
|
995
1035
|
try {
|
|
1036
|
+
if (await this.dependencies.settleNestedCompletion(state, childState, () => {
|
|
1037
|
+
if (!this.isCurrent(state, childState) || childState.completionCustody && !childState.completionCustody.isCurrent()) throw new Error("Native completion acknowledgement is no longer current.");
|
|
1038
|
+
})) {
|
|
1039
|
+
this.dependencies.unregisterChild(childState);
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
if (!this.isCurrent(state, childState)) return;
|
|
996
1043
|
if (!this.prepareDelivery(state, childState)) return;
|
|
1044
|
+
if (childState.completionDeliveryAbandoned) {
|
|
1045
|
+
await this.abandon(state, childState);
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
997
1048
|
if (state.owners.size > 0 || !state.completionScope) {
|
|
998
1049
|
deferredToForeground = state.owners.size > 0;
|
|
999
1050
|
return;
|
|
@@ -1028,15 +1079,15 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1028
1079
|
return;
|
|
1029
1080
|
}
|
|
1030
1081
|
if (delivery.recoveryBlocked) {
|
|
1031
|
-
this.
|
|
1082
|
+
await this.abandon(state, childState);
|
|
1032
1083
|
return;
|
|
1033
1084
|
}
|
|
1034
1085
|
if (delivery.recoveryPending) {
|
|
1035
|
-
this.scheduleRetry(childState, delivery.error ?? "requester recovery owns completion", false);
|
|
1086
|
+
await this.scheduleRetry(state, childState, delivery.error ?? "requester recovery owns completion", false);
|
|
1036
1087
|
return;
|
|
1037
1088
|
}
|
|
1038
1089
|
const error = delivery.error ?? "completion delivery did not produce a parent response";
|
|
1039
|
-
this.scheduleRetry(childState, error);
|
|
1090
|
+
await this.scheduleRetry(state, childState, error);
|
|
1040
1091
|
} catch (error) {
|
|
1041
1092
|
if (!this.dependencies.isCurrentChild(childState) || !this.dependencies.isCurrentParent(state) || this.dependencies.isRetiredParent(state)) return;
|
|
1042
1093
|
if (!this.claim(state, childState)) {
|
|
@@ -1044,7 +1095,7 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1044
1095
|
return;
|
|
1045
1096
|
}
|
|
1046
1097
|
const message = formatErrorMessage$1(error);
|
|
1047
|
-
this.scheduleRetry(childState, message);
|
|
1098
|
+
await this.scheduleRetry(state, childState, message, !childState.completionDeliveryAbandoned);
|
|
1048
1099
|
embeddedAgentLog.warn("Failed to deliver Codex native subagent completion", {
|
|
1049
1100
|
parentThreadId: state.parentThreadId,
|
|
1050
1101
|
childThreadId: completion.childThreadId,
|
|
@@ -1107,22 +1158,41 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1107
1158
|
this.dependencies.releaseClientRetentionIfIdle();
|
|
1108
1159
|
return true;
|
|
1109
1160
|
}
|
|
1110
|
-
|
|
1161
|
+
async abandon(state, child) {
|
|
1162
|
+
child.completionDeliveryAbandoned = true;
|
|
1163
|
+
try {
|
|
1164
|
+
await this.dependencies.abandon(state, child, () => {
|
|
1165
|
+
if (child.nativeCompletionDelivered || !this.isCurrent(state, child) || !this.claim(state, child)) throw new Error("Native completion retirement is no longer current.");
|
|
1166
|
+
});
|
|
1167
|
+
this.dependencies.unregisterChild(child);
|
|
1168
|
+
} catch (error) {
|
|
1169
|
+
if (this.isCurrent(state, child) && child.nativeCompletionDelivered) {
|
|
1170
|
+
this.prepareDelivery(state, child);
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
embeddedAgentLog.warn("Native completion retirement remains pending", {
|
|
1174
|
+
childThreadId: child.childThreadId,
|
|
1175
|
+
error: formatErrorMessage$1(error)
|
|
1176
|
+
});
|
|
1177
|
+
await this.scheduleRetry(state, child, formatErrorMessage$1(error), false);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
async scheduleRetry(state, childState, error, chargeAttempt = true) {
|
|
1111
1181
|
if (!childState.pendingCompletion || childState.completionDeliveryTimer || !this.dependencies.isCurrentChild(childState)) return;
|
|
1112
1182
|
if (chargeAttempt && childState.completionDeliveryAttempt >= this.maxRetries) {
|
|
1113
1183
|
embeddedAgentLog.warn("Native subagent completion retries exhausted", {
|
|
1114
1184
|
childThreadId: childState.childThreadId,
|
|
1115
1185
|
error
|
|
1116
1186
|
});
|
|
1117
|
-
this.
|
|
1187
|
+
await this.abandon(state, childState);
|
|
1118
1188
|
return;
|
|
1119
1189
|
}
|
|
1120
1190
|
const delayMs = delayForAttempt(this.retryDelaysMs, chargeAttempt ? childState.completionDeliveryAttempt++ : childState.completionDeliveryAttempt);
|
|
1121
1191
|
childState.completionDeliveryTimer = setTimeout(() => {
|
|
1122
1192
|
childState.completionDeliveryTimer = void 0;
|
|
1123
1193
|
if (!this.dependencies.isCurrentChild(childState)) return;
|
|
1124
|
-
const
|
|
1125
|
-
if (
|
|
1194
|
+
const currentParent = this.dependencies.getParent(childState.parentThreadId);
|
|
1195
|
+
if (currentParent) this.deliverPending(currentParent, childState);
|
|
1126
1196
|
}, delayMs);
|
|
1127
1197
|
childState.completionDeliveryTimer.unref();
|
|
1128
1198
|
}
|
|
@@ -1130,7 +1200,7 @@ var CodexNativeSubagentCompletionDelivery = class {
|
|
|
1130
1200
|
if (childState.completionCustody && !childState.completionCustody.isCurrent()) return false;
|
|
1131
1201
|
const requesterSessionKey = state.requesterSessionKey?.trim();
|
|
1132
1202
|
if (!requesterSessionKey) return true;
|
|
1133
|
-
const key = `${requesterSessionKey}\0${childState.runId}`;
|
|
1203
|
+
const key = childState.deliveryOwnerKey ?? `${requesterSessionKey}\0${childState.nativeTurnId ? codexNativeSubagentRunId(childState.childThreadId, childState.nativeTurnId) : childState.runId}`;
|
|
1134
1204
|
try {
|
|
1135
1205
|
state.assignmentStore?.assertCurrent();
|
|
1136
1206
|
assertHistoryOwnerMatchesRegistration(childState.historyOwner, state.historyOwner, childState.nativeParentThreadId, state.historyOwner !== void 0);
|
|
@@ -1408,6 +1478,10 @@ var CodexNativeSubagentHistoryRecovery = class {
|
|
|
1408
1478
|
itemsView: "full"
|
|
1409
1479
|
}, { timeoutMs: THREAD_READ_TIMEOUT_MS });
|
|
1410
1480
|
}
|
|
1481
|
+
async isNativeChildThread(threadId) {
|
|
1482
|
+
const response = await this.requestThreadRead(threadId, false);
|
|
1483
|
+
return response.thread.id === threadId && Boolean(readThreadParentThreadId(response.thread));
|
|
1484
|
+
}
|
|
1411
1485
|
async read(assignment, options) {
|
|
1412
1486
|
const { childThreadId } = assignment;
|
|
1413
1487
|
const { recordedCompletion } = options;
|
|
@@ -2633,6 +2707,7 @@ var CodexNativeSubagentSubmissionOwner = class {
|
|
|
2633
2707
|
if (!this.isObserving(state, custody) || !this.admitTurn(state, custody.receipt, turn, custody.owner, historyValidated, custody.completionCustody)) return;
|
|
2634
2708
|
custody.phase = "promoting";
|
|
2635
2709
|
if (custody.timer) clearTimeout(custody.timer);
|
|
2710
|
+
custody.release();
|
|
2636
2711
|
}
|
|
2637
2712
|
settleChild(state, child) {
|
|
2638
2713
|
for (const custody of this.pending.get(state)?.values() ?? []) {
|
|
@@ -4582,6 +4657,8 @@ var Monitor = class {
|
|
|
4582
4657
|
isRetiredParent: (state) => this.retiredParentStates.has(state),
|
|
4583
4658
|
getParent: (id) => this.parentStates.get(id),
|
|
4584
4659
|
unregisterChild: (child) => this.unregisterChild(child),
|
|
4660
|
+
abandon: (state, child, assertCurrent) => this.assignments.abandon(state, child, assertCurrent),
|
|
4661
|
+
settleNestedCompletion: (state, child, assertCurrent) => this.assignments.settleNestedCompletion(state, child, assertCurrent),
|
|
4585
4662
|
releaseClientRetentionIfIdle: () => this.releaseClientRetentionIfIdle()
|
|
4586
4663
|
});
|
|
4587
4664
|
this.turnObservation = new CodexNativeSubagentTurnObservation({
|
|
@@ -4697,8 +4774,9 @@ var Monitor = class {
|
|
|
4697
4774
|
revision.release();
|
|
4698
4775
|
}
|
|
4699
4776
|
},
|
|
4777
|
+
isNativeChildThread: async (threadId) => this.knownChildren.has(threadId) || await this.historyRecovery.isNativeChildThread(threadId),
|
|
4700
4778
|
restore: async (state, assignment, recovery, custody) => {
|
|
4701
|
-
const existing = this.childStates.get(assignment.runId);
|
|
4779
|
+
const existing = this.childStates.get(assignment.runId) ?? [...this.childStates.values()].find((child) => assignment.nativeTurnId !== void 0 && child.childThreadId === assignment.childThreadId && child.nativeTurnId === assignment.nativeTurnId && child.nativeParentThreadId === assignment.nativeParentThreadId && child.historyOwner !== void 0 && matchesNativeAssignmentLifecycle(child.historyOwner, assignment.owner));
|
|
4702
4780
|
if (existing) {
|
|
4703
4781
|
const original = this.parentStates.get(existing.parentThreadId);
|
|
4704
4782
|
if (original && original.requesterSessionKey === state.requesterSessionKey && original.historyOwner && state.historyOwner && matchesNativeAssignmentLifecycle(original.historyOwner, state.historyOwner)) original.assignmentStore = state.assignmentStore;
|
|
@@ -4845,6 +4923,9 @@ var Monitor = class {
|
|
|
4845
4923
|
});
|
|
4846
4924
|
if (!capture) return;
|
|
4847
4925
|
try {
|
|
4926
|
+
const known = this.knownChildren.get(request.threadId);
|
|
4927
|
+
const child = known ? this.admitFollowupChild(known, request.threadId) : void 0;
|
|
4928
|
+
if (child?.nativeTurnId === request.turnId && child.settledWithoutCompletion) this.resumeChild(child);
|
|
4848
4929
|
await this.persistModelAssignment(request, capture);
|
|
4849
4930
|
request.signal?.throwIfAborted();
|
|
4850
4931
|
capture.assertCurrent();
|
|
@@ -5018,6 +5099,7 @@ var Monitor = class {
|
|
|
5018
5099
|
childState.settledWithoutCompletion = false;
|
|
5019
5100
|
childState.fallbackCompletion = void 0;
|
|
5020
5101
|
this.releaseClientRetention ??= this.retainClient?.();
|
|
5102
|
+
this.retainParentThreadForChild(childState.parentThreadId);
|
|
5021
5103
|
}
|
|
5022
5104
|
settleResumableChild(childState) {
|
|
5023
5105
|
if (childState.terminal) return;
|
|
@@ -5028,6 +5110,7 @@ var Monitor = class {
|
|
|
5028
5110
|
releaseNativeDirectChild(childState);
|
|
5029
5111
|
releaseNativeModelExecution(childState);
|
|
5030
5112
|
this.recovery.clearRecoveryTimers(childState);
|
|
5113
|
+
this.releaseParentThreadIfChildrenSettled(childState.parentThreadId);
|
|
5031
5114
|
this.releaseClientRetentionIfIdle();
|
|
5032
5115
|
}
|
|
5033
5116
|
async handleChildTurnCompletion(notification, childState) {
|
|
@@ -5201,6 +5284,7 @@ var Monitor = class {
|
|
|
5201
5284
|
this.recovery.markTerminalRevision(childState.childThreadId);
|
|
5202
5285
|
releaseNativeDirectChild(childState);
|
|
5203
5286
|
this.recovery.clearRecoveryTimers(childState);
|
|
5287
|
+
this.releaseParentThreadIfChildrenSettled(state.parentThreadId);
|
|
5204
5288
|
this.applyNativeReceipts(state, childState.deliveryReceipts.record(childState.runId, this.knownChildren.get(childState.childThreadId)?.agentPaths ?? [childState.childThreadId], acceptedCompletion.result));
|
|
5205
5289
|
await this.completionDelivery.deliverPending(state, childState);
|
|
5206
5290
|
}
|
|
@@ -5260,10 +5344,7 @@ var Monitor = class {
|
|
|
5260
5344
|
if (!childState) {
|
|
5261
5345
|
this.updateChildThreadOwnership("claim", childThreadId, this.claimChildThread);
|
|
5262
5346
|
this.releaseClientRetention ??= this.retainClient?.();
|
|
5263
|
-
|
|
5264
|
-
const releaseParentThread = this.retainParentThread?.(parentThreadId);
|
|
5265
|
-
if (releaseParentThread) this.parentThreadRetentions.set(parentThreadId, releaseParentThread);
|
|
5266
|
-
}
|
|
5347
|
+
this.retainParentThreadForChild(parentThreadId);
|
|
5267
5348
|
childState = {
|
|
5268
5349
|
runId,
|
|
5269
5350
|
nativeTurnId: assignment.nativeTurnId,
|
|
@@ -5482,6 +5563,7 @@ var Monitor = class {
|
|
|
5482
5563
|
}
|
|
5483
5564
|
if (!transitioned) claimOwner.onDirectChildAccepted?.();
|
|
5484
5565
|
}
|
|
5566
|
+
this.observeActiveChild(child);
|
|
5485
5567
|
this.admissionCustody.bindEventSink(child);
|
|
5486
5568
|
return child;
|
|
5487
5569
|
}
|
|
@@ -5536,11 +5618,7 @@ var Monitor = class {
|
|
|
5536
5618
|
this.recovery.clearRecoveryTimers(childState);
|
|
5537
5619
|
this.completionDelivery.release(childState);
|
|
5538
5620
|
if (this.childStates.get(childState.runId) === childState) this.childStates.delete(childState.runId);
|
|
5539
|
-
|
|
5540
|
-
const releaseParentThread = this.parentThreadRetentions.get(childState.parentThreadId);
|
|
5541
|
-
this.parentThreadRetentions.delete(childState.parentThreadId);
|
|
5542
|
-
releaseParentThread?.();
|
|
5543
|
-
}
|
|
5621
|
+
this.releaseParentThreadIfChildrenSettled(childState.parentThreadId);
|
|
5544
5622
|
this.recovery.collectThreadStatusRevision(childState.childThreadId);
|
|
5545
5623
|
this.releaseClientRetentionIfIdle();
|
|
5546
5624
|
const state = this.parentStates.get(childState.parentThreadId);
|
|
@@ -5565,6 +5643,17 @@ var Monitor = class {
|
|
|
5565
5643
|
});
|
|
5566
5644
|
});
|
|
5567
5645
|
}
|
|
5646
|
+
retainParentThreadForChild(parentThreadId) {
|
|
5647
|
+
if (this.parentThreadRetentions.has(parentThreadId)) return;
|
|
5648
|
+
const releaseParentThread = this.retainParentThread?.(parentThreadId);
|
|
5649
|
+
if (releaseParentThread) this.parentThreadRetentions.set(parentThreadId, releaseParentThread);
|
|
5650
|
+
}
|
|
5651
|
+
releaseParentThreadIfChildrenSettled(parentThreadId) {
|
|
5652
|
+
for (const childState of this.childStates.values()) if (childState.parentThreadId === parentThreadId && !childState.terminal && !childState.settledWithoutCompletion) return;
|
|
5653
|
+
const releaseParentThread = this.parentThreadRetentions.get(parentThreadId);
|
|
5654
|
+
this.parentThreadRetentions.delete(parentThreadId);
|
|
5655
|
+
releaseParentThread?.();
|
|
5656
|
+
}
|
|
5568
5657
|
releaseClientRetentionIfIdle() {
|
|
5569
5658
|
if ([...this.childStates.values()].some((childState) => !childState.terminal && !childState.settledWithoutCompletion)) return;
|
|
5570
5659
|
this.releaseRetainedClient();
|
|
@@ -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()
|
|
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 =
|
|
182
|
-
|
|
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 (
|
|
188
|
-
|
|
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)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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:
|
|
232
|
+
next: next.length ? {
|
|
197
233
|
version: 1,
|
|
198
|
-
assignments:
|
|
199
|
-
} : void 0
|
|
234
|
+
assignments: next
|
|
235
|
+
} : void 0,
|
|
236
|
+
consumed: params.consume ? existing : void 0
|
|
200
237
|
};
|
|
201
238
|
}
|
|
202
239
|
//#endregion
|
package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-Dna952zv.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as readCodexNativeSubagentHistoryOwner, h as codexNativeSubagentHistoryConnectionFingerprint, r as readNativePendingAssignments, u as readCodexNativeSubagentRunId } from "./native-subagent-pending-assignments-
|
|
2
|
-
import { _ as readStoredCodexAppServerBinding, r as bindingStoreKey } from "./session-binding-record-
|
|
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-
|
|
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-
|
|
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"
|
package/dist/.setup/{node-exec-server.runtime-BS7jsvK-.mjs → node-exec-server.runtime-9IZtsOmo.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as resolveManagedCodexNativeCommand, r as resolveManagedCodexAppServerStartOptions, t as isManagedCodexDesktopCommand } from "./managed-binary-
|
|
2
|
-
import { a as closeCodexAppServerTransportAndWait, t as createStdioTransport } from "./transport-stdio-
|
|
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-
|
|
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-
|
|
4
|
-
import { i as hasCodexSource, n as defaultCodexHome, o as readJsonObject, r as discoverCodexSource, s as sanitizeName, t as codexPluginMigrationSubscriptionWarning } from "./source-
|
|
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-Iusn97ly.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-
|
|
101
|
-
const { resolveManagedCodexPackageEntrypoint, resolveManagedCodexNativeCommand } = await import("./managed-binary-
|
|
100
|
+
const { CodexAppServerClient } = await import("./client-DcTISXe3.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-
|
|
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-
|
|
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-
|
|
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";
|
package/dist/.setup/{plugin-metadata-cache-Q4ZFn6UH.mjs → plugin-metadata-cache-C-LRxilF.mjs}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
2
2
|
import { o as resolveCodexComputerUseConfig } from "./config-options-CzyWLTJt.mjs";
|
|
3
|
-
import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-
|
|
3
|
+
import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-Ckgvm_4V.mjs";
|
|
4
4
|
import { n as describeControlFailure } from "./capabilities-B3WEZl4e.mjs";
|
|
5
|
-
import { r as requestCodexAppServerClientJson } from "./request-
|
|
6
|
-
import "./config-
|
|
7
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
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-
|
|
9
|
-
import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-
|
|
10
|
-
import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-
|
|
5
|
+
import { r as requestCodexAppServerClientJson } from "./request-CWERwKIL.mjs";
|
|
6
|
+
import "./config-DqmrqI23.mjs";
|
|
7
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.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-ZXKMsK6f.mjs";
|
|
9
|
+
import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-DcTISXe3.mjs";
|
|
10
|
+
import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-BVtNsTOE.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-
|
|
14
|
+
const { discoverCodexSource, hasCodexSource } = await import("./source-Iusn97ly.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-
|
|
32
|
+
const { buildCodexMigrationPlan } = await import("./plan-Cwp_21m-.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-
|
|
38
|
+
return import("./apply-CxwOGLd_.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
|
|
39
39
|
},
|
|
40
40
|
async apply(ctx, plan) {
|
|
41
|
-
const { applyCodexMigrationPlan } = await import("./apply-
|
|
41
|
+
const { applyCodexMigrationPlan } = await import("./apply-CxwOGLd_.mjs");
|
|
42
42
|
return await applyCodexMigrationPlan({
|
|
43
43
|
ctx,
|
|
44
44
|
plan,
|
package/dist/.setup/{provider-capabilities-ByhBukaD.mjs → provider-capabilities-DBs9l8oL.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-
|
|
2
|
-
import { dt as normalizeCodexDynamicToolName } from "./thread-requests-
|
|
1
|
+
import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-ZXKMsK6f.mjs";
|
|
2
|
+
import { dt as normalizeCodexDynamicToolName } from "./thread-requests-y_MnVuWC.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-
|
|
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-
|
|
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-
|
|
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-
|
|
183
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-
|
|
182
|
+
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-OIYEmTRF.mjs").then((n) => n.r);
|
|
183
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-ZXKMsK6f.mjs").then((n) => n.v);
|
|
184
184
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
185
185
|
errorPhase = void 0;
|
|
186
186
|
activePhase = "prepare";
|