@remnic/core 10.0.164 → 10.0.166
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/access-admin-ops-surface.js +128 -127
- package/dist/access-authorization-probe.js +4 -4
- package/dist/access-boundary.js +3 -3
- package/dist/access-cli.d.ts.map +1 -1
- package/dist/access-cli.js +144 -137
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +37 -0
- package/dist/access-coding-context-resolution.d.ts.map +1 -1
- package/dist/access-coding-context-resolution.js +48 -4
- package/dist/access-errors.d.ts +5 -0
- package/dist/access-errors.d.ts.map +1 -1
- package/dist/access-errors.js +3 -1
- package/dist/access-extraction-force-flush-preempt.js +128 -127
- package/dist/access-extraction-force-flush.js +128 -127
- package/dist/access-http-briefing.js +128 -127
- package/dist/access-http-query.js +128 -127
- package/dist/access-http.d.ts.map +1 -1
- package/dist/access-http.js +128 -127
- package/dist/access-identity-continuity-surface.js +128 -127
- package/dist/access-lcm-surface.js +128 -127
- package/dist/access-mcp.js +128 -127
- package/dist/access-memory-search-fanout.js +2 -2
- package/dist/access-namespace-preflight.js +4 -4
- package/dist/access-observe-transcript.js +3 -2
- package/dist/access-observe-write-category.js +9 -9
- package/dist/access-observe-write-surface.d.ts +1 -0
- package/dist/access-observe-write-surface.d.ts.map +1 -1
- package/dist/access-observe-write-surface.js +128 -127
- package/dist/access-offline-manifest.js +9 -8
- package/dist/access-operations-batch.js +128 -127
- package/dist/access-operations.d.ts +1 -1
- package/dist/access-operations.js +128 -127
- package/dist/access-recall-concurrency.d.ts +3 -16
- package/dist/access-recall-concurrency.d.ts.map +1 -1
- package/dist/access-recall-concurrency.js +128 -127
- package/dist/access-recall-corpus-versions.d.ts +4 -1
- package/dist/access-recall-corpus-versions.d.ts.map +1 -1
- package/dist/access-recall-corpus-versions.js +4 -1
- package/dist/access-recall-diagnostics.js +3 -3
- package/dist/access-recall-response.d.ts.map +1 -1
- package/dist/access-recall-response.js +128 -127
- package/dist/access-recall-surface.d.ts +1 -0
- package/dist/access-recall-surface.d.ts.map +1 -1
- package/dist/access-recall-surface.js +128 -127
- package/dist/access-schema.d.ts +1 -0
- package/dist/access-schema.d.ts.map +1 -1
- package/dist/access-schema.js +2 -2
- package/dist/access-service.d.ts +3 -15
- package/dist/access-service.d.ts.map +1 -1
- package/dist/access-service.js +130 -127
- package/dist/access-surface-catalog.js +5 -5
- package/dist/access-token-capabilities.js +2 -2
- package/dist/active-recall.js +21 -21
- package/dist/artifact-search.js +2 -2
- package/dist/auto-sync-L3M4RKJD.js +1 -1
- package/dist/briefing.js +19 -19
- package/dist/buffer-add-turns-bounded.js +2 -2
- package/dist/buffer-turn-helpers.d.ts.map +1 -1
- package/dist/buffer-turn-helpers.js +1 -1
- package/dist/buffer.js +11 -10
- package/dist/calibration.js +2 -2
- package/dist/capsule-import-gate.js +2 -2
- package/dist/causal-consolidation.js +20 -20
- package/dist/{chunk-5V3IBSVB.js → chunk-22V3CMIW.js} +4 -4
- package/dist/{chunk-IHOKB3L3.js → chunk-2FCZIWRI.js} +785 -515
- package/dist/chunk-2FCZIWRI.js.map +1 -0
- package/dist/{chunk-7IWRLYFJ.js → chunk-2TJSGIKT.js} +2 -2
- package/dist/{chunk-V6M6N3EE.js → chunk-333SBFXB.js} +2 -2
- package/dist/{chunk-XBW7U7GM.js → chunk-3PNJZTDV.js} +5 -2
- package/dist/chunk-3PNJZTDV.js.map +1 -0
- package/dist/{chunk-XE4UYWW3.js → chunk-3YOX2BQD.js} +3 -3
- package/dist/{chunk-V4ASAWRP.js → chunk-47LDDGAL.js} +3 -3
- package/dist/{chunk-XEBNSY7N.js → chunk-4D2EY4WM.js} +2 -2
- package/dist/{chunk-5HFCXTGY.js → chunk-4D77BI3J.js} +29 -189
- package/dist/chunk-4D77BI3J.js.map +1 -0
- package/dist/{chunk-LPV72KRQ.js → chunk-4IMOGAFF.js} +3 -3
- package/dist/{chunk-QBREZ4QL.js → chunk-4L25GAYL.js} +2 -2
- package/dist/{chunk-HADD45AR.js → chunk-4WCLZBM2.js} +2 -2
- package/dist/{chunk-B3GKQ6DU.js → chunk-5MA6ZQ4Z.js} +2 -2
- package/dist/{chunk-3QLAOYBL.js → chunk-5QDTZIGH.js} +3 -3
- package/dist/{chunk-WXDTOE6F.js → chunk-5VMRM2X3.js} +2 -2
- package/dist/{chunk-VE23DIBH.js → chunk-6QWFZ3X5.js} +2 -2
- package/dist/{chunk-SDGD6MYV.js → chunk-7F7HRJI2.js} +2 -2
- package/dist/{chunk-QFPNWSVH.js → chunk-7OCKK5M5.js} +6 -6
- package/dist/{chunk-YAVIBVCU.js → chunk-7QF26EWO.js} +5 -5
- package/dist/{chunk-WAJL65KW.js → chunk-7VIJUZYW.js} +3 -3
- package/dist/{chunk-EI2M2CFJ.js → chunk-A5UOREWD.js} +3 -3
- package/dist/{chunk-32CA7B6L.js → chunk-AQZL7JBZ.js} +2 -2
- package/dist/{chunk-EDA6CDBT.js → chunk-AVWOULJH.js} +2 -2
- package/dist/{chunk-4HKK5HUI.js → chunk-B3M56D2A.js} +2 -2
- package/dist/{chunk-SRN5M4LQ.js → chunk-BKTCVXMK.js} +4 -4
- package/dist/{chunk-TXVTNDQT.js → chunk-BPCR5DZP.js} +2 -2
- package/dist/chunk-CKELO7Q6.js +113 -0
- package/dist/chunk-CKELO7Q6.js.map +1 -0
- package/dist/{chunk-IEB6XYW6.js → chunk-CKZWLAHN.js} +2 -2
- package/dist/{chunk-JVIWVJ2A.js → chunk-CUPILBIP.js} +3 -3
- package/dist/{chunk-274UY54Z.js → chunk-DFZYZOLH.js} +3 -3
- package/dist/{chunk-6S4DM53Y.js → chunk-E6EESRJ6.js} +6 -6
- package/dist/{chunk-FSI45NUK.js → chunk-EZG54YDS.js} +2 -2
- package/dist/{chunk-7ZFB4VZS.js → chunk-FFWFFAP3.js} +2 -2
- package/dist/{chunk-22VXXA67.js → chunk-FGT7CUYZ.js} +2 -2
- package/dist/{chunk-Z3SXC3MP.js → chunk-FOTFLHBN.js} +2 -2
- package/dist/{chunk-RH6XWXMA.js → chunk-FRYCXXTB.js} +3 -3
- package/dist/{chunk-B377OKUP.js → chunk-G64WYD2S.js} +4 -4
- package/dist/{chunk-JJEQRSYU.js → chunk-GBSXTTLP.js} +2 -2
- package/dist/{chunk-2YODOG2O.js → chunk-GIL2M2OI.js} +3 -3
- package/dist/{chunk-YVRQ5JRA.js → chunk-GYOKVJPB.js} +14 -8
- package/dist/chunk-GYOKVJPB.js.map +1 -0
- package/dist/{chunk-ARJ3KCX4.js → chunk-HDLNSDLK.js} +2 -2
- package/dist/{chunk-VXUO5JZC.js → chunk-HDWISXFH.js} +6 -6
- package/dist/{chunk-RNFMFC37.js → chunk-IDYYGOOQ.js} +28 -1
- package/dist/chunk-IDYYGOOQ.js.map +1 -0
- package/dist/{chunk-EZ47HOJ6.js → chunk-IXI6S2VJ.js} +4 -4
- package/dist/{chunk-VXMWTRQX.js → chunk-J74YOBB3.js} +4 -4
- package/dist/{chunk-AMW3IDCO.js → chunk-JFMMEHVG.js} +2 -2
- package/dist/{chunk-6TPWIPE3.js → chunk-JFZZDMEZ.js} +3 -3
- package/dist/{chunk-JTSSSR4L.js → chunk-KIUFT2WZ.js} +3 -3
- package/dist/{chunk-L6BLTV4D.js → chunk-L7SEYUHS.js} +2 -2
- package/dist/{chunk-WRAK5LLB.js → chunk-LPUEBFX2.js} +3 -3
- package/dist/{chunk-DBVSU3HE.js → chunk-LVGTH6IQ.js} +9 -9
- package/dist/{chunk-33VVVP57.js → chunk-MEVBSF6T.js} +4 -1
- package/dist/chunk-MEVBSF6T.js.map +1 -0
- package/dist/{chunk-CJCTKL6Y.js → chunk-MGKCKY7X.js} +4 -1
- package/dist/chunk-MGKCKY7X.js.map +1 -0
- package/dist/{chunk-SOGOHLWN.js → chunk-N7AIFTSH.js} +1 -1
- package/dist/chunk-N7AIFTSH.js.map +1 -0
- package/dist/chunk-O3XGASU5.js +197 -0
- package/dist/chunk-O3XGASU5.js.map +1 -0
- package/dist/{chunk-OGBQMY46.js → chunk-O544TUJO.js} +2 -2
- package/dist/{chunk-TFNZXOXK.js → chunk-OAQRZ4SV.js} +2 -2
- package/dist/{chunk-IEEV27BC.js → chunk-OO2HEUZ4.js} +2 -2
- package/dist/{chunk-YMC4AYJK.js → chunk-OWM2VWNX.js} +10 -10
- package/dist/{chunk-4LPTSB5V.js → chunk-PFLN6TTW.js} +2 -2
- package/dist/{chunk-YOR5QBEU.js → chunk-QFTK6EDM.js} +4 -4
- package/dist/{chunk-A2WFUMUN.js → chunk-QKDXO4FD.js} +4 -4
- package/dist/{chunk-Y7HLGKKU.js → chunk-QLQUAVVP.js} +4 -4
- package/dist/{chunk-MUMQWCE2.js → chunk-QPFM6DHY.js} +2 -2
- package/dist/{chunk-YWPCDR3I.js → chunk-QVXEXGIM.js} +3 -3
- package/dist/{chunk-UPE7TJWN.js → chunk-QWWHYBPT.js} +2 -2
- package/dist/{chunk-NZHZQGLB.js → chunk-QXTKN25V.js} +2 -2
- package/dist/{chunk-OAGTKS73.js → chunk-RFLC6PKQ.js} +2 -2
- package/dist/{chunk-ZRLTQ2Y7.js → chunk-RO5EGRAI.js} +2 -2
- package/dist/{chunk-5D4NBANY.js → chunk-SIONKXLU.js} +2 -2
- package/dist/{chunk-6XTUZKCZ.js → chunk-SMDZTJ2D.js} +2 -2
- package/dist/{chunk-OFSAKEZB.js → chunk-T4BT4FQN.js} +2 -2
- package/dist/{chunk-IC35ZYLM.js → chunk-TAD6QMMD.js} +4 -4
- package/dist/{chunk-EAHNSQ7H.js → chunk-TB6VFEHQ.js} +2 -2
- package/dist/{chunk-6ARSFTLD.js → chunk-TNRGWJYT.js} +2 -2
- package/dist/{chunk-JCAMHTS2.js → chunk-UBG65KEY.js} +7 -5
- package/dist/{chunk-JCAMHTS2.js.map → chunk-UBG65KEY.js.map} +1 -1
- package/dist/{chunk-CGOPDXLK.js → chunk-UMEUU66X.js} +2 -2
- package/dist/{chunk-5LTXYM7D.js → chunk-UYIBNDQE.js} +2 -2
- package/dist/{chunk-UGQEJWR3.js → chunk-VHXRLD6S.js} +2 -2
- package/dist/{chunk-WJ6S54ES.js → chunk-VOLTQNAP.js} +2 -2
- package/dist/{chunk-SBU5GDOT.js → chunk-VRHY7Y5A.js} +7 -7
- package/dist/{chunk-E5RJPLNL.js → chunk-W7N7NWG5.js} +3 -3
- package/dist/{chunk-UPWOMMVU.js → chunk-WECKZ3KT.js} +7 -7
- package/dist/{chunk-PCUDFWX5.js → chunk-WEFFO2MJ.js} +2 -2
- package/dist/{chunk-QCP75JGO.js → chunk-WQUGCOKF.js} +5 -5
- package/dist/{chunk-FKBGK3NC.js → chunk-WWUQ6CP3.js} +2 -2
- package/dist/{chunk-KR6PEAM4.js → chunk-X67XNZ64.js} +8 -8
- package/dist/{chunk-UYHDMCY2.js → chunk-XUVCQ4YZ.js} +2 -2
- package/dist/{chunk-7IJ2H43M.js → chunk-YY57TRKN.js} +2 -2
- package/dist/{chunk-AU6AEUFD.js → chunk-YYXYZM2I.js} +2 -2
- package/dist/{chunk-3FBAEPCU.js → chunk-ZDUE44CC.js} +2 -2
- package/dist/{chunk-PRE7R3RQ.js → chunk-ZQUOUPP3.js} +12 -3
- package/dist/chunk-ZQUOUPP3.js.map +1 -0
- package/dist/{chunk-RDO6AMDL.js → chunk-ZWDDY4WF.js} +2 -2
- package/dist/{chunk-QASTQVGK.js → chunk-ZX546Y3Y.js} +2 -2
- package/dist/chunk-ZX546Y3Y.js.map +1 -0
- package/dist/cli.js +128 -127
- package/dist/coding/architecture-surfaces.d.ts +0 -24
- package/dist/coding/architecture-surfaces.d.ts.map +1 -1
- package/dist/coding/codegraph-surfaces.d.ts.map +1 -1
- package/dist/coding/export-okf-codegraph.js +51 -24
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/coding/git-context.d.ts +23 -0
- package/dist/coding/git-context.d.ts.map +1 -1
- package/dist/coding/git-context.js +31 -0
- package/dist/coding/git-context.js.map +1 -0
- package/dist/coding/session-delta-surfaces.d.ts +0 -23
- package/dist/coding/session-delta-surfaces.d.ts.map +1 -1
- package/dist/compounding/engine.js +20 -20
- package/dist/config.js +21 -21
- package/dist/connectors/codex-materialize-runner.js +19 -19
- package/dist/connectors/index.js +23 -23
- package/dist/convergence-refresh.js +21 -21
- package/dist/conversation-index/backend.js +2 -2
- package/dist/corpus-watermark.js +23 -23
- package/dist/deep-recall-config.js +2 -2
- package/dist/deep-recall-http-glue.js +4 -4
- package/dist/entity-recall-cancellation.js +2 -2
- package/dist/entity-recall-reads.js +3 -3
- package/dist/entity-retrieval.js +21 -21
- package/dist/explicit-capture.js +128 -127
- package/dist/external-wiki-access.js +4 -4
- package/dist/extraction-judge.js +1 -1
- package/dist/extraction.js +31 -30
- package/dist/harmonic-retrieval.js +19 -19
- package/dist/index.js +207 -205
- package/dist/local-llm.js +2 -2
- package/dist/location/index.js +21 -21
- package/dist/maintenance/memory-governance.js +19 -19
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +19 -19
- package/dist/maintenance/rebuild-memory-projection-runner.js +21 -21
- package/dist/maintenance/rebuild-memory-projection.js +20 -20
- package/dist/memory-browse-http-glue.js +2 -2
- package/dist/memory-browse-operations.js +4 -4
- package/dist/memory-browse.js +6 -6
- package/dist/namespaces/migrate.js +20 -20
- package/dist/namespaces/search.js +8 -8
- package/dist/namespaces/storage.js +19 -19
- package/dist/offline-sync-impression-drain.js +8 -7
- package/dist/operator-doctor-corpus.js +26 -26
- package/dist/operator-doctor-replica.js +4 -4
- package/dist/operator-toolkit.js +35 -34
- package/dist/orchestration/backlog-scheduler.js +129 -128
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +129 -128
- package/dist/orchestration/episodic-context-section.d.ts +3 -2
- package/dist/orchestration/episodic-context-section.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +34 -33
- package/dist/orchestration/orchestrator-helpers.d.ts +10 -0
- package/dist/orchestration/orchestrator-helpers.d.ts.map +1 -1
- package/dist/orchestration/orchestrator-init.d.ts +12 -13
- package/dist/orchestration/orchestrator-init.d.ts.map +1 -1
- package/dist/orchestration/recall-entry.d.ts.map +1 -1
- package/dist/orchestration/recall-internal.d.ts.map +1 -1
- package/dist/orchestration/session-context.d.ts +5 -1
- package/dist/orchestration/session-context.d.ts.map +1 -1
- package/dist/orchestration/startup-search-sync.d.ts +73 -0
- package/dist/orchestration/startup-search-sync.d.ts.map +1 -0
- package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
- package/dist/orchestrator.d.ts +4 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +128 -127
- package/dist/qmd-daemon-session.js +2 -2
- package/dist/qmd.js +3 -3
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation-http-glue.js +2 -2
- package/dist/recall-navigation-operations.js +4 -4
- package/dist/recall-navigation.js +128 -127
- package/dist/recall-qos.d.ts +26 -0
- package/dist/recall-qos.d.ts.map +1 -1
- package/dist/recall-qos.js +9 -1
- package/dist/recall-state-view-admission.js +6 -6
- package/dist/recall-why-service.js +6 -6
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.js +2 -2
- package/dist/relay/mission.d.ts +3 -3
- package/dist/replica-divergence.js +3 -3
- package/dist/resume-bundles.js +23 -23
- package/dist/search/factory.js +7 -7
- package/dist/search/index.js +9 -9
- package/dist/semantic-consolidation.js +20 -20
- package/dist/semantic-rule-promotion.js +19 -19
- package/dist/semantic-rule-verifier.js +19 -19
- package/dist/source-agent-qualifier.js +29 -28
- package/dist/standup/build.js +20 -20
- package/dist/storage/buffer-drain-claims.js +2 -2
- package/dist/storage/buffer-session-files.js +2 -2
- package/dist/storage.js +18 -18
- package/dist/summarizer.js +3 -3
- package/dist/support-passport/index.js +7 -7
- package/dist/tokens.js +3 -3
- package/dist/transfer/export-okf.js +19 -19
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +19 -19
- package/dist/who-knows-cli.js +21 -21
- package/dist/who-knows.js +20 -20
- package/package.json +12 -2
- package/src/access-cli.ts +18 -9
- package/src/access-coding-context-resolution.ts +138 -0
- package/src/access-errors.ts +5 -0
- package/src/access-http-admission.test.ts +76 -0
- package/src/access-http.test.ts +2 -0
- package/src/access-http.ts +4 -0
- package/src/access-observe-write-surface.ts +2 -1
- package/src/access-operations-batch.ts +2 -2
- package/src/access-recall-concurrency.ts +179 -22
- package/src/access-recall-corpus-versions.ts +12 -7
- package/src/access-recall-response.ts +25 -2
- package/src/access-recall-surface.ts +6 -4
- package/src/access-schema.ts +9 -0
- package/src/access-service-raw-excerpt-read-gate.test.ts +7 -2
- package/src/access-service-recall-concurrency.test.ts +242 -0
- package/src/access-service-set-coding-context.test.ts +210 -0
- package/src/access-service.ts +43 -58
- package/src/buffer-turn-helpers.ts +3 -0
- package/src/capsule-import-gate.test.ts +106 -0
- package/src/coding/access-coding-context.test.ts +3 -0
- package/src/coding/architecture-surfaces.ts +2 -1
- package/src/coding/codegraph-surfaces.test.ts +34 -0
- package/src/coding/codegraph-surfaces.ts +3 -2
- package/src/coding/git-context.test.ts +29 -0
- package/src/coding/git-context.ts +63 -2
- package/src/coding/session-delta-surfaces.ts +2 -1
- package/src/harmonic-graph-version.test.ts +63 -0
- package/src/orchestration/episodic-context-section.ts +6 -7
- package/src/orchestration/orchestrator-helpers.ts +10 -0
- package/src/orchestration/orchestrator-init.ts +57 -303
- package/src/orchestration/recall-entry.ts +59 -4
- package/src/orchestration/recall-internal.ts +10 -10
- package/src/orchestration/session-context.ts +11 -1
- package/src/orchestration/startup-search-sync.ts +492 -0
- package/src/orchestration/task-exit.test.ts +45 -0
- package/src/orchestration/turn-ingestion-buffered.test.ts +224 -0
- package/src/orchestration/turn-ingestion.ts +28 -35
- package/src/orchestrator-flush.test.ts +7 -7
- package/src/orchestrator-init.test.ts +364 -12
- package/src/orchestrator-source-attribution.test.ts +100 -0
- package/src/orchestrator-startup-ready-path.test.ts +133 -10
- package/src/orchestrator.ts +16 -1
- package/src/recall-qos.test.ts +62 -0
- package/src/recall-qos.ts +75 -0
- package/src/recall-retrieval-failure.test.ts +282 -18
- package/src/recall-search-options.test.ts +13 -1
- package/src/storage/buffer-drain-handin-memo.test.ts +140 -0
- package/src/types.ts +1 -1
- package/dist/chunk-33VVVP57.js.map +0 -1
- package/dist/chunk-3QNFHI6T.js +0 -38
- package/dist/chunk-3QNFHI6T.js.map +0 -1
- package/dist/chunk-5HFCXTGY.js.map +0 -1
- package/dist/chunk-CJCTKL6Y.js.map +0 -1
- package/dist/chunk-IHOKB3L3.js.map +0 -1
- package/dist/chunk-PRE7R3RQ.js.map +0 -1
- package/dist/chunk-QASTQVGK.js.map +0 -1
- package/dist/chunk-RNFMFC37.js.map +0 -1
- package/dist/chunk-SOGOHLWN.js.map +0 -1
- package/dist/chunk-XBW7U7GM.js.map +0 -1
- package/dist/chunk-YVRQ5JRA.js.map +0 -1
- /package/dist/{chunk-5V3IBSVB.js.map → chunk-22V3CMIW.js.map} +0 -0
- /package/dist/{chunk-7IWRLYFJ.js.map → chunk-2TJSGIKT.js.map} +0 -0
- /package/dist/{chunk-V6M6N3EE.js.map → chunk-333SBFXB.js.map} +0 -0
- /package/dist/{chunk-XE4UYWW3.js.map → chunk-3YOX2BQD.js.map} +0 -0
- /package/dist/{chunk-V4ASAWRP.js.map → chunk-47LDDGAL.js.map} +0 -0
- /package/dist/{chunk-XEBNSY7N.js.map → chunk-4D2EY4WM.js.map} +0 -0
- /package/dist/{chunk-LPV72KRQ.js.map → chunk-4IMOGAFF.js.map} +0 -0
- /package/dist/{chunk-QBREZ4QL.js.map → chunk-4L25GAYL.js.map} +0 -0
- /package/dist/{chunk-HADD45AR.js.map → chunk-4WCLZBM2.js.map} +0 -0
- /package/dist/{chunk-B3GKQ6DU.js.map → chunk-5MA6ZQ4Z.js.map} +0 -0
- /package/dist/{chunk-3QLAOYBL.js.map → chunk-5QDTZIGH.js.map} +0 -0
- /package/dist/{chunk-WXDTOE6F.js.map → chunk-5VMRM2X3.js.map} +0 -0
- /package/dist/{chunk-VE23DIBH.js.map → chunk-6QWFZ3X5.js.map} +0 -0
- /package/dist/{chunk-SDGD6MYV.js.map → chunk-7F7HRJI2.js.map} +0 -0
- /package/dist/{chunk-QFPNWSVH.js.map → chunk-7OCKK5M5.js.map} +0 -0
- /package/dist/{chunk-YAVIBVCU.js.map → chunk-7QF26EWO.js.map} +0 -0
- /package/dist/{chunk-WAJL65KW.js.map → chunk-7VIJUZYW.js.map} +0 -0
- /package/dist/{chunk-EI2M2CFJ.js.map → chunk-A5UOREWD.js.map} +0 -0
- /package/dist/{chunk-32CA7B6L.js.map → chunk-AQZL7JBZ.js.map} +0 -0
- /package/dist/{chunk-EDA6CDBT.js.map → chunk-AVWOULJH.js.map} +0 -0
- /package/dist/{chunk-4HKK5HUI.js.map → chunk-B3M56D2A.js.map} +0 -0
- /package/dist/{chunk-SRN5M4LQ.js.map → chunk-BKTCVXMK.js.map} +0 -0
- /package/dist/{chunk-TXVTNDQT.js.map → chunk-BPCR5DZP.js.map} +0 -0
- /package/dist/{chunk-IEB6XYW6.js.map → chunk-CKZWLAHN.js.map} +0 -0
- /package/dist/{chunk-JVIWVJ2A.js.map → chunk-CUPILBIP.js.map} +0 -0
- /package/dist/{chunk-274UY54Z.js.map → chunk-DFZYZOLH.js.map} +0 -0
- /package/dist/{chunk-6S4DM53Y.js.map → chunk-E6EESRJ6.js.map} +0 -0
- /package/dist/{chunk-FSI45NUK.js.map → chunk-EZG54YDS.js.map} +0 -0
- /package/dist/{chunk-7ZFB4VZS.js.map → chunk-FFWFFAP3.js.map} +0 -0
- /package/dist/{chunk-22VXXA67.js.map → chunk-FGT7CUYZ.js.map} +0 -0
- /package/dist/{chunk-Z3SXC3MP.js.map → chunk-FOTFLHBN.js.map} +0 -0
- /package/dist/{chunk-RH6XWXMA.js.map → chunk-FRYCXXTB.js.map} +0 -0
- /package/dist/{chunk-B377OKUP.js.map → chunk-G64WYD2S.js.map} +0 -0
- /package/dist/{chunk-JJEQRSYU.js.map → chunk-GBSXTTLP.js.map} +0 -0
- /package/dist/{chunk-2YODOG2O.js.map → chunk-GIL2M2OI.js.map} +0 -0
- /package/dist/{chunk-ARJ3KCX4.js.map → chunk-HDLNSDLK.js.map} +0 -0
- /package/dist/{chunk-VXUO5JZC.js.map → chunk-HDWISXFH.js.map} +0 -0
- /package/dist/{chunk-EZ47HOJ6.js.map → chunk-IXI6S2VJ.js.map} +0 -0
- /package/dist/{chunk-VXMWTRQX.js.map → chunk-J74YOBB3.js.map} +0 -0
- /package/dist/{chunk-AMW3IDCO.js.map → chunk-JFMMEHVG.js.map} +0 -0
- /package/dist/{chunk-6TPWIPE3.js.map → chunk-JFZZDMEZ.js.map} +0 -0
- /package/dist/{chunk-JTSSSR4L.js.map → chunk-KIUFT2WZ.js.map} +0 -0
- /package/dist/{chunk-L6BLTV4D.js.map → chunk-L7SEYUHS.js.map} +0 -0
- /package/dist/{chunk-WRAK5LLB.js.map → chunk-LPUEBFX2.js.map} +0 -0
- /package/dist/{chunk-DBVSU3HE.js.map → chunk-LVGTH6IQ.js.map} +0 -0
- /package/dist/{chunk-OGBQMY46.js.map → chunk-O544TUJO.js.map} +0 -0
- /package/dist/{chunk-TFNZXOXK.js.map → chunk-OAQRZ4SV.js.map} +0 -0
- /package/dist/{chunk-IEEV27BC.js.map → chunk-OO2HEUZ4.js.map} +0 -0
- /package/dist/{chunk-YMC4AYJK.js.map → chunk-OWM2VWNX.js.map} +0 -0
- /package/dist/{chunk-4LPTSB5V.js.map → chunk-PFLN6TTW.js.map} +0 -0
- /package/dist/{chunk-YOR5QBEU.js.map → chunk-QFTK6EDM.js.map} +0 -0
- /package/dist/{chunk-A2WFUMUN.js.map → chunk-QKDXO4FD.js.map} +0 -0
- /package/dist/{chunk-Y7HLGKKU.js.map → chunk-QLQUAVVP.js.map} +0 -0
- /package/dist/{chunk-MUMQWCE2.js.map → chunk-QPFM6DHY.js.map} +0 -0
- /package/dist/{chunk-YWPCDR3I.js.map → chunk-QVXEXGIM.js.map} +0 -0
- /package/dist/{chunk-UPE7TJWN.js.map → chunk-QWWHYBPT.js.map} +0 -0
- /package/dist/{chunk-NZHZQGLB.js.map → chunk-QXTKN25V.js.map} +0 -0
- /package/dist/{chunk-OAGTKS73.js.map → chunk-RFLC6PKQ.js.map} +0 -0
- /package/dist/{chunk-ZRLTQ2Y7.js.map → chunk-RO5EGRAI.js.map} +0 -0
- /package/dist/{chunk-5D4NBANY.js.map → chunk-SIONKXLU.js.map} +0 -0
- /package/dist/{chunk-6XTUZKCZ.js.map → chunk-SMDZTJ2D.js.map} +0 -0
- /package/dist/{chunk-OFSAKEZB.js.map → chunk-T4BT4FQN.js.map} +0 -0
- /package/dist/{chunk-IC35ZYLM.js.map → chunk-TAD6QMMD.js.map} +0 -0
- /package/dist/{chunk-EAHNSQ7H.js.map → chunk-TB6VFEHQ.js.map} +0 -0
- /package/dist/{chunk-6ARSFTLD.js.map → chunk-TNRGWJYT.js.map} +0 -0
- /package/dist/{chunk-CGOPDXLK.js.map → chunk-UMEUU66X.js.map} +0 -0
- /package/dist/{chunk-5LTXYM7D.js.map → chunk-UYIBNDQE.js.map} +0 -0
- /package/dist/{chunk-UGQEJWR3.js.map → chunk-VHXRLD6S.js.map} +0 -0
- /package/dist/{chunk-WJ6S54ES.js.map → chunk-VOLTQNAP.js.map} +0 -0
- /package/dist/{chunk-SBU5GDOT.js.map → chunk-VRHY7Y5A.js.map} +0 -0
- /package/dist/{chunk-E5RJPLNL.js.map → chunk-W7N7NWG5.js.map} +0 -0
- /package/dist/{chunk-UPWOMMVU.js.map → chunk-WECKZ3KT.js.map} +0 -0
- /package/dist/{chunk-PCUDFWX5.js.map → chunk-WEFFO2MJ.js.map} +0 -0
- /package/dist/{chunk-QCP75JGO.js.map → chunk-WQUGCOKF.js.map} +0 -0
- /package/dist/{chunk-FKBGK3NC.js.map → chunk-WWUQ6CP3.js.map} +0 -0
- /package/dist/{chunk-KR6PEAM4.js.map → chunk-X67XNZ64.js.map} +0 -0
- /package/dist/{chunk-UYHDMCY2.js.map → chunk-XUVCQ4YZ.js.map} +0 -0
- /package/dist/{chunk-7IJ2H43M.js.map → chunk-YY57TRKN.js.map} +0 -0
- /package/dist/{chunk-AU6AEUFD.js.map → chunk-YYXYZM2I.js.map} +0 -0
- /package/dist/{chunk-3FBAEPCU.js.map → chunk-ZDUE44CC.js.map} +0 -0
- /package/dist/{chunk-RDO6AMDL.js.map → chunk-ZWDDY4WF.js.map} +0 -0
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
exportOkfBundle,
|
|
50
50
|
parseIncludeStatus
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-UYIBNDQE.js";
|
|
52
52
|
import {
|
|
53
53
|
exportSqlite
|
|
54
54
|
} from "./chunk-BV2TIZ4F.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
SupportPassportAccessSurface,
|
|
57
57
|
createSupportPassportModelAdapter,
|
|
58
58
|
supportsSupportPassportPrivateFiles
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-22V3CMIW.js";
|
|
60
60
|
import {
|
|
61
61
|
detectImportFormat
|
|
62
62
|
} from "./chunk-OZKVVUJB.js";
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
import {
|
|
77
77
|
buildStandup,
|
|
78
78
|
parseStandupDate
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-CUPILBIP.js";
|
|
80
80
|
import {
|
|
81
81
|
buildReplayNormalizerRegistry,
|
|
82
82
|
clampBatchSize,
|
|
@@ -89,6 +89,9 @@ import {
|
|
|
89
89
|
import {
|
|
90
90
|
RoutingRulesStore
|
|
91
91
|
} from "./chunk-TBUEE7XF.js";
|
|
92
|
+
import {
|
|
93
|
+
TailscaleHelper
|
|
94
|
+
} from "./chunk-SZDLX763.js";
|
|
92
95
|
import {
|
|
93
96
|
WebDavServer
|
|
94
97
|
} from "./chunk-PYIFUBRK.js";
|
|
@@ -98,7 +101,7 @@ import {
|
|
|
98
101
|
import {
|
|
99
102
|
ActivityStore,
|
|
100
103
|
MaintenanceScheduler
|
|
101
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-X67XNZ64.js";
|
|
102
105
|
import {
|
|
103
106
|
runPeerProfileReasoner
|
|
104
107
|
} from "./chunk-I74SUMNI.js";
|
|
@@ -108,15 +111,12 @@ import {
|
|
|
108
111
|
import {
|
|
109
112
|
migrateFromEngram
|
|
110
113
|
} from "./chunk-VZAKYDMJ.js";
|
|
111
|
-
import {
|
|
112
|
-
TailscaleHelper
|
|
113
|
-
} from "./chunk-SZDLX763.js";
|
|
114
114
|
import {
|
|
115
115
|
migrateObservations
|
|
116
116
|
} from "./chunk-6PEEZSGL.js";
|
|
117
117
|
import {
|
|
118
118
|
rebuildMemoryLifecycleLedger
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-RFLC6PKQ.js";
|
|
120
120
|
import {
|
|
121
121
|
backfillMemoryStorage,
|
|
122
122
|
runLocationBackfill,
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
runLocationDay,
|
|
125
125
|
runLocationStatus,
|
|
126
126
|
runLocationSync
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-BKTCVXMK.js";
|
|
128
128
|
import {
|
|
129
129
|
archiveObservations
|
|
130
130
|
} from "./chunk-SBQOBY3S.js";
|
|
@@ -148,7 +148,7 @@ import {
|
|
|
148
148
|
import {
|
|
149
149
|
CompoundingEngine,
|
|
150
150
|
defaultTierMigrationCycleBudget
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-VRHY7Y5A.js";
|
|
152
152
|
import {
|
|
153
153
|
SharedContextManager,
|
|
154
154
|
UNATTRIBUTED_ACCESS_WRITE_ORIGIN
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
parseDecisionRecord,
|
|
180
180
|
resolveCodegraphProjectId,
|
|
181
181
|
serializeDecisionRecord
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-3PNJZTDV.js";
|
|
183
183
|
import {
|
|
184
184
|
lintOkfDir
|
|
185
185
|
} from "./chunk-SQXCUH4L.js";
|
|
@@ -200,7 +200,7 @@ import {
|
|
|
200
200
|
import {
|
|
201
201
|
compareVerifiedEpisodeResults,
|
|
202
202
|
searchVerifiedEpisodes
|
|
203
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-PFLN6TTW.js";
|
|
204
204
|
import {
|
|
205
205
|
WHO_KNOWS_DEFAULT_LIMIT,
|
|
206
206
|
WHO_KNOWS_MCP_TOOLS,
|
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
handleWhoKnowsHttpQuery,
|
|
209
209
|
loadWhoKnowsEntities,
|
|
210
210
|
validateWhoKnowsInput
|
|
211
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-A5UOREWD.js";
|
|
212
212
|
import {
|
|
213
213
|
getTrustZoneStoreStatus,
|
|
214
214
|
isTrustZoneName,
|
|
@@ -273,7 +273,7 @@ import {
|
|
|
273
273
|
import {
|
|
274
274
|
HourlySummarizer,
|
|
275
275
|
summarizeHourlyStatus
|
|
276
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-BPCR5DZP.js";
|
|
277
277
|
import {
|
|
278
278
|
SessionObserverState
|
|
279
279
|
} from "./chunk-ODZKV2F7.js";
|
|
@@ -283,11 +283,11 @@ import {
|
|
|
283
283
|
} from "./chunk-WWDO7ZWM.js";
|
|
284
284
|
import {
|
|
285
285
|
promoteSemanticRuleFromMemory
|
|
286
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-YYXYZM2I.js";
|
|
287
287
|
import {
|
|
288
288
|
compareVerifiedSemanticRuleResults,
|
|
289
289
|
searchVerifiedSemanticRules
|
|
290
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-4L25GAYL.js";
|
|
291
291
|
import {
|
|
292
292
|
mergeWithAgentResults,
|
|
293
293
|
runDirectAgent,
|
|
@@ -328,7 +328,7 @@ import {
|
|
|
328
328
|
buildResumeBundleFromState,
|
|
329
329
|
getResumeBundleStatus,
|
|
330
330
|
recordResumeBundle
|
|
331
|
-
} from "./chunk-
|
|
331
|
+
} from "./chunk-FGT7CUYZ.js";
|
|
332
332
|
import {
|
|
333
333
|
getWorkProductLedgerStatus,
|
|
334
334
|
recordWorkProductLedgerEntry,
|
|
@@ -340,10 +340,10 @@ import {
|
|
|
340
340
|
} from "./chunk-5RONA5FF.js";
|
|
341
341
|
import {
|
|
342
342
|
runRecallWhy
|
|
343
|
-
} from "./chunk-
|
|
343
|
+
} from "./chunk-6QWFZ3X5.js";
|
|
344
344
|
import {
|
|
345
345
|
parseXrayCliOptions
|
|
346
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-FRYCXXTB.js";
|
|
347
347
|
import {
|
|
348
348
|
findUnresolvedEntityRefs
|
|
349
349
|
} from "./chunk-X7XN6YU4.js";
|
|
@@ -359,7 +359,7 @@ import {
|
|
|
359
359
|
import {
|
|
360
360
|
indexStateViewAnnotatedResults,
|
|
361
361
|
resolveRecallStateViewActive
|
|
362
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-QPFM6DHY.js";
|
|
363
363
|
import {
|
|
364
364
|
applyRecallStateViews
|
|
365
365
|
} from "./chunk-DBB5JPSL.js";
|
|
@@ -383,13 +383,13 @@ import {
|
|
|
383
383
|
} from "./chunk-5KVT6G5U.js";
|
|
384
384
|
import {
|
|
385
385
|
maybeRespondRecallNavigation
|
|
386
|
-
} from "./chunk-
|
|
386
|
+
} from "./chunk-5VMRM2X3.js";
|
|
387
387
|
import {
|
|
388
388
|
takeNavigateBudget
|
|
389
389
|
} from "./chunk-VYDGHJIN.js";
|
|
390
390
|
import {
|
|
391
391
|
planDisclosureStep
|
|
392
|
-
} from "./chunk-
|
|
392
|
+
} from "./chunk-B3M56D2A.js";
|
|
393
393
|
import {
|
|
394
394
|
parseNavigateLinkType
|
|
395
395
|
} from "./chunk-7O5EW7KX.js";
|
|
@@ -405,12 +405,12 @@ import {
|
|
|
405
405
|
renderRecallExplain,
|
|
406
406
|
renderXray,
|
|
407
407
|
toRecallExplainJson
|
|
408
|
-
} from "./chunk-
|
|
408
|
+
} from "./chunk-333SBFXB.js";
|
|
409
409
|
import {
|
|
410
410
|
buildXraySnapshot,
|
|
411
411
|
estimateRecallTokens,
|
|
412
412
|
summarizeDisclosureTokens
|
|
413
|
-
} from "./chunk-
|
|
413
|
+
} from "./chunk-VHXRLD6S.js";
|
|
414
414
|
import {
|
|
415
415
|
reorderRecallResultsWithMmr
|
|
416
416
|
} from "./chunk-IIK2PD3F.js";
|
|
@@ -464,12 +464,12 @@ import {
|
|
|
464
464
|
runOperatorRepair,
|
|
465
465
|
runOperatorSetup,
|
|
466
466
|
summarizeNamespaceMaintenanceHealth
|
|
467
|
-
} from "./chunk-
|
|
467
|
+
} from "./chunk-LVGTH6IQ.js";
|
|
468
468
|
import {
|
|
469
469
|
NamespaceCatalog,
|
|
470
470
|
isNamespaceKind,
|
|
471
471
|
planNamespaceMaintenance
|
|
472
|
-
} from "./chunk-
|
|
472
|
+
} from "./chunk-QVXEXGIM.js";
|
|
473
473
|
import {
|
|
474
474
|
analyzeSessionIntegrity,
|
|
475
475
|
applySessionRepair,
|
|
@@ -477,7 +477,7 @@ import {
|
|
|
477
477
|
} from "./chunk-KFY3SGN7.js";
|
|
478
478
|
import {
|
|
479
479
|
ReplicaDivergenceMonitor
|
|
480
|
-
} from "./chunk-
|
|
480
|
+
} from "./chunk-2TJSGIKT.js";
|
|
481
481
|
import {
|
|
482
482
|
buildEmbeddingAwareSnapshotStream
|
|
483
483
|
} from "./chunk-FMFCQRDM.js";
|
|
@@ -508,13 +508,13 @@ import {
|
|
|
508
508
|
} from "./chunk-M4DB6ZNN.js";
|
|
509
509
|
import {
|
|
510
510
|
maybeRespondMemoryBrowse
|
|
511
|
-
} from "./chunk-
|
|
511
|
+
} from "./chunk-XUVCQ4YZ.js";
|
|
512
512
|
import {
|
|
513
513
|
MEMORY_BROWSE_MCP_TOOLS
|
|
514
514
|
} from "./chunk-EIB4FJVR.js";
|
|
515
515
|
import {
|
|
516
516
|
runMemoryBrowse
|
|
517
|
-
} from "./chunk-
|
|
517
|
+
} from "./chunk-CKZWLAHN.js";
|
|
518
518
|
import {
|
|
519
519
|
filterRecallCandidates,
|
|
520
520
|
isGenericRecallExcludedPath,
|
|
@@ -522,7 +522,7 @@ import {
|
|
|
522
522
|
isTopLevelArchivePath,
|
|
523
523
|
journalPath,
|
|
524
524
|
writeJournalFile
|
|
525
|
-
} from "./chunk-
|
|
525
|
+
} from "./chunk-YY57TRKN.js";
|
|
526
526
|
import {
|
|
527
527
|
scaleLcmSummarizeBudget
|
|
528
528
|
} from "./chunk-3TKX7ZMV.js";
|
|
@@ -565,7 +565,7 @@ import {
|
|
|
565
565
|
import {
|
|
566
566
|
readProjectedHarmonicGraph,
|
|
567
567
|
searchHarmonicRetrieval
|
|
568
|
-
} from "./chunk-
|
|
568
|
+
} from "./chunk-OAQRZ4SV.js";
|
|
569
569
|
import {
|
|
570
570
|
classifyMemoryKind
|
|
571
571
|
} from "./chunk-YAZNBMNF.js";
|
|
@@ -592,16 +592,16 @@ import {
|
|
|
592
592
|
} from "./chunk-LEO4MQ3S.js";
|
|
593
593
|
import {
|
|
594
594
|
ExtractionEngine
|
|
595
|
-
} from "./chunk-
|
|
595
|
+
} from "./chunk-47LDDGAL.js";
|
|
596
596
|
import {
|
|
597
597
|
wrapWorkLayerContext
|
|
598
598
|
} from "./chunk-EI6V5UXY.js";
|
|
599
599
|
import {
|
|
600
600
|
CONNECTOR_LABEL_MAX_LENGTH
|
|
601
|
-
} from "./chunk-
|
|
601
|
+
} from "./chunk-JFZZDMEZ.js";
|
|
602
602
|
import {
|
|
603
603
|
isValidConnectorId
|
|
604
|
-
} from "./chunk-
|
|
604
|
+
} from "./chunk-7QF26EWO.js";
|
|
605
605
|
import {
|
|
606
606
|
ProfilingCollector,
|
|
607
607
|
formatProfileTraceAscii
|
|
@@ -633,7 +633,7 @@ import {
|
|
|
633
633
|
} from "./chunk-LMJVP5CM.js";
|
|
634
634
|
import {
|
|
635
635
|
externalWikiSearchOperation
|
|
636
|
-
} from "./chunk-
|
|
636
|
+
} from "./chunk-ZDUE44CC.js";
|
|
637
637
|
import {
|
|
638
638
|
EXTERNAL_WIKI_MCP_TOOLS
|
|
639
639
|
} from "./chunk-A5KNZSNA.js";
|
|
@@ -657,7 +657,7 @@ import {
|
|
|
657
657
|
buildEntityRecallSection,
|
|
658
658
|
entityRecentTranscriptLookbackHours,
|
|
659
659
|
readRecentEntityTranscriptEntries
|
|
660
|
-
} from "./chunk-
|
|
660
|
+
} from "./chunk-J74YOBB3.js";
|
|
661
661
|
import {
|
|
662
662
|
boundRecallContextComposition,
|
|
663
663
|
composeMissingMemoryContext,
|
|
@@ -688,7 +688,7 @@ import {
|
|
|
688
688
|
} from "./chunk-SBRUTD5O.js";
|
|
689
689
|
import {
|
|
690
690
|
respondDeepRecall
|
|
691
|
-
} from "./chunk-
|
|
691
|
+
} from "./chunk-TAD6QMMD.js";
|
|
692
692
|
import {
|
|
693
693
|
DEEP_RECALL_MCP_TOOLS
|
|
694
694
|
} from "./chunk-HUSTM6PU.js";
|
|
@@ -707,15 +707,15 @@ import {
|
|
|
707
707
|
import {
|
|
708
708
|
CorpusWatermarkCache,
|
|
709
709
|
computeServiceCorpusCensus
|
|
710
|
-
} from "./chunk-
|
|
710
|
+
} from "./chunk-5QDTZIGH.js";
|
|
711
711
|
import {
|
|
712
712
|
listNamespaces,
|
|
713
713
|
runNamespaceMigration,
|
|
714
714
|
verifyNamespaces
|
|
715
|
-
} from "./chunk-
|
|
715
|
+
} from "./chunk-3YOX2BQD.js";
|
|
716
716
|
import {
|
|
717
717
|
NamespaceStorageRouter
|
|
718
|
-
} from "./chunk-
|
|
718
|
+
} from "./chunk-FOTFLHBN.js";
|
|
719
719
|
import {
|
|
720
720
|
CrossNamespaceBudget,
|
|
721
721
|
toBudgetWarning
|
|
@@ -732,12 +732,12 @@ import {
|
|
|
732
732
|
} from "./chunk-7G5NTS7F.js";
|
|
733
733
|
import {
|
|
734
734
|
refreshConvergedNamespaces
|
|
735
|
-
} from "./chunk-
|
|
735
|
+
} from "./chunk-WEFFO2MJ.js";
|
|
736
736
|
import {
|
|
737
737
|
rebuildMemoryProjection,
|
|
738
738
|
repairMemoryProjection,
|
|
739
739
|
verifyMemoryProjection
|
|
740
|
-
} from "./chunk-
|
|
740
|
+
} from "./chunk-7VIJUZYW.js";
|
|
741
741
|
import {
|
|
742
742
|
buildProposedActions,
|
|
743
743
|
buildQualityScore,
|
|
@@ -746,7 +746,7 @@ import {
|
|
|
746
746
|
readMemoryGovernanceRunArtifact,
|
|
747
747
|
restoreMemoryGovernanceRun,
|
|
748
748
|
runMemoryGovernance
|
|
749
|
-
} from "./chunk-
|
|
749
|
+
} from "./chunk-ZWDDY4WF.js";
|
|
750
750
|
import {
|
|
751
751
|
collectNativeKnowledgeChunks,
|
|
752
752
|
formatNativeKnowledgeSection,
|
|
@@ -779,7 +779,7 @@ import {
|
|
|
779
779
|
materializeAfterSemanticConsolidation,
|
|
780
780
|
parseConsolidationResponse,
|
|
781
781
|
parseOperatorAwareConsolidationResponse
|
|
782
|
-
} from "./chunk-
|
|
782
|
+
} from "./chunk-GBSXTTLP.js";
|
|
783
783
|
import {
|
|
784
784
|
resolveNamespaceChildRoot
|
|
785
785
|
} from "./chunk-3UXOZBHV.js";
|
|
@@ -795,13 +795,13 @@ import {
|
|
|
795
795
|
} from "./chunk-DEUNUKTD.js";
|
|
796
796
|
import {
|
|
797
797
|
SmartBuffer
|
|
798
|
-
} from "./chunk-
|
|
798
|
+
} from "./chunk-QLQUAVVP.js";
|
|
799
799
|
import {
|
|
800
800
|
ExtractionDeadlineError,
|
|
801
801
|
ExtractionRunCoordinator,
|
|
802
802
|
ProviderCircuitBreaker,
|
|
803
803
|
classifyExtractionOrigin
|
|
804
|
-
} from "./chunk-
|
|
804
|
+
} from "./chunk-HDWISXFH.js";
|
|
805
805
|
import {
|
|
806
806
|
ARTIFACT_STATUS_CACHE_TTL_MS,
|
|
807
807
|
BulkImportBatchPartialFailureError,
|
|
@@ -841,7 +841,7 @@ import {
|
|
|
841
841
|
throwIfRecallAborted,
|
|
842
842
|
tokenizeRecallQuery,
|
|
843
843
|
utcDateKeysForLocalDay
|
|
844
|
-
} from "./chunk-
|
|
844
|
+
} from "./chunk-ZX546Y3Y.js";
|
|
845
845
|
import {
|
|
846
846
|
inferIntentFromText,
|
|
847
847
|
intentCompatibilityScore,
|
|
@@ -850,11 +850,11 @@ import {
|
|
|
850
850
|
} from "./chunk-CSAKJVXW.js";
|
|
851
851
|
import {
|
|
852
852
|
LocalLlmClient
|
|
853
|
-
} from "./chunk-
|
|
853
|
+
} from "./chunk-QFTK6EDM.js";
|
|
854
854
|
import {
|
|
855
855
|
isCapsuleImportArchiveInputError,
|
|
856
856
|
validateCapsuleImportArchive
|
|
857
|
-
} from "./chunk-
|
|
857
|
+
} from "./chunk-WWUQ6CP3.js";
|
|
858
858
|
import {
|
|
859
859
|
defaultCapsulesDir
|
|
860
860
|
} from "./chunk-ZY2MNJR6.js";
|
|
@@ -875,7 +875,7 @@ import {
|
|
|
875
875
|
parseBriefingFocus,
|
|
876
876
|
parseBriefingWindow,
|
|
877
877
|
validateBriefingFormat
|
|
878
|
-
} from "./chunk-
|
|
878
|
+
} from "./chunk-TNRGWJYT.js";
|
|
879
879
|
import {
|
|
880
880
|
BriefingTimeoutError,
|
|
881
881
|
withBriefingDeadline
|
|
@@ -940,7 +940,7 @@ import {
|
|
|
940
940
|
validateCorrectionAction,
|
|
941
941
|
validateCorrectionRequest,
|
|
942
942
|
validateRedactionPattern
|
|
943
|
-
} from "./chunk-
|
|
943
|
+
} from "./chunk-SIONKXLU.js";
|
|
944
944
|
import {
|
|
945
945
|
compileCorrectionRule,
|
|
946
946
|
correctionsFilePath,
|
|
@@ -1008,7 +1008,7 @@ import {
|
|
|
1008
1008
|
import {
|
|
1009
1009
|
parseDeepRecallMaxSteps,
|
|
1010
1010
|
resolveEffectiveDeepRecallConfig
|
|
1011
|
-
} from "./chunk-
|
|
1011
|
+
} from "./chunk-OO2HEUZ4.js";
|
|
1012
1012
|
import {
|
|
1013
1013
|
SKILL_FILE_NAME,
|
|
1014
1014
|
SKILL_IMPORT_SOURCE,
|
|
@@ -1053,7 +1053,7 @@ import {
|
|
|
1053
1053
|
reconstructFusionInputs,
|
|
1054
1054
|
selfDeps,
|
|
1055
1055
|
serializeFusionDay
|
|
1056
|
-
} from "./chunk-
|
|
1056
|
+
} from "./chunk-OWM2VWNX.js";
|
|
1057
1057
|
import {
|
|
1058
1058
|
buildRetiredFactTombstoneInputs
|
|
1059
1059
|
} from "./chunk-QGVCFVX6.js";
|
|
@@ -1072,12 +1072,12 @@ import {
|
|
|
1072
1072
|
embeddingBacklogExceeds,
|
|
1073
1073
|
isSearchHealthDegraded,
|
|
1074
1074
|
namespaceCollectionName
|
|
1075
|
-
} from "./chunk-
|
|
1075
|
+
} from "./chunk-AVWOULJH.js";
|
|
1076
1076
|
import {
|
|
1077
1077
|
createConversationIndexRuntime,
|
|
1078
1078
|
createSearchBackend,
|
|
1079
1079
|
isSearchBackendEnabled
|
|
1080
|
-
} from "./chunk-
|
|
1080
|
+
} from "./chunk-7OCKK5M5.js";
|
|
1081
1081
|
import {
|
|
1082
1082
|
NoopSearchBackend
|
|
1083
1083
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -1179,13 +1179,7 @@ import {
|
|
|
1179
1179
|
groupTurnsByExtractionScope,
|
|
1180
1180
|
hasPinnedCaptureScope,
|
|
1181
1181
|
scopeProfilePlanIdentity
|
|
1182
|
-
} from "./chunk-
|
|
1183
|
-
import {
|
|
1184
|
-
createBoundedCoreSectionRunner,
|
|
1185
|
-
createRecallSectionMetricRecorder,
|
|
1186
|
-
resolveRecallCoreSectionDeadlineMs,
|
|
1187
|
-
runRecallSectionWithinDeadline
|
|
1188
|
-
} from "./chunk-RNFMFC37.js";
|
|
1182
|
+
} from "./chunk-MEVBSF6T.js";
|
|
1189
1183
|
import {
|
|
1190
1184
|
coerceBool,
|
|
1191
1185
|
coerceBooleanLike,
|
|
@@ -1204,7 +1198,7 @@ import {
|
|
|
1204
1198
|
RECALL_WHY_MCP_TOOLS,
|
|
1205
1199
|
handleRecallWhyHttpQuery,
|
|
1206
1200
|
handleRecallXrayHttpQuery
|
|
1207
|
-
} from "./chunk-
|
|
1201
|
+
} from "./chunk-LPUEBFX2.js";
|
|
1208
1202
|
import {
|
|
1209
1203
|
runContradictionScan
|
|
1210
1204
|
} from "./chunk-SX4BR26Y.js";
|
|
@@ -1218,7 +1212,7 @@ import {
|
|
|
1218
1212
|
RECALL_DISCLOSURE_LEVELS,
|
|
1219
1213
|
confidenceTier,
|
|
1220
1214
|
isRecallDisclosure
|
|
1221
|
-
} from "./chunk-
|
|
1215
|
+
} from "./chunk-N7AIFTSH.js";
|
|
1222
1216
|
import {
|
|
1223
1217
|
extractJsonCandidates
|
|
1224
1218
|
} from "./chunk-YBA52OKG.js";
|
|
@@ -1230,18 +1224,18 @@ import {
|
|
|
1230
1224
|
} from "./chunk-RMMA44HE.js";
|
|
1231
1225
|
import {
|
|
1232
1226
|
handleSupportPassportOwnerHttp
|
|
1233
|
-
} from "./chunk-
|
|
1227
|
+
} from "./chunk-DFZYZOLH.js";
|
|
1234
1228
|
import {
|
|
1235
1229
|
SupportPassportError,
|
|
1236
1230
|
buildSupportPassportPublicRequestHandler
|
|
1237
|
-
} from "./chunk-
|
|
1231
|
+
} from "./chunk-QWWHYBPT.js";
|
|
1238
1232
|
import {
|
|
1239
1233
|
ObserveTranscriptPersister,
|
|
1240
1234
|
observeTranscriptSessionKey
|
|
1241
|
-
} from "./chunk-
|
|
1235
|
+
} from "./chunk-TB6VFEHQ.js";
|
|
1242
1236
|
import {
|
|
1243
1237
|
splitCanonicalWriteRequest
|
|
1244
|
-
} from "./chunk-
|
|
1238
|
+
} from "./chunk-UMEUU66X.js";
|
|
1245
1239
|
import {
|
|
1246
1240
|
buildWithBriefingLocation,
|
|
1247
1241
|
daySummaryAutoOptions,
|
|
@@ -1276,54 +1270,27 @@ import {
|
|
|
1276
1270
|
isSharedPromotionTarget,
|
|
1277
1271
|
resolveWriteSubject
|
|
1278
1272
|
} from "./chunk-TOSPNM4T.js";
|
|
1279
|
-
import {
|
|
1280
|
-
memoryStoreRequestSchema,
|
|
1281
|
-
observeRequestSchema,
|
|
1282
|
-
reapplyCategoryCoercion,
|
|
1283
|
-
recallRequestSchema,
|
|
1284
|
-
retainedCategoryAlias,
|
|
1285
|
-
suggestionSubmitRequestSchema,
|
|
1286
|
-
validateRequest
|
|
1287
|
-
} from "./chunk-PRE7R3RQ.js";
|
|
1288
|
-
import {
|
|
1289
|
-
exportCapsule
|
|
1290
|
-
} from "./chunk-BUKK5SWA.js";
|
|
1291
|
-
import {
|
|
1292
|
-
CAPSULE_ID_PATTERN
|
|
1293
|
-
} from "./chunk-WEHSQBFR.js";
|
|
1294
|
-
import {
|
|
1295
|
-
buildActionConfidenceInputFromOptions,
|
|
1296
|
-
evaluateActionConfidence,
|
|
1297
|
-
renderActionConfidenceText
|
|
1298
|
-
} from "./chunk-Z2YFLXHU.js";
|
|
1299
|
-
import {
|
|
1300
|
-
buildRetrievedMemoryProvenance
|
|
1301
|
-
} from "./chunk-I4WBNM3M.js";
|
|
1302
|
-
import {
|
|
1303
|
-
keyring_exports,
|
|
1304
|
-
secureStoreDir
|
|
1305
|
-
} from "./chunk-BJMBJZ2Y.js";
|
|
1306
1273
|
import {
|
|
1307
1274
|
createOfflineSyncManifestStream
|
|
1308
|
-
} from "./chunk-
|
|
1275
|
+
} from "./chunk-T4BT4FQN.js";
|
|
1309
1276
|
import {
|
|
1310
1277
|
peerManifestRevision
|
|
1311
1278
|
} from "./chunk-FEUWI5QH.js";
|
|
1312
1279
|
import {
|
|
1313
1280
|
offlineSyncStorageForSnapshot
|
|
1314
|
-
} from "./chunk-
|
|
1281
|
+
} from "./chunk-QXTKN25V.js";
|
|
1315
1282
|
import {
|
|
1316
1283
|
getConfiguredNamespaces,
|
|
1317
1284
|
resolveNamespaceFromStorageDir,
|
|
1318
1285
|
resolveScopePlan,
|
|
1319
1286
|
resolveScopedWritableNamespaceValue,
|
|
1320
1287
|
resolveWritableNamespaceValue
|
|
1321
|
-
} from "./chunk-
|
|
1288
|
+
} from "./chunk-WECKZ3KT.js";
|
|
1322
1289
|
import {
|
|
1323
1290
|
expandScopeProfileReadNamespaces,
|
|
1324
1291
|
hasExplicitNamespacePolicy,
|
|
1325
1292
|
resolveScopeProfilePlan
|
|
1326
|
-
} from "./chunk-
|
|
1293
|
+
} from "./chunk-UBG65KEY.js";
|
|
1327
1294
|
import {
|
|
1328
1295
|
resolveConvergeCaptureWriteLockBackoff
|
|
1329
1296
|
} from "./chunk-EHHQJTAU.js";
|
|
@@ -1386,40 +1353,19 @@ import {
|
|
|
1386
1353
|
resolveHandle,
|
|
1387
1354
|
stripHandles
|
|
1388
1355
|
} from "./chunk-JAKIDQB2.js";
|
|
1389
|
-
import {
|
|
1390
|
-
OFFLINE_SYNC_APPLY_MAX_BODY_BYTES,
|
|
1391
|
-
OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES,
|
|
1392
|
-
OFFLINE_SYNC_SNAPSHOT_BASE_MAX_BODY_BYTES,
|
|
1393
|
-
applyOfflineSyncChangeset,
|
|
1394
|
-
applyOfflineSyncFileContentChunk,
|
|
1395
|
-
buildOfflineSyncSnapshot,
|
|
1396
|
-
buildOfflineSyncSnapshotForPaths,
|
|
1397
|
-
buildOfflineSyncSnapshotFromBase,
|
|
1398
|
-
normalizeOfflineSyncChangeset,
|
|
1399
|
-
readOfflineSyncFileContentChunk
|
|
1400
|
-
} from "./chunk-CLVILSBR.js";
|
|
1401
|
-
import {
|
|
1402
|
-
storageBackedIndexStoreIo
|
|
1403
|
-
} from "./chunk-5BE3FLKL.js";
|
|
1404
|
-
import {
|
|
1405
|
-
compileOfflineSyncExcludeGlobs
|
|
1406
|
-
} from "./chunk-63LFM77Z.js";
|
|
1407
|
-
import {
|
|
1408
|
-
assertIsDirectoryNotSymlink,
|
|
1409
|
-
assertRealpathInsideRoot,
|
|
1410
|
-
validateArchiveRelativePath
|
|
1411
|
-
} from "./chunk-GCGJW34D.js";
|
|
1412
|
-
import {
|
|
1413
|
-
serializeMutations,
|
|
1414
|
-
withHeldFileLock
|
|
1415
|
-
} from "./chunk-EBV6VXKF.js";
|
|
1416
|
-
import {
|
|
1417
|
-
parseFlexibleIsoTimestamp
|
|
1418
|
-
} from "./chunk-P7FMDTKL.js";
|
|
1419
1356
|
import {
|
|
1420
1357
|
createRecallCorpusVersionCapture,
|
|
1421
1358
|
mergeRecallCorpusVersions
|
|
1422
|
-
} from "./chunk-
|
|
1359
|
+
} from "./chunk-GYOKVJPB.js";
|
|
1360
|
+
import {
|
|
1361
|
+
clientDeadlineTimerMs,
|
|
1362
|
+
createBoundedCoreSectionRunner,
|
|
1363
|
+
createRecallSectionMetricRecorder,
|
|
1364
|
+
resolveClientDeadlineAtMs,
|
|
1365
|
+
resolveRecallCoreSectionDeadlineMs,
|
|
1366
|
+
resolveRecallOuterDeadlineAtMs,
|
|
1367
|
+
runRecallSectionWithinDeadline
|
|
1368
|
+
} from "./chunk-IDYYGOOQ.js";
|
|
1423
1369
|
import {
|
|
1424
1370
|
CANONICAL_MCP_PREFIX,
|
|
1425
1371
|
LEGACY_MCP_PREFIX,
|
|
@@ -1434,31 +1380,13 @@ import {
|
|
|
1434
1380
|
memorySearchThroughScope,
|
|
1435
1381
|
mergeMemorySearchDefaultFallback,
|
|
1436
1382
|
resolveMemorySearchDefaultFallback
|
|
1437
|
-
} from "./chunk-
|
|
1438
|
-
import {
|
|
1439
|
-
canReadNamespace,
|
|
1440
|
-
canWriteNamespace,
|
|
1441
|
-
citationAuthorizedNamespaces,
|
|
1442
|
-
defaultNamespaceForPrincipal,
|
|
1443
|
-
recallNamespacesForPrincipal,
|
|
1444
|
-
resolvePrincipal
|
|
1445
|
-
} from "./chunk-ESG6ITGP.js";
|
|
1446
|
-
import {
|
|
1447
|
-
isSafeRouteNamespace,
|
|
1448
|
-
selectRouteRule,
|
|
1449
|
-
validateRouteTarget
|
|
1450
|
-
} from "./chunk-PCXDUHQH.js";
|
|
1451
|
-
import {
|
|
1452
|
-
namespaceIdentityFromToken,
|
|
1453
|
-
namespaceIdentityToken,
|
|
1454
|
-
normalizeNamespaceIdentity
|
|
1455
|
-
} from "./chunk-VUFL7X3H.js";
|
|
1383
|
+
} from "./chunk-5MA6ZQ4Z.js";
|
|
1456
1384
|
import {
|
|
1457
1385
|
parseNamespacePreflightWriteOp,
|
|
1458
1386
|
resolveAuthorizedNamespaceWritablePreflight,
|
|
1459
1387
|
resolveNamespaceWritablePreflight,
|
|
1460
1388
|
resolveQueryNamespaceWritablePreflight
|
|
1461
|
-
} from "./chunk-
|
|
1389
|
+
} from "./chunk-QKDXO4FD.js";
|
|
1462
1390
|
import {
|
|
1463
1391
|
PendingObserveExtractionTracker,
|
|
1464
1392
|
pendingObserveScopeHint
|
|
@@ -1474,29 +1402,6 @@ import {
|
|
|
1474
1402
|
objectiveStateStoreOverrideForNamespace,
|
|
1475
1403
|
searchObjectiveStateSnapshots
|
|
1476
1404
|
} from "./chunk-4RNBLLZR.js";
|
|
1477
|
-
import {
|
|
1478
|
-
resolveAccessSetupCapabilities,
|
|
1479
|
-
resolveCapabilities,
|
|
1480
|
-
resolveCompressionCapabilities,
|
|
1481
|
-
resolveConsolidationCapabilities,
|
|
1482
|
-
resolveConversationContextCapabilities,
|
|
1483
|
-
resolveCreationMemoryCapabilities,
|
|
1484
|
-
resolveEvalCapabilities,
|
|
1485
|
-
resolveGraphConstructionCapabilities,
|
|
1486
|
-
resolveIdentityContinuityCapabilities,
|
|
1487
|
-
resolveIndexingCapabilities,
|
|
1488
|
-
resolveLocalLlmCapabilities,
|
|
1489
|
-
resolveMemoryLifecycleCapabilities,
|
|
1490
|
-
resolveNamespaceCapabilities,
|
|
1491
|
-
resolveObjectiveStateCapabilities,
|
|
1492
|
-
resolvePipelineProcessingCapabilities,
|
|
1493
|
-
resolvePresentationCapabilities,
|
|
1494
|
-
resolveQmdCapabilities,
|
|
1495
|
-
resolveRecallAuxiliaryCapabilities,
|
|
1496
|
-
resolveRecallEnhancementCapabilities,
|
|
1497
|
-
resolveSecurityCapabilities,
|
|
1498
|
-
resolveUtilityLearningCapabilities
|
|
1499
|
-
} from "./chunk-C5LWPYS3.js";
|
|
1500
1405
|
import {
|
|
1501
1406
|
createObserveStageTimer
|
|
1502
1407
|
} from "./chunk-WZU5AGO6.js";
|
|
@@ -1535,21 +1440,123 @@ import {
|
|
|
1535
1440
|
hashAccessIdempotencyPayload
|
|
1536
1441
|
} from "./chunk-F5GVIPC7.js";
|
|
1537
1442
|
import {
|
|
1538
|
-
|
|
1539
|
-
|
|
1443
|
+
codingContextLocalRoot,
|
|
1444
|
+
resolveCodingContextFromOptions,
|
|
1445
|
+
setSessionCodingContext
|
|
1446
|
+
} from "./chunk-CKELO7Q6.js";
|
|
1540
1447
|
import {
|
|
1541
|
-
|
|
1542
|
-
|
|
1448
|
+
memoryStoreRequestSchema,
|
|
1449
|
+
observeRequestSchema,
|
|
1450
|
+
reapplyCategoryCoercion,
|
|
1451
|
+
recallRequestSchema,
|
|
1452
|
+
retainedCategoryAlias,
|
|
1453
|
+
suggestionSubmitRequestSchema,
|
|
1454
|
+
validateRequest
|
|
1455
|
+
} from "./chunk-ZQUOUPP3.js";
|
|
1456
|
+
import {
|
|
1457
|
+
exportCapsule
|
|
1458
|
+
} from "./chunk-BUKK5SWA.js";
|
|
1459
|
+
import {
|
|
1460
|
+
CAPSULE_ID_PATTERN
|
|
1461
|
+
} from "./chunk-WEHSQBFR.js";
|
|
1462
|
+
import {
|
|
1463
|
+
buildActionConfidenceInputFromOptions,
|
|
1464
|
+
evaluateActionConfidence,
|
|
1465
|
+
renderActionConfidenceText
|
|
1466
|
+
} from "./chunk-Z2YFLXHU.js";
|
|
1467
|
+
import {
|
|
1468
|
+
buildRetrievedMemoryProvenance
|
|
1469
|
+
} from "./chunk-I4WBNM3M.js";
|
|
1470
|
+
import {
|
|
1471
|
+
keyring_exports,
|
|
1472
|
+
secureStoreDir
|
|
1473
|
+
} from "./chunk-BJMBJZ2Y.js";
|
|
1543
1474
|
import {
|
|
1544
1475
|
combineNamespaces,
|
|
1545
|
-
defaultGitInvokerSync,
|
|
1546
1476
|
lcmSessionKeyForNamespace,
|
|
1547
1477
|
projectTagProjectId,
|
|
1548
1478
|
resolveCodingNamespaceOverlay,
|
|
1479
|
+
sanitizeFragment
|
|
1480
|
+
} from "./chunk-O3XGASU5.js";
|
|
1481
|
+
import {
|
|
1482
|
+
defaultGitInvokerSync,
|
|
1549
1483
|
resolveGitContext,
|
|
1550
|
-
sanitizeFragment,
|
|
1551
1484
|
sharedNonRepoGitContextCache
|
|
1552
|
-
} from "./chunk-
|
|
1485
|
+
} from "./chunk-4D77BI3J.js";
|
|
1486
|
+
import {
|
|
1487
|
+
OFFLINE_SYNC_APPLY_MAX_BODY_BYTES,
|
|
1488
|
+
OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES,
|
|
1489
|
+
OFFLINE_SYNC_SNAPSHOT_BASE_MAX_BODY_BYTES,
|
|
1490
|
+
applyOfflineSyncChangeset,
|
|
1491
|
+
applyOfflineSyncFileContentChunk,
|
|
1492
|
+
buildOfflineSyncSnapshot,
|
|
1493
|
+
buildOfflineSyncSnapshotForPaths,
|
|
1494
|
+
buildOfflineSyncSnapshotFromBase,
|
|
1495
|
+
normalizeOfflineSyncChangeset,
|
|
1496
|
+
readOfflineSyncFileContentChunk
|
|
1497
|
+
} from "./chunk-CLVILSBR.js";
|
|
1498
|
+
import {
|
|
1499
|
+
storageBackedIndexStoreIo
|
|
1500
|
+
} from "./chunk-5BE3FLKL.js";
|
|
1501
|
+
import {
|
|
1502
|
+
compileOfflineSyncExcludeGlobs
|
|
1503
|
+
} from "./chunk-63LFM77Z.js";
|
|
1504
|
+
import {
|
|
1505
|
+
assertIsDirectoryNotSymlink,
|
|
1506
|
+
assertRealpathInsideRoot,
|
|
1507
|
+
validateArchiveRelativePath
|
|
1508
|
+
} from "./chunk-GCGJW34D.js";
|
|
1509
|
+
import {
|
|
1510
|
+
serializeMutations,
|
|
1511
|
+
withHeldFileLock
|
|
1512
|
+
} from "./chunk-EBV6VXKF.js";
|
|
1513
|
+
import {
|
|
1514
|
+
parseFlexibleIsoTimestamp
|
|
1515
|
+
} from "./chunk-P7FMDTKL.js";
|
|
1516
|
+
import {
|
|
1517
|
+
canReadNamespace,
|
|
1518
|
+
canWriteNamespace,
|
|
1519
|
+
citationAuthorizedNamespaces,
|
|
1520
|
+
defaultNamespaceForPrincipal,
|
|
1521
|
+
recallNamespacesForPrincipal,
|
|
1522
|
+
resolvePrincipal
|
|
1523
|
+
} from "./chunk-ESG6ITGP.js";
|
|
1524
|
+
import {
|
|
1525
|
+
isSafeRouteNamespace,
|
|
1526
|
+
selectRouteRule,
|
|
1527
|
+
validateRouteTarget
|
|
1528
|
+
} from "./chunk-PCXDUHQH.js";
|
|
1529
|
+
import {
|
|
1530
|
+
namespaceIdentityFromToken,
|
|
1531
|
+
namespaceIdentityToken,
|
|
1532
|
+
normalizeNamespaceIdentity
|
|
1533
|
+
} from "./chunk-VUFL7X3H.js";
|
|
1534
|
+
import {
|
|
1535
|
+
resolveAccessSetupCapabilities,
|
|
1536
|
+
resolveCapabilities,
|
|
1537
|
+
resolveCompressionCapabilities,
|
|
1538
|
+
resolveConsolidationCapabilities,
|
|
1539
|
+
resolveConversationContextCapabilities,
|
|
1540
|
+
resolveCreationMemoryCapabilities,
|
|
1541
|
+
resolveEvalCapabilities,
|
|
1542
|
+
resolveGraphConstructionCapabilities,
|
|
1543
|
+
resolveIdentityContinuityCapabilities,
|
|
1544
|
+
resolveIndexingCapabilities,
|
|
1545
|
+
resolveLocalLlmCapabilities,
|
|
1546
|
+
resolveMemoryLifecycleCapabilities,
|
|
1547
|
+
resolveNamespaceCapabilities,
|
|
1548
|
+
resolveObjectiveStateCapabilities,
|
|
1549
|
+
resolvePipelineProcessingCapabilities,
|
|
1550
|
+
resolvePresentationCapabilities,
|
|
1551
|
+
resolveQmdCapabilities,
|
|
1552
|
+
resolveRecallAuxiliaryCapabilities,
|
|
1553
|
+
resolveRecallEnhancementCapabilities,
|
|
1554
|
+
resolveSecurityCapabilities,
|
|
1555
|
+
resolveUtilityLearningCapabilities
|
|
1556
|
+
} from "./chunk-C5LWPYS3.js";
|
|
1557
|
+
import {
|
|
1558
|
+
sleep
|
|
1559
|
+
} from "./chunk-X4OZMANG.js";
|
|
1553
1560
|
import {
|
|
1554
1561
|
currentCorrelationId,
|
|
1555
1562
|
runWithCorrelationId
|
|
@@ -1599,18 +1606,18 @@ import {
|
|
|
1599
1606
|
authorizationProbeNamespaces,
|
|
1600
1607
|
authorizationProbeRequiresPrincipalNamespace,
|
|
1601
1608
|
probeOperationAuthorization
|
|
1602
|
-
} from "./chunk-
|
|
1609
|
+
} from "./chunk-G64WYD2S.js";
|
|
1603
1610
|
import {
|
|
1604
1611
|
defineOperation,
|
|
1605
1612
|
getOperation
|
|
1606
|
-
} from "./chunk-
|
|
1613
|
+
} from "./chunk-KIUFT2WZ.js";
|
|
1607
1614
|
import {
|
|
1608
1615
|
assertOperationAllowed,
|
|
1609
1616
|
capabilityAllowsOp,
|
|
1610
1617
|
enforceNamespaceAllowList,
|
|
1611
1618
|
isCapabilityRestricted,
|
|
1612
1619
|
tokenCapabilityStore
|
|
1613
|
-
} from "./chunk-
|
|
1620
|
+
} from "./chunk-O544TUJO.js";
|
|
1614
1621
|
import {
|
|
1615
1622
|
expandTildePath
|
|
1616
1623
|
} from "./chunk-6KH5NLQS.js";
|
|
@@ -1619,12 +1626,13 @@ import {
|
|
|
1619
1626
|
resolveHomeDir
|
|
1620
1627
|
} from "./chunk-P2QRMMVQ.js";
|
|
1621
1628
|
import {
|
|
1629
|
+
EngramAccessDeadlineExceededError,
|
|
1622
1630
|
EngramAccessForbiddenError,
|
|
1623
1631
|
EngramAccessInputError,
|
|
1624
1632
|
NamespaceNotWritableError,
|
|
1625
1633
|
rejectReservedArgumentKey,
|
|
1626
1634
|
unknownToolError
|
|
1627
|
-
} from "./chunk-
|
|
1635
|
+
} from "./chunk-MGKCKY7X.js";
|
|
1628
1636
|
import {
|
|
1629
1637
|
decodeCitationNamespace
|
|
1630
1638
|
} from "./chunk-D6DOLQYK.js";
|
|
@@ -1658,7 +1666,7 @@ import {
|
|
|
1658
1666
|
} from "./chunk-3WCASNQZ.js";
|
|
1659
1667
|
|
|
1660
1668
|
// src/access-service.ts
|
|
1661
|
-
import { createHash as
|
|
1669
|
+
import { createHash as createHash27 } from "crypto";
|
|
1662
1670
|
import { readdirSync as readdirSync2, unlinkSync as unlinkSync4 } from "fs";
|
|
1663
1671
|
import { stat as stat7 } from "fs/promises";
|
|
1664
1672
|
import * as nodeFs2 from "fs/promises";
|
|
@@ -2170,7 +2178,7 @@ async function handleDeleteProject(request, ctx) {
|
|
|
2170
2178
|
}
|
|
2171
2179
|
async function handleGetArchitecture(request, ctx) {
|
|
2172
2180
|
const codingContext = resolveCodingContext(request, ctx);
|
|
2173
|
-
const repoRoot = request.repoRoot ?? codingContext
|
|
2181
|
+
const repoRoot = request.repoRoot ?? codingContextLocalRoot(codingContext);
|
|
2174
2182
|
const card = await ctx.buildArchitectureCard(repoRoot);
|
|
2175
2183
|
let stats;
|
|
2176
2184
|
try {
|
|
@@ -2278,7 +2286,7 @@ function resolveRepoRoot(request, ctx) {
|
|
|
2278
2286
|
if (typeof request.repoRoot === "string" && request.repoRoot.trim().length > 0) {
|
|
2279
2287
|
return request.repoRoot.trim();
|
|
2280
2288
|
}
|
|
2281
|
-
return resolveCodingContext(request, ctx)
|
|
2289
|
+
return codingContextLocalRoot(resolveCodingContext(request, ctx));
|
|
2282
2290
|
}
|
|
2283
2291
|
function isLikelyCypher(input) {
|
|
2284
2292
|
return /^\s*(MATCH|RETURN|WHERE|CREATE|MERGE|DELETE|WITH|OPTIONAL|CALL|YIELD|UNWIND)\b/i.test(input);
|
|
@@ -2457,7 +2465,7 @@ async function deltaGet(request, ctx, codingContext) {
|
|
|
2457
2465
|
const storage = await ctx.resolveStorage(request);
|
|
2458
2466
|
const statePath = sessionDeltaStatePath(storage.memoryDir, storage.namespace);
|
|
2459
2467
|
const lastSeen = await readLastSeenState(statePath);
|
|
2460
|
-
const repoRoot = codingContext
|
|
2468
|
+
const repoRoot = codingContextLocalRoot(codingContext);
|
|
2461
2469
|
const sliceResult = resolveSlice(
|
|
2462
2470
|
repoRoot,
|
|
2463
2471
|
lastSeen?.head ?? null,
|
|
@@ -15073,8 +15081,7 @@ async function appendEpisodicContextSection(deps, options) {
|
|
|
15073
15081
|
skip("skip(no-memories)");
|
|
15074
15082
|
return;
|
|
15075
15083
|
}
|
|
15076
|
-
const
|
|
15077
|
-
const remainingOuterMs = outerDeadlineAtMs === null ? null : outerDeadlineAtMs - deps.recallAssemblyClockMs();
|
|
15084
|
+
const remainingOuterMs = options.outerDeadlineAtMs === null ? null : options.outerDeadlineAtMs - deps.recallAssemblyClockMs();
|
|
15078
15085
|
const deadlineMs = resolveRecallCoreSectionDeadlineMs({
|
|
15079
15086
|
configuredCoreDeadlineMs: options.enrichmentSectionDeadlineMs,
|
|
15080
15087
|
remainingOuterMs
|
|
@@ -15495,11 +15502,12 @@ var RecallInternalCoordinator = class {
|
|
|
15495
15502
|
const recallOuterTimeoutMs = this.deps.config.recallOuterTimeoutMs ?? 75e3;
|
|
15496
15503
|
const enrichmentSectionDeadlineMs = this.deps.config.recallEnrichmentDeadlineMs ?? 6e4;
|
|
15497
15504
|
try {
|
|
15498
|
-
const recordRecallSectionMetric = createRecallSectionMetricRecorder({
|
|
15499
|
-
|
|
15500
|
-
|
|
15505
|
+
const recordRecallSectionMetric = createRecallSectionMetricRecorder({ timings, logger: log });
|
|
15506
|
+
const outerDeadlineAtMs = resolveRecallOuterDeadlineAtMs({
|
|
15507
|
+
recallStart,
|
|
15508
|
+
recallOuterTimeoutMs,
|
|
15509
|
+
clientDeadlineMs: options.deadlineMs
|
|
15501
15510
|
});
|
|
15502
|
-
const outerDeadlineAtMs = recallOuterTimeoutMs > 0 ? recallStart + recallOuterTimeoutMs : null;
|
|
15503
15511
|
const enrichmentAbort = () => createEnrichmentAbortHandle(options.abortSignal, resolveRecallCoreSectionDeadlineMs({
|
|
15504
15512
|
configuredCoreDeadlineMs: enrichmentSectionDeadlineMs,
|
|
15505
15513
|
remainingOuterMs: outerDeadlineAtMs === null ? null : outerDeadlineAtMs - Date.now()
|
|
@@ -15742,7 +15750,7 @@ var RecallInternalCoordinator = class {
|
|
|
15742
15750
|
this.deps.trackRecallBackgroundWrite(
|
|
15743
15751
|
this.deps.lastRecall.record({
|
|
15744
15752
|
sessionKey,
|
|
15745
|
-
query:
|
|
15753
|
+
query: prompt,
|
|
15746
15754
|
memoryIds: [],
|
|
15747
15755
|
namespace: selfNamespace,
|
|
15748
15756
|
traceId,
|
|
@@ -19195,8 +19203,7 @@ ${tmtNode.summary}`
|
|
|
19195
19203
|
scopePlan,
|
|
19196
19204
|
namespacesEnabled,
|
|
19197
19205
|
enrichmentSectionDeadlineMs,
|
|
19198
|
-
|
|
19199
|
-
recallStart,
|
|
19206
|
+
outerDeadlineAtMs,
|
|
19200
19207
|
recordMetric: recordRecallSectionMetric,
|
|
19201
19208
|
abortSignal: options.abortSignal
|
|
19202
19209
|
});
|
|
@@ -19423,7 +19430,7 @@ ${tmtNode.summary}`
|
|
|
19423
19430
|
this.deps.trackRecallBackgroundWrite(
|
|
19424
19431
|
this.deps.lastRecall.record({
|
|
19425
19432
|
sessionKey,
|
|
19426
|
-
query:
|
|
19433
|
+
query: prompt,
|
|
19427
19434
|
memoryIds: recalledMemoryIds,
|
|
19428
19435
|
namespace: selfNamespace,
|
|
19429
19436
|
recallNamespaces,
|
|
@@ -21534,13 +21541,14 @@ var TurnIngestionCoordinator = class {
|
|
|
21534
21541
|
});
|
|
21535
21542
|
}
|
|
21536
21543
|
}
|
|
21537
|
-
const
|
|
21544
|
+
const sortedSlices = replaySlices.sort((a, b) => {
|
|
21538
21545
|
if (a.targetValidAtMs < b.targetValidAtMs) return -1;
|
|
21539
21546
|
if (a.targetValidAtMs > b.targetValidAtMs) return 1;
|
|
21540
21547
|
if (a.order === b.order) return 0;
|
|
21541
21548
|
return a.order < b.order ? -1 : 1;
|
|
21542
|
-
})
|
|
21543
|
-
|
|
21549
|
+
});
|
|
21550
|
+
for (const { bufferKey, turns: sessionSlice } of sortedSlices) {
|
|
21551
|
+
await new Promise((resolve4, reject) => {
|
|
21544
21552
|
void this.deps.queueBufferedExtraction(sessionSlice, "trigger_mode", {
|
|
21545
21553
|
skipDedupeCheck: true,
|
|
21546
21554
|
forceExtractionAttempt: true,
|
|
@@ -21555,16 +21563,7 @@ var TurnIngestionCoordinator = class {
|
|
|
21555
21563
|
scopeProfileWritePlan: options.scopeProfileWritePlan,
|
|
21556
21564
|
onTaskSettled: (err) => err ? reject(err) : resolve4()
|
|
21557
21565
|
}).catch(reject);
|
|
21558
|
-
})
|
|
21559
|
-
);
|
|
21560
|
-
if (replayTasks.length > 0) {
|
|
21561
|
-
const settled = await Promise.allSettled(replayTasks);
|
|
21562
|
-
const firstRejected = settled.find(
|
|
21563
|
-
(result) => result.status === "rejected"
|
|
21564
|
-
);
|
|
21565
|
-
if (firstRejected) {
|
|
21566
|
-
throw firstRejected.reason;
|
|
21567
|
-
}
|
|
21566
|
+
});
|
|
21568
21567
|
}
|
|
21569
21568
|
}
|
|
21570
21569
|
/**
|
|
@@ -22809,6 +22808,314 @@ var RecallIntrospectionCoordinator = class {
|
|
|
22809
22808
|
import { readdir as readdir3, stat as stat2, unlink as unlink4 } from "fs/promises";
|
|
22810
22809
|
import path21 from "path";
|
|
22811
22810
|
|
|
22811
|
+
// src/orchestration/startup-search-sync.ts
|
|
22812
|
+
var StartupSearchSyncRunner = class {
|
|
22813
|
+
constructor(host) {
|
|
22814
|
+
this.host = host;
|
|
22815
|
+
}
|
|
22816
|
+
host;
|
|
22817
|
+
startupBackendEnsureFlight;
|
|
22818
|
+
startupSyncInFlight;
|
|
22819
|
+
/**
|
|
22820
|
+
* Readiness level of startupSearchSync (#3518): probe, catalog-union
|
|
22821
|
+
* collection ensure, and the missing-collection noop swap — WITHOUT the
|
|
22822
|
+
* corpus-wide index update. The awaited ready path and the warm-up gate use
|
|
22823
|
+
* this so readiness waits only on the probe, the collection and the model
|
|
22824
|
+
* warm-up; the corpus update runs after ready under the server retry loop
|
|
22825
|
+
* via startupSearchSync. Returns true when the backend is usable for
|
|
22826
|
+
* warm-up search, false while unavailable, retired, or noop-disposed.
|
|
22827
|
+
*/
|
|
22828
|
+
async startupSearchReadySync(signal) {
|
|
22829
|
+
const ensured = await this.ensureStartupSearchBackend(signal);
|
|
22830
|
+
return ensured.state === "ready";
|
|
22831
|
+
}
|
|
22832
|
+
/**
|
|
22833
|
+
* Freshness-dependent one-shot entry point (#3525): joins the shared
|
|
22834
|
+
* startupSearchSync when this lifecycle still owes a corpus sync, so a
|
|
22835
|
+
* caller that needs a fresh index — the `remnic` one-shot diagnostic
|
|
22836
|
+
* commands, an OpenClaw boot — waits for the same update the post-ready
|
|
22837
|
+
* fire started instead of querying a stale index and aborting the run in
|
|
22838
|
+
* flight. Resolves true when the index is already synced or no sync is
|
|
22839
|
+
* owed (maintenance disabled); false when the joined sync failed.
|
|
22840
|
+
*/
|
|
22841
|
+
async joinStartupSearchSync(signal) {
|
|
22842
|
+
if (!resolveQmdCapabilities(this.host.deps.config).qmdMaintenance || this.host.deps.deferredSyncSucceeded) return true;
|
|
22843
|
+
return this.startupSearchSync(signal);
|
|
22844
|
+
}
|
|
22845
|
+
/**
|
|
22846
|
+
* Namespace-aware startup search sync. Re-probes QMD, ensures collections
|
|
22847
|
+
* (namespace-aware when namespacesEnabled), runs update, and warms up search.
|
|
22848
|
+
* Designed for server retry paths that run after the deferred init completes
|
|
22849
|
+
* when QMD was not available during initial startup — and, since #3518, for
|
|
22850
|
+
* the post-ready corpus update the deferred path no longer awaits.
|
|
22851
|
+
*
|
|
22852
|
+
* Accepts an optional AbortSignal so callers can interrupt the sync during
|
|
22853
|
+
* shutdown. The signal is checked between phases and forwarded into the QMD
|
|
22854
|
+
* update and warmup search calls so a long-running `qmd update` subprocess
|
|
22855
|
+
* is killed promptly rather than left in flight after `httpServer.stop()`.
|
|
22856
|
+
*
|
|
22857
|
+
* Returns true if the sync succeeded (QMD now available), false otherwise.
|
|
22858
|
+
*/
|
|
22859
|
+
async startupSearchSync(signal) {
|
|
22860
|
+
if (signal?.aborted) return false;
|
|
22861
|
+
const epoch = this.host.currentOrNewStartupEpoch();
|
|
22862
|
+
if (epoch === null) return false;
|
|
22863
|
+
let flight = this.startupSyncInFlight;
|
|
22864
|
+
if (!flight || flight.epoch !== epoch || flight.controller.signal.aborted) {
|
|
22865
|
+
const controller = new AbortController();
|
|
22866
|
+
const run = this.runStartupSearchSync(controller.signal).catch((err) => {
|
|
22867
|
+
log.warn(`startupSearchSync: shared sync failed: ${err}`);
|
|
22868
|
+
return false;
|
|
22869
|
+
});
|
|
22870
|
+
const next = {
|
|
22871
|
+
epoch,
|
|
22872
|
+
promise: run,
|
|
22873
|
+
controller,
|
|
22874
|
+
liveCallers: 0,
|
|
22875
|
+
cleanup: []
|
|
22876
|
+
};
|
|
22877
|
+
this.startupSyncInFlight = next;
|
|
22878
|
+
const settle = () => {
|
|
22879
|
+
if (this.startupSyncInFlight === next) this.startupSyncInFlight = void 0;
|
|
22880
|
+
for (const remove of next.cleanup) remove();
|
|
22881
|
+
};
|
|
22882
|
+
void run.then(settle);
|
|
22883
|
+
void run.then((synced) => {
|
|
22884
|
+
if (synced && !controller.signal.aborted && this.host.isCurrentStartupEpoch(epoch)) {
|
|
22885
|
+
this.host.deps.deferredSyncSucceeded = true;
|
|
22886
|
+
}
|
|
22887
|
+
});
|
|
22888
|
+
flight = next;
|
|
22889
|
+
}
|
|
22890
|
+
flight.liveCallers += 1;
|
|
22891
|
+
if (signal) {
|
|
22892
|
+
const held = flight;
|
|
22893
|
+
return new Promise((resolve4) => {
|
|
22894
|
+
const onCallerAbort = () => {
|
|
22895
|
+
held.liveCallers -= 1;
|
|
22896
|
+
if (held.liveCallers <= 0) held.controller.abort();
|
|
22897
|
+
resolve4(false);
|
|
22898
|
+
};
|
|
22899
|
+
signal.addEventListener("abort", onCallerAbort, { once: true });
|
|
22900
|
+
held.cleanup.push(() => signal.removeEventListener("abort", onCallerAbort));
|
|
22901
|
+
void held.promise.then((result) => {
|
|
22902
|
+
signal.removeEventListener("abort", onCallerAbort);
|
|
22903
|
+
resolve4(result);
|
|
22904
|
+
});
|
|
22905
|
+
});
|
|
22906
|
+
}
|
|
22907
|
+
return flight.promise;
|
|
22908
|
+
}
|
|
22909
|
+
async runStartupSearchSync(signal) {
|
|
22910
|
+
const ensured = await this.ensureStartupSearchBackend(signal);
|
|
22911
|
+
if (ensured.state !== "ready") return false;
|
|
22912
|
+
const { epoch, discovery } = ensured;
|
|
22913
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) {
|
|
22914
|
+
log.debug("startupSearchSync: aborted or retired after the shared backend ensure");
|
|
22915
|
+
return false;
|
|
22916
|
+
}
|
|
22917
|
+
const namespaces = discovery.namespaces;
|
|
22918
|
+
if (resolveQmdCapabilities(this.host.deps.config).qmdMaintenance) {
|
|
22919
|
+
try {
|
|
22920
|
+
const failTsBefore = "lastUpdateFailedAtMs" in this.host.deps.qmd ? this.host.deps.qmd.lastUpdateFailedAtMs : null;
|
|
22921
|
+
const hasRunTs = "lastUpdateRanAtMs" in this.host.deps.qmd;
|
|
22922
|
+
if ("resetUpdateThrottles" in this.host.deps.qmd) {
|
|
22923
|
+
this.host.deps.qmd.resetUpdateThrottles();
|
|
22924
|
+
}
|
|
22925
|
+
log.info("startupSearchSync: updating index to match current disk state");
|
|
22926
|
+
const updateAbort = this.host.linkedEpochAbortController(epoch, signal);
|
|
22927
|
+
let namespaceUpdate = null;
|
|
22928
|
+
try {
|
|
22929
|
+
if (resolveNamespaceCapabilities(this.host.deps.config).namespaces) {
|
|
22930
|
+
namespaceUpdate = await this.host.deps.namespaceSearchRouter.updateNamespacesDetailed(
|
|
22931
|
+
namespaces,
|
|
22932
|
+
{ signal: updateAbort.controller.signal }
|
|
22933
|
+
);
|
|
22934
|
+
} else {
|
|
22935
|
+
await this.host.deps.qmd.update({ signal: updateAbort.controller.signal });
|
|
22936
|
+
}
|
|
22937
|
+
} finally {
|
|
22938
|
+
updateAbort.dispose();
|
|
22939
|
+
}
|
|
22940
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) {
|
|
22941
|
+
log.debug("startupSearchSync: aborted or retired after update");
|
|
22942
|
+
return false;
|
|
22943
|
+
}
|
|
22944
|
+
const failTsAfter = "lastUpdateFailedAtMs" in this.host.deps.qmd ? this.host.deps.qmd.lastUpdateFailedAtMs : null;
|
|
22945
|
+
const runTsAfter = hasRunTs ? this.host.deps.qmd.lastUpdateRanAtMs : null;
|
|
22946
|
+
if (failTsAfter !== null && failTsAfter !== failTsBefore) {
|
|
22947
|
+
log.warn("startupSearchSync: update silently failed (detected via fail timestamp)");
|
|
22948
|
+
return false;
|
|
22949
|
+
}
|
|
22950
|
+
if (namespaceUpdate !== null) {
|
|
22951
|
+
if (namespaceUpdate.backendCount === 0) {
|
|
22952
|
+
log.warn("startupSearchSync: no namespace backends were eligible for update (all unavailable or collections missing)");
|
|
22953
|
+
return false;
|
|
22954
|
+
}
|
|
22955
|
+
const eligible = new Set(namespaceUpdate.eligibleNamespaces);
|
|
22956
|
+
const skipped = namespaces.filter((namespace) => !eligible.has(namespace));
|
|
22957
|
+
if (skipped.length > 0) {
|
|
22958
|
+
log.warn(`startupSearchSync: skipped namespaces with no available backend or collection: ${skipped.join(", ")}`);
|
|
22959
|
+
}
|
|
22960
|
+
log.info(`startupSearchSync: namespace updates succeeded (${eligible.size}/${namespaces.length} namespaces updated)`);
|
|
22961
|
+
} else if (hasRunTs && runTsAfter === null) {
|
|
22962
|
+
log.warn("startupSearchSync: update was throttled/skipped (run timestamp is null after reset + update)");
|
|
22963
|
+
return false;
|
|
22964
|
+
}
|
|
22965
|
+
log.info("startupSearchSync: sync complete");
|
|
22966
|
+
} catch (err) {
|
|
22967
|
+
log.warn(`startupSearchSync: update failed: ${err}`);
|
|
22968
|
+
return false;
|
|
22969
|
+
}
|
|
22970
|
+
}
|
|
22971
|
+
if (!signal?.aborted && this.host.isCurrentStartupEpoch(epoch)) {
|
|
22972
|
+
const warmupAbort = this.host.linkedEpochAbortController(epoch, signal);
|
|
22973
|
+
try {
|
|
22974
|
+
await this.host.deps.qmd.search(
|
|
22975
|
+
"warmup",
|
|
22976
|
+
this.host.deps.config.defaultNamespace,
|
|
22977
|
+
1,
|
|
22978
|
+
void 0,
|
|
22979
|
+
{ signal: warmupAbort.controller.signal }
|
|
22980
|
+
);
|
|
22981
|
+
log.info("startupSearchSync: warmup complete");
|
|
22982
|
+
} catch (err) {
|
|
22983
|
+
log.debug(`startupSearchSync: warmup search failed (non-fatal): ${err}`);
|
|
22984
|
+
} finally {
|
|
22985
|
+
warmupAbort.dispose();
|
|
22986
|
+
}
|
|
22987
|
+
}
|
|
22988
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) return false;
|
|
22989
|
+
return discovery.complete;
|
|
22990
|
+
}
|
|
22991
|
+
/**
|
|
22992
|
+
* The shared readiness half of the startup sync: probe, catalog-union
|
|
22993
|
+
* namespace discovery, per-namespace collection ensure, and the
|
|
22994
|
+
* missing-collection noop swap. `startupSearchReadySync` exposes this for
|
|
22995
|
+
* the awaited ready path; `startupSearchSync` layers the corpus update and
|
|
22996
|
+
* warm-up search on top for the post-ready retry loop (#3518). Concurrent
|
|
22997
|
+
* callers join one in-flight `runStartupSearchBackend` so nobody observes
|
|
22998
|
+
* the mid-run state where probe() has already flipped isAvailable() (#3518
|
|
22999
|
+
* second read).
|
|
23000
|
+
*/
|
|
23001
|
+
ensureStartupSearchBackend(signal) {
|
|
23002
|
+
if (signal?.aborted) return Promise.resolve({ state: "retired" });
|
|
23003
|
+
let flight = this.startupBackendEnsureFlight;
|
|
23004
|
+
if (!flight || !this.host.isCurrentStartupEpoch(flight.epoch) || flight.controller.signal.aborted) {
|
|
23005
|
+
const epoch = this.host.currentOrNewStartupEpoch();
|
|
23006
|
+
if (epoch === null) return Promise.resolve({ state: "retired" });
|
|
23007
|
+
const controller = new AbortController();
|
|
23008
|
+
const run = this.runStartupSearchBackend(epoch, controller.signal);
|
|
23009
|
+
const next = {
|
|
23010
|
+
epoch,
|
|
23011
|
+
promise: run,
|
|
23012
|
+
controller,
|
|
23013
|
+
liveCallers: 0,
|
|
23014
|
+
cleanup: []
|
|
23015
|
+
};
|
|
23016
|
+
this.startupBackendEnsureFlight = next;
|
|
23017
|
+
const settle = () => {
|
|
23018
|
+
if (this.startupBackendEnsureFlight === next) {
|
|
23019
|
+
this.startupBackendEnsureFlight = void 0;
|
|
23020
|
+
}
|
|
23021
|
+
for (const remove of next.cleanup) remove();
|
|
23022
|
+
};
|
|
23023
|
+
run.then(settle, settle);
|
|
23024
|
+
flight = next;
|
|
23025
|
+
}
|
|
23026
|
+
flight.liveCallers += 1;
|
|
23027
|
+
if (signal) {
|
|
23028
|
+
const held = flight;
|
|
23029
|
+
return new Promise((resolve4, reject) => {
|
|
23030
|
+
const onCallerAbort = () => {
|
|
23031
|
+
held.liveCallers -= 1;
|
|
23032
|
+
if (held.liveCallers <= 0) held.controller.abort();
|
|
23033
|
+
resolve4({ state: "retired" });
|
|
23034
|
+
};
|
|
23035
|
+
signal.addEventListener("abort", onCallerAbort, { once: true });
|
|
23036
|
+
held.cleanup.push(() => signal.removeEventListener("abort", onCallerAbort));
|
|
23037
|
+
held.promise.then(
|
|
23038
|
+
(result) => {
|
|
23039
|
+
signal.removeEventListener("abort", onCallerAbort);
|
|
23040
|
+
resolve4(result);
|
|
23041
|
+
},
|
|
23042
|
+
(err) => {
|
|
23043
|
+
signal.removeEventListener("abort", onCallerAbort);
|
|
23044
|
+
reject(err);
|
|
23045
|
+
}
|
|
23046
|
+
);
|
|
23047
|
+
});
|
|
23048
|
+
}
|
|
23049
|
+
return flight.promise;
|
|
23050
|
+
}
|
|
23051
|
+
async runStartupSearchBackend(epoch, signal) {
|
|
23052
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) {
|
|
23053
|
+
return { state: "retired" };
|
|
23054
|
+
}
|
|
23055
|
+
const available = await this.host.probeForStartupEpoch(epoch, signal);
|
|
23056
|
+
if (!available) return { state: "unavailable" };
|
|
23057
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) {
|
|
23058
|
+
log.debug("startupSearchSync: aborted or retired after probe");
|
|
23059
|
+
return { state: "retired" };
|
|
23060
|
+
}
|
|
23061
|
+
log.info(`startupSearchSync: backend now available ${this.host.deps.qmd.debugStatus()}`);
|
|
23062
|
+
if (resolveNamespaceCapabilities(this.host.deps.config).namespaces) {
|
|
23063
|
+
this.host.deps.namespaceSearchRouter.clearCache();
|
|
23064
|
+
}
|
|
23065
|
+
const discovery = await this.host.startupNamespaces(epoch);
|
|
23066
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) {
|
|
23067
|
+
log.debug("startupSearchSync: aborted or retired after namespace discovery");
|
|
23068
|
+
return { state: "retired" };
|
|
23069
|
+
}
|
|
23070
|
+
const namespaces = discovery.namespaces;
|
|
23071
|
+
const states = await Promise.all(
|
|
23072
|
+
namespaces.map(async (namespace) => {
|
|
23073
|
+
const epochAbort = this.host.linkedEpochAbortController(epoch, signal);
|
|
23074
|
+
try {
|
|
23075
|
+
return {
|
|
23076
|
+
namespace,
|
|
23077
|
+
state: resolveNamespaceCapabilities(this.host.deps.config).namespaces ? await this.host.deps.namespaceSearchRouter.ensureNamespaceCollection(
|
|
23078
|
+
namespace,
|
|
23079
|
+
{ signal: epochAbort.controller.signal }
|
|
23080
|
+
) : await this.host.deps.qmd.ensureCollection(
|
|
23081
|
+
this.host.deps.config.memoryDir,
|
|
23082
|
+
this.host.deps.config.qmdCollection,
|
|
23083
|
+
{ signal: epochAbort.controller.signal }
|
|
23084
|
+
)
|
|
23085
|
+
};
|
|
23086
|
+
} finally {
|
|
23087
|
+
epochAbort.dispose();
|
|
23088
|
+
}
|
|
23089
|
+
})
|
|
23090
|
+
);
|
|
23091
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) {
|
|
23092
|
+
log.debug("startupSearchSync: aborted or retired after ensureCollection");
|
|
23093
|
+
return { state: "retired" };
|
|
23094
|
+
}
|
|
23095
|
+
const defaultState = states.find((e) => e.namespace === this.host.deps.config.defaultNamespace)?.state ?? "unknown";
|
|
23096
|
+
if (defaultState === "missing") {
|
|
23097
|
+
await this.host.deps.disposeSearchBackendIfNeeded();
|
|
23098
|
+
if (signal?.aborted || !this.host.isCurrentStartupEpoch(epoch)) {
|
|
23099
|
+
log.debug("startupSearchSync: aborted or retired while disposing a missing backend");
|
|
23100
|
+
return { state: "retired" };
|
|
23101
|
+
}
|
|
23102
|
+
if ("available" in this.host.deps.qmd) {
|
|
23103
|
+
this.host.deps.qmd.available = false;
|
|
23104
|
+
}
|
|
23105
|
+
this.host.deps.qmd = new NoopSearchBackend();
|
|
23106
|
+
log.warn("startupSearchSync: search collection missing; disabling search (fallback retrieval remains enabled)");
|
|
23107
|
+
return { state: "missing" };
|
|
23108
|
+
}
|
|
23109
|
+
if (defaultState === "unknown") {
|
|
23110
|
+
log.warn(
|
|
23111
|
+
"startupSearchSync: collection check could not verify the default collection; the sync stays unready until a retry verifies it"
|
|
23112
|
+
);
|
|
23113
|
+
return { state: "degraded" };
|
|
23114
|
+
}
|
|
23115
|
+
return { state: "ready", epoch, discovery };
|
|
23116
|
+
}
|
|
23117
|
+
};
|
|
23118
|
+
|
|
22812
23119
|
// src/orchestration/startup-collection-checks.ts
|
|
22813
23120
|
async function startupDiscoveryWithTimeout(discover, configuredFallback, timeoutMs = qmdStartupCollectionCheckTimeoutMs()) {
|
|
22814
23121
|
let timer;
|
|
@@ -22868,7 +23175,6 @@ var OrchestratorInitCoordinator = class {
|
|
|
22868
23175
|
activeStartupEpoch = null;
|
|
22869
23176
|
startupClosed = false;
|
|
22870
23177
|
maintenanceNamespacesFlight;
|
|
22871
|
-
startupBackendEnsureFlight;
|
|
22872
23178
|
correctionCatalogFlight;
|
|
22873
23179
|
recoveredCorrectionNamespaces = /* @__PURE__ */ new Set();
|
|
22874
23180
|
correctionRecoveryChain = Promise.resolve();
|
|
@@ -23274,6 +23580,18 @@ var OrchestratorInitCoordinator = class {
|
|
|
23274
23580
|
this.deps.deferredSyncSucceeded = true;
|
|
23275
23581
|
}
|
|
23276
23582
|
}
|
|
23583
|
+
void this.deps.deferredReady.then(async () => {
|
|
23584
|
+
if (signal.aborted || !resolveQmdCapabilities(this.deps.config).qmdMaintenance || this.deps.deferredSyncSucceeded) return;
|
|
23585
|
+
try {
|
|
23586
|
+
const sync = this.startupSearchSync(signal);
|
|
23587
|
+
const tracked = sync.then(() => void 0, () => void 0);
|
|
23588
|
+
this.startupWarmups.add(tracked);
|
|
23589
|
+
void tracked.then(() => this.startupWarmups.delete(tracked));
|
|
23590
|
+
await sync;
|
|
23591
|
+
} catch (err) {
|
|
23592
|
+
log.warn(`post-ready QMD sync failed (non-fatal): ${err}`);
|
|
23593
|
+
}
|
|
23594
|
+
});
|
|
23277
23595
|
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
23278
23596
|
const factHashWarm = (async () => {
|
|
23279
23597
|
const storage = await this.deps.storageRouter.storageFor(this.deps.config.defaultNamespace);
|
|
@@ -23429,8 +23747,19 @@ var OrchestratorInitCoordinator = class {
|
|
|
23429
23747
|
* warm-up search, false while unavailable, retired, or noop-disposed.
|
|
23430
23748
|
*/
|
|
23431
23749
|
async startupSearchReadySync(signal) {
|
|
23432
|
-
|
|
23433
|
-
|
|
23750
|
+
return this.searchSync().startupSearchReadySync(signal);
|
|
23751
|
+
}
|
|
23752
|
+
/**
|
|
23753
|
+
* Freshness-dependent one-shot entry point (#3525): joins the shared
|
|
23754
|
+
* startupSearchSync when this lifecycle still owes a corpus sync, so a
|
|
23755
|
+
* caller that needs a fresh index — the `remnic` one-shot diagnostic
|
|
23756
|
+
* commands, an OpenClaw boot — waits for the same update the post-ready
|
|
23757
|
+
* fire started instead of querying a stale index and aborting the run in
|
|
23758
|
+
* flight. Resolves true when the index is already synced or no sync is
|
|
23759
|
+
* owed (maintenance disabled); false when the joined sync failed.
|
|
23760
|
+
*/
|
|
23761
|
+
async joinStartupSearchSync(signal) {
|
|
23762
|
+
return this.searchSync().joinStartupSearchSync(signal);
|
|
23434
23763
|
}
|
|
23435
23764
|
/**
|
|
23436
23765
|
* Namespace-aware startup search sync. Re-probes QMD, ensures collections
|
|
@@ -23447,206 +23776,19 @@ var OrchestratorInitCoordinator = class {
|
|
|
23447
23776
|
* Returns true if the sync succeeded (QMD now available), false otherwise.
|
|
23448
23777
|
*/
|
|
23449
23778
|
async startupSearchSync(signal) {
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
this.deps.qmd.resetUpdateThrottles();
|
|
23464
|
-
}
|
|
23465
|
-
log.info("startupSearchSync: updating index to match current disk state");
|
|
23466
|
-
const updateAbort = this.linkedEpochAbortController(epoch, signal);
|
|
23467
|
-
let namespacesUpdated = 0;
|
|
23468
|
-
try {
|
|
23469
|
-
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
23470
|
-
namespacesUpdated = await this.deps.namespaceSearchRouter.updateNamespaces(
|
|
23471
|
-
namespaces,
|
|
23472
|
-
{ signal: updateAbort.controller.signal }
|
|
23473
|
-
);
|
|
23474
|
-
} else {
|
|
23475
|
-
await this.deps.qmd.update({ signal: updateAbort.controller.signal });
|
|
23476
|
-
}
|
|
23477
|
-
} finally {
|
|
23478
|
-
updateAbort.dispose();
|
|
23479
|
-
}
|
|
23480
|
-
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
23481
|
-
log.debug("startupSearchSync: aborted or retired after update");
|
|
23482
|
-
return false;
|
|
23483
|
-
}
|
|
23484
|
-
const failTsAfter = "lastUpdateFailedAtMs" in this.deps.qmd ? this.deps.qmd.lastUpdateFailedAtMs : null;
|
|
23485
|
-
const runTsAfter = hasRunTs ? this.deps.qmd.lastUpdateRanAtMs : null;
|
|
23486
|
-
if (failTsAfter !== null && failTsAfter !== failTsBefore) {
|
|
23487
|
-
log.warn("startupSearchSync: update silently failed (detected via fail timestamp)");
|
|
23488
|
-
return false;
|
|
23489
|
-
}
|
|
23490
|
-
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
23491
|
-
if (namespacesUpdated === 0) {
|
|
23492
|
-
log.warn("startupSearchSync: no namespace backends were eligible for update (all unavailable or collections missing)");
|
|
23493
|
-
return false;
|
|
23494
|
-
}
|
|
23495
|
-
log.info(`startupSearchSync: namespace updates succeeded (${namespacesUpdated}/${namespaces.length} namespaces updated)`);
|
|
23496
|
-
} else if (hasRunTs && runTsAfter === null) {
|
|
23497
|
-
log.warn("startupSearchSync: update was throttled/skipped (run timestamp is null after reset + update)");
|
|
23498
|
-
return false;
|
|
23499
|
-
}
|
|
23500
|
-
log.info("startupSearchSync: sync complete");
|
|
23501
|
-
} catch (err) {
|
|
23502
|
-
log.warn(`startupSearchSync: update failed: ${err}`);
|
|
23503
|
-
return false;
|
|
23504
|
-
}
|
|
23505
|
-
}
|
|
23506
|
-
if (!signal?.aborted && this.isCurrentStartupEpoch(epoch)) {
|
|
23507
|
-
const warmupAbort = this.linkedEpochAbortController(epoch, signal);
|
|
23508
|
-
try {
|
|
23509
|
-
await this.deps.qmd.search(
|
|
23510
|
-
"warmup",
|
|
23511
|
-
this.deps.config.defaultNamespace,
|
|
23512
|
-
1,
|
|
23513
|
-
void 0,
|
|
23514
|
-
{ signal: warmupAbort.controller.signal }
|
|
23515
|
-
);
|
|
23516
|
-
log.info("startupSearchSync: warmup complete");
|
|
23517
|
-
} catch (err) {
|
|
23518
|
-
log.debug(`startupSearchSync: warmup search failed (non-fatal): ${err}`);
|
|
23519
|
-
} finally {
|
|
23520
|
-
warmupAbort.dispose();
|
|
23521
|
-
}
|
|
23522
|
-
}
|
|
23523
|
-
return discovery.complete;
|
|
23524
|
-
}
|
|
23525
|
-
/**
|
|
23526
|
-
* The shared readiness half of the startup sync: probe, catalog-union
|
|
23527
|
-
* namespace discovery, per-namespace collection ensure, and the
|
|
23528
|
-
* missing-collection noop swap. `startupSearchReadySync` exposes this for
|
|
23529
|
-
* the awaited ready path; `startupSearchSync` layers the corpus update and
|
|
23530
|
-
* warm-up search on top for the post-ready retry loop (#3518). Concurrent
|
|
23531
|
-
* callers join one in-flight `runStartupSearchBackend` so nobody observes
|
|
23532
|
-
* the mid-run state where probe() has already flipped isAvailable() (#3518
|
|
23533
|
-
* second read).
|
|
23534
|
-
*/
|
|
23535
|
-
ensureStartupSearchBackend(signal) {
|
|
23536
|
-
if (signal?.aborted) return Promise.resolve({ state: "retired" });
|
|
23537
|
-
let flight = this.startupBackendEnsureFlight;
|
|
23538
|
-
if (!flight || !this.isCurrentStartupEpoch(flight.epoch) || flight.controller.signal.aborted) {
|
|
23539
|
-
const epoch = this.currentOrNewStartupEpoch();
|
|
23540
|
-
if (epoch === null) return Promise.resolve({ state: "retired" });
|
|
23541
|
-
const controller = new AbortController();
|
|
23542
|
-
const run = this.runStartupSearchBackend(epoch, controller.signal);
|
|
23543
|
-
const next = {
|
|
23544
|
-
epoch,
|
|
23545
|
-
promise: run,
|
|
23546
|
-
controller,
|
|
23547
|
-
liveCallers: 0,
|
|
23548
|
-
cleanup: []
|
|
23549
|
-
};
|
|
23550
|
-
this.startupBackendEnsureFlight = next;
|
|
23551
|
-
const settle = () => {
|
|
23552
|
-
if (this.startupBackendEnsureFlight === next) {
|
|
23553
|
-
this.startupBackendEnsureFlight = void 0;
|
|
23554
|
-
}
|
|
23555
|
-
for (const remove of next.cleanup) remove();
|
|
23556
|
-
};
|
|
23557
|
-
run.then(settle, settle);
|
|
23558
|
-
flight = next;
|
|
23559
|
-
}
|
|
23560
|
-
flight.liveCallers += 1;
|
|
23561
|
-
if (signal) {
|
|
23562
|
-
const held = flight;
|
|
23563
|
-
return new Promise((resolve4, reject) => {
|
|
23564
|
-
const onCallerAbort = () => {
|
|
23565
|
-
held.liveCallers -= 1;
|
|
23566
|
-
if (held.liveCallers <= 0) held.controller.abort();
|
|
23567
|
-
resolve4({ state: "retired" });
|
|
23568
|
-
};
|
|
23569
|
-
signal.addEventListener("abort", onCallerAbort, { once: true });
|
|
23570
|
-
held.cleanup.push(() => signal.removeEventListener("abort", onCallerAbort));
|
|
23571
|
-
held.promise.then(
|
|
23572
|
-
(result) => {
|
|
23573
|
-
signal.removeEventListener("abort", onCallerAbort);
|
|
23574
|
-
resolve4(result);
|
|
23575
|
-
},
|
|
23576
|
-
(err) => {
|
|
23577
|
-
signal.removeEventListener("abort", onCallerAbort);
|
|
23578
|
-
reject(err);
|
|
23579
|
-
}
|
|
23580
|
-
);
|
|
23581
|
-
});
|
|
23582
|
-
}
|
|
23583
|
-
return flight.promise;
|
|
23584
|
-
}
|
|
23585
|
-
async runStartupSearchBackend(epoch, signal) {
|
|
23586
|
-
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
23587
|
-
return { state: "retired" };
|
|
23588
|
-
}
|
|
23589
|
-
const available = await this.probeForStartupEpoch(epoch, signal);
|
|
23590
|
-
if (!available) return { state: "unavailable" };
|
|
23591
|
-
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
23592
|
-
log.debug("startupSearchSync: aborted or retired after probe");
|
|
23593
|
-
return { state: "retired" };
|
|
23594
|
-
}
|
|
23595
|
-
log.info(`startupSearchSync: backend now available ${this.deps.qmd.debugStatus()}`);
|
|
23596
|
-
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
23597
|
-
this.deps.namespaceSearchRouter.clearCache();
|
|
23598
|
-
}
|
|
23599
|
-
const discovery = await this.startupNamespaces(epoch);
|
|
23600
|
-
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
23601
|
-
log.debug("startupSearchSync: aborted or retired after namespace discovery");
|
|
23602
|
-
return { state: "retired" };
|
|
23603
|
-
}
|
|
23604
|
-
const namespaces = discovery.namespaces;
|
|
23605
|
-
const states = await Promise.all(
|
|
23606
|
-
namespaces.map(async (namespace) => {
|
|
23607
|
-
const epochAbort = this.linkedEpochAbortController(epoch, signal);
|
|
23608
|
-
try {
|
|
23609
|
-
return {
|
|
23610
|
-
namespace,
|
|
23611
|
-
state: resolveNamespaceCapabilities(this.deps.config).namespaces ? await this.deps.namespaceSearchRouter.ensureNamespaceCollection(
|
|
23612
|
-
namespace,
|
|
23613
|
-
{ signal: epochAbort.controller.signal }
|
|
23614
|
-
) : await this.deps.qmd.ensureCollection(
|
|
23615
|
-
this.deps.config.memoryDir,
|
|
23616
|
-
this.deps.config.qmdCollection,
|
|
23617
|
-
{ signal: epochAbort.controller.signal }
|
|
23618
|
-
)
|
|
23619
|
-
};
|
|
23620
|
-
} finally {
|
|
23621
|
-
epochAbort.dispose();
|
|
23622
|
-
}
|
|
23623
|
-
})
|
|
23624
|
-
);
|
|
23625
|
-
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
23626
|
-
log.debug("startupSearchSync: aborted or retired after ensureCollection");
|
|
23627
|
-
return { state: "retired" };
|
|
23628
|
-
}
|
|
23629
|
-
const defaultState = states.find((e) => e.namespace === this.deps.config.defaultNamespace)?.state ?? "unknown";
|
|
23630
|
-
if (defaultState === "missing") {
|
|
23631
|
-
await this.deps.disposeSearchBackendIfNeeded();
|
|
23632
|
-
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
23633
|
-
log.debug("startupSearchSync: aborted or retired while disposing a missing backend");
|
|
23634
|
-
return { state: "retired" };
|
|
23635
|
-
}
|
|
23636
|
-
if ("available" in this.deps.qmd) {
|
|
23637
|
-
this.deps.qmd.available = false;
|
|
23638
|
-
}
|
|
23639
|
-
this.deps.qmd = new NoopSearchBackend();
|
|
23640
|
-
log.warn("startupSearchSync: search collection missing; disabling search (fallback retrieval remains enabled)");
|
|
23641
|
-
return { state: "missing" };
|
|
23642
|
-
}
|
|
23643
|
-
if (defaultState === "unknown") {
|
|
23644
|
-
log.warn(
|
|
23645
|
-
"startupSearchSync: collection check could not verify the default collection; the sync stays unready until a retry verifies it"
|
|
23646
|
-
);
|
|
23647
|
-
return { state: "degraded" };
|
|
23648
|
-
}
|
|
23649
|
-
return { state: "ready", epoch, discovery };
|
|
23779
|
+
return this.searchSync().startupSearchSync(signal);
|
|
23780
|
+
}
|
|
23781
|
+
searchSyncRunner;
|
|
23782
|
+
searchSync() {
|
|
23783
|
+
this.searchSyncRunner ??= new StartupSearchSyncRunner({
|
|
23784
|
+
deps: this.deps,
|
|
23785
|
+
currentOrNewStartupEpoch: () => this.currentOrNewStartupEpoch(),
|
|
23786
|
+
isCurrentStartupEpoch: (epoch) => this.isCurrentStartupEpoch(epoch),
|
|
23787
|
+
linkedEpochAbortController: (epoch, signal) => this.linkedEpochAbortController(epoch, signal),
|
|
23788
|
+
probeForStartupEpoch: (epoch, signal) => this.probeForStartupEpoch(epoch, signal),
|
|
23789
|
+
startupNamespaces: (epoch) => this.startupNamespaces(epoch)
|
|
23790
|
+
});
|
|
23791
|
+
return this.searchSyncRunner;
|
|
23650
23792
|
}
|
|
23651
23793
|
};
|
|
23652
23794
|
|
|
@@ -27228,7 +27370,14 @@ var RecallEntryCoordinator = class {
|
|
|
27228
27370
|
const caps = resolveCapabilities(this.deps.config);
|
|
27229
27371
|
const graphCaps = resolveGraphConstructionCapabilities(this.deps.config);
|
|
27230
27372
|
const abortController = new AbortController();
|
|
27373
|
+
let clientDeadlineFired = false;
|
|
27374
|
+
let clientDeadlineHandle = null;
|
|
27375
|
+
let outerTimeoutFired = false;
|
|
27231
27376
|
const onAbort = () => {
|
|
27377
|
+
if (clientDeadlineHandle) {
|
|
27378
|
+
clearTimeout(clientDeadlineHandle);
|
|
27379
|
+
clientDeadlineHandle = null;
|
|
27380
|
+
}
|
|
27232
27381
|
abortController.abort();
|
|
27233
27382
|
};
|
|
27234
27383
|
if (options.abortSignal?.aborted) {
|
|
@@ -27241,6 +27390,14 @@ var RecallEntryCoordinator = class {
|
|
|
27241
27390
|
if (namespacesEnabled && !principal) {
|
|
27242
27391
|
throw new Error("authentication required: namespaces are enabled and no principal was supplied");
|
|
27243
27392
|
}
|
|
27393
|
+
const clientDeadlineAtMs = resolveClientDeadlineAtMs(options.deadlineMs, Date.now());
|
|
27394
|
+
if (clientDeadlineAtMs !== null) {
|
|
27395
|
+
clientDeadlineHandle = setTimeout(() => {
|
|
27396
|
+
if (options.abortSignal?.aborted) return;
|
|
27397
|
+
clientDeadlineFired = true;
|
|
27398
|
+
abortController.abort();
|
|
27399
|
+
}, clientDeadlineTimerMs(clientDeadlineAtMs, Date.now()));
|
|
27400
|
+
}
|
|
27244
27401
|
let initGateTimeoutHandle = null;
|
|
27245
27402
|
let onInitGateAbort = null;
|
|
27246
27403
|
if (this.deps.initPromise) {
|
|
@@ -27264,8 +27421,9 @@ var RecallEntryCoordinator = class {
|
|
|
27264
27421
|
if (initGateTimeoutHandle) clearTimeout(initGateTimeoutHandle);
|
|
27265
27422
|
if (onInitGateAbort)
|
|
27266
27423
|
abortController.signal.removeEventListener("abort", onInitGateAbort);
|
|
27267
|
-
if (gateResult === "aborted") {
|
|
27424
|
+
if (gateResult === "aborted" && !clientDeadlineFired) {
|
|
27268
27425
|
this.deps.logRecallFailure(abortRecallError("recall aborted before init"));
|
|
27426
|
+
if (clientDeadlineHandle) clearTimeout(clientDeadlineHandle);
|
|
27269
27427
|
return "";
|
|
27270
27428
|
}
|
|
27271
27429
|
if (gateResult === "timeout") {
|
|
@@ -27275,6 +27433,7 @@ var RecallEntryCoordinator = class {
|
|
|
27275
27433
|
if (resolveRecallAuxiliaryCapabilities(this.deps.config).secureStore && !this.deps.storage.isSecureStoreUnlocked()) {
|
|
27276
27434
|
const lockedMsg = "[secure-store locked] Memory store is encrypted and locked. Unlock the secure-store inside this daemon process, or restart the daemon through a secure-store aware launcher that installs the key.";
|
|
27277
27435
|
log.warn("recall blocked: secure-store is locked");
|
|
27436
|
+
if (clientDeadlineHandle) clearTimeout(clientDeadlineHandle);
|
|
27278
27437
|
return lockedMsg;
|
|
27279
27438
|
}
|
|
27280
27439
|
let standingText = "";
|
|
@@ -27314,15 +27473,19 @@ var RecallEntryCoordinator = class {
|
|
|
27314
27473
|
context: standingText.length > 0 ? prefixStandingMemoryBlock(composition.context ?? "", standingText, standingBudget) : composition.context
|
|
27315
27474
|
}) : innerObserver
|
|
27316
27475
|
};
|
|
27476
|
+
if (clientDeadlineAtMs !== null) recallOptions.deadlineMs = clientDeadlineAtMs;
|
|
27317
27477
|
try {
|
|
27318
27478
|
const recallPromise = this.deps.recallInternal(prompt, sessionKey, recallOptions, caps, graphCaps);
|
|
27319
|
-
const
|
|
27479
|
+
const configuredOuterMs = this.deps.config.recallOuterTimeoutMs ?? 75e3;
|
|
27480
|
+
const clientRemainingMs = clientDeadlineAtMs === null ? null : clientDeadlineTimerMs(clientDeadlineAtMs, Date.now());
|
|
27481
|
+
const RECALL_TIMEOUT_MS = clientRemainingMs === null ? configuredOuterMs : Math.min(configuredOuterMs > 0 ? configuredOuterMs : Number.POSITIVE_INFINITY, clientRemainingMs);
|
|
27320
27482
|
if (RECALL_TIMEOUT_MS <= 0) {
|
|
27321
27483
|
return prefixStandingMemoryBlock(await recallPromise, standingText, standingBudget);
|
|
27322
27484
|
}
|
|
27323
27485
|
let timeoutHandle = null;
|
|
27324
27486
|
const timeoutPromise = new Promise((_, reject) => {
|
|
27325
27487
|
timeoutHandle = setTimeout(() => {
|
|
27488
|
+
if (!options.abortSignal?.aborted) outerTimeoutFired = true;
|
|
27326
27489
|
abortController.abort();
|
|
27327
27490
|
reject(new Error("recall timeout"));
|
|
27328
27491
|
}, RECALL_TIMEOUT_MS);
|
|
@@ -27351,7 +27514,10 @@ var RecallEntryCoordinator = class {
|
|
|
27351
27514
|
} catch (err) {
|
|
27352
27515
|
this.deps.logRecallFailure(err);
|
|
27353
27516
|
this.deps.profiler.endTrace();
|
|
27354
|
-
const
|
|
27517
|
+
const deadlineFired = clientDeadlineFired || outerTimeoutFired;
|
|
27518
|
+
const missing = options.abortSignal?.aborted && !deadlineFired ? null : recallFailureComposition(
|
|
27519
|
+
deadlineFired && isAbortError(err) ? new Error("recall timeout") : err
|
|
27520
|
+
);
|
|
27355
27521
|
if (!missing) return "";
|
|
27356
27522
|
if (standingText.length > 0) {
|
|
27357
27523
|
missing.context = prefixStandingMemoryBlock(missing.context ?? "", standingText, standingBudget);
|
|
@@ -27361,6 +27527,7 @@ var RecallEntryCoordinator = class {
|
|
|
27361
27527
|
});
|
|
27362
27528
|
return composeRecallContext(missing);
|
|
27363
27529
|
} finally {
|
|
27530
|
+
if (clientDeadlineHandle) clearTimeout(clientDeadlineHandle);
|
|
27364
27531
|
options.abortSignal?.removeEventListener("abort", onAbort);
|
|
27365
27532
|
}
|
|
27366
27533
|
}
|
|
@@ -27681,14 +27848,21 @@ var SessionContextCoordinator = class {
|
|
|
27681
27848
|
*
|
|
27682
27849
|
* Pass `null` to clear.
|
|
27683
27850
|
*/
|
|
27684
|
-
setCodingContextForSession(sessionKey, codingContext) {
|
|
27851
|
+
setCodingContextForSession(sessionKey, codingContext, owner) {
|
|
27685
27852
|
if (typeof sessionKey !== "string" || sessionKey.length === 0) return;
|
|
27686
27853
|
this.deps.ensureSessionBindingMaps();
|
|
27687
27854
|
if (codingContext === null) {
|
|
27688
27855
|
this.deps._codingContextBySession.delete(sessionKey);
|
|
27856
|
+
this.deps._codingContextOwnerBySession.delete(sessionKey);
|
|
27689
27857
|
return;
|
|
27690
27858
|
}
|
|
27691
27859
|
this.deps._codingContextBySession.set(sessionKey, codingContext);
|
|
27860
|
+
if (owner !== void 0) this.deps._codingContextOwnerBySession.set(sessionKey, owner);
|
|
27861
|
+
}
|
|
27862
|
+
/** The principal that claimed this session's coding context, if any. */
|
|
27863
|
+
getCodingContextOwnerForSession(sessionKey) {
|
|
27864
|
+
if (!sessionKey) return void 0;
|
|
27865
|
+
return this.deps._codingContextOwnerBySession?.get(sessionKey);
|
|
27692
27866
|
}
|
|
27693
27867
|
/**
|
|
27694
27868
|
* Read-only accessor for the coding context attached to a session. Returns
|
|
@@ -28161,6 +28335,7 @@ var Orchestrator = class {
|
|
|
28161
28335
|
* through the same namespace layer).
|
|
28162
28336
|
*/
|
|
28163
28337
|
_codingContextBySession = /* @__PURE__ */ new Map();
|
|
28338
|
+
_codingContextOwnerBySession = /* @__PURE__ */ new Map();
|
|
28164
28339
|
/**
|
|
28165
28340
|
* Per-session peer ID registry (issue #679 PR 3/5).
|
|
28166
28341
|
* Set by connectors / hooks via `setPeerIdForSession` so `recallInternal`
|
|
@@ -28180,6 +28355,7 @@ var Orchestrator = class {
|
|
|
28180
28355
|
*/
|
|
28181
28356
|
ensureSessionBindingMaps() {
|
|
28182
28357
|
this._codingContextBySession ??= /* @__PURE__ */ new Map();
|
|
28358
|
+
this._codingContextOwnerBySession ??= /* @__PURE__ */ new Map();
|
|
28183
28359
|
this._peerIdBySession ??= /* @__PURE__ */ new Map();
|
|
28184
28360
|
}
|
|
28185
28361
|
routingRulesStore = null;
|
|
@@ -28521,14 +28697,20 @@ var Orchestrator = class {
|
|
|
28521
28697
|
principalOverride
|
|
28522
28698
|
);
|
|
28523
28699
|
}
|
|
28524
|
-
setCodingContextForSession(sessionKey, codingContext) {
|
|
28700
|
+
setCodingContextForSession(sessionKey, codingContext, owner) {
|
|
28525
28701
|
return (this.sessionContextCoordinator ?? new SessionContextCoordinator(
|
|
28526
28702
|
selfDeps(this)
|
|
28527
28703
|
)).setCodingContextForSession(
|
|
28528
28704
|
sessionKey,
|
|
28529
|
-
codingContext
|
|
28705
|
+
codingContext,
|
|
28706
|
+
owner
|
|
28530
28707
|
);
|
|
28531
28708
|
}
|
|
28709
|
+
getCodingContextOwnerForSession(sessionKey) {
|
|
28710
|
+
return (this.sessionContextCoordinator ?? new SessionContextCoordinator(
|
|
28711
|
+
selfDeps(this)
|
|
28712
|
+
)).getCodingContextOwnerForSession(sessionKey);
|
|
28713
|
+
}
|
|
28532
28714
|
getCodingContextForSession(sessionKey) {
|
|
28533
28715
|
return (this.sessionContextCoordinator ?? new SessionContextCoordinator(
|
|
28534
28716
|
selfDeps(this)
|
|
@@ -29208,6 +29390,11 @@ var Orchestrator = class {
|
|
|
29208
29390
|
signal
|
|
29209
29391
|
);
|
|
29210
29392
|
}
|
|
29393
|
+
async joinStartupSearchSync(signal) {
|
|
29394
|
+
return this.orchestratorInitCoordinator.joinStartupSearchSync(
|
|
29395
|
+
signal
|
|
29396
|
+
);
|
|
29397
|
+
}
|
|
29211
29398
|
async runPatternReinforcement(options = {}) {
|
|
29212
29399
|
return this.workspaceOpsCoordinator.runPatternReinforcement(
|
|
29213
29400
|
options
|
|
@@ -31438,7 +31625,7 @@ defineOperation({
|
|
|
31438
31625
|
if (!hasCodingContext && hasProjectTag) {
|
|
31439
31626
|
const tag = projectTag.trim();
|
|
31440
31627
|
const pid = projectTagProjectId(tag);
|
|
31441
|
-
ctx.service.setCodingContext({ sessionKey, codingContext: { projectId: pid, branch: null, rootPath: pid, defaultBranch: null } });
|
|
31628
|
+
ctx.service.setCodingContext({ sessionKey, codingContext: { projectId: pid, branch: null, rootPath: pid, defaultBranch: null }, authenticatedPrincipal: ctx.authenticatedPrincipal, remote: true });
|
|
31442
31629
|
return { result: { ok: true } };
|
|
31443
31630
|
}
|
|
31444
31631
|
if (!hasCodingContext && !hasProjectTag) throw new EngramAccessInputError("set_coding_context requires either codingContext or projectTag");
|
|
@@ -31453,7 +31640,7 @@ defineOperation({
|
|
|
31453
31640
|
if (dB === void 0) throw new EngramAccessInputError("codingContext.defaultBranch must be a string or null");
|
|
31454
31641
|
codingContext = { projectId: defStr(o.projectId, ""), branch, rootPath: defStr(o.rootPath, ""), defaultBranch: dB };
|
|
31455
31642
|
}
|
|
31456
|
-
ctx.service.setCodingContext({ sessionKey, codingContext });
|
|
31643
|
+
ctx.service.setCodingContext({ sessionKey, codingContext, authenticatedPrincipal: ctx.authenticatedPrincipal, remote: true });
|
|
31457
31644
|
return { result: { ok: true } };
|
|
31458
31645
|
}
|
|
31459
31646
|
});
|
|
@@ -38782,7 +38969,11 @@ var EngramAccessHttpServer = class extends ReviewDeckAccessHttpBase {
|
|
|
38782
38969
|
})();
|
|
38783
38970
|
this.service.setCodingContext({
|
|
38784
38971
|
sessionKey: body.sessionKey,
|
|
38785
|
-
codingContext
|
|
38972
|
+
codingContext,
|
|
38973
|
+
// Caller-supplied root: bind to the transport principal and mark it
|
|
38974
|
+
// remote — it was resolved on the caller's host, not this filesystem.
|
|
38975
|
+
authenticatedPrincipal: this.resolveRequestPrincipal(req),
|
|
38976
|
+
remote: true
|
|
38786
38977
|
});
|
|
38787
38978
|
this.respondJson(res, 200, { ok: true });
|
|
38788
38979
|
return;
|
|
@@ -61596,7 +61787,8 @@ var AccessObserveWriteSurface = class {
|
|
|
61596
61787
|
"context",
|
|
61597
61788
|
() => this.deps.maybeAttachCodingContext(request.sessionKey, {
|
|
61598
61789
|
cwd: request.cwd,
|
|
61599
|
-
projectTag: request.projectTag
|
|
61790
|
+
projectTag: request.projectTag,
|
|
61791
|
+
authenticatedPrincipal: request.authenticatedPrincipal
|
|
61600
61792
|
})
|
|
61601
61793
|
);
|
|
61602
61794
|
const lcmSessionKey = lcmSessionKeyForNamespace(writeNamespace, request.sessionKey, this.deps.orchestrator.config.defaultNamespace) ?? request.sessionKey;
|
|
@@ -61913,10 +62105,11 @@ var AccessObserveWriteSurface = class {
|
|
|
61913
62105
|
};
|
|
61914
62106
|
|
|
61915
62107
|
// src/access-recall-surface.ts
|
|
61916
|
-
import { createHash as
|
|
62108
|
+
import { createHash as createHash24 } from "crypto";
|
|
61917
62109
|
import * as nodePath2 from "path";
|
|
61918
62110
|
|
|
61919
62111
|
// src/access-recall-response.ts
|
|
62112
|
+
import { createHash as createHash23 } from "crypto";
|
|
61920
62113
|
async function assembleRecallResponse(deps, params) {
|
|
61921
62114
|
const {
|
|
61922
62115
|
request,
|
|
@@ -61935,7 +62128,8 @@ async function assembleRecallResponse(deps, params) {
|
|
|
61935
62128
|
budgetDecision,
|
|
61936
62129
|
budgetRecordPrincipal
|
|
61937
62130
|
} = params;
|
|
61938
|
-
const
|
|
62131
|
+
const storedSnapshot = request.sessionKey ? deps.orchestrator.lastRecall.get(request.sessionKey) : null;
|
|
62132
|
+
const snapshot = storedSnapshot && storedSnapshot.queryHash === createHash23("sha256").update(query).digest("hex") && Date.parse(storedSnapshot.recordedAt) >= startedAt ? storedSnapshot : null;
|
|
61939
62133
|
const effectiveNamespace = snapshot?.namespace ? deps.resolveNamespace(snapshot.namespace) : namespace;
|
|
61940
62134
|
const resultsReturned = snapshot?.memoryIds?.length ?? 0;
|
|
61941
62135
|
const appliedTopK = snapshot?.budgetsApplied?.appliedTopK;
|
|
@@ -61990,7 +62184,8 @@ async function assembleRecallResponse(deps, params) {
|
|
|
61990
62184
|
});
|
|
61991
62185
|
results = admitted;
|
|
61992
62186
|
const admittedIds = new Set(results.map((r) => r.id));
|
|
61993
|
-
const
|
|
62187
|
+
const secureStoreLocked = snapshot === null && resolveRecallAuxiliaryCapabilities(deps.orchestrator.config).secureStore && !deps.orchestrator.storage.isSecureStoreUnlocked();
|
|
62188
|
+
const droppedAny = beforeIds.some((id) => !admittedIds.has(id)) || snapshot === null && !secureStoreLocked && effectiveComposition.context.trim().length > 0;
|
|
61994
62189
|
if (droppedAny) {
|
|
61995
62190
|
const priorDegradation = effectiveComposition.degradation;
|
|
61996
62191
|
const filteredContext = results.map((result) => result.content || result.preview).filter((s) => s.length > 0).join("\n\n");
|
|
@@ -62108,7 +62303,7 @@ var AccessRecallSurface = class {
|
|
|
62108
62303
|
const snapshotForSerialization = {
|
|
62109
62304
|
sessionKey: options.sessionKey ?? "",
|
|
62110
62305
|
recordedAt: new Date(options.snapshot.capturedAt).toISOString(),
|
|
62111
|
-
queryHash:
|
|
62306
|
+
queryHash: createHash24("sha256").update(options.query).digest("hex"),
|
|
62112
62307
|
queryLen: options.query.length,
|
|
62113
62308
|
memoryIds,
|
|
62114
62309
|
namespace,
|
|
@@ -62410,13 +62605,16 @@ var AccessRecallSurface = class {
|
|
|
62410
62605
|
if (request.codingContext !== void 0 && request.sessionKey) {
|
|
62411
62606
|
this.deps.setCodingContext({
|
|
62412
62607
|
sessionKey: request.sessionKey,
|
|
62413
|
-
codingContext: request.codingContext
|
|
62608
|
+
codingContext: request.codingContext,
|
|
62609
|
+
authenticatedPrincipal: request.authenticatedPrincipal,
|
|
62610
|
+
remote: true
|
|
62414
62611
|
});
|
|
62415
62612
|
}
|
|
62416
62613
|
if (request.codingContext === void 0 && request.sessionKey) {
|
|
62417
62614
|
await this.deps.maybeAttachCodingContext(request.sessionKey, {
|
|
62418
62615
|
cwd: request.cwd,
|
|
62419
|
-
projectTag: request.projectTag
|
|
62616
|
+
projectTag: request.projectTag,
|
|
62617
|
+
authenticatedPrincipal: request.authenticatedPrincipal
|
|
62420
62618
|
});
|
|
62421
62619
|
}
|
|
62422
62620
|
const authenticatedPrincipal = request.authenticatedPrincipal?.trim();
|
|
@@ -62549,7 +62747,7 @@ var AccessRecallSurface = class {
|
|
|
62549
62747
|
},
|
|
62550
62748
|
onRecallPlanResolved: createRecallCorpusVersionCapture(this.deps.orchestrator, request.abortSignal, (versions) => {
|
|
62551
62749
|
storageCorpusVersionsAtRecallStart = mergeRecallCorpusVersions(storageCorpusVersionsAtRecallStart, versions);
|
|
62552
|
-
}, true),
|
|
62750
|
+
}, true, { deadlineMs: request.deadlineMs }),
|
|
62553
62751
|
...authenticatedPrincipal ? { principalOverride: authenticatedPrincipal } : {},
|
|
62554
62752
|
...request.sourceConnector ? { sourceConnector: request.sourceConnector } : {},
|
|
62555
62753
|
...request.stateView !== void 0 ? { stateView: request.stateView } : {},
|
|
@@ -62560,6 +62758,7 @@ var AccessRecallSurface = class {
|
|
|
62560
62758
|
...typeof request.queueWaitMs === "number" && request.queueWaitMs > 0 ? { queueWaitMs: request.queueWaitMs } : {}
|
|
62561
62759
|
};
|
|
62562
62760
|
if (request.searchOptions) recallOptions.searchOptions = request.searchOptions;
|
|
62761
|
+
if (request.deadlineMs !== void 0) recallOptions.deadlineMs = request.deadlineMs;
|
|
62563
62762
|
const startedAt = Date.now();
|
|
62564
62763
|
let reservedBudgetPrincipal = null;
|
|
62565
62764
|
let reservedBudget;
|
|
@@ -62837,10 +63036,10 @@ var AccessRecallSurface = class {
|
|
|
62837
63036
|
};
|
|
62838
63037
|
|
|
62839
63038
|
// src/review/review-deck-surface.ts
|
|
62840
|
-
import { createHash as
|
|
63039
|
+
import { createHash as createHash26 } from "crypto";
|
|
62841
63040
|
|
|
62842
63041
|
// src/review/review-deck-mutation.ts
|
|
62843
|
-
import { createHash as
|
|
63042
|
+
import { createHash as createHash25, randomUUID as randomUUID8 } from "crypto";
|
|
62844
63043
|
import fs11 from "fs";
|
|
62845
63044
|
import path62 from "path";
|
|
62846
63045
|
var ACTOR = "admin-console.review-deck";
|
|
@@ -62882,7 +63081,7 @@ var EVENT_TYPE = {
|
|
|
62882
63081
|
undo: "restored"
|
|
62883
63082
|
};
|
|
62884
63083
|
function sha256Hex(value) {
|
|
62885
|
-
return
|
|
63084
|
+
return createHash25("sha256").update(value, "utf8").digest("hex");
|
|
62886
63085
|
}
|
|
62887
63086
|
function computeReceiptId(namespace, principalDigest, idempotencyKey) {
|
|
62888
63087
|
return `rcp1:${sha256Hex(`${namespace}\0${principalDigest}\0${idempotencyKey}`)}`;
|
|
@@ -63353,7 +63552,7 @@ async function executeReviewDeckUndo(ctx, req) {
|
|
|
63353
63552
|
|
|
63354
63553
|
// src/review/review-deck-surface.ts
|
|
63355
63554
|
function digest(value) {
|
|
63356
|
-
return
|
|
63555
|
+
return createHash26("sha256").update(value).digest("hex");
|
|
63357
63556
|
}
|
|
63358
63557
|
var ReviewDeckSurface = class {
|
|
63359
63558
|
constructor(deps) {
|
|
@@ -64494,36 +64693,7 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
64494
64693
|
* clear.
|
|
64495
64694
|
*/
|
|
64496
64695
|
setCodingContext(request) {
|
|
64497
|
-
|
|
64498
|
-
if (!sessionKey) {
|
|
64499
|
-
throw new EngramAccessInputError("sessionKey is required for setCodingContext");
|
|
64500
|
-
}
|
|
64501
|
-
if (request.codingContext === null) {
|
|
64502
|
-
this.orchestrator.setCodingContextForSession(sessionKey, null);
|
|
64503
|
-
return;
|
|
64504
|
-
}
|
|
64505
|
-
const ctx = request.codingContext;
|
|
64506
|
-
if (!ctx || typeof ctx !== "object") {
|
|
64507
|
-
throw new EngramAccessInputError("codingContext must be an object or null");
|
|
64508
|
-
}
|
|
64509
|
-
if (typeof ctx.projectId !== "string" || ctx.projectId.trim().length === 0) {
|
|
64510
|
-
throw new EngramAccessInputError("codingContext.projectId must be a non-empty string");
|
|
64511
|
-
}
|
|
64512
|
-
if (typeof ctx.rootPath !== "string" || ctx.rootPath.trim().length === 0) {
|
|
64513
|
-
throw new EngramAccessInputError("codingContext.rootPath must be a non-empty string");
|
|
64514
|
-
}
|
|
64515
|
-
if (ctx.branch !== null && typeof ctx.branch !== "string") {
|
|
64516
|
-
throw new EngramAccessInputError("codingContext.branch must be a string or null");
|
|
64517
|
-
}
|
|
64518
|
-
if (ctx.defaultBranch !== null && typeof ctx.defaultBranch !== "string") {
|
|
64519
|
-
throw new EngramAccessInputError("codingContext.defaultBranch must be a string or null");
|
|
64520
|
-
}
|
|
64521
|
-
this.orchestrator.setCodingContextForSession(sessionKey, {
|
|
64522
|
-
projectId: ctx.projectId,
|
|
64523
|
-
branch: ctx.branch,
|
|
64524
|
-
rootPath: ctx.rootPath,
|
|
64525
|
-
defaultBranch: ctx.defaultBranch
|
|
64526
|
-
});
|
|
64696
|
+
setSessionCodingContext(this.orchestrator, request);
|
|
64527
64697
|
}
|
|
64528
64698
|
/**
|
|
64529
64699
|
* Auto-resolve and attach a coding context for a session when one is not
|
|
@@ -64543,14 +64713,22 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
64543
64713
|
if (!sessionKey) return;
|
|
64544
64714
|
if (!this.orchestrator.config.codingMode?.projectScope) return;
|
|
64545
64715
|
if (this.orchestrator.getCodingContextForSession(sessionKey)) return;
|
|
64716
|
+
const callerPrincipal = options.authenticatedPrincipal ?? this.orchestrator.getCodingContextOwnerForSession?.(sessionKey) ?? resolvePrincipal(sessionKey, this.orchestrator.config);
|
|
64546
64717
|
if (typeof options.projectTag === "string" && options.projectTag.trim().length > 0) {
|
|
64547
64718
|
const projectId = projectTagProjectId(options.projectTag);
|
|
64548
|
-
|
|
64549
|
-
|
|
64550
|
-
|
|
64551
|
-
|
|
64552
|
-
|
|
64553
|
-
|
|
64719
|
+
try {
|
|
64720
|
+
this.setCodingContext({
|
|
64721
|
+
sessionKey,
|
|
64722
|
+
codingContext: {
|
|
64723
|
+
projectId,
|
|
64724
|
+
branch: null,
|
|
64725
|
+
rootPath: projectId,
|
|
64726
|
+
defaultBranch: null
|
|
64727
|
+
},
|
|
64728
|
+
authenticatedPrincipal: callerPrincipal
|
|
64729
|
+
});
|
|
64730
|
+
} catch {
|
|
64731
|
+
}
|
|
64554
64732
|
return;
|
|
64555
64733
|
}
|
|
64556
64734
|
if (typeof options.cwd === "string" && options.cwd.trim().length > 0) {
|
|
@@ -64564,7 +64742,8 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
64564
64742
|
branch: gitCtx.branch,
|
|
64565
64743
|
rootPath: gitCtx.rootPath,
|
|
64566
64744
|
defaultBranch: gitCtx.defaultBranch
|
|
64567
|
-
}
|
|
64745
|
+
},
|
|
64746
|
+
authenticatedPrincipal: callerPrincipal
|
|
64568
64747
|
});
|
|
64569
64748
|
}
|
|
64570
64749
|
} catch {
|
|
@@ -64586,7 +64765,8 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
64586
64765
|
if (hasExplicitNamespace) return;
|
|
64587
64766
|
await this.maybeAttachCodingContext(request.sessionKey, {
|
|
64588
64767
|
cwd: request.cwd,
|
|
64589
|
-
projectTag: request.projectTag
|
|
64768
|
+
projectTag: request.projectTag,
|
|
64769
|
+
authenticatedPrincipal: request.authenticatedPrincipal
|
|
64590
64770
|
});
|
|
64591
64771
|
}
|
|
64592
64772
|
async recall(request) {
|
|
@@ -64594,8 +64774,10 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
64594
64774
|
if (query.length === 0) {
|
|
64595
64775
|
throw new EngramAccessInputError("query is required");
|
|
64596
64776
|
}
|
|
64777
|
+
const deadlineAtMs = resolveClientDeadlineAtMs(request.deadlineMs, Date.now());
|
|
64597
64778
|
const normalizedRequest = { ...request, query };
|
|
64598
|
-
|
|
64779
|
+
if (deadlineAtMs !== null) normalizedRequest.deadlineMs = deadlineAtMs;
|
|
64780
|
+
const { abortSignal: _abortSignal, deadlineMs: _deadlineMs, ...requestFingerprint } = normalizedRequest;
|
|
64599
64781
|
const authenticatedPrincipal = request.authenticatedPrincipal?.trim();
|
|
64600
64782
|
const principal = this.resolveRequestPrincipal(request.sessionKey, authenticatedPrincipal);
|
|
64601
64783
|
if (resolveNamespaceCapabilities(this.orchestrator.config).namespaces && !principal) {
|
|
@@ -66591,7 +66773,7 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
66591
66773
|
async offlineSyncSnapshot(options = {}) {
|
|
66592
66774
|
const resolvedNamespace = this.resolveReadableNamespace(options.namespace, options.principal);
|
|
66593
66775
|
const storage = await offlineSyncStorageForSnapshot(this.orchestrator, resolvedNamespace);
|
|
66594
|
-
const storageHash =
|
|
66776
|
+
const storageHash = createHash27("sha256").update(storage.dir).digest("hex").slice(0, 16);
|
|
66595
66777
|
const deletions = [...await storage.readDeletionRevisions()].map(([path63, mtimeMs]) => ({ path: path63, mtimeMs }));
|
|
66596
66778
|
const snapshotBuilder = options.includeContent === false && options.baseFiles && options.baseFiles.length > 0 ? buildOfflineSyncSnapshotFromBase : buildOfflineSyncSnapshot;
|
|
66597
66779
|
const snapshot = await snapshotBuilder({
|
|
@@ -66644,7 +66826,7 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
66644
66826
|
async offlineSyncFiles(options) {
|
|
66645
66827
|
const resolvedNamespace = this.resolveReadableNamespace(options.namespace, options.principal);
|
|
66646
66828
|
const storage = await offlineSyncStorageForSnapshot(this.orchestrator, resolvedNamespace);
|
|
66647
|
-
const storageHash =
|
|
66829
|
+
const storageHash = createHash27("sha256").update(storage.dir).digest("hex").slice(0, 16);
|
|
66648
66830
|
try {
|
|
66649
66831
|
const snapshot = await buildOfflineSyncSnapshotForPaths({
|
|
66650
66832
|
root: storage.dir,
|
|
@@ -66903,8 +67085,13 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
66903
67085
|
};
|
|
66904
67086
|
|
|
66905
67087
|
// src/access-recall-concurrency.ts
|
|
66906
|
-
function acquireRecallSlot(host, key, limit, signal) {
|
|
67088
|
+
function acquireRecallSlot(host, key, limit, signal, deadlineAtMs) {
|
|
66907
67089
|
const cap2 = Number.isFinite(limit) && limit > 0 ? limit : Infinity;
|
|
67090
|
+
if (deadlineAtMs != null && deadlineAtMs <= Date.now()) {
|
|
67091
|
+
return Promise.reject(
|
|
67092
|
+
new EngramAccessDeadlineExceededError("recall deadline exceeded while queued")
|
|
67093
|
+
);
|
|
67094
|
+
}
|
|
66908
67095
|
const sem = host.recallSemaphores.get(key) ?? { active: 0, waiters: [] };
|
|
66909
67096
|
host.recallSemaphores.set(key, sem);
|
|
66910
67097
|
const release = () => {
|
|
@@ -66924,18 +67111,33 @@ function acquireRecallSlot(host, key, limit, signal) {
|
|
|
66924
67111
|
}
|
|
66925
67112
|
const startedWaiting = Date.now();
|
|
66926
67113
|
return new Promise((resolve4, reject) => {
|
|
67114
|
+
let deadlineHandle = null;
|
|
67115
|
+
const removeWaiter = () => {
|
|
67116
|
+
const i = sem.waiters.indexOf(waiter);
|
|
67117
|
+
if (i >= 0) sem.waiters.splice(i, 1);
|
|
67118
|
+
if (deadlineHandle) clearTimeout(deadlineHandle);
|
|
67119
|
+
if (sem.active === 0 && sem.waiters.length === 0) {
|
|
67120
|
+
host.recallSemaphores.delete(key);
|
|
67121
|
+
}
|
|
67122
|
+
};
|
|
66927
67123
|
const waiter = {
|
|
66928
67124
|
take: () => {
|
|
67125
|
+
if (deadlineHandle) clearTimeout(deadlineHandle);
|
|
66929
67126
|
signal?.removeEventListener("abort", waiter.drop);
|
|
66930
67127
|
resolve4({ release, waitedMs: Date.now() - startedWaiting });
|
|
66931
67128
|
},
|
|
66932
67129
|
drop: () => {
|
|
66933
|
-
|
|
66934
|
-
if (i >= 0) sem.waiters.splice(i, 1);
|
|
66935
|
-
if (sem.active === 0 && sem.waiters.length === 0) {
|
|
66936
|
-
host.recallSemaphores.delete(key);
|
|
66937
|
-
}
|
|
67130
|
+
removeWaiter();
|
|
66938
67131
|
reject(abortError("operation aborted"));
|
|
67132
|
+
},
|
|
67133
|
+
// A client deadline expiring mid-queue degrades as a timeout, not
|
|
67134
|
+
// caller cancellation (#3514 review).
|
|
67135
|
+
expire: () => {
|
|
67136
|
+
removeWaiter();
|
|
67137
|
+
signal?.removeEventListener("abort", waiter.drop);
|
|
67138
|
+
reject(
|
|
67139
|
+
new EngramAccessDeadlineExceededError("recall deadline exceeded while queued")
|
|
67140
|
+
);
|
|
66939
67141
|
}
|
|
66940
67142
|
};
|
|
66941
67143
|
if (signal?.aborted) {
|
|
@@ -66943,14 +67145,17 @@ function acquireRecallSlot(host, key, limit, signal) {
|
|
|
66943
67145
|
return;
|
|
66944
67146
|
}
|
|
66945
67147
|
signal?.addEventListener("abort", waiter.drop, { once: true });
|
|
67148
|
+
if (deadlineAtMs != null) {
|
|
67149
|
+
deadlineHandle = setTimeout(waiter.expire, clientDeadlineTimerMs(deadlineAtMs, startedWaiting));
|
|
67150
|
+
}
|
|
66946
67151
|
sem.waiters.push(waiter);
|
|
66947
67152
|
});
|
|
66948
67153
|
}
|
|
66949
|
-
async function withRecallConcurrency(host, principal, signal, fn) {
|
|
67154
|
+
async function withRecallConcurrency(host, principal, signal, fn, deadlineAtMs) {
|
|
66950
67155
|
const key = principal || "__anonymous__";
|
|
66951
67156
|
const limit = host.orchestrator.config.recallMaxConcurrentPerPrincipal;
|
|
66952
67157
|
throwIfAborted(signal);
|
|
66953
|
-
const { release, waitedMs } = await acquireRecallSlot(host, key, limit, signal);
|
|
67158
|
+
const { release, waitedMs } = await acquireRecallSlot(host, key, limit, signal, deadlineAtMs);
|
|
66954
67159
|
try {
|
|
66955
67160
|
throwIfAborted(signal);
|
|
66956
67161
|
return await fn(waitedMs);
|
|
@@ -66982,15 +67187,46 @@ function attachFlightAbort(flight, signal, cancelOnAbort) {
|
|
|
66982
67187
|
settled = true;
|
|
66983
67188
|
flight.live -= 1;
|
|
66984
67189
|
if (cancelOnAbort && signal) signal.removeEventListener("abort", onAbort);
|
|
66985
|
-
if (flight.live === 0)
|
|
67190
|
+
if (flight.live === 0) {
|
|
67191
|
+
if (!flight.persisted || !flight.committed) flight.controller.abort();
|
|
67192
|
+
flight.onIdle?.();
|
|
67193
|
+
}
|
|
66986
67194
|
};
|
|
66987
67195
|
}
|
|
67196
|
+
function consumeWithinDeadline(flight, request, race) {
|
|
67197
|
+
const deadlineAtMs = resolveClientDeadlineAtMs(request.deadlineMs, Date.now());
|
|
67198
|
+
if (deadlineAtMs !== null && deadlineAtMs <= Date.now()) {
|
|
67199
|
+
return Promise.reject(
|
|
67200
|
+
new EngramAccessDeadlineExceededError("recall deadline exceeded while queued")
|
|
67201
|
+
);
|
|
67202
|
+
}
|
|
67203
|
+
const settle = race ? raceAbort(flight.promise, request.abortSignal) : flight.promise;
|
|
67204
|
+
if (deadlineAtMs === null) return settle;
|
|
67205
|
+
return new Promise((resolve4, reject) => {
|
|
67206
|
+
const timer = setTimeout(() => {
|
|
67207
|
+
if (!race && flight.committed) return;
|
|
67208
|
+
reject(
|
|
67209
|
+
new EngramAccessDeadlineExceededError("recall deadline exceeded while queued")
|
|
67210
|
+
);
|
|
67211
|
+
}, clientDeadlineTimerMs(deadlineAtMs, Date.now()));
|
|
67212
|
+
settle.then(
|
|
67213
|
+
(result) => {
|
|
67214
|
+
clearTimeout(timer);
|
|
67215
|
+
resolve4(result);
|
|
67216
|
+
},
|
|
67217
|
+
(err) => {
|
|
67218
|
+
clearTimeout(timer);
|
|
67219
|
+
reject(err);
|
|
67220
|
+
}
|
|
67221
|
+
);
|
|
67222
|
+
});
|
|
67223
|
+
}
|
|
66988
67224
|
async function consumeFlight(host, flight, request, recordBudget, race, cancelOnAbort = race) {
|
|
66989
67225
|
const detach = attachFlightAbort(flight, request.abortSignal, cancelOnAbort);
|
|
66990
67226
|
try {
|
|
66991
67227
|
let result;
|
|
66992
67228
|
try {
|
|
66993
|
-
result =
|
|
67229
|
+
result = await consumeWithinDeadline(flight, request, race);
|
|
66994
67230
|
} catch (err) {
|
|
66995
67231
|
if (!recordBudget) {
|
|
66996
67232
|
flight.promise.then(
|
|
@@ -67160,7 +67396,7 @@ async function leadRecallFlight(host, request, normalizedRequest, requestFingerp
|
|
|
67160
67396
|
const existing = host.recallInFlight.get(flightKey);
|
|
67161
67397
|
if (existing && !existing.controller.signal.aborted) {
|
|
67162
67398
|
throwIfAborted(request.abortSignal);
|
|
67163
|
-
const consumed2 = await consumeFlight(host, existing,
|
|
67399
|
+
const consumed2 = await consumeFlight(host, existing, normalizedRequest, true, race, true);
|
|
67164
67400
|
capturedReservation = consumed2.reservation;
|
|
67165
67401
|
if (keyed) {
|
|
67166
67402
|
if (existing.persisted) {
|
|
@@ -67174,14 +67410,18 @@ async function leadRecallFlight(host, request, normalizedRequest, requestFingerp
|
|
|
67174
67410
|
throwIfAborted(request.abortSignal);
|
|
67175
67411
|
const flight = createAndStartFlight(host, normalizedRequest, flightKey, principalKey, keyed);
|
|
67176
67412
|
ownedFlight = flight;
|
|
67177
|
-
const consumed = await consumeFlight(host, flight,
|
|
67413
|
+
const consumed = await consumeFlight(host, flight, normalizedRequest, false, race, true);
|
|
67178
67414
|
capturedReservation = consumed.reservation;
|
|
67179
67415
|
return consumed.response;
|
|
67180
67416
|
}
|
|
67181
67417
|
});
|
|
67182
67418
|
} catch (err) {
|
|
67183
67419
|
if (capturedReservation) host.budget.release(capturedReservation);
|
|
67184
|
-
|
|
67420
|
+
if (isAbortError(err) || err instanceof EngramAccessDeadlineExceededError) {
|
|
67421
|
+
ownedFlight?.persisted?.resolve();
|
|
67422
|
+
} else {
|
|
67423
|
+
ownedFlight?.persisted?.reject(err);
|
|
67424
|
+
}
|
|
67185
67425
|
throw err;
|
|
67186
67426
|
}
|
|
67187
67427
|
ownedFlight?.persisted?.resolve();
|
|
@@ -67195,34 +67435,64 @@ async function leadRecallFlight(host, request, normalizedRequest, requestFingerp
|
|
|
67195
67435
|
}
|
|
67196
67436
|
return response;
|
|
67197
67437
|
}
|
|
67198
|
-
function
|
|
67199
|
-
if (!
|
|
67200
|
-
|
|
67201
|
-
|
|
67202
|
-
principalKey,
|
|
67203
|
-
request.abortSignal,
|
|
67204
|
-
(queueWaitMs) => runRecallDirect(host, request, normalizedRequest, requestFingerprint, queueWaitMs)
|
|
67438
|
+
function degradedDeadlineRecallResponse(host, request) {
|
|
67439
|
+
if (request.disclosure !== void 0 && request.disclosure !== null && !isRecallDisclosure(request.disclosure)) {
|
|
67440
|
+
throw new EngramAccessInputError(
|
|
67441
|
+
`disclosure must be one of: chunk, section, raw (got: ${String(request.disclosure)})`
|
|
67205
67442
|
);
|
|
67206
67443
|
}
|
|
67207
|
-
const {
|
|
67208
|
-
|
|
67209
|
-
|
|
67210
|
-
|
|
67211
|
-
|
|
67212
|
-
|
|
67213
|
-
|
|
67214
|
-
|
|
67215
|
-
|
|
67216
|
-
|
|
67444
|
+
const composition = composeMissingMemoryContext({ detail: "timeout" });
|
|
67445
|
+
return {
|
|
67446
|
+
query: request.query,
|
|
67447
|
+
sessionKey: request.sessionKey,
|
|
67448
|
+
namespace: request.namespace?.trim() || host.orchestrator.config.defaultNamespace,
|
|
67449
|
+
context: composeRecallContext(composition),
|
|
67450
|
+
contextComposition: composition,
|
|
67451
|
+
retrievalFailure: { reason: "backend_unavailable", detail: "timeout" },
|
|
67452
|
+
count: 0,
|
|
67453
|
+
memoryIds: [],
|
|
67454
|
+
results: [],
|
|
67455
|
+
fallbackUsed: false,
|
|
67456
|
+
sourcesUsed: [],
|
|
67457
|
+
disclosure: request.disclosure ?? DEFAULT_RECALL_DISCLOSURE
|
|
67458
|
+
};
|
|
67459
|
+
}
|
|
67460
|
+
async function coordinateRecall(host, request, normalizedRequest, requestFingerprint, principalKey, singleFlight) {
|
|
67461
|
+
try {
|
|
67462
|
+
if (!singleFlight) {
|
|
67463
|
+
return await withRecallConcurrency(
|
|
67464
|
+
host,
|
|
67465
|
+
principalKey,
|
|
67466
|
+
request.abortSignal,
|
|
67467
|
+
(queueWaitMs) => runRecallDirect(host, request, normalizedRequest, requestFingerprint, queueWaitMs),
|
|
67468
|
+
resolveClientDeadlineAtMs(normalizedRequest.deadlineMs, Date.now())
|
|
67469
|
+
);
|
|
67470
|
+
}
|
|
67471
|
+
const { idempotencyKey: _flightKeyOmitIdemKey, ...flightFingerprint } = requestFingerprint;
|
|
67472
|
+
const flightKey = `${principalKey}\0${hashAccessIdempotencyPayload({
|
|
67473
|
+
operation: "recall",
|
|
67474
|
+
request: flightFingerprint
|
|
67475
|
+
})}`;
|
|
67476
|
+
const keyed = !!request.idempotencyKey?.trim();
|
|
67477
|
+
const existing = host.recallInFlight.get(flightKey);
|
|
67478
|
+
if (!keyed && existing && !existing.controller.signal.aborted) {
|
|
67479
|
+
throwIfAborted(request.abortSignal);
|
|
67480
|
+
return await followRecallFlight(host, existing, normalizedRequest);
|
|
67481
|
+
}
|
|
67482
|
+
return await leadRecallFlight(
|
|
67483
|
+
host,
|
|
67484
|
+
request,
|
|
67485
|
+
normalizedRequest,
|
|
67486
|
+
requestFingerprint,
|
|
67487
|
+
flightKey,
|
|
67488
|
+
principalKey
|
|
67489
|
+
);
|
|
67490
|
+
} catch (err) {
|
|
67491
|
+
if (err instanceof EngramAccessDeadlineExceededError) {
|
|
67492
|
+
return degradedDeadlineRecallResponse(host, normalizedRequest);
|
|
67493
|
+
}
|
|
67494
|
+
throw err;
|
|
67217
67495
|
}
|
|
67218
|
-
return leadRecallFlight(
|
|
67219
|
-
host,
|
|
67220
|
-
request,
|
|
67221
|
-
normalizedRequest,
|
|
67222
|
-
requestFingerprint,
|
|
67223
|
-
flightKey,
|
|
67224
|
-
principalKey
|
|
67225
|
-
);
|
|
67226
67496
|
}
|
|
67227
67497
|
|
|
67228
67498
|
export {
|
|
@@ -67643,4 +67913,4 @@ export {
|
|
|
67643
67913
|
EngramAccessService,
|
|
67644
67914
|
AccessAdminOpsSurface
|
|
67645
67915
|
};
|
|
67646
|
-
//# sourceMappingURL=chunk-
|
|
67916
|
+
//# sourceMappingURL=chunk-2FCZIWRI.js.map
|