@openclaw/codex 2026.10.1-beta.2 → 2026.10.5-beta.1
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-DGqFpAud.mjs → account-usage-runtime-QBZsvZS8.mjs} +8 -7
- package/dist/.setup/{app-server-policy-Bg4FZw1f.mjs → app-server-policy-D_zv8J7V.mjs} +3 -4
- package/dist/.setup/{apply-CXTudl9p.mjs → apply-CBMV8LN0.mjs} +40 -51
- package/dist/.setup/{attempt-client-cleanup-BH0hW2xU.mjs → attempt-client-cleanup-t-kd_1ys.mjs} +6 -6
- package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +2 -0
- package/dist/.setup/{attempt-workspace-context-BY0jprWJ.mjs → attempt-workspace-context-CcwP3DA3.mjs} +21 -18
- package/dist/.setup/{auth-binding-BoMwpuPN.mjs → auth-binding-BaxlhaNx.mjs} +2 -2
- package/dist/.setup/{auth-cache-key-CGm0UJOr.mjs → auth-cache-key-DyfUvsSa.mjs} +30 -41
- package/dist/.setup/{binding-connection-C-08ez1w.mjs → binding-connection-B7HAAZSI.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-Dn2p-fdy.mjs → binding-connection.runtime-DAXn7iFl.mjs} +6 -5
- package/dist/.setup/{bounded-turn-pGsfXcmH.mjs → bounded-turn-CyQVQwGe.mjs} +21 -17
- package/dist/.setup/{bounded-turn-isolation-DklXNk3k.mjs → bounded-turn-isolation-BfDAo-qZ.mjs} +4 -4
- package/dist/.setup/{build-state-CqQnsg7T.mjs → build-state-CzLMy1S9.mjs} +1 -1
- package/dist/.setup/{capabilities-kQntafj_.mjs → capabilities-DbOzOglY.mjs} +1 -1
- package/dist/.setup/{client-catalog-response-Bqp7WG51.mjs → client-catalog-response-DsbEAtpd.mjs} +25 -32
- package/dist/.setup/{client-C8lgBOoO.mjs → client-y7nO6X9c.mjs} +198 -247
- package/dist/.setup/{command-dispatch-DhBbFIQ5.mjs → command-dispatch-uA9lz2Kf.mjs} +3 -4
- package/dist/.setup/{command-formatters-DV3DHhdr.mjs → command-formatters-xW9KpoSZ.mjs} +16 -26
- package/dist/.setup/{command-handlers-ztOOzm6O.mjs → command-handlers-VBaJnpZo.mjs} +270 -360
- package/dist/.setup/{command-rpc-CuC5fPom.mjs → command-rpc-C9VxOLuG.mjs} +19 -18
- package/dist/.setup/{compact-tUb9AYfH.mjs → compact-CD8xJxXS.mjs} +41 -61
- package/dist/.setup/{computer-use-BBN9y326.mjs → computer-use-CiToXF5C.mjs} +109 -147
- package/dist/.setup/{config-0Gxk3_eq.mjs → config-C1YVVLEA.mjs} +32 -59
- package/dist/.setup/config-contracts.shared-D85SGEuq.mjs +4 -0
- package/dist/.setup/{config-options-HG_Rr3W_.mjs → config-options-DDzeNQ8m.mjs} +52 -90
- package/dist/.setup/{config-parsing-BQq-CHTF.mjs → config-parsing-DsWSCPHO.mjs} +19 -55
- package/dist/.setup/{config-runtime-cUYrqu_a.mjs → config-runtime-DWzK-k0n.mjs} +2 -2
- package/dist/.setup/{config-security-KAPScztc.mjs → config-security-clxAZYWX.mjs} +35 -39
- package/dist/.setup/config-utils-DN_YT7dE.mjs +47 -0
- package/dist/.setup/{context-engine-projection-CsgYSQhW.mjs → context-engine-projection-ps-yn_ci.mjs} +10 -22
- package/dist/.setup/{conversation-binding-B3MNMVzb.mjs → conversation-binding-CTSLDM9S.mjs} +85 -119
- package/dist/.setup/{conversation-binding-data-DJ4ix-W5.mjs → conversation-binding-data-UgLuTSQT.mjs} +9 -8
- package/dist/.setup/{conversation-control-CYsMlCuE.mjs → conversation-control-GXM3unE4.mjs} +7 -10
- package/dist/.setup/{cyber-failover-Bb1J6hS1.mjs → cyber-failover-D4dgNfFf.mjs} +2 -5
- package/dist/.setup/{cyber-failover-notice-XR03ef31.mjs → cyber-failover-notice-ljgGGL0s.mjs} +1 -1
- package/dist/.setup/{doctor-start-options-DPW9JxIE.mjs → doctor-start-options-JjTAl-q_.mjs} +5 -5
- package/dist/.setup/{dynamic-tool-build-C8xGEXmR.mjs → dynamic-tool-build-D731PCdv.mjs} +57 -69
- package/dist/.setup/{dynamic-tools-DyERJnR6.mjs → dynamic-tools-D0pYbxHH.mjs} +689 -710
- package/dist/.setup/{effective-mcp-catalog-C26Mio5l.mjs → effective-mcp-catalog-1hWFKghy.mjs} +11 -20
- package/dist/.setup/{elicitation-input-r9axtppm.mjs → elicitation-input-DXG_qaXr.mjs} +14 -20
- package/dist/.setup/{ephemeral-turn-D8VcDTNo.mjs → ephemeral-turn-Cphy5Qr_.mjs} +3 -3
- package/dist/.setup/{event-projector-assistant-message-BN7CNUB5.mjs → event-projector-assistant-message-CLMKN4x-.mjs} +2 -2
- package/dist/.setup/{event-projector-usage-03R0I2dM.mjs → event-projector-usage-BpKfdoTm.mjs} +20 -33
- package/dist/.setup/{event-projector-values-DTqZHizf.mjs → event-projector-values-CLvG1Hil.mjs} +4 -5
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +13 -0
- package/dist/.setup/{inference-context-D-9gWlTR.mjs → inference-context-DNlGwzwy.mjs} +10 -11
- package/dist/.setup/{inference-dispatch-B5UKEUyC.mjs → inference-dispatch-CO6tTs4q.mjs} +5 -4
- package/dist/.setup/{inference-metadata-CgIf7sOx.mjs → inference-metadata-DCvcG_N_.mjs} +36 -41
- package/dist/.setup/{inference-proxy-DUO5E2QQ.mjs → inference-proxy-BDWV0djM.mjs} +10 -14
- package/dist/.setup/{isolated-completion-C0jrcplS.mjs → isolated-completion-Bhqd2yBq.mjs} +8 -8
- package/dist/.setup/local-runtime-attribution-CZz2DJ4q.mjs +15 -0
- package/dist/.setup/{managed-binary-C1VFoVPf.mjs → managed-binary-BtIjV7yN.mjs} +16 -36
- package/dist/.setup/{mcp-app-session-preparation-BxN0_CYe.mjs → mcp-app-session-preparation-DqSvxFqc.mjs} +24 -25
- package/dist/.setup/{mcp-tool-metadata-j10HhfTC.mjs → mcp-tool-metadata-DW41snf3.mjs} +1 -1
- package/dist/.setup/{model-catalog-DZyNeDKG.mjs → model-catalog-B227ST3D.mjs} +6 -6
- package/dist/.setup/{models-DSseKSMg.mjs → models-DdRyi93L.mjs} +6 -10
- package/dist/.setup/{native-auth-Cjb9y7IZ.mjs → native-auth-esN5MdIv.mjs} +5 -5
- package/dist/.setup/{native-execution-policy-ClzpdG3D.mjs → native-execution-policy-MXEe7PB3.mjs} +11 -28
- package/dist/.setup/native-hook-relay-BUWIOrSr.mjs +561 -0
- package/dist/.setup/{native-mcp-app-CqcPVmhH.mjs → native-mcp-app-CjxJQ4F7.mjs} +6 -6
- package/dist/.setup/native-skill-isolation-UMVoNjZz.mjs +391 -0
- package/dist/.setup/{native-subagent-monitor-BUYOUp9X.mjs → native-subagent-monitor-iHc8oLg5.mjs} +505 -639
- package/dist/.setup/{native-subagent-pending-assignments-BDqhOdJp.mjs → native-subagent-pending-assignments-DmVhedNs.mjs} +11 -23
- package/dist/.setup/{native-task-assignments-C6KVqiN1.mjs → native-task-assignments-DimsQ9Qa.mjs} +73 -27
- package/dist/.setup/{node-cli-sessions-B5oNDkUS.mjs → node-cli-sessions-CzKg2nGq.mjs} +18 -26
- package/dist/.setup/{node-exec-server.runtime-0xSEjKYt.mjs → node-exec-server.runtime-BWkULhBM.mjs} +5 -8
- package/dist/.setup/{plan-BJ37d2Og.mjs → plan-C_F3aio0.mjs} +40 -50
- package/dist/.setup/{plugin-activation-BcyBv8PG.mjs → plugin-activation-D7WkJMvU.mjs} +4 -5
- package/dist/.setup/{plugin-app-cache-key-BW8rd98k.mjs → plugin-app-cache-key-Bg9DbDI6.mjs} +18 -23
- package/dist/.setup/{plugin-approval-roundtrip-CuahdPLC.mjs → plugin-approval-roundtrip-BSV-51ig.mjs} +4 -6
- package/dist/.setup/{plugin-inventory-Bf0_piTw.mjs → plugin-inventory-CYgdo14P.mjs} +28 -43
- package/dist/.setup/{plugin-marketplace-discovery-SQPhSuic.mjs → plugin-marketplace-discovery-BblHM3DU.mjs} +7 -10
- package/dist/.setup/{plugin-metadata-cache-DWnB7VMj.mjs → plugin-metadata-cache-Bi8TAPwX.mjs} +5 -10
- package/dist/.setup/project-doc-thread-config-BVcvnps8.mjs +490 -0
- package/dist/.setup/{provider-BnwHVD_z.mjs → provider-BJ4xhaGX.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-D68Whix6.mjs → provider-capabilities-CjRaV3bx.mjs} +1 -1
- package/dist/.setup/{rate-limits-CMPy24F5.mjs → rate-limits-CI8pTPqL.mjs} +15 -32
- package/dist/.setup/reasoning-effort-CS9kKWB9.mjs +37 -0
- package/dist/.setup/{request-jSbhc1sg.mjs → request-Y8dmbqZ3.mjs} +28 -48
- package/dist/.setup/{rpc-error-hmWM21RB.mjs → rpc-error-C98SHchT.mjs} +3 -6
- package/dist/.setup/{run-attempt-BLDZeYLD.mjs → run-attempt-Dx7a4Mfm.mjs} +927 -849
- package/dist/.setup/{run-attempt-lifecycle-BuZgVbDA.mjs → run-attempt-lifecycle-KN4oh-7O.mjs} +13 -4
- package/dist/.setup/{runtime-artifact-CUTOOnKw.mjs → runtime-artifact-C13pR7tD.mjs} +18 -22
- package/dist/.setup/{runtime-artifact-connection-CADz3_BY.mjs → runtime-artifact-connection-jS5DeCok.mjs} +3 -3
- package/dist/.setup/{sandbox-guard-WqE8yPge.mjs → sandbox-guard-DIImwCy1.mjs} +4 -6
- package/dist/.setup/service-tier-normalization-BPgw2Wdt.mjs +9 -0
- package/dist/.setup/{session-binding-Ce7BqiPN.mjs → session-binding-JEHNMPsr.mjs} +13 -40
- package/dist/.setup/{session-binding-record-BZB8RgcF.mjs → session-binding-record-DU_0biMD.mjs} +4 -4
- package/dist/.setup/{session-binding-record-codec-z4ZpDn6E.mjs → session-binding-record-codec-BpH8u_G9.mjs} +16 -39
- package/dist/.setup/{session-binding-sidecars-BrdV95Fg.mjs → session-binding-sidecars-DD-enC8w.mjs} +49 -54
- package/dist/.setup/{session-catalog-adoption-CPIP4S_y.mjs → session-catalog-adoption-Ca3OYGYM.mjs} +23 -27
- package/dist/.setup/{session-catalog-archive-DcgwvSbF.mjs → session-catalog-archive-Bv6gV7x9.mjs} +6 -6
- package/dist/.setup/{session-catalog-events-Bdjw9HEn.mjs → session-catalog-events-DzFlXNUe.mjs} +6 -5
- package/dist/.setup/{session-catalog-index-DufISKJ6.mjs → session-catalog-index-DozvkUPd.mjs} +111 -105
- package/dist/.setup/{session-catalog-index-order-nhyO0wdW.mjs → session-catalog-index-order-CTfoefow.mjs} +28 -5
- package/dist/.setup/{session-catalog-limits-DEU36Qlo.mjs → session-catalog-limits-BynIoOYm.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-tXephOB4.mjs → session-catalog-list-request-D4MYNgDB.mjs} +11 -8
- package/dist/.setup/{session-catalog-native-projection-D6IiLtMb.mjs → session-catalog-native-projection-rCKnZud1.mjs} +5 -61
- package/dist/.setup/{session-catalog-node-adoption-7-WEQTB1.mjs → session-catalog-node-adoption-BdP9Zjqo.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-DLWBwAAO.mjs → session-catalog-node-continue-CNJibO4_.mjs} +27 -49
- package/dist/.setup/{session-catalog-node-lookup-Uufckwcm.mjs → session-catalog-node-lookup-BH_DBGa9.mjs} +3 -3
- package/dist/.setup/{session-catalog-parsing-B-qWJh2x.mjs → session-catalog-parsing-DkeoVn60.mjs} +9 -19
- package/dist/.setup/{session-catalog-projection-8aHNwzWD.mjs → session-catalog-projection-DDVmALHj.mjs} +8 -22
- package/dist/.setup/session-catalog-source-CygTGmrb.mjs +58 -0
- package/dist/.setup/{session-cli-kH4vuGod.mjs → session-cli-GwU0izn-.mjs} +20 -41
- package/dist/.setup/{session-history-BogBHKLk.mjs → session-history-BO6i_pfk.mjs} +1 -1
- package/dist/.setup/{session-history-import-NWKPa4ZO.mjs → session-history-import-CaO8s6ta.mjs} +4 -4
- package/dist/.setup/{session-history-read-CNN8zwbD.mjs → session-history-read-BI_2jRED.mjs} +4 -15
- package/dist/.setup/{session-history.worker-Cq_4DYgN.mjs → session-history.worker-DJQfek5p.mjs} +147 -159
- package/dist/.setup/{session-initialization-D6dtFQkE.mjs → session-initialization-Bi_2DKhc.mjs} +3 -5
- package/dist/.setup/{session-permission-policy-BxIUJ0Zd.mjs → session-permission-policy-CD2MAWU8.mjs} +12 -20
- package/dist/.setup/{session-retirement-Czbchv_O.mjs → session-retirement-IoS3zr17.mjs} +7 -7
- package/dist/.setup/{settled-turn-context-BZsMjkIO.mjs → settled-turn-context-BPL6D3RO.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-DjZsIwbZ.mjs → settled-turn-finalizer-X-Fylp-u.mjs} +12 -11
- package/dist/.setup/{shared-client-qhyYWbew.mjs → shared-client-ByIwuAC-.mjs} +172 -229
- package/dist/.setup/{side-question-D3NJlgbl.mjs → side-question-BDUdozFy.mjs} +116 -137
- package/dist/.setup/{source-BYu0T780.mjs → source-Bxbqf3S1.mjs} +37 -56
- package/dist/.setup/thread-archive-guard-LKdwQKyr.mjs +56 -0
- package/dist/.setup/{thread-lifecycle-Cbz_7ySv.mjs → thread-lifecycle-run-CfP4PnEf.mjs} +348 -484
- package/dist/.setup/thread-model-selection-DcVebr8N.mjs +61 -0
- package/dist/.setup/{thread-ownership-DwuSrt3s.mjs → thread-ownership-Be53aiaG.mjs} +5 -5
- package/dist/.setup/{thread-ownership-queue-Dp24d7-F.mjs → thread-ownership-queue-CeyYScUC.mjs} +5 -6
- package/dist/.setup/{thread-policy-DoNxbhqt.mjs → thread-policy-CHgY-KNl.mjs} +4 -4
- package/dist/.setup/thread-requests-BgzJwJtS.mjs +745 -0
- package/dist/.setup/{thread-resume-BT6NHMkM.mjs → thread-resume-B2EmMcgE.mjs} +5 -5
- package/dist/.setup/{timeout-CXOfNoaX.mjs → timeout-D0mEWSGG.mjs} +6 -12
- package/dist/.setup/{transcript-history-projection-B9a7HwUV.mjs → transcript-history-projection-DfKcoZCB.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-BfLRARNL.mjs → transcript-mirror-Bee2o6jj.mjs} +68 -68
- package/dist/.setup/{transcript-mirror-attestation-YSegaktH.mjs → transcript-mirror-attestation-BzUXnrvv.mjs} +5 -2
- package/dist/.setup/{transport-stdio-a0HDa2Mj.mjs → transport-stdio-CRWTkKOn.mjs} +67 -77
- package/dist/.setup/{transport-websocket-zqJ0Cmtn.mjs → transport-websocket-DIyPfkHo.mjs} +8 -16
- package/dist/.setup/{turn-router-sS69wYnI.mjs → turn-router-DKDAziUW.mjs} +30 -31
- package/dist/.setup/upstream-prompt-provenance-Ccd9MFRJ.mjs +44 -0
- package/dist/.setup/{upstream-session-fork-ChSld66u.mjs → upstream-session-fork-Djp_yssT.mjs} +50 -43
- package/dist/.setup/{usage-D8e8Xiqf.mjs → usage-DQA-peQC.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-GbT-5NcW.mjs → usage-limit-error-2t3KBqiX.mjs} +12 -21
- package/dist/.setup/web-search-item-CvokaZOo.mjs +20 -0
- package/dist/.setup/{web-search-provider.runtime-dL2GD1Kl.mjs → web-search-provider.runtime-BsuCMNix.mjs} +3 -3
- package/dist/.setup/{workspace-write-sandbox-probe-DmUHLrrl.mjs → workspace-write-sandbox-probe-BDWO2Qkh.mjs} +4 -4
- package/dist/api.js +15 -15
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +5 -6
- package/dist/harness.js +32 -61
- package/dist/index.js +302 -416
- package/dist/media-understanding-provider.js +32 -43
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-session-binding-api.js +1 -1
- package/dist/native-tool-policy.js +23 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +52 -31
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +20 -3
- package/package.json +7 -7
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +0 -5
- package/dist/.setup/plugin-thread-config-deadline-B8LGaZNW.mjs +0 -124
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +0 -15
- package/dist/.setup/shell-dynamic-tools-D3Brj3g9.mjs +0 -85
- package/dist/.setup/thread-archive-guard-C9frICzX.mjs +0 -60
- package/dist/.setup/thread-requests-CL1e8Wmx.mjs +0 -2111
- package/dist/.setup/upstream-prompt-provenance-fXkKbPVC.mjs +0 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-
|
|
2
|
-
import { t as CODEX_CONTROL_METHODS } from "./capabilities-
|
|
3
|
-
import { i as withTimeout$1, r as withAbortableTimeout } from "./timeout-
|
|
4
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
|
|
2
|
+
import { t as CODEX_CONTROL_METHODS } from "./capabilities-DbOzOglY.mjs";
|
|
3
|
+
import { i as withTimeout$1, r as withAbortableTimeout } from "./timeout-D0mEWSGG.mjs";
|
|
4
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
5
5
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-registration";
|
|
6
6
|
import { areDiagnosticsEnabledForProcess } from "openclaw/plugin-sdk/diagnostic-runtime";
|
|
7
7
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
@@ -35,17 +35,7 @@ function createCodexRequestTimeoutDiagnostics(timeoutMs) {
|
|
|
35
35
|
return {
|
|
36
36
|
ordinal,
|
|
37
37
|
phase: "prepare",
|
|
38
|
-
clientInstanceId: void 0,
|
|
39
|
-
acquireLastObservedBoundary: void 0,
|
|
40
|
-
acquireBoundaryBeforeCleanup: void 0,
|
|
41
|
-
acquireStartup: void 0,
|
|
42
|
-
lastStartedClientInstanceId: void 0,
|
|
43
|
-
lastStartedTransportIdentity: void 0,
|
|
44
|
-
initializeSnapshot: void 0,
|
|
45
|
-
initializeBeforeCleanup: void 0,
|
|
46
|
-
initializeBeforeCleanupSource: void 0,
|
|
47
38
|
started: 0,
|
|
48
|
-
pending: 0,
|
|
49
39
|
methods: /* @__PURE__ */ new Map()
|
|
50
40
|
};
|
|
51
41
|
}
|
|
@@ -103,10 +93,8 @@ function createCodexRequestTimeoutDiagnostics(timeoutMs) {
|
|
|
103
93
|
const current = attempt;
|
|
104
94
|
const label = DIAGNOSTIC_METHODS.has(method) ? method : "other";
|
|
105
95
|
current.started++;
|
|
106
|
-
current.pending++;
|
|
107
96
|
current.methods.set(label, (current.methods.get(label) ?? 0) + 1);
|
|
108
97
|
return () => {
|
|
109
|
-
current.pending--;
|
|
110
98
|
const remaining = (current.methods.get(label) ?? 1) - 1;
|
|
111
99
|
if (remaining === 0) current.methods.delete(label);
|
|
112
100
|
else current.methods.set(label, remaining);
|
|
@@ -119,9 +107,10 @@ function createCodexRequestTimeoutDiagnostics(timeoutMs) {
|
|
|
119
107
|
try {
|
|
120
108
|
if (!areDiagnosticsEnabledForProcess() || !embeddedAgentLog.isEnabled("warn")) return;
|
|
121
109
|
const methods = [...attempt.methods].toSorted(([a], [b]) => a.localeCompare(b));
|
|
110
|
+
const pending = methods.reduce((count, [, active]) => count + active, 0);
|
|
122
111
|
const initialize = readInitializeSnapshot(attempt.initializeSnapshot);
|
|
123
112
|
embeddedAgentLog.warn("codex app-server scope timed out", {
|
|
124
|
-
phase: attempt.phase === "callback" &&
|
|
113
|
+
phase: attempt.phase === "callback" && pending > 0 ? "client-request" : attempt.phase,
|
|
125
114
|
timeoutMs,
|
|
126
115
|
elapsedMs: Math.round(performance.now() - startedAt),
|
|
127
116
|
scopeAttemptOrdinal: attempt.ordinal,
|
|
@@ -139,7 +128,7 @@ function createCodexRequestTimeoutDiagnostics(timeoutMs) {
|
|
|
139
128
|
initializeBeforeCleanupSource: attempt.initializeBeforeCleanupSource
|
|
140
129
|
} : {},
|
|
141
130
|
requestStartedCount: attempt.started,
|
|
142
|
-
currentRequestCount:
|
|
131
|
+
currentRequestCount: pending,
|
|
143
132
|
currentMethods: JSON.stringify(methods.slice(0, MAX_METHODS)),
|
|
144
133
|
omittedMethodCount: Math.max(0, methods.length - MAX_METHODS)
|
|
145
134
|
});
|
|
@@ -155,14 +144,14 @@ var request_exports = /* @__PURE__ */ __exportAll({
|
|
|
155
144
|
requestCodexAppServerJson: () => requestCodexAppServerJson,
|
|
156
145
|
withCodexAppServerJsonClient: () => withCodexAppServerJsonClient
|
|
157
146
|
});
|
|
158
|
-
function
|
|
159
|
-
try {
|
|
160
|
-
observation?.phase(phase);
|
|
161
|
-
} catch {}
|
|
162
|
-
}
|
|
163
|
-
function observeControlFailure(observation, phase, error, deadlineObserved = false) {
|
|
147
|
+
function observeControl(observation, phase, failure) {
|
|
164
148
|
if (!observation) return;
|
|
165
149
|
try {
|
|
150
|
+
if (!failure) {
|
|
151
|
+
observation.phase(phase);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const { error, deadlineObserved } = failure;
|
|
166
155
|
const category = deadlineObserved ? "deadline-observed" : error instanceof CodexAppServerScopedRequestRejectedError ? "scoped-rejection" : error instanceof CodexAppServerRpcError ? error.code === -32601 ? "rpc-method-unavailable" : "rpc-error" : "other";
|
|
167
156
|
observation.failed({
|
|
168
157
|
phase,
|
|
@@ -173,16 +162,10 @@ function observeControlFailure(observation, phase, error, deadlineObserved = fal
|
|
|
173
162
|
/** Sends one guarded request over a client lease owned by the caller. */
|
|
174
163
|
async function requestCodexAppServerClientJson(params) {
|
|
175
164
|
let phase = "prepare";
|
|
176
|
-
|
|
165
|
+
observeControl(params.controlObservation, phase);
|
|
177
166
|
try {
|
|
178
|
-
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
179
|
-
const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock(
|
|
180
|
-
method: params.method,
|
|
181
|
-
requestParams: params.requestParams,
|
|
182
|
-
config: params.config,
|
|
183
|
-
sessionKey: params.sessionKey,
|
|
184
|
-
sessionId: params.sessionId
|
|
185
|
-
});
|
|
167
|
+
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-DIImwCy1.mjs").then((n) => n.r);
|
|
168
|
+
const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock(params);
|
|
186
169
|
if (sandboxBlock) throw new Error(sandboxBlock);
|
|
187
170
|
const timeoutMs = params.timeoutMs ?? 6e4;
|
|
188
171
|
const method = params.method;
|
|
@@ -196,23 +179,17 @@ async function requestCodexAppServerClientJson(params) {
|
|
|
196
179
|
...attemptWaiterFinished ? { attemptWaiterFinished } : {}
|
|
197
180
|
};
|
|
198
181
|
phase = "client-request";
|
|
199
|
-
|
|
182
|
+
observeControl(params.controlObservation, phase);
|
|
200
183
|
return await withTimeout$1(params.client.request(method, requestParams, options), timeoutMs, `codex app-server ${params.method} timed out`);
|
|
201
184
|
} catch (error) {
|
|
202
|
-
|
|
185
|
+
observeControl(params.controlObservation, phase, { error });
|
|
203
186
|
throw error;
|
|
204
187
|
}
|
|
205
188
|
}
|
|
206
189
|
async function requestCodexAppServerJson(params) {
|
|
207
|
-
|
|
208
|
-
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
209
|
-
const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock(
|
|
210
|
-
method: params.method,
|
|
211
|
-
requestParams: params.requestParams,
|
|
212
|
-
config: params.config,
|
|
213
|
-
sessionKey: params.sessionKey,
|
|
214
|
-
sessionId: params.sessionId
|
|
215
|
-
});
|
|
190
|
+
observeControl(params.controlObservation, "prepare");
|
|
191
|
+
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-DIImwCy1.mjs").then((n) => n.r);
|
|
192
|
+
const sandboxBlock = resolveCodexAppServerDirectSandboxBypassBlock(params);
|
|
216
193
|
if (sandboxBlock) throw new Error(sandboxBlock);
|
|
217
194
|
return await withCodexAppServerJsonClient({
|
|
218
195
|
...params,
|
|
@@ -291,7 +268,7 @@ async function withCodexAppServerJsonClient(params, run) {
|
|
|
291
268
|
let errorPhase;
|
|
292
269
|
const setPhase = (phase) => {
|
|
293
270
|
activePhase = phase;
|
|
294
|
-
|
|
271
|
+
observeControl(params.controlObservation, phase);
|
|
295
272
|
};
|
|
296
273
|
setPhase("prepare");
|
|
297
274
|
const timeoutController = new AbortController();
|
|
@@ -315,8 +292,8 @@ async function withCodexAppServerJsonClient(params, run) {
|
|
|
315
292
|
timeoutMs,
|
|
316
293
|
timeoutMessage,
|
|
317
294
|
promise: (async () => {
|
|
318
|
-
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-
|
|
319
|
-
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-
|
|
295
|
+
const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-DIImwCy1.mjs").then((n) => n.r);
|
|
296
|
+
const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-ByIwuAC-.mjs").then((n) => n.v);
|
|
320
297
|
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
321
298
|
errorPhase = void 0;
|
|
322
299
|
setPhase("prepare");
|
|
@@ -426,7 +403,10 @@ async function withCodexAppServerJsonClient(params, run) {
|
|
|
426
403
|
});
|
|
427
404
|
} catch (error) {
|
|
428
405
|
const deadlineObserved = isPastDeadline();
|
|
429
|
-
|
|
406
|
+
observeControl(params.controlObservation, deadlineObserved ? activePhase : errorPhase ?? activePhase, {
|
|
407
|
+
error,
|
|
408
|
+
deadlineObserved
|
|
409
|
+
});
|
|
430
410
|
if (deadlineObserved) {
|
|
431
411
|
timeoutDiagnostics?.timeout();
|
|
432
412
|
throw new Error(timeoutMessage, { cause: error });
|
|
@@ -16,7 +16,9 @@ function codexPrewriteRejectionCause(error) {
|
|
|
16
16
|
/** RPC error wrapper that preserves app-server error code and data. */
|
|
17
17
|
var CodexAppServerRpcError = class extends Error {
|
|
18
18
|
constructor(error, method) {
|
|
19
|
-
|
|
19
|
+
const message = error.message || `${method} failed`;
|
|
20
|
+
const detail = readCodexAppServerRpcReloginDetail(error.data);
|
|
21
|
+
super(detail && !message.includes(detail) ? `${message}: ${detail}` : message);
|
|
20
22
|
this.name = "CodexAppServerRpcError";
|
|
21
23
|
this.code = error.code;
|
|
22
24
|
this.data = error.data;
|
|
@@ -26,11 +28,6 @@ var CodexAppServerRpcError = class extends Error {
|
|
|
26
28
|
function isCodexThreadReadMissingError(error, threadId) {
|
|
27
29
|
return error instanceof CodexAppServerRpcError && error.method === "thread/read" && error.code === -32600 && error.message === `thread not loaded: ${threadId}`;
|
|
28
30
|
}
|
|
29
|
-
function formatCodexAppServerRpcErrorMessage(error, method) {
|
|
30
|
-
const message = error.message || `${method} failed`;
|
|
31
|
-
const detail = readCodexAppServerRpcReloginDetail(error.data);
|
|
32
|
-
return detail && !message.includes(detail) ? `${message}: ${detail}` : message;
|
|
33
|
-
}
|
|
34
31
|
function readCodexAppServerRpcReloginDetail(data) {
|
|
35
32
|
const record = isJsonObject(data) ? data : void 0;
|
|
36
33
|
const nested = isJsonObject(record?.error) ? record.error : record;
|