@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
|
@@ -7,19 +7,22 @@ import {
|
|
|
7
7
|
ensureProceduralMiningCron,
|
|
8
8
|
graphEdgeDecayCadenceToCronExpr
|
|
9
9
|
} from "./chunk-666A3MOW.js";
|
|
10
|
+
import {
|
|
11
|
+
PROJECTION_REBUILD_RUNNER_FLAG
|
|
12
|
+
} from "./chunk-FMIVV5SV.js";
|
|
10
13
|
import {
|
|
11
14
|
startLocationAutoSync
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IHIP7TJ3.js";
|
|
13
16
|
import {
|
|
14
17
|
rebuildMemoryLifecycleLedger
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-O57VUN4U.js";
|
|
16
19
|
import {
|
|
17
20
|
planNamespaceMaintenance,
|
|
18
21
|
runNamespaceMaintenanceBatchPlan
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Y7CXM7UM.js";
|
|
20
23
|
import {
|
|
21
24
|
rebuildMemoryProjection
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DBA2W6VV.js";
|
|
23
26
|
import {
|
|
24
27
|
DEFAULT_TIMELINE_CATEGORIES,
|
|
25
28
|
TIMELINE_RESERVED_IDLE,
|
|
@@ -31,6 +34,9 @@ import {
|
|
|
31
34
|
validateActivityBaseUrl,
|
|
32
35
|
validateTimelineCategories
|
|
33
36
|
} from "./chunk-EUL3S3LE.js";
|
|
37
|
+
import {
|
|
38
|
+
DEFAULT_PROJECTION_REBUILD_HEAP_USAGE_LIMIT
|
|
39
|
+
} from "./chunk-EWMRFW3F.js";
|
|
34
40
|
import {
|
|
35
41
|
LocalLlmClient
|
|
36
42
|
} from "./chunk-IDSSDL4W.js";
|
|
@@ -55,7 +61,7 @@ import {
|
|
|
55
61
|
drainPendingLifecycleLedgerIfAny,
|
|
56
62
|
pendingLifecycleLedgerDir,
|
|
57
63
|
readProjectionRebuiltAt
|
|
58
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-XVC7JU2N.js";
|
|
59
65
|
import {
|
|
60
66
|
displayErrorDetail,
|
|
61
67
|
openBetterSqlite3
|
|
@@ -92,9 +98,9 @@ import {
|
|
|
92
98
|
} from "./chunk-3WCASNQZ.js";
|
|
93
99
|
|
|
94
100
|
// src/orchestration/maintenance.ts
|
|
95
|
-
import { existsSync } from "fs";
|
|
101
|
+
import { existsSync as existsSync2 } from "fs";
|
|
96
102
|
import { appendFile, lstat, mkdir as mkdir3, readFile as readFile2, readdir, realpath, stat, writeFile as writeFile2 } from "fs/promises";
|
|
97
|
-
import
|
|
103
|
+
import path6 from "path";
|
|
98
104
|
|
|
99
105
|
// src/maintenance/day-summary-cron.ts
|
|
100
106
|
function resolveDaySummaryCronModel(config) {
|
|
@@ -123,11 +129,182 @@ function resolveDaySummaryCronModel(config) {
|
|
|
123
129
|
return { ...model ? { model } : {}, fallbacks };
|
|
124
130
|
}
|
|
125
131
|
|
|
132
|
+
// src/orchestration/projection-rebuild-schedule.ts
|
|
133
|
+
import { existsSync } from "fs";
|
|
134
|
+
import { fork } from "child_process";
|
|
135
|
+
import path from "path";
|
|
136
|
+
import v8 from "v8";
|
|
137
|
+
import { fileURLToPath } from "url";
|
|
138
|
+
|
|
139
|
+
// src/orchestration/full-corpus-heap-guard.ts
|
|
140
|
+
function fullCorpusHeapPressure(stats, limitRatio) {
|
|
141
|
+
const used = stats.used_heap_size;
|
|
142
|
+
const cap = stats.heap_size_limit;
|
|
143
|
+
if (!Number.isFinite(used) || used < 0 || !Number.isFinite(cap) || cap <= 0 || !Number.isFinite(limitRatio)) {
|
|
144
|
+
return { postpone: false, ratio: 0 };
|
|
145
|
+
}
|
|
146
|
+
const ratio = used / cap;
|
|
147
|
+
return { postpone: ratio > limitRatio, ratio };
|
|
148
|
+
}
|
|
149
|
+
|
|
126
150
|
// src/orchestration/projection-rebuild-schedule.ts
|
|
127
151
|
var FAILURE_RETRY_BACKOFF_MS = 5 * 60 * 1e3;
|
|
152
|
+
var FORK_TIMEOUT_MS = 30 * 60 * 1e3;
|
|
153
|
+
var MAX_SETTIMEOUT_MS = 2147483647;
|
|
154
|
+
function projectionRebuildForkTimeoutMs(intervalMs) {
|
|
155
|
+
const timeout = !Number.isFinite(intervalMs) || intervalMs < FORK_TIMEOUT_MS ? FORK_TIMEOUT_MS : intervalMs;
|
|
156
|
+
return Math.min(timeout, MAX_SETTIMEOUT_MS);
|
|
157
|
+
}
|
|
158
|
+
var projectionRebuildChildren = /* @__PURE__ */ new Map();
|
|
159
|
+
var parentExitHookInstalled = false;
|
|
160
|
+
function rememberProjectionRebuildChild(child, owner) {
|
|
161
|
+
let children = projectionRebuildChildren.get(owner);
|
|
162
|
+
if (!children) {
|
|
163
|
+
children = /* @__PURE__ */ new Set();
|
|
164
|
+
projectionRebuildChildren.set(owner, children);
|
|
165
|
+
}
|
|
166
|
+
children.add(child);
|
|
167
|
+
const forget = () => {
|
|
168
|
+
children.delete(child);
|
|
169
|
+
if (children.size === 0) projectionRebuildChildren.delete(owner);
|
|
170
|
+
};
|
|
171
|
+
child.once("exit", forget);
|
|
172
|
+
child.once("error", forget);
|
|
173
|
+
if (!parentExitHookInstalled) {
|
|
174
|
+
parentExitHookInstalled = true;
|
|
175
|
+
process.on("exit", () => {
|
|
176
|
+
terminateScheduledProjectionRebuilds();
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function terminateScheduledProjectionRebuilds(owner) {
|
|
181
|
+
const groups = owner ? [projectionRebuildChildren.get(owner)] : [...projectionRebuildChildren.values()];
|
|
182
|
+
for (const children of groups) {
|
|
183
|
+
if (!children) continue;
|
|
184
|
+
for (const child of children) child.kill("SIGKILL");
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
var CHILD_ENV_ALLOWLIST = [
|
|
188
|
+
"PATH",
|
|
189
|
+
"NODE_OPTIONS",
|
|
190
|
+
"HOME",
|
|
191
|
+
"USERPROFILE",
|
|
192
|
+
"TMPDIR",
|
|
193
|
+
"TMP",
|
|
194
|
+
"TEMP",
|
|
195
|
+
"LANG",
|
|
196
|
+
"LC_ALL",
|
|
197
|
+
"LC_CTYPE",
|
|
198
|
+
"TZ",
|
|
199
|
+
"SystemRoot",
|
|
200
|
+
"windir",
|
|
201
|
+
"PATHEXT",
|
|
202
|
+
"COMSPEC",
|
|
203
|
+
"NODE_PATH"
|
|
204
|
+
];
|
|
128
205
|
function createProjectionRebuildScheduleState() {
|
|
129
206
|
return { inFlight: false, lastRebuildAtMs: 0, lastFailureAtMs: 0 };
|
|
130
207
|
}
|
|
208
|
+
function projectionRebuildChildEnv(parent) {
|
|
209
|
+
const env = {};
|
|
210
|
+
for (const key of CHILD_ENV_ALLOWLIST) {
|
|
211
|
+
const value = parent[key];
|
|
212
|
+
if (value !== void 0) env[key] = value;
|
|
213
|
+
}
|
|
214
|
+
return env;
|
|
215
|
+
}
|
|
216
|
+
function projectionRebuildRunnerPath() {
|
|
217
|
+
const here = fileURLToPath(import.meta.url);
|
|
218
|
+
const dir = path.dirname(here);
|
|
219
|
+
const candidates = [
|
|
220
|
+
path.join(dir, "..", "maintenance", "rebuild-memory-projection-runner.ts"),
|
|
221
|
+
path.join(dir, "..", "maintenance", "rebuild-memory-projection-runner.js"),
|
|
222
|
+
path.join(dir, "maintenance", "rebuild-memory-projection-runner.js"),
|
|
223
|
+
path.join(dir, "rebuild-memory-projection-runner.js")
|
|
224
|
+
];
|
|
225
|
+
for (const candidate of candidates) {
|
|
226
|
+
if (existsSync(candidate)) return candidate;
|
|
227
|
+
}
|
|
228
|
+
throw new Error("projection rebuild runner was not found next to the maintenance bundle");
|
|
229
|
+
}
|
|
230
|
+
function runnerExecArgv(runnerPath) {
|
|
231
|
+
const argv = [];
|
|
232
|
+
const source = process.execArgv;
|
|
233
|
+
for (let index = 0; index < source.length; index += 1) {
|
|
234
|
+
const arg = source[index] ?? "";
|
|
235
|
+
if (arg === "--inspect" || arg === "--inspect-brk" || arg === "--inspect-port") {
|
|
236
|
+
if (arg === "--inspect-port") index += 1;
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
if (arg.startsWith("--inspect=") || arg.startsWith("--inspect-brk=") || arg.startsWith("--inspect-port=")) {
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
argv.push(arg);
|
|
243
|
+
}
|
|
244
|
+
if (runnerPath.endsWith(".ts") && !argv.some((arg) => arg === "tsx" || arg.includes(`${path.sep}tsx`))) {
|
|
245
|
+
argv.unshift("--import", "tsx");
|
|
246
|
+
}
|
|
247
|
+
return argv;
|
|
248
|
+
}
|
|
249
|
+
function isRunnerSuccess(message) {
|
|
250
|
+
if (!message || typeof message !== "object") return false;
|
|
251
|
+
const row = message;
|
|
252
|
+
return row.ok === true && typeof row.currentRows === "number" && typeof row.timelineRows === "number" && typeof row.entityMentionRows === "number";
|
|
253
|
+
}
|
|
254
|
+
async function forkProjectionRebuild(request, options) {
|
|
255
|
+
const timeoutMs = Math.min(options?.timeoutMs ?? FORK_TIMEOUT_MS, MAX_SETTIMEOUT_MS);
|
|
256
|
+
const child = options?.spawnChild ? options.spawnChild() : spawnProjectionRebuildChild(request);
|
|
257
|
+
rememberProjectionRebuildChild(child, options?.owner);
|
|
258
|
+
return await new Promise((resolve, reject) => {
|
|
259
|
+
let settled = false;
|
|
260
|
+
let timer;
|
|
261
|
+
const finish = (err, result) => {
|
|
262
|
+
if (settled) return;
|
|
263
|
+
settled = true;
|
|
264
|
+
if (timer) clearTimeout(timer);
|
|
265
|
+
if (err) reject(err);
|
|
266
|
+
else if (result) resolve(result);
|
|
267
|
+
else reject(new Error("projection rebuild runner returned no result"));
|
|
268
|
+
};
|
|
269
|
+
timer = setTimeout(() => {
|
|
270
|
+
child.kill("SIGKILL");
|
|
271
|
+
finish(new Error(`projection rebuild runner timed out after ${timeoutMs}ms`));
|
|
272
|
+
}, timeoutMs);
|
|
273
|
+
timer.unref?.();
|
|
274
|
+
child.on("message", (message) => {
|
|
275
|
+
if (isRunnerSuccess(message)) {
|
|
276
|
+
finish(void 0, message);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const error = message && typeof message === "object" && "error" in message ? String(message.error ?? "projection rebuild runner failed") : "projection rebuild runner failed";
|
|
280
|
+
finish(new Error(error));
|
|
281
|
+
});
|
|
282
|
+
child.on("error", (err) => finish(err));
|
|
283
|
+
child.on("exit", (code) => {
|
|
284
|
+
if (!settled) {
|
|
285
|
+
finish(new Error(`projection rebuild runner exited ${code ?? "null"}`));
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
options?.onChild?.(child);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
function spawnProjectionRebuildChild(request) {
|
|
292
|
+
const runnerPath = projectionRebuildRunnerPath();
|
|
293
|
+
const nowIso = request.now.toISOString();
|
|
294
|
+
return fork(
|
|
295
|
+
runnerPath,
|
|
296
|
+
[PROJECTION_REBUILD_RUNNER_FLAG, request.memoryDir, request.defaultNamespace, nowIso],
|
|
297
|
+
{
|
|
298
|
+
execArgv: runnerExecArgv(runnerPath),
|
|
299
|
+
env: projectionRebuildChildEnv(process.env),
|
|
300
|
+
stdio: ["ignore", "inherit", "inherit", "ipc"]
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
function storageIsUnlocked(storage) {
|
|
305
|
+
if (!storage || typeof storage.isSecureStoreUnlocked !== "function") return false;
|
|
306
|
+
return storage.isSecureStoreUnlocked();
|
|
307
|
+
}
|
|
131
308
|
async function maybeRebuildMemoryProjectionScheduled(opts) {
|
|
132
309
|
const { config, state } = opts;
|
|
133
310
|
if (!resolveMemoryLifecycleCapabilities(config).projectionRebuild) return;
|
|
@@ -144,9 +321,21 @@ async function maybeRebuildMemoryProjectionScheduled(opts) {
|
|
|
144
321
|
state.lastRebuildAtMs = rebuiltAtMs;
|
|
145
322
|
return;
|
|
146
323
|
}
|
|
324
|
+
const heapLimit = config.projectionRebuildHeapUsageLimit ?? DEFAULT_PROJECTION_REBUILD_HEAP_USAGE_LIMIT;
|
|
325
|
+
const heapStats = (opts.heapStatistics ?? (() => v8.getHeapStatistics()))();
|
|
326
|
+
const pressure = fullCorpusHeapPressure(heapStats, heapLimit);
|
|
327
|
+
if (pressure.postpone) {
|
|
328
|
+
state.lastFailureAtMs = Date.now();
|
|
329
|
+
log.warn(
|
|
330
|
+
`memory projection scheduled rebuild postponed for ${memoryDir}: heap used ${heapStats.used_heap_size} of limit ${heapStats.heap_size_limit} (ratio ${pressure.ratio.toFixed(3)}) exceeds projectionRebuildHeapUsageLimit ${heapLimit}`
|
|
331
|
+
);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const forkRebuild = opts.forkRebuild ?? forkProjectionRebuild;
|
|
335
|
+
const unlocked = storageIsUnlocked(rootStorage);
|
|
147
336
|
state.inFlight = true;
|
|
148
337
|
try {
|
|
149
|
-
const result = await rebuildMemoryProjection({
|
|
338
|
+
const result = unlocked ? await rebuildMemoryProjection({
|
|
150
339
|
memoryDir,
|
|
151
340
|
// Reuse the daemon's live storage so secure-store deployments rebuild
|
|
152
341
|
// through the unlocked instance instead of a fresh locked one.
|
|
@@ -154,6 +343,13 @@ async function maybeRebuildMemoryProjectionScheduled(opts) {
|
|
|
154
343
|
defaultNamespace: config.defaultNamespace,
|
|
155
344
|
dryRun: false,
|
|
156
345
|
now: new Date(now)
|
|
346
|
+
}) : await forkRebuild({
|
|
347
|
+
memoryDir,
|
|
348
|
+
defaultNamespace: config.defaultNamespace || "default",
|
|
349
|
+
now: new Date(now)
|
|
350
|
+
}, {
|
|
351
|
+
timeoutMs: projectionRebuildForkTimeoutMs(intervalMs),
|
|
352
|
+
owner: state
|
|
157
353
|
});
|
|
158
354
|
state.lastRebuildAtMs = Date.now();
|
|
159
355
|
const lag = Number.isFinite(rebuiltAtMs) ? `${Math.max(0, Math.round((now - rebuiltAtMs) / 6e4))}m stale` : "never previously built";
|
|
@@ -185,17 +381,17 @@ async function refreshActivityIndex(qmd, collection, signal) {
|
|
|
185
381
|
// src/activity/store.ts
|
|
186
382
|
import { mkdirSync } from "fs";
|
|
187
383
|
import { mkdir } from "fs/promises";
|
|
188
|
-
import
|
|
384
|
+
import path2 from "path";
|
|
189
385
|
var ACTIVITY_SCHEMA_VERSION = 1;
|
|
190
386
|
var MAX_SEARCH_RESULTS = 100;
|
|
191
387
|
function activityDatabasePath(memoryDir) {
|
|
192
|
-
return
|
|
388
|
+
return path2.join(memoryDir, "state", "activity.sqlite");
|
|
193
389
|
}
|
|
194
390
|
async function ensureActivityStateDir(memoryDir) {
|
|
195
|
-
await mkdir(
|
|
391
|
+
await mkdir(path2.join(memoryDir, "state"), { recursive: true });
|
|
196
392
|
}
|
|
197
393
|
function openActivityDatabase(memoryDir) {
|
|
198
|
-
mkdirSync(
|
|
394
|
+
mkdirSync(path2.join(memoryDir, "state"), { recursive: true });
|
|
199
395
|
const db = openBetterSqlite3(activityDatabasePath(memoryDir));
|
|
200
396
|
db.pragma("journal_mode = WAL");
|
|
201
397
|
db.pragma("busy_timeout = 5000");
|
|
@@ -444,7 +640,7 @@ var ActivityStore = class _ActivityStore {
|
|
|
444
640
|
// src/activity/pipeline.ts
|
|
445
641
|
import { mkdir as mkdir2, readFile, rename, writeFile } from "fs/promises";
|
|
446
642
|
import { randomUUID } from "crypto";
|
|
447
|
-
import
|
|
643
|
+
import path3 from "path";
|
|
448
644
|
var MAX_SYNC_PAGES = 1e4;
|
|
449
645
|
function activityCursorKey(machine, date) {
|
|
450
646
|
return `${machine}\0${date}`;
|
|
@@ -483,7 +679,7 @@ async function writeDigestIfChanged(memoryDir, date, serialized) {
|
|
|
483
679
|
} catch (error) {
|
|
484
680
|
if (!(error instanceof Error) || !("code" in error) || error.code !== "ENOENT") throw error;
|
|
485
681
|
}
|
|
486
|
-
await mkdir2(
|
|
682
|
+
await mkdir2(path3.dirname(target), { recursive: true, mode: 448 });
|
|
487
683
|
const temporary = `${target}.${process.pid}.${randomUUID()}.tmp`;
|
|
488
684
|
await writeFile(temporary, serialized, { encoding: "utf8", mode: 384 });
|
|
489
685
|
await rename(temporary, target);
|
|
@@ -630,8 +826,8 @@ function responsePage(value, machine) {
|
|
|
630
826
|
nextCursor
|
|
631
827
|
};
|
|
632
828
|
}
|
|
633
|
-
function requestUrl(baseUrl,
|
|
634
|
-
const url = new URL(
|
|
829
|
+
function requestUrl(baseUrl, path7, query) {
|
|
830
|
+
const url = new URL(path7, baseUrl);
|
|
635
831
|
const parts = Object.entries(query).filter((entry) => entry[1] !== void 0).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
|
|
636
832
|
url.search = parts.join("&");
|
|
637
833
|
return url.toString();
|
|
@@ -686,13 +882,13 @@ var ActivityHttpSourceClient = class {
|
|
|
686
882
|
// src/activity/timeline/regenerate.ts
|
|
687
883
|
import { randomBytes } from "crypto";
|
|
688
884
|
import { mkdirSync as mkdirSync3, readdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "fs";
|
|
689
|
-
import
|
|
885
|
+
import path5 from "path";
|
|
690
886
|
|
|
691
887
|
// src/activity/timeline/corrections.ts
|
|
692
888
|
import { mkdirSync as mkdirSync2 } from "fs";
|
|
693
|
-
import
|
|
889
|
+
import path4 from "path";
|
|
694
890
|
function timelineCorrectionDatabasePath(memoryDir) {
|
|
695
|
-
return
|
|
891
|
+
return path4.join(memoryDir, "state", "activity-timeline.sqlite");
|
|
696
892
|
}
|
|
697
893
|
function rowToCorrection(row) {
|
|
698
894
|
return {
|
|
@@ -708,7 +904,7 @@ var TimelineCorrectionStore = class _TimelineCorrectionStore {
|
|
|
708
904
|
this.db = db;
|
|
709
905
|
}
|
|
710
906
|
static open(memoryDir) {
|
|
711
|
-
mkdirSync2(
|
|
907
|
+
mkdirSync2(path4.join(memoryDir, "state"), { recursive: true });
|
|
712
908
|
const db = openBetterSqlite3(timelineCorrectionDatabasePath(memoryDir));
|
|
713
909
|
db.pragma("journal_mode = WAL");
|
|
714
910
|
db.pragma("busy_timeout = 5000");
|
|
@@ -1092,7 +1288,7 @@ async function runTimelineCardAnalysis(input) {
|
|
|
1092
1288
|
|
|
1093
1289
|
// src/activity/timeline/regenerate.ts
|
|
1094
1290
|
var TIMELINE_DAY_FORMAT_VERSION = 1;
|
|
1095
|
-
var TIMELINE_DAY_DIR =
|
|
1291
|
+
var TIMELINE_DAY_DIR = path5.join("activity", "timeline");
|
|
1096
1292
|
var inflight = /* @__PURE__ */ new Map();
|
|
1097
1293
|
function requireToken(value, name) {
|
|
1098
1294
|
if (typeof value !== "string" || value.trim().length === 0) {
|
|
@@ -1105,7 +1301,7 @@ function timelineDayPath(memoryDir, date) {
|
|
|
1105
1301
|
if (!isValidActivityDate(date)) {
|
|
1106
1302
|
throw new RangeError("date must be a real YYYY-MM-DD day");
|
|
1107
1303
|
}
|
|
1108
|
-
return
|
|
1304
|
+
return path5.join(path5.resolve(root), TIMELINE_DAY_DIR, `${date}.json`);
|
|
1109
1305
|
}
|
|
1110
1306
|
function snapshotToObservation(snapshot) {
|
|
1111
1307
|
if (typeof snapshot.id !== "number") return null;
|
|
@@ -1135,7 +1331,7 @@ function localDatesForUtcRange(fromMs, toMs, timezone) {
|
|
|
1135
1331
|
function listPersistedTimelineDates(memoryDir) {
|
|
1136
1332
|
let entries;
|
|
1137
1333
|
try {
|
|
1138
|
-
entries = readdirSync(
|
|
1334
|
+
entries = readdirSync(path5.join(path5.resolve(requireToken(memoryDir, "memoryDir")), TIMELINE_DAY_DIR));
|
|
1139
1335
|
} catch {
|
|
1140
1336
|
return [];
|
|
1141
1337
|
}
|
|
@@ -1229,7 +1425,7 @@ function persistDay(filePath, payload) {
|
|
|
1229
1425
|
throw error;
|
|
1230
1426
|
}
|
|
1231
1427
|
}
|
|
1232
|
-
mkdirSync3(
|
|
1428
|
+
mkdirSync3(path5.dirname(filePath), { recursive: true, mode: 448 });
|
|
1233
1429
|
const tmpPath = `${filePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
1234
1430
|
writeFileSync(tmpPath, text, { encoding: "utf8", mode: 384 });
|
|
1235
1431
|
try {
|
|
@@ -1324,7 +1520,7 @@ async function regenerateUncached(input) {
|
|
|
1324
1520
|
}
|
|
1325
1521
|
}
|
|
1326
1522
|
async function regenerateTimelineDay(input) {
|
|
1327
|
-
const key = `${
|
|
1523
|
+
const key = `${path5.resolve(requireToken(input.memoryDir, "memoryDir"))}\0${input.date}`;
|
|
1328
1524
|
const pending = inflight.get(key);
|
|
1329
1525
|
if (pending !== void 0) return pending;
|
|
1330
1526
|
const run = regenerateUncached(input).finally(() => {
|
|
@@ -1716,9 +1912,9 @@ var MaintenanceScheduler = class {
|
|
|
1716
1912
|
}
|
|
1717
1913
|
async autoRegisterDaySummaryCron() {
|
|
1718
1914
|
const home = resolveHomeDir();
|
|
1719
|
-
const jobsPath =
|
|
1915
|
+
const jobsPath = path6.join(home, ".openclaw", "cron", "jobs.json");
|
|
1720
1916
|
try {
|
|
1721
|
-
if (!
|
|
1917
|
+
if (!existsSync2(jobsPath)) {
|
|
1722
1918
|
log.debug("day-summary cron: jobs.json not found, skipping auto-register");
|
|
1723
1919
|
return;
|
|
1724
1920
|
}
|
|
@@ -1746,9 +1942,9 @@ var MaintenanceScheduler = class {
|
|
|
1746
1942
|
}
|
|
1747
1943
|
async autoRegisterNightlyGovernanceCron() {
|
|
1748
1944
|
const home = resolveHomeDir();
|
|
1749
|
-
const jobsPath =
|
|
1945
|
+
const jobsPath = path6.join(home, ".openclaw", "cron", "jobs.json");
|
|
1750
1946
|
try {
|
|
1751
|
-
if (!
|
|
1947
|
+
if (!existsSync2(jobsPath)) {
|
|
1752
1948
|
log.debug("nightly governance cron: jobs.json not found, skipping auto-register");
|
|
1753
1949
|
return;
|
|
1754
1950
|
}
|
|
@@ -1768,9 +1964,9 @@ var MaintenanceScheduler = class {
|
|
|
1768
1964
|
}
|
|
1769
1965
|
async autoRegisterProceduralMiningCron() {
|
|
1770
1966
|
const home = resolveHomeDir();
|
|
1771
|
-
const jobsPath =
|
|
1967
|
+
const jobsPath = path6.join(home, ".openclaw", "cron", "jobs.json");
|
|
1772
1968
|
try {
|
|
1773
|
-
if (!
|
|
1969
|
+
if (!existsSync2(jobsPath)) {
|
|
1774
1970
|
log.debug("procedural mining cron: jobs.json not found, skipping auto-register");
|
|
1775
1971
|
return;
|
|
1776
1972
|
}
|
|
@@ -1788,9 +1984,9 @@ var MaintenanceScheduler = class {
|
|
|
1788
1984
|
}
|
|
1789
1985
|
async autoRegisterContradictionScanCron() {
|
|
1790
1986
|
const home = resolveHomeDir();
|
|
1791
|
-
const jobsPath =
|
|
1987
|
+
const jobsPath = path6.join(home, ".openclaw", "cron", "jobs.json");
|
|
1792
1988
|
try {
|
|
1793
|
-
if (!
|
|
1989
|
+
if (!existsSync2(jobsPath)) {
|
|
1794
1990
|
log.debug("contradiction scan cron: jobs.json not found, skipping auto-register");
|
|
1795
1991
|
return;
|
|
1796
1992
|
}
|
|
@@ -1808,9 +2004,9 @@ var MaintenanceScheduler = class {
|
|
|
1808
2004
|
}
|
|
1809
2005
|
async autoRegisterPatternReinforcementCron() {
|
|
1810
2006
|
const home = resolveHomeDir();
|
|
1811
|
-
const jobsPath =
|
|
2007
|
+
const jobsPath = path6.join(home, ".openclaw", "cron", "jobs.json");
|
|
1812
2008
|
try {
|
|
1813
|
-
if (!
|
|
2009
|
+
if (!existsSync2(jobsPath)) {
|
|
1814
2010
|
log.debug("pattern reinforcement cron: jobs.json not found, skipping auto-register");
|
|
1815
2011
|
return;
|
|
1816
2012
|
}
|
|
@@ -1828,9 +2024,9 @@ var MaintenanceScheduler = class {
|
|
|
1828
2024
|
}
|
|
1829
2025
|
async autoRegisterGraphEdgeDecayCron() {
|
|
1830
2026
|
const home = resolveHomeDir();
|
|
1831
|
-
const jobsPath =
|
|
2027
|
+
const jobsPath = path6.join(home, ".openclaw", "cron", "jobs.json");
|
|
1832
2028
|
try {
|
|
1833
|
-
if (!
|
|
2029
|
+
if (!existsSync2(jobsPath)) {
|
|
1834
2030
|
log.debug("graph edge decay cron: jobs.json not found, skipping auto-register");
|
|
1835
2031
|
return;
|
|
1836
2032
|
}
|
|
@@ -2100,7 +2296,7 @@ var MaintenanceScheduler = class {
|
|
|
2100
2296
|
*/
|
|
2101
2297
|
async hasOverCapEncryptedLifecycleLedger(targets) {
|
|
2102
2298
|
for (const target of targets) {
|
|
2103
|
-
const ledgerPath =
|
|
2299
|
+
const ledgerPath = path6.join(target.memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
2104
2300
|
let size;
|
|
2105
2301
|
try {
|
|
2106
2302
|
size = (await stat(ledgerPath)).size;
|
|
@@ -2152,7 +2348,7 @@ var MaintenanceScheduler = class {
|
|
|
2152
2348
|
* containment guard on every spill file it reads or deletes.
|
|
2153
2349
|
*/
|
|
2154
2350
|
async drainPendingLifecycleAppendsForPath(memoryDir) {
|
|
2155
|
-
const ledgerPath =
|
|
2351
|
+
const ledgerPath = path6.join(memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
2156
2352
|
const spillDir = pendingLifecycleLedgerDir(ledgerPath);
|
|
2157
2353
|
let spillFiles;
|
|
2158
2354
|
let claimedOrphans;
|
|
@@ -2166,7 +2362,7 @@ var MaintenanceScheduler = class {
|
|
|
2166
2362
|
if (spillFiles.length === 0 && claimedOrphans.length === 0) return;
|
|
2167
2363
|
const io = {
|
|
2168
2364
|
writeSecure: async (filePath, payload) => {
|
|
2169
|
-
await mkdir3(
|
|
2365
|
+
await mkdir3(path6.dirname(filePath), { recursive: true });
|
|
2170
2366
|
await writeFile2(filePath, payload, "utf-8");
|
|
2171
2367
|
},
|
|
2172
2368
|
readSecure: async (filePath) => {
|
|
@@ -2187,7 +2383,7 @@ var MaintenanceScheduler = class {
|
|
|
2187
2383
|
await appendFile(ledgerPath, payload, "utf-8");
|
|
2188
2384
|
},
|
|
2189
2385
|
async () => {
|
|
2190
|
-
await mkdir3(
|
|
2386
|
+
await mkdir3(path6.dirname(ledgerPath), { recursive: true });
|
|
2191
2387
|
}
|
|
2192
2388
|
);
|
|
2193
2389
|
} catch (err) {
|
|
@@ -2205,7 +2401,7 @@ var MaintenanceScheduler = class {
|
|
|
2205
2401
|
const targets = [];
|
|
2206
2402
|
const seen = /* @__PURE__ */ new Set();
|
|
2207
2403
|
const addTarget = (memoryDir, storage) => {
|
|
2208
|
-
const key =
|
|
2404
|
+
const key = path6.resolve(memoryDir);
|
|
2209
2405
|
if (seen.has(key)) return;
|
|
2210
2406
|
seen.add(key);
|
|
2211
2407
|
targets.push({ memoryDir, storage });
|
|
@@ -2234,7 +2430,7 @@ var MaintenanceScheduler = class {
|
|
|
2234
2430
|
}
|
|
2235
2431
|
}
|
|
2236
2432
|
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
2237
|
-
const namespacesBase =
|
|
2433
|
+
const namespacesBase = path6.join(this.deps.config.memoryDir, "namespaces");
|
|
2238
2434
|
let memoryDirReal;
|
|
2239
2435
|
try {
|
|
2240
2436
|
memoryDirReal = await realpath(this.deps.config.memoryDir);
|
|
@@ -2259,7 +2455,7 @@ var MaintenanceScheduler = class {
|
|
|
2259
2455
|
}
|
|
2260
2456
|
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
2261
2457
|
if (!entry.isDirectory() || entry.isSymbolicLink()) continue;
|
|
2262
|
-
const childPath =
|
|
2458
|
+
const childPath = path6.join(namespacesBase, entry.name);
|
|
2263
2459
|
try {
|
|
2264
2460
|
assertPathInsideRoot(memoryDirReal, await realpath(childPath), childPath);
|
|
2265
2461
|
} catch (err) {
|
|
@@ -2271,7 +2467,7 @@ var MaintenanceScheduler = class {
|
|
|
2271
2467
|
if (resolveNamespaceStorage && routeNamespace !== null) {
|
|
2272
2468
|
try {
|
|
2273
2469
|
const storage = await resolveNamespaceStorage(routeNamespace);
|
|
2274
|
-
if (
|
|
2470
|
+
if (path6.resolve(storage.dir) === path6.resolve(childPath)) {
|
|
2275
2471
|
addTarget(storage.dir, storage);
|
|
2276
2472
|
continue;
|
|
2277
2473
|
}
|
|
@@ -2302,7 +2498,7 @@ var MaintenanceScheduler = class {
|
|
|
2302
2498
|
* an over-cap rewrite never arms the throttle.
|
|
2303
2499
|
*/
|
|
2304
2500
|
async compactLifecycleLedgerTarget(target, threshold) {
|
|
2305
|
-
const ledgerPath =
|
|
2501
|
+
const ledgerPath = path6.join(target.memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
2306
2502
|
let size = 0;
|
|
2307
2503
|
try {
|
|
2308
2504
|
size = (await stat(ledgerPath)).size;
|
|
@@ -2394,6 +2590,7 @@ var MaintenanceScheduler = class {
|
|
|
2394
2590
|
*/
|
|
2395
2591
|
async dispose() {
|
|
2396
2592
|
this.disposed = true;
|
|
2593
|
+
terminateScheduledProjectionRebuilds(this.projectionRebuild);
|
|
2397
2594
|
const consolidationDrain = this.consolidationRunPromise;
|
|
2398
2595
|
const activityDrain = this.activityRegistrar.dispose();
|
|
2399
2596
|
const locationDrain = this.locationAutoSync?.stop() ?? Promise.resolve();
|
|
@@ -2450,4 +2647,4 @@ export {
|
|
|
2450
2647
|
ActivitySyncScheduler,
|
|
2451
2648
|
MaintenanceScheduler
|
|
2452
2649
|
};
|
|
2453
|
-
//# sourceMappingURL=chunk-
|
|
2650
|
+
//# sourceMappingURL=chunk-QWNBQ2T5.js.map
|