@remnic/core 10.0.3 → 10.0.4
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 +37 -37
- package/dist/access-authorization-probe.js +38 -38
- package/dist/access-boundary.js +37 -37
- package/dist/access-cli.js +100 -98
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +37 -37
- package/dist/access-http-briefing.js +38 -38
- package/dist/access-http-query.js +39 -39
- package/dist/access-http.js +56 -56
- package/dist/access-identity-continuity-surface.js +37 -37
- package/dist/access-lcm-surface.js +37 -37
- package/dist/access-mcp.js +47 -47
- package/dist/access-namespace-preflight.js +37 -37
- package/dist/access-observe-write-category.js +2 -2
- package/dist/access-observe-write-surface.js +37 -37
- package/dist/access-offline-manifest.js +4 -4
- package/dist/access-operations-batch.js +38 -38
- package/dist/access-operations.js +45 -45
- package/dist/access-recall-concurrency.js +37 -37
- package/dist/access-recall-diagnostics.js +2 -2
- package/dist/access-recall-response.js +37 -37
- package/dist/access-recall-surface.js +37 -37
- package/dist/access-service.js +37 -37
- package/dist/access-surface-catalog.js +39 -39
- package/dist/active-recall.js +17 -16
- 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-PAWBFQWL.js → auto-sync-FN7E3OTO.js} +4 -4
- package/dist/briefing.js +16 -16
- package/dist/buffer.js +7 -7
- package/dist/causal-consolidation.js +17 -17
- package/dist/{chunk-G3T6YMBO.js → chunk-2KB7TTAP.js} +4 -4
- package/dist/{chunk-345MEMRU.js → chunk-3OUGSOJP.js} +2 -2
- package/dist/{chunk-CFCEJNOE.js → chunk-3QAIX7TV.js} +2 -2
- package/dist/{chunk-LMMC55WM.js → chunk-436IRJUD.js} +4 -4
- package/dist/{chunk-G2STTRYB.js → chunk-4D2YH47Z.js} +2 -2
- package/dist/{chunk-RKSGUMVL.js → chunk-4DXVWBDB.js} +2 -2
- package/dist/{chunk-CGOKNQDK.js → chunk-4NFRYOHT.js} +2 -2
- package/dist/{chunk-CHI37EHP.js → chunk-5QHTQMRL.js} +5 -5
- package/dist/{chunk-RFIJRZ4K.js → chunk-5XXTZ4Y7.js} +2 -2
- package/dist/{chunk-YQSWNFZE.js → chunk-5YDWSWBU.js} +2 -2
- package/dist/{chunk-TNVZCLJU.js → chunk-6AH2DDHI.js} +2 -2
- package/dist/{chunk-5GINB5LC.js → chunk-6MKLMEBE.js} +1 -1
- package/dist/{chunk-5GINB5LC.js.map → chunk-6MKLMEBE.js.map} +1 -1
- package/dist/{chunk-JDOBIFBK.js → chunk-7CXL25AA.js} +2 -2
- package/dist/{chunk-YLBE6PLR.js → chunk-7IGMKQWK.js} +2 -2
- package/dist/{chunk-NGOZH7R5.js → chunk-7OOW72QA.js} +21 -21
- package/dist/{chunk-2QZFZNXO.js → chunk-ABDTBGI2.js} +2 -2
- package/dist/{chunk-6JIHC5AS.js → chunk-ABET5LA5.js} +59 -48
- package/dist/chunk-ABET5LA5.js.map +1 -0
- package/dist/{chunk-IB63OVUB.js → chunk-AJ6ORARY.js} +6 -6
- package/dist/{chunk-32HO62I4.js → chunk-BDHWKFGM.js} +2 -2
- package/dist/{chunk-AW4QUFQF.js → chunk-BTNNL7ZW.js} +3 -2
- package/dist/{chunk-AW4QUFQF.js.map → chunk-BTNNL7ZW.js.map} +1 -1
- package/dist/{chunk-MY7B3HYC.js → chunk-CLCMDKTB.js} +2 -2
- package/dist/{chunk-OZVHLBH6.js → chunk-CQQTEDHS.js} +2 -2
- package/dist/{chunk-7KICGR5W.js → chunk-CV5AMCPX.js} +2 -2
- package/dist/{chunk-BTOHGPHC.js → chunk-CXG2T7BJ.js} +3 -3
- package/dist/{chunk-X6X4UASX.js → chunk-DBA2W6VV.js} +230 -81
- package/dist/chunk-DBA2W6VV.js.map +1 -0
- package/dist/{chunk-E7FN5N5E.js → chunk-DQJCQHII.js} +2 -2
- package/dist/{chunk-OWHPA4JS.js → chunk-DYRXRQHV.js} +2 -2
- package/dist/{chunk-IIFFC3RL.js → chunk-EDR6CVWZ.js} +2 -2
- package/dist/{chunk-2JRB3Z5N.js → chunk-EP5WXE2G.js} +3 -3
- package/dist/chunk-EWMRFW3F.js +38 -0
- package/dist/chunk-EWMRFW3F.js.map +1 -0
- package/dist/chunk-FMIVV5SV.js +80 -0
- package/dist/chunk-FMIVV5SV.js.map +1 -0
- package/dist/{chunk-2EZB2DL5.js → chunk-GE6HETIF.js} +3 -3
- package/dist/{chunk-HP4CU2ZA.js → chunk-GLS3A4SQ.js} +2 -2
- package/dist/{chunk-I6WFBNA4.js → chunk-H2XCCUOT.js} +3 -3
- package/dist/{chunk-IXYIW3MZ.js → chunk-H6FA36LC.js} +2 -2
- package/dist/{chunk-NLDMTXWV.js → chunk-HSZBALHV.js} +2 -2
- package/dist/{chunk-XG4XXI66.js → chunk-I25RQA65.js} +2 -2
- package/dist/{chunk-PNFWIB4X.js → chunk-IHIP7TJ3.js} +2 -2
- package/dist/{chunk-4DDIWRT7.js → chunk-IINXHPCV.js} +2 -2
- package/dist/{chunk-EJJMDLVB.js → chunk-IJ4FEGZR.js} +2 -2
- package/dist/{chunk-IHCYCE6D.js → chunk-IRYKRBEX.js} +4 -4
- package/dist/{chunk-MYYHACOW.js → chunk-IVGJXS5F.js} +2 -2
- package/dist/{chunk-Q6GI7HEC.js → chunk-IXF7TRMQ.js} +2 -2
- package/dist/{chunk-O6AYMAPJ.js → chunk-IY7ZISXV.js} +2 -2
- package/dist/{chunk-5FLFPTDK.js → chunk-JA72X46J.js} +2 -2
- package/dist/{chunk-NLYOOGZ7.js → chunk-KE5PWLI6.js} +3 -3
- package/dist/{chunk-6AA7XFMO.js → chunk-LIGP5M2C.js} +2 -2
- package/dist/{chunk-KW77LGDX.js → chunk-MEMH5NKJ.js} +2 -2
- package/dist/{chunk-KRTIHXWC.js → chunk-MEP3POVW.js} +2 -2
- package/dist/{chunk-35A7GCHG.js → chunk-MYBCB4AT.js} +2 -2
- package/dist/{chunk-QPWUG2S3.js → chunk-NSQ3GUVO.js} +2 -2
- package/dist/{chunk-NXVD46HT.js → chunk-O57VUN4U.js} +4 -4
- package/dist/{chunk-L6DJJEFW.js → chunk-OAFRMLL4.js} +2 -2
- package/dist/{chunk-PCO3P7WJ.js → chunk-OGVJXIHX.js} +2 -2
- package/dist/{chunk-JSUA4YFE.js → chunk-ORAL4HJC.js} +2 -2
- package/dist/{chunk-RXT6UB25.js → chunk-P22M3DX3.js} +2 -2
- package/dist/{chunk-I2KEH2LS.js → chunk-PTFL3INS.js} +2 -2
- package/dist/{chunk-5QXMESS7.js → chunk-QDKABMUE.js} +2 -2
- package/dist/{chunk-34G4U6HS.js → chunk-QRZMJ2WN.js} +2 -2
- package/dist/{chunk-GBA4N2SG.js → chunk-QVBB2CLG.js} +13 -13
- package/dist/{chunk-6GU3TNJJ.js → chunk-QWNBQ2T5.js} +244 -47
- package/dist/chunk-QWNBQ2T5.js.map +1 -0
- package/dist/{chunk-GUD6FYQG.js → chunk-R4O2G6ML.js} +2 -2
- package/dist/{chunk-CSLK7BN6.js → chunk-R6EOFKZG.js} +2 -2
- package/dist/{chunk-Y2ADLCB3.js → chunk-RGPPNNDJ.js} +8 -8
- package/dist/{chunk-BLHPADUX.js → chunk-RH6MQ5NG.js} +6 -11
- package/dist/chunk-RH6MQ5NG.js.map +1 -0
- package/dist/{chunk-2NV7MMMM.js → chunk-RZCRXCLI.js} +2 -2
- package/dist/{chunk-WI37MWRZ.js → chunk-SNGNGH53.js} +2 -2
- package/dist/{chunk-R4NGLTUS.js → chunk-TDMNADPI.js} +2 -2
- package/dist/{chunk-UVVSOSHL.js → chunk-TSEUVMJL.js} +44 -44
- package/dist/{chunk-O24EWFPQ.js → chunk-TYOBAFCY.js} +3 -3
- package/dist/{chunk-LI76ESJL.js → chunk-TZQOCQXB.js} +2 -2
- package/dist/{chunk-WHTMVTU4.js → chunk-U3LVARGV.js} +2 -2
- package/dist/{chunk-AUWMKDKL.js → chunk-UCCB7RKF.js} +2 -2
- package/dist/{chunk-OV7EYM6M.js → chunk-VWCFR4NR.js} +9 -9
- package/dist/{chunk-DQTCGVFK.js → chunk-WHCD4Z3D.js} +2 -2
- package/dist/{chunk-ZS7RK6H6.js → chunk-WLC6XA6C.js} +4 -4
- package/dist/{chunk-QCP75JGO.js → chunk-WQUGCOKF.js} +5 -5
- package/dist/{chunk-KATEWTQJ.js → chunk-X7J56GPG.js} +2 -2
- package/dist/{chunk-ME2LMFHF.js → chunk-XTWF5XR6.js} +51 -51
- package/dist/{chunk-22DYJLFN.js → chunk-XVC7JU2N.js} +39 -18
- package/dist/chunk-XVC7JU2N.js.map +1 -0
- package/dist/{chunk-HO7IQP7G.js → chunk-Y7CXM7UM.js} +3 -3
- package/dist/{chunk-44PBRUXB.js → chunk-YMXCJ7SE.js} +2 -2
- package/dist/{chunk-AXFWMRKI.js → chunk-YQJCWR4R.js} +2 -2
- package/dist/{chunk-2DHJTJIY.js → chunk-Z2EVKNZR.js} +2 -2
- package/dist/{chunk-RKDSELA3.js → chunk-Z63GU5NN.js} +1 -1
- package/dist/chunk-Z63GU5NN.js.map +1 -0
- package/dist/{chunk-4NRZ7BRS.js → chunk-ZOGZMAGI.js} +2 -2
- package/dist/cli.js +78 -77
- package/dist/coding/export-okf-codegraph.js +16 -16
- package/dist/compounding/engine.js +16 -16
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +17 -16
- package/dist/connectors/codex-materialize-runner.js +16 -16
- package/dist/connectors/index.js +16 -16
- package/dist/convergence-refresh.js +18 -18
- package/dist/conversation-index/backend.js +2 -2
- package/dist/corpus-read-cancellation.d.ts +7 -0
- package/dist/corpus-read-cancellation.d.ts.map +1 -1
- package/dist/corpus-read-cancellation.js +1 -1
- package/dist/corpus-watermark.js +18 -18
- package/dist/directory-sidecars.js +2 -2
- package/dist/entity-retrieval.js +16 -16
- package/dist/external-wiki-access.js +38 -38
- package/dist/extraction.js +21 -21
- package/dist/harmonic-retrieval.js +16 -16
- package/dist/index.js +102 -100
- package/dist/location/index.js +19 -19
- package/dist/maintenance/archive-observations.js +2 -2
- package/dist/maintenance/atomic-file.d.ts +1 -1
- package/dist/maintenance/atomic-file.d.ts.map +1 -1
- package/dist/maintenance/atomic-file.js +1 -1
- package/dist/maintenance/memory-governance.js +16 -16
- package/dist/maintenance/migrate-observations.js +3 -3
- package/dist/maintenance/observation-ledger-utils.js +2 -2
- package/dist/maintenance/projection-rebuild-abort.d.ts +17 -0
- package/dist/maintenance/projection-rebuild-abort.d.ts.map +1 -0
- package/dist/maintenance/projection-timeline.d.ts +19 -0
- package/dist/maintenance/projection-timeline.d.ts.map +1 -0
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +16 -16
- package/dist/maintenance/rebuild-memory-projection-runner.d.ts +8 -0
- package/dist/maintenance/rebuild-memory-projection-runner.d.ts.map +1 -0
- package/dist/maintenance/rebuild-memory-projection-runner.js +113 -0
- package/dist/maintenance/rebuild-memory-projection-runner.js.map +1 -0
- package/dist/maintenance/rebuild-memory-projection.d.ts +8 -0
- package/dist/maintenance/rebuild-memory-projection.d.ts.map +1 -1
- package/dist/maintenance/rebuild-memory-projection.js +17 -17
- package/dist/maintenance/rebuild-observations.js +3 -3
- package/dist/memory-browse-operations.js +38 -38
- package/dist/memory-browse.js +7 -7
- package/dist/namespaces/migrate.js +17 -17
- package/dist/namespaces/search.js +8 -8
- package/dist/namespaces/storage.js +16 -16
- package/dist/offline-sync-impression-drain.js +3 -3
- package/dist/operator-doctor-corpus.js +19 -19
- package/dist/operator-toolkit.js +26 -25
- package/dist/orchestration/full-corpus-heap-guard.d.ts +25 -0
- package/dist/orchestration/full-corpus-heap-guard.d.ts.map +1 -0
- package/dist/orchestration/maintenance.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +27 -25
- package/dist/orchestration/projection-rebuild-schedule.d.ts +40 -0
- package/dist/orchestration/projection-rebuild-schedule.d.ts.map +1 -1
- package/dist/orchestrator.js +100 -98
- package/dist/projection-rebuild-config.d.ts +52 -0
- package/dist/projection-rebuild-config.d.ts.map +1 -0
- package/dist/projection-rebuild-config.js +14 -0
- package/dist/projection-rebuild-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 +38 -38
- package/dist/recall-navigation.js +37 -37
- package/dist/recall-state-view-admission.js +7 -7
- package/dist/recall-state.js +2 -2
- package/dist/recall-why-service.js +7 -7
- 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/relevance.js +2 -2
- package/dist/resume-bundles.js +18 -17
- package/dist/search/factory.js +7 -7
- package/dist/search/index.js +11 -11
- package/dist/semantic-consolidation.js +17 -17
- package/dist/semantic-rule-promotion.js +16 -16
- package/dist/semantic-rule-verifier.js +16 -16
- package/dist/source-agent-qualifier.js +20 -20
- package/dist/standup/build.js +16 -16
- package/dist/storage/memory-lifecycle-ledger-access.d.ts +5 -3
- package/dist/storage/memory-lifecycle-ledger-access.d.ts.map +1 -1
- package/dist/storage/memory-read-store.d.ts +2 -2
- package/dist/storage/memory-read-store.d.ts.map +1 -1
- package/dist/storage.d.ts +4 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +15 -15
- package/dist/support-passport/index.js +40 -40
- package/dist/transfer/export-okf.js +17 -17
- package/dist/types.d.ts +2 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +16 -16
- package/dist/who-knows-cli.js +17 -17
- package/dist/who-knows.js +16 -16
- package/package.json +2 -2
- package/src/config.test.ts +9 -0
- package/src/config.ts +2 -5
- package/src/corpus-read-cancellation.ts +7 -0
- package/src/maintenance/atomic-file.ts +2 -0
- package/src/maintenance/projection-rebuild-abort.ts +40 -0
- package/src/maintenance/projection-timeline.ts +209 -0
- package/src/maintenance/rebuild-memory-projection-runner.ts +94 -0
- package/src/maintenance/rebuild-memory-projection.memory.test.ts +159 -0
- package/src/maintenance/rebuild-memory-projection.retain-raw.test.ts +202 -0
- package/src/maintenance/rebuild-memory-projection.ts +63 -91
- package/src/orchestration/full-corpus-heap-guard.ts +38 -0
- package/src/orchestration/maintenance.test.ts +2 -2
- package/src/orchestration/maintenance.ts +2 -0
- package/src/orchestration/projection-rebuild-schedule.test.ts +498 -0
- package/src/orchestration/projection-rebuild-schedule.ts +280 -9
- package/src/projection-rebuild-config.ts +82 -0
- package/src/storage/memory-lifecycle-ledger-access.ts +61 -33
- package/src/storage/memory-read-store.ts +10 -4
- package/src/storage.ts +45 -33
- package/src/types.ts +2 -18
- package/dist/chunk-22DYJLFN.js.map +0 -1
- package/dist/chunk-6GU3TNJJ.js.map +0 -1
- package/dist/chunk-6JIHC5AS.js.map +0 -1
- package/dist/chunk-BLHPADUX.js.map +0 -1
- package/dist/chunk-RKDSELA3.js.map +0 -1
- package/dist/chunk-X6X4UASX.js.map +0 -1
- /package/dist/{auto-sync-PAWBFQWL.js.map → auto-sync-FN7E3OTO.js.map} +0 -0
- /package/dist/{chunk-G3T6YMBO.js.map → chunk-2KB7TTAP.js.map} +0 -0
- /package/dist/{chunk-345MEMRU.js.map → chunk-3OUGSOJP.js.map} +0 -0
- /package/dist/{chunk-CFCEJNOE.js.map → chunk-3QAIX7TV.js.map} +0 -0
- /package/dist/{chunk-LMMC55WM.js.map → chunk-436IRJUD.js.map} +0 -0
- /package/dist/{chunk-G2STTRYB.js.map → chunk-4D2YH47Z.js.map} +0 -0
- /package/dist/{chunk-RKSGUMVL.js.map → chunk-4DXVWBDB.js.map} +0 -0
- /package/dist/{chunk-CGOKNQDK.js.map → chunk-4NFRYOHT.js.map} +0 -0
- /package/dist/{chunk-CHI37EHP.js.map → chunk-5QHTQMRL.js.map} +0 -0
- /package/dist/{chunk-RFIJRZ4K.js.map → chunk-5XXTZ4Y7.js.map} +0 -0
- /package/dist/{chunk-YQSWNFZE.js.map → chunk-5YDWSWBU.js.map} +0 -0
- /package/dist/{chunk-TNVZCLJU.js.map → chunk-6AH2DDHI.js.map} +0 -0
- /package/dist/{chunk-JDOBIFBK.js.map → chunk-7CXL25AA.js.map} +0 -0
- /package/dist/{chunk-YLBE6PLR.js.map → chunk-7IGMKQWK.js.map} +0 -0
- /package/dist/{chunk-NGOZH7R5.js.map → chunk-7OOW72QA.js.map} +0 -0
- /package/dist/{chunk-2QZFZNXO.js.map → chunk-ABDTBGI2.js.map} +0 -0
- /package/dist/{chunk-IB63OVUB.js.map → chunk-AJ6ORARY.js.map} +0 -0
- /package/dist/{chunk-32HO62I4.js.map → chunk-BDHWKFGM.js.map} +0 -0
- /package/dist/{chunk-MY7B3HYC.js.map → chunk-CLCMDKTB.js.map} +0 -0
- /package/dist/{chunk-OZVHLBH6.js.map → chunk-CQQTEDHS.js.map} +0 -0
- /package/dist/{chunk-7KICGR5W.js.map → chunk-CV5AMCPX.js.map} +0 -0
- /package/dist/{chunk-BTOHGPHC.js.map → chunk-CXG2T7BJ.js.map} +0 -0
- /package/dist/{chunk-E7FN5N5E.js.map → chunk-DQJCQHII.js.map} +0 -0
- /package/dist/{chunk-OWHPA4JS.js.map → chunk-DYRXRQHV.js.map} +0 -0
- /package/dist/{chunk-IIFFC3RL.js.map → chunk-EDR6CVWZ.js.map} +0 -0
- /package/dist/{chunk-2JRB3Z5N.js.map → chunk-EP5WXE2G.js.map} +0 -0
- /package/dist/{chunk-2EZB2DL5.js.map → chunk-GE6HETIF.js.map} +0 -0
- /package/dist/{chunk-HP4CU2ZA.js.map → chunk-GLS3A4SQ.js.map} +0 -0
- /package/dist/{chunk-I6WFBNA4.js.map → chunk-H2XCCUOT.js.map} +0 -0
- /package/dist/{chunk-IXYIW3MZ.js.map → chunk-H6FA36LC.js.map} +0 -0
- /package/dist/{chunk-NLDMTXWV.js.map → chunk-HSZBALHV.js.map} +0 -0
- /package/dist/{chunk-XG4XXI66.js.map → chunk-I25RQA65.js.map} +0 -0
- /package/dist/{chunk-PNFWIB4X.js.map → chunk-IHIP7TJ3.js.map} +0 -0
- /package/dist/{chunk-4DDIWRT7.js.map → chunk-IINXHPCV.js.map} +0 -0
- /package/dist/{chunk-EJJMDLVB.js.map → chunk-IJ4FEGZR.js.map} +0 -0
- /package/dist/{chunk-IHCYCE6D.js.map → chunk-IRYKRBEX.js.map} +0 -0
- /package/dist/{chunk-MYYHACOW.js.map → chunk-IVGJXS5F.js.map} +0 -0
- /package/dist/{chunk-Q6GI7HEC.js.map → chunk-IXF7TRMQ.js.map} +0 -0
- /package/dist/{chunk-O6AYMAPJ.js.map → chunk-IY7ZISXV.js.map} +0 -0
- /package/dist/{chunk-5FLFPTDK.js.map → chunk-JA72X46J.js.map} +0 -0
- /package/dist/{chunk-NLYOOGZ7.js.map → chunk-KE5PWLI6.js.map} +0 -0
- /package/dist/{chunk-6AA7XFMO.js.map → chunk-LIGP5M2C.js.map} +0 -0
- /package/dist/{chunk-KW77LGDX.js.map → chunk-MEMH5NKJ.js.map} +0 -0
- /package/dist/{chunk-KRTIHXWC.js.map → chunk-MEP3POVW.js.map} +0 -0
- /package/dist/{chunk-35A7GCHG.js.map → chunk-MYBCB4AT.js.map} +0 -0
- /package/dist/{chunk-QPWUG2S3.js.map → chunk-NSQ3GUVO.js.map} +0 -0
- /package/dist/{chunk-NXVD46HT.js.map → chunk-O57VUN4U.js.map} +0 -0
- /package/dist/{chunk-L6DJJEFW.js.map → chunk-OAFRMLL4.js.map} +0 -0
- /package/dist/{chunk-PCO3P7WJ.js.map → chunk-OGVJXIHX.js.map} +0 -0
- /package/dist/{chunk-JSUA4YFE.js.map → chunk-ORAL4HJC.js.map} +0 -0
- /package/dist/{chunk-RXT6UB25.js.map → chunk-P22M3DX3.js.map} +0 -0
- /package/dist/{chunk-I2KEH2LS.js.map → chunk-PTFL3INS.js.map} +0 -0
- /package/dist/{chunk-5QXMESS7.js.map → chunk-QDKABMUE.js.map} +0 -0
- /package/dist/{chunk-34G4U6HS.js.map → chunk-QRZMJ2WN.js.map} +0 -0
- /package/dist/{chunk-GBA4N2SG.js.map → chunk-QVBB2CLG.js.map} +0 -0
- /package/dist/{chunk-GUD6FYQG.js.map → chunk-R4O2G6ML.js.map} +0 -0
- /package/dist/{chunk-CSLK7BN6.js.map → chunk-R6EOFKZG.js.map} +0 -0
- /package/dist/{chunk-Y2ADLCB3.js.map → chunk-RGPPNNDJ.js.map} +0 -0
- /package/dist/{chunk-2NV7MMMM.js.map → chunk-RZCRXCLI.js.map} +0 -0
- /package/dist/{chunk-WI37MWRZ.js.map → chunk-SNGNGH53.js.map} +0 -0
- /package/dist/{chunk-R4NGLTUS.js.map → chunk-TDMNADPI.js.map} +0 -0
- /package/dist/{chunk-UVVSOSHL.js.map → chunk-TSEUVMJL.js.map} +0 -0
- /package/dist/{chunk-O24EWFPQ.js.map → chunk-TYOBAFCY.js.map} +0 -0
- /package/dist/{chunk-LI76ESJL.js.map → chunk-TZQOCQXB.js.map} +0 -0
- /package/dist/{chunk-WHTMVTU4.js.map → chunk-U3LVARGV.js.map} +0 -0
- /package/dist/{chunk-AUWMKDKL.js.map → chunk-UCCB7RKF.js.map} +0 -0
- /package/dist/{chunk-OV7EYM6M.js.map → chunk-VWCFR4NR.js.map} +0 -0
- /package/dist/{chunk-DQTCGVFK.js.map → chunk-WHCD4Z3D.js.map} +0 -0
- /package/dist/{chunk-ZS7RK6H6.js.map → chunk-WLC6XA6C.js.map} +0 -0
- /package/dist/{chunk-QCP75JGO.js.map → chunk-WQUGCOKF.js.map} +0 -0
- /package/dist/{chunk-KATEWTQJ.js.map → chunk-X7J56GPG.js.map} +0 -0
- /package/dist/{chunk-ME2LMFHF.js.map → chunk-XTWF5XR6.js.map} +0 -0
- /package/dist/{chunk-HO7IQP7G.js.map → chunk-Y7CXM7UM.js.map} +0 -0
- /package/dist/{chunk-44PBRUXB.js.map → chunk-YMXCJ7SE.js.map} +0 -0
- /package/dist/{chunk-AXFWMRKI.js.map → chunk-YQJCWR4R.js.map} +0 -0
- /package/dist/{chunk-2DHJTJIY.js.map → chunk-Z2EVKNZR.js.map} +0 -0
- /package/dist/{chunk-4NRZ7BRS.js.map → chunk-ZOGZMAGI.js.map} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EMPTY_QMD_STATUS,
|
|
3
|
+
embedQmdFiles,
|
|
4
|
+
fetchQmdStatus
|
|
5
|
+
} from "./chunk-IUM3VSHI.js";
|
|
1
6
|
import {
|
|
2
7
|
resolveEnsureCollectionArgs
|
|
3
8
|
} from "./chunk-G26YNEOC.js";
|
|
@@ -20,11 +25,6 @@ import {
|
|
|
20
25
|
qmdVersionToString,
|
|
21
26
|
resolveQmdCapabilities
|
|
22
27
|
} from "./chunk-SIGAGKNE.js";
|
|
23
|
-
import {
|
|
24
|
-
EMPTY_QMD_STATUS,
|
|
25
|
-
embedQmdFiles,
|
|
26
|
-
fetchQmdStatus
|
|
27
|
-
} from "./chunk-IUM3VSHI.js";
|
|
28
28
|
import {
|
|
29
29
|
clearQmdResultCaches,
|
|
30
30
|
getCachedQmdSearch,
|
|
@@ -2028,4 +2028,4 @@ export {
|
|
|
2028
2028
|
sharedDaemonSessionCountForTest,
|
|
2029
2029
|
QmdClient
|
|
2030
2030
|
};
|
|
2031
|
-
//# sourceMappingURL=chunk-
|
|
2031
|
+
//# sourceMappingURL=chunk-AJ6ORARY.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-SOBJ6NEY.js";
|
|
4
4
|
import {
|
|
5
5
|
summarizeDisclosureTokens
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NSQ3GUVO.js";
|
|
7
7
|
import {
|
|
8
8
|
summarizeRetrievedMemoryProvenance
|
|
9
9
|
} from "./chunk-I4WBNM3M.js";
|
|
@@ -620,4 +620,4 @@ export {
|
|
|
620
620
|
renderRecallExplain,
|
|
621
621
|
parseRecallExplainFormat
|
|
622
622
|
};
|
|
623
|
-
//# sourceMappingURL=chunk-
|
|
623
|
+
//# sourceMappingURL=chunk-BDHWKFGM.js.map
|
|
@@ -54,13 +54,14 @@ async function writeFileAtomically(outputPath, content, backupPath) {
|
|
|
54
54
|
throw err;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
async function commitPreparedFileAtomically(tempPath, outputPath, backupPath) {
|
|
57
|
+
async function commitPreparedFileAtomically(tempPath, outputPath, backupPath, beforeRename) {
|
|
58
58
|
const dir = path.dirname(outputPath);
|
|
59
59
|
let resolvedBackupPath;
|
|
60
60
|
try {
|
|
61
61
|
if (backupPath) {
|
|
62
62
|
resolvedBackupPath = await copyExistingFileToBackup(outputPath, backupPath);
|
|
63
63
|
}
|
|
64
|
+
if (beforeRename) await beforeRename();
|
|
64
65
|
await rename(tempPath, outputPath);
|
|
65
66
|
await syncDirectory(dir);
|
|
66
67
|
return resolvedBackupPath;
|
|
@@ -75,4 +76,4 @@ export {
|
|
|
75
76
|
writeFileAtomically,
|
|
76
77
|
commitPreparedFileAtomically
|
|
77
78
|
};
|
|
78
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-BTNNL7ZW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/maintenance/atomic-file.ts"],"sourcesContent":["import path from \"node:path\";\nimport { copyFile, mkdir, open, rename, rm, stat } from \"node:fs/promises\";\n\nasync function syncDirectory(dir: string): Promise<void> {\n let handle: Awaited<ReturnType<typeof open>> | undefined;\n try {\n handle = await open(dir, \"r\");\n await handle.sync();\n } catch {\n // Directory fsync is best-effort across platforms and filesystems.\n } finally {\n await handle?.close().catch(() => undefined);\n }\n}\n\nfunction tempPathFor(outputPath: string): string {\n const suffix = `${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`;\n return path.join(path.dirname(outputPath), `.${path.basename(outputPath)}.${suffix}.tmp`);\n}\n\nexport async function copyExistingFileToBackup(\n sourcePath: string,\n backupPath: string,\n): Promise<string | undefined> {\n try {\n await stat(sourcePath);\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return undefined;\n throw err;\n }\n\n await mkdir(path.dirname(backupPath), { recursive: true });\n await copyFile(sourcePath, backupPath);\n return backupPath;\n}\n\nexport async function writeFileAtomically(\n outputPath: string,\n content: string | Uint8Array,\n backupPath?: string,\n): Promise<string | undefined> {\n const dir = path.dirname(outputPath);\n await mkdir(dir, { recursive: true });\n const tempPath = tempPathFor(outputPath);\n let handle: Awaited<ReturnType<typeof open>> | undefined;\n let resolvedBackupPath: string | undefined;\n try {\n handle = await open(tempPath, \"w\");\n if (typeof content === \"string\") {\n await handle.writeFile(content, \"utf-8\");\n } else {\n await handle.writeFile(content);\n }\n await handle.sync();\n await handle.close();\n handle = undefined;\n\n if (backupPath) {\n resolvedBackupPath = await copyExistingFileToBackup(outputPath, backupPath);\n }\n await rename(tempPath, outputPath);\n await syncDirectory(dir);\n return resolvedBackupPath;\n } catch (err) {\n await handle?.close().catch(() => undefined);\n await rm(tempPath, { force: true }).catch(() => undefined);\n throw err;\n }\n}\n\nexport async function commitPreparedFileAtomically(\n tempPath: string,\n outputPath: string,\n backupPath?: string,\n): Promise<string | undefined> {\n const dir = path.dirname(outputPath);\n let resolvedBackupPath: string | undefined;\n try {\n if (backupPath) {\n resolvedBackupPath = await copyExistingFileToBackup(outputPath, backupPath);\n }\n await rename(tempPath, outputPath);\n await syncDirectory(dir);\n return resolvedBackupPath;\n } catch (err) {\n await rm(tempPath, { force: true }).catch(() => undefined);\n throw err;\n }\n}\n"],"mappings":";AAAA,OAAO,UAAU;AACjB,SAAS,UAAU,OAAO,MAAM,QAAQ,IAAI,YAAY;AAExD,eAAe,cAAc,KAA4B;AACvD,MAAI;AACJ,MAAI;AACF,aAAS,MAAM,KAAK,KAAK,GAAG;AAC5B,UAAM,OAAO,KAAK;AAAA,EACpB,QAAQ;AAAA,EAER,UAAE;AACA,UAAM,QAAQ,MAAM,EAAE,MAAM,MAAM,MAAS;AAAA,EAC7C;AACF;AAEA,SAAS,YAAY,YAA4B;AAC/C,QAAM,SAAS,GAAG,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAClF,SAAO,KAAK,KAAK,KAAK,QAAQ,UAAU,GAAG,IAAI,KAAK,SAAS,UAAU,CAAC,IAAI,MAAM,MAAM;AAC1F;AAEA,eAAsB,yBACpB,YACA,YAC6B;AAC7B,MAAI;AACF,UAAM,KAAK,UAAU;AAAA,EACvB,SAAS,KAAK;AACZ,QAAK,IAA8B,SAAS,SAAU,QAAO;AAC7D,UAAM;AAAA,EACR;AAEA,QAAM,MAAM,KAAK,QAAQ,UAAU,GAAG,EAAE,WAAW,KAAK,CAAC;AACzD,QAAM,SAAS,YAAY,UAAU;AACrC,SAAO;AACT;AAEA,eAAsB,oBACpB,YACA,SACA,YAC6B;AAC7B,QAAM,MAAM,KAAK,QAAQ,UAAU;AACnC,QAAM,MAAM,KAAK,EAAE,WAAW,KAAK,CAAC;AACpC,QAAM,WAAW,YAAY,UAAU;AACvC,MAAI;AACJ,MAAI;AACJ,MAAI;AACF,aAAS,MAAM,KAAK,UAAU,GAAG;AACjC,QAAI,OAAO,YAAY,UAAU;AAC/B,YAAM,OAAO,UAAU,SAAS,OAAO;AAAA,IACzC,OAAO;AACL,YAAM,OAAO,UAAU,OAAO;AAAA,IAChC;AACA,UAAM,OAAO,KAAK;AAClB,UAAM,OAAO,MAAM;AACnB,aAAS;AAET,QAAI,YAAY;AACd,2BAAqB,MAAM,yBAAyB,YAAY,UAAU;AAAA,IAC5E;AACA,UAAM,OAAO,UAAU,UAAU;AACjC,UAAM,cAAc,GAAG;AACvB,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,UAAM,QAAQ,MAAM,EAAE,MAAM,MAAM,MAAS;AAC3C,UAAM,GAAG,UAAU,EAAE,OAAO,KAAK,CAAC,EAAE,MAAM,MAAM,MAAS;AACzD,UAAM;AAAA,EACR;AACF;AAEA,eAAsB,6BACpB,UACA,YACA,
|
|
1
|
+
{"version":3,"sources":["../src/maintenance/atomic-file.ts"],"sourcesContent":["import path from \"node:path\";\nimport { copyFile, mkdir, open, rename, rm, stat } from \"node:fs/promises\";\n\nasync function syncDirectory(dir: string): Promise<void> {\n let handle: Awaited<ReturnType<typeof open>> | undefined;\n try {\n handle = await open(dir, \"r\");\n await handle.sync();\n } catch {\n // Directory fsync is best-effort across platforms and filesystems.\n } finally {\n await handle?.close().catch(() => undefined);\n }\n}\n\nfunction tempPathFor(outputPath: string): string {\n const suffix = `${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`;\n return path.join(path.dirname(outputPath), `.${path.basename(outputPath)}.${suffix}.tmp`);\n}\n\nexport async function copyExistingFileToBackup(\n sourcePath: string,\n backupPath: string,\n): Promise<string | undefined> {\n try {\n await stat(sourcePath);\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return undefined;\n throw err;\n }\n\n await mkdir(path.dirname(backupPath), { recursive: true });\n await copyFile(sourcePath, backupPath);\n return backupPath;\n}\n\nexport async function writeFileAtomically(\n outputPath: string,\n content: string | Uint8Array,\n backupPath?: string,\n): Promise<string | undefined> {\n const dir = path.dirname(outputPath);\n await mkdir(dir, { recursive: true });\n const tempPath = tempPathFor(outputPath);\n let handle: Awaited<ReturnType<typeof open>> | undefined;\n let resolvedBackupPath: string | undefined;\n try {\n handle = await open(tempPath, \"w\");\n if (typeof content === \"string\") {\n await handle.writeFile(content, \"utf-8\");\n } else {\n await handle.writeFile(content);\n }\n await handle.sync();\n await handle.close();\n handle = undefined;\n\n if (backupPath) {\n resolvedBackupPath = await copyExistingFileToBackup(outputPath, backupPath);\n }\n await rename(tempPath, outputPath);\n await syncDirectory(dir);\n return resolvedBackupPath;\n } catch (err) {\n await handle?.close().catch(() => undefined);\n await rm(tempPath, { force: true }).catch(() => undefined);\n throw err;\n }\n}\n\nexport async function commitPreparedFileAtomically(\n tempPath: string,\n outputPath: string,\n backupPath?: string,\n beforeRename?: () => void | Promise<void>,\n): Promise<string | undefined> {\n const dir = path.dirname(outputPath);\n let resolvedBackupPath: string | undefined;\n try {\n if (backupPath) {\n resolvedBackupPath = await copyExistingFileToBackup(outputPath, backupPath);\n }\n if (beforeRename) await beforeRename();\n await rename(tempPath, outputPath);\n await syncDirectory(dir);\n return resolvedBackupPath;\n } catch (err) {\n await rm(tempPath, { force: true }).catch(() => undefined);\n throw err;\n }\n}\n"],"mappings":";AAAA,OAAO,UAAU;AACjB,SAAS,UAAU,OAAO,MAAM,QAAQ,IAAI,YAAY;AAExD,eAAe,cAAc,KAA4B;AACvD,MAAI;AACJ,MAAI;AACF,aAAS,MAAM,KAAK,KAAK,GAAG;AAC5B,UAAM,OAAO,KAAK;AAAA,EACpB,QAAQ;AAAA,EAER,UAAE;AACA,UAAM,QAAQ,MAAM,EAAE,MAAM,MAAM,MAAS;AAAA,EAC7C;AACF;AAEA,SAAS,YAAY,YAA4B;AAC/C,QAAM,SAAS,GAAG,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAClF,SAAO,KAAK,KAAK,KAAK,QAAQ,UAAU,GAAG,IAAI,KAAK,SAAS,UAAU,CAAC,IAAI,MAAM,MAAM;AAC1F;AAEA,eAAsB,yBACpB,YACA,YAC6B;AAC7B,MAAI;AACF,UAAM,KAAK,UAAU;AAAA,EACvB,SAAS,KAAK;AACZ,QAAK,IAA8B,SAAS,SAAU,QAAO;AAC7D,UAAM;AAAA,EACR;AAEA,QAAM,MAAM,KAAK,QAAQ,UAAU,GAAG,EAAE,WAAW,KAAK,CAAC;AACzD,QAAM,SAAS,YAAY,UAAU;AACrC,SAAO;AACT;AAEA,eAAsB,oBACpB,YACA,SACA,YAC6B;AAC7B,QAAM,MAAM,KAAK,QAAQ,UAAU;AACnC,QAAM,MAAM,KAAK,EAAE,WAAW,KAAK,CAAC;AACpC,QAAM,WAAW,YAAY,UAAU;AACvC,MAAI;AACJ,MAAI;AACJ,MAAI;AACF,aAAS,MAAM,KAAK,UAAU,GAAG;AACjC,QAAI,OAAO,YAAY,UAAU;AAC/B,YAAM,OAAO,UAAU,SAAS,OAAO;AAAA,IACzC,OAAO;AACL,YAAM,OAAO,UAAU,OAAO;AAAA,IAChC;AACA,UAAM,OAAO,KAAK;AAClB,UAAM,OAAO,MAAM;AACnB,aAAS;AAET,QAAI,YAAY;AACd,2BAAqB,MAAM,yBAAyB,YAAY,UAAU;AAAA,IAC5E;AACA,UAAM,OAAO,UAAU,UAAU;AACjC,UAAM,cAAc,GAAG;AACvB,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,UAAM,QAAQ,MAAM,EAAE,MAAM,MAAM,MAAS;AAC3C,UAAM,GAAG,UAAU,EAAE,OAAO,KAAK,CAAC,EAAE,MAAM,MAAM,MAAS;AACzD,UAAM;AAAA,EACR;AACF;AAEA,eAAsB,6BACpB,UACA,YACA,YACA,cAC6B;AAC7B,QAAM,MAAM,KAAK,QAAQ,UAAU;AACnC,MAAI;AACJ,MAAI;AACF,QAAI,YAAY;AACd,2BAAqB,MAAM,yBAAyB,YAAY,UAAU;AAAA,IAC5E;AACA,QAAI,aAAc,OAAM,aAAa;AACrC,UAAM,OAAO,UAAU,UAAU;AACjC,UAAM,cAAc,GAAG;AACvB,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,UAAM,GAAG,UAAU,EAAE,OAAO,KAAK,CAAC,EAAE,MAAM,MAAM,MAAS;AACzD,UAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-C7HJ3NEI.js";
|
|
12
12
|
import {
|
|
13
13
|
writeFileAtomically
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BTNNL7ZW.js";
|
|
15
15
|
import {
|
|
16
16
|
isErrnoCode
|
|
17
17
|
} from "./chunk-KNA3BXXL.js";
|
|
@@ -889,4 +889,4 @@ export {
|
|
|
889
889
|
applyBriefingLocationContext,
|
|
890
890
|
daySummaryAutoOptions
|
|
891
891
|
};
|
|
892
|
-
//# sourceMappingURL=chunk-
|
|
892
|
+
//# sourceMappingURL=chunk-CLCMDKTB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rebuildMemoryProjection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DBA2W6VV.js";
|
|
4
4
|
|
|
5
5
|
// src/convergence-refresh.ts
|
|
6
6
|
async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, getStorage, searchEnabled) {
|
|
@@ -32,4 +32,4 @@ async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, get
|
|
|
32
32
|
export {
|
|
33
33
|
refreshConvergedNamespaces
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-CQQTEDHS.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-B7RWBZXW.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ABET5LA5.js";
|
|
7
7
|
import {
|
|
8
8
|
getCachedEpisodeMap,
|
|
9
9
|
setCachedEpisodeMap
|
|
@@ -109,4 +109,4 @@ export {
|
|
|
109
109
|
compareVerifiedEpisodeResults,
|
|
110
110
|
searchVerifiedEpisodes
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-CV5AMCPX.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseXrayFormat
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BDHWKFGM.js";
|
|
4
4
|
import {
|
|
5
5
|
RECALL_DISCLOSURE_LEVELS,
|
|
6
6
|
isRecallDisclosure
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Z63GU5NN.js";
|
|
8
8
|
|
|
9
9
|
// src/recall-xray-cli.ts
|
|
10
10
|
function parseXrayDisclosureFlag(value) {
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
parseXrayBudgetFlag,
|
|
51
51
|
parseXrayCliOptions
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-CXG2T7BJ.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
listMemoryGovernanceRuns,
|
|
9
9
|
readMemoryGovernanceRunArtifact
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H6FA36LC.js";
|
|
11
11
|
import {
|
|
12
12
|
StorageManager
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ABET5LA5.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeProjectionPreview,
|
|
16
16
|
normalizeProjectionTags
|
|
@@ -21,10 +21,11 @@ import {
|
|
|
21
21
|
readProjectedGovernanceRows,
|
|
22
22
|
readProjectedNativeKnowledgeRows,
|
|
23
23
|
writeProjectionMetaHighWater
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XVC7JU2N.js";
|
|
25
25
|
import {
|
|
26
26
|
MEMORY_LIFECYCLE_EVENT_SORT_ORDER,
|
|
27
27
|
buildLifecycleEventsForMemory,
|
|
28
|
+
compareMemoryLifecycleEvents,
|
|
28
29
|
inferMemoryStatus,
|
|
29
30
|
memoryLifecycleEventProjectionIdentity,
|
|
30
31
|
sortMemoryLifecycleEvents,
|
|
@@ -44,10 +45,13 @@ import {
|
|
|
44
45
|
} from "./chunk-RL6NEVXT.js";
|
|
45
46
|
import {
|
|
46
47
|
commitPreparedFileAtomically
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-BTNNL7ZW.js";
|
|
48
49
|
import {
|
|
49
50
|
isSupportPassportPrivateMemory
|
|
50
51
|
} from "./chunk-PWPIERBM.js";
|
|
52
|
+
import {
|
|
53
|
+
throwIfAborted
|
|
54
|
+
} from "./chunk-BTTPKDIL.js";
|
|
51
55
|
import {
|
|
52
56
|
isErrnoCode
|
|
53
57
|
} from "./chunk-KNA3BXXL.js";
|
|
@@ -56,8 +60,177 @@ import {
|
|
|
56
60
|
} from "./chunk-3WCASNQZ.js";
|
|
57
61
|
|
|
58
62
|
// src/maintenance/rebuild-memory-projection.ts
|
|
59
|
-
import
|
|
63
|
+
import path2 from "path";
|
|
60
64
|
import { mkdir, rm, stat } from "fs/promises";
|
|
65
|
+
|
|
66
|
+
// src/maintenance/projection-timeline.ts
|
|
67
|
+
import path from "path";
|
|
68
|
+
function loadTimelineEvents(memories, lifecycleEvents) {
|
|
69
|
+
if (lifecycleEvents.length > 0) {
|
|
70
|
+
return {
|
|
71
|
+
events: sortMemoryLifecycleEvents(lifecycleEvents),
|
|
72
|
+
usedLifecycleLedger: true
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
events: sortMemoryLifecycleEvents(memories.flatMap((memory) => buildLifecycleEventsForMemory(memory))),
|
|
77
|
+
usedLifecycleLedger: false
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function deduplicateTimelineEvents(events, sourcePathFor) {
|
|
81
|
+
const keptById = /* @__PURE__ */ new Map();
|
|
82
|
+
const unique = [];
|
|
83
|
+
const skipped = [];
|
|
84
|
+
const skippedBlankIds = [];
|
|
85
|
+
for (const event of sortMemoryLifecycleEvents(events)) {
|
|
86
|
+
const sourcePath = sourcePathFor(event);
|
|
87
|
+
if (!event.memoryId.trim()) {
|
|
88
|
+
skippedBlankIds.push({ eventId: event.eventId, path: sourcePath });
|
|
89
|
+
log.warn(
|
|
90
|
+
`projection rebuild skipped timeline event with blank memory id: event_id=${event.eventId} path=${sourcePath}`
|
|
91
|
+
);
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
const kept = keptById.get(event.eventId);
|
|
95
|
+
if (kept) {
|
|
96
|
+
skipped.push({
|
|
97
|
+
eventId: event.eventId,
|
|
98
|
+
keptPath: kept.path,
|
|
99
|
+
skippedPath: sourcePath
|
|
100
|
+
});
|
|
101
|
+
log.warn(
|
|
102
|
+
`projection rebuild skipped duplicate timeline event_id=${event.eventId}: kept=${kept.path} skipped=${sourcePath}`
|
|
103
|
+
);
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
keptById.set(event.eventId, { event, path: sourcePath });
|
|
107
|
+
unique.push(event);
|
|
108
|
+
}
|
|
109
|
+
return { events: unique, skipped, skippedBlankIds };
|
|
110
|
+
}
|
|
111
|
+
function internPool() {
|
|
112
|
+
const pool = /* @__PURE__ */ new Map();
|
|
113
|
+
return (value) => {
|
|
114
|
+
const existing = pool.get(value);
|
|
115
|
+
if (existing !== void 0) return existing;
|
|
116
|
+
pool.set(value, value);
|
|
117
|
+
return value;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function internLedgerEvent(event, intern) {
|
|
121
|
+
event.memoryId = intern(event.memoryId);
|
|
122
|
+
event.eventType = intern(event.eventType);
|
|
123
|
+
event.timestamp = intern(event.timestamp);
|
|
124
|
+
event.actor = intern(event.actor);
|
|
125
|
+
event.ruleVersion = intern(event.ruleVersion);
|
|
126
|
+
if (event.reasonCode) event.reasonCode = intern(event.reasonCode);
|
|
127
|
+
if (event.correlationId) event.correlationId = intern(event.correlationId);
|
|
128
|
+
}
|
|
129
|
+
async function consumeLifecycleLedger(events, ledgerPath, signal) {
|
|
130
|
+
const intern = internPool();
|
|
131
|
+
const best = /* @__PURE__ */ new Map();
|
|
132
|
+
const losers = [];
|
|
133
|
+
const blanks = [];
|
|
134
|
+
const identities = /* @__PURE__ */ new Set();
|
|
135
|
+
let sawEvent = false;
|
|
136
|
+
for await (const event of events) {
|
|
137
|
+
throwIfAborted(signal, "projection rebuild aborted");
|
|
138
|
+
sawEvent = true;
|
|
139
|
+
internLedgerEvent(event, intern);
|
|
140
|
+
identities.add(memoryLifecycleEventProjectionIdentity(event));
|
|
141
|
+
if (!event.memoryId.trim()) {
|
|
142
|
+
blanks.push(event);
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const prev = best.get(event.eventId);
|
|
146
|
+
if (!prev) {
|
|
147
|
+
best.set(event.eventId, event);
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (compareMemoryLifecycleEvents(event, prev) < 0) {
|
|
151
|
+
losers.push(prev);
|
|
152
|
+
best.set(event.eventId, event);
|
|
153
|
+
} else {
|
|
154
|
+
losers.push(event);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (!sawEvent) return null;
|
|
158
|
+
const sourceLifecycleLedgerEventCount = identities.size;
|
|
159
|
+
identities.clear();
|
|
160
|
+
const skippedBlankIds = sortMemoryLifecycleEvents(blanks).map((event) => {
|
|
161
|
+
log.warn(
|
|
162
|
+
`projection rebuild skipped timeline event with blank memory id: event_id=${event.eventId} path=${ledgerPath}`
|
|
163
|
+
);
|
|
164
|
+
return { eventId: event.eventId, path: ledgerPath };
|
|
165
|
+
});
|
|
166
|
+
const skipped = sortMemoryLifecycleEvents(losers).map((event) => {
|
|
167
|
+
log.warn(
|
|
168
|
+
`projection rebuild skipped duplicate timeline event_id=${event.eventId}: kept=${ledgerPath} skipped=${ledgerPath}`
|
|
169
|
+
);
|
|
170
|
+
return {
|
|
171
|
+
eventId: event.eventId,
|
|
172
|
+
keptPath: ledgerPath,
|
|
173
|
+
skippedPath: ledgerPath
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
return {
|
|
177
|
+
events: sortMemoryLifecycleEvents([...best.values()]),
|
|
178
|
+
usedLifecycleLedger: true,
|
|
179
|
+
sourceLifecycleLedgerEventCount,
|
|
180
|
+
skipped,
|
|
181
|
+
skippedBlankIds
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
async function loadProjectionTimeline(options) {
|
|
185
|
+
const ledgerPath = path.join(options.memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
186
|
+
const streamed = await consumeLifecycleLedger(
|
|
187
|
+
options.storage.iterateMemoryLifecycleEvents(),
|
|
188
|
+
ledgerPath,
|
|
189
|
+
options.signal
|
|
190
|
+
);
|
|
191
|
+
if (streamed) return streamed;
|
|
192
|
+
const timeline = loadTimelineEvents(options.memories, []);
|
|
193
|
+
const memoryPathById = new Map(
|
|
194
|
+
options.memories.map((memory) => [memory.frontmatter.id, memory.path])
|
|
195
|
+
);
|
|
196
|
+
const deduplicated = deduplicateTimelineEvents(
|
|
197
|
+
timeline.events,
|
|
198
|
+
(event) => memoryPathById.get(event.memoryId) ?? ledgerPath
|
|
199
|
+
);
|
|
200
|
+
return {
|
|
201
|
+
events: deduplicated.events,
|
|
202
|
+
usedLifecycleLedger: false,
|
|
203
|
+
sourceLifecycleLedgerEventCount: 0,
|
|
204
|
+
skipped: deduplicated.skipped,
|
|
205
|
+
skippedBlankIds: deduplicated.skippedBlankIds
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// src/maintenance/projection-rebuild-abort.ts
|
|
210
|
+
function projectionRebuildParentDisconnected() {
|
|
211
|
+
return new Error("projection rebuild runner parent disconnected");
|
|
212
|
+
}
|
|
213
|
+
function watchProjectionRebuildParent() {
|
|
214
|
+
const abort = new AbortController();
|
|
215
|
+
const stop = () => {
|
|
216
|
+
if (abort.signal.aborted) return;
|
|
217
|
+
abort.abort(projectionRebuildParentDisconnected());
|
|
218
|
+
};
|
|
219
|
+
process.on("disconnect", stop);
|
|
220
|
+
if (process.connected === false) stop();
|
|
221
|
+
return abort.signal;
|
|
222
|
+
}
|
|
223
|
+
async function throwIfProjectionRebuildAborted(signal) {
|
|
224
|
+
if (!signal) return;
|
|
225
|
+
await new Promise((resolve) => {
|
|
226
|
+
setImmediate(resolve);
|
|
227
|
+
});
|
|
228
|
+
if (!signal.aborted) return;
|
|
229
|
+
const reason = signal.reason;
|
|
230
|
+
throw reason instanceof Error ? reason : projectionRebuildParentDisconnected();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// src/maintenance/rebuild-memory-projection.ts
|
|
61
234
|
async function backupExistingProjection(memoryDir, outputPath, now) {
|
|
62
235
|
try {
|
|
63
236
|
await stat(outputPath);
|
|
@@ -67,7 +240,7 @@ async function backupExistingProjection(memoryDir, outputPath, now) {
|
|
|
67
240
|
}
|
|
68
241
|
throw err;
|
|
69
242
|
}
|
|
70
|
-
const backupPath =
|
|
243
|
+
const backupPath = path2.join(
|
|
71
244
|
memoryDir,
|
|
72
245
|
"archive",
|
|
73
246
|
"memory-projection",
|
|
@@ -101,7 +274,8 @@ function toCurrentStateRow(memoryDir, memory) {
|
|
|
101
274
|
accessCount: memory.frontmatter.accessCount,
|
|
102
275
|
lastAccessed: memory.frontmatter.lastAccessed,
|
|
103
276
|
tags: normalizeProjectionTags(memory.frontmatter.tags),
|
|
104
|
-
preview
|
|
277
|
+
// Copy the preview off the source string so the full document can be collected.
|
|
278
|
+
preview: Buffer.from(normalizeProjectionPreview(memory.content), "utf8").toString("utf8"),
|
|
105
279
|
privateRecord: isSupportPassportPrivateMemory(memory)
|
|
106
280
|
};
|
|
107
281
|
}
|
|
@@ -176,18 +350,6 @@ async function loadLatestGovernanceProjection(memoryDir) {
|
|
|
176
350
|
return null;
|
|
177
351
|
}
|
|
178
352
|
}
|
|
179
|
-
function loadTimelineEvents(memories, lifecycleEvents) {
|
|
180
|
-
if (lifecycleEvents.length > 0) {
|
|
181
|
-
return {
|
|
182
|
-
events: sortMemoryLifecycleEvents(lifecycleEvents),
|
|
183
|
-
usedLifecycleLedger: true
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
return {
|
|
187
|
-
events: sortMemoryLifecycleEvents(memories.flatMap((memory) => buildLifecycleEventsForMemory(memory))),
|
|
188
|
-
usedLifecycleLedger: false
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
353
|
function normalizeScopedIso(value) {
|
|
192
354
|
if (!value) return null;
|
|
193
355
|
const trimmed = value.trim();
|
|
@@ -337,67 +499,39 @@ function selectProjectionMemories(tiers) {
|
|
|
337
499
|
}
|
|
338
500
|
return { allMemories, memories, skippedDuplicateMemories, skippedBlankIdMemories };
|
|
339
501
|
}
|
|
340
|
-
function deduplicateTimelineEvents(events, sourcePathFor) {
|
|
341
|
-
const keptById = /* @__PURE__ */ new Map();
|
|
342
|
-
const unique = [];
|
|
343
|
-
const skipped = [];
|
|
344
|
-
const skippedBlankIds = [];
|
|
345
|
-
for (const event of sortMemoryLifecycleEvents(events)) {
|
|
346
|
-
const sourcePath = sourcePathFor(event);
|
|
347
|
-
if (!event.memoryId.trim()) {
|
|
348
|
-
skippedBlankIds.push({ eventId: event.eventId, path: sourcePath });
|
|
349
|
-
log.warn(
|
|
350
|
-
`projection rebuild skipped timeline event with blank memory id: event_id=${event.eventId} path=${sourcePath}`
|
|
351
|
-
);
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
const kept = keptById.get(event.eventId);
|
|
355
|
-
if (kept) {
|
|
356
|
-
skipped.push({
|
|
357
|
-
eventId: event.eventId,
|
|
358
|
-
keptPath: kept.path,
|
|
359
|
-
skippedPath: sourcePath
|
|
360
|
-
});
|
|
361
|
-
log.warn(
|
|
362
|
-
`projection rebuild skipped duplicate timeline event_id=${event.eventId}: kept=${kept.path} skipped=${sourcePath}`
|
|
363
|
-
);
|
|
364
|
-
continue;
|
|
365
|
-
}
|
|
366
|
-
keptById.set(event.eventId, { event, path: sourcePath });
|
|
367
|
-
unique.push(event);
|
|
368
|
-
}
|
|
369
|
-
return { events: unique, skipped, skippedBlankIds };
|
|
370
|
-
}
|
|
371
502
|
async function loadAuthoritativeProjectionSnapshot(options) {
|
|
372
503
|
const storage = assertInjectedStorageRooted("rebuildMemoryProjection", options.memoryDir, options.storage) ?? new StorageManager(options.memoryDir);
|
|
373
504
|
storage.invalidateAllMemoriesCacheForDir({ indexedText: false });
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
505
|
+
const corpusRead = {
|
|
506
|
+
retainRaw: options.retainRaw === true,
|
|
507
|
+
abortSignal: options.signal
|
|
508
|
+
};
|
|
509
|
+
const hot = await storage.readAllMemories(corpusRead);
|
|
510
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
511
|
+
const cold = await storage.readAllColdMemories(corpusRead);
|
|
512
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
513
|
+
const archived = await storage.readArchivedMemories(corpusRead);
|
|
514
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
515
|
+
const selected = selectProjectionMemories([hot, cold, archived]);
|
|
379
516
|
const allMemories = selected.allMemories;
|
|
380
517
|
const projectionMemories = selected.memories;
|
|
381
|
-
const lifecycleEvents = await storage.readAllMemoryLifecycleEvents();
|
|
382
|
-
const timeline = loadTimelineEvents(projectionMemories, lifecycleEvents);
|
|
383
|
-
const lifecycleLedgerPath = path.join(
|
|
384
|
-
options.memoryDir,
|
|
385
|
-
"state",
|
|
386
|
-
"memory-lifecycle-ledger.jsonl"
|
|
387
|
-
);
|
|
388
|
-
const memoryPathById = new Map(
|
|
389
|
-
projectionMemories.map((memory) => [memory.frontmatter.id, memory.path])
|
|
390
|
-
);
|
|
391
|
-
const deduplicatedTimeline = deduplicateTimelineEvents(
|
|
392
|
-
timeline.events,
|
|
393
|
-
(event) => timeline.usedLifecycleLedger ? lifecycleLedgerPath : memoryPathById.get(event.memoryId) ?? lifecycleLedgerPath
|
|
394
|
-
);
|
|
395
|
-
const events = deduplicatedTimeline.events;
|
|
396
|
-
const usedLifecycleLedger = timeline.usedLifecycleLedger;
|
|
397
|
-
const sourceLifecycleLedgerEventCount = new Set(
|
|
398
|
-
lifecycleEvents.map(memoryLifecycleEventProjectionIdentity)
|
|
399
|
-
).size;
|
|
400
518
|
const currentRows = projectionMemories.map((memory) => toCurrentStateRow(options.memoryDir, memory));
|
|
519
|
+
if (options.retainRaw !== true) {
|
|
520
|
+
for (const memory of allMemories) memory.content = "";
|
|
521
|
+
}
|
|
522
|
+
const {
|
|
523
|
+
events,
|
|
524
|
+
usedLifecycleLedger,
|
|
525
|
+
sourceLifecycleLedgerEventCount,
|
|
526
|
+
skipped: skippedDuplicateTimelineEvents,
|
|
527
|
+
skippedBlankIds: skippedBlankIdTimelineEvents
|
|
528
|
+
} = await loadProjectionTimeline({
|
|
529
|
+
storage,
|
|
530
|
+
memoryDir: options.memoryDir,
|
|
531
|
+
memories: projectionMemories,
|
|
532
|
+
signal: options.signal
|
|
533
|
+
});
|
|
534
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
401
535
|
const scope = normalizeProjectionScope(options);
|
|
402
536
|
const scopedMemories = filterMemoriesForProjectionScope(projectionMemories, scope);
|
|
403
537
|
const scopedMemoryIds = new Set(scopedMemories.map((memory) => memory.frontmatter.id));
|
|
@@ -438,8 +572,8 @@ async function loadAuthoritativeProjectionSnapshot(options) {
|
|
|
438
572
|
scope,
|
|
439
573
|
skippedDuplicateMemories: selected.skippedDuplicateMemories,
|
|
440
574
|
skippedBlankIdMemories: selected.skippedBlankIdMemories,
|
|
441
|
-
skippedDuplicateTimelineEvents
|
|
442
|
-
skippedBlankIdTimelineEvents
|
|
575
|
+
skippedDuplicateTimelineEvents,
|
|
576
|
+
skippedBlankIdTimelineEvents
|
|
443
577
|
};
|
|
444
578
|
}
|
|
445
579
|
function readProjectedCurrentRows(memoryDir) {
|
|
@@ -513,7 +647,7 @@ function readProjectedTimelineRows(memoryDir) {
|
|
|
513
647
|
}
|
|
514
648
|
function writeProjectionDb(dbPath, nowIso, currentRows, timelineRows, entityMentionRows, nativeKnowledgeRows, governance, usedLifecycleLedger, sourceLifecycleLedgerEventCount, complete) {
|
|
515
649
|
const db = openBetterSqlite3(dbPath);
|
|
516
|
-
const memoryDir =
|
|
650
|
+
const memoryDir = path2.dirname(path2.dirname(dbPath));
|
|
517
651
|
try {
|
|
518
652
|
initializeMemoryProjectionDb(db);
|
|
519
653
|
const insertMeta = db.prepare("INSERT OR REPLACE INTO meta(key, value) VALUES (?, ?)");
|
|
@@ -774,6 +908,7 @@ async function rebuildMemoryProjection(options) {
|
|
|
774
908
|
const now = options.now ?? /* @__PURE__ */ new Date();
|
|
775
909
|
const outputPath = getMemoryProjectionPath(options.memoryDir);
|
|
776
910
|
const snapshot = await loadAuthoritativeProjectionSnapshot(options);
|
|
911
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
777
912
|
let backupPath;
|
|
778
913
|
if (!dryRun) {
|
|
779
914
|
let nextCurrentRows = snapshot.currentRows;
|
|
@@ -824,7 +959,8 @@ async function rebuildMemoryProjection(options) {
|
|
|
824
959
|
}
|
|
825
960
|
}
|
|
826
961
|
const tempPath = `${outputPath}.tmp`;
|
|
827
|
-
await mkdir(
|
|
962
|
+
await mkdir(path2.dirname(outputPath), { recursive: true });
|
|
963
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
828
964
|
await rm(tempPath, { force: true });
|
|
829
965
|
writeProjectionDb(
|
|
830
966
|
tempPath,
|
|
@@ -838,8 +974,20 @@ async function rebuildMemoryProjection(options) {
|
|
|
838
974
|
snapshot.sourceLifecycleLedgerEventCount,
|
|
839
975
|
!hasScopedProjectionFilter(snapshot.scope)
|
|
840
976
|
);
|
|
841
|
-
|
|
842
|
-
|
|
977
|
+
try {
|
|
978
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
979
|
+
backupPath = await backupExistingProjection(options.memoryDir, outputPath, now);
|
|
980
|
+
await throwIfProjectionRebuildAborted(options.signal);
|
|
981
|
+
backupPath = await commitPreparedFileAtomically(
|
|
982
|
+
tempPath,
|
|
983
|
+
outputPath,
|
|
984
|
+
backupPath,
|
|
985
|
+
() => throwIfProjectionRebuildAborted(options.signal)
|
|
986
|
+
);
|
|
987
|
+
} catch (err) {
|
|
988
|
+
if (options.signal?.aborted) await rm(tempPath, { force: true });
|
|
989
|
+
throw err;
|
|
990
|
+
}
|
|
843
991
|
}
|
|
844
992
|
return {
|
|
845
993
|
dryRun,
|
|
@@ -1002,9 +1150,10 @@ async function repairMemoryProjection(options) {
|
|
|
1002
1150
|
}
|
|
1003
1151
|
|
|
1004
1152
|
export {
|
|
1153
|
+
watchProjectionRebuildParent,
|
|
1005
1154
|
backupExistingProjection,
|
|
1006
1155
|
rebuildMemoryProjection,
|
|
1007
1156
|
verifyMemoryProjection,
|
|
1008
1157
|
repairMemoryProjection
|
|
1009
1158
|
};
|
|
1010
|
-
//# sourceMappingURL=chunk-
|
|
1159
|
+
//# sourceMappingURL=chunk-DBA2W6VV.js.map
|