@openclaw/codex 2026.10.7 → 2026.10.9
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/README.md +2 -0
- package/dist/.setup/{account-usage-runtime-gzHf_Qtb.mjs → account-usage-runtime-DAt_3QG0.mjs} +3 -3
- package/dist/.setup/{app-server-policy-V8zuN8q_.mjs → app-server-policy-CF-JwGUD.mjs} +1 -1
- package/dist/.setup/{apply-BaBl0hiG.mjs → apply-DmhHTC5c.mjs} +8 -8
- package/dist/.setup/{attempt-client-cleanup-jWVRH043.mjs → attempt-client-cleanup-DQBa7iiq.mjs} +5 -5
- package/dist/.setup/{attempt-workspace-context-BkA0W8Jy.mjs → attempt-workspace-context-EAeScFrg.mjs} +1 -1
- package/dist/.setup/{auth-binding-BFTkrP_b.mjs → auth-binding-D1TJwzWf.mjs} +1 -1
- package/dist/.setup/{auth-cache-key-DrieYJUQ.mjs → auth-cache-key-KogLtj0t.mjs} +3 -3
- package/dist/.setup/{binding-connection-C0t9TBX_.mjs → binding-connection-BIo1-hoT.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-Wdm5G_bw.mjs → binding-connection.runtime-C5yDsKBQ.mjs} +1 -1
- package/dist/.setup/{bounded-turn-s9yVsxaM.mjs → bounded-turn-B91suzbV.mjs} +11 -11
- package/dist/.setup/{bounded-turn-isolation-CIQJykuM.mjs → bounded-turn-isolation-BRNgfoRl.mjs} +2 -2
- package/dist/.setup/{build-state-B5mKL-in.mjs → build-state-CvGKuaeP.mjs} +1 -1
- package/dist/.setup/{client-BM97zH3z.mjs → client-CafYfF2n.mjs} +311 -24
- package/dist/.setup/{command-dispatch-DsaWfzET.mjs → command-dispatch-C2tNChTq.mjs} +1 -1
- package/dist/.setup/{command-handlers-zgDE_J40.mjs → command-handlers-yb5vwwrx.mjs} +22 -22
- package/dist/.setup/{command-rpc-CAG1xrqm.mjs → command-rpc-CZmpQF4z.mjs} +11 -11
- package/dist/.setup/{compact-BZK-e5zD.mjs → compact-CeD2d2_k.mjs} +13 -13
- package/dist/.setup/{computer-use-CZhx4nNO.mjs → computer-use-C4HhkAcj.mjs} +7 -7
- package/dist/.setup/{config-LQemoqTL.mjs → config-d0gOFYEk.mjs} +2 -2
- package/dist/.setup/{config-runtime-DGB1-VbB.mjs → config-runtime-BUH-IDVE.mjs} +1 -1
- package/dist/.setup/{conversation-binding-qGuQR4jw.mjs → conversation-binding-HX8U8A3K.mjs} +15 -15
- package/dist/.setup/{conversation-binding-data-GRGSgAro.mjs → conversation-binding-data-BqzGWkPW.mjs} +1 -1
- package/dist/.setup/{conversation-control-BtPxevoK.mjs → conversation-control-D5qVEey9.mjs} +3 -3
- package/dist/.setup/{doctor-start-options-C28ek2hD.mjs → doctor-start-options-DyLrwtq-.mjs} +3 -3
- package/dist/.setup/{dynamic-tool-build-Dp4v52Kl.mjs → dynamic-tool-build-BPkHfpul.mjs} +3 -3
- package/dist/.setup/{dynamic-tools-C1Egdhrx.mjs → dynamic-tools-CCezdz5n.mjs} +8 -8
- package/dist/.setup/{effective-mcp-catalog-BNwgItdW.mjs → effective-mcp-catalog-SjTJ-F2i.mjs} +6 -6
- package/dist/.setup/{ephemeral-turn-DeppK8zz.mjs → ephemeral-turn-CgKjGBaW.mjs} +2 -2
- package/dist/.setup/{inference-proxy-DSnaS-uS.mjs → inference-proxy-BZgN5W8m.mjs} +3 -3
- package/dist/.setup/{isolated-completion-BUS9Mqfm.mjs → isolated-completion-C5ifbI0F.mjs} +5 -5
- package/dist/.setup/{managed-binary-DwC9wxch.mjs → managed-binary-Boj8_lWV.mjs} +1 -1
- package/dist/.setup/{mcp-app-session-preparation-D9F1O5si.mjs → mcp-app-session-preparation-hnw_eGnR.mjs} +8 -8
- package/dist/.setup/{model-catalog-BBg4thof.mjs → model-catalog-BO573-NN.mjs} +7 -7
- package/dist/.setup/{models-B65GHU4g.mjs → models-Dw0qUZl3.mjs} +3 -3
- package/dist/.setup/native-assignment-repair-BjS4uyQr.mjs +162 -0
- package/dist/.setup/{native-auth-CveRfTpz.mjs → native-auth-TAGxZP-r.mjs} +3 -3
- package/dist/.setup/{native-hook-relay-Ctyky2Qt.mjs → native-hook-relay-CwkDznGH.mjs} +4 -4
- package/dist/.setup/{native-mcp-app-DprMGBqj.mjs → native-mcp-app-B7N--ols.mjs} +5 -5
- package/dist/.setup/{native-skill-isolation-C4XYLm33.mjs → native-skill-isolation-0pEyxLRX.mjs} +3 -3
- package/dist/.setup/{native-subagent-monitor-CJaIve3h.mjs → native-subagent-monitor-D_tvjJxa.mjs} +161 -53
- package/dist/.setup/{native-subagent-pending-assignments-DmVhedNs.mjs → native-subagent-pending-assignments-BAOzwy85.mjs} +49 -11
- package/dist/.setup/{native-task-assignments-DYL9uxNe.mjs → native-task-assignments-Dap5NqiR.mjs} +4 -4
- package/dist/.setup/{node-cli-sessions-BxVYZNuY.mjs → node-cli-sessions-BQNAFnCa.mjs} +2 -2
- package/dist/.setup/{node-exec-server.runtime-8RehgPdQ.mjs → node-exec-server.runtime-B-4ogz9C.mjs} +2 -2
- package/dist/.setup/{plan-GqWF4XGA.mjs → plan-BE7gWwkn.mjs} +5 -5
- package/dist/.setup/{plugin-activation-BgfNFH2L.mjs → plugin-activation-Dbq2m2gh.mjs} +2 -2
- package/dist/.setup/{plugin-approval-roundtrip-x7UI_uqk.mjs → plugin-approval-roundtrip-ts-2EU8i.mjs} +1 -1
- package/dist/.setup/{plugin-inventory-OhiCoyPH.mjs → plugin-inventory-CZLnMaxf.mjs} +1 -1
- package/dist/.setup/{project-doc-thread-config-D_sWbxFR.mjs → project-doc-thread-config-BYFXSVGk.mjs} +3 -3
- package/dist/.setup/{provider-Bi9QCsg1.mjs → provider-D8R-IBhv.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-BCZeV7xZ.mjs → provider-capabilities-C4ENlstc.mjs} +10 -3
- package/dist/.setup/{request-XC1RG34l.mjs → request-ufWmJNN1.mjs} +5 -5
- package/dist/.setup/{run-attempt-8U2CrqjW.mjs → run-attempt-CGHsrfPB.mjs} +131 -60
- package/dist/.setup/{runtime-artifact-CCPLKFGR.mjs → runtime-artifact-Ch7fCcgJ.mjs} +3 -3
- package/dist/.setup/{runtime-artifact-connection-dFoSOKy7.mjs → runtime-artifact-connection-C3ootnwd.mjs} +2 -2
- package/dist/.setup/{sandbox-guard-Cf9XMRrg.mjs → sandbox-guard-CwOc36_1.mjs} +1 -1
- package/dist/.setup/{session-binding-BDnNz-Co.mjs → session-binding-_RE7vtVN.mjs} +38 -12
- package/dist/.setup/{session-binding-record-C2kDBZhx.mjs → session-binding-record-O62ZRFhy.mjs} +2 -2
- package/dist/.setup/{session-binding-sidecars-DijNZb31.mjs → session-binding-sidecars-CAHe3enw.mjs} +1 -1
- package/dist/.setup/{session-catalog-adoption-Cl6fHxS5.mjs → session-catalog-adoption-DuChFASf.mjs} +5 -5
- package/dist/.setup/{session-catalog-archive-CUU7jEkO.mjs → session-catalog-archive-Bs5cP3zm.mjs} +5 -5
- package/dist/.setup/{session-catalog-events-CpEyDv0D.mjs → session-catalog-events-DnLfF9Xo.mjs} +4 -4
- package/dist/.setup/{session-catalog-index-DpYCf1-8.mjs → session-catalog-index-Bbph2EwS.mjs} +8 -8
- package/dist/.setup/{session-catalog-index-order-B30rjUEJ.mjs → session-catalog-index-order-CTSrDiE1.mjs} +1 -1
- package/dist/.setup/{session-catalog-limits-Daqt3JLk.mjs → session-catalog-limits-9Ay62KQ0.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-SJyGz02j.mjs → session-catalog-list-request-uKKvUIoN.mjs} +3 -3
- package/dist/.setup/{session-catalog-native-projection-BYV0ICja.mjs → session-catalog-native-projection-CHtG8DwY.mjs} +4 -4
- package/dist/.setup/{session-catalog-node-adoption-D11N0CMr.mjs → session-catalog-node-adoption-BjYvYtAd.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-Ct62GeL1.mjs → session-catalog-node-continue-BEI9D3ev.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-lookup-DQVe6vhs.mjs → session-catalog-node-lookup-CBomNvUN.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-B4OyhylL.mjs → session-catalog-parsing-DmZmgRou.mjs} +1 -1
- package/dist/.setup/{session-catalog-projection-B0IyXrHt.mjs → session-catalog-projection-BgENBUS2.mjs} +4 -4
- package/dist/.setup/{session-catalog-source-CfIBVrbT.mjs → session-catalog-source-qHe5r9i_.mjs} +1 -1
- package/dist/.setup/{session-cli-BoJSZfGd.mjs → session-cli-CKzNw4c4.mjs} +2 -2
- package/dist/.setup/{session-history-import-DgwRu2eD.mjs → session-history-import-BhOzqhyI.mjs} +4 -4
- package/dist/.setup/{session-history.worker-DJQfek5p.mjs → session-history.worker-D2v5yRcB.mjs} +5 -3
- package/dist/.setup/{session-initialization-BjVtsTzi.mjs → session-initialization-Bwe0Bikj.mjs} +1 -1
- package/dist/.setup/{session-retirement-CKIS7jFv.mjs → session-retirement-BdHruV7q.mjs} +6 -6
- package/dist/.setup/{settled-turn-finalizer-CnIWbqN7.mjs → settled-turn-finalizer-Ca_Qd_9g.mjs} +5 -5
- package/dist/.setup/{shared-client-AdQX0Tdq.mjs → shared-client-C0gEybHs.mjs} +15 -13
- package/dist/.setup/{side-question-ZVehuPZn.mjs → side-question-Nn6D01tP.mjs} +17 -17
- package/dist/.setup/{source-BszpKEvi.mjs → source-CgYvv2h-.mjs} +4 -4
- package/dist/.setup/{thread-lifecycle-run-DezS4UNT.mjs → thread-lifecycle-run-BHM-L-56.mjs} +40 -19
- package/dist/.setup/{thread-ownership-OXzPB_RV.mjs → thread-ownership-BJpeo5Xk.mjs} +4 -4
- package/dist/.setup/{thread-policy-Dp4CQjdL.mjs → thread-policy-BlzkKVno.mjs} +3 -3
- package/dist/.setup/{thread-requests-DjyDmCo4.mjs → thread-requests-pX9_RXpU.mjs} +2 -2
- package/dist/.setup/{thread-resume-8YKfRoX6.mjs → thread-resume-BDd8b3E_.mjs} +4 -4
- package/dist/.setup/{transcript-mirror-DVEzdOs0.mjs → transcript-mirror-CPdcVWTn.mjs} +1 -1
- package/dist/.setup/{transport-stdio-lgeKKHyw.mjs → transport-stdio-BsXQmXll.mjs} +1 -1
- package/dist/.setup/{transport-websocket-CEBjEtFP.mjs → transport-websocket-B5mq2Iq2.mjs} +1 -1
- package/dist/.setup/{turn-router-DnfbVPvu.mjs → turn-router-8CkGlezp.mjs} +2 -2
- package/dist/.setup/{upstream-session-fork-BhADVCrb.mjs → upstream-session-fork-BW_UbivO.mjs} +17 -17
- package/dist/.setup/{usage-BoTUkAoJ.mjs → usage-fX3ctGZb.mjs} +3 -3
- package/dist/.setup/{usage-limit-error-EoQ7Vl2A.mjs → usage-limit-error-DycN7mED.mjs} +1 -1
- package/dist/.setup/{web-search-provider.runtime-Cc6vN-2C.mjs → web-search-provider.runtime-DEBVJch2.mjs} +2 -2
- package/dist/.setup/{workspace-write-sandbox-probe-DvfWTvuR.mjs → workspace-write-sandbox-probe-DB6Y3XLX.mjs} +2 -2
- package/dist/.source-module-urls/0560e3825cf513bbe9e095a85951c1215dfced0c1e581c5f32b007a3e759636e.json +1 -0
- package/dist/.source-module-urls/61f8912a558f2bfc87dcddd651d7f5d3cf17ba02e1e5359b050bf670840c0e0e.json +1 -0
- package/dist/api.js +3 -3
- package/dist/catalog-page.worker.js +340 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +14 -5
- package/dist/harness.js +20 -20
- package/dist/index.js +68 -58
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +4 -2
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +5 -0
- package/package.json +4 -4
- package/dist/.setup/client-catalog-response-DhB266B_.mjs +0 -310
|
@@ -3,9 +3,9 @@ import { l as fingerprintCodexPolicy } from "./config-security-DpkGNy5T.mjs";
|
|
|
3
3
|
import { f as resolveCodexPluginsPolicy } from "./config-parsing-CVK2Q463.mjs";
|
|
4
4
|
import { u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-CZmH25Xq.mjs";
|
|
5
5
|
import { a as defaultCodexAppInventoryCache, i as CodexAppInventoryCache, o as serializeCodexAppInventoryError, s as codexAppIdentityKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
|
|
6
|
-
import { l as toCodexPluginOwnedAccountApp, s as readCodexPluginInventory, t as createCodexAppInventoryRequest } from "./plugin-inventory-
|
|
7
|
-
import "./config-
|
|
8
|
-
import { t as ensureCodexPluginActivation } from "./plugin-activation-
|
|
6
|
+
import { l as toCodexPluginOwnedAccountApp, s as readCodexPluginInventory, t as createCodexAppInventoryRequest } from "./plugin-inventory-CZLnMaxf.mjs";
|
|
7
|
+
import "./config-d0gOFYEk.mjs";
|
|
8
|
+
import { t as ensureCodexPluginActivation } from "./plugin-activation-Dbq2m2gh.mjs";
|
|
9
9
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
10
10
|
//#region extensions/codex/src/app-server/plugin-app-approval-overrides.ts
|
|
11
11
|
/** Projects ask approvals into the native session layer without changing saved settings. */
|
|
@@ -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-CgYvv2h-.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-BE7gWwkn.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-DmhHTC5c.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-DmhHTC5c.mjs");
|
|
42
42
|
return await applyCodexMigrationPlan({
|
|
43
43
|
ctx,
|
|
44
44
|
plan,
|
package/dist/.setup/{provider-capabilities-BCZeV7xZ.mjs → provider-capabilities-C4ENlstc.mjs}
RENAMED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-
|
|
1
|
+
import { h as releaseLeasedSharedCodexAppServerClient, s as createIsolatedCodexAppServerClient } from "./shared-client-C0gEybHs.mjs";
|
|
2
|
+
//#region extensions/codex/src/app-server/probe-client.ts
|
|
3
|
+
/** Temporary probes own isolated processes but only borrow shared-client leases. */
|
|
4
|
+
async function releaseCodexProbeClient(client, factory) {
|
|
5
|
+
if (factory === createIsolatedCodexAppServerClient) await client.closeAndWait();
|
|
6
|
+
else releaseLeasedSharedCodexAppServerClient(client);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
2
9
|
//#region extensions/codex/src/app-server/provider-capabilities.ts
|
|
3
10
|
function resolveOverriddenProviderWebSearchSupport(modelProviderOverride) {
|
|
4
11
|
const provider = modelProviderOverride?.trim().toLowerCase();
|
|
@@ -43,8 +50,8 @@ async function resolveCodexProviderWebSearchSupport(params) {
|
|
|
43
50
|
} catch {
|
|
44
51
|
return "unknown";
|
|
45
52
|
} finally {
|
|
46
|
-
if (client)
|
|
53
|
+
if (client) await releaseCodexProbeClient(client, params.clientFactory);
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
56
|
//#endregion
|
|
50
|
-
export { resolveCodexProviderWebSearchSupportForClient as n, resolveCodexProviderWebSearchSupport as t };
|
|
57
|
+
export { resolveCodexProviderWebSearchSupportForClient as n, releaseCodexProbeClient as r, resolveCodexProviderWebSearchSupport as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
|
|
2
2
|
import { t as CODEX_CONTROL_METHODS } from "./capabilities-DbOzOglY.mjs";
|
|
3
3
|
import { i as withTimeout$1, r as withAbortableTimeout } from "./timeout-D0mEWSGG.mjs";
|
|
4
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
4
|
+
import { t as __exportAll } from "./session-binding-sidecars-CAHe3enw.mjs";
|
|
5
5
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-registration";
|
|
6
6
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
7
7
|
import { areDiagnosticsEnabledForProcess } from "openclaw/plugin-sdk/diagnostic-runtime";
|
|
@@ -164,7 +164,7 @@ async function requestCodexAppServerClientJson(params) {
|
|
|
164
164
|
let phase = "prepare";
|
|
165
165
|
observeControl(params.controlObservation, phase);
|
|
166
166
|
try {
|
|
167
|
-
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
167
|
+
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-CwOc36_1.mjs").then((n) => n.r);
|
|
168
168
|
const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock(params);
|
|
169
169
|
if (sandboxBlock) throw new Error(sandboxBlock);
|
|
170
170
|
const timeoutMs = params.timeoutMs ?? 6e4;
|
|
@@ -188,7 +188,7 @@ async function requestCodexAppServerClientJson(params) {
|
|
|
188
188
|
}
|
|
189
189
|
async function requestCodexAppServerJson(params) {
|
|
190
190
|
observeControl(params.controlObservation, "prepare");
|
|
191
|
-
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
191
|
+
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-CwOc36_1.mjs").then((n) => n.r);
|
|
192
192
|
const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock(params);
|
|
193
193
|
if (sandboxBlock) throw new Error(sandboxBlock);
|
|
194
194
|
return await withCodexAppServerJsonClient({
|
|
@@ -292,8 +292,8 @@ async function withCodexAppServerJsonClient(params, run) {
|
|
|
292
292
|
timeoutMs,
|
|
293
293
|
timeoutMessage,
|
|
294
294
|
promise: (async () => {
|
|
295
|
-
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
296
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-
|
|
295
|
+
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-CwOc36_1.mjs").then((n) => n.r);
|
|
296
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-C0gEybHs.mjs").then((n) => n.v);
|
|
297
297
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
298
298
|
errorPhase = void 0;
|
|
299
299
|
setPhase("prepare");
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { n as readCodexRuntimeModelId } from "./model-runtime-BdqzOMkU.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as createCodexNativeSubagentHistoryOwner } from "./native-subagent-pending-assignments-BAOzwy85.mjs";
|
|
3
|
+
import { D as toCodexDynamicToolProgressResponse, E as resolveDynamicToolCallTimeoutMs, L as resolveCodexAppServerClientInstanceId, M as readCodexAppServerWarningMessage, O as toCodexDynamicToolProtocolResponse, P as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, l as CodexServerRequestResolvedError, o as isCodexAppServerIndeterminateTransportError, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, x as readCodexTurnCompletedNotification, y as readCodexDynamicToolCallParams } from "./client-CafYfF2n.mjs";
|
|
3
4
|
import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
|
|
4
|
-
import { i as matchesCodexNativeSubagentSubmissionBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-
|
|
5
|
-
import { n as defineCodexBuildState } from "./build-state-
|
|
5
|
+
import { i as matchesCodexNativeSubagentSubmissionBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-O62ZRFhy.mjs";
|
|
6
|
+
import { n as defineCodexBuildState } from "./build-state-CvGKuaeP.mjs";
|
|
6
7
|
import { c as withMcpElicitationsApprovalPolicy, d as readCodexRequirementsToml, n as hasCodexMcpToolApprovalOverrides, s as shouldAutoApproveCodexAppServerApprovals } from "./config-security-DpkGNy5T.mjs";
|
|
7
8
|
import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, f as resolveCodexPluginsPolicy, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-CVK2Q463.mjs";
|
|
8
9
|
import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
9
10
|
import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
10
11
|
import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext, o as resolveCodexComputerUseConfig } from "./config-options-CZmH25Xq.mjs";
|
|
11
|
-
import { c as resolveCodexAppServerPreparedApiKeyCacheKey, g as observeAcquire, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-
|
|
12
|
+
import { c as resolveCodexAppServerPreparedApiKeyCacheKey, g as observeAcquire, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-KogLtj0t.mjs";
|
|
12
13
|
import { o as formatCodexDisplayText } from "./command-formatters-xW9KpoSZ.mjs";
|
|
13
14
|
import { a as codexPrewriteRejectionCause, i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
|
|
14
15
|
import { n as waitForPromiseOrAbort } from "./timeout-D0mEWSGG.mjs";
|
|
@@ -16,50 +17,49 @@ import { t as readCodexAsyncQuestions } from "./async-questions-DdhOCwGi.mjs";
|
|
|
16
17
|
import { i as readCodexProviderRefusal, n as extractRawResponseItemText, o as readItem, r as readCodexErrorNotificationMessage, s as readNullableString } from "./event-projector-values-CLvG1Hil.mjs";
|
|
17
18
|
import { i as readMirrorIdentity, n as attachCodexMirrorIdentity, t as attachCodexAssistantItemIds } from "./upstream-prompt-provenance-Ccd9MFRJ.mjs";
|
|
18
19
|
import { n as buildCodexAppServerRuntimeFingerprint, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
|
|
19
|
-
import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-
|
|
20
|
-
import { n as requestCodexAppServerClientJson } from "./request-
|
|
21
|
-
import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-
|
|
20
|
+
import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-BIo1-hoT.mjs";
|
|
21
|
+
import { n as requestCodexAppServerClientJson } from "./request-ufWmJNN1.mjs";
|
|
22
|
+
import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-d0gOFYEk.mjs";
|
|
22
23
|
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, u as resolveProjectionPromptBudgetTokens } from "./context-engine-projection-ps-yn_ci.mjs";
|
|
23
24
|
import { a as buildCodexMirrorIdempotencyKey, i as buildCodexMirrorDedupeIdentity, s as hasCodexMirrorOrigin, t as applyCodexTranscriptTaint } from "./transcript-mirror-attestation-BzUXnrvv.mjs";
|
|
24
25
|
import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-BO6i_pfk.mjs";
|
|
25
26
|
import { i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-CgHQ8Vot.mjs";
|
|
26
|
-
import { E as isCodexContextRestartSelectionChangedError, G as protectCodexAppServerLiveThread, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, Q as readRecentCodexRateLimits, W as prepareCodexWorkspaceReferences, Z as readCodexRateLimitsRevision, _ as retainSharedCodexAppServerClientIfCurrent, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, at as resolveCodexAppServerPreparedAuthHandoff, c as getLeasedSharedCodexAppServerClient, f as readCodexAppServerClientDesktopGenerationFingerprint, h as releaseLeasedSharedCodexAppServerClient, ht as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, i as clearSharedCodexAppServerClientIfCurrent, it as resolveCodexAppServerAuthAccountCacheKey, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, mt as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, pt as CodexAppServerStartupError, s as createIsolatedCodexAppServerClient, u as isCodexAppServerStartSelectionChangedError, vt as resolveCodexStartupTimeoutMs, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED, yt as withCodexStartupTimeout } from "./shared-client-
|
|
27
|
+
import { E as isCodexContextRestartSelectionChangedError, G as protectCodexAppServerLiveThread, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, Q as readRecentCodexRateLimits, W as prepareCodexWorkspaceReferences, Z as readCodexRateLimitsRevision, _ as retainSharedCodexAppServerClientIfCurrent, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, at as resolveCodexAppServerPreparedAuthHandoff, c as getLeasedSharedCodexAppServerClient, f as readCodexAppServerClientDesktopGenerationFingerprint, h as releaseLeasedSharedCodexAppServerClient, ht as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, i as clearSharedCodexAppServerClientIfCurrent, it as resolveCodexAppServerAuthAccountCacheKey, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, mt as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, pt as CodexAppServerStartupError, s as createIsolatedCodexAppServerClient, u as isCodexAppServerStartSelectionChangedError, vt as resolveCodexStartupTimeoutMs, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED, yt as withCodexStartupTimeout } from "./shared-client-C0gEybHs.mjs";
|
|
27
28
|
import { a as isCodexResponsesOAuthRun, r as isCodexResponsesOAuth } from "./responses-oauth-twnuTaAa.mjs";
|
|
28
|
-
import {
|
|
29
|
-
import { n as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BFTkrP_b.mjs";
|
|
29
|
+
import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-B5mq2Iq2.mjs";
|
|
30
|
+
import { S as shouldClearTerminalPresentationForNativeItem, _ as itemName, a as isCodexNotificationForTurn, b as matchesCodexSnapshotTurn, i as CodexProjectionDiagnostics, n as getCodexAppServerTurnRouter, o as readCodexNotificationScope, s as readCodexNotificationThreadId, t as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, x as shouldAdvancePersistableAssistantBarrier } from "./turn-router-8CkGlezp.mjs";
|
|
31
|
+
import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as interruptCodexTurnAndWaitBestEffort, u as shouldRetireCodexStartupClient } from "./attempt-client-cleanup-DQBa7iiq.mjs";
|
|
32
|
+
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-D1TJwzWf.mjs";
|
|
33
33
|
import { a as isRawFunctionToolOutputCompletionNotification, c as readRawResponseToolCallId, i as isCodexTurnAbortMarkerNotification, l as updateActiveTurnItemIds, o as isTerminalTurnStatus, r as completePendingOpenClawDynamicToolNotification, s as readCodexNotificationItem, t as CodexUsageProjection } from "./event-projector-usage-BpKfdoTm.mjs";
|
|
34
|
-
import { n as listAllCodexAppServerModels } from "./models-
|
|
35
|
-
import { d as mergeCodexThreadConfigs } from "./project-doc-thread-config-
|
|
36
|
-
import { B as resolveCodexDynamicToolsLoadingForRuntime, L as isSystemAgentOnlyCodexDynamicToolAllowlist, P as filterCodexDynamicTools, V as joinPresentSections, _ as buildDeveloperInstructions, b as codexDynamicToolsFingerprint, h as resolveCodexWebSearchPlan, k as stabilizeJsonValue, l as isCodexNativeDelegationDisabledForRun, v as areCodexDynamicToolFingerprintsCompatible, w as fingerprintJsonObject, x as codexLegacyDynamicToolsFingerprint } from "./thread-requests-
|
|
37
|
-
import { i as resolveCodexSessionBinding, n as createCodexSessionGenerationSupersededError, t as clearCodexBindingForClient } from "./session-binding-
|
|
34
|
+
import { n as listAllCodexAppServerModels } from "./models-Dw0qUZl3.mjs";
|
|
35
|
+
import { d as mergeCodexThreadConfigs } from "./project-doc-thread-config-BYFXSVGk.mjs";
|
|
36
|
+
import { B as resolveCodexDynamicToolsLoadingForRuntime, L as isSystemAgentOnlyCodexDynamicToolAllowlist, P as filterCodexDynamicTools, V as joinPresentSections, _ as buildDeveloperInstructions, b as codexDynamicToolsFingerprint, h as resolveCodexWebSearchPlan, k as stabilizeJsonValue, l as isCodexNativeDelegationDisabledForRun, v as areCodexDynamicToolFingerprintsCompatible, w as fingerprintJsonObject, x as codexLegacyDynamicToolsFingerprint } from "./thread-requests-pX9_RXpU.mjs";
|
|
37
|
+
import { i as resolveCodexSessionBinding, n as createCodexSessionGenerationSupersededError, t as clearCodexBindingForClient } from "./session-binding-_RE7vtVN.mjs";
|
|
38
38
|
import { i as resolveCodexAppServerThreadModelSelection } from "./thread-model-selection-DcVebr8N.mjs";
|
|
39
|
-
import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-
|
|
40
|
-
import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
39
|
+
import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-DycN7mED.mjs";
|
|
40
|
+
import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-BJpeo5Xk.mjs";
|
|
41
41
|
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
|
|
42
|
-
import { a as CodexToolTranscriptProjection, c as isCodexCommandBearingToolCall, d as sanitizeCodexToolArguments, i as emitCodexAgentEvent, l as resolveCodexToolProgressDetailMode, o as CodexToolProgressProjection, r as CodexEventProjection, s as shouldEmitTranscriptToolProgress, t as codexNativeSubagentMonitorRuntime, u as sanitizeCodexAgentEventRecord } from "./native-subagent-monitor-
|
|
43
|
-
import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-
|
|
44
|
-
import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-
|
|
42
|
+
import { a as CodexToolTranscriptProjection, c as isCodexCommandBearingToolCall, d as sanitizeCodexToolArguments, i as emitCodexAgentEvent, l as resolveCodexToolProgressDetailMode, o as CodexToolProgressProjection, r as CodexEventProjection, s as shouldEmitTranscriptToolProgress, t as codexNativeSubagentMonitorRuntime, u as sanitizeCodexAgentEventRecord } from "./native-subagent-monitor-D_tvjJxa.mjs";
|
|
43
|
+
import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-ts-2EU8i.mjs";
|
|
44
|
+
import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-BlzkKVno.mjs";
|
|
45
45
|
import { t as attemptTerminal } from "./attempt-terminal-sZutF0WY.mjs";
|
|
46
46
|
import { a as runCodexAgentEndHook, c as withCodexAppServerFastModeServiceTier, i as reportCodexBackgroundCleanupFailure, n as ensureCodexWorkspaceDirOnce, o as runCodexCleanupStep, r as estimateCodexAppServerProjectedTurnTokens, s as shouldKeepCodexSharedAbortOpen, t as emitCodexAppServerEvent } from "./run-attempt-lifecycle-DN-ATDp9.mjs";
|
|
47
47
|
import { t as CODEX_INFERENCE_GENERATION_KEY } from "./inference-metadata-DCvcG_N_.mjs";
|
|
48
48
|
import "./inference-context-DNlGwzwy.mjs";
|
|
49
49
|
import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-CLMKN4x-.mjs";
|
|
50
|
-
import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, i as resolveCodexAppServerHookChannelId, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, p as mapCodexAppServerRemoteWorkspacePath, r as resolveCodexAppServerExecutionCwd, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools, u as shouldWarnCodexDynamicToolBuildStageSummary } from "./dynamic-tool-build-
|
|
51
|
-
import { a as buildCodexNativeHookRelayDisabledConfig, d as scheduleCodexNativeHookRelayUnregister, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed, s as createCodexNativeHookRelay, t as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-
|
|
52
|
-
import { a as prepareCodexPluginThreadConfigStartupProvider, c as buildLegacyScheduledCodexAppRecoveryPrompt, d as resolveScheduledCodexAppCreatorCaptureDecision, i as isContextEngineBindingCompatible, l as buildScheduledCodexAppServerConnectionIdentity, n as isCodexAppServerProfilerEnabled, o as resolveCodexPluginThreadConfigStartupPolicy, r as buildContextEngineBinding, s as assertScheduledCodexAppAuthorityRuntime, t as startOrResumeThread, u as captureScheduledCodexAppAuthority } from "./thread-lifecycle-run-
|
|
50
|
+
import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, i as resolveCodexAppServerHookChannelId, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, p as mapCodexAppServerRemoteWorkspacePath, r as resolveCodexAppServerExecutionCwd, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools, u as shouldWarnCodexDynamicToolBuildStageSummary } from "./dynamic-tool-build-BPkHfpul.mjs";
|
|
51
|
+
import { a as buildCodexNativeHookRelayDisabledConfig, d as scheduleCodexNativeHookRelayUnregister, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed, s as createCodexNativeHookRelay, t as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-CwkDznGH.mjs";
|
|
52
|
+
import { a as prepareCodexPluginThreadConfigStartupProvider, c as buildLegacyScheduledCodexAppRecoveryPrompt, d as resolveScheduledCodexAppCreatorCaptureDecision, i as isContextEngineBindingCompatible, l as buildScheduledCodexAppServerConnectionIdentity, n as isCodexAppServerProfilerEnabled, o as resolveCodexPluginThreadConfigStartupPolicy, r as buildContextEngineBinding, s as assertScheduledCodexAppAuthorityRuntime, t as startOrResumeThread, u as captureScheduledCodexAppAuthority } from "./thread-lifecycle-run-BHM-L-56.mjs";
|
|
53
53
|
import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy } from "./session-permission-policy-C7kYxPGd.mjs";
|
|
54
|
-
import { o as hasCodexNativeToolCatalog, s as loadCodexNativeToolCatalog } from "./native-skill-isolation-
|
|
55
|
-
import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-
|
|
56
|
-
import { _ as invalidateCodexComputerFrame, a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, f as buildTurnCollaborationMode, g as buildCodexUserInput, h as readCodexRetainedBackgroundCommands, i as createCodexDynamicToolDiagnostics, l as buildCodexHistoryProvenancePrefix, m as CodexNativeProcessAuthority, n as projectCodexExecutableDynamicTools, o as ensureCodexSandboxExecServerEnvironment, p as buildTurnStartParams, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, u as buildCodexParentLocalInstructions, v as createCodexRemoteWorkspaceFileReader, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-
|
|
57
|
-
import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-
|
|
58
|
-
import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-
|
|
59
|
-
import { a as getCodexContextFileDisplayBasename, i as getCodexContextFileBasename, n as CODEX_NATIVE_PROJECT_DOC_BASENAMES, o as isNonEmptyString, r as buildCodexWorkspaceBootstrapContext, s as normalizeCodexContextFilePath } from "./attempt-workspace-context-
|
|
54
|
+
import { o as hasCodexNativeToolCatalog, s as loadCodexNativeToolCatalog } from "./native-skill-isolation-0pEyxLRX.mjs";
|
|
55
|
+
import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-B7N--ols.mjs";
|
|
56
|
+
import { _ as invalidateCodexComputerFrame, a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, f as buildTurnCollaborationMode, g as buildCodexUserInput, h as readCodexRetainedBackgroundCommands, i as createCodexDynamicToolDiagnostics, l as buildCodexHistoryProvenancePrefix, m as CodexNativeProcessAuthority, n as projectCodexExecutableDynamicTools, o as ensureCodexSandboxExecServerEnvironment, p as buildTurnStartParams, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, u as buildCodexParentLocalInstructions, v as createCodexRemoteWorkspaceFileReader, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-CCezdz5n.mjs";
|
|
57
|
+
import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-CPdcVWTn.mjs";
|
|
58
|
+
import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-CF-JwGUD.mjs";
|
|
59
|
+
import { a as getCodexContextFileDisplayBasename, i as getCodexContextFileBasename, n as CODEX_NATIVE_PROJECT_DOC_BASENAMES, o as isNonEmptyString, r as buildCodexWorkspaceBootstrapContext, s as normalizeCodexContextFilePath } from "./attempt-workspace-context-EAeScFrg.mjs";
|
|
60
60
|
import { n as captureCodexSettledTurnFinalizationContext } from "./settled-turn-context-BPL6D3RO.mjs";
|
|
61
|
-
import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-
|
|
62
|
-
import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-
|
|
61
|
+
import { r as releaseCodexProbeClient, t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-C4ENlstc.mjs";
|
|
62
|
+
import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-C4HhkAcj.mjs";
|
|
63
63
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, readNonBlankString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
64
64
|
import { createHash, randomUUID } from "node:crypto";
|
|
65
65
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -69,7 +69,7 @@ import { truncateUtf16Safe, truncateUtf8Prefix } from "openclaw/plugin-sdk/text-
|
|
|
69
69
|
import path from "node:path";
|
|
70
70
|
import fs from "node:fs/promises";
|
|
71
71
|
import { isPathStrictlyInside, readFileWindowFully, root } from "openclaw/plugin-sdk/file-access-runtime";
|
|
72
|
-
import { createStageTimingTracker, formatStageTimings } from "openclaw/plugin-sdk/time-runtime";
|
|
72
|
+
import { createStageTimingTracker, formatStageTimings, raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
73
73
|
import { addAbortListener } from "node:events";
|
|
74
74
|
import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
|
|
75
75
|
import { Type } from "typebox";
|
|
@@ -85,7 +85,7 @@ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
|
85
85
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
86
86
|
import { acknowledgeInternalToolResult, createAgentHarnessToolExecutionRegistry } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
|
|
87
87
|
import { createNativeSessionBindingAuthority, prepareNativeSessionGenerationAuthority } from "openclaw/plugin-sdk/agent-harness-session-runtime";
|
|
88
|
-
import { appendSessionYieldContext, composeSessionTranscriptWriteAssertion, hasPromptImageInput } from "openclaw/plugin-sdk/session-transcript-runtime";
|
|
88
|
+
import { appendSessionTranscriptMessageByIdentityStrict, appendSessionYieldContext, composeSessionTranscriptWriteAssertion, hasPromptImageInput } from "openclaw/plugin-sdk/session-transcript-runtime";
|
|
89
89
|
import { captureFinalCodexCronCreatorToolAllowlist, formatMcpCodexApprovalRemedy, materializeStaticMcpToolsForHarnessRun, resolveCodexMcpToolOverridesForAgent, resolveCodexTtsProvenanceTransfer } from "openclaw/plugin-sdk/codex-mcp-projection";
|
|
90
90
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
|
|
91
91
|
import { isSilentReplyPayloadText } from "openclaw/plugin-sdk/reply-chunking";
|
|
@@ -139,6 +139,7 @@ function createCodexAttemptPreparationTiming(params) {
|
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region extensions/codex/src/app-server/attempt-steering.ts
|
|
141
141
|
const CODEX_STEER_ALL_DEBOUNCE_MS = 500;
|
|
142
|
+
const CODEX_STEER_TERMINAL_DRAIN_MS = 1e3;
|
|
142
143
|
function createCodexQuestionInputHandlers(sessionKey, assertActive) {
|
|
143
144
|
const questionAuthority = (kind, assertSource, toolAuthorityPreparation) => ({
|
|
144
145
|
kind,
|
|
@@ -191,6 +192,11 @@ function createCodexSteeringQueue(params) {
|
|
|
191
192
|
let sendChain = Promise.resolve();
|
|
192
193
|
let sealedError;
|
|
193
194
|
let closedError;
|
|
195
|
+
let terminalDrain;
|
|
196
|
+
const removeDispatchedBatch = (id) => {
|
|
197
|
+
dispatchedBatches.delete(id);
|
|
198
|
+
if (dispatchedBatches.size === 0) terminalDrain?.resolve();
|
|
199
|
+
};
|
|
194
200
|
const assertActive = () => {
|
|
195
201
|
const unavailableError = closedError ?? sealedError;
|
|
196
202
|
if (unavailableError) throw unavailableError;
|
|
@@ -235,6 +241,7 @@ function createCodexSteeringQueue(params) {
|
|
|
235
241
|
for (const batch of dispatchedBatches.values()) for (const item of batch) acceptItem(item);
|
|
236
242
|
dispatchedBatches.clear();
|
|
237
243
|
for (const item of pendingMessages) rejectItem(item, error);
|
|
244
|
+
terminalDrain?.resolve();
|
|
238
245
|
};
|
|
239
246
|
const sealQueueAdmission = () => {
|
|
240
247
|
if (sealedError || closedError) return;
|
|
@@ -309,7 +316,7 @@ function createCodexSteeringQueue(params) {
|
|
|
309
316
|
timeoutMs: params.requestTimeoutMs,
|
|
310
317
|
signal: params.signal,
|
|
311
318
|
...withCurrent ? { withCurrent } : {},
|
|
312
|
-
onIngressRejected: () =>
|
|
319
|
+
onIngressRejected: () => removeDispatchedBatch(request.clientUserMessageId),
|
|
313
320
|
assertCurrent: () => {
|
|
314
321
|
assertActive();
|
|
315
322
|
liveItems = liveItems.filter(isCurrent);
|
|
@@ -323,7 +330,7 @@ function createCodexSteeringQueue(params) {
|
|
|
323
330
|
});
|
|
324
331
|
for (const item of liveItems) acceptItem(item);
|
|
325
332
|
} catch (error) {
|
|
326
|
-
if (clientUserMessageId)
|
|
333
|
+
if (clientUserMessageId) removeDispatchedBatch(clientUserMessageId);
|
|
327
334
|
if (skippedRevokedBatch) return;
|
|
328
335
|
if (clientUserMessageId !== void 0 && (isCodexAppServerIndeterminateRequestCancellationError(error) || isCodexAppServerIndeterminateTransportError(error))) for (const item of liveItems) acceptItem(item);
|
|
329
336
|
for (const item of items) rejectItem(item, error);
|
|
@@ -379,12 +386,21 @@ function createCodexSteeringQueue(params) {
|
|
|
379
386
|
confirmConsumed(clientUserMessageId) {
|
|
380
387
|
const batch = dispatchedBatches.get(clientUserMessageId);
|
|
381
388
|
if (!batch) return false;
|
|
382
|
-
|
|
389
|
+
removeDispatchedBatch(clientUserMessageId);
|
|
383
390
|
for (const item of batch) resolveItem(item);
|
|
384
391
|
return true;
|
|
385
392
|
},
|
|
386
393
|
getAcceptedMessages: () => acceptedMessages.slice(),
|
|
387
394
|
sealAdmission: sealQueueAdmission,
|
|
395
|
+
drainBeforeCancel() {
|
|
396
|
+
sealQueueAdmission();
|
|
397
|
+
if (closedError || dispatchedBatches.size === 0) {
|
|
398
|
+
cancelQueue();
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
terminalDrain ??= createDeferred();
|
|
402
|
+
return raceWithTimeout(terminalDrain.promise, CODEX_STEER_TERMINAL_DRAIN_MS, () => {}, { ref: false }).then(cancelQueue);
|
|
403
|
+
},
|
|
388
404
|
cancel: cancelQueue
|
|
389
405
|
};
|
|
390
406
|
}
|
|
@@ -2737,7 +2753,7 @@ function activateCodexAttemptTurn(resources, turnRuntime, lifecycle, notificatio
|
|
|
2737
2753
|
model: params.model,
|
|
2738
2754
|
config: params.config,
|
|
2739
2755
|
workspaceOnly,
|
|
2740
|
-
localRoots: workspaceOnly ? void 0 : getAgentScopedMediaLocalRoots(params.config ?? {}, sessionAgentId),
|
|
2756
|
+
localRoots: workspaceOnly ? void 0 : getAgentScopedMediaLocalRoots(params.config ?? {}, sessionAgentId, params.workspaceDir),
|
|
2741
2757
|
sandbox: connection.sandbox?.enabled && connection.sandbox.fsBridge ? {
|
|
2742
2758
|
root: connection.sandbox.workspaceDir,
|
|
2743
2759
|
bridge: connection.sandbox.fsBridge
|
|
@@ -2893,7 +2909,7 @@ function activateCodexAttemptTurn(resources, turnRuntime, lifecycle, notificatio
|
|
|
2893
2909
|
isStreaming: () => !state.completed && !runAbortController.signal.aborted,
|
|
2894
2910
|
isAborted: () => runAbortController.signal.aborted,
|
|
2895
2911
|
isStopped: () => state.completed || runAbortController.signal.aborted,
|
|
2896
|
-
ownsLiveness: () => deadlines.ownsExecutionWait() && resourceState.turnRoute?.signal.aborted === false && !state.completed && !state.terminalTurnNotificationQueued
|
|
2912
|
+
ownsLiveness: () => deadlines.ownsExecutionWait() && resourceState.turnRoute?.signal.aborted === false && !state.completed && !state.terminalTurnNotificationQueued,
|
|
2897
2913
|
isAbortable: () => !terminalState.terminalOutcomeFrozen || terminalState.sharedAbortAllowedAfterTerminalOutcome,
|
|
2898
2914
|
isCompacting: () => projectorRef.current?.isCompacting() ?? false,
|
|
2899
2915
|
supportsTranscriptCommitWait: true,
|
|
@@ -4749,14 +4765,20 @@ async function finalizeCodexAttempt(resources, turnRuntime, lifecycle, notificat
|
|
|
4749
4765
|
else if (finalPromptError) codexModelCallDiagnostics.emitError(finalPromptError);
|
|
4750
4766
|
else codexModelCallDiagnostics.emitCompleted(result);
|
|
4751
4767
|
const { assistantTranscriptOwned, assistantTranscriptIdempotencyKey, terminalAnchor } = mirrorOutcome;
|
|
4752
|
-
const
|
|
4768
|
+
const shouldCaptureSettledTurnFinalizationContext = result.assistantTexts.every((text) => !text.trim()) && result.messagesSnapshot.some((message) => message.role === "toolResult") && (!finalPromptError || activeProjector.settledTurnFailureFinalizationAllowed);
|
|
4769
|
+
const continuedPrompt = params.suppressNextUserMessagePersistence ? params.userTurnTranscriptRecorder?.getPersistedMessage?.() : void 0;
|
|
4770
|
+
const continuedPromptIdentity = continuedPrompt && readMirrorIdentity(continuedPrompt);
|
|
4771
|
+
const evidencePrefix = continuedPrompt && continuedPromptIdentity ? [continuedPrompt] : [];
|
|
4772
|
+
const settledTurnFinalizationContext = shouldCaptureSettledTurnFinalizationContext ? (!usesSupervisionConnection && !resourceState.nativeSettlementExpired ? await captureCodexSettledTurnFinalizationContext({
|
|
4753
4773
|
...activeTranscriptTarget,
|
|
4754
4774
|
model: resourceState.thread.model,
|
|
4755
4775
|
modelProvider: resourceState.thread.modelProvider,
|
|
4756
4776
|
authProfileId: startupAuthProfileId,
|
|
4757
|
-
mirroredMessages: mirrorOutcome.mirroredMessages,
|
|
4758
|
-
settledMessages: result.messagesSnapshot,
|
|
4777
|
+
mirroredMessages: [...evidencePrefix, ...mirrorOutcome.mirroredMessages],
|
|
4778
|
+
settledMessages: [...evidencePrefix, ...result.messagesSnapshot],
|
|
4779
|
+
...continuedPromptIdentity ? { promptIdentity: continuedPromptIdentity } : {},
|
|
4759
4780
|
turnId: activeTurnId,
|
|
4781
|
+
promptSuppressed: params.suppressNextUserMessagePersistence === true && !params.userTurnTranscriptRecorder,
|
|
4760
4782
|
signal: params.abortSignal,
|
|
4761
4783
|
assertActive: connection.assertCurrent,
|
|
4762
4784
|
withCurrent: connection.withCurrent
|
|
@@ -4917,12 +4939,13 @@ function createCodexAttemptLifecycleController(resources, turnRuntime) {
|
|
|
4917
4939
|
const { params, attemptStartedAt, runAbortController, fastModeAutoStartedAtMs, fastModeAutoProgressState } = connection;
|
|
4918
4940
|
const { state, activeTurnItemIds, pendingOpenClawDynamicToolCompletionIds } = turnRuntime;
|
|
4919
4941
|
const batchHadNonTerminalResult = () => state.currentTurnHadNonTerminalDynamicToolResult && !state.currentTurnHadToolAuthoredFinalReply;
|
|
4942
|
+
let terminalSteeringDrainPending = false;
|
|
4920
4943
|
const scheduleTerminalDynamicToolReleaseCheck = () => {
|
|
4921
|
-
if (state.terminalDynamicToolReleaseCheckScheduled || !state.pendingTerminalDynamicToolRelease && !state.currentTurnHadNonTerminalDynamicToolResult) return;
|
|
4944
|
+
if (state.terminalDynamicToolReleaseCheckScheduled || terminalSteeringDrainPending || !state.pendingTerminalDynamicToolRelease && !state.currentTurnHadNonTerminalDynamicToolResult) return;
|
|
4922
4945
|
state.terminalDynamicToolReleaseCheckScheduled = true;
|
|
4923
4946
|
setImmediate(() => {
|
|
4924
4947
|
state.terminalDynamicToolReleaseCheckScheduled = false;
|
|
4925
|
-
if (state.pendingTerminalDynamicToolRelease?.response.success === true && !batchHadNonTerminalResult() && state.activeAppServerTurnRequests === 0 && pendingOpenClawDynamicToolCompletionIds.size === 0) turnRuntime.steeringQueueRef.current?.
|
|
4948
|
+
if (state.pendingTerminalDynamicToolRelease?.response.success === true && !batchHadNonTerminalResult() && state.activeAppServerTurnRequests === 0 && pendingOpenClawDynamicToolCompletionIds.size === 0) turnRuntime.steeringQueueRef.current?.sealAdmission();
|
|
4926
4949
|
if (state.activeAppServerTurnRequests > 0 || activeTurnItemIds.size > 0 || pendingOpenClawDynamicToolCompletionIds.size > 0) return;
|
|
4927
4950
|
if (batchHadNonTerminalResult()) {
|
|
4928
4951
|
state.pendingTerminalDynamicToolRelease = void 0;
|
|
@@ -4932,6 +4955,15 @@ function createCodexAttemptLifecycleController(resources, turnRuntime) {
|
|
|
4932
4955
|
}
|
|
4933
4956
|
const value = state.pendingTerminalDynamicToolRelease;
|
|
4934
4957
|
if (!value || state.completed || runAbortController.signal.aborted || !value.response.success || state.activeAppServerTurnRequests !== 0 || activeTurnItemIds.size !== 0 || pendingOpenClawDynamicToolCompletionIds.size !== 0) return;
|
|
4958
|
+
const steeringDrain = turnRuntime.steeringQueueRef.current?.drainBeforeCancel();
|
|
4959
|
+
if (steeringDrain) {
|
|
4960
|
+
terminalSteeringDrainPending = true;
|
|
4961
|
+
steeringDrain.then(() => {
|
|
4962
|
+
terminalSteeringDrainPending = false;
|
|
4963
|
+
scheduleTerminalDynamicToolReleaseCheck();
|
|
4964
|
+
});
|
|
4965
|
+
return;
|
|
4966
|
+
}
|
|
4935
4967
|
state.pendingTerminalDynamicToolRelease = void 0;
|
|
4936
4968
|
state.currentTurnHadToolAuthoredFinalReply = false;
|
|
4937
4969
|
trajectoryRecorder?.recordEvent("turn.dynamic_tool_terminal_release", {
|
|
@@ -4948,7 +4980,6 @@ function createCodexAttemptLifecycleController(resources, turnRuntime) {
|
|
|
4948
4980
|
tool: value.call.tool,
|
|
4949
4981
|
durationMs: value.durationMs
|
|
4950
4982
|
});
|
|
4951
|
-
turnRuntime.steeringQueueRef.current?.cancel();
|
|
4952
4983
|
turnRuntime.interruptTurn(value.call.turnId, { locallyCompleted: true });
|
|
4953
4984
|
turnRuntime.completeTurn();
|
|
4954
4985
|
}).unref?.();
|
|
@@ -5650,22 +5681,63 @@ function createNativeSubagentAssignmentStore(params) {
|
|
|
5650
5681
|
const binding = bindingStore.read(identity);
|
|
5651
5682
|
if (!binding || !matchesCodexNativeSubagentSubmissionBinding(binding, owner)) throw new Error("Native assignment binding is no longer current.");
|
|
5652
5683
|
};
|
|
5653
|
-
const mutate = (kind) => (assignment, assertSourceCurrent) => bindingStore.mutate(identity, {
|
|
5654
|
-
kind,
|
|
5655
|
-
owner,
|
|
5656
|
-
assignment
|
|
5657
|
-
}, () => {
|
|
5658
|
-
assertCurrent();
|
|
5659
|
-
assertSourceCurrent();
|
|
5660
|
-
});
|
|
5661
5684
|
return {
|
|
5662
5685
|
assertCurrent,
|
|
5663
5686
|
read: () => {
|
|
5664
5687
|
assertCurrent();
|
|
5665
5688
|
return bindingStore.readNativeSubagentAssignments?.(identity, owner) ?? [];
|
|
5666
5689
|
},
|
|
5667
|
-
record:
|
|
5668
|
-
|
|
5690
|
+
record: (assignment, assertSourceCurrent) => bindingStore.mutate(identity, {
|
|
5691
|
+
kind: "record-native-subagent-assignment",
|
|
5692
|
+
owner,
|
|
5693
|
+
assignment
|
|
5694
|
+
}, () => {
|
|
5695
|
+
assertCurrent();
|
|
5696
|
+
assertSourceCurrent();
|
|
5697
|
+
}),
|
|
5698
|
+
consume: async (assignment, assertSourceCurrent, undelivered) => {
|
|
5699
|
+
const applied = await bindingStore.mutate(identity, {
|
|
5700
|
+
kind: "consume-native-subagent-assignment",
|
|
5701
|
+
owner,
|
|
5702
|
+
assignment,
|
|
5703
|
+
...undelivered ? { undelivered: true } : {}
|
|
5704
|
+
}, () => {
|
|
5705
|
+
assertCurrent();
|
|
5706
|
+
assertSourceCurrent();
|
|
5707
|
+
});
|
|
5708
|
+
if (applied && undelivered) {
|
|
5709
|
+
embeddedAgentLog.warn("Native subagent completion retired without delivery", {
|
|
5710
|
+
childThreadId: assignment.childThreadId,
|
|
5711
|
+
nativeTurnId: assignment.nativeTurnId,
|
|
5712
|
+
status: undelivered.status,
|
|
5713
|
+
childSessionKey: assignment.runId
|
|
5714
|
+
});
|
|
5715
|
+
try {
|
|
5716
|
+
if (identity.kind !== "session" || !identity.sessionKey) throw new Error("Native completion has no parent transcript identity.");
|
|
5717
|
+
const note = await appendSessionTranscriptMessageByIdentityStrict({
|
|
5718
|
+
agentId: identity.agentId,
|
|
5719
|
+
sessionId: owner.sessionId,
|
|
5720
|
+
sessionKey: identity.sessionKey,
|
|
5721
|
+
updateMode: "inline",
|
|
5722
|
+
message: {
|
|
5723
|
+
role: "custom",
|
|
5724
|
+
customType: "openclaw.system-note",
|
|
5725
|
+
display: true,
|
|
5726
|
+
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),
|
|
5727
|
+
timestamp: Date.now(),
|
|
5728
|
+
idempotencyKey: `codex-undelivered:${owner.lifecycleRevision ?? owner.sessionId}:${assignment.childThreadId}:${assignment.nativeTurnId ?? "initial"}`
|
|
5729
|
+
}
|
|
5730
|
+
});
|
|
5731
|
+
if (note.kind !== "result") throw new Error(`Native completion note was ${note.kind}.`);
|
|
5732
|
+
} catch (error) {
|
|
5733
|
+
embeddedAgentLog.warn("Could not persist native completion retirement note", {
|
|
5734
|
+
childSessionKey: assignment.runId,
|
|
5735
|
+
error: formatErrorMessage(error)
|
|
5736
|
+
});
|
|
5737
|
+
}
|
|
5738
|
+
}
|
|
5739
|
+
return applied;
|
|
5740
|
+
}
|
|
5669
5741
|
};
|
|
5670
5742
|
}
|
|
5671
5743
|
//#endregion
|
|
@@ -6316,8 +6388,7 @@ async function prepareCodexAttemptRuntime(connection) {
|
|
|
6316
6388
|
nativeToolSurfaceEnabled = false;
|
|
6317
6389
|
embeddedAgentLog.info("Codex managed-only hooks require sandbox-backed OpenClaw tools");
|
|
6318
6390
|
} finally {
|
|
6319
|
-
|
|
6320
|
-
else releaseLeasedSharedCodexAppServerClient(client);
|
|
6391
|
+
await releaseCodexProbeClient(client, attemptClientFactory);
|
|
6321
6392
|
}
|
|
6322
6393
|
}
|
|
6323
6394
|
const configuredMcpSurface = params.requireWorkspaceOnly === true ? void 0 : scheduledConfiguredMcpSurface ? "scheduled" : !nativeToolSurfaceEnabled && bundleMcpThreadConfig.staticServerNames.length > 0 ? "transient" : void 0;
|
|
@@ -6714,7 +6785,7 @@ function createCodexAttemptServerRequestController(resources, turnRuntime, lifec
|
|
|
6714
6785
|
//#region extensions/codex/src/app-server/attempt-runtime-artifact.ts
|
|
6715
6786
|
async function verifyStartupArtifact(params) {
|
|
6716
6787
|
if (!params.request) return;
|
|
6717
|
-
const { readCodexAppServerClientRuntimeArtifact, validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-
|
|
6788
|
+
const { readCodexAppServerClientRuntimeArtifact, validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-Ch7fCcgJ.mjs");
|
|
6718
6789
|
const runtimeArtifact = readCodexAppServerClientRuntimeArtifact(params.client);
|
|
6719
6790
|
const expected = params.request.expected;
|
|
6720
6791
|
const matchesExpected = !expected || runtimeArtifact?.id === expected.id && runtimeArtifact.fingerprint === expected.fingerprint;
|
|
@@ -7543,7 +7614,7 @@ async function prepareCodexAttemptTools(runtime) {
|
|
|
7543
7614
|
}
|
|
7544
7615
|
});
|
|
7545
7616
|
} finally {
|
|
7546
|
-
|
|
7617
|
+
await releaseCodexProbeClient(client, connection.attemptClientFactory);
|
|
7547
7618
|
}
|
|
7548
7619
|
}
|
|
7549
7620
|
let requireExplicitMessageTarget;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
2
|
-
import { a as resolvePackagedCodexNativeCommand } from "./managed-binary-
|
|
3
|
-
import { n as resolveCodexAppServerSpawnEnv, r as resolveCodexAppServerSpawnInvocation } from "./transport-stdio-
|
|
4
|
-
import { captureCodexConfiguredConnection, finalizeCodexConfiguredConnection, isCodexConfiguredConnectionArtifact, validateCodexConfiguredConnectionCapture } from "./runtime-artifact-connection-
|
|
2
|
+
import { a as resolvePackagedCodexNativeCommand } from "./managed-binary-Boj8_lWV.mjs";
|
|
3
|
+
import { n as resolveCodexAppServerSpawnEnv, r as resolveCodexAppServerSpawnInvocation } from "./transport-stdio-BsXQmXll.mjs";
|
|
4
|
+
import { captureCodexConfiguredConnection, finalizeCodexConfiguredConnection, isCodexConfiguredConnectionArtifact, validateCodexConfiguredConnectionCapture } from "./runtime-artifact-connection-C3ootnwd.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { resolveWindowsExecutablePath } from "openclaw/plugin-sdk/windows-spawn";
|
|
7
7
|
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as codexAppServerStartOptionsKey } from "./config-options-CZmH25Xq.mjs";
|
|
2
|
-
import "./config-runtime-
|
|
3
|
-
import { r as resolveCodexAppServerUnixSocketPath } from "./transport-websocket-
|
|
2
|
+
import "./config-runtime-BUH-IDVE.mjs";
|
|
3
|
+
import { r as resolveCodexAppServerUnixSocketPath } from "./transport-websocket-B5mq2Iq2.mjs";
|
|
4
4
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as isCodexRemoteExecPlacementSandbox } from "./config-parsing-CVK2Q463.mjs";
|
|
2
2
|
import { n as resolveCodexNativeExecutionPolicy, t as formatCodexNativeNodeExecBlock } from "./native-execution-policy-MXEe7PB3.mjs";
|
|
3
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
3
|
+
import { t as __exportAll } from "./session-binding-sidecars-CAHe3enw.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,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as adoptCodexNativeSubagentSubmissions, c as readCodexNativeSubagentSubmissions, l as codexNativeSubagentRunId, n as mutateNativePendingAssignments, o as matchesCodexNativeSubagentSubmissionOwner, s as mutateCodexNativeSubagentSubmissions } from "./native-subagent-pending-assignments-BAOzwy85.mjs";
|
|
2
2
|
import { a as readStoredCodexAppServerBinding, i as readCodexBindingTimestamp, n as matchesPendingSupervisionBranch, o as stripUndefinedBinding, r as readCodexAppServerThreadBinding, s as validateBindingForWrite } from "./session-binding-record-codec-CWQXr9os.mjs";
|
|
3
|
-
import { a as ownsStoredSessionGeneration, c as preserveNativeTaskImport, d as readCurrentCodexNativeSubagentSubmissions, f as readCurrentNativePendingAssignments, i as matchesCodexNativeSubagentSubmissionBinding, l as readCurrentCodexAppServerBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced, o as preserveCodexNativeSubagentSubmissions, p as readPluginAppPolicyContext, r as bindingStoreKey, s as preserveNativePendingAssignments, t as CodexSupervisionBindingReplacementError, u as readCurrentCodexAppServerBindings } from "./session-binding-record-
|
|
3
|
+
import { a as ownsStoredSessionGeneration, c as preserveNativeTaskImport, d as readCurrentCodexNativeSubagentSubmissions, f as readCurrentNativePendingAssignments, i as matchesCodexNativeSubagentSubmissionBinding, l as readCurrentCodexAppServerBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced, o as preserveCodexNativeSubagentSubmissions, p as readPluginAppPolicyContext, r as bindingStoreKey, s as preserveNativePendingAssignments, t as CodexSupervisionBindingReplacementError, u as readCurrentCodexAppServerBindings } from "./session-binding-record-O62ZRFhy.mjs";
|
|
4
4
|
import { a as PHYSICAL_SESSION_RETIRE_TTL_MS, i as CODEX_APP_SERVER_BINDING_NAMESPACE, n as CODEX_APP_SERVER_BINDING_LEASE, r as CODEX_APP_SERVER_BINDING_MAX_ENTRIES, t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-meta-Lkm5Lpf4.mjs";
|
|
5
5
|
import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-CgHQ8Vot.mjs";
|
|
6
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
6
|
+
import { t as __exportAll } from "./session-binding-sidecars-CAHe3enw.mjs";
|
|
7
7
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
import { AgentHarnessSessionSupersededError, embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
@@ -15,25 +15,51 @@ function mutateNativeSubagentBinding({ identity, current, mutation, assertCurren
|
|
|
15
15
|
if (!assertCurrent) throw new Error(`Codex native ${isAssignment ? "assignment" : "subagent submission"} mutation requires current authority.`);
|
|
16
16
|
assertCurrent();
|
|
17
17
|
if (current?.state !== "active" || !ownsStoredSessionGeneration(identity, current) || identity.kind === "session" && mutation.owner.sessionId !== identity.sessionId || !matchesCodexNativeSubagentSubmissionBinding(current.binding, mutation.owner)) return { result: false };
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
if (isAssignment) {
|
|
19
|
+
const changed = mutateNativePendingAssignments({
|
|
20
|
+
current: current.nativeSubagentAssignments,
|
|
21
|
+
owner: mutation.owner,
|
|
22
|
+
assignment: mutation.assignment,
|
|
23
|
+
consume: mutation.kind === "consume-native-subagent-assignment"
|
|
24
|
+
});
|
|
25
|
+
if (!changed.applied) return { result: mutation.kind === "consume-native-subagent-assignment" && mutation.undelivered === true && changed.absent === true };
|
|
26
|
+
const { nativeSubagentAssignments: _previous, ...bindingOwner } = current;
|
|
27
|
+
const retired = changed.consumed;
|
|
28
|
+
if (retired && mutation.kind === "consume-native-subagent-assignment" && mutation.undelivered) {
|
|
29
|
+
let submissions;
|
|
30
|
+
try {
|
|
31
|
+
submissions = readCodexNativeSubagentSubmissions(bindingOwner.nativeSubagentSubmissions);
|
|
32
|
+
} catch {}
|
|
33
|
+
if (submissions && matchesCodexNativeSubagentSubmissionOwner(submissions.owner, mutation.owner)) {
|
|
34
|
+
const receipts = submissions.receipts.filter((receipt) => receipt.childThreadId !== retired.childThreadId || receipt.submissionId !== retired.nativeTurnId && codexNativeSubagentRunId(receipt.childThreadId, receipt.submissionId) !== retired.runId);
|
|
35
|
+
delete bindingOwner.nativeSubagentSubmissions;
|
|
36
|
+
if (receipts.length) bindingOwner.nativeSubagentSubmissions = {
|
|
37
|
+
...submissions,
|
|
38
|
+
receipts
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
result: true,
|
|
44
|
+
next: {
|
|
45
|
+
...bindingOwner,
|
|
46
|
+
...changed.next ? { nativeSubagentAssignments: changed.next } : {}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const changed = mutateCodexNativeSubagentSubmissions({
|
|
25
51
|
current: current.nativeSubagentSubmissions,
|
|
26
52
|
owner: mutation.owner,
|
|
27
53
|
receipt: mutation.receipt,
|
|
28
54
|
consume: mutation.kind === "consume-native-subagent-submission"
|
|
29
55
|
});
|
|
30
56
|
if (!changed.applied) return { result: false };
|
|
31
|
-
const {
|
|
57
|
+
const { nativeSubagentSubmissions: _previous, ...bindingOwner } = current;
|
|
32
58
|
return {
|
|
33
59
|
result: true,
|
|
34
60
|
next: {
|
|
35
61
|
...bindingOwner,
|
|
36
|
-
...changed.next ? {
|
|
62
|
+
...changed.next ? { nativeSubagentSubmissions: changed.next } : {}
|
|
37
63
|
}
|
|
38
64
|
};
|
|
39
65
|
}
|