@openclaw/codex 2026.10.10-beta.3 → 2026.10.10-beta.4
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-BOspqhfQ.mjs → account-usage-runtime-CO_i9_7B.mjs} +3 -3
- package/dist/.setup/{app-server-policy-Cog6mm2i.mjs → app-server-policy-CFCEWj0w.mjs} +1 -1
- package/dist/.setup/{apply-DVeFKzUL.mjs → apply-DvEtGGBB.mjs} +8 -8
- package/dist/.setup/{attempt-client-cleanup-BLp6z_DD.mjs → attempt-client-cleanup-Bj4T3tcX.mjs} +5 -5
- package/dist/.setup/{attempt-workspace-context-GYPLawX6.mjs → attempt-workspace-context-DxHd71bH.mjs} +1 -1
- package/dist/.setup/{auth-binding-830RLAJW.mjs → auth-binding-BY7Fm501.mjs} +1 -1
- package/dist/.setup/{auth-cache-key-aolg0chE.mjs → auth-cache-key-Do2ZQrNP.mjs} +3 -3
- package/dist/.setup/{binding-connection-GTgUj9pi.mjs → binding-connection-hJD5mFkM.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-RcWR3vQu.mjs → binding-connection.runtime-Dap4qmsz.mjs} +1 -1
- package/dist/.setup/{bounded-turn-DJr0EXh7.mjs → bounded-turn-DnxnHHZP.mjs} +10 -10
- package/dist/.setup/{bounded-turn-isolation-D8CDrAVX.mjs → bounded-turn-isolation-Iz8EsqFg.mjs} +2 -2
- package/dist/.setup/{build-state-DswWyGqI.mjs → build-state-CpGXWSN4.mjs} +1 -1
- package/dist/.setup/{client-CPPD2q0Z.mjs → client-Bxe8bl-K.mjs} +8 -8
- package/dist/.setup/{client-catalog-response-FeIOBhaz.mjs → client-catalog-response-D-dEl0Ac.mjs} +1 -1
- package/dist/.setup/{client-initialize-CjgZcX61.mjs → client-initialize-CPNmLwhL.mjs} +1 -1
- package/dist/.setup/{command-dispatch-DlgDPLEv.mjs → command-dispatch-BD9-WK7I.mjs} +1 -1
- package/dist/.setup/{command-handlers-B7Kcgt8i.mjs → command-handlers-g046iNsp.mjs} +22 -22
- package/dist/.setup/{command-rpc-DomZ6_l8.mjs → command-rpc-CwpCTOrX.mjs} +11 -11
- package/dist/.setup/{compact-H5H5Cvbw.mjs → compact-B-qCn3BG.mjs} +13 -13
- package/dist/.setup/{computer-use-BFfXSTZw.mjs → computer-use-C0qJq1rh.mjs} +6 -6
- package/dist/.setup/{config-BfrAlTMT.mjs → config-BZYTxljj.mjs} +2 -2
- package/dist/.setup/{config-runtime-BZRizyuG.mjs → config-runtime-CqCrHEAU.mjs} +1 -1
- package/dist/.setup/{conversation-binding-DyiBKCA4.mjs → conversation-binding-CXGGbblk.mjs} +16 -16
- package/dist/.setup/{conversation-binding-data-khgW0n-o.mjs → conversation-binding-data-CAKQCqTL.mjs} +1 -1
- package/dist/.setup/{conversation-control-B2EpVZEb.mjs → conversation-control-CTZTP_rE.mjs} +3 -3
- package/dist/.setup/{doctor-start-options-8uIBXIzR.mjs → doctor-start-options-CpcBuzLb.mjs} +3 -3
- package/dist/.setup/{dynamic-tool-build-DkJpWzXt.mjs → dynamic-tool-build-BzTaCmlT.mjs} +3 -3
- package/dist/.setup/{dynamic-tools-UL4DHNTh.mjs → dynamic-tools-BALvjDwR.mjs} +8 -8
- package/dist/.setup/{effective-mcp-catalog-CvJiu5dn.mjs → effective-mcp-catalog-CQbEkKv_.mjs} +6 -6
- package/dist/.setup/{ephemeral-turn-C9iVxYQi.mjs → ephemeral-turn-CNm9tN72.mjs} +2 -2
- package/dist/.setup/{inference-context-BPwyk-Op.mjs → inference-context-DYpvCEF3.mjs} +1 -1
- package/dist/.setup/{inference-proxy-iJoMVyEy.mjs → inference-proxy-e1Rg8kr_.mjs} +1 -1
- package/dist/.setup/{installed-probe-lVC1X5ve.mjs → installed-probe-yc_w-vom.mjs} +3 -3
- package/dist/.setup/{isolated-completion-Bv8qIPw_.mjs → isolated-completion-B1mlyhKu.mjs} +5 -5
- package/dist/.setup/{managed-binary-DbKvGXKl.mjs → managed-binary-BwzkwiGo.mjs} +2 -2
- package/dist/.setup/{mcp-app-session-preparation-DtvMR_yX.mjs → mcp-app-session-preparation-CFbTbxia.mjs} +9 -9
- package/dist/.setup/{model-catalog-EWVLBn3F.mjs → model-catalog-BNSZklNP.mjs} +7 -7
- package/dist/.setup/{models-Bc4yyUrk.mjs → models-HgvyBseb.mjs} +3 -3
- package/dist/.setup/native-assignment-repair-BsWKjUjZ.mjs +162 -0
- package/dist/.setup/{native-auth-DpZIaY8N.mjs → native-auth-o_vw8KWa.mjs} +3 -3
- package/dist/.setup/{native-hook-relay-DbNYjwuC.mjs → native-hook-relay-COcu2b4l.mjs} +4 -4
- package/dist/.setup/{native-mcp-app-gkEJsgj2.mjs → native-mcp-app-CFyl3R2g.mjs} +5 -5
- package/dist/.setup/{native-skill-isolation-Cja6Nv79.mjs → native-skill-isolation-B8cWhSFy.mjs} +3 -3
- package/dist/.setup/{native-subagent-monitor-D1pYkirc.mjs → native-subagent-monitor-LJd5_D5F.mjs} +151 -47
- package/dist/.setup/{native-subagent-pending-assignments-CTinVtjo.mjs → native-subagent-pending-assignments-CX-LtYDX.mjs} +49 -11
- package/dist/.setup/{native-task-assignments-YJopbaVO.mjs → native-task-assignments-CMd-JiUS.mjs} +4 -4
- package/dist/.setup/{node-cli-sessions-BuJnBnEq.mjs → node-cli-sessions-C59CAyDh.mjs} +2 -2
- package/dist/.setup/{node-exec-server.runtime-CP7RC1Nd.mjs → node-exec-server.runtime-DvRSh5Oi.mjs} +2 -2
- package/dist/.setup/{plan-BUB3QGL7.mjs → plan-C3H9W_2P.mjs} +5 -5
- package/dist/.setup/{plugin-activation-CXPWe-hl.mjs → plugin-activation-Cj2k3W9n.mjs} +2 -2
- package/dist/.setup/{plugin-approval-roundtrip-BkiVPLuc.mjs → plugin-approval-roundtrip-DEbTgtVQ.mjs} +1 -1
- package/dist/.setup/{plugin-inventory-DE9wcaeH.mjs → plugin-inventory-BVP15PmN.mjs} +1 -1
- package/dist/.setup/{project-doc-thread-config-B0UI3f1D.mjs → project-doc-thread-config-Ds92xu17.mjs} +3 -3
- package/dist/.setup/{provider-Rt7awchu.mjs → provider-C1GuStnr.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-C0laqfjE.mjs → provider-capabilities-DMfkFwZi.mjs} +1 -1
- package/dist/.setup/{request-DbU7VQMs.mjs → request-DTgD_jsY.mjs} +5 -5
- package/dist/.setup/{run-attempt-BFAgRiTd.mjs → run-attempt-DB4AY6QP.mjs} +127 -72
- package/dist/.setup/{runtime-artifact-CmLWeyJB.mjs → runtime-artifact-Bn_GvxjU.mjs} +3 -3
- package/dist/.setup/{runtime-artifact-connection-DpWlZ02e.mjs → runtime-artifact-connection-DCwh9tgV.mjs} +2 -2
- package/dist/.setup/{sandbox-guard-DneAfNye.mjs → sandbox-guard-CrzVgQUn.mjs} +1 -1
- package/dist/.setup/{session-binding-BgsWcbdY.mjs → session-binding-Dg0B6Zua.mjs} +38 -12
- package/dist/.setup/{session-binding-record-C_THntMe.mjs → session-binding-record-BpWF2Sus.mjs} +2 -2
- package/dist/.setup/{session-binding-sidecars-BNSS6WL4.mjs → session-binding-sidecars-C9uEGpDX.mjs} +1 -1
- package/dist/.setup/{session-cancellation-9l8N4EUL.mjs → session-cancellation-Bg94rN6N.mjs} +4 -4
- package/dist/.setup/{session-catalog-adoption-ppsLlVLB.mjs → session-catalog-adoption-D6pqS43M.mjs} +5 -5
- package/dist/.setup/{session-catalog-archive-CqLRHJ6z.mjs → session-catalog-archive-B-ZpAiiK.mjs} +5 -5
- package/dist/.setup/{session-catalog-events-CicBG92S.mjs → session-catalog-events-BmhPYZGw.mjs} +4 -4
- package/dist/.setup/{session-catalog-index-ft2e51lh.mjs → session-catalog-index-D7fccO1r.mjs} +8 -8
- package/dist/.setup/{session-catalog-index-order-0Zqng2u8.mjs → session-catalog-index-order-DyCNai_t.mjs} +1 -1
- package/dist/.setup/{session-catalog-limits-Dc6E0BZz.mjs → session-catalog-limits-CGjAZOTM.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-CAjoWjaH.mjs → session-catalog-list-request-DGn9LMJY.mjs} +3 -3
- package/dist/.setup/{session-catalog-native-projection-CwOyRRXK.mjs → session-catalog-native-projection-HAmuA2-G.mjs} +4 -4
- package/dist/.setup/{session-catalog-node-adoption-e9v8mGgx.mjs → session-catalog-node-adoption-C_41f1dK.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-H7nrzcUD.mjs → session-catalog-node-continue-FuNSGUYz.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-lookup-BrZfDkA8.mjs → session-catalog-node-lookup-BfHfknjz.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-V6jyFg9g.mjs → session-catalog-parsing-ktmfo9oa.mjs} +1 -1
- package/dist/.setup/{session-catalog-projection-By1iGA1y.mjs → session-catalog-projection-C_w9yRCz.mjs} +4 -4
- package/dist/.setup/{session-catalog-source-DghHV4qB.mjs → session-catalog-source-BW46oF7X.mjs} +1 -1
- package/dist/.setup/{session-cli-CBGKiqdv.mjs → session-cli-COjTO3Dy.mjs} +1 -1
- package/dist/.setup/{session-history-import-BwPKwcNi.mjs → session-history-import-BZHN6RtG.mjs} +4 -4
- package/dist/.setup/{session-initialization-Dn3vveGv.mjs → session-initialization-Bztyf-sf.mjs} +1 -1
- package/dist/.setup/{session-retirement-D9qTLXqz.mjs → session-retirement-BHMs5nFf.mjs} +6 -6
- package/dist/.setup/{settled-turn-finalizer-Cn7yngMH.mjs → settled-turn-finalizer-C3OEC7ED.mjs} +5 -5
- package/dist/.setup/{shared-client-B8v6e5D0.mjs → shared-client-BelwlhWf.mjs} +63 -27
- package/dist/.setup/{side-question-DFFnd64D.mjs → side-question-Bt2vXr-h.mjs} +21 -21
- package/dist/.setup/{source-DTo8pzXK.mjs → source-DQN8P65G.mjs} +4 -4
- package/dist/.setup/{thread-lifecycle-run-DOC2IWpW.mjs → thread-lifecycle-run-aBfXzIGf.mjs} +36 -22
- package/dist/.setup/{thread-ownership-DJ8PPxRc.mjs → thread-ownership-DxW6b6fR.mjs} +4 -4
- package/dist/.setup/{thread-policy-UldER50x.mjs → thread-policy-j-BAwvSk.mjs} +3 -3
- package/dist/.setup/{thread-requests-BjawdIVV.mjs → thread-requests-6Dy8hyXF.mjs} +2 -2
- package/dist/.setup/{thread-resume-BZWI-rUL.mjs → thread-resume-CZxguYjc.mjs} +4 -4
- package/dist/.setup/{transcript-mirror-CEQJZlF3.mjs → transcript-mirror-5w4Hx1kt.mjs} +1 -1
- package/dist/.setup/{transport-stdio-Bq160Dhv.mjs → transport-stdio-BVeWgcK6.mjs} +1 -1
- package/dist/.setup/{transport-websocket-0YqiI_MH.mjs → transport-websocket-2Y-cL8kD.mjs} +1 -1
- package/dist/.setup/{turn-router-CaEj5E0i.mjs → turn-router-B62dF4CM.mjs} +1 -1
- package/dist/.setup/{upstream-session-fork-Dqf5_VFU.mjs → upstream-session-fork-5d_7cWPF.mjs} +17 -17
- package/dist/.setup/{usage-BfOJuCR7.mjs → usage-DSIlxJrx.mjs} +3 -3
- package/dist/.setup/{usage-limit-error-B0x1eymI.mjs → usage-limit-error-A0XP58jR.mjs} +1 -1
- package/dist/.setup/{web-search-provider.runtime-BwYKjmzK.mjs → web-search-provider.runtime-B-m9u2M1.mjs} +2 -2
- package/dist/.setup/{workspace-write-sandbox-probe-DJxOXcF3.mjs → workspace-write-sandbox-probe-D5OfU42L.mjs} +2 -2
- package/dist/.source-module-urls/6c41bd629a7a55e13b9ba84558fce30100391f4f229cc77b7c54b07fb0bfe9cf.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/client-version-api.js +3 -3
- package/dist/doctor-contract-api.js +14 -5
- package/dist/harness.js +21 -21
- 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/openclaw.plugin.json +5 -0
- package/package.json +4 -4
|
@@ -3,9 +3,9 @@ import { l as fingerprintCodexPolicy } from "./config-security-clxAZYWX.mjs";
|
|
|
3
3
|
import { f as resolveCodexPluginsPolicy } from "./config-parsing-DsWSCPHO.mjs";
|
|
4
4
|
import { u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-DMFZkd3X.mjs";
|
|
5
5
|
import { a as defaultCodexAppInventoryCache, i as CodexAppInventoryCache, o as serializeCodexAppInventoryError, s as codexAppIdentityKey } from "./plugin-app-cache-key-DRb-niJc.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-BVP15PmN.mjs";
|
|
7
|
+
import "./config-BZYTxljj.mjs";
|
|
8
|
+
import { t as ensureCodexPluginActivation } from "./plugin-activation-Cj2k3W9n.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-DQN8P65G.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-C3H9W_2P.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-DvEtGGBB.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-DvEtGGBB.mjs");
|
|
42
42
|
return await applyCodexMigrationPlan({
|
|
43
43
|
ctx,
|
|
44
44
|
plan,
|
package/dist/.setup/{provider-capabilities-C0laqfjE.mjs → provider-capabilities-DMfkFwZi.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as releaseLeasedSharedCodexAppServerClient } from "./shared-client-
|
|
1
|
+
import { f as releaseLeasedSharedCodexAppServerClient } from "./shared-client-BelwlhWf.mjs";
|
|
2
2
|
//#region extensions/codex/src/app-server/provider-capabilities.ts
|
|
3
3
|
function resolveOverriddenProviderWebSearchSupport(modelProviderOverride) {
|
|
4
4
|
const provider = modelProviderOverride?.trim().toLowerCase();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-DemqqaxE.mjs";
|
|
2
2
|
import { t as CODEX_CONTROL_METHODS } from "./capabilities-DAS-JX1z.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-C9uEGpDX.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";
|
|
@@ -145,7 +145,7 @@ async function requestCodexAppServerClientJson(params) {
|
|
|
145
145
|
let phase = "prepare";
|
|
146
146
|
observeControl(params.controlObservation, phase);
|
|
147
147
|
try {
|
|
148
|
-
const { prepareCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
148
|
+
const { prepareCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-CrzVgQUn.mjs").then((n) => n.a);
|
|
149
149
|
const sandboxGuard = await prepareCodexAppServerDirectSandboxBypassBlock(params);
|
|
150
150
|
try {
|
|
151
151
|
if (sandboxGuard.block) throw new Error(sandboxGuard.block);
|
|
@@ -180,7 +180,7 @@ async function requestCodexAppServerClientJson(params) {
|
|
|
180
180
|
}
|
|
181
181
|
async function requestCodexAppServerJson(params) {
|
|
182
182
|
observeControl(params.controlObservation, "prepare");
|
|
183
|
-
const { prepareCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
183
|
+
const { prepareCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-CrzVgQUn.mjs").then((n) => n.a);
|
|
184
184
|
const sandboxGuard = await prepareCodexAppServerDirectSandboxBypassBlock(params);
|
|
185
185
|
try {
|
|
186
186
|
if (sandboxGuard.block) throw new Error(sandboxGuard.block);
|
|
@@ -288,8 +288,8 @@ async function withCodexAppServerJsonClient(params, run) {
|
|
|
288
288
|
timeoutMs,
|
|
289
289
|
timeoutMessage,
|
|
290
290
|
promise: (async () => {
|
|
291
|
-
const { prepareCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
292
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-
|
|
291
|
+
const { prepareCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-CrzVgQUn.mjs").then((n) => n.a);
|
|
292
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./shared-client-BelwlhWf.mjs").then((n) => n.m);
|
|
293
293
|
errorPhase = void 0;
|
|
294
294
|
setPhase("prepare");
|
|
295
295
|
throwIfAbandoned();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as readCodexRuntimeModelId } from "./model-runtime-BdqzOMkU.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as createCodexNativeSubagentHistoryOwner } from "./native-subagent-pending-assignments-CX-LtYDX.mjs";
|
|
3
3
|
import { n as flattenCodexDynamicToolFunctions, r as isJsonObject, t as CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE } from "./protocol-CaPAVwe9.mjs";
|
|
4
|
-
import { g as sessionBindingIdentity, i as matchesCodexNativeSubagentSubmissionBinding, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-
|
|
5
|
-
import { n as defineCodexBuildState } from "./build-state-
|
|
4
|
+
import { g as sessionBindingIdentity, i as matchesCodexNativeSubagentSubmissionBinding, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-BpWF2Sus.mjs";
|
|
5
|
+
import { n as defineCodexBuildState } from "./build-state-CpGXWSN4.mjs";
|
|
6
6
|
import { c as withMcpElicitationsApprovalPolicy, d as readCodexRequirementsToml, n as hasCodexMcpToolApprovalOverrides, s as shouldAutoApproveCodexAppServerApprovals } from "./config-security-clxAZYWX.mjs";
|
|
7
7
|
import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, f as resolveCodexPluginsPolicy, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-DsWSCPHO.mjs";
|
|
8
8
|
import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
9
9
|
import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
10
10
|
import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext, o as resolveCodexComputerUseConfig } from "./config-options-DMFZkd3X.mjs";
|
|
11
|
-
import { D as retireSharedCodexAppServerClientIfCurrent, _ as observeAcquire, c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-
|
|
12
|
-
import { i as withCodexAppServerGitConfig } from "./transport-stdio-
|
|
11
|
+
import { D as retireSharedCodexAppServerClientIfCurrent, _ as observeAcquire, c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./auth-cache-key-Do2ZQrNP.mjs";
|
|
12
|
+
import { i as withCodexAppServerGitConfig } from "./transport-stdio-BVeWgcK6.mjs";
|
|
13
13
|
import { o as formatCodexDisplayText } from "./command-formatters-B_7-QZ1c.mjs";
|
|
14
14
|
import { a as codexPrewriteRejectionCause, r as CodexAppServerRpcError } from "./rpc-error-DemqqaxE.mjs";
|
|
15
15
|
import { n as waitForPromiseOrAbort } from "./timeout-D0mEWSGG.mjs";
|
|
@@ -17,49 +17,49 @@ import { t as readCodexAsyncQuestions } from "./async-questions-DdhOCwGi.mjs";
|
|
|
17
17
|
import { i as readCodexProviderRefusal, n as extractRawResponseItemText, o as readItem, r as readCodexErrorNotificationMessage, s as readNullableString } from "./event-projector-values-yf4us9Pf.mjs";
|
|
18
18
|
import { i as readMirrorIdentity, n as attachCodexMirrorIdentity, t as attachCodexAssistantItemIds } from "./upstream-prompt-provenance-Ccd9MFRJ.mjs";
|
|
19
19
|
import { n as buildCodexAppServerRuntimeFingerprint, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-DRb-niJc.mjs";
|
|
20
|
-
import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-
|
|
21
|
-
import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-
|
|
20
|
+
import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-hJD5mFkM.mjs";
|
|
21
|
+
import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-BZYTxljj.mjs";
|
|
22
22
|
import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-7W0cgTXF.mjs";
|
|
23
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-PIeLSnR-.mjs";
|
|
24
24
|
import { a as buildCodexMirrorIdempotencyKey, i as buildCodexMirrorDedupeIdentity, s as hasCodexMirrorOrigin, t as applyCodexTranscriptTaint } from "./transcript-mirror-attestation-BzUXnrvv.mjs";
|
|
25
25
|
import { i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-auwzSwwy.mjs";
|
|
26
|
-
import {
|
|
26
|
+
import { C as getCodexInferenceThread, F as prepareCodexWorkspaceReferences, G as readRecentCodexRateLimits, I as protectCodexAppServerLiveThread, O as ensureCodexAppServerClientRuntime, W as readCodexRateLimitsRevision, Z as recordCodexTurnForkSettings, a as createIsolatedCodexAppServerClient, dt as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, et as resolveCodexAppServerAuthAccountCacheKey, f as releaseLeasedSharedCodexAppServerClient, ht as withCodexStartupTimeout, l as readCodexAppServerClientDesktopGenerationFingerprint, lt as CodexAppServerStartupError, mt as resolveCodexStartupTimeoutMs, o as getLeasedSharedCodexAppServerClient, p as retainSharedCodexAppServerClientIfCurrent, r as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, s as getSharedCodexAppServerClient, tt as resolveCodexAppServerPreparedAuthHandoff, ut as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, v as CodexThreadClientReplacementError, w as getCodexInferenceThreadQualification } from "./shared-client-BelwlhWf.mjs";
|
|
27
27
|
import { a as isCodexResponsesOAuthRun, r as isCodexResponsesOAuth } from "./responses-oauth-CCV7aVYF.mjs";
|
|
28
|
-
import { C as createCodexElicitationResponse, D as toCodexDynamicToolProtocolResponse, E as toCodexDynamicToolProgressResponse, P as resolveCodexAppServerClientInstanceId, T as resolveDynamicToolCallTimeoutMs, a as isCodexAppServerIndeterminateTransportError, b as readCodexTurnCompletedNotification, c as CodexServerRequestResolvedError, g as assertCodexTurnStartResponse, i as isCodexAppServerIndeterminateRequestCancellationError, j as readCodexAppServerWarningMessage, r as isCodexAppServerApprovalRequest, v as readCodexDynamicToolCallParams, w as handleDynamicToolCallWithTimeout } from "./client-
|
|
29
|
-
import { s as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS } from "./client-initialize-
|
|
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-
|
|
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-
|
|
32
|
-
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-
|
|
28
|
+
import { C as createCodexElicitationResponse, D as toCodexDynamicToolProtocolResponse, E as toCodexDynamicToolProgressResponse, P as resolveCodexAppServerClientInstanceId, T as resolveDynamicToolCallTimeoutMs, a as isCodexAppServerIndeterminateTransportError, b as readCodexTurnCompletedNotification, c as CodexServerRequestResolvedError, g as assertCodexTurnStartResponse, i as isCodexAppServerIndeterminateRequestCancellationError, j as readCodexAppServerWarningMessage, r as isCodexAppServerApprovalRequest, v as readCodexDynamicToolCallParams, w as handleDynamicToolCallWithTimeout } from "./client-Bxe8bl-K.mjs";
|
|
29
|
+
import { s as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS } from "./client-initialize-CPNmLwhL.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-B62dF4CM.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-Bj4T3tcX.mjs";
|
|
32
|
+
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BY7Fm501.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-CBY0Hkga.mjs";
|
|
34
|
-
import { d as mergeCodexThreadConfigs } from "./project-doc-thread-config-
|
|
35
|
-
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-
|
|
36
|
-
import { i as resolveCodexSessionBinding, n as createCodexSessionGenerationSupersededError, t as clearCodexBindingForClient } from "./session-binding-
|
|
34
|
+
import { d as mergeCodexThreadConfigs } from "./project-doc-thread-config-Ds92xu17.mjs";
|
|
35
|
+
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-6Dy8hyXF.mjs";
|
|
36
|
+
import { i as resolveCodexSessionBinding, n as createCodexSessionGenerationSupersededError, t as clearCodexBindingForClient } from "./session-binding-Dg0B6Zua.mjs";
|
|
37
37
|
import { i as resolveCodexAppServerThreadModelSelection } from "./thread-model-selection-DxposL4X.mjs";
|
|
38
|
-
import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-
|
|
39
|
-
import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
38
|
+
import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-A0XP58jR.mjs";
|
|
39
|
+
import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DxW6b6fR.mjs";
|
|
40
40
|
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
|
|
41
|
-
import { a as CodexToolTranscriptProjection, c as asCodexToolArguments, i as emitCodexAgentEvent, l as isCodexCommandBearingToolCall, o as CodexToolProgressProjection, r as CodexEventProjection, s as shouldEmitTranscriptToolProgress, t as codexNativeSubagentMonitorRuntime, u as resolveCodexToolProgressDetailMode } from "./native-subagent-monitor-
|
|
42
|
-
import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-
|
|
41
|
+
import { a as CodexToolTranscriptProjection, c as asCodexToolArguments, i as emitCodexAgentEvent, l as isCodexCommandBearingToolCall, o as CodexToolProgressProjection, r as CodexEventProjection, s as shouldEmitTranscriptToolProgress, t as codexNativeSubagentMonitorRuntime, u as resolveCodexToolProgressDetailMode } from "./native-subagent-monitor-LJd5_D5F.mjs";
|
|
42
|
+
import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-DEbTgtVQ.mjs";
|
|
43
43
|
import { r as prepareCodexNativeExecutionPolicyForRun } from "./native-execution-policy-D09tLP-u.mjs";
|
|
44
|
-
import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-
|
|
44
|
+
import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-j-BAwvSk.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-CYFWLHVk.mjs";
|
|
48
|
-
import "./inference-context-
|
|
48
|
+
import "./inference-context-DYpvCEF3.mjs";
|
|
49
49
|
import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncDelivery } from "./event-projector-assistant-message-ChOAY7rW.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-BzTaCmlT.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-COcu2b4l.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-aBfXzIGf.mjs";
|
|
53
53
|
import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy } from "./session-permission-policy-CD2MAWU8.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-B8cWhSFy.mjs";
|
|
55
|
+
import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-CFyl3R2g.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-BALvjDwR.mjs";
|
|
57
|
+
import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-5w4Hx1kt.mjs";
|
|
58
|
+
import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-CFCEWj0w.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-DxHd71bH.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 { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-DMfkFwZi.mjs";
|
|
62
|
+
import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-C0qJq1rh.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";
|
|
@@ -81,13 +81,14 @@ import { AgentHarnessPreflightError, CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, FAST_
|
|
|
81
81
|
import { loadExecApprovalsReadOnlyAsync } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
82
82
|
import { AgentHarnessProjectionSettlement, createAgentHarnessAttemptCancellation, createAgentHarnessAttemptDeadlineController, createAgentHarnessAttemptLifecycle, shouldIncludeAgentHarnessRuntimeContext } from "openclaw/plugin-sdk/agent-harness-attempt-runtime";
|
|
83
83
|
import { getSessionEntryAsync, prepareSessionEntryPatch, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
84
|
-
import { appendSessionYieldContext, composeSessionTranscriptWriteAssertion, hasPromptImageInput } from "openclaw/plugin-sdk/session-transcript-runtime";
|
|
84
|
+
import { appendSessionTranscriptMessageByIdentityStrict, appendSessionYieldContext, composeSessionTranscriptWriteAssertion, hasPromptImageInput } from "openclaw/plugin-sdk/session-transcript-runtime";
|
|
85
85
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
86
86
|
import { acknowledgeInternalToolResult, createAgentHarnessToolExecutionRegistry } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
|
|
87
87
|
import { createNativeSessionBindingScope, createPreparedNativeSessionBindingAuthority, retainNativeSessionGenerationAuthority } from "openclaw/plugin-sdk/agent-harness-session-runtime";
|
|
88
88
|
import { captureSessionEntryCurrentCheckAsync } from "openclaw/plugin-sdk/session-binding-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
|
+
import { isSilentReplyText } from "openclaw/plugin-sdk/reply-runtime";
|
|
91
92
|
import { isSilentReplyPayloadText } from "openclaw/plugin-sdk/reply-chunking";
|
|
92
93
|
import { generatedImageAssetFromBase64 } from "openclaw/plugin-sdk/image-generation";
|
|
93
94
|
import { resolveGeneratedMediaMaxBytes } from "openclaw/plugin-sdk/media-generation-runtime";
|
|
@@ -1551,6 +1552,26 @@ var CodexProjectionSettlement = class extends AgentHarnessProjectionSettlement {
|
|
|
1551
1552
|
};
|
|
1552
1553
|
/** Owns per-turn projection state and builds results from the same state. */
|
|
1553
1554
|
var CodexTurnProjection = class {
|
|
1555
|
+
/** Materialize terminal native-tool gaps while the durable checkpoint is still open. */
|
|
1556
|
+
prepareTerminalToolResultCheckpoint(toolTelemetry, options) {
|
|
1557
|
+
const retainedCommands = /* @__PURE__ */ new Map();
|
|
1558
|
+
if (!this.aborted && !this.options.runAbortSignal?.aborted && this.completedTurn?.status === "completed" && !this.promptError) {
|
|
1559
|
+
const pending = this.nativeToolLifecycleProjector.pendingCommands();
|
|
1560
|
+
for (const [id, processId] of options?.readRetainedNativeCommands?.() ?? []) if (pending.has(id) && (pending.get(id) === null || pending.get(id) === processId)) retainedCommands.set(id, processId);
|
|
1561
|
+
}
|
|
1562
|
+
this.nativeToolLifecycleProjector.finalizeActive(void 0, retainedCommands);
|
|
1563
|
+
const rawAssistantTexts = toolTelemetry.finalSourceReplyDelivered ? [] : this.assistantProjection.collectAssistantTexts();
|
|
1564
|
+
const hasDeliverableAssistantOnCompletedTurn = this.completedTurn?.status === "completed" && rawAssistantTexts.some((text) => text.trim().length > 0 && !isSilentReplyText(text));
|
|
1565
|
+
const synthesized = this.toolTranscriptProjection.synthesizeMissingToolResults({
|
|
1566
|
+
synthesize: !this.completedTurn || this.completedTurn.status !== "completed" || this.assistantProjection.hasAssistantItemTextForSynthesis(),
|
|
1567
|
+
retainedCommands,
|
|
1568
|
+
terminalDisposition: this.aborted ? "tool_error" : hasDeliverableAssistantOnCompletedTurn ? "diagnostic_only" : "prompt_error"
|
|
1569
|
+
});
|
|
1570
|
+
if (synthesized) {
|
|
1571
|
+
this.synthesizedMissingToolResultError = synthesized;
|
|
1572
|
+
this.promptErrorSource ??= "prompt";
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1554
1575
|
constructor(params, threadId, turnId, options = {}) {
|
|
1555
1576
|
this.params = params;
|
|
1556
1577
|
this.threadId = threadId;
|
|
@@ -1599,7 +1620,8 @@ var CodexTurnProjection = class {
|
|
|
1599
1620
|
}
|
|
1600
1621
|
buildResult(toolTelemetry, options) {
|
|
1601
1622
|
this.eventProjection.flushPendingGuardianWarning();
|
|
1602
|
-
|
|
1623
|
+
this.prepareTerminalToolResultCheckpoint(toolTelemetry, options);
|
|
1624
|
+
const { params: runParams, turnId, completedTurn, aborted, contextTokens, contextTokensSource, completedCompactionCount, synthesizedMissingToolResultError, promptError: initialPromptError, promptErrorSource: initialPromptErrorSource, providerRefusal } = this;
|
|
1603
1625
|
const upstreamUserText = this.options.upstreamUserText;
|
|
1604
1626
|
const turnTainted = this.settlement.turnTainted;
|
|
1605
1627
|
const observedItemCount = (/* @__PURE__ */ new Set([...this.observedItemIds, ...this.completedItemIds])).size;
|
|
@@ -1607,12 +1629,6 @@ var CodexTurnProjection = class {
|
|
|
1607
1629
|
const completedItemCount = this.completedItemIds.size;
|
|
1608
1630
|
const guardianReviewCount = this.eventProjection.guardianReviewCount;
|
|
1609
1631
|
const yieldDetected = options?.yieldDetected;
|
|
1610
|
-
const retainedCommands = /* @__PURE__ */ new Map();
|
|
1611
|
-
if (!aborted && !this.options.runAbortSignal?.aborted && completedTurn?.status === "completed" && !initialPromptError) {
|
|
1612
|
-
const pending = this.nativeToolLifecycleProjector.pendingCommands();
|
|
1613
|
-
for (const [id, processId] of options?.readRetainedNativeCommands?.() ?? []) if (pending.has(id) && (pending.get(id) === null || pending.get(id) === processId)) retainedCommands.set(id, processId);
|
|
1614
|
-
}
|
|
1615
|
-
this.nativeToolLifecycleProjector.finalizeActive(void 0, retainedCommands);
|
|
1616
1632
|
const assistantTexts = toolTelemetry.finalSourceReplyDelivered ? [] : this.assistantProjection.collectAssistantTexts();
|
|
1617
1633
|
const asyncMessages = this.assistantProjection.collectAsyncMessages();
|
|
1618
1634
|
const commentaryMessages = this.assistantProjection.collectCommentaryMessages();
|
|
@@ -1623,20 +1639,8 @@ var CodexTurnProjection = class {
|
|
|
1623
1639
|
...usage,
|
|
1624
1640
|
contextUsage: { state: "unavailable" }
|
|
1625
1641
|
} : usage;
|
|
1626
|
-
const
|
|
1627
|
-
const
|
|
1628
|
-
const hasDeliverableAssistantOnCompletedTurn = completedTurn?.status === "completed" && assistantTexts.some((text) => text.trim().length > 0);
|
|
1629
|
-
const synthesizedMissingToolResultError = this.toolTranscriptProjection.synthesizeMissingToolResults({
|
|
1630
|
-
synthesize: legacyFailClosed,
|
|
1631
|
-
retainedCommands,
|
|
1632
|
-
terminalDisposition: aborted ? "tool_error" : hasDeliverableAssistantOnCompletedTurn ? "diagnostic_only" : "prompt_error"
|
|
1633
|
-
});
|
|
1634
|
-
const storedMissingToolResultError = synthesizedMissingToolResultError ?? previousMissingToolResultError;
|
|
1635
|
-
let promptErrorSource = initialPromptErrorSource;
|
|
1636
|
-
if (synthesizedMissingToolResultError) {
|
|
1637
|
-
this.synthesizedMissingToolResultError = synthesizedMissingToolResultError;
|
|
1638
|
-
promptErrorSource = promptErrorSource ?? "prompt";
|
|
1639
|
-
}
|
|
1642
|
+
const storedMissingToolResultError = synthesizedMissingToolResultError;
|
|
1643
|
+
const promptErrorSource = initialPromptErrorSource;
|
|
1640
1644
|
const assistantMessageOptions = {
|
|
1641
1645
|
tokenUsage: projectedUsage,
|
|
1642
1646
|
aborted,
|
|
@@ -1767,15 +1771,16 @@ var CodexAppServerEventProjector = class extends CodexTurnProjection {
|
|
|
1767
1771
|
return !this.projectionClosed && !this.aborted && !this.options.runAbortSignal?.aborted && this.completedTurn?.status === "completed" && !this.promptError ? this.nativeToolLifecycleProjector.pendingCommands() : /* @__PURE__ */ new Map();
|
|
1768
1772
|
}
|
|
1769
1773
|
/** Native completion owns the answer independently of unfinished host projection. */
|
|
1770
|
-
recoverCompletedAnswer() {
|
|
1774
|
+
recoverCompletedAnswer(toolTelemetry, options) {
|
|
1771
1775
|
const completed = this.settlement.completedAnswer;
|
|
1772
1776
|
if (!completed || this.aborted || this.promptError) return false;
|
|
1773
|
-
this.closeCompactionProgress();
|
|
1774
|
-
this.projectionController.abort();
|
|
1775
|
-
this.transcriptCheckpoint.abandon();
|
|
1776
1777
|
this.completedTurn = completed.turn;
|
|
1777
1778
|
this.assistantProjection.recordItemCompleted(completed.answer);
|
|
1778
1779
|
this.assistantProjection.finalizeAnswerCandidate(completed.turn);
|
|
1780
|
+
this.prepareTerminalToolResultCheckpoint(toolTelemetry, options);
|
|
1781
|
+
this.closeCompactionProgress();
|
|
1782
|
+
this.projectionController.abort();
|
|
1783
|
+
this.transcriptCheckpoint.abandon();
|
|
1779
1784
|
return true;
|
|
1780
1785
|
}
|
|
1781
1786
|
getActiveMcpToolCall(serverName) {
|
|
@@ -3016,6 +3021,7 @@ async function cleanupCodexAttempt(resources, turnRuntime, lifecycle, requestRun
|
|
|
3016
3021
|
resourceState.releaseInferenceContext = void 0;
|
|
3017
3022
|
prompt.context.attemptTools.scheduledAppAuthoritySourceRef.current = void 0;
|
|
3018
3023
|
freezeRunTerminalOutcome();
|
|
3024
|
+
if (!state.projectionClosed) activeTurn.activeProjector.prepareTerminalToolResultCheckpoint(prompt.context.attemptTools.toolBridge.telemetry);
|
|
3019
3025
|
const projectionClose = state.projectionClosed ? void 0 : activeTurn.activeProjector.closeProjection();
|
|
3020
3026
|
state.projectionClosed = true;
|
|
3021
3027
|
const checkpointCleanup = projectionClose ? runCleanupStep("codex-transcript-checkpoint", () => projectionClose) : void 0;
|
|
@@ -4411,6 +4417,7 @@ async function beginCodexAttemptSettlement(resources, turnRuntime, notifications
|
|
|
4411
4417
|
const { state: resourceState } = resources;
|
|
4412
4418
|
const { connection } = resources.prompt.context.runtime;
|
|
4413
4419
|
const { params, runAbortController, appServer } = connection;
|
|
4420
|
+
const { toolBridge } = resources.prompt.context.attemptTools;
|
|
4414
4421
|
const { state, deadlines, settlementExpired } = turnRuntime;
|
|
4415
4422
|
const { drainNotificationQueue } = notifications;
|
|
4416
4423
|
const { activeProjector, activeTurnId } = activeTurn;
|
|
@@ -4464,6 +4471,7 @@ async function beginCodexAttemptSettlement(resources, turnRuntime, notifications
|
|
|
4464
4471
|
return /* @__PURE__ */ new Map();
|
|
4465
4472
|
}
|
|
4466
4473
|
};
|
|
4474
|
+
state.readRetainedNativeCommands = readRetainedNativeCommands;
|
|
4467
4475
|
} catch (error) {
|
|
4468
4476
|
embeddedAgentLog.debug("could not confirm retained native commands", {
|
|
4469
4477
|
threadId: resourceState.thread.threadId,
|
|
@@ -4472,6 +4480,7 @@ async function beginCodexAttemptSettlement(resources, turnRuntime, notifications
|
|
|
4472
4480
|
}
|
|
4473
4481
|
await drainNotificationQueue();
|
|
4474
4482
|
}
|
|
4483
|
+
activeProjector.prepareTerminalToolResultCheckpoint(toolBridge.telemetry, { readRetainedNativeCommands: () => readRetainedNativeCommands?.() ?? /* @__PURE__ */ new Map() });
|
|
4475
4484
|
await closeProjection();
|
|
4476
4485
|
await activeProjector.settlement.drain();
|
|
4477
4486
|
}),
|
|
@@ -4609,7 +4618,10 @@ async function finalizeCodexAttempt(resources, turnRuntime, lifecycle, notificat
|
|
|
4609
4618
|
]);
|
|
4610
4619
|
if (runAbortController.signal.aborted) await state.abortCleanup;
|
|
4611
4620
|
} finally {
|
|
4612
|
-
if (!state.projectionClosed)
|
|
4621
|
+
if (!state.projectionClosed) {
|
|
4622
|
+
activeProjector.prepareTerminalToolResultCheckpoint(toolBridge.telemetry, { readRetainedNativeCommands });
|
|
4623
|
+
await resources.runCleanupStep("codex-transcript-checkpoint", closeProjection);
|
|
4624
|
+
}
|
|
4613
4625
|
}
|
|
4614
4626
|
const result = activeProjector.buildResult(toolBridge.telemetry, {
|
|
4615
4627
|
yieldDetected: toolState.yieldDetected,
|
|
@@ -5767,14 +5779,6 @@ function createNativeSubagentAssignmentStore(params) {
|
|
|
5767
5779
|
await params.assertLifecycleCurrentAsync?.();
|
|
5768
5780
|
assertCurrent();
|
|
5769
5781
|
};
|
|
5770
|
-
const mutate = (kind) => (assignment, assertSourceCurrent) => bindingStore.mutate(identity, {
|
|
5771
|
-
kind,
|
|
5772
|
-
owner,
|
|
5773
|
-
assignment
|
|
5774
|
-
}, () => {
|
|
5775
|
-
assertCurrent();
|
|
5776
|
-
assertSourceCurrent();
|
|
5777
|
-
}, params.authority);
|
|
5778
5782
|
return {
|
|
5779
5783
|
assertCurrent,
|
|
5780
5784
|
assertCurrentAsync,
|
|
@@ -5783,8 +5787,59 @@ function createNativeSubagentAssignmentStore(params) {
|
|
|
5783
5787
|
await assertCurrentAsync();
|
|
5784
5788
|
return assignments;
|
|
5785
5789
|
},
|
|
5786
|
-
record:
|
|
5787
|
-
|
|
5790
|
+
record: (assignment, assertSourceCurrent) => bindingStore.mutate(identity, {
|
|
5791
|
+
kind: "record-native-subagent-assignment",
|
|
5792
|
+
owner,
|
|
5793
|
+
assignment
|
|
5794
|
+
}, () => {
|
|
5795
|
+
assertCurrent();
|
|
5796
|
+
assertSourceCurrent();
|
|
5797
|
+
}, params.authority),
|
|
5798
|
+
consume: async (assignment, assertSourceCurrent, undelivered) => {
|
|
5799
|
+
const assertRetirementCurrent = () => {
|
|
5800
|
+
assertCurrent();
|
|
5801
|
+
assertSourceCurrent();
|
|
5802
|
+
};
|
|
5803
|
+
const applied = await bindingStore.mutate(identity, {
|
|
5804
|
+
kind: "consume-native-subagent-assignment",
|
|
5805
|
+
owner,
|
|
5806
|
+
assignment,
|
|
5807
|
+
...undelivered ? { undelivered: true } : {}
|
|
5808
|
+
}, assertRetirementCurrent, params.authority);
|
|
5809
|
+
if (applied && undelivered) {
|
|
5810
|
+
embeddedAgentLog.warn("Native subagent completion retired without delivery", {
|
|
5811
|
+
childThreadId: assignment.childThreadId,
|
|
5812
|
+
nativeTurnId: assignment.nativeTurnId,
|
|
5813
|
+
status: undelivered.status,
|
|
5814
|
+
childSessionKey: assignment.runId
|
|
5815
|
+
});
|
|
5816
|
+
try {
|
|
5817
|
+
if (identity.kind !== "session" || !identity.sessionKey || !params.authority) throw new Error("Native completion has no parent transcript authority.");
|
|
5818
|
+
const note = await appendSessionTranscriptMessageByIdentityStrict({
|
|
5819
|
+
agentId: identity.agentId,
|
|
5820
|
+
sessionId: owner.sessionId,
|
|
5821
|
+
sessionKey: identity.sessionKey,
|
|
5822
|
+
preparation: { source: params.authority.prepared.source },
|
|
5823
|
+
updateMode: "inline",
|
|
5824
|
+
message: {
|
|
5825
|
+
role: "custom",
|
|
5826
|
+
customType: "openclaw.system-note",
|
|
5827
|
+
display: true,
|
|
5828
|
+
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),
|
|
5829
|
+
timestamp: Date.now(),
|
|
5830
|
+
idempotencyKey: `codex-undelivered:${owner.lifecycleRevision ?? owner.sessionId}:${assignment.childThreadId}:${assignment.nativeTurnId ?? "initial"}`
|
|
5831
|
+
}
|
|
5832
|
+
});
|
|
5833
|
+
if (note.kind !== "result") throw new Error(`Native completion note was ${note.kind}.`);
|
|
5834
|
+
} catch (error) {
|
|
5835
|
+
embeddedAgentLog.warn("Could not persist native completion retirement note", {
|
|
5836
|
+
childSessionKey: assignment.runId,
|
|
5837
|
+
error: formatErrorMessage(error)
|
|
5838
|
+
});
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
return applied;
|
|
5842
|
+
}
|
|
5788
5843
|
};
|
|
5789
5844
|
}
|
|
5790
5845
|
function createNativeSubagentSubmissionStore(params) {
|
|
@@ -6896,7 +6951,7 @@ function createCodexAttemptServerRequestController(resources, turnRuntime, lifec
|
|
|
6896
6951
|
//#region extensions/codex/src/app-server/attempt-runtime-artifact.ts
|
|
6897
6952
|
async function verifyStartupArtifact(params) {
|
|
6898
6953
|
if (!params.request) return;
|
|
6899
|
-
const { readCodexAppServerClientRuntimeArtifact, validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-
|
|
6954
|
+
const { readCodexAppServerClientRuntimeArtifact, validateCodexAppServerRuntimeArtifact } = await import("./runtime-artifact-Bn_GvxjU.mjs");
|
|
6900
6955
|
const runtimeArtifact = readCodexAppServerClientRuntimeArtifact(params.client);
|
|
6901
6956
|
const expected = params.request.expected;
|
|
6902
6957
|
const matchesExpected = !expected || runtimeArtifact?.id === expected.id && runtimeArtifact.fingerprint === expected.fingerprint;
|
|
@@ -8594,7 +8649,7 @@ function createCodexAttemptTurnState(resources) {
|
|
|
8594
8649
|
onDeadlineChanged: params.onAttemptDeadlineChanged,
|
|
8595
8650
|
onTimeout: (timeout) => {
|
|
8596
8651
|
const pendingStage = state.pendingSettlementStage ?? projectorRef.current?.settlement.pendingStage ?? "notification_queue";
|
|
8597
|
-
if (timeout.kind === "settlement" && projectorRef.current?.recoverCompletedAnswer()) {
|
|
8652
|
+
if (timeout.kind === "settlement" && projectorRef.current?.recoverCompletedAnswer(prompt.context.attemptTools.toolBridge.telemetry, { readRetainedNativeCommands: state.readRetainedNativeCommands })) {
|
|
8598
8653
|
state.settlementWarning = {
|
|
8599
8654
|
pendingStage,
|
|
8600
8655
|
elapsedMs: timeout.elapsedMs,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
|
|
2
|
-
import { p 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 { p as resolvePackagedCodexNativeCommand } from "./managed-binary-BwzkwiGo.mjs";
|
|
3
|
+
import { n as resolveCodexAppServerSpawnEnv, r as resolveCodexAppServerSpawnInvocation } from "./transport-stdio-BVeWgcK6.mjs";
|
|
4
|
+
import { captureCodexConfiguredConnection, finalizeCodexConfiguredConnection, isCodexConfiguredConnectionArtifact, validateCodexConfiguredConnectionCapture } from "./runtime-artifact-connection-DCwh9tgV.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-DMFZkd3X.mjs";
|
|
2
|
-
import "./config-runtime-
|
|
3
|
-
import { r as resolveCodexAppServerUnixSocketPath } from "./transport-websocket-
|
|
2
|
+
import "./config-runtime-CqCrHEAU.mjs";
|
|
3
|
+
import { r as resolveCodexAppServerUnixSocketPath } from "./transport-websocket-2Y-cL8kD.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-DsWSCPHO.mjs";
|
|
2
2
|
import { n as prepareCodexNativeExecutionPolicy, t as formatCodexNativeNodeExecBlock } from "./native-execution-policy-D09tLP-u.mjs";
|
|
3
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
3
|
+
import { t as __exportAll } from "./session-binding-sidecars-C9uEGpDX.mjs";
|
|
4
4
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/codex/src/app-server/sandbox-guard.ts
|
|
6
6
|
var sandbox_guard_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -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-CX-LtYDX.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-DvmOI7g_.mjs";
|
|
3
|
-
import { a as ownsStoredSessionGeneration, c as preserveNativeTaskImport, d as readCurrentCodexAppServerBindingAsync, f as readCurrentCodexAppServerBindings, g as sessionBindingIdentity, h as readPluginAppPolicyContext, i as matchesCodexNativeSubagentSubmissionBinding, l as preservedSessionGeneration, m as readCurrentNativePendingAssignments, n as assertCodexBindingMayBeReplaced, o as preserveCodexNativeSubagentSubmissions, p as readCurrentCodexNativeSubagentSubmissions, r as bindingStoreKey, s as preserveNativePendingAssignments, t as CodexSupervisionBindingReplacementError, u as readCurrentCodexAppServerBinding, v as storedSessionGeneration } from "./session-binding-record-
|
|
3
|
+
import { a as ownsStoredSessionGeneration, c as preserveNativeTaskImport, d as readCurrentCodexAppServerBindingAsync, f as readCurrentCodexAppServerBindings, g as sessionBindingIdentity, h as readPluginAppPolicyContext, i as matchesCodexNativeSubagentSubmissionBinding, l as preservedSessionGeneration, m as readCurrentNativePendingAssignments, n as assertCodexBindingMayBeReplaced, o as preserveCodexNativeSubagentSubmissions, p as readCurrentCodexNativeSubagentSubmissions, r as bindingStoreKey, s as preserveNativePendingAssignments, t as CodexSupervisionBindingReplacementError, u as readCurrentCodexAppServerBinding, v as storedSessionGeneration } from "./session-binding-record-BpWF2Sus.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-auwzSwwy.mjs";
|
|
6
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
6
|
+
import { t as __exportAll } from "./session-binding-sidecars-C9uEGpDX.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
|
}
|
package/dist/.setup/{session-binding-record-C_THntMe.mjs → session-binding-record-BpWF2Sus.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as readCodexNativeSubagentSubmissions, g as codexNativeSubagentHistoryConnectionFingerprint, i as readNativePendingAssignments, o as matchesCodexNativeSubagentSubmissionOwner, t as matchesNativeAssignmentLifecycle } from "./native-subagent-pending-assignments-CX-LtYDX.mjs";
|
|
2
2
|
import { a as readStoredCodexAppServerBinding, t as legacyAppPolicyEntrySchema } from "./session-binding-record-codec-DvmOI7g_.mjs";
|
|
3
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
3
|
+
import { t as __exportAll } from "./session-binding-sidecars-C9uEGpDX.mjs";
|
|
4
4
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { isDeepStrictEqual } from "node:util";
|
package/dist/.setup/{session-binding-sidecars-BNSS6WL4.mjs → session-binding-sidecars-C9uEGpDX.mjs}
RENAMED
|
@@ -482,7 +482,7 @@ async function migrateSource(source, candidates, params, store) {
|
|
|
482
482
|
return await withFileLock(source.sidecarPath, LEGACY_BINDING_LOCK_OPTIONS, async () => {
|
|
483
483
|
const [contents, stat] = await Promise.all([fs.readFile(source.sidecarPath, "utf8"), fs.stat(source.sidecarPath)]);
|
|
484
484
|
const raw = JSON.parse(contents);
|
|
485
|
-
const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-
|
|
485
|
+
const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-Dg0B6Zua.mjs").then((n) => n.a), import("./conversation-binding-data-CAKQCqTL.mjs").then((n) => n.t)]);
|
|
486
486
|
const agentId = owner?.agentId ?? (source.agentIds.size === 1 ? [...source.agentIds][0] : void 0);
|
|
487
487
|
const baseStored = await createStoredCodexAppServerBinding(raw, {
|
|
488
488
|
now: stat.mtime.toISOString(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-
|
|
2
|
-
import "./shared-client-
|
|
3
|
-
import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
4
|
-
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-
|
|
1
|
+
import { T as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-Do2ZQrNP.mjs";
|
|
2
|
+
import "./shared-client-BelwlhWf.mjs";
|
|
3
|
+
import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DxW6b6fR.mjs";
|
|
4
|
+
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-LJd5_D5F.mjs";
|
|
5
5
|
//#region extensions/codex/src/app-server/session-cancellation.ts
|
|
6
6
|
/** Stop owns admitted descendants, without retiring the session or its native history. */
|
|
7
7
|
async function withCodexSessionDescendantCancellation(bindingStore, params, run) {
|