@remnic/core 9.69.89 → 9.69.91
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 +68 -67
- package/dist/access-authorization-probe.js +69 -68
- package/dist/access-boundary.js +68 -67
- package/dist/access-cli.js +160 -158
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +68 -67
- package/dist/access-http-briefing.js +69 -68
- package/dist/access-http-query.js +70 -69
- package/dist/access-http.js +91 -90
- package/dist/access-identity-continuity-surface.js +68 -67
- package/dist/access-lcm-surface.js +68 -67
- package/dist/access-mcp-output-schemas.d.ts.map +1 -1
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.js +80 -79
- package/dist/access-memory-search-fanout.js +3 -3
- package/dist/access-namespace-preflight.js +68 -67
- package/dist/access-observe-write-category.js +7 -7
- package/dist/access-observe-write-surface.js +68 -67
- package/dist/access-offline-manifest.js +6 -6
- package/dist/access-operations-batch.js +70 -69
- package/dist/access-operations.js +77 -76
- package/dist/access-recall-concurrency.js +68 -67
- package/dist/access-recall-corpus-versions.d.ts +12 -0
- package/dist/access-recall-corpus-versions.d.ts.map +1 -0
- package/dist/access-recall-corpus-versions.js +10 -0
- package/dist/access-recall-diagnostics.js +5 -5
- package/dist/access-recall-response.d.ts +4 -0
- package/dist/access-recall-response.d.ts.map +1 -1
- package/dist/access-recall-response.js +68 -67
- package/dist/access-recall-surface.d.ts +8 -0
- package/dist/access-recall-surface.d.ts.map +1 -1
- package/dist/access-recall-surface.js +68 -67
- package/dist/access-schema.js +6 -6
- package/dist/access-service.d.ts +5 -0
- package/dist/access-service.d.ts.map +1 -1
- package/dist/access-service.js +68 -67
- package/dist/access-surface-catalog.js +70 -69
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/active-memory-bridge.js +3 -3
- package/dist/active-recall.js +23 -21
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-U5N3CB5Y.js → auto-sync-PAWBFQWL.js} +5 -5
- package/dist/briefing.js +19 -19
- package/dist/buffer.js +8 -8
- package/dist/calibration.js +2 -2
- package/dist/capabilities.d.ts +2 -1
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +1 -1
- package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/causal-consolidation.js +19 -19
- package/dist/{chunk-BMXEBWBT.js → chunk-2EMROIXS.js} +2 -1
- package/dist/{chunk-BMXEBWBT.js.map → chunk-2EMROIXS.js.map} +1 -1
- package/dist/{chunk-MCTM4YPL.js → chunk-2FLFJTCI.js} +4 -2
- package/dist/chunk-2FLFJTCI.js.map +1 -0
- package/dist/{chunk-RDJ6C7NZ.js → chunk-2IWBHZ3H.js} +5 -5
- package/dist/{chunk-UP75KL3L.js → chunk-2JRB3Z5N.js} +2 -2
- package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-KN6CIN7I.js → chunk-32HO62I4.js} +2 -2
- package/dist/{chunk-JLPNONPH.js → chunk-35A7GCHG.js} +2 -2
- package/dist/{chunk-EAQQ2FD3.js → chunk-37ZQYFX4.js} +6 -6
- package/dist/{chunk-3QKO4QN7.js → chunk-3BTHXB7Z.js} +2 -2
- package/dist/{chunk-C7V3KPKJ.js → chunk-47LTKAGL.js} +2 -2
- package/dist/{chunk-3O5BB45T.js → chunk-4DXNOVNW.js} +10 -10
- package/dist/{chunk-65I2LZEK.js → chunk-4G2YCKLT.js} +2 -2
- package/dist/{chunk-JBH26P62.js → chunk-4GEBLO7S.js} +10 -10
- package/dist/{chunk-6MNKDTDI.js → chunk-4I6PEEFA.js} +3 -3
- package/dist/{chunk-Z4TXB4K7.js → chunk-5BUCKFRE.js} +2 -2
- package/dist/{chunk-7D7OUO5W.js → chunk-5S7SNRSJ.js} +2 -2
- package/dist/{chunk-NOL7SEWN.js → chunk-5YR4UGF2.js} +5 -5
- package/dist/{chunk-PMNLL2TL.js → chunk-6BG364RN.js} +2 -2
- package/dist/{chunk-AEJ3TE5H.js → chunk-76LNUSS5.js} +2 -2
- package/dist/{chunk-7CRUDH7G.js → chunk-77HNHT6S.js} +2 -2
- package/dist/{chunk-OWYHHW67.js → chunk-7XI2UJHL.js} +4 -4
- package/dist/{chunk-BJVO4H5C.js → chunk-7Z2UKRNJ.js} +4 -4
- package/dist/{chunk-2WLMWP2T.js → chunk-A3K2KKSG.js} +2 -2
- package/dist/chunk-A5ZYP4K5.js +130 -0
- package/dist/chunk-A5ZYP4K5.js.map +1 -0
- package/dist/{chunk-NMZVDRVP.js → chunk-ACCOC6UM.js} +2 -2
- package/dist/{chunk-3JDA3XF5.js → chunk-AEGNDL24.js} +2 -2
- package/dist/{chunk-IYIBGSHJ.js → chunk-AEUMONCD.js} +2 -2
- package/dist/{chunk-RMDGAAZF.js → chunk-AF5PW35O.js} +2 -2
- package/dist/{chunk-JUT3OR2L.js → chunk-ANGZWYL2.js} +6 -6
- package/dist/{chunk-6LYAEM54.js → chunk-AXHU56C3.js} +2 -2
- package/dist/{chunk-YPI4RQWV.js → chunk-BCGMG2RD.js} +2 -2
- package/dist/{chunk-HXCJF4XU.js → chunk-BFIZXFUG.js} +2 -2
- package/dist/{chunk-DBYAY6UW.js → chunk-BTOHGPHC.js} +3 -3
- package/dist/{chunk-YSWJXOOL.js → chunk-CAKHZAXH.js} +2 -2
- package/dist/{chunk-YSBL7VPO.js → chunk-CDWFWOSZ.js} +2 -2
- package/dist/{chunk-VA4O3U7U.js → chunk-CZ44FH45.js} +4 -4
- package/dist/{chunk-T3FMRLWQ.js → chunk-D5HQ3VEX.js} +4 -4
- package/dist/{chunk-S7LWX2PQ.js → chunk-DPG5HQLE.js} +4 -4
- package/dist/{chunk-7WBSMXGC.js → chunk-DVSAMW5T.js} +3 -3
- package/dist/{chunk-WBYQA3VN.js → chunk-E5H4TM4Y.js} +3 -3
- package/dist/{chunk-4RL3JOB3.js → chunk-EEDI3OXB.js} +2 -2
- package/dist/{chunk-3TB2XQ3C.js → chunk-EUL3S3LE.js} +4 -4
- package/dist/{chunk-XAITGGX5.js → chunk-F23U5YE7.js} +4 -4
- package/dist/{chunk-IIARQTZ2.js → chunk-GDVORIFM.js} +2 -2
- package/dist/{chunk-CALBQ2NG.js → chunk-GXETU7AE.js} +79 -62
- package/dist/chunk-GXETU7AE.js.map +1 -0
- package/dist/{chunk-TPEZ2SHV.js → chunk-HCPUVB7S.js} +3 -3
- package/dist/{chunk-R3X2T2LP.js → chunk-HFOY2SBG.js} +2 -2
- package/dist/{chunk-JYM4Y6SO.js → chunk-HQCUUVG2.js} +19 -19
- package/dist/{chunk-ST2RQUXC.js → chunk-I6B3S62A.js} +2 -2
- package/dist/{chunk-RBITPCMK.js → chunk-IDSSDL4W.js} +9 -9
- package/dist/{chunk-B3OFQP5Y.js → chunk-IY47KPML.js} +6 -6
- package/dist/{chunk-AXC4WSF3.js → chunk-JDOBIFBK.js} +2 -2
- package/dist/{chunk-3AGHSQPM.js → chunk-JGXHQV5N.js} +3 -3
- package/dist/{chunk-7LNHRQKR.js → chunk-JLIGUFPF.js} +2 -2
- package/dist/{chunk-EDIH6X2P.js → chunk-JZ66PN72.js} +2 -2
- package/dist/{chunk-KTKHO3UI.js → chunk-KICEAGKM.js} +2 -2
- package/dist/{chunk-22LMCQ5B.js → chunk-KNI4SGQE.js} +118 -105
- package/dist/chunk-KNI4SGQE.js.map +1 -0
- package/dist/{chunk-BUKK5SWA.js → chunk-KQAFEZQX.js} +2 -2
- package/dist/{chunk-UQDC3W77.js → chunk-KTG23JDX.js} +2 -2
- package/dist/{chunk-3YD44CH2.js → chunk-KYOZ5E6V.js} +2 -2
- package/dist/{chunk-2FX374UI.js → chunk-L3TZXELN.js} +4 -4
- package/dist/{chunk-IKDRGVVJ.js → chunk-M3N2TUZ7.js} +2 -2
- package/dist/{chunk-76M5OK7V.js → chunk-M7T2NKET.js} +5 -5
- package/dist/{chunk-JZ4TJHR2.js → chunk-MZAH3CBT.js} +2 -2
- package/dist/{chunk-ZG5DWWKK.js → chunk-NJW2ZG64.js} +2 -2
- package/dist/{chunk-5STPRPE7.js → chunk-NSKXRTVZ.js} +2 -2
- package/dist/{chunk-4O4XCBOS.js → chunk-NUSQ3YEL.js} +2 -2
- package/dist/{chunk-SLEAJ67D.js → chunk-O57FCN42.js} +13 -13
- package/dist/{chunk-PULDSMCJ.js → chunk-OEBUAC3O.js} +10 -10
- package/dist/{chunk-Y23L4YJV.js → chunk-OEIA4IHU.js} +2 -2
- package/dist/{chunk-66DKTOBY.js → chunk-OGZC2WUX.js} +2 -2
- package/dist/{chunk-VHDKPGMG.js → chunk-P62DSJUK.js} +6 -6
- package/dist/{chunk-64ZUALXK.js → chunk-PH2V7EXZ.js} +2 -2
- package/dist/{chunk-KKNZ7PUZ.js → chunk-QAIKLICT.js} +2 -2
- package/dist/{chunk-SSUDD72S.js → chunk-QPWUG2S3.js} +2 -2
- package/dist/{chunk-QI2E6ISQ.js → chunk-R2TVWQLR.js} +2 -2
- package/dist/chunk-R2TVWQLR.js.map +1 -0
- package/dist/{chunk-AZIOEOK4.js → chunk-R36IBI2M.js} +3 -3
- package/dist/{chunk-MGZMC6WN.js → chunk-R5B3OWI4.js} +59 -59
- package/dist/{chunk-VL4X7ZHC.js → chunk-RFIJRZ4K.js} +2 -2
- package/dist/{chunk-PWF4JXKD.js → chunk-RKDSELA3.js} +1 -1
- package/dist/chunk-RKDSELA3.js.map +1 -0
- package/dist/{chunk-QZLCVO2V.js → chunk-RPVHRZ5C.js} +2 -2
- package/dist/{chunk-A6RVIHHK.js → chunk-RVBLCU5C.js} +4 -4
- package/dist/{chunk-BUQKSQXL.js → chunk-S533KGX6.js} +5 -5
- package/dist/{chunk-4HUCP4R4.js → chunk-SCPHU3RW.js} +7 -7
- package/dist/{chunk-RJLV4BKR.js → chunk-SFSD5Q6O.js} +3 -3
- package/dist/{chunk-QOXNTKXB.js → chunk-SMLKHXPF.js} +2 -2
- package/dist/{chunk-7QE46QXI.js → chunk-T7R5HI6A.js} +1 -1
- package/dist/{chunk-NJVR724O.js → chunk-TVQZAQPE.js} +2 -2
- package/dist/{chunk-H56VY4BY.js → chunk-U36GYZ2P.js} +10 -5
- package/dist/chunk-U36GYZ2P.js.map +1 -0
- package/dist/{chunk-XOV7NRY5.js → chunk-U46P4UAR.js} +3 -3
- package/dist/{chunk-DZ42MDZE.js → chunk-UCJINCZT.js} +2 -2
- package/dist/{chunk-WNRTXEWW.js → chunk-UG5V3Z3R.js} +7 -7
- package/dist/{chunk-IW3RMBPB.js → chunk-VAOC6GHN.js} +2 -2
- package/dist/{chunk-SZG4WFAG.js → chunk-VBNA2JEN.js} +2 -2
- package/dist/{chunk-J27JML5O.js → chunk-VOZNBQNL.js} +2 -2
- package/dist/{chunk-JB56XYHP.js → chunk-WHIGRW7T.js} +2 -2
- package/dist/{chunk-AZSGSRIM.js → chunk-WHTMVTU4.js} +3 -3
- package/dist/{chunk-AERXJCOG.js → chunk-WL7N5VGG.js} +5 -5
- package/dist/{chunk-TFA6HPOA.js → chunk-WQUGCOKF.js} +4 -4
- package/dist/{chunk-VDO32NLK.js → chunk-WTZQM74L.js} +5 -5
- package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-T2YX56QI.js → chunk-XWSUK5GL.js} +4 -4
- package/dist/{chunk-ACX55QDO.js → chunk-XYOT5GQU.js} +3 -3
- package/dist/{chunk-5FNZ3G6X.js → chunk-Y7427SL7.js} +7 -7
- package/dist/{chunk-FC52YWAO.js → chunk-YHZWVDP7.js} +2 -2
- package/dist/chunk-YVRQ5JRA.js +49 -0
- package/dist/chunk-YVRQ5JRA.js.map +1 -0
- package/dist/{chunk-DO4C4AXD.js → chunk-ZFTODDTX.js} +2 -2
- package/dist/{chunk-H36X4NRH.js → chunk-ZHXSOMYH.js} +2 -2
- package/dist/{chunk-FEIXG5FA.js → chunk-ZQTYWSO3.js} +2 -2
- package/dist/cli.js +119 -116
- package/dist/coding/export-okf-codegraph.js +17 -17
- package/dist/compounding/engine.js +19 -19
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -21
- package/dist/connectors/codex-materialize-runner.js +18 -18
- package/dist/connectors/index.js +20 -20
- package/dist/contradiction/index.js +3 -3
- package/dist/{contradiction-scan-TAGMOUQ2.js → contradiction-scan-GGRTVB7C.js} +3 -3
- package/dist/convergence-refresh.js +20 -20
- package/dist/conversation-index/backend.js +2 -2
- package/dist/corpus-watermark.js +20 -20
- package/dist/day-summary.js +2 -2
- package/dist/deep-recall-http-glue.js +7 -7
- package/dist/embedding-fallback.js +2 -2
- package/dist/entity-retrieval.js +19 -19
- package/dist/explicit-capture.js +2 -2
- package/dist/external-wiki-access.js +69 -68
- package/dist/extraction-judge.js +3 -3
- package/dist/extraction-normalization.js +3 -3
- package/dist/extraction-prompt.js +2 -2
- package/dist/extraction.js +32 -32
- package/dist/{first-start-migration-GAT7G733.js → first-start-migration-OM3PHMZO.js} +5 -5
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +196 -194
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.js +6 -6
- package/dist/local-llm-config.js +1 -1
- package/dist/local-llm.js +3 -3
- package/dist/location/index.js +20 -20
- package/dist/maintenance/memory-governance.js +18 -18
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +18 -18
- package/dist/maintenance/rebuild-memory-projection.js +19 -19
- package/dist/memory-browse-operations.js +69 -68
- package/dist/memory-browse.js +5 -5
- package/dist/namespaces/migrate.js +19 -19
- package/dist/namespaces/principal.js +2 -2
- package/dist/namespaces/search.js +13 -13
- package/dist/namespaces/storage.js +18 -18
- package/dist/offline-sync-impression-drain.js +5 -5
- package/dist/operator-doctor-corpus.js +21 -21
- package/dist/operator-toolkit.js +35 -33
- package/dist/orchestration/compression-guideline-coordinator.js +2 -2
- package/dist/orchestration/maintenance.js +33 -33
- package/dist/orchestration/orchestrator-helpers.d.ts +1 -0
- package/dist/orchestration/orchestrator-helpers.d.ts.map +1 -1
- package/dist/orchestration/recall-entry.d.ts.map +1 -1
- package/dist/orchestration/recall-search-pipeline.d.ts.map +1 -1
- package/dist/orchestrator.js +162 -160
- package/dist/outcome-boost-config.d.ts +17 -0
- package/dist/outcome-boost-config.d.ts.map +1 -0
- package/dist/outcome-boost-config.js +1 -0
- package/dist/outcome-boost-config.js.map +1 -0
- package/dist/qmd.js +4 -4
- 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-operations.js +69 -68
- package/dist/recall-navigation.js +68 -67
- package/dist/recall-state-view-admission.js +5 -5
- package/dist/recall-why-service.js +9 -9
- package/dist/recall-why.js +3 -3
- 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/rerank-outcome.d.ts +73 -0
- package/dist/rerank-outcome.d.ts.map +1 -0
- package/dist/rerank-outcome.js +28 -0
- package/dist/rerank-outcome.js.map +1 -0
- package/dist/{resolution-K4A3VPKZ.js → resolution-BROE3TRO.js} +4 -4
- package/dist/resolution-BROE3TRO.js.map +1 -0
- package/dist/resume-bundles.js +24 -22
- package/dist/search/embed-helper.js +2 -2
- package/dist/search/factory.js +12 -12
- package/dist/search/index.js +16 -16
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/orama-backend.js +2 -2
- package/dist/semantic-consolidation.js +19 -19
- package/dist/semantic-rule-promotion.js +18 -18
- package/dist/semantic-rule-verifier.js +18 -18
- package/dist/shared-context/manager.js +2 -2
- package/dist/source-agent-qualifier.js +26 -26
- package/dist/standup/build.js +18 -18
- package/dist/storage.js +17 -17
- package/dist/summarizer.js +4 -4
- package/dist/support-passport/index.js +71 -70
- package/dist/{tier-stats-VF6DS52E.js → tier-stats-M2FMMD2N.js} +2 -2
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/export-okf.js +18 -18
- package/dist/types.d.ts +4 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +18 -18
- package/dist/who-knows-cli.js +19 -19
- package/dist/who-knows.js +18 -18
- package/package.json +13 -3
- package/src/access-mcp-output-schemas.ts +2 -0
- package/src/access-recall-corpus-versions.ts +59 -0
- package/src/access-recall-response.ts +3 -0
- package/src/access-recall-surface.ts +22 -23
- package/src/access-service-observe-lcm-parity.test.ts +54 -21
- package/src/access-service-raw-excerpt-read-gate.test.ts +1 -1
- package/src/access-service.ts +3 -0
- package/src/capabilities.test.ts +1 -0
- package/src/capabilities.ts +6 -8
- package/src/config.ts +3 -0
- package/src/index.ts +1 -1
- package/src/orchestration/orchestrator-helpers.ts +1 -1
- package/src/orchestration/recall-entry.ts +32 -16
- package/src/orchestration/recall-internal.ts +2 -2
- package/src/orchestration/recall-search-pipeline.ts +3 -0
- package/src/orchestrator-init.test.ts +11 -1
- package/src/outcome-boost-config.ts +16 -0
- package/src/recall-retrieval-failure.test.ts +456 -4
- package/src/rerank-outcome.test.ts +218 -0
- package/src/rerank-outcome.ts +219 -0
- package/src/types.ts +3 -3
- package/dist/chunk-22LMCQ5B.js.map +0 -1
- package/dist/chunk-CALBQ2NG.js.map +0 -1
- package/dist/chunk-H56VY4BY.js.map +0 -1
- package/dist/chunk-MCTM4YPL.js.map +0 -1
- package/dist/chunk-PWF4JXKD.js.map +0 -1
- package/dist/chunk-QI2E6ISQ.js.map +0 -1
- /package/dist/{capsule-crypto-GWVG7LGC.js.map → access-recall-corpus-versions.js.map} +0 -0
- /package/dist/{auto-sync-U5N3CB5Y.js.map → auto-sync-PAWBFQWL.js.map} +0 -0
- /package/dist/{contradiction-scan-TAGMOUQ2.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-RDJ6C7NZ.js.map → chunk-2IWBHZ3H.js.map} +0 -0
- /package/dist/{chunk-UP75KL3L.js.map → chunk-2JRB3Z5N.js.map} +0 -0
- /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-KN6CIN7I.js.map → chunk-32HO62I4.js.map} +0 -0
- /package/dist/{chunk-JLPNONPH.js.map → chunk-35A7GCHG.js.map} +0 -0
- /package/dist/{chunk-EAQQ2FD3.js.map → chunk-37ZQYFX4.js.map} +0 -0
- /package/dist/{chunk-3QKO4QN7.js.map → chunk-3BTHXB7Z.js.map} +0 -0
- /package/dist/{chunk-C7V3KPKJ.js.map → chunk-47LTKAGL.js.map} +0 -0
- /package/dist/{chunk-3O5BB45T.js.map → chunk-4DXNOVNW.js.map} +0 -0
- /package/dist/{chunk-65I2LZEK.js.map → chunk-4G2YCKLT.js.map} +0 -0
- /package/dist/{chunk-JBH26P62.js.map → chunk-4GEBLO7S.js.map} +0 -0
- /package/dist/{chunk-6MNKDTDI.js.map → chunk-4I6PEEFA.js.map} +0 -0
- /package/dist/{chunk-Z4TXB4K7.js.map → chunk-5BUCKFRE.js.map} +0 -0
- /package/dist/{chunk-7D7OUO5W.js.map → chunk-5S7SNRSJ.js.map} +0 -0
- /package/dist/{chunk-NOL7SEWN.js.map → chunk-5YR4UGF2.js.map} +0 -0
- /package/dist/{chunk-PMNLL2TL.js.map → chunk-6BG364RN.js.map} +0 -0
- /package/dist/{chunk-AEJ3TE5H.js.map → chunk-76LNUSS5.js.map} +0 -0
- /package/dist/{chunk-7CRUDH7G.js.map → chunk-77HNHT6S.js.map} +0 -0
- /package/dist/{chunk-OWYHHW67.js.map → chunk-7XI2UJHL.js.map} +0 -0
- /package/dist/{chunk-BJVO4H5C.js.map → chunk-7Z2UKRNJ.js.map} +0 -0
- /package/dist/{chunk-2WLMWP2T.js.map → chunk-A3K2KKSG.js.map} +0 -0
- /package/dist/{chunk-NMZVDRVP.js.map → chunk-ACCOC6UM.js.map} +0 -0
- /package/dist/{chunk-3JDA3XF5.js.map → chunk-AEGNDL24.js.map} +0 -0
- /package/dist/{chunk-IYIBGSHJ.js.map → chunk-AEUMONCD.js.map} +0 -0
- /package/dist/{chunk-RMDGAAZF.js.map → chunk-AF5PW35O.js.map} +0 -0
- /package/dist/{chunk-JUT3OR2L.js.map → chunk-ANGZWYL2.js.map} +0 -0
- /package/dist/{chunk-6LYAEM54.js.map → chunk-AXHU56C3.js.map} +0 -0
- /package/dist/{chunk-YPI4RQWV.js.map → chunk-BCGMG2RD.js.map} +0 -0
- /package/dist/{chunk-HXCJF4XU.js.map → chunk-BFIZXFUG.js.map} +0 -0
- /package/dist/{chunk-DBYAY6UW.js.map → chunk-BTOHGPHC.js.map} +0 -0
- /package/dist/{chunk-YSWJXOOL.js.map → chunk-CAKHZAXH.js.map} +0 -0
- /package/dist/{chunk-YSBL7VPO.js.map → chunk-CDWFWOSZ.js.map} +0 -0
- /package/dist/{chunk-VA4O3U7U.js.map → chunk-CZ44FH45.js.map} +0 -0
- /package/dist/{chunk-T3FMRLWQ.js.map → chunk-D5HQ3VEX.js.map} +0 -0
- /package/dist/{chunk-S7LWX2PQ.js.map → chunk-DPG5HQLE.js.map} +0 -0
- /package/dist/{chunk-7WBSMXGC.js.map → chunk-DVSAMW5T.js.map} +0 -0
- /package/dist/{chunk-WBYQA3VN.js.map → chunk-E5H4TM4Y.js.map} +0 -0
- /package/dist/{chunk-4RL3JOB3.js.map → chunk-EEDI3OXB.js.map} +0 -0
- /package/dist/{chunk-3TB2XQ3C.js.map → chunk-EUL3S3LE.js.map} +0 -0
- /package/dist/{chunk-XAITGGX5.js.map → chunk-F23U5YE7.js.map} +0 -0
- /package/dist/{chunk-IIARQTZ2.js.map → chunk-GDVORIFM.js.map} +0 -0
- /package/dist/{chunk-TPEZ2SHV.js.map → chunk-HCPUVB7S.js.map} +0 -0
- /package/dist/{chunk-R3X2T2LP.js.map → chunk-HFOY2SBG.js.map} +0 -0
- /package/dist/{chunk-JYM4Y6SO.js.map → chunk-HQCUUVG2.js.map} +0 -0
- /package/dist/{chunk-ST2RQUXC.js.map → chunk-I6B3S62A.js.map} +0 -0
- /package/dist/{chunk-RBITPCMK.js.map → chunk-IDSSDL4W.js.map} +0 -0
- /package/dist/{chunk-B3OFQP5Y.js.map → chunk-IY47KPML.js.map} +0 -0
- /package/dist/{chunk-AXC4WSF3.js.map → chunk-JDOBIFBK.js.map} +0 -0
- /package/dist/{chunk-3AGHSQPM.js.map → chunk-JGXHQV5N.js.map} +0 -0
- /package/dist/{chunk-7LNHRQKR.js.map → chunk-JLIGUFPF.js.map} +0 -0
- /package/dist/{chunk-EDIH6X2P.js.map → chunk-JZ66PN72.js.map} +0 -0
- /package/dist/{chunk-KTKHO3UI.js.map → chunk-KICEAGKM.js.map} +0 -0
- /package/dist/{chunk-BUKK5SWA.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-UQDC3W77.js.map → chunk-KTG23JDX.js.map} +0 -0
- /package/dist/{chunk-3YD44CH2.js.map → chunk-KYOZ5E6V.js.map} +0 -0
- /package/dist/{chunk-2FX374UI.js.map → chunk-L3TZXELN.js.map} +0 -0
- /package/dist/{chunk-IKDRGVVJ.js.map → chunk-M3N2TUZ7.js.map} +0 -0
- /package/dist/{chunk-76M5OK7V.js.map → chunk-M7T2NKET.js.map} +0 -0
- /package/dist/{chunk-JZ4TJHR2.js.map → chunk-MZAH3CBT.js.map} +0 -0
- /package/dist/{chunk-ZG5DWWKK.js.map → chunk-NJW2ZG64.js.map} +0 -0
- /package/dist/{chunk-5STPRPE7.js.map → chunk-NSKXRTVZ.js.map} +0 -0
- /package/dist/{chunk-4O4XCBOS.js.map → chunk-NUSQ3YEL.js.map} +0 -0
- /package/dist/{chunk-SLEAJ67D.js.map → chunk-O57FCN42.js.map} +0 -0
- /package/dist/{chunk-PULDSMCJ.js.map → chunk-OEBUAC3O.js.map} +0 -0
- /package/dist/{chunk-Y23L4YJV.js.map → chunk-OEIA4IHU.js.map} +0 -0
- /package/dist/{chunk-66DKTOBY.js.map → chunk-OGZC2WUX.js.map} +0 -0
- /package/dist/{chunk-VHDKPGMG.js.map → chunk-P62DSJUK.js.map} +0 -0
- /package/dist/{chunk-64ZUALXK.js.map → chunk-PH2V7EXZ.js.map} +0 -0
- /package/dist/{chunk-KKNZ7PUZ.js.map → chunk-QAIKLICT.js.map} +0 -0
- /package/dist/{chunk-SSUDD72S.js.map → chunk-QPWUG2S3.js.map} +0 -0
- /package/dist/{chunk-AZIOEOK4.js.map → chunk-R36IBI2M.js.map} +0 -0
- /package/dist/{chunk-MGZMC6WN.js.map → chunk-R5B3OWI4.js.map} +0 -0
- /package/dist/{chunk-VL4X7ZHC.js.map → chunk-RFIJRZ4K.js.map} +0 -0
- /package/dist/{chunk-QZLCVO2V.js.map → chunk-RPVHRZ5C.js.map} +0 -0
- /package/dist/{chunk-A6RVIHHK.js.map → chunk-RVBLCU5C.js.map} +0 -0
- /package/dist/{chunk-BUQKSQXL.js.map → chunk-S533KGX6.js.map} +0 -0
- /package/dist/{chunk-4HUCP4R4.js.map → chunk-SCPHU3RW.js.map} +0 -0
- /package/dist/{chunk-RJLV4BKR.js.map → chunk-SFSD5Q6O.js.map} +0 -0
- /package/dist/{chunk-QOXNTKXB.js.map → chunk-SMLKHXPF.js.map} +0 -0
- /package/dist/{chunk-7QE46QXI.js.map → chunk-T7R5HI6A.js.map} +0 -0
- /package/dist/{chunk-NJVR724O.js.map → chunk-TVQZAQPE.js.map} +0 -0
- /package/dist/{chunk-XOV7NRY5.js.map → chunk-U46P4UAR.js.map} +0 -0
- /package/dist/{chunk-DZ42MDZE.js.map → chunk-UCJINCZT.js.map} +0 -0
- /package/dist/{chunk-WNRTXEWW.js.map → chunk-UG5V3Z3R.js.map} +0 -0
- /package/dist/{chunk-IW3RMBPB.js.map → chunk-VAOC6GHN.js.map} +0 -0
- /package/dist/{chunk-SZG4WFAG.js.map → chunk-VBNA2JEN.js.map} +0 -0
- /package/dist/{chunk-J27JML5O.js.map → chunk-VOZNBQNL.js.map} +0 -0
- /package/dist/{chunk-JB56XYHP.js.map → chunk-WHIGRW7T.js.map} +0 -0
- /package/dist/{chunk-AZSGSRIM.js.map → chunk-WHTMVTU4.js.map} +0 -0
- /package/dist/{chunk-AERXJCOG.js.map → chunk-WL7N5VGG.js.map} +0 -0
- /package/dist/{chunk-TFA6HPOA.js.map → chunk-WQUGCOKF.js.map} +0 -0
- /package/dist/{chunk-VDO32NLK.js.map → chunk-WTZQM74L.js.map} +0 -0
- /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-T2YX56QI.js.map → chunk-XWSUK5GL.js.map} +0 -0
- /package/dist/{chunk-ACX55QDO.js.map → chunk-XYOT5GQU.js.map} +0 -0
- /package/dist/{chunk-5FNZ3G6X.js.map → chunk-Y7427SL7.js.map} +0 -0
- /package/dist/{chunk-FC52YWAO.js.map → chunk-YHZWVDP7.js.map} +0 -0
- /package/dist/{chunk-DO4C4AXD.js.map → chunk-ZFTODDTX.js.map} +0 -0
- /package/dist/{chunk-H36X4NRH.js.map → chunk-ZHXSOMYH.js.map} +0 -0
- /package/dist/{chunk-FEIXG5FA.js.map → chunk-ZQTYWSO3.js.map} +0 -0
- /package/dist/{resolution-K4A3VPKZ.js.map → contradiction-scan-GGRTVB7C.js.map} +0 -0
- /package/dist/{first-start-migration-GAT7G733.js.map → first-start-migration-OM3PHMZO.js.map} +0 -0
- /package/dist/{tier-stats-VF6DS52E.js.map → tier-stats-M2FMMD2N.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/orchestration/orchestrator-helpers.ts"],"sourcesContent":["/**\n * Orchestrator module-level helpers — relocated from orchestrator.ts\n * (issue #1526, seam 25).\n *\n * Pure functions, types, and constants that previously lived at module\n * level in orchestrator.ts: recall-mode planning, recall snapshots and\n * parsers, abort/race helpers, artifact recall limits, replay\n * source-time slicing, day-summary date utilities, and QMD startup\n * checks. orchestrator.ts re-exports the previously-public names so\n * every existing importer (coordinators, tests, root shims) keeps\n * working unchanged.\n *\n * Behavior-preserving move — no logic changes.\n */\n\nimport { createHash } from \"node:crypto\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { abortError as sharedAbortError, throwIfAborted as sharedThrowIfAborted } from \"../abort-error.js\";\nimport type { CapabilitySet } from \"../capabilities.js\";\nimport { buildCompressionGuidelinesMarkdown as buildCompressionGuidelinesMarkdownV2 } from \"../compression-optimizer.js\";\nimport { FallbackLlmClient } from \"../fallback-llm.js\";\nimport { hasBroadGraphIntent, planRecallMode } from \"../intent.js\";\nimport { resolveLifecycleState } from \"../lifecycle.js\";\nimport { log } from \"../logger.js\";\nimport type { GraphRecallRankedResult, GraphRecallShadowComparison } from \"./graph-recall-coordinator.js\";\nimport { parseQmdExplain } from \"../qmd.js\";\nimport type { GraphRecallExpandedEntry } from \"../recall-state.js\";\nimport type { SearchDegradation } from \"../search/port.js\";\nimport type { RecallXrayServedBy } from \"../recall-xray.js\";\nimport type { RecallContextComposition } from \"../recall-context-composition.js\";\nimport { type BufferTurn, type MemoryActionEvent, type MemoryFile, type MemoryFrontmatter, type MemoryIntent, type PluginConfig, type QmdSearchResult, type RecallPlanMode, confidenceTier } from \"../types.js\";\nimport { categoryDirName } from \"../utils/category-dir.js\";\nimport { parseFlexibleIsoTimestamp } from \"../utils/iso-timestamp.js\";\n\n/** Freshness window for the artifact source status cache read by NamespaceReadFanoutCoordinator. */\nexport const ARTIFACT_STATUS_CACHE_TTL_MS = 60_000;\nexport interface BulkImportBatchIngestResult {\n attemptedTurnCount: number;\n extractionCount: number;\n persistedCount: number;\n durableOutputCount: number;\n skippedCount: number;\n failedCount: number;\n postPersistMetadataFailureCount: number;\n processedTurnCount: number;\n}\n\nexport class BulkImportBatchPartialFailureError extends Error {\n readonly partialResult: BulkImportBatchIngestResult;\n\n readonly originalError: unknown;\n\n constructor(\n message: string,\n partialResult: BulkImportBatchIngestResult,\n originalError: unknown,\n ) {\n super(message);\n this.name = \"BulkImportBatchPartialFailureError\";\n this.partialResult = partialResult;\n this.originalError = originalError;\n }\n}\n\nexport interface GraphRecallSnapshot {\n recordedAt: string;\n mode: RecallPlanMode | string;\n queryHash: string;\n queryLength: number;\n namespaces: string[];\n seedCount: number;\n expandedCount: number;\n seeds: string[];\n expanded: GraphRecallExpandedEntry[];\n status?: \"completed\" | \"skipped\" | \"aborted\";\n reason?: string;\n shadowMode?: boolean;\n queryIntent?: MemoryIntent;\n seedResults?: GraphRecallRankedResult[];\n finalResults?: GraphRecallRankedResult[];\n shadowComparison?: GraphRecallShadowComparison;\n}\n\nexport interface IntentDebugSnapshot {\n recordedAt: string;\n promptHash: string;\n promptLength: number;\n retrievalQueryHash: string;\n retrievalQueryLength: number;\n plannerEnabled: boolean;\n plannedMode: RecallPlanMode;\n effectiveMode: RecallPlanMode;\n recallResultLimit: number;\n queryIntent: MemoryIntent;\n graphExpandedIntentDetected: boolean;\n graphDecision: {\n status: \"not_requested\" | \"skipped\" | \"completed\" | \"aborted\";\n reason?: string;\n shadowMode: boolean;\n qmdAvailable: boolean;\n graphRecallEnabled: boolean;\n multiGraphMemoryEnabled: boolean;\n };\n}\n\nexport interface QmdRecallSnapshot {\n recordedAt: string;\n queryHash: string;\n queryLength: number;\n collection?: string;\n namespaces: string[];\n fetchLimit: number;\n primaryResultCount: number;\n hybridResultCount: number;\n queryAwareSeedCount: number;\n resultCount: number;\n intentHint?: string;\n explainEnabled: boolean;\n hybridTopUpUsed: boolean;\n hybridTopUpSkippedReason?: string;\n results: QmdSearchResult[];\n}\n\nexport interface RecallModeDecision {\n plannedMode: RecallPlanMode;\n effectiveMode: RecallPlanMode;\n graphExpandedIntentDetected: boolean;\n graphReason?: string;\n /**\n * Where `plannedMode` came from (issue #1367 / Option C). `\"heuristic\"` for\n * the regex planner; `\"llm\"` when the LLM planner classified it; and\n * `\"heuristic-fallback\"` when the LLM was enabled but errored/timed out and we\n * fell back. Absent on the synchronous heuristic-only path.\n */\n plannerSource?: \"heuristic\" | \"llm\" | \"heuristic-fallback\";\n /** Short rationale from the planner (for telemetry / x-ray). */\n plannerReason?: string;\n /** Wall-clock spent in the LLM planner call, when one was made. */\n plannerLatencyMs?: number;\n /** True when the LLM planner was enabled but fell back to the heuristic. */\n plannerFallbackUsed?: boolean;\n /** Model that served the LLM classification, when one was used. */\n plannerModelUsed?: string;\n /**\n * The regex-heuristic baseline mode, captured whenever the LLM planner ran\n * (any source). Lets operators compare planned-vs-heuristic during rollout —\n * distinct from `plannedMode`, which on the LLM path is the LLM's choice.\n */\n plannerHeuristicMode?: RecallPlanMode;\n /**\n * In shadow mode, the mode the LLM *would* have chosen (recorded for\n * comparison) while `effectiveMode` stays on the heuristic decision.\n */\n shadowLlmMode?: RecallPlanMode;\n}\n\n/**\n * Map the orchestrator's internal `recallSource` strings to the\n * X-ray `servedBy` vocabulary (issue #570 PR 1). The X-ray tier\n * ladder intentionally flattens QMD / embedding / cold-fallback to\n * the `hybrid` tier because they all materialize through the same\n * hybrid BM25+vector pipeline from the caller's perspective. The\n * `recent_scan` path gets its own dedicated tier because it bypasses\n * the hybrid pipeline entirely. `none` is treated as `hybrid` on the\n * theory that a query that returned nothing still routed through the\n * hybrid pipeline — but callers should normally gate capture on\n * `recalledMemoryIds.length > 0`.\n */\nexport function mapRecallSourceToXrayServedBy(\n source:\n | \"none\"\n | \"hot_qmd\"\n | \"hot_embedding\"\n | \"cold_fallback\"\n | \"recent_scan\",\n): RecallXrayServedBy {\n // Exhaustive switch: every current union member is explicitly\n // listed so TypeScript surfaces a compile error if a new source is\n // added without a deliberate mapping. The `never`-typed fallthrough\n // keeps the function total at runtime — if the caller passes an\n // unexpected value that slipped past the type system (e.g. a JSON\n // deserialization), we still fall back to `hybrid`.\n switch (source) {\n case \"recent_scan\":\n return \"recent-scan\";\n case \"hot_qmd\":\n case \"hot_embedding\":\n case \"cold_fallback\":\n case \"none\":\n return \"hybrid\";\n }\n const _exhaustive: never = source;\n void _exhaustive;\n return \"hybrid\";\n}\n\nexport interface RecallInvocationOptions {\n namespace?: string;\n topK?: number;\n mode?: RecallPlanMode;\n abortSignal?: AbortSignal;\n /** Server-resolved identity of the connector performing this recall. */\n sourceConnector?: string;\n /**\n * Capture a `RecallXraySnapshot` for this recall (issue #570). When\n * `true`, the orchestrator builds a snapshot from the data it has\n * already gathered and stashes it in memory, accessible via\n * `getLastXraySnapshot()`. When `false` or absent, nothing is\n * captured and recall behavior is unchanged (schema-only slice).\n */\n xrayCapture?: boolean;\n /**\n * Out-parameter receiving the backend degradations this recall observes\n * (#3033). Absent by default — behavior and allocations unchanged; the\n * diagnosis passes a sink to tell an outage from \"no matches\".\n */\n degradationSink?: SearchDegradation[];\n /**\n * Per-invocation override for `recallBudgetChars` (issue #570 PR 3/4).\n * Flows through `getRecallBudgetChars()` for this recall only — no\n * shared config mutation, so concurrent recalls on the same\n * orchestrator are not affected (CLAUDE.md rule 47: no shared\n * mutable state across async boundaries). Must be a non-negative\n * finite integer; non-conforming values are ignored and the\n * configured budget is used.\n */\n budgetCharsOverride?: number;\n /**\n * Per-invocation principal override (issue #570 PR 4). When set,\n * the orchestrator uses this principal for ACL / namespace checks\n * instead of `resolvePrincipal(sessionKey, config)`. This is the\n * escape hatch for access surfaces (HTTP / MCP) that have already\n * authenticated the caller upstream — threading an unmapped\n * principal through the session-key-based resolver would otherwise\n * collapse it to `\"default\"` and produce false denials in\n * namespace-enabled deployments (CLAUDE.md rule 42).\n */\n principalOverride?: string;\n /**\n * Historical recall point (issue #680). When set, the orchestrator\n * filters out memories whose `valid_at` is after this timestamp OR\n * whose `invalid_at` is at-or-before this timestamp, so callers see\n * the corpus as it existed at `asOf`. ISO 8601 string; comparisons\n * use `Date.parse()` so timezone-aware values round-trip correctly\n * (CLAUDE.md gotcha — never compare ISO strings lexicographically).\n * Invalid values must be rejected at input boundaries (CLAUDE.md\n * rule 51); the orchestrator does NOT silently fall back here.\n */\n asOf?: string;\n /**\n * Issue #681 — when `true`, bypasses `graphTraversalConfidenceFloor`\n * and includes edges below the floor in graph traversal. Useful for\n * diagnostic recall queries that need to surface results that would\n * normally be pruned by confidence decay. Default `false`.\n */\n includeLowConfidence?: boolean;\n /**\n * #1952 — per-call override enabling state-aware recall views for this\n * recall only (MCP `stateView` boolean). ORs with the `recallStateViews`\n * config flag; a change-intent query is still required for any effect.\n */\n stateView?: boolean;\n /**\n * User-aware context scopes active for this recall. Used by X-ray\n * provenance safety checks so boundary-scoped memories are evaluated\n * against the caller's real context.\n */\n currentContextScopes?: readonly unknown[];\n /**\n * Wall-clock ms the caller waited to begin execution — per-principal\n * semaphore queue + single-flight wait (issue #1906). Folded into\n * recall-timings additively as `queueWaitMs`; omitted phases are simply\n * absent, so existing timing consumers are unaffected.\n */\n queueWaitMs?: number;\n onContextComposition?: (composition: RecallContextComposition) => void | PromiseLike<void>;\n}\n\nexport type QueryAwarePrefilter = {\n candidatePaths: Set<string> | null;\n temporalFromDate: string | null;\n matchedTags: string[];\n expandedTags: string[];\n combination: \"none\" | \"temporal\" | \"tag\" | \"intersection\" | \"union\";\n filteredToFullSearch: boolean;\n};\n\n// Recall-specific abort helpers. Thin wrappers over the shared\n// `abort-error.ts` module so every abort in the codebase shares the\n// same `name === \"AbortError\"` classification contract (`isAbortError`\n// works uniformly). We keep the \"recall aborted\" default message for\n// back-compat with call-site logs; callers that pass an explicit\n// message (e.g. \"extraction aborted (before_extract)\") are unaffected.\nexport const abortRecallError = sharedAbortError;\n\nexport function throwIfRecallAborted(\n signal?: AbortSignal,\n message = \"recall aborted\",\n): void {\n sharedThrowIfAborted(signal, message);\n}\n\nexport async function raceRecallAbort<T>(\n promise: Promise<T>,\n signal?: AbortSignal,\n message = \"recall aborted\",\n): Promise<T> {\n throwIfRecallAborted(signal, message);\n if (!signal) return promise;\n\n let onAbort: (() => void) | null = null;\n const abortPromise = new Promise<T>((_resolve, reject) => {\n onAbort = () => reject(abortRecallError(message));\n signal.addEventListener(\"abort\", onAbort, { once: true });\n });\n\n try {\n return await Promise.race([promise, abortPromise]);\n } finally {\n if (onAbort) {\n signal.removeEventListener(\"abort\", onAbort);\n }\n }\n}\n\n/** Maximum age (ms) before a compaction-reset signal file is considered stale and removed. */\nexport const COMPACTION_SIGNAL_MAX_AGE_MS = 60 * 60 * 1000; // 1 hour\n\nexport const DEFAULT_QMD_STARTUP_COLLECTION_CHECK_TIMEOUT_MS = 10_000;\n\nexport type DaySummaryGatherOptions = {\n timeZone?: string;\n now?: Date;\n /** Opt-in location context (issue #2925); false/absent keeps output byte-identical. */\n includeLocation?: boolean;\n};\n\nexport function normalizeIanaTimeZone(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n if (!trimmed) return undefined;\n try {\n Intl.DateTimeFormat(undefined, { timeZone: trimmed });\n return trimmed;\n } catch {\n return undefined;\n }\n}\n\nexport function formatDateInTimeZone(date: Date, timeZone: string): string {\n const parts = new Intl.DateTimeFormat(\"en-US\", {\n timeZone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n }).formatToParts(date);\n const get = (type: string): string => parts.find((part) => part.type === type)?.value ?? \"\";\n return `${get(\"year\")}-${get(\"month\")}-${get(\"day\")}`;\n}\n\nexport function utcDateKey(date: Date): string {\n return date.toISOString().slice(0, 10);\n}\n\nexport function utcDateKeysAround(date: Date): string[] {\n const dayMs = 86_400_000;\n const keys = [\n utcDateKey(new Date(date.getTime() - dayMs)),\n utcDateKey(date),\n utcDateKey(new Date(date.getTime() + dayMs)),\n ];\n return keys.filter((value, index, array) => array.indexOf(value) === index);\n}\n\nexport function utcDateKeysForLocalDay(date: Date, timeZone: string): string[] {\n const targetLocalDate = formatDateInTimeZone(date, timeZone);\n const keys = new Set<string>();\n const hourMs = 3_600_000;\n const scanStart = date.getTime() - 48 * hourMs;\n const scanEnd = date.getTime() + 48 * hourMs;\n for (let ms = scanStart; ms <= scanEnd; ms += hourMs) {\n const candidate = new Date(ms);\n if (formatDateInTimeZone(candidate, timeZone) === targetLocalDate) {\n keys.add(utcDateKey(candidate));\n }\n }\n return keys.size > 0 ? [...keys].sort() : utcDateKeysAround(date);\n}\n\nexport function parseFiniteDate(value: unknown): Date | null {\n if (typeof value !== \"string\" || value.trim().length === 0) return null;\n const parsed = new Date(value);\n return Number.isFinite(parsed.getTime()) ? parsed : null;\n}\n\nexport function filterHourlySummaryMarkdownForLocalDay(\n raw: string,\n utcDate: string,\n timeZone: string,\n targetLocalDate: string,\n): string | null {\n const hourHeaderPattern = /^## ([01]\\d|2[0-3]):00[ \\t]*$/gm;\n const matches = Array.from(raw.matchAll(hourHeaderPattern));\n if (matches.length === 0) return null;\n\n const firstSectionStart = matches[0]?.index ?? 0;\n const preamble = raw.slice(0, firstSectionStart).trim();\n const sections: string[] = [];\n for (let index = 0; index < matches.length; index += 1) {\n const match = matches[index];\n const hour = match[1];\n if (!hour) continue;\n const sectionTimestamp = parseFiniteDate(`${utcDate}T${hour}:00:00.000Z`);\n if (\n !sectionTimestamp ||\n formatDateInTimeZone(sectionTimestamp, timeZone) !== targetLocalDate\n ) {\n continue;\n }\n const sectionStart = match.index ?? 0;\n const sectionEnd = matches[index + 1]?.index ?? raw.length;\n const section = raw.slice(sectionStart, sectionEnd).trim();\n if (section.length > 0) sections.push(section);\n }\n\n if (sections.length === 0) return null;\n return [preamble, ...sections]\n .filter((section) => section.length > 0)\n .join(\"\\n\\n\");\n}\n\nexport type SearchCollectionState = \"present\" | \"missing\" | \"unknown\" | \"skipped\";\n\nexport function qmdStartupCollectionCheckTimeoutMs(): number {\n const raw =\n process.env.REMNIC_QMD_STARTUP_COLLECTION_CHECK_TIMEOUT_MS ??\n process.env.ENGRAM_QMD_STARTUP_COLLECTION_CHECK_TIMEOUT_MS;\n if (raw === undefined) return DEFAULT_QMD_STARTUP_COLLECTION_CHECK_TIMEOUT_MS;\n const parsed = Number(raw);\n return Number.isFinite(parsed) && parsed >= 1_000\n ? Math.floor(parsed)\n : DEFAULT_QMD_STARTUP_COLLECTION_CHECK_TIMEOUT_MS;\n}\n\nexport async function qmdStartupCollectionCheckWithTimeout(\n promise: Promise<SearchCollectionState>,\n controller: AbortController,\n label: string,\n): Promise<SearchCollectionState> {\n const timeoutMs = qmdStartupCollectionCheckTimeoutMs();\n let timer: NodeJS.Timeout | undefined;\n let settled = false;\n\n const timeoutPromise = new Promise<SearchCollectionState>((resolve) => {\n timer = setTimeout(() => {\n if (settled) return;\n controller.abort();\n log.warn(\n `QMD startup collection check for ${label} timed out after ${timeoutMs}ms; keeping search enabled fail-open`,\n );\n resolve(\"unknown\");\n }, timeoutMs);\n timer.unref?.();\n });\n\n const checkedPromise = promise\n .catch((err): SearchCollectionState => {\n log.warn(\n `QMD startup collection check for ${label} failed; keeping search enabled fail-open: ${err}`,\n );\n return \"unknown\";\n })\n .finally(() => {\n settled = true;\n if (timer) clearTimeout(timer);\n });\n\n return await Promise.race([checkedPromise, timeoutPromise]);\n}\n\n/** Default workspace directory when no per-agent or config workspace is available. */\nexport function defaultWorkspaceDir(): string {\n return path.join(os.homedir(), \".openclaw\", \"workspace\");\n}\n\n/**\n * Produce a collision-resistant, filesystem-safe identifier from a session key.\n *\n * Session keys follow colon-delimited forms (e.g., `agent:gpucodebot:main`).\n * A naive replace (`:` → `_`) is lossy: different keys like `agent:alpha` and\n * `agent/alpha` would collide. Instead we append a short SHA-256 hash of the\n * original key to the human-readable sanitized prefix, guaranteeing uniqueness\n * while keeping filenames debuggable.\n *\n * Format: `<sanitized>-<12-char-hex-hash>`\n * Example: `agent:gpucodebot:main` → `agent_gpucodebot_main-a1b2c3d4e5f6`\n */\nexport function sanitizeSessionKeyForFilename(sessionKey: string): string {\n const readable = sessionKey.replace(/[^a-zA-Z0-9._-]/g, \"_\");\n const hash = createHash(\"sha256\")\n .update(sessionKey)\n .digest(\"hex\")\n .slice(0, 12);\n return `${readable}-${hash}`;\n}\n\nexport function sourceValidAtMs(turn: BufferTurn): number | null {\n if (typeof turn.sourceValidAt !== \"string\") return null;\n return parseFlexibleIsoTimestamp(turn.sourceValidAt.trim());\n}\n\nexport const SOURCE_VALID_AT_CONTEXT_TURNS = 2;\n\nexport function sourceValidAtSliceKey(turn: BufferTurn, index: number): string {\n const validAtMs = sourceValidAtMs(turn);\n return validAtMs === null ? `unknown:${index}` : String(validAtMs);\n}\n\nexport function asExtractionContextTurn(turn: BufferTurn): BufferTurn {\n return { ...turn, extractionContextOnly: true };\n}\n\nexport function asExtractionTargetTurn(turn: BufferTurn): BufferTurn {\n const { extractionContextOnly: _contextOnly, ...targetTurn } = turn;\n return targetTurn;\n}\n\nexport function sourceValidAtContextTurns(\n turns: readonly BufferTurn[],\n targetStart: number,\n targetEnd: number,\n targetValidAtMs: number | null,\n): BufferTurn[] {\n if (targetValidAtMs === null) return [];\n return turns\n .flatMap((turn, index) => {\n if (index >= targetStart && index < targetEnd) return [];\n const contextValidAtMs = sourceValidAtMs(turn);\n if (contextValidAtMs === null || contextValidAtMs > targetValidAtMs) {\n return [];\n }\n return [{ turn, index, validAtMs: contextValidAtMs }];\n })\n .sort((a, b) => {\n if (a.validAtMs < b.validAtMs) return -1;\n if (a.validAtMs > b.validAtMs) return 1;\n if (a.index === b.index) return 0;\n return a.index < b.index ? -1 : 1;\n })\n .slice(-SOURCE_VALID_AT_CONTEXT_TURNS)\n .map(({ turn }) => asExtractionContextTurn(turn));\n}\n\nexport function targetSourceValidAtSortMs(turns: readonly BufferTurn[]): number {\n let latestMs: number | null = null;\n for (const turn of turns) {\n if (turn.extractionContextOnly === true) continue;\n const validAtMs = sourceValidAtMs(turn);\n if (validAtMs === null) continue;\n if (latestMs === null || validAtMs > latestMs) {\n latestMs = validAtMs;\n }\n }\n return latestMs ?? Number.POSITIVE_INFINITY;\n}\n\nexport function sortSourceValidAtSlicesChronologically(\n slices: BufferTurn[][],\n): BufferTurn[][] {\n return slices\n .map((turns, order) => ({\n turns,\n order,\n targetValidAtMs: targetSourceValidAtSortMs(turns),\n }))\n .sort((a, b) => {\n if (a.targetValidAtMs < b.targetValidAtMs) return -1;\n if (a.targetValidAtMs > b.targetValidAtMs) return 1;\n if (a.order === b.order) return 0;\n return a.order < b.order ? -1 : 1;\n })\n .map((slice) => slice.turns);\n}\n\nexport function splitTurnsBySourceValidAt(\n turns: readonly BufferTurn[],\n options: { includeContext?: boolean } = {},\n): BufferTurn[][] {\n if (turns.length === 0) return [];\n if (!turns.some((turn) => sourceValidAtMs(turn) !== null)) {\n return [[...turns]];\n }\n\n const slices: BufferTurn[][] = [];\n let start = 0;\n while (start < turns.length) {\n const targetValidAtMs = sourceValidAtMs(turns[start]);\n const activeKey = sourceValidAtSliceKey(turns[start], start);\n let end = start + 1;\n while (\n end < turns.length &&\n sourceValidAtSliceKey(turns[end], end) === activeKey\n ) {\n end += 1;\n }\n\n const contextTurns =\n options.includeContext === false\n ? []\n : sourceValidAtContextTurns(turns, start, end, targetValidAtMs);\n slices.push([\n ...contextTurns,\n ...turns.slice(start, end).map(asExtractionTargetTurn),\n ]);\n start = end;\n }\n return sortSourceValidAtSlicesChronologically(slices);\n}\n\nexport function isArtifactMemoryPath(filePath: string): boolean {\n return /(?:^|[\\\\/])artifacts(?:[\\\\/]|$)/i.test(filePath);\n}\n\n/**\n * Meeting records (issue #1900) live at\n * `<root>/meetings/<YYYY-MM-DD>/mtg-<YYYY-MM-DD>-<hash>.md` — inside the QMD\n * collection root (full-text searchable) but NEVER surfaced through generic\n * recall, exactly like `artifacts/`. The predicate matches the FULL record\n * shape (anchored at the filename) rather than any `meetings` path segment, so\n * a namespaced deployment whose non-default namespace is literally named\n * `meetings` (`.../namespaces/meetings/facts/…`) keeps its ordinary memories in\n * recall — only true meeting records are excluded.\n */\nexport function isMeetingRecordPath(filePath: string): boolean {\n return /(?:^|[\\\\/])meetings[\\\\/]\\d{4}-\\d{2}-\\d{2}[\\\\/]mtg-\\d{4}-\\d{2}-\\d{2}-[0-9a-f]{8}\\.md$/i.test(filePath);\n}\n\n/** Exactly `activity/<YYYY-MM-DD>.md`, at the top level of a memory root. */\nconst ACTIVITY_DIGEST_TOPLEVEL = /^activity[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\n/** The digest FILE shape anywhere in a path (root-unaware best-effort). */\nconst ACTIVITY_DIGEST_ANYWHERE = /(?:^|[\\\\/])activity[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\n\n/**\n * Activity day-digests live at `<memoryRoot>/activity/<YYYY-MM-DD>.md` — a\n * dedicated searchable surface (explicit activity search), never generic recall.\n * Captured screen text must not auto-inject into ordinary prompts (issue #1899).\n * Keyed on the path (parseFrontmatter drops the digest's `kind` marker).\n *\n * Root-aware: when `memoryRoot` is given, the path is resolved relative to it and\n * must be the TOP-LEVEL `activity/<date>.md`, so an ordinary memory nested under\n * a category (e.g. `facts/proj/activity/<date>.md`) stays recallable. Without a\n * root, falls back to the digest file shape anywhere (best-effort).\n */\nexport function isActivityDigestPath(filePath: string, memoryRoot?: string): boolean {\n if (memoryRoot !== undefined && memoryRoot.length > 0) {\n const relative = path.relative(memoryRoot, path.resolve(memoryRoot, filePath));\n return ACTIVITY_DIGEST_TOPLEVEL.test(relative);\n }\n return ACTIVITY_DIGEST_ANYWHERE.test(filePath);\n}\n\n/** Exactly `locations/<YYYY-MM-DD>.md`, at the top level of a memory root. */\nconst LOCATION_DAY_TOPLEVEL = /^locations[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\n/** The day-file shape anywhere in a path (root-unaware best-effort). */\nconst LOCATION_DAY_ANYWHERE = /(?:^|[\\\\/])locations[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\n\n/**\n * Location day documents (issue #2044) live at\n * `<memoryRoot>/locations/<YYYY-MM-DD>.md` — a dedicated searchable surface,\n * never generic recall (place history must not auto-inject into ordinary\n * prompts). Root-aware exactly like `isActivityDigestPath`: with a root, only\n * the top-level `locations/<date>.md` matches, so an ordinary memory nested\n * under a category (e.g. `facts/locations-note.md`) stays recallable; without\n * a root, falls back to the day-file shape anywhere (best-effort).\n */\nexport function isLocationDayPath(filePath: string, memoryRoot?: string): boolean {\n if (memoryRoot !== undefined && memoryRoot.length > 0) {\n const relative = path.relative(memoryRoot, path.resolve(memoryRoot, filePath));\n return LOCATION_DAY_TOPLEVEL.test(relative);\n }\n return LOCATION_DAY_ANYWHERE.test(filePath);\n}\n\nexport function buildCompressionGuidelinesMarkdown(\n events: MemoryActionEvent[],\n generatedAtIso: string = new Date().toISOString(),\n): string {\n return buildCompressionGuidelinesMarkdownV2(events, generatedAtIso);\n}\n\n\nexport function applyQueryAwareCandidateFilter(\n candidates: QmdSearchResult[],\n candidatePaths: Set<string> | null,\n): QmdSearchResult[] {\n if (!candidatePaths) return candidates;\n if (candidatePaths.size === 0) return [];\n const filtered = candidates.filter((candidate) =>\n candidatePaths.has(candidate.path),\n );\n return filtered.length > 0 ? filtered : candidates;\n}\n\nexport function tokenizeRecallQuery(prompt: string): string[] {\n return prompt\n .toLowerCase()\n .split(/[^a-z0-9]+/i)\n .map((t) => t.trim())\n .filter((t) => t.length >= 3);\n}\n\nexport function hasLifecycleMetadata(frontmatter: MemoryFrontmatter): boolean {\n return (\n frontmatter.lifecycleState !== undefined ||\n frontmatter.verificationState !== undefined ||\n frontmatter.policyClass !== undefined ||\n frontmatter.lastValidatedAt !== undefined ||\n frontmatter.decayScore !== undefined ||\n frontmatter.heatScore !== undefined\n );\n}\n\nexport function shouldFilterLifecycleRecallCandidate(\n frontmatter: MemoryFrontmatter,\n options: {\n lifecyclePolicyEnabled: boolean;\n lifecycleFilterStaleEnabled: boolean;\n },\n): boolean {\n if (!options.lifecyclePolicyEnabled || !options.lifecycleFilterStaleEnabled)\n return false;\n if (!hasLifecycleMetadata(frontmatter)) return false;\n const lifecycleState = resolveLifecycleState(frontmatter);\n return lifecycleState === \"stale\" || lifecycleState === \"archived\";\n}\n\nexport function lifecycleRecallScoreAdjustment(\n frontmatter: MemoryFrontmatter,\n options: {\n lifecyclePolicyEnabled: boolean;\n },\n): number {\n if (!options.lifecyclePolicyEnabled) return 0;\n if (!hasLifecycleMetadata(frontmatter)) return 0;\n\n let delta = 0;\n const lifecycleState = resolveLifecycleState(frontmatter);\n switch (lifecycleState) {\n case \"active\":\n delta += 0.05;\n break;\n case \"validated\":\n delta += 0.03;\n break;\n case \"candidate\":\n delta -= 0.01;\n break;\n case \"stale\":\n delta -= 0.06;\n break;\n case \"archived\":\n delta -= 0.08;\n break;\n }\n if (frontmatter.verificationState === \"disputed\") {\n delta -= 0.12;\n }\n return delta;\n}\n\nexport function computeArtifactRecallLimit(\n recallMode: RecallPlanMode,\n recallResultLimit: number,\n verbatimArtifactsMaxRecall: number,\n): number {\n if (recallMode === \"no_recall\") return 0;\n if (Math.max(0, recallResultLimit) === 0) return 0;\n const base = Math.max(0, verbatimArtifactsMaxRecall);\n if (recallMode === \"minimal\") {\n return Math.min(base, Math.max(0, recallResultLimit));\n }\n return base;\n}\n\nexport function resolveEffectiveRecallMode(options: {\n plannerEnabled: boolean;\n graphRecallEnabled: boolean;\n multiGraphMemoryEnabled: boolean;\n graphExpandedIntentEnabled?: boolean;\n prompt: string;\n}): RecallPlanMode {\n return resolveRecallModeDecision(options).effectiveMode;\n}\n\nexport interface RecallModeGraphOptions {\n plannerEnabled: boolean;\n graphRecallEnabled: boolean;\n multiGraphMemoryEnabled: boolean;\n graphExpandedIntentEnabled?: boolean;\n prompt: string;\n}\n\n/**\n * Apply the graph-mode overlay + gating to a planner-produced mode.\n *\n * Shared by the heuristic ({@link resolveRecallModeDecision}) and LLM\n * ({@link resolveRecallModeDecisionAsync}) paths so graph promotion and the\n * \"graph disabled → fall back to full\" gating behave identically regardless of\n * which planner produced `plannedModeRaw` (gotcha #39).\n */\nexport function finalizeRecallModeDecision(\n plannedModeRaw: RecallPlanMode,\n options: RecallModeGraphOptions,\n): RecallModeDecision {\n let plannedMode: RecallPlanMode = plannedModeRaw;\n const graphExpandedIntentDetected =\n options.plannerEnabled &&\n options.graphExpandedIntentEnabled === true &&\n hasBroadGraphIntent(options.prompt);\n if (plannedMode !== \"graph_mode\" && graphExpandedIntentDetected) {\n plannedMode = \"graph_mode\";\n }\n if (\n plannedMode === \"graph_mode\" &&\n (!options.graphRecallEnabled || !options.multiGraphMemoryEnabled)\n ) {\n return {\n plannedMode,\n effectiveMode: \"full\",\n graphExpandedIntentDetected,\n graphReason: !options.graphRecallEnabled\n ? \"graph recall disabled by config\"\n : \"multi-graph memory disabled by config\",\n };\n }\n return {\n plannedMode,\n effectiveMode: plannedMode,\n graphExpandedIntentDetected,\n };\n}\n\nexport function resolveRecallModeDecision(options: RecallModeGraphOptions): RecallModeDecision {\n const plannedMode: RecallPlanMode = options.plannerEnabled\n ? planRecallMode(options.prompt)\n : \"full\";\n return finalizeRecallModeDecision(plannedMode, options);\n}\n\n/**\n * Async recall-mode decision with optional LLM-based planning (issue #1367 /\n * Option C). Falls back to the heuristic decision when the LLM planner is\n * disabled, in shadow mode, or unavailable/failed — so this is always safe to\n * await on the recall hot path. Provider-agnostic: the LLM call routes through\n * the gateway/fallback chain.\n *\n * `recallPlannerEnabled === false` keeps the legacy \"always full\" behavior and\n * skips the LLM entirely (the planner as a whole is off).\n */\nexport async function resolveRecallModeDecisionAsync(\n options: RecallModeGraphOptions & {\n config: PluginConfig;\n /**\n * Recall-operation capability gates (issue #1523). REQUIRED: the recall\n * orchestrator always passes a resolved set — the LLM planner gate reads\n * `caps.recallPlannerLlm`, never re-derives from config.\n */\n caps: CapabilitySet;\n hints?: string[];\n llm?: FallbackLlmClient;\n signal?: AbortSignal;\n },\n): Promise<RecallModeDecision> {\n const heuristicDecision = resolveRecallModeDecision(options);\n\n // Planner globally off, or LLM planning not opted into → heuristic only.\n // Read the resolved capability (issue #1523) — never re-derive from config.\n const plannerLlmEnabled = options.caps.recallPlannerLlm;\n if (!options.plannerEnabled || !plannerLlmEnabled) {\n return heuristicDecision;\n }\n\n const { planRecallModeLLM } = await import(\"../recall-planner-llm.js\");\n const planned = await planRecallModeLLM(\n options.prompt,\n options.hints,\n options.config,\n options.caps,\n options.llm,\n options.signal,\n );\n\n // Shadow mode: record what the LLM would have chosen but keep the heuristic\n // effective decision (safe rollout / comparison — gotcha #30).\n if (options.config.recallPlannerShadowMode) {\n return {\n ...heuristicDecision,\n plannerSource: planned.source,\n plannerReason: `shadow:${planned.reason}`,\n plannerLatencyMs: planned.latencyMs,\n plannerFallbackUsed: planned.fallbackUsed,\n plannerModelUsed: planned.modelUsed,\n plannerHeuristicMode: planned.heuristicMode,\n shadowLlmMode: planned.mode,\n };\n }\n\n const llmDecision = finalizeRecallModeDecision(planned.mode, options);\n return {\n ...llmDecision,\n plannerSource: planned.source,\n plannerReason: planned.reason,\n plannerLatencyMs: planned.latencyMs,\n plannerFallbackUsed: planned.fallbackUsed,\n plannerModelUsed: planned.modelUsed,\n plannerHeuristicMode: planned.heuristicMode,\n };\n}\n\nexport function computeArtifactCandidateFetchLimit(\n targetCount: number,\n): number {\n const cappedTarget = Math.max(0, targetCount);\n if (cappedTarget === 0) return 0;\n const headroom = Math.max(8, cappedTarget * 4);\n return Math.min(200, cappedTarget + headroom);\n}\n\nexport function computeQmdHybridFetchLimit(\n recallFetchLimit: number,\n artifactsEnabled: boolean,\n maxArtifactRecall: number,\n): number {\n const cappedRecallLimit = Math.max(0, recallFetchLimit);\n if (cappedRecallLimit === 0) return 0;\n if (!artifactsEnabled) return cappedRecallLimit;\n // Overscan when artifacts are enabled, then filter artifact paths before\n // re-applying the recall cap to avoid artifact-dominated top-N starvation.\n const artifactHeadroom = Math.max(20, Math.max(0, maxArtifactRecall) * 8);\n return Math.min(400, cappedRecallLimit + artifactHeadroom);\n}\n\nexport function summarizeGraphShadowComparison(\n baseline: QmdSearchResult[],\n merged: QmdSearchResult[],\n topN: number,\n): {\n baselineCount: number;\n graphCount: number;\n overlapCount: number;\n overlapRatio: number;\n averageOverlapDelta: number;\n} {\n const limit = Math.max(0, Math.floor(topN));\n const baselineTop = limit > 0 ? baseline.slice(0, limit) : [];\n const graphTop = limit > 0 ? merged.slice(0, limit) : [];\n const baselineByPath = new Map(\n baselineTop.map((item) => [item.path, item.score]),\n );\n const graphByPath = new Map(graphTop.map((item) => [item.path, item.score]));\n\n let overlapCount = 0;\n let overlapDeltaSum = 0;\n for (const [p, baselineScore] of baselineByPath.entries()) {\n const graphScore = graphByPath.get(p);\n if (typeof graphScore !== \"number\") continue;\n overlapCount += 1;\n overlapDeltaSum += graphScore - baselineScore;\n }\n\n const baselineCount = baselineTop.length;\n return {\n baselineCount,\n graphCount: graphTop.length,\n overlapCount,\n overlapRatio: baselineCount > 0 ? overlapCount / baselineCount : 0,\n averageOverlapDelta: overlapCount > 0 ? overlapDeltaSum / overlapCount : 0,\n };\n}\n\nexport function parseGraphRecallRankedResults(\n value: unknown,\n): GraphRecallRankedResult[] {\n if (!Array.isArray(value)) return [];\n const parsed: GraphRecallRankedResult[] = [];\n for (const entry of value) {\n if (!entry || typeof entry !== \"object\") continue;\n const candidate = entry as Partial<GraphRecallRankedResult>;\n if (\n typeof candidate.path !== \"string\" ||\n typeof candidate.score !== \"number\"\n )\n continue;\n parsed.push({\n path: candidate.path,\n score: candidate.score,\n docid: typeof candidate.docid === \"string\" ? candidate.docid : undefined,\n sourceLabels: Array.isArray(candidate.sourceLabels)\n ? candidate.sourceLabels.filter(\n (item): item is string => typeof item === \"string\",\n )\n : [],\n });\n }\n return parsed.slice(0, 64);\n}\n\nexport function parseMemoryIntentSnapshot(value: unknown): MemoryIntent {\n const candidate =\n value && typeof value === \"object\" ? (value as Partial<MemoryIntent>) : {};\n return {\n goal: typeof candidate.goal === \"string\" ? candidate.goal : \"unknown\",\n actionType:\n typeof candidate.actionType === \"string\"\n ? candidate.actionType\n : \"unknown\",\n entityTypes: Array.isArray(candidate.entityTypes)\n ? candidate.entityTypes.filter(\n (item): item is string => typeof item === \"string\",\n )\n : [],\n taskInitiation: candidate.taskInitiation === true,\n };\n}\n\nexport function buildQmdIntentHint(intent: MemoryIntent): string | undefined {\n const parts: string[] = [];\n if (intent.goal !== \"unknown\") {\n parts.push(`goal:${intent.goal.replace(/_/g, \" \")}`);\n }\n if (intent.actionType !== \"unknown\") {\n parts.push(`action:${intent.actionType.replace(/_/g, \" \")}`);\n }\n if (intent.entityTypes.length > 0) {\n parts.push(`entities:${intent.entityTypes.join(\",\")}`);\n }\n if (intent.taskInitiation === true) {\n parts.push(\"task_initiation\");\n }\n return parts.length > 0 ? parts.join(\" \") : undefined;\n}\n\nexport function parseQmdRecallResults(value: unknown): QmdSearchResult[] {\n if (!Array.isArray(value)) return [];\n const parsed: QmdSearchResult[] = [];\n for (const entry of value) {\n if (!entry || typeof entry !== \"object\") continue;\n const candidate = entry as Partial<QmdSearchResult>;\n if (\n typeof candidate.path !== \"string\" ||\n typeof candidate.score !== \"number\"\n )\n continue;\n parsed.push({\n docid: typeof candidate.docid === \"string\" ? candidate.docid : \"\",\n path: candidate.path,\n snippet: typeof candidate.snippet === \"string\" ? candidate.snippet : \"\",\n score: candidate.score,\n explain: parseQmdExplain(candidate.explain),\n transport:\n candidate.transport === \"daemon\" ||\n candidate.transport === \"subprocess\" ||\n candidate.transport === \"hybrid\" ||\n candidate.transport === \"scoped_prefilter\"\n ? candidate.transport\n : undefined,\n });\n }\n return parsed.slice(0, 32);\n}\n\nexport function mergeArtifactRecallCandidates(\n candidatesByNamespace: MemoryFile[][],\n limit: number,\n): MemoryFile[] {\n const cappedLimit = Math.max(0, limit);\n if (cappedLimit === 0) return [];\n\n const out: MemoryFile[] = [];\n const seen = new Set<string>();\n let offset = 0;\n while (out.length < cappedLimit) {\n let hasAnyCandidateAtOffset = false;\n for (const list of candidatesByNamespace) {\n if (offset >= list.length) continue;\n hasAnyCandidateAtOffset = true;\n const item = list[offset];\n const dedupeKey = `${item.frontmatter.id}:${item.frontmatter.sourceMemoryId ?? \"\"}:${item.content}`;\n if (seen.has(dedupeKey)) continue;\n seen.add(dedupeKey);\n out.push(item);\n if (out.length >= cappedLimit) break;\n }\n if (!hasAnyCandidateAtOffset) break;\n offset += 1;\n }\n return out;\n}\n\nexport function resolveRecentThreadMemoryPaths(options: {\n threadEpisodeIds: string[];\n currentMemoryId: string;\n allMemsForGraph: MemoryFile[] | null | undefined;\n pathById?: Map<string, string>;\n storageDir: string;\n maxRecent: number;\n}): string[] {\n const maxRecent = Math.max(0, options.maxRecent);\n if (options.threadEpisodeIds.length === 0 || maxRecent === 0) return [];\n const pathById =\n options.pathById ??\n buildMemoryPathById(options.allMemsForGraph, options.storageDir);\n if (pathById.size === 0) return [];\n\n // #1635 (defensive): skip pending_review ids from legacy episode sets.\n const pendingReviewIds = new Set<string>(\n (options.allMemsForGraph ?? [])\n .filter((m) => m.frontmatter.status === \"pending_review\" && m.frontmatter.id)\n .map((m) => m.frontmatter.id as string),\n );\n\n return options.threadEpisodeIds\n .filter((id) => id !== options.currentMemoryId)\n .filter((id) => !pendingReviewIds.has(id))\n .slice(-maxRecent)\n .map((id) => pathById.get(id))\n .filter((p): p is string => typeof p === \"string\" && p.length > 0);\n}\n\nexport function buildMemoryPathById(\n allMemsForGraph: MemoryFile[] | null | undefined,\n storageDir: string,\n): Map<string, string> {\n const pathById = new Map<string, string>();\n for (const mem of allMemsForGraph ?? []) {\n const id = mem.frontmatter.id;\n if (!id) continue;\n pathById.set(id, path.relative(storageDir, mem.path));\n }\n return pathById;\n}\n\nexport function appendMemoryToGraphContext(options: {\n allMemsForGraph: MemoryFile[] | null | undefined;\n storageDir: string;\n memoryRelPath: string;\n memoryId: string;\n category: MemoryFile[\"frontmatter\"][\"category\"];\n content: string;\n entityRef: string | undefined;\n}): void {\n if (!Array.isArray(options.allMemsForGraph)) return;\n\n const nowIso = new Date().toISOString();\n options.allMemsForGraph.push({\n path: path.join(options.storageDir, options.memoryRelPath),\n content: options.content,\n frontmatter: {\n id: options.memoryId,\n category: options.category,\n created: nowIso,\n updated: nowIso,\n source: \"extraction\",\n confidence: 0.8,\n confidenceTier: \"implied\",\n tags: [],\n entityRef: options.entityRef,\n status: \"active\",\n },\n });\n}\n\nexport function resolvePersistedMemoryRelativePath(options: {\n memoryId: string;\n pathById: Map<string, string>;\n category: string;\n}): string {\n const persisted = options.pathById.get(options.memoryId);\n if (persisted) return persisted;\n if (options.category === \"correction\") {\n return path.join(\"corrections\", `${options.memoryId}.md`);\n }\n // Pick the subtree that matches the StorageManager.writeMemory routing\n // so fallback paths (used before memoryPathById has seen the fresh\n // write) agree with where the file actually lives. Routing goes through\n // the shared categoryDirName() chokepoint (utils/category-dir.ts) so\n // every category — decisions/, preferences/, reasoning-traces/, ... —\n // resolves to the same dir the writer used; otherwise graph edges point\n // at the wrong subtree and graph expansion silently drops those nodes\n // when readMemoryByPath cannot resolve them (issue #564 PR 3 / #1546).\n const subtree = categoryDirName(options.category);\n const idParts = options.memoryId.split(\"-\");\n const maybeTimestamp = Number(idParts[1]);\n if (Number.isFinite(maybeTimestamp) && maybeTimestamp > 0) {\n const day = new Date(maybeTimestamp).toISOString().slice(0, 10);\n return path.join(subtree, day, `${options.memoryId}.md`);\n }\n return path.join(subtree, `${options.memoryId}.md`);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,SAAS,kBAAkB;AAC3B,OAAO,QAAQ;AACf,OAAO,UAAU;AAmBV,IAAM,+BAA+B;AAYrC,IAAM,qCAAN,cAAiD,MAAM;AAAA,EACnD;AAAA,EAEA;AAAA,EAET,YACE,SACA,eACA,eACA;AACA,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,gBAAgB;AACrB,SAAK,gBAAgB;AAAA,EACvB;AACF;AA0GO,SAAS,8BACd,QAMoB;AAOpB,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,EACX;AACA,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AA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,MAAM,CAAC;AAAA,MACP,WAAW,QAAQ;AAAA,MACnB,QAAQ;AAAA,IACV;AAAA,EACF,CAAC;AACH;AAEO,SAAS,mCAAmC,SAIxC;AACT,QAAM,YAAY,QAAQ,SAAS,IAAI,QAAQ,QAAQ;AACvD,MAAI,UAAW,QAAO;AACtB,MAAI,QAAQ,aAAa,cAAc;AACrC,WAAO,KAAK,KAAK,eAAe,GAAG,QAAQ,QAAQ,KAAK;AAAA,EAC1D;AASA,QAAM,UAAU,gBAAgB,QAAQ,QAAQ;AAChD,QAAM,UAAU,QAAQ,SAAS,MAAM,GAAG;AAC1C,QAAM,iBAAiB,OAAO,QAAQ,CAAC,CAAC;AACxC,MAAI,OAAO,SAAS,cAAc,KAAK,iBAAiB,GAAG;AACzD,UAAM,MAAM,IAAI,KAAK,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,EAAE;AAC9D,WAAO,KAAK,KAAK,SAAS,KAAK,GAAG,QAAQ,QAAQ,KAAK;AAAA,EACzD;AACA,SAAO,KAAK,KAAK,SAAS,GAAG,QAAQ,QAAQ,KAAK;AACpD;","names":["buildCompressionGuidelinesMarkdown"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{first-start-migration-GAT7G733.js.map → first-start-migration-OM3PHMZO.js.map}
RENAMED
|
File without changes
|
|
File without changes
|