@remnic/core 9.69.75 → 9.69.77
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 +45 -45
- package/dist/access-authorization-probe.js +46 -46
- package/dist/access-boundary.js +45 -45
- package/dist/access-cli.js +113 -113
- package/dist/access-extraction-force-flush.js +45 -45
- package/dist/access-http-briefing.js +46 -46
- package/dist/access-http-query.js +47 -47
- package/dist/access-http.js +65 -65
- package/dist/access-identity-continuity-surface.js +45 -45
- package/dist/access-lcm-surface.js +45 -45
- package/dist/access-mcp.js +55 -55
- package/dist/access-namespace-preflight.js +45 -45
- package/dist/access-observe-write-category.js +8 -8
- package/dist/access-observe-write-surface.js +45 -45
- package/dist/access-offline-manifest.js +5 -5
- package/dist/access-operations-batch.js +46 -46
- package/dist/access-operations.js +53 -53
- package/dist/access-recall-concurrency.js +45 -45
- package/dist/access-recall-diagnostics.js +2 -2
- package/dist/access-recall-response.js +45 -45
- package/dist/access-recall-surface.js +45 -45
- package/dist/access-schema.js +5 -5
- package/dist/access-service.js +45 -45
- package/dist/access-surface-catalog.js +47 -47
- package/dist/active-recall.js +15 -14
- 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-QJNIKZHV.js → auto-sync-WEUDMXUW.js} +4 -4
- package/dist/briefing-followup-timeout.d.ts +3 -0
- package/dist/briefing-followup-timeout.d.ts.map +1 -0
- package/dist/briefing-followup-timeout.js +10 -0
- package/dist/briefing.d.ts.map +1 -1
- package/dist/briefing.js +12 -10
- package/dist/buffer.js +6 -6
- package/dist/{capsule-crypto-YO5QJ6L3.js → capsule-crypto-GWVG7LGC.js} +2 -2
- package/dist/capsule-crypto-GWVG7LGC.js.map +1 -0
- package/dist/causal-consolidation.js +12 -11
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/{chunk-O4QH33GV.js → chunk-2CH6MMO2.js} +6 -6
- package/dist/{chunk-VXNWOHOR.js → chunk-2GKLHU2D.js} +2 -2
- package/dist/{chunk-MB3HMRXM.js → chunk-2I6VHX6Q.js} +2 -2
- package/dist/{chunk-LVFI5LG7.js → chunk-2L5FSNPC.js} +5 -5
- package/dist/{chunk-U3NBO4IX.js → chunk-345MEMRU.js} +132 -37
- package/dist/chunk-345MEMRU.js.map +1 -0
- package/dist/{chunk-6BSPRNFF.js → chunk-3AGCSD42.js} +2 -2
- package/dist/{chunk-IGSVMAPQ.js → chunk-3K3PITOE.js} +2 -2
- package/dist/{chunk-ZUT4FK5W.js → chunk-5ELENZTA.js} +2 -2
- package/dist/{chunk-NF6LF76X.js → chunk-5X7ZTLFS.js} +2 -2
- package/dist/{chunk-S52VKUUW.js → chunk-6DTJBTHL.js} +3 -3
- package/dist/{chunk-LH6UP5SR.js → chunk-6MJGDUC7.js} +3 -3
- package/dist/{chunk-YYRMOMX3.js → chunk-7DZHRPCO.js} +2 -2
- package/dist/{chunk-SB4ZWVKI.js → chunk-7G6WUOLB.js} +4 -6
- package/dist/{chunk-SB4ZWVKI.js.map → chunk-7G6WUOLB.js.map} +1 -1
- package/dist/{chunk-LDOURFFA.js → chunk-7QXTCONH.js} +2 -2
- package/dist/{chunk-HPK66ZM5.js → chunk-7WO66MKJ.js} +2 -2
- package/dist/{chunk-ODP62HIA.js → chunk-A2XDQ3JW.js} +2 -2
- package/dist/{chunk-TY5JOP2W.js → chunk-ALOMLIRC.js} +84 -69
- package/dist/chunk-ALOMLIRC.js.map +1 -0
- package/dist/{chunk-MSRNAAWW.js → chunk-AVO2CBIL.js} +2 -2
- package/dist/{chunk-B5EZWPSM.js → chunk-AZ2X5LNA.js} +2 -2
- package/dist/{chunk-3NTVCMDD.js → chunk-B3OFQP5Y.js} +2 -2
- package/dist/chunk-B3OFQP5Y.js.map +1 -0
- package/dist/{chunk-IGEZE6QB.js → chunk-BMYZTZ5D.js} +4 -4
- package/dist/{chunk-XDOXR3U6.js → chunk-BNPLDVM6.js} +2 -2
- package/dist/{chunk-7JFQI6DQ.js → chunk-BOUFVFV2.js} +2 -2
- package/dist/{chunk-VDX2J7OX.js → chunk-BUKK5SWA.js} +2 -2
- package/dist/{chunk-KMHE76A2.js → chunk-CDEI5S5W.js} +2 -2
- package/dist/{chunk-UJX4I26O.js → chunk-CLSYE5OZ.js} +2 -2
- package/dist/{chunk-WDBKDYK2.js → chunk-CYCE3L2I.js} +46 -46
- package/dist/{chunk-GZBNEZIU.js → chunk-DBYAY6UW.js} +3 -3
- package/dist/{chunk-HZDOLAZV.js → chunk-DCPAAAIC.js} +2 -2
- package/dist/{chunk-6JA22L5X.js → chunk-DSQWTXHP.js} +8 -8
- package/dist/{chunk-WQC54W25.js → chunk-EJPF6XDQ.js} +2 -2
- package/dist/{chunk-CGO3A7SR.js → chunk-EVBI7S4J.js} +3 -3
- package/dist/{chunk-OB2YI57R.js → chunk-FMT52ROU.js} +43 -43
- package/dist/{chunk-62AE2EUZ.js → chunk-FVK5NQ3V.js} +2 -2
- package/dist/{chunk-3SL52JKD.js → chunk-FZVROZKC.js} +5 -5
- package/dist/{chunk-ZVTG7JTG.js → chunk-GARVFCV6.js} +2 -2
- package/dist/{chunk-Y52T5Y6B.js → chunk-GATQP7CE.js} +2 -2
- package/dist/{chunk-7COBZFUF.js → chunk-GXQ5GDUH.js} +2 -2
- package/dist/chunk-GZFKCLRC.js +17 -0
- package/dist/chunk-GZFKCLRC.js.map +1 -0
- package/dist/{chunk-VVX5PZFS.js → chunk-H36X4NRH.js} +2 -2
- package/dist/{chunk-2VH2JWYN.js → chunk-I4G4UWQA.js} +2 -2
- package/dist/{chunk-6OACG7JV.js → chunk-IBGEHKQ6.js} +3 -3
- package/dist/{chunk-BXCZPPRO.js → chunk-IILMR37Z.js} +16 -16
- package/dist/{chunk-X2PBZOYZ.js → chunk-IP5VLSLO.js} +2 -2
- package/dist/{chunk-IXLHREAB.js → chunk-IVH7INFM.js} +3 -3
- package/dist/{chunk-D4SPMHEW.js → chunk-JLPNONPH.js} +2 -2
- package/dist/{chunk-AEGQ5PJ7.js → chunk-JX6USXZR.js} +2 -2
- package/dist/{chunk-SA2JMMMS.js → chunk-K2SXIWEV.js} +2 -2
- package/dist/{chunk-VEBYLZQQ.js → chunk-KN6CIN7I.js} +2 -2
- package/dist/{chunk-WZKKI6S2.js → chunk-LEP46X5Y.js} +2 -2
- package/dist/{chunk-5UBH37SL.js → chunk-LI76ESJL.js} +4 -4
- package/dist/{chunk-AQJBFLUA.js → chunk-LZLJK2IA.js} +5 -5
- package/dist/{chunk-5LWVTSF7.js → chunk-MOQPEFLN.js} +4 -4
- package/dist/{chunk-6BFW7SGF.js → chunk-MQQPONTM.js} +2 -2
- package/dist/{chunk-5KNEOYTF.js → chunk-NGFRFDSK.js} +2 -2
- package/dist/{chunk-B6PY25JB.js → chunk-NHV6WCM5.js} +1 -1
- package/dist/{chunk-S5FWSNLI.js → chunk-NYZRJW5X.js} +2 -2
- package/dist/{chunk-JOMGKV72.js → chunk-OHRIBMSS.js} +2 -2
- package/dist/{chunk-YMSPN4W4.js → chunk-OJ3TV57W.js} +12 -7
- package/dist/chunk-OJ3TV57W.js.map +1 -0
- package/dist/{chunk-BXLOS5AJ.js → chunk-OWHERGF2.js} +2 -2
- package/dist/{chunk-F5O6WEDO.js → chunk-PWF4JXKD.js} +1 -1
- package/dist/chunk-PWF4JXKD.js.map +1 -0
- package/dist/{chunk-KPSJA45G.js → chunk-QIDMGBUY.js} +2 -2
- package/dist/{chunk-MKNENZCK.js → chunk-QJAGDPY7.js} +3 -3
- package/dist/{chunk-VIRTAUJO.js → chunk-RDUM6BKQ.js} +2 -2
- package/dist/{chunk-I6Y6QKWF.js → chunk-RGX4DGOG.js} +2 -2
- package/dist/{chunk-OMYCECTS.js → chunk-RJLV4BKR.js} +2 -2
- package/dist/{chunk-LBL77UXO.js → chunk-RKTT72XV.js} +4 -4
- package/dist/{chunk-AWEMJYN2.js → chunk-RMG22TH2.js} +2 -2
- package/dist/{chunk-GH5YSAAI.js → chunk-RRMIACBG.js} +11 -10
- package/dist/chunk-RRMIACBG.js.map +1 -0
- package/dist/{chunk-4GPI3GVE.js → chunk-SLEAJ67D.js} +5 -5
- package/dist/{chunk-YR6A6ZK7.js → chunk-SSUDD72S.js} +2 -2
- package/dist/{chunk-WDP7CJZQ.js → chunk-SUSMEKBE.js} +4 -4
- package/dist/{chunk-YZENVZWY.js → chunk-TY446V34.js} +2 -2
- package/dist/{chunk-PIG4WJFQ.js → chunk-UHESJ6TQ.js} +2 -2
- package/dist/{chunk-PIG4WJFQ.js.map → chunk-UHESJ6TQ.js.map} +1 -1
- package/dist/{chunk-YCYFXA6P.js → chunk-UKB7ZDKK.js} +2 -2
- package/dist/{chunk-DQEMWVMT.js → chunk-UVYI6VIX.js} +1 -1
- package/dist/{chunk-YF3JERFZ.js → chunk-VL4X7ZHC.js} +2 -2
- package/dist/{chunk-COHJUEBQ.js → chunk-WGXWZE3K.js} +2 -2
- package/dist/{chunk-ZHOXXHT5.js → chunk-WQZZDN5M.js} +4 -4
- package/dist/{chunk-25LKLNSJ.js → chunk-X33QB7LW.js} +2 -2
- package/dist/{chunk-JDES3G7T.js → chunk-X3NZ2HAO.js} +2 -2
- package/dist/{chunk-Q4AUIFUA.js → chunk-XAITGGX5.js} +4 -4
- package/dist/{chunk-5HP5F2SQ.js → chunk-XNYTMLPS.js} +3 -3
- package/dist/{chunk-UFBHEMNR.js → chunk-YL273SOF.js} +2 -2
- package/dist/{chunk-ZPED47SP.js → chunk-YUAOU2B2.js} +19 -25
- package/dist/chunk-YUAOU2B2.js.map +1 -0
- package/dist/{chunk-GFD7TWAZ.js → chunk-ZWWF7PI5.js} +4 -4
- package/dist/{chunk-5LPDXYU3.js → chunk-ZYBLNHUB.js} +5 -5
- package/dist/cli.js +85 -85
- package/dist/coding/export-okf-codegraph.js +11 -10
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/compounding/engine.js +11 -10
- package/dist/config-qmd.js +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -14
- package/dist/connectors/codex-materialize-runner.js +11 -10
- package/dist/connectors/index.js +11 -10
- package/dist/convergence-refresh.js +13 -13
- package/dist/corpus-watermark.js +13 -12
- package/dist/deep-recall-http-glue.js +6 -6
- package/dist/directory-sidecars.d.ts +3 -0
- package/dist/directory-sidecars.d.ts.map +1 -1
- package/dist/directory-sidecars.js +7 -4
- package/dist/entity-retrieval.js +11 -10
- package/dist/external-wiki-access.js +46 -46
- package/dist/extraction-span-materialize.js +2 -2
- package/dist/extraction.js +19 -19
- package/dist/{first-start-migration-7OATHJKB.js → first-start-migration-GAT7G733.js} +4 -4
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/index.js +171 -171
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +5 -5
- package/dist/location/index.js +14 -14
- package/dist/maintenance/memory-governance.js +11 -10
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
- package/dist/maintenance/rebuild-memory-projection.js +12 -12
- package/dist/memory-browse-operations.js +46 -46
- package/dist/memory-browse.js +5 -6
- package/dist/namespaces/migrate.js +12 -11
- package/dist/namespaces/search.js +5 -5
- package/dist/namespaces/storage.js +11 -10
- package/dist/offline-sync-impression-drain.js +2 -2
- package/dist/offline-sync.js +2 -2
- package/dist/operator-doctor-corpus.js +14 -13
- package/dist/operator-toolkit.js +24 -23
- package/dist/orchestration/maintenance.js +20 -20
- package/dist/orchestration/recall-recognition-search.d.ts +1 -0
- package/dist/orchestration/recall-recognition-search.d.ts.map +1 -1
- package/dist/orchestration/recall-search-pipeline.d.ts.map +1 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +114 -114
- package/dist/qmd.d.ts +1 -1
- package/dist/qmd.d.ts.map +1 -1
- package/dist/qmd.js +1 -1
- 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 +46 -46
- package/dist/recall-navigation.js +45 -45
- package/dist/recall-state-view-admission.js +5 -6
- package/dist/recall-state.js +2 -2
- package/dist/recall-why-service.js +5 -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/resume-bundles.js +16 -15
- package/dist/search/factory.js +4 -4
- package/dist/search/index.js +8 -8
- package/dist/semantic-consolidation.js +12 -11
- package/dist/semantic-rule-promotion.js +11 -10
- package/dist/semantic-rule-verifier.js +11 -10
- package/dist/source-agent-qualifier.js +15 -15
- package/dist/standup/build.js +11 -10
- package/dist/storage.d.ts +1 -19
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +10 -9
- package/dist/support-passport/index.js +48 -48
- 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 +12 -11
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +11 -10
- package/dist/who-knows-cli.js +12 -11
- package/dist/who-knows.js +11 -10
- package/package.json +2 -2
- package/src/briefing-followup-timeout.test.ts +15 -0
- package/src/briefing-followup-timeout.ts +14 -0
- package/src/briefing.ts +8 -9
- package/src/config-qmd.ts +1 -1
- package/src/config.test.ts +2 -2
- package/src/config.ts +3 -4
- package/src/directory-sidecars-config.test.ts +34 -0
- package/src/directory-sidecars.test.ts +36 -1
- package/src/directory-sidecars.ts +41 -7
- package/src/orchestration/recall-internal.ts +1 -1
- package/src/orchestration/recall-recognition-search.test.ts +8 -0
- package/src/orchestration/recall-recognition-search.ts +5 -1
- package/src/orchestration/recall-search-pipeline.ts +5 -7
- package/src/orchestrator.ts +8 -0
- package/src/qmd.ts +4 -4
- package/src/recall-budget-config.test.ts +1 -1
- package/src/storage.ts +13 -22
- package/src/types.ts +3 -3
- package/dist/chunk-3NTVCMDD.js.map +0 -1
- package/dist/chunk-F5O6WEDO.js.map +0 -1
- package/dist/chunk-GH5YSAAI.js.map +0 -1
- package/dist/chunk-PCEYGOSL.js +0 -66
- package/dist/chunk-PCEYGOSL.js.map +0 -1
- package/dist/chunk-TY5JOP2W.js.map +0 -1
- package/dist/chunk-U3NBO4IX.js.map +0 -1
- package/dist/chunk-YMSPN4W4.js.map +0 -1
- package/dist/chunk-ZPED47SP.js.map +0 -1
- /package/dist/{auto-sync-QJNIKZHV.js.map → auto-sync-WEUDMXUW.js.map} +0 -0
- /package/dist/{capsule-crypto-YO5QJ6L3.js.map → briefing-followup-timeout.js.map} +0 -0
- /package/dist/{chunk-O4QH33GV.js.map → chunk-2CH6MMO2.js.map} +0 -0
- /package/dist/{chunk-VXNWOHOR.js.map → chunk-2GKLHU2D.js.map} +0 -0
- /package/dist/{chunk-MB3HMRXM.js.map → chunk-2I6VHX6Q.js.map} +0 -0
- /package/dist/{chunk-LVFI5LG7.js.map → chunk-2L5FSNPC.js.map} +0 -0
- /package/dist/{chunk-6BSPRNFF.js.map → chunk-3AGCSD42.js.map} +0 -0
- /package/dist/{chunk-IGSVMAPQ.js.map → chunk-3K3PITOE.js.map} +0 -0
- /package/dist/{chunk-ZUT4FK5W.js.map → chunk-5ELENZTA.js.map} +0 -0
- /package/dist/{chunk-NF6LF76X.js.map → chunk-5X7ZTLFS.js.map} +0 -0
- /package/dist/{chunk-S52VKUUW.js.map → chunk-6DTJBTHL.js.map} +0 -0
- /package/dist/{chunk-LH6UP5SR.js.map → chunk-6MJGDUC7.js.map} +0 -0
- /package/dist/{chunk-YYRMOMX3.js.map → chunk-7DZHRPCO.js.map} +0 -0
- /package/dist/{chunk-LDOURFFA.js.map → chunk-7QXTCONH.js.map} +0 -0
- /package/dist/{chunk-HPK66ZM5.js.map → chunk-7WO66MKJ.js.map} +0 -0
- /package/dist/{chunk-ODP62HIA.js.map → chunk-A2XDQ3JW.js.map} +0 -0
- /package/dist/{chunk-MSRNAAWW.js.map → chunk-AVO2CBIL.js.map} +0 -0
- /package/dist/{chunk-B5EZWPSM.js.map → chunk-AZ2X5LNA.js.map} +0 -0
- /package/dist/{chunk-IGEZE6QB.js.map → chunk-BMYZTZ5D.js.map} +0 -0
- /package/dist/{chunk-XDOXR3U6.js.map → chunk-BNPLDVM6.js.map} +0 -0
- /package/dist/{chunk-7JFQI6DQ.js.map → chunk-BOUFVFV2.js.map} +0 -0
- /package/dist/{chunk-VDX2J7OX.js.map → chunk-BUKK5SWA.js.map} +0 -0
- /package/dist/{chunk-KMHE76A2.js.map → chunk-CDEI5S5W.js.map} +0 -0
- /package/dist/{chunk-UJX4I26O.js.map → chunk-CLSYE5OZ.js.map} +0 -0
- /package/dist/{chunk-WDBKDYK2.js.map → chunk-CYCE3L2I.js.map} +0 -0
- /package/dist/{chunk-GZBNEZIU.js.map → chunk-DBYAY6UW.js.map} +0 -0
- /package/dist/{chunk-HZDOLAZV.js.map → chunk-DCPAAAIC.js.map} +0 -0
- /package/dist/{chunk-6JA22L5X.js.map → chunk-DSQWTXHP.js.map} +0 -0
- /package/dist/{chunk-WQC54W25.js.map → chunk-EJPF6XDQ.js.map} +0 -0
- /package/dist/{chunk-CGO3A7SR.js.map → chunk-EVBI7S4J.js.map} +0 -0
- /package/dist/{chunk-OB2YI57R.js.map → chunk-FMT52ROU.js.map} +0 -0
- /package/dist/{chunk-62AE2EUZ.js.map → chunk-FVK5NQ3V.js.map} +0 -0
- /package/dist/{chunk-3SL52JKD.js.map → chunk-FZVROZKC.js.map} +0 -0
- /package/dist/{chunk-ZVTG7JTG.js.map → chunk-GARVFCV6.js.map} +0 -0
- /package/dist/{chunk-Y52T5Y6B.js.map → chunk-GATQP7CE.js.map} +0 -0
- /package/dist/{chunk-7COBZFUF.js.map → chunk-GXQ5GDUH.js.map} +0 -0
- /package/dist/{chunk-VVX5PZFS.js.map → chunk-H36X4NRH.js.map} +0 -0
- /package/dist/{chunk-2VH2JWYN.js.map → chunk-I4G4UWQA.js.map} +0 -0
- /package/dist/{chunk-6OACG7JV.js.map → chunk-IBGEHKQ6.js.map} +0 -0
- /package/dist/{chunk-BXCZPPRO.js.map → chunk-IILMR37Z.js.map} +0 -0
- /package/dist/{chunk-X2PBZOYZ.js.map → chunk-IP5VLSLO.js.map} +0 -0
- /package/dist/{chunk-IXLHREAB.js.map → chunk-IVH7INFM.js.map} +0 -0
- /package/dist/{chunk-D4SPMHEW.js.map → chunk-JLPNONPH.js.map} +0 -0
- /package/dist/{chunk-AEGQ5PJ7.js.map → chunk-JX6USXZR.js.map} +0 -0
- /package/dist/{chunk-SA2JMMMS.js.map → chunk-K2SXIWEV.js.map} +0 -0
- /package/dist/{chunk-VEBYLZQQ.js.map → chunk-KN6CIN7I.js.map} +0 -0
- /package/dist/{chunk-WZKKI6S2.js.map → chunk-LEP46X5Y.js.map} +0 -0
- /package/dist/{chunk-5UBH37SL.js.map → chunk-LI76ESJL.js.map} +0 -0
- /package/dist/{chunk-AQJBFLUA.js.map → chunk-LZLJK2IA.js.map} +0 -0
- /package/dist/{chunk-5LWVTSF7.js.map → chunk-MOQPEFLN.js.map} +0 -0
- /package/dist/{chunk-6BFW7SGF.js.map → chunk-MQQPONTM.js.map} +0 -0
- /package/dist/{chunk-5KNEOYTF.js.map → chunk-NGFRFDSK.js.map} +0 -0
- /package/dist/{chunk-B6PY25JB.js.map → chunk-NHV6WCM5.js.map} +0 -0
- /package/dist/{chunk-S5FWSNLI.js.map → chunk-NYZRJW5X.js.map} +0 -0
- /package/dist/{chunk-JOMGKV72.js.map → chunk-OHRIBMSS.js.map} +0 -0
- /package/dist/{chunk-BXLOS5AJ.js.map → chunk-OWHERGF2.js.map} +0 -0
- /package/dist/{chunk-KPSJA45G.js.map → chunk-QIDMGBUY.js.map} +0 -0
- /package/dist/{chunk-MKNENZCK.js.map → chunk-QJAGDPY7.js.map} +0 -0
- /package/dist/{chunk-VIRTAUJO.js.map → chunk-RDUM6BKQ.js.map} +0 -0
- /package/dist/{chunk-I6Y6QKWF.js.map → chunk-RGX4DGOG.js.map} +0 -0
- /package/dist/{chunk-OMYCECTS.js.map → chunk-RJLV4BKR.js.map} +0 -0
- /package/dist/{chunk-LBL77UXO.js.map → chunk-RKTT72XV.js.map} +0 -0
- /package/dist/{chunk-AWEMJYN2.js.map → chunk-RMG22TH2.js.map} +0 -0
- /package/dist/{chunk-4GPI3GVE.js.map → chunk-SLEAJ67D.js.map} +0 -0
- /package/dist/{chunk-YR6A6ZK7.js.map → chunk-SSUDD72S.js.map} +0 -0
- /package/dist/{chunk-WDP7CJZQ.js.map → chunk-SUSMEKBE.js.map} +0 -0
- /package/dist/{chunk-YZENVZWY.js.map → chunk-TY446V34.js.map} +0 -0
- /package/dist/{chunk-YCYFXA6P.js.map → chunk-UKB7ZDKK.js.map} +0 -0
- /package/dist/{chunk-DQEMWVMT.js.map → chunk-UVYI6VIX.js.map} +0 -0
- /package/dist/{chunk-YF3JERFZ.js.map → chunk-VL4X7ZHC.js.map} +0 -0
- /package/dist/{chunk-COHJUEBQ.js.map → chunk-WGXWZE3K.js.map} +0 -0
- /package/dist/{chunk-ZHOXXHT5.js.map → chunk-WQZZDN5M.js.map} +0 -0
- /package/dist/{chunk-25LKLNSJ.js.map → chunk-X33QB7LW.js.map} +0 -0
- /package/dist/{chunk-JDES3G7T.js.map → chunk-X3NZ2HAO.js.map} +0 -0
- /package/dist/{chunk-Q4AUIFUA.js.map → chunk-XAITGGX5.js.map} +0 -0
- /package/dist/{chunk-5HP5F2SQ.js.map → chunk-XNYTMLPS.js.map} +0 -0
- /package/dist/{chunk-UFBHEMNR.js.map → chunk-YL273SOF.js.map} +0 -0
- /package/dist/{chunk-GFD7TWAZ.js.map → chunk-ZWWF7PI5.js.map} +0 -0
- /package/dist/{chunk-5LPDXYU3.js.map → chunk-ZYBLNHUB.js.map} +0 -0
- /package/dist/{first-start-migration-7OATHJKB.js.map → first-start-migration-GAT7G733.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/activity/journal.ts","../src/orchestration/generic-recall-paths.ts"],"sourcesContent":["/**\n * User-owned daily journal (issue #1984 PR1).\n *\n * Files live at `<memoryDir>/journal/<YYYY-MM-DD>.md` — inside the memory\n * directory but outside scan roots, same placement as activity digests.\n * Once written, Remnic never rewrites the file except `seed` with force.\n * All writes go through writeJournalFile, which stats first.\n */\nimport { mkdirSync, statSync, writeFileSync } from \"node:fs\";\nimport path from \"node:path\";\n\nimport { isValidActivityDate } from \"./digest.js\";\n\nexport const JOURNAL_DIR_NAME = \"journal\";\n\n/** Minimal card shape the seed renderer needs. TimelineCard is assignable. */\nexport interface JournalSeedCard {\n title: string;\n startUtc: string;\n endUtc: string;\n}\n\nexport interface SeedJournalInput {\n memoryDir: string;\n date: string;\n cards?: readonly JournalSeedCard[];\n force?: boolean;\n}\n\nexport interface SeedJournalResult {\n path: string;\n wrote: boolean;\n}\n\nconst JOURNAL_DAY_TOPLEVEL = /^journal[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\nconst JOURNAL_DAY_ANYWHERE = /(?:^|[\\\\/])journal[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\n\nexport function journalPath(memoryDir: string, date: string): string {\n if (!isValidActivityDate(date)) {\n throw new RangeError(`Invalid journal date \"${date}\"; expected YYYY-MM-DD.`);\n }\n return path.join(memoryDir, JOURNAL_DIR_NAME, `${date}.md`);\n}\n\n/**\n * Root-aware journal day-file check. With a memory root, only the top-level\n * `journal/<date>.md` matches so a nested `facts/journal/<date>.md` stays\n * recallable. Without a root, fall back to the day-file shape anywhere.\n */\nexport function isJournalDayPath(filePath: string, memoryRoot?: string): boolean {\n if (memoryRoot !== undefined && memoryRoot.length > 0) {\n const relative = path.relative(memoryRoot, path.resolve(memoryRoot, filePath));\n return JOURNAL_DAY_TOPLEVEL.test(relative);\n }\n return JOURNAL_DAY_ANYWHERE.test(filePath);\n}\n\nexport function todayJournalDate(now: Date = new Date()): string {\n const year = now.getFullYear();\n const month = String(now.getMonth() + 1).padStart(2, \"0\");\n const day = String(now.getDate()).padStart(2, \"0\");\n return `${year}-${month}-${day}`;\n}\n\nfunction formatCardDuration(card: JournalSeedCard): string {\n const start = Date.parse(card.startUtc);\n const end = Date.parse(card.endUtc);\n const minutes =\n Number.isFinite(start) && Number.isFinite(end) && end > start\n ? Math.round((end - start) / 60_000)\n : 0;\n return `${minutes}m`;\n}\n\nfunction renderJournalSeed(date: string, cards: readonly JournalSeedCard[]): string {\n const ordered = [...cards].sort((left, right) => {\n const byStart = left.startUtc.localeCompare(right.startUtc);\n return byStart !== 0 ? byStart : left.title.localeCompare(right.title);\n });\n const glance =\n ordered.length === 0\n ? [\"_No cards._\"]\n : ordered.map((card) => `- ${formatCardDuration(card)} ${card.title}`);\n return [`# Journal — ${date}`, \"\", \"## Day at a glance\", \"\", ...glance, \"\", \"## Notes\", \"\", \"\"].join(\n \"\\n\",\n );\n}\n\n/** The only journal write. Stats first; existing files are a no-op unless force. */\nexport function writeJournalFile(filePath: string, content: string, force: boolean): boolean {\n let exists = false;\n try {\n statSync(filePath);\n exists = true;\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code;\n if (code !== \"ENOENT\") throw err;\n }\n if (exists && !force) return false;\n mkdirSync(path.dirname(filePath), { recursive: true });\n writeFileSync(filePath, content);\n return true;\n}\n\nexport function seedJournal(input: SeedJournalInput): SeedJournalResult {\n const filePath = journalPath(input.memoryDir, input.date);\n const wrote = writeJournalFile(\n filePath,\n renderJournalSeed(input.date, input.cards ?? []),\n input.force === true,\n );\n return { path: filePath, wrote };\n}\n","import path from \"node:path\";\nimport type { QmdSearchResult } from \"../types.js\";\nimport { isExternalWikiCollectionName } from \"../external-wiki-guard.js\";\nexport { isExternalWikiCollectionName } from \"../external-wiki-guard.js\";\nimport { ALL_CATEGORY_DIRS } from \"../utils/category-dir.js\";\nimport {\n isActivityDigestPath,\n isArtifactMemoryPath,\n isLocationDayPath,\n isMeetingRecordPath,\n} from \"./orchestrator-helpers.js\";\nimport { isJournalDayPath } from \"../activity/journal.js\";\nimport { DIRECTORY_SIDECAR_BASENAME } from \"../directory-sidecars.js\";\nimport { OKF_RESERVED_BASENAMES } from \"../okf/type-mapping.js\";\n\n\nexport interface GenericRecallPathPolicy {\n readonly memoryDir?: string;\n readonly qmdCollection?: string;\n readonly qmdColdCollection?: string;\n /**\n * The collection THIS request named, when it named one. A caller may select\n * a custom collection whose name is also a memory category, which the\n * configured names alone cannot disambiguate.\n */\n readonly requestedCollection?: string;\n}\n\ntype GenericRecallPathSource = \"filesystem\" | \"qmd\";\n\nconst CATEGORY_MEMORY_ROOTS: Record<string, true> = Object.fromEntries(\n ALL_CATEGORY_DIRS.map((directory) => [directory, true]),\n);\nconst RESERVED_ARCHIVE_ROOTS: Record<string, true> = { archive: true, namespaces: true };\n\nfunction isQmdCollectionPrefix(\n prefix: string,\n collection: string | undefined,\n source: GenericRecallPathSource,\n): boolean {\n if (typeof collection !== \"string\" || collection.length === 0) return false;\n if (prefix.startsWith(`${collection}--`)) return true;\n if (prefix !== collection) return false;\n if (source === \"qmd\") return true;\n return (\n !Object.hasOwn(CATEGORY_MEMORY_ROOTS, prefix) &&\n !Object.hasOwn(RESERVED_ARCHIVE_ROOTS, prefix)\n );\n}\n\nfunction normalizeQmdUriPath(relativePath: string, source: GenericRecallPathSource): string {\n if (source !== \"qmd\" || !relativePath.startsWith(\"qmd://\")) return relativePath;\n try {\n const parsed = new URL(relativePath);\n if (parsed.protocol !== \"qmd:\" || !parsed.hostname) return relativePath;\n const collection = decodeURIComponent(parsed.hostname);\n const pathname = decodeURIComponent(parsed.pathname.replace(/^\\/+/, \"\"));\n return pathname ? `${collection}/${pathname}` : collection;\n } catch {\n return relativePath;\n }\n}\n\nfunction stripQmdCollectionPrefix(\n relativePath: string,\n policy: GenericRecallPathPolicy,\n source: GenericRecallPathSource,\n): string {\n const normalized = path.posix.normalize(normalizeQmdUriPath(relativePath, source).replace(/\\\\/g, \"/\"));\n const slashIndex = normalized.indexOf(\"/\");\n if (slashIndex <= 0 || slashIndex >= normalized.length - 1) return normalized;\n\n const prefix = normalized.slice(0, slashIndex);\n const matchesHotCollection = isQmdCollectionPrefix(prefix, policy.qmdCollection, source);\n const matchesColdCollection = isQmdCollectionPrefix(prefix, policy.qmdColdCollection, source);\n return matchesHotCollection || matchesColdCollection\n ? normalized.slice(slashIndex + 1)\n : normalized;\n}\n\nexport function isTopLevelArchivePath(\n filePath: string,\n policy: GenericRecallPathPolicy = {},\n source: GenericRecallPathSource = \"filesystem\",\n): boolean {\n const isAbsolutePath = path.isAbsolute(filePath);\n const relative =\n policy.memoryDir && isAbsolutePath\n ? path.relative(policy.memoryDir, path.resolve(filePath))\n : filePath;\n const normalized = !isAbsolutePath\n ? stripQmdCollectionPrefix(relative, policy, source)\n : relative;\n return /^(?:archive|namespaces[\\\\/][^\\\\/]+[\\\\/]archive)(?:[\\\\/]|$)/i.test(normalized);\n}\n\nfunction isExternalWikiQmdPath(\n filePath: string,\n source: GenericRecallPathSource,\n): boolean {\n if (source !== \"qmd\") return false;\n const normalized = normalizeQmdUriPath(filePath, source).replace(/\\\\/g, \"/\");\n const slashIndex = normalized.indexOf(\"/\");\n const collection = slashIndex === -1 ? normalized : normalized.slice(0, slashIndex);\n return isExternalWikiCollectionName(collection);\n}\n\n/**\n * Paths an EXPLICIT ranked search must not return.\n *\n * Narrower than {@link isGenericRecallExcludedPath} on purpose. Recall\n * injection also drops archived memories because they are cold by definition,\n * but archive is explicitly reserved for \"explicit read or search surfaces\"\n * (docs/architecture/memory-lifecycle.md) — hiding it from `memory_search`\n * would remove the only way to find it. Everything else stays excluded: those\n * paths flow through their own dedicated surfaces, never a generic search.\n */\nexport function isSearchExcludedPath(\n filePath: string,\n policy: GenericRecallPathPolicy = {},\n source: GenericRecallPathSource = \"filesystem\",\n): boolean {\n if (isExternalWikiQmdPath(filePath, source)) return true;\n // A QMD transport hands back collection-qualified paths\n // (`qmd://<collection>/activity/<date>.md`, or `<collection>/activity/…`),\n // and the collection is not always one this policy knows: a caller may name\n // a custom one, and global search spans every collection. The activity\n // predicate is ROOT-AWARE — it matches only the top-level\n // `activity/<date>.md` so a nested ordinary memory stays recallable — so an\n // un-stripped prefix reads as a nested path and the digest would be served.\n //\n // Both spellings are therefore tested. Widening is safe in this direction\n // and only here: a leading segment is dropped ONLY to re-test the dedicated\n // surface shapes, never to decide anything else, and a segment that names a\n // memory CATEGORY (`facts/proj/activity/…`) is never treated as a\n // collection, so ordinary nested memories stay searchable.\n for (const candidate of collectionSpellings(filePath, policy, source)) {\n if (\n isArtifactMemoryPath(candidate) ||\n isNamespacedActivityDigestPath(candidate, policy.memoryDir) ||\n isNamespacedLocationDayPath(candidate, policy.memoryDir) ||\n isNamespacedJournalDayPath(candidate, policy.memoryDir) ||\n isMeetingRecordPath(candidate)\n ) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The activity check, applied against the NAMESPACE root a hit came from.\n *\n * `isActivityDigestPath` is root-aware — the digest must sit directly under\n * the root it is given — but a namespaced search rewrites hits to absolute\n * paths beneath `…/namespaces/<ns>/`, and only the global `memoryDir` is\n * available here. Measured against that root, a real digest at\n * `<memoryDir>/namespaces/team/activity/<date>.md` reads as nested and is\n * served. Re-measuring against the namespace's own root closes that.\n */\nfunction isNamespacedActivityDigestPath(candidate: string, memoryDir?: string): boolean {\n if (isActivityDigestPath(candidate, memoryDir)) return true;\n if (memoryDir === undefined || memoryDir.length === 0) return false;\n const relative = path.relative(memoryDir, path.resolve(memoryDir, candidate));\n const namespaced = /^namespaces[\\\\/]([^\\\\/]+)[\\\\/](.*)$/.exec(relative);\n if (namespaced === null) return false;\n return isActivityDigestPath(namespaced[2] ?? \"\", memoryDir);\n}\n\n/**\n * The location day-file check, applied against the NAMESPACE root a hit came\n * from — same rationale as `isNamespacedActivityDigestPath`: a namespaced\n * search rewrites hits to absolute paths beneath `…/namespaces/<ns>/`, so the\n * root-aware predicate is re-measured against the namespace's own root.\n */\nfunction isNamespacedLocationDayPath(candidate: string, memoryDir?: string): boolean {\n if (isLocationDayPath(candidate, memoryDir)) return true;\n if (memoryDir === undefined || memoryDir.length === 0) return false;\n const relative = path.relative(memoryDir, path.resolve(memoryDir, candidate));\n const namespaced = /^namespaces[\\\\/]([^\\\\/]+)[\\\\/](.*)$/.exec(relative);\n if (namespaced === null) return false;\n return isLocationDayPath(namespaced[2] ?? \"\", memoryDir);\n}\n\nfunction isNamespacedJournalDayPath(candidate: string, memoryDir?: string): boolean {\n if (isJournalDayPath(candidate, memoryDir)) return true;\n if (memoryDir === undefined || memoryDir.length === 0) return false;\n const relative = path.relative(memoryDir, path.resolve(memoryDir, candidate));\n const namespaced = /^namespaces[\\\\/]([^\\\\/]+)[\\\\/](.*)$/.exec(relative);\n if (namespaced === null) return false;\n return isJournalDayPath(namespaced[2] ?? \"\", memoryDir);\n}\n\n/** A path as given, plus its form with a leading COLLECTION segment removed. */\nfunction collectionSpellings(\n filePath: string,\n policy: GenericRecallPathPolicy,\n source: GenericRecallPathSource,\n): string[] {\n if (path.isAbsolute(filePath)) return [filePath];\n // A `qmd://<collection>/<path>` URI states its collection UNAMBIGUOUSLY in\n // the authority, so the leading segment of its normalized form is never a\n // memory category — strip it outright rather than guessing.\n if (source === \"qmd\" && filePath.startsWith(\"qmd://\")) {\n const normalized = path.posix.normalize(normalizeQmdUriPath(filePath, source).replace(/\\\\/g, \"/\"));\n const slashIndex = normalized.indexOf(\"/\");\n return slashIndex <= 0 || slashIndex >= normalized.length - 1\n ? [normalized]\n : [normalized, normalized.slice(slashIndex + 1)];\n }\n const normalized = path.posix.normalize(\n normalizeQmdUriPath(filePath, source).replace(/\\\\/g, \"/\"),\n );\n const stripped = stripQmdCollectionPrefix(filePath, policy, source);\n const spellings = [stripped];\n // If the AUTHORITATIVE strip already fired — the prefix matched a configured\n // collection — stop. Removing a second segment would take a real directory\n // with it: `memories/projects/activity/<date>.md` would become\n // `activity/<date>.md` and an ordinary nested memory would read as a\n // top-level digest, vanishing from search AND recall.\n if (stripped !== normalized) return spellings;\n const slashIndex = stripped.indexOf(\"/\");\n if (slashIndex <= 0 || slashIndex >= stripped.length - 1) return spellings;\n const prefix = stripped.slice(0, slashIndex);\n // The CALLER's own collection is authoritative: a request for\n // `collection: \"facts\"` means that segment is the collection, whatever it is\n // also the name of. Otherwise a category-shaped prefix stays part of the\n // path, so an ordinary `facts/proj/activity/<date>.md` memory is searchable.\n const requested = policy.requestedCollection;\n if (\n prefix !== requested &&\n (Object.hasOwn(CATEGORY_MEMORY_ROOTS, prefix) || Object.hasOwn(RESERVED_ARCHIVE_ROOTS, prefix))\n ) {\n return spellings;\n }\n spellings.push(stripped.slice(slashIndex + 1));\n return spellings;\n}\n\nexport function isGenericRecallExcludedPath(\n filePath: string,\n policy: GenericRecallPathPolicy = {},\n source: GenericRecallPathSource = \"filesystem\",\n): boolean {\n return (\n isSearchExcludedPath(filePath, policy, source) ||\n isTopLevelArchivePath(filePath, policy, source) ||\n OKF_RESERVED_BASENAMES[path.basename(filePath)] === true ||\n // Derived per-directory sidecars (#2977): recall-excluded like OKF index\n // files, still searchable. Basename-only, the same accepted tradeoff.\n path.basename(filePath) === DIRECTORY_SIDECAR_BASENAME\n );\n}\n\nexport function filterRecallCandidates(\n candidates: QmdSearchResult[],\n options: {\n namespacesEnabled: boolean;\n recallNamespaces: string[];\n resolveNamespace: (path: string) => string;\n limit: number;\n pathPolicy?: GenericRecallPathPolicy;\n memoryRoot?: string;\n },\n): QmdSearchResult[] {\n const pathPolicy =\n options.pathPolicy ??\n (options.memoryRoot === undefined ? undefined : { memoryDir: options.memoryRoot });\n const scopedByNamespace = options.namespacesEnabled\n ? candidates.filter((r) =>\n options.recallNamespaces.includes(r.namespace ?? options.resolveNamespace(r.path)),\n )\n : candidates;\n return scopedByNamespace\n .filter((r) => !isGenericRecallExcludedPath(r.path, pathPolicy, \"qmd\"))\n .slice(0, Math.max(0, options.limit));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,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A,WAAO;AAAA,EACT;AACA,YAAU,KAAK,SAAS,MAAM,aAAa,CAAC,CAAC;AAC7C,SAAO;AACT;AAEO,SAAS,4BACd,UACA,SAAkC,CAAC,GACnC,SAAkC,cACzB;AACT,SACE,qBAAqB,UAAU,QAAQ,MAAM,KAC7C,sBAAsB,UAAU,QAAQ,MAAM,KAC9C,uBAAuBA,MAAK,SAAS,QAAQ,CAAC,MAAM;AAAA;AAAA,EAGpDA,MAAK,SAAS,QAAQ,MAAM;AAEhC;AAEO,SAAS,uBACd,YACA,SAQmB;AACnB,QAAM,aACJ,QAAQ,eACP,QAAQ,eAAe,SAAY,SAAY,EAAE,WAAW,QAAQ,WAAW;AAClF,QAAM,oBAAoB,QAAQ,oBAC9B,WAAW;AAAA,IAAO,CAAC,MACjB,QAAQ,iBAAiB,SAAS,EAAE,aAAa,QAAQ,iBAAiB,EAAE,IAAI,CAAC;AAAA,EACnF,IACA;AACJ,SAAO,kBACJ,OAAO,CAAC,MAAM,CAAC,4BAA4B,EAAE,MAAM,YAAY,KAAK,CAAC,EACrE,MAAM,GAAG,KAAK,IAAI,GAAG,QAAQ,KAAK,CAAC;AACxC;","names":["path","path","normalized","slashIndex"]}
|
|
1
|
+
{"version":3,"sources":["../src/activity/journal.ts","../src/orchestration/generic-recall-paths.ts"],"sourcesContent":["/**\n * User-owned daily journal (issue #1984 PR1).\n *\n * Files live at `<memoryDir>/journal/<YYYY-MM-DD>.md` — inside the memory\n * directory but outside scan roots, same placement as activity digests.\n * Once written, Remnic never rewrites the file except `seed` with force.\n * All writes go through writeJournalFile, which stats first.\n */\nimport { mkdirSync, statSync, writeFileSync } from \"node:fs\";\nimport path from \"node:path\";\n\nimport { isValidActivityDate } from \"./digest.js\";\n\nexport const JOURNAL_DIR_NAME = \"journal\";\n\n/** Minimal card shape the seed renderer needs. TimelineCard is assignable. */\nexport interface JournalSeedCard {\n title: string;\n startUtc: string;\n endUtc: string;\n}\n\nexport interface SeedJournalInput {\n memoryDir: string;\n date: string;\n cards?: readonly JournalSeedCard[];\n force?: boolean;\n}\n\nexport interface SeedJournalResult {\n path: string;\n wrote: boolean;\n}\n\nconst JOURNAL_DAY_TOPLEVEL = /^journal[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\nconst JOURNAL_DAY_ANYWHERE = /(?:^|[\\\\/])journal[\\\\/]\\d{4}-\\d{2}-\\d{2}\\.md$/i;\n\nexport function journalPath(memoryDir: string, date: string): string {\n if (!isValidActivityDate(date)) {\n throw new RangeError(`Invalid journal date \"${date}\"; expected YYYY-MM-DD.`);\n }\n return path.join(memoryDir, JOURNAL_DIR_NAME, `${date}.md`);\n}\n\n/**\n * Root-aware journal day-file check. With a memory root, only the top-level\n * `journal/<date>.md` matches so a nested `facts/journal/<date>.md` stays\n * recallable. Without a root, fall back to the day-file shape anywhere.\n */\nexport function isJournalDayPath(filePath: string, memoryRoot?: string): boolean {\n if (memoryRoot !== undefined && memoryRoot.length > 0) {\n const relative = path.relative(memoryRoot, path.resolve(memoryRoot, filePath));\n return JOURNAL_DAY_TOPLEVEL.test(relative);\n }\n return JOURNAL_DAY_ANYWHERE.test(filePath);\n}\n\nexport function todayJournalDate(now: Date = new Date()): string {\n const year = now.getFullYear();\n const month = String(now.getMonth() + 1).padStart(2, \"0\");\n const day = String(now.getDate()).padStart(2, \"0\");\n return `${year}-${month}-${day}`;\n}\n\nfunction formatCardDuration(card: JournalSeedCard): string {\n const start = Date.parse(card.startUtc);\n const end = Date.parse(card.endUtc);\n const minutes =\n Number.isFinite(start) && Number.isFinite(end) && end > start\n ? Math.round((end - start) / 60_000)\n : 0;\n return `${minutes}m`;\n}\n\nfunction renderJournalSeed(date: string, cards: readonly JournalSeedCard[]): string {\n const ordered = [...cards].sort((left, right) => {\n const byStart = left.startUtc.localeCompare(right.startUtc);\n return byStart !== 0 ? byStart : left.title.localeCompare(right.title);\n });\n const glance =\n ordered.length === 0\n ? [\"_No cards._\"]\n : ordered.map((card) => `- ${formatCardDuration(card)} ${card.title}`);\n return [`# Journal — ${date}`, \"\", \"## Day at a glance\", \"\", ...glance, \"\", \"## Notes\", \"\", \"\"].join(\n \"\\n\",\n );\n}\n\n/** The only journal write. Stats first; existing files are a no-op unless force. */\nexport function writeJournalFile(filePath: string, content: string, force: boolean): boolean {\n let exists = false;\n try {\n statSync(filePath);\n exists = true;\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code;\n if (code !== \"ENOENT\") throw err;\n }\n if (exists && !force) return false;\n mkdirSync(path.dirname(filePath), { recursive: true });\n writeFileSync(filePath, content);\n return true;\n}\n\nexport function seedJournal(input: SeedJournalInput): SeedJournalResult {\n const filePath = journalPath(input.memoryDir, input.date);\n const wrote = writeJournalFile(\n filePath,\n renderJournalSeed(input.date, input.cards ?? []),\n input.force === true,\n );\n return { path: filePath, wrote };\n}\n","import path from \"node:path\";\nimport type { QmdSearchResult } from \"../types.js\";\nimport { isExternalWikiCollectionName } from \"../external-wiki-guard.js\";\nexport { isExternalWikiCollectionName } from \"../external-wiki-guard.js\";\nimport { ALL_CATEGORY_DIRS } from \"../utils/category-dir.js\";\nimport {\n isActivityDigestPath,\n isArtifactMemoryPath,\n isLocationDayPath,\n isMeetingRecordPath,\n} from \"./orchestrator-helpers.js\";\nimport { isJournalDayPath } from \"../activity/journal.js\";\nimport { DIRECTORY_SIDECAR_BASENAME } from \"../directory-sidecars.js\";\nimport { OKF_RESERVED_BASENAMES } from \"../okf/type-mapping.js\";\n\n\nexport interface GenericRecallPathPolicy {\n readonly memoryDir?: string;\n readonly qmdCollection?: string;\n readonly qmdColdCollection?: string;\n /**\n * The collection THIS request named, when it named one. A caller may select\n * a custom collection whose name is also a memory category, which the\n * configured names alone cannot disambiguate.\n */\n readonly requestedCollection?: string;\n}\n\ntype GenericRecallPathSource = \"filesystem\" | \"qmd\";\n\nconst CATEGORY_MEMORY_ROOTS: Record<string, true> = Object.fromEntries(\n ALL_CATEGORY_DIRS.map((directory) => [directory, true]),\n);\nconst RESERVED_ARCHIVE_ROOTS: Record<string, true> = { archive: true, namespaces: true };\n\nfunction isQmdCollectionPrefix(\n prefix: string,\n collection: string | undefined,\n source: GenericRecallPathSource,\n): boolean {\n if (typeof collection !== \"string\" || collection.length === 0) return false;\n if (prefix.startsWith(`${collection}--`)) return true;\n if (prefix !== collection) return false;\n if (source === \"qmd\") return true;\n return (\n !Object.hasOwn(CATEGORY_MEMORY_ROOTS, prefix) &&\n !Object.hasOwn(RESERVED_ARCHIVE_ROOTS, prefix)\n );\n}\n\nfunction normalizeQmdUriPath(relativePath: string, source: GenericRecallPathSource): string {\n if (source !== \"qmd\" || !relativePath.startsWith(\"qmd://\")) return relativePath;\n try {\n const parsed = new URL(relativePath);\n if (parsed.protocol !== \"qmd:\" || !parsed.hostname) return relativePath;\n const collection = decodeURIComponent(parsed.hostname);\n const pathname = decodeURIComponent(parsed.pathname.replace(/^\\/+/, \"\"));\n return pathname ? `${collection}/${pathname}` : collection;\n } catch {\n return relativePath;\n }\n}\n\nfunction stripQmdCollectionPrefix(\n relativePath: string,\n policy: GenericRecallPathPolicy,\n source: GenericRecallPathSource,\n): string {\n const normalized = path.posix.normalize(normalizeQmdUriPath(relativePath, source).replace(/\\\\/g, \"/\"));\n const slashIndex = normalized.indexOf(\"/\");\n if (slashIndex <= 0 || slashIndex >= normalized.length - 1) return normalized;\n\n const prefix = normalized.slice(0, slashIndex);\n const matchesHotCollection = isQmdCollectionPrefix(prefix, policy.qmdCollection, source);\n const matchesColdCollection = isQmdCollectionPrefix(prefix, policy.qmdColdCollection, source);\n return matchesHotCollection || matchesColdCollection\n ? normalized.slice(slashIndex + 1)\n : normalized;\n}\n\nexport function isTopLevelArchivePath(\n filePath: string,\n policy: GenericRecallPathPolicy = {},\n source: GenericRecallPathSource = \"filesystem\",\n): boolean {\n const isAbsolutePath = path.isAbsolute(filePath);\n const relative =\n policy.memoryDir && isAbsolutePath\n ? path.relative(policy.memoryDir, path.resolve(filePath))\n : filePath;\n const normalized = !isAbsolutePath\n ? stripQmdCollectionPrefix(relative, policy, source)\n : relative;\n return /^(?:archive|namespaces[\\\\/][^\\\\/]+[\\\\/]archive)(?:[\\\\/]|$)/i.test(normalized);\n}\n\nfunction isExternalWikiQmdPath(\n filePath: string,\n source: GenericRecallPathSource,\n): boolean {\n if (source !== \"qmd\") return false;\n const normalized = normalizeQmdUriPath(filePath, source).replace(/\\\\/g, \"/\");\n const slashIndex = normalized.indexOf(\"/\");\n const collection = slashIndex === -1 ? normalized : normalized.slice(0, slashIndex);\n return isExternalWikiCollectionName(collection);\n}\n\n/**\n * Paths an EXPLICIT ranked search must not return.\n *\n * Narrower than {@link isGenericRecallExcludedPath} on purpose. Recall\n * injection also drops archived memories because they are cold by definition,\n * but archive is explicitly reserved for \"explicit read or search surfaces\"\n * (docs/architecture/memory-lifecycle.md) — hiding it from `memory_search`\n * would remove the only way to find it. Everything else stays excluded: those\n * paths flow through their own dedicated surfaces, never a generic search.\n */\nexport function isSearchExcludedPath(\n filePath: string,\n policy: GenericRecallPathPolicy = {},\n source: GenericRecallPathSource = \"filesystem\",\n): boolean {\n if (isExternalWikiQmdPath(filePath, source)) return true;\n // A QMD transport hands back collection-qualified paths\n // (`qmd://<collection>/activity/<date>.md`, or `<collection>/activity/…`),\n // and the collection is not always one this policy knows: a caller may name\n // a custom one, and global search spans every collection. The activity\n // predicate is ROOT-AWARE — it matches only the top-level\n // `activity/<date>.md` so a nested ordinary memory stays recallable — so an\n // un-stripped prefix reads as a nested path and the digest would be served.\n //\n // Both spellings are therefore tested. Widening is safe in this direction\n // and only here: a leading segment is dropped ONLY to re-test the dedicated\n // surface shapes, never to decide anything else, and a segment that names a\n // memory CATEGORY (`facts/proj/activity/…`) is never treated as a\n // collection, so ordinary nested memories stay searchable.\n for (const candidate of collectionSpellings(filePath, policy, source)) {\n if (\n isArtifactMemoryPath(candidate) ||\n isNamespacedActivityDigestPath(candidate, policy.memoryDir) ||\n isNamespacedLocationDayPath(candidate, policy.memoryDir) ||\n isNamespacedJournalDayPath(candidate, policy.memoryDir) ||\n isMeetingRecordPath(candidate)\n ) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The activity check, applied against the NAMESPACE root a hit came from.\n *\n * `isActivityDigestPath` is root-aware — the digest must sit directly under\n * the root it is given — but a namespaced search rewrites hits to absolute\n * paths beneath `…/namespaces/<ns>/`, and only the global `memoryDir` is\n * available here. Measured against that root, a real digest at\n * `<memoryDir>/namespaces/team/activity/<date>.md` reads as nested and is\n * served. Re-measuring against the namespace's own root closes that.\n */\nfunction isNamespacedActivityDigestPath(candidate: string, memoryDir?: string): boolean {\n if (isActivityDigestPath(candidate, memoryDir)) return true;\n if (memoryDir === undefined || memoryDir.length === 0) return false;\n const relative = path.relative(memoryDir, path.resolve(memoryDir, candidate));\n const namespaced = /^namespaces[\\\\/]([^\\\\/]+)[\\\\/](.*)$/.exec(relative);\n if (namespaced === null) return false;\n return isActivityDigestPath(namespaced[2] ?? \"\", memoryDir);\n}\n\n/**\n * The location day-file check, applied against the NAMESPACE root a hit came\n * from — same rationale as `isNamespacedActivityDigestPath`: a namespaced\n * search rewrites hits to absolute paths beneath `…/namespaces/<ns>/`, so the\n * root-aware predicate is re-measured against the namespace's own root.\n */\nfunction isNamespacedLocationDayPath(candidate: string, memoryDir?: string): boolean {\n if (isLocationDayPath(candidate, memoryDir)) return true;\n if (memoryDir === undefined || memoryDir.length === 0) return false;\n const relative = path.relative(memoryDir, path.resolve(memoryDir, candidate));\n const namespaced = /^namespaces[\\\\/]([^\\\\/]+)[\\\\/](.*)$/.exec(relative);\n if (namespaced === null) return false;\n return isLocationDayPath(namespaced[2] ?? \"\", memoryDir);\n}\n\nfunction isNamespacedJournalDayPath(candidate: string, memoryDir?: string): boolean {\n if (isJournalDayPath(candidate, memoryDir)) return true;\n if (memoryDir === undefined || memoryDir.length === 0) return false;\n const relative = path.relative(memoryDir, path.resolve(memoryDir, candidate));\n const namespaced = /^namespaces[\\\\/]([^\\\\/]+)[\\\\/](.*)$/.exec(relative);\n if (namespaced === null) return false;\n return isJournalDayPath(namespaced[2] ?? \"\", memoryDir);\n}\n\n/** A path as given, plus its form with a leading COLLECTION segment removed. */\nfunction collectionSpellings(\n filePath: string,\n policy: GenericRecallPathPolicy,\n source: GenericRecallPathSource,\n): string[] {\n if (path.isAbsolute(filePath)) return [filePath];\n // A `qmd://<collection>/<path>` URI states its collection UNAMBIGUOUSLY in\n // the authority, so the leading segment of its normalized form is never a\n // memory category — strip it outright rather than guessing.\n if (source === \"qmd\" && filePath.startsWith(\"qmd://\")) {\n const normalized = path.posix.normalize(normalizeQmdUriPath(filePath, source).replace(/\\\\/g, \"/\"));\n const slashIndex = normalized.indexOf(\"/\");\n return slashIndex <= 0 || slashIndex >= normalized.length - 1\n ? [normalized]\n : [normalized, normalized.slice(slashIndex + 1)];\n }\n const normalized = path.posix.normalize(\n normalizeQmdUriPath(filePath, source).replace(/\\\\/g, \"/\"),\n );\n const stripped = stripQmdCollectionPrefix(filePath, policy, source);\n const spellings = [stripped];\n // If the AUTHORITATIVE strip already fired — the prefix matched a configured\n // collection — stop. Removing a second segment would take a real directory\n // with it: `memories/projects/activity/<date>.md` would become\n // `activity/<date>.md` and an ordinary nested memory would read as a\n // top-level digest, vanishing from search AND recall.\n if (stripped !== normalized) return spellings;\n const slashIndex = stripped.indexOf(\"/\");\n if (slashIndex <= 0 || slashIndex >= stripped.length - 1) return spellings;\n const prefix = stripped.slice(0, slashIndex);\n // The CALLER's own collection is authoritative: a request for\n // `collection: \"facts\"` means that segment is the collection, whatever it is\n // also the name of. Otherwise a category-shaped prefix stays part of the\n // path, so an ordinary `facts/proj/activity/<date>.md` memory is searchable.\n const requested = policy.requestedCollection;\n if (\n prefix !== requested &&\n (Object.hasOwn(CATEGORY_MEMORY_ROOTS, prefix) || Object.hasOwn(RESERVED_ARCHIVE_ROOTS, prefix))\n ) {\n return spellings;\n }\n spellings.push(stripped.slice(slashIndex + 1));\n return spellings;\n}\n\nexport function isGenericRecallExcludedPath(\n filePath: string,\n policy: GenericRecallPathPolicy = {},\n source: GenericRecallPathSource = \"filesystem\",\n): boolean {\n return (\n isSearchExcludedPath(filePath, policy, source) ||\n isTopLevelArchivePath(filePath, policy, source) ||\n OKF_RESERVED_BASENAMES[path.basename(filePath)] === true ||\n // Derived per-directory sidecars (#2977): recall-excluded like OKF index\n // files, still searchable. Basename-only, the same accepted tradeoff.\n path.basename(filePath) === DIRECTORY_SIDECAR_BASENAME\n );\n}\n\nexport function filterRecallCandidates(\n candidates: QmdSearchResult[],\n options: {\n namespacesEnabled: boolean;\n recallNamespaces: string[];\n resolveNamespace: (path: string) => string;\n limit: number;\n pathPolicy?: GenericRecallPathPolicy;\n memoryRoot?: string;\n },\n): QmdSearchResult[] {\n const pathPolicy =\n options.pathPolicy ??\n (options.memoryRoot === undefined ? undefined : { memoryDir: options.memoryRoot });\n const scopedByNamespace = options.namespacesEnabled\n ? candidates.filter((r) =>\n options.recallNamespaces.includes(r.namespace ?? options.resolveNamespace(r.path)),\n )\n : candidates;\n return scopedByNamespace\n .filter((r) => !isGenericRecallExcludedPath(r.path, pathPolicy, \"qmd\"))\n .slice(0, Math.max(0, options.limit));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,WAAW,UAAU,qBAAqB;AACnD,OAAO,UAAU;AAIV,IAAM,mBAAmB;AAqBhC,IAAM,uBAAuB;AAC7B,IAAM,uBAAuB;AAEtB,SAAS,YAAY,WAAmB,MAAsB;AACnE,MAAI,CAAC,oBAAoB,IAAI,GAAG;AAC9B,UAAM,IAAI,WAAW,yBAAyB,IAAI,yBAAyB;AAAA,EAC7E;AACA,SAAO,KAAK,KAAK,WAAW,kBAAkB,GAAG,IAAI,KAAK;AAC5D;AAOO,SAAS,iBAAiB,UAAkB,YAA8B;AAC/E,MAAI,eAAe,UAAa,WAAW,SAAS,GAAG;AACrD,UAAM,WAAW,KAAK,SAAS,YAAY,KAAK,QAAQ,YAAY,QAAQ,CAAC;AAC7E,WAAO,qBAAqB,KAAK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AAC,MACjB,QAAQ,iBAAiB,SAAS,EAAE,aAAa,QAAQ,iBAAiB,EAAE,IAAI,CAAC;AAAA,EACnF,IACA;AACJ,SAAO,kBACJ,OAAO,CAAC,MAAM,CAAC,4BAA4B,EAAE,MAAM,YAAY,KAAK,CAAC,EACrE,MAAM,GAAG,KAAK,IAAI,GAAG,QAAQ,KAAK,CAAC;AACxC;","names":["path","path","normalized","slashIndex"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SupportPassportError,
|
|
3
3
|
getOperation
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FMT52ROU.js";
|
|
5
5
|
import {
|
|
6
6
|
abortError,
|
|
7
7
|
isAbortError
|
|
@@ -499,4 +499,4 @@ export {
|
|
|
499
499
|
buildSupportPassportPublicRequestHandler,
|
|
500
500
|
composeSupportPassportExternalRequestHandlers
|
|
501
501
|
};
|
|
502
|
-
//# sourceMappingURL=chunk-
|
|
502
|
+
//# sourceMappingURL=chunk-7QXTCONH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFrontmatter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YUAOU2B2.js";
|
|
4
4
|
import {
|
|
5
5
|
activityDigestPath,
|
|
6
6
|
isValidActivityDate
|
|
@@ -199,4 +199,4 @@ export {
|
|
|
199
199
|
buildStandup,
|
|
200
200
|
standupHelp
|
|
201
201
|
};
|
|
202
|
-
//# sourceMappingURL=chunk-
|
|
202
|
+
//# sourceMappingURL=chunk-7WO66MKJ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-KJTKLXTH.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YUAOU2B2.js";
|
|
7
7
|
import {
|
|
8
8
|
assertInjectedStorageRooted
|
|
9
9
|
} from "./chunk-JE334SIA.js";
|
|
@@ -260,4 +260,4 @@ export {
|
|
|
260
260
|
backupExistingLedger,
|
|
261
261
|
rebuildMemoryLifecycleLedger
|
|
262
262
|
};
|
|
263
|
-
//# sourceMappingURL=chunk-
|
|
263
|
+
//# sourceMappingURL=chunk-A2XDQ3JW.js.map
|
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
loadSyncState,
|
|
7
7
|
syncWearableSource,
|
|
8
8
|
wearableSourceLabel
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JX6USXZR.js";
|
|
10
|
+
import {
|
|
11
|
+
runPeerProfileReasoner
|
|
12
|
+
} from "./chunk-I74SUMNI.js";
|
|
10
13
|
import {
|
|
11
14
|
CompressionGuidelineCoordinator
|
|
12
15
|
} from "./chunk-IW3RMBPB.js";
|
|
13
16
|
import {
|
|
14
17
|
ActivityStore,
|
|
15
18
|
MaintenanceScheduler
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
runPeerProfileReasoner
|
|
19
|
-
} from "./chunk-I74SUMNI.js";
|
|
19
|
+
} from "./chunk-LZLJK2IA.js";
|
|
20
20
|
import {
|
|
21
21
|
migrateFromEngram
|
|
22
22
|
} from "./chunk-VZAKYDMJ.js";
|
|
23
23
|
import {
|
|
24
24
|
LcmEngine
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2L5FSNPC.js";
|
|
26
26
|
import {
|
|
27
27
|
chunkTranscriptEntries
|
|
28
28
|
} from "./chunk-TECVW3JP.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
CompoundingEngine,
|
|
34
34
|
defaultTierMigrationCycleBudget
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-X3NZ2HAO.js";
|
|
36
36
|
import {
|
|
37
37
|
SharedContextManager
|
|
38
38
|
} from "./chunk-7CRUDH7G.js";
|
|
@@ -44,6 +44,9 @@ import {
|
|
|
44
44
|
applyUtilityRankingRuntimeDelta,
|
|
45
45
|
loadUtilityRuntimeValues
|
|
46
46
|
} from "./chunk-SWIKABKI.js";
|
|
47
|
+
import {
|
|
48
|
+
decideTierTransition
|
|
49
|
+
} from "./chunk-GCBIXUPT.js";
|
|
47
50
|
import {
|
|
48
51
|
TmtBuilder
|
|
49
52
|
} from "./chunk-ECZU5BJH.js";
|
|
@@ -59,9 +62,6 @@ import {
|
|
|
59
62
|
import {
|
|
60
63
|
TierMigrationExecutor
|
|
61
64
|
} from "./chunk-YRFAYOFQ.js";
|
|
62
|
-
import {
|
|
63
|
-
decideTierTransition
|
|
64
|
-
} from "./chunk-GCBIXUPT.js";
|
|
65
65
|
import {
|
|
66
66
|
buildTargetedFactRecallSection,
|
|
67
67
|
shouldRecallTargetedFactEvidence
|
|
@@ -113,18 +113,18 @@ import {
|
|
|
113
113
|
reorderByRankedKeys,
|
|
114
114
|
rerankLocalOrNoop
|
|
115
115
|
} from "./chunk-LUDXM7MD.js";
|
|
116
|
+
import {
|
|
117
|
+
StateViewAnchorTracker,
|
|
118
|
+
filterRecentScanMemories,
|
|
119
|
+
stateViewPacketActive
|
|
120
|
+
} from "./chunk-G2DF5MI7.js";
|
|
116
121
|
import {
|
|
117
122
|
indexStateViewAnnotatedResults,
|
|
118
123
|
resolveRecallStateViewActive
|
|
119
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-AZ2X5LNA.js";
|
|
120
125
|
import {
|
|
121
126
|
applyRecallStateViews
|
|
122
127
|
} from "./chunk-DBB5JPSL.js";
|
|
123
|
-
import {
|
|
124
|
-
StateViewAnchorTracker,
|
|
125
|
-
filterRecentScanMemories,
|
|
126
|
-
stateViewPacketActive
|
|
127
|
-
} from "./chunk-G2DF5MI7.js";
|
|
128
128
|
import {
|
|
129
129
|
dedupeResultsByNamespace,
|
|
130
130
|
hasMemoryForResult,
|
|
@@ -136,15 +136,15 @@ import {
|
|
|
136
136
|
import {
|
|
137
137
|
reorderRecallResultsWithMmr
|
|
138
138
|
} from "./chunk-YDBIWGNI.js";
|
|
139
|
+
import {
|
|
140
|
+
applyReasoningTraceBoost
|
|
141
|
+
} from "./chunk-ZZTOURJI.js";
|
|
139
142
|
import {
|
|
140
143
|
compactRecallContextFromBuckets,
|
|
141
144
|
decideRecallContextComposition,
|
|
142
145
|
notifyContextComposition,
|
|
143
146
|
recallFailureComposition
|
|
144
147
|
} from "./chunk-HPWJ5B7D.js";
|
|
145
|
-
import {
|
|
146
|
-
applyReasoningTraceBoost
|
|
147
|
-
} from "./chunk-ZZTOURJI.js";
|
|
148
148
|
import {
|
|
149
149
|
installPrioritizedEmbedding
|
|
150
150
|
} from "./chunk-ROI7BK7H.js";
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
} from "./chunk-OH7QLI6W.js";
|
|
182
182
|
import {
|
|
183
183
|
ExtractionEngine
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-IVH7INFM.js";
|
|
185
185
|
import {
|
|
186
186
|
parseMemoryActionEligibilityContext
|
|
187
187
|
} from "./chunk-JHU4EYDV.js";
|
|
@@ -195,6 +195,10 @@ import {
|
|
|
195
195
|
judgeFactDurability,
|
|
196
196
|
validateProcedureExtraction
|
|
197
197
|
} from "./chunk-DQISIT63.js";
|
|
198
|
+
import {
|
|
199
|
+
pickFactEventTimeAnchor,
|
|
200
|
+
resolveFactEventTime
|
|
201
|
+
} from "./chunk-IAIPNEHD.js";
|
|
198
202
|
import {
|
|
199
203
|
buildExplicitCueRecallSection
|
|
200
204
|
} from "./chunk-TVIVY7KU.js";
|
|
@@ -208,26 +212,22 @@ import {
|
|
|
208
212
|
shouldRecallEventOrderEvidence
|
|
209
213
|
} from "./chunk-BUYVPUEM.js";
|
|
210
214
|
import {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
} from "./chunk-IAIPNEHD.js";
|
|
215
|
+
EmbeddingFallback
|
|
216
|
+
} from "./chunk-RB776UH3.js";
|
|
214
217
|
import {
|
|
215
218
|
buildEntityRecallSection,
|
|
216
219
|
entityRecentTranscriptLookbackHours,
|
|
217
220
|
readRecentEntityTranscriptEntries
|
|
218
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-7DZHRPCO.js";
|
|
219
222
|
import {
|
|
220
223
|
tryDirectAnswer
|
|
221
224
|
} from "./chunk-VY47VI2T.js";
|
|
222
|
-
import {
|
|
223
|
-
EmbeddingFallback
|
|
224
|
-
} from "./chunk-RB776UH3.js";
|
|
225
225
|
import {
|
|
226
226
|
formatDaySummaryMemories
|
|
227
227
|
} from "./chunk-65I2LZEK.js";
|
|
228
228
|
import {
|
|
229
229
|
refreshConvergedNamespaces
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-OHRIBMSS.js";
|
|
231
231
|
import {
|
|
232
232
|
builtInConnectorPackageSpecifier,
|
|
233
233
|
ensureBuiltInWearableConnectors,
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
runTimelinePublishCli,
|
|
237
237
|
screenCandidateFact,
|
|
238
238
|
summarizeVaultPublish
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-CYCE3L2I.js";
|
|
240
240
|
import {
|
|
241
241
|
normalizeReplaySessionKey
|
|
242
242
|
} from "./chunk-AJVLDJU6.js";
|
|
@@ -246,30 +246,30 @@ import {
|
|
|
246
246
|
import {
|
|
247
247
|
compareVerifiedEpisodeResults,
|
|
248
248
|
searchVerifiedEpisodes
|
|
249
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-UKB7ZDKK.js";
|
|
250
250
|
import {
|
|
251
251
|
ThreadingManager
|
|
252
252
|
} from "./chunk-OJP3N7UK.js";
|
|
253
253
|
import {
|
|
254
254
|
compareVerifiedSemanticRuleResults,
|
|
255
255
|
searchVerifiedSemanticRules
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-X33QB7LW.js";
|
|
257
257
|
import {
|
|
258
258
|
searchWorkProductLedgerEntries
|
|
259
259
|
} from "./chunk-G7NYVKD6.js";
|
|
260
260
|
import {
|
|
261
261
|
TranscriptManager
|
|
262
262
|
} from "./chunk-AM4T6CHX.js";
|
|
263
|
-
import {
|
|
264
|
-
PolicyRuntimeManager
|
|
265
|
-
} from "./chunk-2LA3H54D.js";
|
|
266
263
|
import {
|
|
267
264
|
runNamespaceMaintenanceFanout,
|
|
268
265
|
summarizeNamespaceMaintenanceHealth
|
|
269
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-DSQWTXHP.js";
|
|
270
267
|
import {
|
|
271
268
|
planNamespaceMaintenance
|
|
272
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-QJAGDPY7.js";
|
|
270
|
+
import {
|
|
271
|
+
PolicyRuntimeManager
|
|
272
|
+
} from "./chunk-2LA3H54D.js";
|
|
273
273
|
import {
|
|
274
274
|
isAboveImportanceThreshold,
|
|
275
275
|
scoreImportance
|
|
@@ -298,7 +298,7 @@ import {
|
|
|
298
298
|
materializeAfterSemanticConsolidation,
|
|
299
299
|
parseConsolidationResponse,
|
|
300
300
|
parseOperatorAwareConsolidationResponse
|
|
301
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-RGX4DGOG.js";
|
|
302
302
|
import {
|
|
303
303
|
semanticChunkContent
|
|
304
304
|
} from "./chunk-2GBFKHBZ.js";
|
|
@@ -307,7 +307,7 @@ import {
|
|
|
307
307
|
} from "./chunk-6TBIWIAG.js";
|
|
308
308
|
import {
|
|
309
309
|
SmartBuffer
|
|
310
|
-
} from "./chunk-
|
|
310
|
+
} from "./chunk-BNPLDVM6.js";
|
|
311
311
|
import {
|
|
312
312
|
buildRecallQueryPolicy
|
|
313
313
|
} from "./chunk-C6WMSXCJ.js";
|
|
@@ -337,7 +337,7 @@ import {
|
|
|
337
337
|
embeddingsFromCosineHits,
|
|
338
338
|
normalizeConnectorScope,
|
|
339
339
|
runSeedGraduationPass
|
|
340
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-RRMIACBG.js";
|
|
341
341
|
import {
|
|
342
342
|
compileCorrectionRule,
|
|
343
343
|
correctionsFilePath,
|
|
@@ -363,7 +363,7 @@ import {
|
|
|
363
363
|
} from "./chunk-QW27DOHG.js";
|
|
364
364
|
import {
|
|
365
365
|
MeetingsInputError
|
|
366
|
-
} from "./chunk-
|
|
366
|
+
} from "./chunk-IILMR37Z.js";
|
|
367
367
|
import {
|
|
368
368
|
WearablesInputError,
|
|
369
369
|
describeErrorForOperator
|
|
@@ -381,7 +381,7 @@ import {
|
|
|
381
381
|
} from "./chunk-MFZACYZ6.js";
|
|
382
382
|
import {
|
|
383
383
|
NamespaceCatalog
|
|
384
|
-
} from "./chunk-
|
|
384
|
+
} from "./chunk-YL273SOF.js";
|
|
385
385
|
import {
|
|
386
386
|
RecallResultFormatter,
|
|
387
387
|
SessionContextCoordinator,
|
|
@@ -390,10 +390,10 @@ import {
|
|
|
390
390
|
detectPassiveCorrections,
|
|
391
391
|
renderSessionExperiencePreview,
|
|
392
392
|
scoreSessionExperienceForPrompt
|
|
393
|
-
} from "./chunk-
|
|
393
|
+
} from "./chunk-FMT52ROU.js";
|
|
394
394
|
import {
|
|
395
395
|
importCapsule
|
|
396
|
-
} from "./chunk-
|
|
396
|
+
} from "./chunk-H36X4NRH.js";
|
|
397
397
|
import {
|
|
398
398
|
isCodingGraphInstalled
|
|
399
399
|
} from "./chunk-VQ7B2Q6M.js";
|
|
@@ -416,10 +416,10 @@ import {
|
|
|
416
416
|
RecallHandleHistoryStore,
|
|
417
417
|
TierMigrationStatusStore,
|
|
418
418
|
clampGraphRecallExpandedEntries
|
|
419
|
-
} from "./chunk-
|
|
419
|
+
} from "./chunk-LI76ESJL.js";
|
|
420
420
|
import {
|
|
421
421
|
buildXraySnapshot
|
|
422
|
-
} from "./chunk-
|
|
422
|
+
} from "./chunk-SSUDD72S.js";
|
|
423
423
|
import {
|
|
424
424
|
objectiveStateStoreOverrideForNamespace,
|
|
425
425
|
searchObjectiveStateSnapshots
|
|
@@ -430,10 +430,10 @@ import {
|
|
|
430
430
|
isTopLevelArchivePath,
|
|
431
431
|
journalPath,
|
|
432
432
|
writeJournalFile
|
|
433
|
-
} from "./chunk-
|
|
433
|
+
} from "./chunk-7G6WUOLB.js";
|
|
434
434
|
import {
|
|
435
435
|
searchHarmonicRetrieval
|
|
436
|
-
} from "./chunk-
|
|
436
|
+
} from "./chunk-NHV6WCM5.js";
|
|
437
437
|
import {
|
|
438
438
|
ProfilingCollector
|
|
439
439
|
} from "./chunk-BLVHDY2U.js";
|
|
@@ -457,23 +457,26 @@ import {
|
|
|
457
457
|
renderAuthorityBoundContent,
|
|
458
458
|
selectCuriosityQuestion
|
|
459
459
|
} from "./chunk-NVKO5YKP.js";
|
|
460
|
-
import {
|
|
461
|
-
NamespaceStorageRouter
|
|
462
|
-
} from "./chunk-7COBZFUF.js";
|
|
463
460
|
import {
|
|
464
461
|
pruneOrphanCueAnchors
|
|
465
462
|
} from "./chunk-BMWN7B3Y.js";
|
|
463
|
+
import {
|
|
464
|
+
NamespaceStorageRouter
|
|
465
|
+
} from "./chunk-GXQ5GDUH.js";
|
|
466
466
|
import {
|
|
467
467
|
GraphIndex
|
|
468
468
|
} from "./chunk-2U3R3DDH.js";
|
|
469
469
|
import {
|
|
470
470
|
GraphEdgeAppendError
|
|
471
471
|
} from "./chunk-GKCXTSFF.js";
|
|
472
|
+
import {
|
|
473
|
+
buildChainFollowupGenerator
|
|
474
|
+
} from "./chunk-OJ3TV57W.js";
|
|
472
475
|
import {
|
|
473
476
|
ExtractionDeadlineError,
|
|
474
477
|
ExtractionRunCoordinator,
|
|
475
478
|
classifyExtractionOrigin
|
|
476
|
-
} from "./chunk-
|
|
479
|
+
} from "./chunk-6DTJBTHL.js";
|
|
477
480
|
import {
|
|
478
481
|
ARTIFACT_STATUS_CACHE_TTL_MS,
|
|
479
482
|
BulkImportBatchPartialFailureError,
|
|
@@ -513,7 +516,7 @@ import {
|
|
|
513
516
|
throwIfRecallAborted,
|
|
514
517
|
tokenizeRecallQuery,
|
|
515
518
|
utcDateKeysForLocalDay
|
|
516
|
-
} from "./chunk-
|
|
519
|
+
} from "./chunk-I4G4UWQA.js";
|
|
517
520
|
import {
|
|
518
521
|
inferIntentFromText,
|
|
519
522
|
intentCompatibilityScore,
|
|
@@ -524,9 +527,6 @@ import {
|
|
|
524
527
|
decideLifecycleTransition,
|
|
525
528
|
resolveLifecycleState
|
|
526
529
|
} from "./chunk-TBBDFYXW.js";
|
|
527
|
-
import {
|
|
528
|
-
buildChainFollowupGenerator
|
|
529
|
-
} from "./chunk-YMSPN4W4.js";
|
|
530
530
|
import {
|
|
531
531
|
estimateTokenCount
|
|
532
532
|
} from "./chunk-TOTT6S2V.js";
|
|
@@ -566,7 +566,7 @@ import {
|
|
|
566
566
|
reconstructFusionInputs,
|
|
567
567
|
selfDeps,
|
|
568
568
|
serializeFusionDay
|
|
569
|
-
} from "./chunk-
|
|
569
|
+
} from "./chunk-YUAOU2B2.js";
|
|
570
570
|
import {
|
|
571
571
|
bodyIsEscaped,
|
|
572
572
|
decodeTranscriptBody,
|
|
@@ -583,12 +583,12 @@ import {
|
|
|
583
583
|
import {
|
|
584
584
|
NamespaceSearchRouter,
|
|
585
585
|
namespaceCollectionName
|
|
586
|
-
} from "./chunk-
|
|
586
|
+
} from "./chunk-RJLV4BKR.js";
|
|
587
587
|
import {
|
|
588
588
|
createConversationIndexRuntime,
|
|
589
589
|
createSearchBackend,
|
|
590
590
|
isSearchBackendEnabled
|
|
591
|
-
} from "./chunk-
|
|
591
|
+
} from "./chunk-SLEAJ67D.js";
|
|
592
592
|
import {
|
|
593
593
|
NoopSearchBackend
|
|
594
594
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -613,6 +613,11 @@ import {
|
|
|
613
613
|
canonicalSemanticFileText,
|
|
614
614
|
casCommittedRevisionOf
|
|
615
615
|
} from "./chunk-DUJYRVUD.js";
|
|
616
|
+
import {
|
|
617
|
+
applyDirectorySidecarDrillDown,
|
|
618
|
+
isDirectorySidecarsEnabledForDir,
|
|
619
|
+
setDirectorySidecarsEnabledForDir
|
|
620
|
+
} from "./chunk-345MEMRU.js";
|
|
616
621
|
import {
|
|
617
622
|
checkCorpusReadAbort
|
|
618
623
|
} from "./chunk-5GINB5LC.js";
|
|
@@ -687,7 +692,7 @@ import {
|
|
|
687
692
|
import {
|
|
688
693
|
localDayKey,
|
|
689
694
|
renderDayLocationContext
|
|
690
|
-
} from "./chunk-
|
|
695
|
+
} from "./chunk-BMYZTZ5D.js";
|
|
691
696
|
import {
|
|
692
697
|
activityDayWindow,
|
|
693
698
|
assertValidTimezone,
|
|
@@ -752,7 +757,7 @@ import {
|
|
|
752
757
|
} from "./chunk-GCGJW34D.js";
|
|
753
758
|
import {
|
|
754
759
|
confidenceTier
|
|
755
|
-
} from "./chunk-
|
|
760
|
+
} from "./chunk-PWF4JXKD.js";
|
|
756
761
|
import {
|
|
757
762
|
extractJsonCandidates
|
|
758
763
|
} from "./chunk-RGMVMVMF.js";
|
|
@@ -10292,6 +10297,9 @@ async function fetchQmdMemoryResultsWithRecognitionSwap(deps, prompt, qmdFetchLi
|
|
|
10292
10297
|
qmdFetchLimit
|
|
10293
10298
|
);
|
|
10294
10299
|
}
|
|
10300
|
+
function recognitionHitScore(rankOffset) {
|
|
10301
|
+
return 1 / (1 + rankOffset);
|
|
10302
|
+
}
|
|
10295
10303
|
async function hitsFromIds(namespace, storage, index, ids) {
|
|
10296
10304
|
if (ids.length === 0) return [];
|
|
10297
10305
|
const pathsById = await storage.findExistingMemoryPaths([...ids]);
|
|
@@ -10306,7 +10314,7 @@ async function hitsFromIds(namespace, storage, index, ids) {
|
|
|
10306
10314
|
docid: `${namespace}:${rel}`,
|
|
10307
10315
|
namespace,
|
|
10308
10316
|
path: rel,
|
|
10309
|
-
score:
|
|
10317
|
+
score: recognitionHitScore(offset),
|
|
10310
10318
|
snippet: descriptionById.get(id) ?? id
|
|
10311
10319
|
});
|
|
10312
10320
|
}
|
|
@@ -10344,7 +10352,7 @@ var RecallInternalCoordinator = class {
|
|
|
10344
10352
|
};
|
|
10345
10353
|
const recallSectionDeadlineMs = this.deps.config.recallCoreDeadlineMs ?? 75e3;
|
|
10346
10354
|
const recallOuterTimeoutMs = this.deps.config.recallOuterTimeoutMs ?? 75e3;
|
|
10347
|
-
const enrichmentSectionDeadlineMs = this.deps.config.recallEnrichmentDeadlineMs ??
|
|
10355
|
+
const enrichmentSectionDeadlineMs = this.deps.config.recallEnrichmentDeadlineMs ?? 6e4;
|
|
10348
10356
|
try {
|
|
10349
10357
|
const createEnrichmentAbortHandle = (parentSignal) => {
|
|
10350
10358
|
const controller = new AbortController();
|
|
@@ -14561,7 +14569,7 @@ var RecallSearchPipelineCoordinator = class {
|
|
|
14561
14569
|
320,
|
|
14562
14570
|
Math.max(fetchLimit, qmdFetchLimit * 5)
|
|
14563
14571
|
);
|
|
14564
|
-
const qmdRecallBudgetMs = this.deps.config.recallEnrichmentDeadlineMs ??
|
|
14572
|
+
const qmdRecallBudgetMs = this.deps.config.recallEnrichmentDeadlineMs ?? 6e4;
|
|
14565
14573
|
const qmdRecallBudgetEnabled = qmdRecallBudgetMs > 0;
|
|
14566
14574
|
const startedAtMs = Date.now();
|
|
14567
14575
|
let lastPrimaryResultCount = 0;
|
|
@@ -14715,14 +14723,14 @@ var RecallSearchPipelineCoordinator = class {
|
|
|
14715
14723
|
if (filteredResults.length >= qmdFetchLimit) {
|
|
14716
14724
|
const capped2 = filteredResults.slice(0, qmdFetchLimit);
|
|
14717
14725
|
await emitDebugSnapshot(capped2, fetchLimit);
|
|
14718
|
-
return capped2;
|
|
14726
|
+
return await applyDirectorySidecarDrillDown(this.deps.storage?.dir ?? "", prompt, capped2, { enabled: Boolean(this.deps.storage?.dir) && isDirectorySidecarsEnabledForDir(this.deps.storage.dir), namespaces: options.namespacesEnabled ? options.recallNamespaces ?? [] : void 0 });
|
|
14719
14727
|
}
|
|
14720
14728
|
if (filteredResults.length > bestFiltered.length) {
|
|
14721
14729
|
bestFiltered = filteredResults;
|
|
14722
14730
|
}
|
|
14723
14731
|
if (primaryResults.length < fetchLimit) {
|
|
14724
14732
|
await emitDebugSnapshot(filteredResults, fetchLimit);
|
|
14725
|
-
return filteredResults;
|
|
14733
|
+
return await applyDirectorySidecarDrillDown(this.deps.storage?.dir ?? "", prompt, filteredResults, { enabled: Boolean(this.deps.storage?.dir) && isDirectorySidecarsEnabledForDir(this.deps.storage.dir), namespaces: options.namespacesEnabled ? options.recallNamespaces ?? [] : void 0 });
|
|
14726
14734
|
}
|
|
14727
14735
|
if (fetchLimit >= maxFetchLimit) {
|
|
14728
14736
|
break;
|
|
@@ -14732,7 +14740,7 @@ var RecallSearchPipelineCoordinator = class {
|
|
|
14732
14740
|
}
|
|
14733
14741
|
const capped = bestFiltered.slice(0, qmdFetchLimit);
|
|
14734
14742
|
await emitDebugSnapshot(capped, fetchLimit);
|
|
14735
|
-
return capped;
|
|
14743
|
+
return await applyDirectorySidecarDrillDown(this.deps.storage?.dir ?? "", prompt, capped, { enabled: Boolean(this.deps.storage?.dir) && isDirectorySidecarsEnabledForDir(this.deps.storage.dir), namespaces: options.namespacesEnabled ? options.recallNamespaces ?? [] : void 0 });
|
|
14736
14744
|
}
|
|
14737
14745
|
async searchEmbeddingFallback(query, limit) {
|
|
14738
14746
|
return searchEmbeddingFallback(this.deps, query, limit);
|
|
@@ -17358,7 +17366,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
17358
17366
|
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
17359
17367
|
if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
|
|
17360
17368
|
try {
|
|
17361
|
-
const { runFirstStartMigration } = await import("./first-start-migration-
|
|
17369
|
+
const { runFirstStartMigration } = await import("./first-start-migration-GAT7G733.js");
|
|
17362
17370
|
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
17363
17371
|
const result = await runFirstStartMigration({
|
|
17364
17372
|
storage: this.deps.storage,
|
|
@@ -17382,7 +17390,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
17382
17390
|
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
17383
17391
|
if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
|
|
17384
17392
|
try {
|
|
17385
|
-
const { startWearablesAutoSync } = await import("./auto-sync-
|
|
17393
|
+
const { startWearablesAutoSync } = await import("./auto-sync-WEUDMXUW.js");
|
|
17386
17394
|
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
17387
17395
|
this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
|
|
17388
17396
|
{
|
|
@@ -22375,6 +22383,13 @@ var Orchestrator = class {
|
|
|
22375
22383
|
async initialize() {
|
|
22376
22384
|
this.extractionQueueCoordinator.resumeAccepting();
|
|
22377
22385
|
await this.orchestratorInitCoordinator.initialize();
|
|
22386
|
+
{
|
|
22387
|
+
const memoryDir = this.storage?.dir;
|
|
22388
|
+
if (typeof memoryDir === "string" && memoryDir.length > 0) {
|
|
22389
|
+
const { directorySidecarsEnabled } = this.config;
|
|
22390
|
+
setDirectorySidecarsEnabledForDir(memoryDir, directorySidecarsEnabled);
|
|
22391
|
+
}
|
|
22392
|
+
}
|
|
22378
22393
|
if (isDependencyPropagationEnabled(this.config)) {
|
|
22379
22394
|
this._dependencyPropagationRecovery = this.dependencyPropagationDelivery.recover().catch((err) => {
|
|
22380
22395
|
log.warn(`dependency propagation startup recovery failed: ${err}`);
|
|
@@ -31060,4 +31075,4 @@ export {
|
|
|
31060
31075
|
qmdStartupCollectionChecksWithTimeout,
|
|
31061
31076
|
Orchestrator
|
|
31062
31077
|
};
|
|
31063
|
-
//# sourceMappingURL=chunk-
|
|
31078
|
+
//# sourceMappingURL=chunk-ALOMLIRC.js.map
|