@openclaw/codex 2026.10.1 → 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-B7Vg4rmy.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-BzlIkqSz.mjs → apply-CBMV8LN0.mjs} +40 -51
- package/dist/.setup/{attempt-client-cleanup-HXQxfMc1.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-BmCutoyg.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-BCCQHWdc.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-Cv4uIEzz.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-BwxNfFEB.mjs → build-state-CzLMy1S9.mjs} +1 -1
- package/dist/.setup/{capabilities-kQntafj_.mjs → capabilities-DbOzOglY.mjs} +1 -1
- package/dist/.setup/{client-catalog-response-BNFDYAKh.mjs → client-catalog-response-DsbEAtpd.mjs} +25 -32
- package/dist/.setup/{client-BIRVBXXb.mjs → client-y7nO6X9c.mjs} +198 -247
- package/dist/.setup/{command-dispatch-D3_ypl-R.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-KPit4G0p.mjs → command-handlers-VBaJnpZo.mjs} +270 -360
- package/dist/.setup/{command-rpc-CmQDOxY9.mjs → command-rpc-C9VxOLuG.mjs} +19 -18
- package/dist/.setup/{compact-CLLteFIY.mjs → compact-CD8xJxXS.mjs} +41 -61
- package/dist/.setup/{computer-use-BVxocZZc.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-DJ_288rC.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-CuiZ_pDL.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-DgWZMfAQ.mjs → dynamic-tool-build-D731PCdv.mjs} +57 -69
- package/dist/.setup/{dynamic-tools-Ct6GKAFr.mjs → dynamic-tools-D0pYbxHH.mjs} +689 -710
- package/dist/.setup/{effective-mcp-catalog-DmCSc8TS.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-_cBMKCFb.mjs → ephemeral-turn-Cphy5Qr_.mjs} +3 -3
- package/dist/.setup/{event-projector-assistant-message-C3Tpt370.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-CjrQEeke.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-D0yRoreX.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--G4arndd.mjs → model-catalog-B227ST3D.mjs} +6 -6
- package/dist/.setup/{models-BYbLQPnj.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-5i5eRCwO.mjs → native-mcp-app-CjxJQ4F7.mjs} +6 -6
- package/dist/.setup/native-skill-isolation-UMVoNjZz.mjs +391 -0
- package/dist/.setup/{native-subagent-monitor-B2C8D_N0.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-B5bDIEuQ.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-C_SGp5YW.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-BoIby-eX.mjs → provider-BJ4xhaGX.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-B4yq6UgQ.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-DD3u22uv.mjs → request-Y8dmbqZ3.mjs} +28 -48
- package/dist/.setup/{rpc-error-hmWM21RB.mjs → rpc-error-C98SHchT.mjs} +3 -6
- package/dist/.setup/{run-attempt-DOVF5OON.mjs → run-attempt-Dx7a4Mfm.mjs} +927 -859
- 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-DRaivXvC.mjs → session-catalog-events-DzFlXNUe.mjs} +6 -5
- package/dist/.setup/{session-catalog-index-qwmgqC4t.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-z9Q608QW.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-Cl0Nc7c6.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-Bt3b0fpe.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-e_24O6HA.mjs → settled-turn-finalizer-X-Fylp-u.mjs} +12 -11
- package/dist/.setup/{shared-client-DeenOD8U.mjs → shared-client-ByIwuAC-.mjs} +172 -229
- package/dist/.setup/{side-question-BZHn_1Jm.mjs → side-question-BDUdozFy.mjs} +116 -137
- package/dist/.setup/{source-0ClinBHI.mjs → source-Bxbqf3S1.mjs} +37 -56
- package/dist/.setup/thread-archive-guard-LKdwQKyr.mjs +56 -0
- package/dist/.setup/{thread-lifecycle-CoqYpbpk.mjs → thread-lifecycle-run-CfP4PnEf.mjs} +348 -484
- package/dist/.setup/thread-model-selection-DcVebr8N.mjs +61 -0
- package/dist/.setup/{thread-ownership-CSDZ6mHd.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-DCC9lQjC.mjs → thread-policy-CHgY-KNl.mjs} +4 -4
- package/dist/.setup/thread-requests-BgzJwJtS.mjs +745 -0
- package/dist/.setup/{thread-resume--WOKWxZd.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-BWhX_SBh.mjs → turn-router-DKDAziUW.mjs} +30 -31
- package/dist/.setup/upstream-prompt-provenance-Ccd9MFRJ.mjs +44 -0
- package/dist/.setup/{upstream-session-fork-BQvofnk7.mjs → upstream-session-fork-Djp_yssT.mjs} +50 -43
- package/dist/.setup/{usage-BEHcVwcZ.mjs → usage-DQA-peQC.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-D1p3nE6n.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-CV9oiB-v.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-CsScGgrk.mjs +0 -124
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +0 -15
- package/dist/.setup/shell-dynamic-tools-BqGszXcq.mjs +0 -85
- package/dist/.setup/thread-archive-guard-C9frICzX.mjs +0 -60
- package/dist/.setup/thread-requests-Dwg2b4Xl.mjs +0 -2111
- package/dist/.setup/upstream-prompt-provenance-fXkKbPVC.mjs +0 -37
package/dist/.setup/{session-catalog-events-DRaivXvC.mjs → session-catalog-events-DzFlXNUe.mjs}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { c as MAX_CWD_LENGTH, d as boundedCatalogString } from "./session-catalog-parsing-
|
|
2
|
-
import { n as defineCodexBuildState } from "./build-state-
|
|
3
|
-
import { r as inferCodexAppServerConnectionClass } from "./config-security-
|
|
1
|
+
import { c as MAX_CWD_LENGTH, d as boundedCatalogString } from "./session-catalog-parsing-DkeoVn60.mjs";
|
|
2
|
+
import { n as defineCodexBuildState } from "./build-state-CzLMy1S9.mjs";
|
|
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 {
|
|
6
|
+
import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
|
|
7
|
+
import { n as codexCatalogSourceForClient, o as observeCodexCatalogEphemeralThreads } from "./session-catalog-source-CygTGmrb.mjs";
|
|
8
|
+
import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-rCKnZud1.mjs";
|
|
8
9
|
import { createHash } from "node:crypto";
|
|
9
10
|
import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-registration";
|
|
10
11
|
import path from "node:path";
|
package/dist/.setup/{session-catalog-index-qwmgqC4t.mjs → session-catalog-index-DozvkUPd.mjs}
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { S as readControlCursor, _ as normalizeLimit, c as MAX_CWD_LENGTH, d as boundedCatalogString, h as filterCatalogPageByTitle, m as codexCatalogThreadStatus, o as CatalogParamsError, p as codexCatalogThreadName } from "./session-catalog-parsing-
|
|
2
|
-
import { n as detachCodexCatalogString, t as CODEX_CATALOG_MAX_ROWS } from "./session-catalog-limits-
|
|
3
|
-
import { i as retainCodexCatalogRow, n as codexCatalogRowRecency, r as compareCodexCatalogRows, t as CodexCatalogOrdering } from "./session-catalog-index-order-
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { S as readControlCursor, _ as normalizeLimit, c as MAX_CWD_LENGTH, d as boundedCatalogString, h as filterCatalogPageByTitle, m as codexCatalogThreadStatus, o as CatalogParamsError, p as codexCatalogThreadName } from "./session-catalog-parsing-DkeoVn60.mjs";
|
|
2
|
+
import { n as detachCodexCatalogString, t as CODEX_CATALOG_MAX_ROWS } from "./session-catalog-limits-BynIoOYm.mjs";
|
|
3
|
+
import { i as retainCodexCatalogRow, n as codexCatalogRowRecency, r as compareCodexCatalogRows, t as CodexCatalogOrdering } from "./session-catalog-index-order-CTfoefow.mjs";
|
|
4
|
+
import { c as CodexCatalogPersistence, i as CodexCatalogAvailability, l as codexCatalogMetadataPage, r as withCodexCatalogListRequest } from "./session-catalog-list-request-D4MYNgDB.mjs";
|
|
5
|
+
import { a as hasLiveCodexCatalogSource, c as setCodexCatalogSource, i as getCodexCatalogSource } from "./session-catalog-source-CygTGmrb.mjs";
|
|
6
|
+
import { r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-rCKnZud1.mjs";
|
|
7
|
+
import { i as subscribeCodexCatalogEvents } from "./session-catalog-events-DzFlXNUe.mjs";
|
|
7
8
|
import { a as reportCodexCatalogSpawnFailure, n as findCodexAppServerSpawnError } from "./spawn-error-CL3n6MAa.mjs";
|
|
8
|
-
import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout,
|
|
9
|
+
import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout, projectCodexCatalogPage, r as resolveCodexCatalogRolloutFingerprint, t as codexCatalogRolloutLogicalPath } from "./session-catalog-projection-DDVmALHj.mjs";
|
|
9
10
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
11
|
import { createHash } from "node:crypto";
|
|
11
12
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -350,6 +351,32 @@ var CodexCatalogField = class {
|
|
|
350
351
|
}
|
|
351
352
|
}
|
|
352
353
|
};
|
|
354
|
+
/** Live field values share revision fencing and source-lifetime invalidation. */
|
|
355
|
+
var CodexCatalogLiveField = class {
|
|
356
|
+
constructor() {
|
|
357
|
+
this.values = new CodexCatalogField();
|
|
358
|
+
}
|
|
359
|
+
capture() {
|
|
360
|
+
return this.values.capture();
|
|
361
|
+
}
|
|
362
|
+
get(threadId) {
|
|
363
|
+
const current = this.values.get(threadId);
|
|
364
|
+
return current && hasLiveCodexCatalogSource(current.sources) ? current.value : void 0;
|
|
365
|
+
}
|
|
366
|
+
delete(threadId) {
|
|
367
|
+
this.values.delete(threadId);
|
|
368
|
+
}
|
|
369
|
+
invalidate(source) {
|
|
370
|
+
if (!source) {
|
|
371
|
+
this.values.invalidate();
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
this.values.deleteWhere((entry) => {
|
|
375
|
+
entry.sources.delete(source);
|
|
376
|
+
return !hasLiveCodexCatalogSource(entry.sources);
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
};
|
|
353
380
|
//#endregion
|
|
354
381
|
//#region extensions/codex/src/session-catalog-rollout-scanner.ts
|
|
355
382
|
const DIRECTORY_PARTS = [
|
|
@@ -640,7 +667,10 @@ async function reconcileCodexCatalogFiles(root, isCurrent, owner) {
|
|
|
640
667
|
continue;
|
|
641
668
|
}
|
|
642
669
|
thread.preview ||= existing?.preview;
|
|
643
|
-
const projected = await
|
|
670
|
+
const projected = await projectCodexCatalogPage({ data: [projectCodexCatalogNativeThread(thread, sanitizeTerminalText)] }, {
|
|
671
|
+
localSessionsRoot: root,
|
|
672
|
+
sanitize: sanitizeTerminalText
|
|
673
|
+
});
|
|
644
674
|
owner.assertCurrent();
|
|
645
675
|
if (!isCurrent(thread.id)) continue;
|
|
646
676
|
observed.set(file, fingerprint);
|
|
@@ -730,13 +760,7 @@ function applyCodexCatalogLiveFields({ status: _storedStatus, activeFlags: _stor
|
|
|
730
760
|
}
|
|
731
761
|
const MAX_STATUS_SOURCE_WITNESSES = 64;
|
|
732
762
|
/** Equivalent broadcasts retain at most 64 source witnesses for each bounded resident row. */
|
|
733
|
-
var CodexCatalogStatusIndex = class {
|
|
734
|
-
constructor() {
|
|
735
|
-
this.values = new CodexCatalogField();
|
|
736
|
-
}
|
|
737
|
-
capture() {
|
|
738
|
-
return this.values.capture();
|
|
739
|
-
}
|
|
763
|
+
var CodexCatalogStatusIndex = class extends CodexCatalogLiveField {
|
|
740
764
|
update(threadId, status, source) {
|
|
741
765
|
const next = this.next(threadId, status, source);
|
|
742
766
|
if (next) this.values.update(threadId, next);
|
|
@@ -752,45 +776,28 @@ var CodexCatalogStatusIndex = class {
|
|
|
752
776
|
if (next) this.values.observe(row.threadId, next, revision);
|
|
753
777
|
}
|
|
754
778
|
}
|
|
755
|
-
get(threadId) {
|
|
756
|
-
const current = this.values.get(threadId);
|
|
757
|
-
return current && hasLiveCodexCatalogSource(current.sources) ? current.status : void 0;
|
|
758
|
-
}
|
|
759
|
-
delete(threadId) {
|
|
760
|
-
this.values.delete(threadId);
|
|
761
|
-
}
|
|
762
|
-
invalidate(source) {
|
|
763
|
-
if (!source) {
|
|
764
|
-
this.values.invalidate();
|
|
765
|
-
return;
|
|
766
|
-
}
|
|
767
|
-
this.values.deleteWhere((entry) => {
|
|
768
|
-
entry.sources.delete(source);
|
|
769
|
-
return !hasLiveCodexCatalogSource(entry.sources);
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
779
|
next(threadId, status, source) {
|
|
773
780
|
if (source.closed) return;
|
|
774
781
|
const current = this.values.get(threadId);
|
|
775
782
|
const sources = new Set([...current?.sources ?? []].filter((witness) => !witness.closed));
|
|
776
|
-
if (status.status === "notLoaded" && current && current.
|
|
783
|
+
if (status.status === "notLoaded" && current && current.value.status !== "notLoaded" && sources.size) {
|
|
777
784
|
sources.delete(source);
|
|
778
785
|
if (sources.size) return {
|
|
779
|
-
|
|
786
|
+
value: current.value,
|
|
780
787
|
sources
|
|
781
788
|
};
|
|
782
789
|
}
|
|
783
790
|
const flags = status.activeFlags ?? [];
|
|
784
|
-
const previousFlags = current?.
|
|
785
|
-
if (current?.
|
|
791
|
+
const previousFlags = current?.value.activeFlags ?? [];
|
|
792
|
+
if (current?.value.status === status.status && flags.length === previousFlags.length && flags.every((flag, index) => flag === previousFlags[index])) {
|
|
786
793
|
if (sources.size < MAX_STATUS_SOURCE_WITNESSES) sources.add(source);
|
|
787
794
|
return {
|
|
788
|
-
status,
|
|
795
|
+
value: status,
|
|
789
796
|
sources
|
|
790
797
|
};
|
|
791
798
|
}
|
|
792
799
|
return {
|
|
793
|
-
status,
|
|
800
|
+
value: status,
|
|
794
801
|
sources: /* @__PURE__ */ new Set([source])
|
|
795
802
|
};
|
|
796
803
|
}
|
|
@@ -808,38 +815,56 @@ function prepareCodexCatalogQuery(params, prepared) {
|
|
|
808
815
|
const { complete, frontier } = availability;
|
|
809
816
|
if (!complete && !frontier) return;
|
|
810
817
|
if (!complete && frontier && anchor?.backwards && compareCodexCatalogRows(frontier, anchor) < 0) return;
|
|
811
|
-
|
|
812
|
-
const
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
let
|
|
818
|
+
function* candidates() {
|
|
819
|
+
for (const { row, searchText } of ordered) {
|
|
820
|
+
if (!complete && frontier && compareCodexCatalogRows(row, frontier) > 0) break;
|
|
821
|
+
if ((!cwd || (liveSettings.get(row.threadId)?.cwd ?? row.page.sessions[0].cwd) === cwd) && (!search || searchText.includes(search))) yield row;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
let hasPrevious = false;
|
|
825
|
+
const page = [];
|
|
826
|
+
let continuation;
|
|
818
827
|
const after = (row) => !anchor || compareCodexCatalogRows(row, anchor) > 0;
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
828
|
+
for (const row of candidates()) {
|
|
829
|
+
if (anchor?.backwards) {
|
|
830
|
+
if (row.threadId === anchor.threadId) continue;
|
|
831
|
+
if (after(row)) break;
|
|
832
|
+
if (page.length === limit) {
|
|
833
|
+
page.shift();
|
|
834
|
+
hasPrevious = true;
|
|
835
|
+
}
|
|
836
|
+
} else if (!after(row)) {
|
|
837
|
+
hasPrevious = true;
|
|
838
|
+
continue;
|
|
839
|
+
} else if (page.length === limit) {
|
|
840
|
+
continuation = page.at(-1);
|
|
841
|
+
break;
|
|
842
|
+
}
|
|
843
|
+
page.push(row);
|
|
826
844
|
}
|
|
827
|
-
let page = selected.slice(start, end ?? start + limit);
|
|
828
845
|
if (anchor?.backwards && !page.length) {
|
|
829
|
-
|
|
830
|
-
|
|
846
|
+
hasPrevious = false;
|
|
847
|
+
for (const row of candidates()) {
|
|
848
|
+
page.push(row);
|
|
849
|
+
if (page.length === limit) break;
|
|
850
|
+
}
|
|
831
851
|
}
|
|
832
852
|
const first = page[0];
|
|
833
853
|
const last = page.at(-1);
|
|
834
|
-
|
|
854
|
+
if (anchor?.backwards && last) {
|
|
855
|
+
for (const row of candidates()) if (!complete || compareCodexCatalogRows(row, last) > 0) {
|
|
856
|
+
continuation = last;
|
|
857
|
+
break;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
835
860
|
if (!complete && !continuation) {
|
|
836
861
|
if (!anchor?.backwards && !last && (!frontier || !after(frontier))) return;
|
|
837
862
|
continuation = frontier && (!last || compareCodexCatalogRows(frontier, last) > 0) ? frontier : last;
|
|
838
863
|
}
|
|
839
864
|
return {
|
|
840
|
-
sessions: page.
|
|
865
|
+
sessions: page.map((row) => applyCodexCatalogLiveFields(row.page.sessions[0], liveStatus.get(row.threadId), liveSettings.get(row.threadId))),
|
|
841
866
|
...continuation ? { nextCursor: cursor(continuation, false) } : {},
|
|
842
|
-
...first &&
|
|
867
|
+
...first && hasPrevious ? { backwardsCursor: cursor(first, true) } : {}
|
|
843
868
|
};
|
|
844
869
|
};
|
|
845
870
|
}
|
|
@@ -970,10 +995,7 @@ var CodexCatalogNativePages = class {
|
|
|
970
995
|
//#region extensions/codex/src/session-catalog-settings.ts
|
|
971
996
|
const MAX_SETTINGS_SOURCE_WITNESSES = 64;
|
|
972
997
|
/** Live settings overlay native stored metadata only while a supporting source stays open. */
|
|
973
|
-
var CodexCatalogSettingsIndex = class {
|
|
974
|
-
constructor() {
|
|
975
|
-
this.values = new CodexCatalogField();
|
|
976
|
-
}
|
|
998
|
+
var CodexCatalogSettingsIndex = class extends CodexCatalogLiveField {
|
|
977
999
|
update(threadId, settings, source) {
|
|
978
1000
|
if (source.closed) return;
|
|
979
1001
|
const cwd = boundedCatalogString(settings.cwd, MAX_CWD_LENGTH);
|
|
@@ -985,40 +1007,23 @@ var CodexCatalogSettingsIndex = class {
|
|
|
985
1007
|
};
|
|
986
1008
|
const current = this.values.get(threadId);
|
|
987
1009
|
const sources = /* @__PURE__ */ new Set();
|
|
988
|
-
if (current && current.
|
|
1010
|
+
if (current && current.value.cwd === bounded.cwd && current.value.modelProvider === bounded.modelProvider) {
|
|
989
1011
|
for (const witness of current.sources) if (!witness.closed) sources.add(witness);
|
|
990
1012
|
}
|
|
991
1013
|
if (sources.size < MAX_SETTINGS_SOURCE_WITNESSES) sources.add(source);
|
|
992
1014
|
this.values.update(threadId, {
|
|
993
|
-
|
|
1015
|
+
value: bounded,
|
|
994
1016
|
sources
|
|
995
1017
|
});
|
|
996
1018
|
}
|
|
997
|
-
get(threadId) {
|
|
998
|
-
const current = this.values.get(threadId);
|
|
999
|
-
return current && hasLiveCodexCatalogSource(current.sources) ? current.settings : void 0;
|
|
1000
|
-
}
|
|
1001
1019
|
hasLiveCwd() {
|
|
1002
|
-
return this.values.some(({
|
|
1003
|
-
}
|
|
1004
|
-
delete(threadId) {
|
|
1005
|
-
this.values.delete(threadId);
|
|
1020
|
+
return this.values.some(({ value, sources }) => Boolean(value.cwd) && hasLiveCodexCatalogSource(sources));
|
|
1006
1021
|
}
|
|
1007
1022
|
withdraw(threadId, source) {
|
|
1008
1023
|
const current = this.values.get(threadId);
|
|
1009
1024
|
if (!current?.sources.delete(source)) return;
|
|
1010
1025
|
if (!hasLiveCodexCatalogSource(current.sources)) this.values.delete(threadId);
|
|
1011
1026
|
}
|
|
1012
|
-
invalidate(source) {
|
|
1013
|
-
if (!source) {
|
|
1014
|
-
this.values.invalidate();
|
|
1015
|
-
return;
|
|
1016
|
-
}
|
|
1017
|
-
this.values.deleteWhere((entry) => {
|
|
1018
|
-
entry.sources.delete(source);
|
|
1019
|
-
return !hasLiveCodexCatalogSource(entry.sources);
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
1027
|
};
|
|
1023
1028
|
//#endregion
|
|
1024
1029
|
//#region extensions/codex/src/session-catalog-index.ts
|
|
@@ -1129,14 +1134,14 @@ var CodexCatalogIndex = class {
|
|
|
1129
1134
|
if (isDeepStrictEqual(previous, row)) return;
|
|
1130
1135
|
const oldest = retainCodexCatalogRow(this.rows, row);
|
|
1131
1136
|
this.overflow ||= this.rows.size >= CODEX_CATALOG_MAX_ROWS;
|
|
1132
|
-
this.ordering.invalidate();
|
|
1133
1137
|
if (oldest?.threadId === row.threadId) return;
|
|
1134
|
-
if (oldest) this.evict(oldest.threadId);
|
|
1138
|
+
if (oldest) this.evict(oldest.threadId, oldest);
|
|
1139
|
+
this.ordering.put(row, previous);
|
|
1135
1140
|
this.persistence.put(row);
|
|
1136
1141
|
}
|
|
1137
|
-
evict(threadId) {
|
|
1142
|
+
evict(threadId, row = this.rows.get(threadId)) {
|
|
1138
1143
|
this.rows.delete(threadId);
|
|
1139
|
-
this.ordering.
|
|
1144
|
+
if (row) this.ordering.remove(row);
|
|
1140
1145
|
this.persistence.remove(threadId);
|
|
1141
1146
|
}
|
|
1142
1147
|
remove(threadId) {
|
|
@@ -1164,13 +1169,11 @@ var CodexCatalogIndex = class {
|
|
|
1164
1169
|
do
|
|
1165
1170
|
observedRevision = await this.hydrate(this.availability.complete);
|
|
1166
1171
|
while (observedRevision !== this.sourceRevision);
|
|
1167
|
-
|
|
1168
|
-
}
|
|
1169
|
-
if (this.needsNativeRefresh) {
|
|
1172
|
+
} else if (this.needsNativeRefresh) {
|
|
1170
1173
|
await this.reconcile();
|
|
1171
1174
|
await this.reconcileNative();
|
|
1172
|
-
this.needsNativeRefresh = false;
|
|
1173
1175
|
}
|
|
1176
|
+
this.needsNativeRefresh = false;
|
|
1174
1177
|
this.initialized = true;
|
|
1175
1178
|
this.failure = void 0;
|
|
1176
1179
|
this.currency.start();
|
|
@@ -1207,8 +1210,10 @@ var CodexCatalogIndex = class {
|
|
|
1207
1210
|
} : row;
|
|
1208
1211
|
const patched = this.withName(restored);
|
|
1209
1212
|
if (patched !== restored) this.persistence.put(patched);
|
|
1213
|
+
const previous = this.rows.get(patched.threadId);
|
|
1210
1214
|
const evicted = retainCodexCatalogRow(this.rows, patched);
|
|
1211
|
-
if (evicted) this.evict(evicted.threadId);
|
|
1215
|
+
if (evicted) this.evict(evicted.threadId, evicted);
|
|
1216
|
+
if (evicted !== patched) this.ordering.put(patched, previous);
|
|
1212
1217
|
this.ordering.restore(row);
|
|
1213
1218
|
}
|
|
1214
1219
|
}
|
|
@@ -1347,21 +1352,19 @@ var CodexCatalogIndex = class {
|
|
|
1347
1352
|
}
|
|
1348
1353
|
try {
|
|
1349
1354
|
this.currency.requestNativeRefresh();
|
|
1350
|
-
|
|
1355
|
+
const prepared = projectCodexCatalogNativeThread(thread, sanitizeTerminalText);
|
|
1356
|
+
return this.projections.run(() => {
|
|
1357
|
+
this.observations.mark(prepared.id);
|
|
1358
|
+
const fields = this.captureFields();
|
|
1359
|
+
return this.observations.observe((isCurrent) => this.projectThread(prepared, isCurrent, fields));
|
|
1360
|
+
}).then(() => void 0).catch((error) => {
|
|
1361
|
+
if (!(error instanceof CodexCatalogProjectionCapacityError)) throw error;
|
|
1362
|
+
this.report(error);
|
|
1363
|
+
});
|
|
1351
1364
|
} catch (error) {
|
|
1352
1365
|
return Promise.reject(toErrorObject(error, "Codex catalog projection failed"));
|
|
1353
1366
|
}
|
|
1354
1367
|
}
|
|
1355
|
-
upsertPreparedThread(prepared) {
|
|
1356
|
-
return this.projections.run(() => {
|
|
1357
|
-
this.observations.mark(prepared.id);
|
|
1358
|
-
const fields = this.captureFields();
|
|
1359
|
-
return this.observations.observe((isCurrent) => this.projectThread(prepared, isCurrent, fields));
|
|
1360
|
-
}).then(() => void 0).catch((error) => {
|
|
1361
|
-
if (!(error instanceof CodexCatalogProjectionCapacityError)) throw error;
|
|
1362
|
-
this.report(error);
|
|
1363
|
-
});
|
|
1364
|
-
}
|
|
1365
1368
|
refreshThread(id, readThread, sourceOrder) {
|
|
1366
1369
|
this.assertCurrent();
|
|
1367
1370
|
this.observations.mark(id);
|
|
@@ -1373,7 +1376,10 @@ var CodexCatalogIndex = class {
|
|
|
1373
1376
|
})));
|
|
1374
1377
|
}
|
|
1375
1378
|
async projectThread(thread, isCurrent, fieldRevision, sourceOrder) {
|
|
1376
|
-
const projected = await
|
|
1379
|
+
const projected = await projectCodexCatalogPage({ data: [thread] }, {
|
|
1380
|
+
localSessionsRoot: this.options.localSessionsRoot,
|
|
1381
|
+
sanitize: sanitizeTerminalText
|
|
1382
|
+
});
|
|
1377
1383
|
if (this.closed) return true;
|
|
1378
1384
|
const row = projected.rows[0];
|
|
1379
1385
|
if (row) this.observeFields(row, fieldRevision);
|
|
@@ -1421,7 +1427,7 @@ var CodexCatalogIndex = class {
|
|
|
1421
1427
|
this.scheduleHydration();
|
|
1422
1428
|
for (;;) {
|
|
1423
1429
|
this.assertCurrent();
|
|
1424
|
-
const ordered = this.ordering.read(
|
|
1430
|
+
const ordered = this.ordering.read();
|
|
1425
1431
|
const page = query?.(ordered, this.liveStatus, this.liveSettings, this.availability);
|
|
1426
1432
|
if (cursor.kind === "native" || this.overflow && (params.cwd || params.searchTerm || page && !page.nextCursor)) return await this.nativePages.list(params, cursor, this.options, request);
|
|
1427
1433
|
if (page) {
|
|
@@ -1456,7 +1462,7 @@ var CodexCatalogIndex = class {
|
|
|
1456
1462
|
]);
|
|
1457
1463
|
this.rows.clear();
|
|
1458
1464
|
this.observedFiles.clear();
|
|
1459
|
-
this.ordering.
|
|
1465
|
+
this.ordering.clear();
|
|
1460
1466
|
}
|
|
1461
1467
|
};
|
|
1462
1468
|
//#endregion
|
|
@@ -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-BynIoOYm.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;
|
|
@@ -19,12 +19,35 @@ function retainCodexCatalogRow(rows, candidate) {
|
|
|
19
19
|
var CodexCatalogOrdering = class {
|
|
20
20
|
constructor() {
|
|
21
21
|
this.nextEventOrder = -1;
|
|
22
|
+
this.ordered = [];
|
|
22
23
|
}
|
|
23
|
-
read(
|
|
24
|
-
return this.ordered
|
|
24
|
+
read() {
|
|
25
|
+
return this.ordered;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
positionOf(row) {
|
|
28
|
+
let low = 0;
|
|
29
|
+
let high = this.ordered.length;
|
|
30
|
+
while (low < high) {
|
|
31
|
+
const middle = low + high >>> 1;
|
|
32
|
+
if (compareCodexCatalogRows(this.ordered[middle].row, row) < 0) low = middle + 1;
|
|
33
|
+
else high = middle;
|
|
34
|
+
}
|
|
35
|
+
return low;
|
|
36
|
+
}
|
|
37
|
+
put(row, previous) {
|
|
38
|
+
if (previous) this.remove(previous);
|
|
39
|
+
const session = row.page.sessions[0];
|
|
40
|
+
if (!row.archived && session) this.ordered.splice(this.positionOf(row), 0, {
|
|
41
|
+
row,
|
|
42
|
+
searchText: (session.name ?? session.fallbackName ?? "").toLocaleLowerCase()
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
remove(row) {
|
|
46
|
+
const position = this.positionOf(row);
|
|
47
|
+
if (this.ordered[position]?.row.threadId === row.threadId) this.ordered.splice(position, 1);
|
|
48
|
+
}
|
|
49
|
+
clear() {
|
|
50
|
+
this.ordered.length = 0;
|
|
28
51
|
}
|
|
29
52
|
restore(row) {
|
|
30
53
|
this.nextEventOrder = Math.min(this.nextEventOrder, (row.sourceOrder ?? 0) - 1);
|
package/dist/.setup/{session-catalog-limits-DEU36Qlo.mjs → session-catalog-limits-BynIoOYm.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
2
2
|
//#region extensions/codex/src/session-catalog-limits.ts
|
|
3
3
|
var session_catalog_limits_exports = /* @__PURE__ */ __exportAll({
|
|
4
4
|
CODEX_CATALOG_MAX_ROWS: () => CODEX_CATALOG_MAX_ROWS,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as CatalogParamsError, v as parseCatalogPage } from "./session-catalog-parsing-
|
|
2
|
-
import { n as detachCodexCatalogString } from "./session-catalog-limits-
|
|
3
|
-
import { i as retainCodexCatalogRow, r as compareCodexCatalogRows } from "./session-catalog-index-order-
|
|
4
|
-
import { i as withTimeout } from "./timeout-
|
|
1
|
+
import { o as CatalogParamsError, v as parseCatalogPage } from "./session-catalog-parsing-DkeoVn60.mjs";
|
|
2
|
+
import { n as detachCodexCatalogString } from "./session-catalog-limits-BynIoOYm.mjs";
|
|
3
|
+
import { i as retainCodexCatalogRow, r as compareCodexCatalogRows } from "./session-catalog-index-order-CTfoefow.mjs";
|
|
4
|
+
import { i as withTimeout } from "./timeout-D0mEWSGG.mjs";
|
|
5
5
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { setImmediate } from "node:timers/promises";
|
|
@@ -198,6 +198,9 @@ var CodexCatalogLoadingError = class extends Error {
|
|
|
198
198
|
this.code = "APP_SERVER_UNAVAILABLE";
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
+
function withCodexCatalogLoadingTimeout(promise, timeoutMs) {
|
|
202
|
+
return withTimeout(promise, timeoutMs, "Codex session catalog is still loading", () => new CodexCatalogLoadingError());
|
|
203
|
+
}
|
|
201
204
|
/** One generation promise wakes cold callers; native pages remain owned by the index. */
|
|
202
205
|
var CodexCatalogAvailability = class {
|
|
203
206
|
constructor() {
|
|
@@ -233,7 +236,7 @@ var CodexCatalogAvailability = class {
|
|
|
233
236
|
async until(promise, deadline) {
|
|
234
237
|
const remaining = deadline - performance.now();
|
|
235
238
|
if (remaining <= 0) throw new CodexCatalogLoadingError();
|
|
236
|
-
return await
|
|
239
|
+
return await withCodexCatalogLoadingTimeout(promise, remaining);
|
|
237
240
|
}
|
|
238
241
|
async next(deadline) {
|
|
239
242
|
if (this.failure) throw this.failure.error;
|
|
@@ -282,7 +285,7 @@ var CodexCatalogListRequest = class {
|
|
|
282
285
|
pending.catch(() => {});
|
|
283
286
|
throw new CodexCatalogLoadingError();
|
|
284
287
|
}
|
|
285
|
-
const result = remaining === void 0 ? await pending : await
|
|
288
|
+
const result = remaining === void 0 ? await pending : await withCodexCatalogLoadingTimeout(pending, remaining);
|
|
286
289
|
this.assertActive();
|
|
287
290
|
return result;
|
|
288
291
|
}
|
|
@@ -291,7 +294,7 @@ var CodexCatalogListRequest = class {
|
|
|
291
294
|
if (!this.hasPages) throw new CatalogParamsError("Codex catalog native page budget is exhausted");
|
|
292
295
|
this.pages++;
|
|
293
296
|
try {
|
|
294
|
-
const result = await
|
|
297
|
+
const result = await withCodexCatalogLoadingTimeout(read(remaining), remaining);
|
|
295
298
|
this.assertActive();
|
|
296
299
|
return result;
|
|
297
300
|
} catch (error) {
|
|
@@ -355,4 +358,4 @@ async function withCodexCatalogListRequest(run) {
|
|
|
355
358
|
}
|
|
356
359
|
}
|
|
357
360
|
//#endregion
|
|
358
|
-
export { CodexCatalogLoadingError as a,
|
|
361
|
+
export { CodexCatalogLoadingError as a, CodexCatalogPersistence as c, CodexCatalogAvailability as i, codexCatalogMetadataPage as l, currentCodexCatalogListRequest as n, withCodexCatalogLoadingTimeout as o, withCodexCatalogListRequest as r, CODEX_CATALOG_STATE_NAMESPACE as s, CodexCatalogListRequest as t };
|
|
@@ -1,65 +1,9 @@
|
|
|
1
|
-
import { D as selectCodexCatalogPreviewInput, c as MAX_CWD_LENGTH, d as boundedCatalogString, k as truncateCodexCatalogPreview } from "./session-catalog-parsing-
|
|
1
|
+
import { D as selectCodexCatalogPreviewInput, c as MAX_CWD_LENGTH, d as boundedCatalogString, k as truncateCodexCatalogPreview } from "./session-catalog-parsing-DkeoVn60.mjs";
|
|
2
2
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
3
|
+
import { n as detachCodexCatalogString } from "./session-catalog-limits-BynIoOYm.mjs";
|
|
4
|
+
import { r as copyCodexCatalogSource } from "./session-catalog-source-CygTGmrb.mjs";
|
|
5
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
6
6
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
|
-
//#region extensions/codex/src/session-catalog-source.ts
|
|
8
|
-
function hasLiveCodexCatalogSource(sources) {
|
|
9
|
-
for (const source of sources) if (!source.closed) return true;
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
const getSources = defineCodexBuildState("openclaw.codexCatalogSources", () => ({
|
|
13
|
-
clients: /* @__PURE__ */ new WeakMap(),
|
|
14
|
-
values: /* @__PURE__ */ new WeakMap()
|
|
15
|
-
}));
|
|
16
|
-
const getEphemeralObservers = defineCodexBuildState("openclaw.codexCatalogEphemeralObservers", () => /* @__PURE__ */ new WeakMap());
|
|
17
|
-
/** A passive lifetime fact; the token never retains its client or a lease. */
|
|
18
|
-
function codexCatalogSourceForClient(client) {
|
|
19
|
-
const { clients } = getSources();
|
|
20
|
-
let source = clients.get(client);
|
|
21
|
-
if (!source) {
|
|
22
|
-
source = { closed: false };
|
|
23
|
-
clients.set(client, source);
|
|
24
|
-
}
|
|
25
|
-
return source;
|
|
26
|
-
}
|
|
27
|
-
function closeCodexCatalogClientSource(client) {
|
|
28
|
-
const { clients } = getSources();
|
|
29
|
-
const source = clients.get(client);
|
|
30
|
-
if (source) {
|
|
31
|
-
source.closed = true;
|
|
32
|
-
getEphemeralObservers().delete(source);
|
|
33
|
-
} else clients.set(client, { closed: true });
|
|
34
|
-
}
|
|
35
|
-
/** The catalog observer is bound once per physical source and released on closure. */
|
|
36
|
-
function observeCodexCatalogEphemeralThreads(source, observer) {
|
|
37
|
-
getEphemeralObservers().set(source, observer);
|
|
38
|
-
}
|
|
39
|
-
function getCodexCatalogSource(value) {
|
|
40
|
-
return value !== null && typeof value === "object" ? getSources().values.get(value) : void 0;
|
|
41
|
-
}
|
|
42
|
-
function setCodexCatalogSource(value, source) {
|
|
43
|
-
if (source) getSources().values.set(value, source);
|
|
44
|
-
return value;
|
|
45
|
-
}
|
|
46
|
-
/** Source attribution survives projection without becoming serialized row data. */
|
|
47
|
-
function copyCodexCatalogSource(from, to) {
|
|
48
|
-
return setCodexCatalogSource(to, getCodexCatalogSource(from));
|
|
49
|
-
}
|
|
50
|
-
/** Stamp the final decoded objects, including any bounded catalog DTO replacement. */
|
|
51
|
-
function recordCodexCatalogResponseSource(method, result, source) {
|
|
52
|
-
if (result === null || typeof result !== "object") return;
|
|
53
|
-
if (method === "thread/list" && "data" in result && Array.isArray(result.data)) {
|
|
54
|
-
setCodexCatalogSource(result, source);
|
|
55
|
-
for (const thread of result.data) if (thread !== null && typeof thread === "object") setCodexCatalogSource(thread, source);
|
|
56
|
-
} else if ((method === "thread/read" || method === "thread/start" || method === "thread/fork" || method === "thread/resume") && "thread" in result && result.thread !== null && typeof result.thread === "object") {
|
|
57
|
-
setCodexCatalogSource(result, source);
|
|
58
|
-
setCodexCatalogSource(result.thread, source);
|
|
59
|
-
if ("ephemeral" in result.thread && result.thread.ephemeral === true && "id" in result.thread && typeof result.thread.id === "string") getEphemeralObservers().get(source)?.(result.thread.id);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
7
|
//#region extensions/codex/src/session-catalog-native-projection.ts
|
|
64
8
|
var session_catalog_native_projection_exports = /* @__PURE__ */ __exportAll({
|
|
65
9
|
CODEX_CATALOG_NATIVE_PAGE_LIMIT: () => 64,
|
|
@@ -176,4 +120,4 @@ function reuseCodexCatalogPreview(thread, rawPreviewNonempty, cachedPreview) {
|
|
|
176
120
|
return preview !== void 0 && preview.length <= 500 && (rawPreviewNonempty === void 0 || rawPreviewNonempty === Boolean(preview)) ? preview : void 0;
|
|
177
121
|
}
|
|
178
122
|
//#endregion
|
|
179
|
-
export { session_catalog_native_projection_exports as a,
|
|
123
|
+
export { session_catalog_native_projection_exports as a, reuseCodexCatalogPreview as i, projectCodexCatalogNativeResponse as n, projectCodexCatalogNativeThread as r, CODEX_CATALOG_NATIVE_PAGE_LIMIT as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as CatalogParamsError } from "./session-catalog-parsing-
|
|
1
|
+
import { o as CatalogParamsError } from "./session-catalog-parsing-DkeoVn60.mjs";
|
|
2
2
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
4
4
|
import { parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -156,7 +156,7 @@ async function createOrReuseNodeAdoptedSession(params) {
|
|
|
156
156
|
},
|
|
157
157
|
afterCreate: async (entry) => {
|
|
158
158
|
const storePath = resolveStorePath(params.config.session?.store, { agentId: entry.agentId });
|
|
159
|
-
const { importCodexThreadHistoryToTranscript } = await import("./transcript-mirror-
|
|
159
|
+
const { importCodexThreadHistoryToTranscript } = await import("./transcript-mirror-Bee2o6jj.mjs").then((n) => n.a);
|
|
160
160
|
await importCodexThreadHistoryToTranscript({
|
|
161
161
|
thread: params.history.thread,
|
|
162
162
|
throughTurnId: params.history.throughTurnId,
|