@openclaw/codex 2026.10.5-beta.4 → 2026.10.10-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 +10 -3
- package/dist/.setup/{account-usage-runtime-CoVpNIlD.mjs → account-usage-runtime-BVO-lpvn.mjs} +15 -9
- package/dist/.setup/{app-server-policy-D_zv8J7V.mjs → app-server-policy-Cog6mm2i.mjs} +1 -1
- package/dist/.setup/{apply-BXDMd05l.mjs → apply-tJl5mopa.mjs} +11 -11
- package/dist/.setup/{attempt-client-cleanup-zNuNTKVr.mjs → attempt-client-cleanup-DMJWXGxM.mjs} +14 -8
- package/dist/.setup/attempt-terminal-sZutF0WY.mjs +1 -0
- package/dist/.setup/{attempt-workspace-context-CcwP3DA3.mjs → attempt-workspace-context-GYPLawX6.mjs} +2 -2
- package/dist/.setup/{auth-binding-BaxlhaNx.mjs → auth-binding-830RLAJW.mjs} +2 -2
- package/dist/.setup/{auth-cache-key-f8ODJ_OX.mjs → auth-cache-key-BW1YeaIk.mjs} +92 -80
- package/dist/.setup/{auth-profile-CgHQ8Vot.mjs → auth-profile-auwzSwwy.mjs} +14 -8
- package/dist/.setup/{auth-profile-health-oHizqgye.mjs → auth-profile-health-BVPZU9I8.mjs} +15 -8
- package/dist/.setup/{auth-profile-selection-hr8ocLtz.mjs → auth-profile-selection-Bp5PDk3W.mjs} +24 -7
- package/dist/.setup/{binding-connection-B7HAAZSI.mjs → binding-connection-GTgUj9pi.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-DAXn7iFl.mjs → binding-connection.runtime-RcWR3vQu.mjs} +4 -3
- package/dist/.setup/{bounded-turn-DfIJtRlv.mjs → bounded-turn-BQkmyyjB.mjs} +18 -22
- package/dist/.setup/{bounded-turn-isolation-BfDAo-qZ.mjs → bounded-turn-isolation-D8CDrAVX.mjs} +3 -3
- package/dist/.setup/{build-state-Ds14X10-.mjs → build-state-CjLCC0wm.mjs} +1 -1
- package/dist/.setup/{capabilities-DbOzOglY.mjs → capabilities-DAS-JX1z.mjs} +1 -1
- package/dist/.setup/{client-D93nbdB8.mjs → client--P8jwXvA.mjs} +47 -317
- package/dist/.setup/{client-catalog-response-CuVLp4I0.mjs → client-catalog-response-CsDxVVOZ.mjs} +2 -2
- package/dist/.setup/client-initialize-CjgZcX61.mjs +165 -0
- package/dist/.setup/{command-dispatch-DxdH5a9-.mjs → command-dispatch-DqaVBeR3.mjs} +3 -3
- package/dist/.setup/{command-formatters-xW9KpoSZ.mjs → command-formatters-B_7-QZ1c.mjs} +2 -2
- package/dist/.setup/{command-handlers-fiYvYYq0.mjs → command-handlers-i6mEjvfo.mjs} +539 -406
- package/dist/.setup/command-rpc-B65jEc0r.mjs +296 -0
- package/dist/.setup/compact-AO2H4RJe.mjs +823 -0
- package/dist/.setup/{computer-use-DL2v3Kxq.mjs → computer-use-YUnu0JVx.mjs} +21 -68
- package/dist/.setup/{config-C1YVVLEA.mjs → config-BfrAlTMT.mjs} +3 -3
- package/dist/.setup/{config-options-DDzeNQ8m.mjs → config-options-DMFZkd3X.mjs} +1 -1
- package/dist/.setup/{config-runtime-DWzK-k0n.mjs → config-runtime-BZRizyuG.mjs} +2 -2
- package/dist/.setup/{context-engine-projection-ps-yn_ci.mjs → context-engine-projection-PIeLSnR-.mjs} +16 -30
- package/dist/.setup/{conversation-binding-BieJZRRV.mjs → conversation-binding-CfnUR-IM.mjs} +228 -116
- package/dist/.setup/{conversation-binding-data-UgLuTSQT.mjs → conversation-binding-data-khgW0n-o.mjs} +4 -2
- package/dist/.setup/{conversation-control-GXM3unE4.mjs → conversation-control-B2EpVZEb.mjs} +53 -23
- package/dist/.setup/{cyber-failover-D4dgNfFf.mjs → cyber-failover-CqEZoQsj.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-ljgGGL0s.mjs → cyber-failover-notice-poL3Advd.mjs} +1 -1
- package/dist/.setup/{doctor-start-options-JjTAl-q_.mjs → doctor-start-options-8uIBXIzR.mjs} +8 -5
- package/dist/.setup/{dynamic-tool-build-DcaPmBlE.mjs → dynamic-tool-build-DOub3CB5.mjs} +208 -218
- package/dist/.setup/{dynamic-tools-CnQFnNKH.mjs → dynamic-tools-Us5mvq_N.mjs} +344 -118
- package/dist/.setup/{effective-mcp-catalog-B5HKFZNK.mjs → effective-mcp-catalog-DfUUoeeM.mjs} +11 -9
- package/dist/.setup/{ephemeral-turn-De3qb8EQ.mjs → ephemeral-turn-B2z0RIeF.mjs} +5 -4
- package/dist/.setup/{event-projector-assistant-message-CLMKN4x-.mjs → event-projector-assistant-message-ChOAY7rW.mjs} +16 -11
- package/dist/.setup/{event-projector-usage-BpKfdoTm.mjs → event-projector-usage-CBY0Hkga.mjs} +2 -2
- package/dist/.setup/{event-projector-values-CLvG1Hil.mjs → event-projector-values-yf4us9Pf.mjs} +1 -1
- package/dist/.setup/experimental-features-uGnVDtp-.mjs +19 -0
- package/dist/.setup/inference-context-HRw3PDwn.mjs +209 -0
- package/dist/.setup/{inference-dispatch-CO6tTs4q.mjs → inference-dispatch-C2zVSnrr.mjs} +2 -2
- package/dist/.setup/{inference-metadata-DCvcG_N_.mjs → inference-metadata-CYFWLHVk.mjs} +3 -1
- package/dist/.setup/{inference-proxy-BDWV0djM.mjs → inference-proxy-CiLbHMLf.mjs} +8 -8
- package/dist/.setup/installed-probe-lVC1X5ve.mjs +185 -0
- package/dist/.setup/{isolated-completion-BPJdvk5F.mjs → isolated-completion-CybgD6uU.mjs} +7 -7
- package/dist/.setup/managed-binary-DbKvGXKl.mjs +395 -0
- package/dist/.setup/{mcp-app-session-preparation-Dz2GOwyE.mjs → mcp-app-session-preparation-zUgpDLWR.mjs} +18 -14
- package/dist/.setup/{model-catalog-ZNwltCKl.mjs → model-catalog-CWY3wo0B.mjs} +28 -17
- package/dist/.setup/{models-BHpbAuz8.mjs → models-CmOBxsKF.mjs} +3 -3
- package/dist/.setup/{native-auth-esN5MdIv.mjs → native-auth-DpZIaY8N.mjs} +7 -4
- package/dist/.setup/native-execution-policy-D09tLP-u.mjs +152 -0
- package/dist/.setup/{native-hook-relay-wq7jrNLk.mjs → native-hook-relay-CocOW9YS.mjs} +45 -10
- package/dist/.setup/{native-mcp-app-DX3nyTtc.mjs → native-mcp-app-DrQeLxXj.mjs} +5 -5
- package/dist/.setup/{native-skill-isolation-DSBeF-Yy.mjs → native-skill-isolation-DL4-PQa4.mjs} +7 -7
- package/dist/.setup/{native-subagent-monitor-DOLEIf9r.mjs → native-subagent-monitor-C3CIIaZG.mjs} +485 -239
- package/dist/.setup/{native-subagent-pending-assignments-DmVhedNs.mjs → native-subagent-pending-assignments-CTinVtjo.mjs} +1 -1
- package/dist/.setup/{native-task-assignments-DimsQ9Qa.mjs → native-task-assignments-YJopbaVO.mjs} +9 -5
- package/dist/.setup/{node-cli-sessions-CzKg2nGq.mjs → node-cli-sessions-BuJnBnEq.mjs} +7 -4
- package/dist/.setup/{node-exec-server.runtime-BWkULhBM.mjs → node-exec-server.runtime-CP7RC1Nd.mjs} +3 -3
- package/dist/.setup/{plan-41-YOBMq.mjs → plan-Bqj6VQvQ.mjs} +7 -20
- package/dist/.setup/{plugin-activation-D7WkJMvU.mjs → plugin-activation-CXPWe-hl.mjs} +4 -4
- package/dist/.setup/{plugin-app-cache-key-Bg9DbDI6.mjs → plugin-app-cache-key-DRb-niJc.mjs} +17 -55
- package/dist/.setup/{plugin-approval-roundtrip-CD88q3yx.mjs → plugin-approval-roundtrip-CGEiG7hG.mjs} +1 -1
- package/dist/.setup/{plugin-inventory-CYgdo14P.mjs → plugin-inventory-DE9wcaeH.mjs} +2 -2
- package/dist/.setup/{plugin-metadata-cache-Bi8TAPwX.mjs → plugin-metadata-cache-BqC-a6Fb.mjs} +2 -15
- package/dist/.setup/{project-doc-thread-config-BVcvnps8.mjs → project-doc-thread-config-B0UI3f1D.mjs} +6 -6
- package/dist/.setup/protocol-CaPAVwe9.mjs +12 -0
- package/dist/.setup/{provider-LWKll6dV.mjs → provider-C_1fMsyD.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-Dn2WwH4P.mjs → provider-capabilities-C7pYYpvh.mjs} +1 -1
- package/dist/.setup/{rate-limits-CI8pTPqL.mjs → rate-limits-BpfURnuy.mjs} +1 -1
- package/dist/.setup/{request-Bo0kKABI.mjs → request-C6U8q2uz.mjs} +132 -136
- package/dist/.setup/{responses-oauth-twnuTaAa.mjs → responses-oauth-CCV7aVYF.mjs} +6 -6
- package/dist/.setup/{rpc-error-C98SHchT.mjs → rpc-error-DemqqaxE.mjs} +7 -3
- package/dist/.setup/{run-attempt-ClU8MxhZ.mjs → run-attempt-BhuXanLv.mjs} +595 -426
- package/dist/.setup/{run-attempt-lifecycle-KN4oh-7O.mjs → run-attempt-lifecycle-DN-ATDp9.mjs} +1 -1
- package/dist/.setup/{runtime-artifact-C13pR7tD.mjs → runtime-artifact-CmLWeyJB.mjs} +3 -3
- package/dist/.setup/{runtime-artifact-connection-jS5DeCok.mjs → runtime-artifact-connection-DpWlZ02e.mjs} +3 -3
- package/dist/.setup/{sandbox-guard-DIImwCy1.mjs → sandbox-guard-DneAfNye.mjs} +70 -30
- package/dist/.setup/{session-binding-JEHNMPsr.mjs → session-binding-BgsWcbdY.mjs} +25 -23
- package/dist/.setup/{session-binding-record-DU_0biMD.mjs → session-binding-record-C_THntMe.mjs} +27 -12
- package/dist/.setup/{session-binding-record-codec-BpH8u_G9.mjs → session-binding-record-codec-DvmOI7g_.mjs} +1 -0
- package/dist/.setup/{session-binding-sidecars-DD-enC8w.mjs → session-binding-sidecars-BNSS6WL4.mjs} +55 -63
- package/dist/.setup/session-cancellation-DCN1FcBZ.mjs +43 -0
- package/dist/.setup/{session-catalog-adoption-Ca3OYGYM.mjs → session-catalog-adoption-ppsLlVLB.mjs} +24 -38
- package/dist/.setup/{session-catalog-archive-Bv6gV7x9.mjs → session-catalog-archive-CqLRHJ6z.mjs} +11 -13
- package/dist/.setup/{session-catalog-events-kR2Ot6nX.mjs → session-catalog-events-CEi6SuLQ.mjs} +5 -5
- package/dist/.setup/{session-catalog-index-order-CTfoefow.mjs → session-catalog-index-order-0Zqng2u8.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-CrnfVEnT.mjs → session-catalog-index-qt4UWBua.mjs} +96 -271
- package/dist/.setup/{session-catalog-limits-BynIoOYm.mjs → session-catalog-limits-Dc6E0BZz.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-D4MYNgDB.mjs → session-catalog-list-request-CAjoWjaH.mjs} +3 -4
- package/dist/.setup/{session-catalog-native-projection-CWqCU1I_.mjs → session-catalog-native-projection-BqBYi6kV.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-adoption-BdP9Zjqo.mjs → session-catalog-node-adoption-e9v8mGgx.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-continue-CNJibO4_.mjs → session-catalog-node-continue-H7nrzcUD.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-lookup-BH_DBGa9.mjs → session-catalog-node-lookup-BrZfDkA8.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-DkeoVn60.mjs → session-catalog-parsing-V6jyFg9g.mjs} +2 -2
- package/dist/.setup/{session-catalog-projection-BzHiV818.mjs → session-catalog-projection-CNyhjZze.mjs} +8 -7
- package/dist/.setup/{session-catalog-provenance-CmsOE5mh.mjs → session-catalog-provenance-Dg9s12z-.mjs} +50 -30
- package/dist/.setup/{session-catalog-source-DGuRdGvM.mjs → session-catalog-source-z_mNyQdX.mjs} +2 -6
- package/dist/.setup/{session-cli-GwU0izn-.mjs → session-cli-CBGKiqdv.mjs} +1 -1
- package/dist/.setup/{session-history-BO6i_pfk.mjs → session-history-7W0cgTXF.mjs} +11 -9
- package/dist/.setup/{session-history-import-CaO8s6ta.mjs → session-history-import-BwPKwcNi.mjs} +4 -4
- package/dist/.setup/{session-initialization-Bi_2DKhc.mjs → session-initialization-Dn3vveGv.mjs} +2 -2
- package/dist/.setup/{session-retirement-B3U5hpGJ.mjs → session-retirement-RZStisKb.mjs} +8 -8
- package/dist/.setup/{session-history.worker-DJQfek5p.mjs → settled-turn-evidence--tRW6fSm.mjs} +2 -18
- package/dist/.setup/{settled-turn-finalizer-CYCVpTv2.mjs → settled-turn-finalizer-gioXygEX.mjs} +8 -8
- package/dist/.setup/{shared-client-BCx1wbyA.mjs → shared-client-CkyTrNB8.mjs} +380 -557
- package/dist/.setup/side-question-DHPWKgO3.mjs +998 -0
- package/dist/.setup/{source-DipMO9hL.mjs → source-63MLSmLJ.mjs} +5 -5
- package/dist/.setup/{thread-archive-guard-LKdwQKyr.mjs → thread-archive-guard-BWjSsA92.mjs} +1 -1
- package/dist/.setup/{thread-lifecycle-run-C_aYiYqk.mjs → thread-lifecycle-run-zCXYFW8W.mjs} +172 -75
- package/dist/.setup/{thread-model-selection-DcVebr8N.mjs → thread-model-selection-DxposL4X.mjs} +9 -9
- package/dist/.setup/{thread-ownership-BoUd0i6L.mjs → thread-ownership-Bmk5a2Gu.mjs} +7 -7
- package/dist/.setup/{thread-policy-B3wBRNph.mjs → thread-policy-DYtvZ5Ay.mjs} +6 -6
- package/dist/.setup/{thread-requests-BgzJwJtS.mjs → thread-requests-BjawdIVV.mjs} +14 -14
- package/dist/.setup/{thread-resume-D-3bsr1j.mjs → thread-resume-vBShG3-o.mjs} +6 -6
- package/dist/.setup/{transcript-history-projection-DfKcoZCB.mjs → transcript-history-projection-i-FVpyha.mjs} +1 -1
- package/dist/.setup/{transcript-mirror-Bee2o6jj.mjs → transcript-mirror-CEQJZlF3.mjs} +6 -9
- package/dist/.setup/{transport-stdio-CRWTkKOn.mjs → transport-stdio-Bq160Dhv.mjs} +63 -64
- package/dist/.setup/{transport-websocket-DIyPfkHo.mjs → transport-websocket-0YqiI_MH.mjs} +1 -1
- package/dist/.setup/{turn-router-DBVMToGo.mjs → turn-router-BGj67FMK.mjs} +2 -2
- package/dist/.setup/{upstream-session-fork-p5fwKi7w.mjs → upstream-session-fork-CWKjpdtW.mjs} +46 -219
- package/dist/.setup/{usage-C2Kq7oej.mjs → usage-AhrLFxZP.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-BQX8RHAd.mjs → usage-limit-error-BdNbGJC3.mjs} +4 -4
- package/dist/.setup/{web-search-item-CvokaZOo.mjs → web-search-item-DHVuNSqk.mjs} +1 -1
- package/dist/.setup/{web-search-provider.runtime-D89djc7e.mjs → web-search-provider.runtime-Yk6lnJBG.mjs} +3 -3
- package/dist/.setup/{workspace-write-sandbox-probe-BDWO2Qkh.mjs → workspace-write-sandbox-probe-DJxOXcF3.mjs} +2 -2
- package/dist/api.js +7 -28
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/client-version-api.js +25 -0
- package/dist/doctor-contract-api.js +5 -5
- package/dist/harness.js +59 -36
- package/dist/index.js +259 -295
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -2
- package/dist/native-session-binding-api.js +1 -2
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-entrypoint.js +12 -0
- package/dist/session-history-worker-runtime.js +7 -18
- package/dist/session-history.worker.js +18 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +6 -6
- package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +0 -2
- package/dist/.setup/command-rpc-HIvsy3wS.mjs +0 -247
- package/dist/.setup/compact-ClZ7Ar7L.mjs +0 -808
- package/dist/.setup/inference-context-DNlGwzwy.mjs +0 -91
- package/dist/.setup/managed-binary-BtIjV7yN.mjs +0 -175
- package/dist/.setup/native-execution-policy-MXEe7PB3.mjs +0 -75
- package/dist/.setup/protocol-CANUwXJ3.mjs +0 -17
- package/dist/.setup/side-question-Bz2UQW0l.mjs +0 -826
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { T as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-BW1YeaIk.mjs";
|
|
2
|
+
import "./shared-client-CkyTrNB8.mjs";
|
|
3
|
+
import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-Bmk5a2Gu.mjs";
|
|
4
|
+
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-C3CIIaZG.mjs";
|
|
5
|
+
//#region extensions/codex/src/app-server/session-cancellation.ts
|
|
6
|
+
/** Stop owns admitted descendants, without retiring the session or its native history. */
|
|
7
|
+
async function withCodexSessionDescendantCancellation(bindingStore, params, run) {
|
|
8
|
+
const identity = {
|
|
9
|
+
kind: "session",
|
|
10
|
+
agentId: params.agentId,
|
|
11
|
+
sessionKey: params.sessionKey,
|
|
12
|
+
sessionId: params.sessionId
|
|
13
|
+
};
|
|
14
|
+
params.assertCurrent();
|
|
15
|
+
const binding = await bindingStore.readAsync(identity);
|
|
16
|
+
params.assertCurrent();
|
|
17
|
+
if (!binding?.clientId) return run(async () => ({
|
|
18
|
+
killed: 0,
|
|
19
|
+
cancelledRequesters: []
|
|
20
|
+
}));
|
|
21
|
+
const lease = await retainSharedCodexAppServerClientByInstanceId(binding.clientId, { waitForExit: false });
|
|
22
|
+
const assertCurrent = () => {
|
|
23
|
+
params.assertCurrent();
|
|
24
|
+
const current = bindingStore.read(identity);
|
|
25
|
+
if (!current || !isSameCodexAppServerThreadOwner(current, binding)) throw new Error("Codex descendant cancellation binding changed");
|
|
26
|
+
};
|
|
27
|
+
try {
|
|
28
|
+
assertCurrent();
|
|
29
|
+
if (!lease) return run(async () => ({
|
|
30
|
+
killed: 0,
|
|
31
|
+
cancelledRequesters: []
|
|
32
|
+
}));
|
|
33
|
+
return await codexNativeSubagentMonitorRuntime.withDescendantCancellation(lease.client, {
|
|
34
|
+
...params,
|
|
35
|
+
parentThreadId: binding.threadId,
|
|
36
|
+
assertCurrent
|
|
37
|
+
}, run);
|
|
38
|
+
} finally {
|
|
39
|
+
await lease?.release();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { withCodexSessionDescendantCancellation };
|
package/dist/.setup/{session-catalog-adoption-Ca3OYGYM.mjs → session-catalog-adoption-ppsLlVLB.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as requireBoundThread, d as boundedCatalogString, o as CatalogParamsError } from "./session-catalog-parsing-
|
|
2
|
-
import {
|
|
1
|
+
import { T as requireBoundThread, d as boundedCatalogString, o as CatalogParamsError } from "./session-catalog-parsing-V6jyFg9g.mjs";
|
|
2
|
+
import { g as sessionBindingIdentity } from "./session-binding-record-C_THntMe.mjs";
|
|
3
3
|
import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
|
|
4
|
-
import { r as reclaimCurrentCodexSessionGeneration } from "./session-binding-
|
|
5
|
-
import { adoptionSessionKeyRest, catalogSessionActions } from "./session-catalog-node-adoption-
|
|
4
|
+
import { r as reclaimCurrentCodexSessionGeneration } from "./session-binding-BgsWcbdY.mjs";
|
|
5
|
+
import { adoptionSessionKeyRest, catalogSessionActions } from "./session-catalog-node-adoption-e9v8mGgx.mjs";
|
|
6
6
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { listSessionCatalogEntries, sessionCatalogAdoptedSessionKey, sessionCatalogAdoptedSourceKey } from "openclaw/plugin-sdk/session-catalog";
|
|
8
8
|
//#region extensions/codex/src/session-catalog-adoption.ts
|
|
@@ -60,17 +60,23 @@ async function listAdoptedSessionEntries(params) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
const revision = params.sessionEntries?.revision;
|
|
64
|
+
const cached = revision ? adoptionCandidatesByRevision.get(revision) : void 0;
|
|
65
|
+
let prepared;
|
|
66
|
+
if (cached && cached.config === params.config && cached.agentId === params.agentId) prepared = cached.candidates;
|
|
67
|
+
else {
|
|
68
|
+
prepared = [...candidates()];
|
|
69
|
+
if (revision) adoptionCandidatesByRevision.set(revision, {
|
|
70
|
+
config: params.config,
|
|
71
|
+
agentId: params.agentId,
|
|
72
|
+
candidates: prepared
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const bindings = params.bindingStore.readMany(prepared.map(({ identity }) => identity));
|
|
76
|
+
try {
|
|
71
77
|
const adopted = /* @__PURE__ */ new Map();
|
|
72
|
-
for (const { agentId, sessionKey, sessionKeyRest, sessionId, marker
|
|
73
|
-
const binding = await
|
|
78
|
+
for (const { agentId, sessionKey, sessionKeyRest, sessionId, marker } of prepared) {
|
|
79
|
+
const binding = (await bindings.next()).value;
|
|
74
80
|
const sourceThreadId = binding?.supervisionSourceThreadId?.trim();
|
|
75
81
|
const boundThreadId = binding?.threadId.trim();
|
|
76
82
|
if (binding?.connectionScope !== "supervision" || !sourceThreadId || !boundThreadId || sessionKeyRest !== adoptionSessionKey(sourceThreadId, marker.sourceHomeId)) continue;
|
|
@@ -84,26 +90,6 @@ async function listAdoptedSessionEntries(params) {
|
|
|
84
90
|
});
|
|
85
91
|
}
|
|
86
92
|
return adopted;
|
|
87
|
-
};
|
|
88
|
-
const revision = params.sessionEntries?.revision;
|
|
89
|
-
const cached = revision ? adoptionCandidatesByRevision.get(revision) : void 0;
|
|
90
|
-
let prepared;
|
|
91
|
-
try {
|
|
92
|
-
if (cached && cached.config === params.config && cached.agentId === params.agentId) prepared = cached.candidates;
|
|
93
|
-
else {
|
|
94
|
-
prepared = [...candidates()];
|
|
95
|
-
if (revision) adoptionCandidatesByRevision.set(revision, {
|
|
96
|
-
config: params.config,
|
|
97
|
-
agentId: params.agentId,
|
|
98
|
-
candidates: prepared
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
} catch {
|
|
102
|
-
return collect(candidates());
|
|
103
|
-
}
|
|
104
|
-
const bindings = params.bindingStore.readMany(prepared.map(({ identity }) => identity));
|
|
105
|
-
try {
|
|
106
|
-
return await collect(prepared, async () => (await bindings.next()).value);
|
|
107
93
|
} finally {
|
|
108
94
|
await bindings.return(void 0);
|
|
109
95
|
}
|
|
@@ -130,7 +116,7 @@ async function ensurePendingAdoptionBinding(params) {
|
|
|
130
116
|
});
|
|
131
117
|
params.initialization.assertCurrent();
|
|
132
118
|
if (!ownsGeneration) throw new Error(`failed to claim the OpenClaw session generation for ${params.sourceThreadId}`);
|
|
133
|
-
const existing = params.bindingStore.
|
|
119
|
+
const existing = await params.bindingStore.readAsync(params.identity);
|
|
134
120
|
params.initialization.assertCurrent();
|
|
135
121
|
if (existing) {
|
|
136
122
|
if (matchesPendingAdoptionBinding(existing, params)) return;
|
|
@@ -164,7 +150,7 @@ async function createOrReuseAdoptedSession(params) {
|
|
|
164
150
|
sourceThreadId: params.sourceThread.id,
|
|
165
151
|
...params.sourceHomeId ? { sourceHomeId: params.sourceHomeId } : {}
|
|
166
152
|
};
|
|
167
|
-
const { createImportedCodexSession } = await import("./session-history-import-
|
|
153
|
+
const { createImportedCodexSession } = await import("./session-history-import-BwPKwcNi.mjs");
|
|
168
154
|
const created = await createImportedCodexSession({
|
|
169
155
|
runtime: params.api.runtime,
|
|
170
156
|
bindingStore: params.bindingStore,
|
|
@@ -229,11 +215,11 @@ async function continueLocalCodexSessionInner(params) {
|
|
|
229
215
|
const boundThread = await params.control.readThread(boundThreadId, true);
|
|
230
216
|
if (boundThread.id !== boundThreadId) throw new Error("Codex app-server returned a different thread than requested");
|
|
231
217
|
const changedError = () => new CatalogParamsError("Codex OpenClaw session changed before it could be opened. Retry.");
|
|
232
|
-
if (!await params.api.runtime.agent.session.
|
|
218
|
+
if (!await params.api.runtime.agent.session.prepareSessionEntryPatch({
|
|
233
219
|
sessionKey: existing.key,
|
|
234
220
|
readConsistency: "latest",
|
|
235
221
|
preserveActivity: true,
|
|
236
|
-
|
|
222
|
+
prepare: (entry) => {
|
|
237
223
|
if (entry.sessionId?.trim() !== existing.sessionId || entry.initializationPending === true || entry.agentHarnessId !== "codex" || entry.modelSelectionLocked !== true) throw changedError();
|
|
238
224
|
return {
|
|
239
225
|
archivedAt: void 0,
|
package/dist/.setup/{session-catalog-archive-Bv6gV7x9.mjs → session-catalog-archive-CqLRHJ6z.mjs}
RENAMED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { o as CatalogParamsError } from "./session-catalog-parsing-
|
|
2
|
-
import {
|
|
3
|
-
import { t as assertCodexArchiveDescendantsUnowned } from "./thread-archive-guard-
|
|
4
|
-
import "./session-binding-
|
|
5
|
-
import { catalogSessionActions } from "./session-catalog-node-adoption-
|
|
6
|
-
import { isAdoptionSessionKeyForThread, requireIdleThread } from "./session-catalog-adoption-
|
|
1
|
+
import { o as CatalogParamsError } from "./session-catalog-parsing-V6jyFg9g.mjs";
|
|
2
|
+
import { g as sessionBindingIdentity } from "./session-binding-record-C_THntMe.mjs";
|
|
3
|
+
import { t as assertCodexArchiveDescendantsUnowned } from "./thread-archive-guard-BWjSsA92.mjs";
|
|
4
|
+
import "./session-binding-BgsWcbdY.mjs";
|
|
5
|
+
import { catalogSessionActions } from "./session-catalog-node-adoption-e9v8mGgx.mjs";
|
|
6
|
+
import { isAdoptionSessionKeyForThread, requireIdleThread } from "./session-catalog-adoption-ppsLlVLB.mjs";
|
|
7
7
|
import { listAgentIds } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
8
8
|
import { sessionCatalogAdoptedSourceKey } from "openclaw/plugin-sdk/session-catalog";
|
|
9
9
|
//#region extensions/codex/src/session-catalog-archive.ts
|
|
10
|
-
function assertNoPendingSupervisionBranch(params) {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
readOnly: true
|
|
14
|
-
})).filter((candidate) => isAdoptionSessionKeyForThread(candidate.sessionKey, params.threadId, params.sourceHomeId) || params.sourceHomeId !== void 0 && params.allowLegacy === true && isAdoptionSessionKeyForThread(candidate.sessionKey, params.threadId));
|
|
10
|
+
async function assertNoPendingSupervisionBranch(params) {
|
|
11
|
+
const agentIds = [params.agentId, ...listAgentIds(params.config).filter((agentId) => agentId !== params.agentId)];
|
|
12
|
+
const adoptedEntries = (await Promise.all(agentIds.map((agentId) => params.runtime.agent.session.listSessionEntriesAsync({ agentId })))).flat().filter((candidate) => isAdoptionSessionKeyForThread(candidate.sessionKey, params.threadId, params.sourceHomeId) || params.sourceHomeId !== void 0 && params.allowLegacy === true && isAdoptionSessionKeyForThread(candidate.sessionKey, params.threadId));
|
|
15
13
|
for (const adopted of adoptedEntries) {
|
|
16
14
|
if (adopted.entry.initializationPending === true) throw new CatalogParamsError("Codex session cannot be archived while its OpenClaw branch is initializing");
|
|
17
15
|
const sessionId = adopted.entry.sessionId?.trim();
|
|
18
16
|
if (!sessionId) continue;
|
|
19
|
-
const binding = params.bindingStore.
|
|
17
|
+
const binding = await params.bindingStore.readAsync(sessionBindingIdentity({
|
|
20
18
|
sessionId,
|
|
21
19
|
sessionKey: adopted.sessionKey,
|
|
22
20
|
config: params.config
|
|
@@ -27,7 +25,7 @@ function assertNoPendingSupervisionBranch(params) {
|
|
|
27
25
|
/** Archives one inactive Gateway-local Codex thread after a fresh status read. */
|
|
28
26
|
async function archiveLocalCodexSession(params) {
|
|
29
27
|
return await catalogSessionActions.enqueue(sessionCatalogAdoptedSourceKey(params.hostId ?? "gateway:local", params.threadId), () => params.bindingStore.withThreadArchiveFence(() => params.control.withPinnedConnection(async (control) => {
|
|
30
|
-
assertNoPendingSupervisionBranch(params);
|
|
28
|
+
await assertNoPendingSupervisionBranch(params);
|
|
31
29
|
await control.requireEligibleThread(params.threadId);
|
|
32
30
|
const thread = await control.readThread(params.threadId, false);
|
|
33
31
|
if (thread.id !== params.threadId) throw new Error("Codex app-server returned a different thread than requested");
|
package/dist/.setup/{session-catalog-events-kR2Ot6nX.mjs → session-catalog-events-CEi6SuLQ.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as MAX_CWD_LENGTH, d as boundedCatalogString } from "./session-catalog-parsing-
|
|
2
|
-
import { n as defineCodexBuildState } from "./build-state-
|
|
1
|
+
import { c as MAX_CWD_LENGTH, d as boundedCatalogString } from "./session-catalog-parsing-V6jyFg9g.mjs";
|
|
2
|
+
import { n as defineCodexBuildState } from "./build-state-CjLCC0wm.mjs";
|
|
3
3
|
import { r as inferCodexAppServerConnectionClass } from "./config-security-clxAZYWX.mjs";
|
|
4
4
|
import { n as resolveCodexAppServerLocalHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
5
5
|
import { n as codexCatalogHomeIdFromCanonicalPath } from "./session-catalog-home-id-vlih0B_g.mjs";
|
|
6
|
-
import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-
|
|
7
|
-
import {
|
|
8
|
-
import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-
|
|
6
|
+
import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-DRb-niJc.mjs";
|
|
7
|
+
import { a as observeCodexCatalogEphemeralThreads, n as codexCatalogSourceForClient } from "./session-catalog-source-z_mNyQdX.mjs";
|
|
8
|
+
import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-BqBYi6kV.mjs";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-registration";
|
|
11
11
|
import path from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as CODEX_CATALOG_MAX_ROWS } from "./session-catalog-limits-
|
|
1
|
+
import { t as CODEX_CATALOG_MAX_ROWS } from "./session-catalog-limits-Dc6E0BZz.mjs";
|
|
2
2
|
//#region extensions/codex/src/session-catalog-index-order.ts
|
|
3
3
|
function codexCatalogRowRecency(row) {
|
|
4
4
|
return row.recencyAt ?? row.updatedAt ?? 0;
|