@openclaw/codex 2026.9.8 → 2026.10.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/.setup/{account-usage-runtime-G348lY1q.mjs → account-usage-runtime-DGqFpAud.mjs} +5 -5
- package/dist/.setup/app-server-policy-Bg4FZw1f.mjs +23 -0
- package/dist/.setup/{apply-Cqb-YoCS.mjs → apply-CXTudl9p.mjs} +48 -39
- package/dist/.setup/attempt-client-cleanup-BH0hW2xU.mjs +155 -0
- package/dist/.setup/{attempt-workspace-context-BJ5Z_olH.mjs → attempt-workspace-context-BY0jprWJ.mjs} +11 -15
- package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-BoMwpuPN.mjs} +17 -25
- package/dist/.setup/{auth-cache-key-Dnps4W4_.mjs → auth-cache-key-CGm0UJOr.mjs} +244 -82
- package/dist/.setup/{auth-profile-B0okYl2D.mjs → auth-profile-CgHQ8Vot.mjs} +2 -1
- package/dist/.setup/{auth-profile-selection-DFu9e167.mjs → auth-profile-selection-hr8ocLtz.mjs} +5 -7
- package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-C-08ez1w.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-Dn2p-fdy.mjs} +3 -3
- package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-DklXNk3k.mjs} +4 -4
- package/dist/.setup/{bounded-turn-BNunZPtz.mjs → bounded-turn-pGsfXcmH.mjs} +14 -13
- package/dist/.setup/{build-state-DIQ5O_-S.mjs → build-state-CqQnsg7T.mjs} +1 -1
- package/dist/.setup/{capabilities-B3WEZl4e.mjs → capabilities-kQntafj_.mjs} +1 -1
- package/dist/.setup/{client-qyUBJlGZ.mjs → client-C8lgBOoO.mjs} +438 -160
- package/dist/.setup/{client-catalog-response-DRvx_wCC.mjs → client-catalog-response-Bqp7WG51.mjs} +57 -25
- package/dist/.setup/command-authorization-AikPDtcc.mjs +15 -0
- package/dist/.setup/{command-dispatch-Btrs1D6f.mjs → command-dispatch-DhBbFIQ5.mjs} +3 -3
- package/dist/.setup/{command-formatters-R3ckE3Co.mjs → command-formatters-DV3DHhdr.mjs} +7 -5
- package/dist/.setup/{command-handlers-DvlCHJch.mjs → command-handlers-ztOOzm6O.mjs} +82 -144
- package/dist/.setup/{command-rpc-skzRq4wD.mjs → command-rpc-CuC5fPom.mjs} +23 -31
- package/dist/.setup/{compact-8ttks5U5.mjs → compact-tUb9AYfH.mjs} +117 -65
- package/dist/.setup/{plugin-metadata-cache-BRwtRct9.mjs → computer-use-BBN9y326.mjs} +65 -202
- package/dist/.setup/{config-DKhXquav.mjs → config-0Gxk3_eq.mjs} +5 -6
- package/dist/.setup/{config-options-CzyWLTJt.mjs → config-options-HG_Rr3W_.mjs} +13 -23
- package/dist/.setup/{config-parsing-b088LyhT.mjs → config-parsing-BQq-CHTF.mjs} +41 -4
- package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-cUYrqu_a.mjs} +2 -2
- package/dist/.setup/{config-security-CE-FcGw9.mjs → config-security-KAPScztc.mjs} +20 -36
- package/dist/.setup/{context-engine-projection-PezSESth.mjs → context-engine-projection-CsgYSQhW.mjs} +11 -14
- package/dist/.setup/{conversation-binding-74LaGGH-.mjs → conversation-binding-B3MNMVzb.mjs} +36 -48
- package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DJ4ix-W5.mjs} +1 -1
- package/dist/.setup/{conversation-control-OrN6zuaY.mjs → conversation-control-CYsMlCuE.mjs} +19 -21
- package/dist/.setup/{cyber-failover-XV0nNRZu.mjs → cyber-failover-Bb1J6hS1.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-RNpGpTyP.mjs → cyber-failover-notice-XR03ef31.mjs} +1 -1
- package/dist/.setup/doctor-start-options-DPW9JxIE.mjs +63 -0
- package/dist/.setup/dynamic-tool-build-C8xGEXmR.mjs +463 -0
- package/dist/.setup/{dynamic-tools-Db2sY5cZ.mjs → dynamic-tools-DyERJnR6.mjs} +238 -878
- package/dist/.setup/{effective-mcp-catalog-Bi6-SQ7i.mjs → effective-mcp-catalog-C26Mio5l.mjs} +83 -11
- package/dist/.setup/{elicitation-input-DPoK8F7w.mjs → elicitation-input-r9axtppm.mjs} +4 -2
- package/dist/.setup/{ephemeral-turn-DiCS1ijR.mjs → ephemeral-turn-D8VcDTNo.mjs} +2 -2
- package/dist/.setup/{event-projector-assistant-message-MV_1dj-3.mjs → event-projector-assistant-message-BN7CNUB5.mjs} +2 -2
- package/dist/.setup/{event-projector-values-DJSz8BTk.mjs → event-projector-values-DTqZHizf.mjs} +2 -12
- package/dist/.setup/{inference-dispatch-CMZtjQyz.mjs → inference-dispatch-B5UKEUyC.mjs} +12 -21
- package/dist/.setup/{inference-proxy-DhcXOgUE.mjs → inference-proxy-DUO5E2QQ.mjs} +6 -5
- package/dist/.setup/{isolated-completion-D80IXfQF.mjs → isolated-completion-C0jrcplS.mjs} +8 -8
- package/dist/.setup/{managed-binary-kiWRhNRE.mjs → managed-binary-C1VFoVPf.mjs} +31 -38
- package/dist/.setup/mcp-app-session-preparation-BxN0_CYe.mjs +223 -0
- package/dist/.setup/mcp-tool-metadata-j10HhfTC.mjs +43 -0
- package/dist/.setup/{model-catalog-DiC0Tkha.mjs → model-catalog-DZyNeDKG.mjs} +7 -7
- package/dist/.setup/{models-DfLmPV0k.mjs → models-DSseKSMg.mjs} +10 -7
- package/dist/.setup/{native-auth-CuG53tu4.mjs → native-auth-Cjb9y7IZ.mjs} +5 -6
- package/dist/.setup/{native-execution-policy-BxZJy5mP.mjs → native-execution-policy-ClzpdG3D.mjs} +1 -12
- package/dist/.setup/native-mcp-app-CqcPVmhH.mjs +310 -0
- package/dist/.setup/{native-subagent-monitor-BwkQXf9e.mjs → native-subagent-monitor-BUYOUp9X.mjs} +235 -318
- package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-BDqhOdJp.mjs} +0 -4
- package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-C6KVqiN1.mjs} +9 -8
- package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-B5oNDkUS.mjs} +11 -17
- package/dist/.setup/{node-exec-server.runtime-BgBfWQqo.mjs → node-exec-server.runtime-0xSEjKYt.mjs} +2 -2
- package/dist/.setup/{plan-DPdMk1Oy.mjs → plan-BJ37d2Og.mjs} +67 -89
- package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BcyBv8PG.mjs} +4 -4
- package/dist/.setup/{plugin-app-cache-key-BL9B5H0L.mjs → plugin-app-cache-key-BW8rd98k.mjs} +11 -15
- package/dist/.setup/plugin-approval-roundtrip-CuahdPLC.mjs +109 -0
- package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-Bf0_piTw.mjs} +29 -51
- package/dist/.setup/{plugin-marketplace-discovery-D_dV9FXa.mjs → plugin-marketplace-discovery-SQPhSuic.mjs} +2 -16
- package/dist/.setup/plugin-metadata-cache-DWnB7VMj.mjs +84 -0
- package/dist/.setup/plugin-thread-config-deadline-B8LGaZNW.mjs +124 -0
- package/dist/.setup/{provider-D6F_7p1I.mjs → provider-BnwHVD_z.mjs} +4 -4
- package/dist/.setup/provider-capabilities-D68Whix6.mjs +50 -0
- package/dist/.setup/{rate-limits-B7-X2TgG.mjs → rate-limits-CMPy24F5.mjs} +1 -5
- package/dist/.setup/{request-BZOfsSXW.mjs → request-jSbhc1sg.mjs} +189 -49
- package/dist/.setup/rpc-error-hmWM21RB.mjs +57 -0
- package/dist/.setup/{run-attempt-dYJhjZrp.mjs → run-attempt-BLDZeYLD.mjs} +553 -727
- package/dist/.setup/{run-attempt-lifecycle-C-6O3Exn.mjs → run-attempt-lifecycle-BuZgVbDA.mjs} +19 -3
- package/dist/.setup/{runtime-artifact-DDQ-HGXf.mjs → runtime-artifact-CUTOOnKw.mjs} +5 -6
- package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-CADz3_BY.mjs} +5 -4
- package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-WqE8yPge.mjs} +3 -3
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +15 -0
- package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Ce7BqiPN.mjs} +92 -102
- package/dist/.setup/session-binding-meta-Lkm5Lpf4.mjs +15 -0
- package/dist/.setup/session-binding-record-BZB8RgcF.mjs +179 -0
- package/dist/.setup/session-binding-record-codec-z4ZpDn6E.mjs +216 -0
- package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BrdV95Fg.mjs} +8 -2
- package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-CPIP4S_y.mjs} +34 -18
- package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-DcgwvSbF.mjs} +24 -29
- package/dist/.setup/{session-catalog-events-BMCFMZw-.mjs → session-catalog-events-Bdjw9HEn.mjs} +5 -5
- package/dist/.setup/{session-catalog-index-DwJjnF5k.mjs → session-catalog-index-DufISKJ6.mjs} +361 -72
- package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-nhyO0wdW.mjs} +1 -1
- package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-DEU36Qlo.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-list-request-tXephOB4.mjs} +180 -6
- package/dist/.setup/{session-catalog-native-projection-CuaFZuQE.mjs → session-catalog-native-projection-D6IiLtMb.mjs} +7 -6
- package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-7-WEQTB1.mjs} +12 -2
- package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-DLWBwAAO.mjs} +11 -15
- package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-Uufckwcm.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-B-qWJh2x.mjs} +70 -28
- package/dist/.setup/{session-catalog-projection-CGfzfP93.mjs → session-catalog-projection-8aHNwzWD.mjs} +6 -122
- package/dist/.setup/{session-catalog-provenance-DoAvktcj.mjs → session-catalog-provenance-CmsOE5mh.mjs} +6 -1
- package/dist/.setup/{session-cli-DlmBHYIe.mjs → session-cli-kH4vuGod.mjs} +1 -2
- package/dist/.setup/{session-history-D83lJWHG.mjs → session-history-BogBHKLk.mjs} +1 -1
- package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-NWKPa4ZO.mjs} +4 -4
- package/dist/.setup/{session-history-read-Ov3StuL4.mjs → session-history-read-CNN8zwbD.mjs} +8 -19
- package/dist/.setup/{session-history.worker-MnPKncqP.mjs → session-history.worker-Cq_4DYgN.mjs} +3 -3
- package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-D6dtFQkE.mjs} +2 -2
- package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-BxIUJ0Zd.mjs} +8 -37
- package/dist/.setup/{session-retirement-LlYWBKTJ.mjs → session-retirement-Czbchv_O.mjs} +14 -15
- package/dist/.setup/{settled-turn-context-D4yj4rxf.mjs → settled-turn-context-BZsMjkIO.mjs} +13 -6
- package/dist/.setup/{settled-turn-finalizer-DW9W3gza.mjs → settled-turn-finalizer-DjZsIwbZ.mjs} +8 -8
- package/dist/.setup/{shared-client-CJCTeFpQ.mjs → shared-client-qhyYWbew.mjs} +291 -272
- package/dist/.setup/{provider-capabilities-DG5qbsUZ.mjs → shell-dynamic-tools-D3Brj3g9.mjs} +16 -55
- package/dist/.setup/{side-question-BLeGj7TQ.mjs → side-question-D3NJlgbl.mjs} +99 -91
- package/dist/.setup/{source-CJis_1EF.mjs → source-BYu0T780.mjs} +24 -40
- package/dist/.setup/{thread-lifecycle-_bAbjedG.mjs → thread-lifecycle-Cbz_7ySv.mjs} +262 -305
- package/dist/.setup/{thread-ownership-B6pPt21M.mjs → thread-ownership-DwuSrt3s.mjs} +10 -8
- package/dist/.setup/{thread-policy-gNPzzpVp.mjs → thread-policy-DoNxbhqt.mjs} +22 -21
- package/dist/.setup/{thread-requests-OWGOiDaV.mjs → thread-requests-CL1e8Wmx.mjs} +107 -98
- package/dist/.setup/{thread-resume-GOry0AYh.mjs → thread-resume-BT6NHMkM.mjs} +10 -18
- package/dist/.setup/{transcript-history-projection-DRSifI-1.mjs → transcript-history-projection-B9a7HwUV.mjs} +11 -16
- package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BfLRARNL.mjs} +64 -67
- package/dist/.setup/{transport-stdio-Bdegpn2V.mjs → transport-stdio-a0HDa2Mj.mjs} +27 -8
- package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zqJ0Cmtn.mjs} +3 -8
- package/dist/.setup/{attempt-client-cleanup-B-S7ngS_.mjs → turn-router-sS69wYnI.mjs} +75 -170
- package/dist/.setup/{upstream-session-fork-gkdRj2yH.mjs → upstream-session-fork-ChSld66u.mjs} +35 -46
- package/dist/.setup/{usage-CApUvLOV.mjs → usage-D8e8Xiqf.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-wSMQkbpV.mjs → usage-limit-error-GbT-5NcW.mjs} +4 -4
- package/dist/.setup/{web-search-provider.runtime-UKgeiBUG.mjs → web-search-provider.runtime-dL2GD1Kl.mjs} +4 -20
- package/dist/.setup/websocket-data-XlRvt8Ys.mjs +6 -0
- package/dist/.setup/workspace-write-sandbox-probe-DmUHLrrl.mjs +118 -0
- package/dist/api.js +34 -54
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +15 -27
- package/dist/harness.js +37 -22
- package/dist/index.js +2880 -276
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-session-binding-api.js +2 -0
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +33 -4
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +3 -3
- package/package.json +6 -6
- package/dist/.setup/config-utils-D0CXecki.mjs +0 -57
- package/dist/.setup/incognito-session-DWYapfwf.mjs +0 -2
- package/dist/.setup/managed-thread-store-BMqgThVL.mjs +0 -100
- package/dist/.setup/rpc-error-BlD2vuzn.mjs +0 -31
- package/dist/.setup/session-binding-meta-B7aEMU7g.mjs +0 -6
- package/dist/.setup/session-binding-record-Oe9L-CNY.mjs +0 -375
- package/dist/.setup/session-catalog-BFafIiF6.mjs +0 -2599
- package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +0 -170
- package/dist/.setup/shared-client-lifecycle-7xgtlo15.mjs +0 -153
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as describeControlFailure, t as CODEX_CONTROL_METHODS } from "./capabilities-
|
|
4
|
-
import {
|
|
5
|
-
import "./config-
|
|
6
|
-
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-
|
|
7
|
-
import { a as resolveCodexAppServerAuthProfileStore, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-
|
|
8
|
-
import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-
|
|
9
|
-
import {
|
|
10
|
-
import { o as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-
|
|
11
|
-
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-
|
|
12
|
-
import { r as listCodexAppServerModels } from "./models-
|
|
13
|
-
import {
|
|
14
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
15
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
2
|
+
import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-hmWM21RB.mjs";
|
|
3
|
+
import { n as describeControlFailure, t as CODEX_CONTROL_METHODS } from "./capabilities-kQntafj_.mjs";
|
|
4
|
+
import { a as withCodexAppServerJsonClient, r as requestCodexAppServerJson } from "./request-jSbhc1sg.mjs";
|
|
5
|
+
import "./config-0Gxk3_eq.mjs";
|
|
6
|
+
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
|
|
7
|
+
import { a as resolveCodexAppServerAuthProfileStore, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-CgHQ8Vot.mjs";
|
|
8
|
+
import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-qhyYWbew.mjs";
|
|
9
|
+
import { a as isCodexAppServerIndeterminateRequestCancellationError, o as isCodexAppServerIndeterminateTransportError } from "./client-C8lgBOoO.mjs";
|
|
10
|
+
import { o as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-BH0hW2xU.mjs";
|
|
11
|
+
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BoMwpuPN.mjs";
|
|
12
|
+
import { r as listCodexAppServerModels } from "./models-DSseKSMg.mjs";
|
|
13
|
+
import { o as createCodexSessionGenerationSupersededError } from "./session-binding-Ce7BqiPN.mjs";
|
|
14
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-BT6NHMkM.mjs";
|
|
15
|
+
import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
|
|
16
16
|
import { resolveAgentDir, resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
17
|
-
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
18
17
|
import { prepareAgentRuntimeAuth } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
18
|
+
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
19
19
|
import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
20
20
|
import { resolveSessionModelRef } from "openclaw/plugin-sdk/model-session-runtime";
|
|
21
21
|
import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
|
|
@@ -210,24 +210,16 @@ async function safeCodexControlRequest(pluginConfig, method, requestParams, opti
|
|
|
210
210
|
return await safeValue(async () => await codexControlRequest(pluginConfig, method, requestParams, options));
|
|
211
211
|
}
|
|
212
212
|
async function readCodexStatusProbes(pluginConfig, config, agentDir) {
|
|
213
|
+
const options = {
|
|
214
|
+
config,
|
|
215
|
+
agentDir
|
|
216
|
+
};
|
|
213
217
|
const [models, account, limits, mcps, skills] = await Promise.all([
|
|
214
218
|
safeValue(() => listCodexAppServerModels(requestOptions(pluginConfig, 20, config, agentDir))),
|
|
215
|
-
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.account, { refreshToken: false },
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
})
|
|
219
|
-
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.rateLimits, void 0, {
|
|
220
|
-
config,
|
|
221
|
-
agentDir
|
|
222
|
-
}),
|
|
223
|
-
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.listMcpServers, { limit: 100 }, {
|
|
224
|
-
config,
|
|
225
|
-
agentDir
|
|
226
|
-
}),
|
|
227
|
-
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.listSkills, {}, {
|
|
228
|
-
config,
|
|
229
|
-
agentDir
|
|
230
|
-
})
|
|
219
|
+
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.account, { refreshToken: false }, options),
|
|
220
|
+
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.rateLimits, void 0, options),
|
|
221
|
+
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.listMcpServers, { limit: 100 }, options),
|
|
222
|
+
safeCodexControlRequest(pluginConfig, CODEX_CONTROL_METHODS.listSkills, {}, options)
|
|
231
223
|
]);
|
|
232
224
|
return {
|
|
233
225
|
models,
|
|
@@ -1,31 +1,62 @@
|
|
|
1
1
|
import { n as readCodexRuntimeModelId } from "./model-runtime-BdqzOMkU.mjs";
|
|
2
2
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-
|
|
8
|
-
import { F as consumeCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, U as protectCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientIfCurrent, q as
|
|
3
|
+
import { m as sessionBindingIdentity } from "./session-binding-record-BZB8RgcF.mjs";
|
|
4
|
+
import { E as waitForCodexAppServerClientExit, S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-CGm0UJOr.mjs";
|
|
5
|
+
import { t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-meta-Lkm5Lpf4.mjs";
|
|
6
|
+
import { i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-hmWM21RB.mjs";
|
|
7
|
+
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-C-08ez1w.mjs";
|
|
8
|
+
import { F as consumeCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, U as protectCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientIfCurrent, q as revertCodexAppServerLiveThreadInstructions, s as createIsolatedCodexAppServerClient } from "./shared-client-qhyYWbew.mjs";
|
|
9
9
|
import "./responses-oauth-twnuTaAa.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { a as isCodexAppServerIndeterminateRequestCancellationError, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-C8lgBOoO.mjs";
|
|
11
|
+
import { o as readCodexNotificationThreadId, s as readCodexNotificationTurnId } from "./turn-router-sS69wYnI.mjs";
|
|
12
|
+
import { c as isCodexNoActiveTurnInterruptError, f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-BH0hW2xU.mjs";
|
|
12
13
|
import { n as readCodexThreadContextSnapshot, s as readCodexNotificationItem } from "./event-projector-usage-03R0I2dM.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-
|
|
15
|
-
import { i as assertCodexSupervisionThreadLineage } from "./thread-policy-
|
|
16
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
17
|
-
import { s as withCodexAppServerThreadMutationHold, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
14
|
+
import { r as resolveCodexSessionBinding } from "./session-binding-Ce7BqiPN.mjs";
|
|
15
|
+
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-BUYOUp9X.mjs";
|
|
16
|
+
import { i as assertCodexSupervisionThreadLineage } from "./thread-policy-DoNxbhqt.mjs";
|
|
17
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-BT6NHMkM.mjs";
|
|
18
|
+
import { s as withCodexAppServerThreadMutationHold, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DwuSrt3s.mjs";
|
|
19
|
+
import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-WqE8yPge.mjs";
|
|
18
20
|
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
|
|
19
|
-
import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-DjCz2eOw.mjs";
|
|
20
21
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
21
22
|
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
23
|
+
import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
|
|
22
24
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
23
25
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
+
import { AgentHarnessSessionSupersededError, embeddedAgentLog, resolveCompactionTimeoutMs } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
27
|
+
import { resolveAgentDir as resolveAgentDir$1 } from "openclaw/plugin-sdk/agent-runtime";
|
|
26
28
|
import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
|
|
29
|
+
import { createNativeSessionBindingAuthority } from "openclaw/plugin-sdk/agent-harness-session-runtime";
|
|
27
30
|
import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
28
31
|
//#region extensions/codex/src/app-server/compact-helpers.ts
|
|
32
|
+
/** Settles the consumed subscription without returning stale ownership to the next turn. */
|
|
33
|
+
async function settleCodexCompactionSubscription(params) {
|
|
34
|
+
let retained = false;
|
|
35
|
+
try {
|
|
36
|
+
if (params.compacted) await params.authority.withCurrent(() => revertCodexAppServerLiveThreadInstructions(params.client, params.binding.threadId));
|
|
37
|
+
const ownership = params.ownership;
|
|
38
|
+
if (ownership) retained = await params.bindingStore.withLease(params.identity, async () => {
|
|
39
|
+
let pendingRetention;
|
|
40
|
+
try {
|
|
41
|
+
await params.authority.withCurrent(() => {
|
|
42
|
+
if (!isSameCodexAppServerThreadOwner(params.bindingStore.read(params.identity), params.binding)) return;
|
|
43
|
+
pendingRetention = retainCodexAppServerLiveThread(params.client, params.binding.threadId, ownership.release, ownership.configFingerprint, ownership.serviceTier, ownership.ephemeralPolicy && params.compacted ? {
|
|
44
|
+
...ownership.ephemeralPolicy,
|
|
45
|
+
refreshableInstructions: ownership.ephemeralPolicy.nativeRefreshableInstructions
|
|
46
|
+
} : ownership.ephemeralPolicy);
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
await pendingRetention;
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
return pendingRetention ? await pendingRetention : false;
|
|
53
|
+
}, { authority: params.authority });
|
|
54
|
+
} catch (error) {
|
|
55
|
+
if (!(error instanceof AgentHarnessSessionSupersededError)) throw error;
|
|
56
|
+
} finally {
|
|
57
|
+
if (!retained) await params.release?.();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
29
60
|
async function clearContextEngineProjectionBeforeNativeCompaction(params) {
|
|
30
61
|
const contextEngineBinding = params.binding.contextEngine;
|
|
31
62
|
if (!contextEngineBinding?.projection) return;
|
|
@@ -36,7 +67,7 @@ async function clearContextEngineProjectionBeforeNativeCompaction(params) {
|
|
|
36
67
|
...contextEngineBinding,
|
|
37
68
|
projection: void 0
|
|
38
69
|
} }
|
|
39
|
-
}, params.assertCurrent);
|
|
70
|
+
}, params.assertCurrent, params.authority);
|
|
40
71
|
embeddedAgentLog.info("cleared codex context-engine projection before native compaction", {
|
|
41
72
|
sessionId: params.sessionId,
|
|
42
73
|
threadId: params.binding.threadId,
|
|
@@ -76,6 +107,16 @@ function readIgnoredCompactionOverridePaths(params) {
|
|
|
76
107
|
return typeof value === "string" && value.trim() ? [`agents.defaults.compaction.${field}`] : [];
|
|
77
108
|
});
|
|
78
109
|
}
|
|
110
|
+
function resolveCodexCompactionExecutionBlock(params) {
|
|
111
|
+
return resolveCodexNativeExecutionBlock({
|
|
112
|
+
config: params.config,
|
|
113
|
+
sessionKey: params.sandboxSessionKey ?? params.sessionKey,
|
|
114
|
+
sessionId: params.sessionId,
|
|
115
|
+
agentId: params.sandboxAgentId ?? params.agentId,
|
|
116
|
+
sandbox: params.sandbox,
|
|
117
|
+
surface: "native compaction"
|
|
118
|
+
});
|
|
119
|
+
}
|
|
79
120
|
//#endregion
|
|
80
121
|
//#region extensions/codex/src/app-server/compact-lifecycle.ts
|
|
81
122
|
function watchCodexNativeCompactionCompletion(params) {
|
|
@@ -168,8 +209,7 @@ function watchCodexNativeCompactionCompletion(params) {
|
|
|
168
209
|
completionTimeout.unref?.();
|
|
169
210
|
};
|
|
170
211
|
removeNotificationHandler = params.client.addNotificationHandler((notification) => {
|
|
171
|
-
if (!requestStarted) return;
|
|
172
|
-
if (!isJsonObject(notification.params)) return;
|
|
212
|
+
if (!requestStarted || !isJsonObject(notification.params)) return;
|
|
173
213
|
if (readCodexNotificationThreadId(notification.params) !== params.threadId) return;
|
|
174
214
|
const notificationTurnId = readCodexNotificationTurnId(notification.params);
|
|
175
215
|
if (notification.method === "turn/started") {
|
|
@@ -325,15 +365,7 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
325
365
|
}
|
|
326
366
|
});
|
|
327
367
|
}
|
|
328
|
-
const
|
|
329
|
-
const nativeExecutionBlock = resolveCodexNativeExecutionBlock({
|
|
330
|
-
config: params.config,
|
|
331
|
-
sessionKey: params.sandboxSessionKey ?? params.sessionKey,
|
|
332
|
-
sessionId: params.sessionId,
|
|
333
|
-
agentId: params.sandboxAgentId ?? params.agentId,
|
|
334
|
-
sandbox,
|
|
335
|
-
surface: "native compaction"
|
|
336
|
-
});
|
|
368
|
+
const nativeExecutionBlock = resolveCodexCompactionExecutionBlock(params);
|
|
337
369
|
if (nativeExecutionBlock) return {
|
|
338
370
|
ok: false,
|
|
339
371
|
compacted: false,
|
|
@@ -371,7 +403,10 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
371
403
|
if (!params.abortSignal?.aborted) throw error;
|
|
372
404
|
return abortedResult(params, options.bindingStore.read(bindingIdentity)?.threadId);
|
|
373
405
|
}
|
|
374
|
-
const { binding: initialBinding,
|
|
406
|
+
const { binding: initialBinding, authority } = resolvedBinding;
|
|
407
|
+
const assertCurrent = authority.assertCurrent;
|
|
408
|
+
const settlementAuthority = createNativeSessionBindingAuthority(authority.lineage, () => {});
|
|
409
|
+
const assertSettlementCurrent = settlementAuthority.assertCurrent;
|
|
375
410
|
if (!initialBinding?.threadId) return failedCodexThreadBindingCompactionResult(params, {
|
|
376
411
|
reason: "no codex app-server thread binding",
|
|
377
412
|
recovery: "missing_thread_binding"
|
|
@@ -402,7 +437,7 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
402
437
|
pluginConfig: options.pluginConfig,
|
|
403
438
|
config,
|
|
404
439
|
assertCurrent,
|
|
405
|
-
agentDir: resolveAgentDir(config, bindingIdentity.agentId)
|
|
440
|
+
agentDir: resolveAgentDir$1(config, bindingIdentity.agentId)
|
|
406
441
|
});
|
|
407
442
|
} catch (error) {
|
|
408
443
|
return {
|
|
@@ -452,11 +487,14 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
452
487
|
};
|
|
453
488
|
try {
|
|
454
489
|
return await withCodexAppServerThreadMutationHold(binding.threadId, async (hold, start) => {
|
|
455
|
-
assertAdmissionCurrent
|
|
490
|
+
await authority.withCurrent(assertAdmissionCurrent);
|
|
456
491
|
const boundClientLease = await retainSharedCodexAppServerClientByInstanceId(binding.clientId);
|
|
457
|
-
|
|
458
|
-
await
|
|
492
|
+
try {
|
|
493
|
+
await authority.withCurrent(assertAdmissionCurrent);
|
|
459
494
|
attempt.abortSignal.throwIfAborted();
|
|
495
|
+
} catch (error) {
|
|
496
|
+
await boundClientLease?.release();
|
|
497
|
+
throw error;
|
|
460
498
|
}
|
|
461
499
|
const client = boundClientLease?.client ?? await clientFactory({
|
|
462
500
|
startOptions: appServer.start,
|
|
@@ -481,6 +519,10 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
481
519
|
let compactionSucceeded = false;
|
|
482
520
|
let temporaryClientExited = true;
|
|
483
521
|
let compactionRequestDefinitelyRejected = false;
|
|
522
|
+
let nativeRequestNeedsSettlement = false;
|
|
523
|
+
const leaseAuthority = createNativeSessionBindingAuthority(authority.lineage, () => {
|
|
524
|
+
if (!nativeRequestNeedsSettlement && !compactionRequestDefinitelyRejected) assertAdmissionCurrent();
|
|
525
|
+
});
|
|
484
526
|
let tokensAfter;
|
|
485
527
|
let modelOwner;
|
|
486
528
|
const releaseCompactionThread = async (threadId) => {
|
|
@@ -526,9 +568,11 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
526
568
|
if (usesSupervisionConnection) throw new Error("cannot detach an unconfirmed supervised codex thread");
|
|
527
569
|
if (await options.bindingStore.mutate(bindingIdentity, {
|
|
528
570
|
kind: "clear",
|
|
529
|
-
threadId: binding.threadId
|
|
530
|
-
|
|
531
|
-
|
|
571
|
+
threadId: binding.threadId,
|
|
572
|
+
clientId: binding.clientId
|
|
573
|
+
}, assertSettlementCurrent, settlementAuthority)) return;
|
|
574
|
+
const currentBinding = options.bindingStore.read(bindingIdentity);
|
|
575
|
+
if (currentBinding?.threadId !== binding.threadId || currentBinding.clientId !== binding.clientId) return;
|
|
532
576
|
throw new Error("failed to detach unconfirmed codex app-server thread binding");
|
|
533
577
|
}
|
|
534
578
|
});
|
|
@@ -544,7 +588,8 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
544
588
|
excludeTurns: true
|
|
545
589
|
},
|
|
546
590
|
timeoutMs: timeoutMs ?? appServer.requestTimeoutMs,
|
|
547
|
-
assertCurrent,
|
|
591
|
+
assertCurrent: assertAdmissionCurrent,
|
|
592
|
+
withCurrent: authority.withCurrent,
|
|
548
593
|
signal: attempt.abortSignal
|
|
549
594
|
});
|
|
550
595
|
releaseThreadSubscription = async () => releaseCompactionThread(binding.threadId);
|
|
@@ -554,10 +599,14 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
554
599
|
const { thread } = await client.request("thread/read", {
|
|
555
600
|
threadId: binding.threadId,
|
|
556
601
|
includeTurns: false
|
|
557
|
-
}, {
|
|
558
|
-
|
|
602
|
+
}, {
|
|
603
|
+
assertCurrent: assertAdmissionCurrent,
|
|
604
|
+
withCurrent: authority.withCurrent
|
|
605
|
+
});
|
|
559
606
|
retainedThreadOwnership.assertCurrent();
|
|
560
607
|
assertCodexSupervisionThreadLineage(binding, thread);
|
|
608
|
+
canRetainThreadOwnership = true;
|
|
609
|
+
assertAdmissionCurrent();
|
|
561
610
|
}
|
|
562
611
|
releaseThreadSubscription ??= async () => releaseCompactionThread(binding.threadId);
|
|
563
612
|
}
|
|
@@ -630,37 +679,34 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
630
679
|
bindingStore: options.bindingStore,
|
|
631
680
|
identity: bindingIdentity,
|
|
632
681
|
binding,
|
|
633
|
-
assertCurrent: assertAdmissionCurrent
|
|
682
|
+
assertCurrent: assertAdmissionCurrent,
|
|
683
|
+
authority
|
|
634
684
|
});
|
|
635
685
|
assertAdmissionCurrent();
|
|
636
686
|
try {
|
|
637
687
|
canRetainThreadOwnership = false;
|
|
638
688
|
completionWatch.beginRequest();
|
|
689
|
+
nativeRequestNeedsSettlement = true;
|
|
639
690
|
await client.request("thread/compact/start", { threadId: binding.threadId }, {
|
|
640
691
|
...guardedRequestTimeoutMs === void 0 ? {} : { timeoutMs: guardedRequestTimeoutMs },
|
|
641
692
|
signal: attempt.abortSignal,
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
assertAdmissionCurrent();
|
|
645
|
-
} catch (error) {
|
|
646
|
-
compactionRequestDefinitelyRejected = true;
|
|
647
|
-
throw error;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
693
|
+
withCurrent: authority.withCurrent,
|
|
694
|
+
assertCurrent: assertAdmissionCurrent
|
|
650
695
|
});
|
|
651
696
|
return {
|
|
652
697
|
started: true,
|
|
653
698
|
accepted: true
|
|
654
699
|
};
|
|
655
700
|
} catch (error) {
|
|
656
|
-
compactionRequestDefinitelyRejected ||= isCodexAppServerPrewriteRequestCancellationError(error) || error instanceof CodexAppServerRpcError;
|
|
701
|
+
compactionRequestDefinitelyRejected ||= error instanceof CodexAppServerScopedRequestRejectedError || isCodexAppServerPrewriteRequestCancellationError(error) || error instanceof CodexAppServerRpcError;
|
|
657
702
|
if (compactionRequestDefinitelyRejected) {
|
|
658
703
|
canRetainThreadOwnership = !isCodexThreadNotFoundError(error);
|
|
659
704
|
completionWatch.confirmRequestRejected();
|
|
705
|
+
nativeRequestNeedsSettlement = false;
|
|
660
706
|
if (error instanceof CodexAppServerRpcError || binding.contextEngine?.projection) await options.bindingStore.mutate(bindingIdentity, {
|
|
661
707
|
kind: "set",
|
|
662
708
|
binding
|
|
663
|
-
},
|
|
709
|
+
}, assertSettlementCurrent, settlementAuthority);
|
|
664
710
|
}
|
|
665
711
|
return {
|
|
666
712
|
started: true,
|
|
@@ -668,12 +714,16 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
668
714
|
error
|
|
669
715
|
};
|
|
670
716
|
}
|
|
717
|
+
}, {
|
|
718
|
+
assertCurrent: () => nativeRequestNeedsSettlement || compactionRequestDefinitelyRejected ? assertSettlementCurrent() : assertAdmissionCurrent(),
|
|
719
|
+
authority: leaseAuthority
|
|
671
720
|
});
|
|
672
721
|
if (!guardedResult.started) return guardedResult.result;
|
|
673
722
|
if (!guardedResult.accepted) {
|
|
674
723
|
if (compactionRequestDefinitelyRejected) throw guardedResult.error;
|
|
675
724
|
if (!attempt.abortSignal.aborted || !isCodexAppServerIndeterminateRequestCancellationError(guardedResult.error)) {
|
|
676
725
|
await completionWatch.retireUnconfirmedRequest(`codex app-server compaction start was unconfirmed: ${coerceErrorMessage(guardedResult.error)}`);
|
|
726
|
+
nativeRequestNeedsSettlement = false;
|
|
677
727
|
throw guardedResult.error;
|
|
678
728
|
}
|
|
679
729
|
}
|
|
@@ -682,7 +732,8 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
682
732
|
threadId: binding.threadId
|
|
683
733
|
});
|
|
684
734
|
const completion = await completionWatch.completion;
|
|
685
|
-
|
|
735
|
+
nativeRequestNeedsSettlement = false;
|
|
736
|
+
await settlementAuthority.withCurrent(assertSettlementCurrent);
|
|
686
737
|
if (!completion.completed) throw new Error(completion.reason);
|
|
687
738
|
compactionSucceeded = true;
|
|
688
739
|
tokensAfter = completion.tokensAfter;
|
|
@@ -696,13 +747,17 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
696
747
|
itemId: completion.itemId,
|
|
697
748
|
timestamp: Date.now()
|
|
698
749
|
});
|
|
699
|
-
|
|
750
|
+
await settlementAuthority.withCurrent(assertSettlementCurrent);
|
|
700
751
|
embeddedAgentLog.info("completed codex app-server compaction", {
|
|
701
752
|
sessionId: attempt.sessionId,
|
|
702
753
|
threadId: binding.threadId
|
|
703
754
|
});
|
|
704
755
|
canRetainThreadOwnership = true;
|
|
705
756
|
} catch (error) {
|
|
757
|
+
if (nativeRequestNeedsSettlement) {
|
|
758
|
+
await completionWatch.retireUnconfirmedRequest(`codex app-server compaction ownership failed after request admission: ${coerceErrorMessage(error)}`);
|
|
759
|
+
nativeRequestNeedsSettlement = false;
|
|
760
|
+
}
|
|
706
761
|
if (isCodexThreadNotFoundError(error)) return failedCodexThreadBindingCompactionResult(attempt, {
|
|
707
762
|
threadId: binding.threadId,
|
|
708
763
|
reason: coerceErrorMessage(error),
|
|
@@ -722,19 +777,16 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
722
777
|
} finally {
|
|
723
778
|
completionWatch.cancel();
|
|
724
779
|
try {
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
} : ownership.ephemeralPolicy);
|
|
736
|
-
}))) await releaseThreadSubscription?.();
|
|
737
|
-
} else await releaseThreadSubscription?.();
|
|
780
|
+
await settleCodexCompactionSubscription({
|
|
781
|
+
client,
|
|
782
|
+
bindingStore: options.bindingStore,
|
|
783
|
+
identity: bindingIdentity,
|
|
784
|
+
binding,
|
|
785
|
+
authority: settlementAuthority,
|
|
786
|
+
ownership: canRetainThreadOwnership ? retainedThreadOwnership : void 0,
|
|
787
|
+
compacted: compactionSucceeded,
|
|
788
|
+
release: releaseThreadSubscription
|
|
789
|
+
});
|
|
738
790
|
} finally {
|
|
739
791
|
try {
|
|
740
792
|
await modelOwner?.unregister();
|