@remnic/core 9.69.39 → 9.69.40
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.d.ts +16 -14
- package/dist/access-admin-ops-surface.js +37 -37
- package/dist/access-authorization-probe.d.ts +16 -14
- package/dist/access-authorization-probe.js +38 -38
- package/dist/access-boundary.d.ts +16 -14
- package/dist/access-boundary.js +37 -37
- package/dist/access-cli.js +98 -97
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +16 -14
- package/dist/access-extraction-force-flush.js +37 -37
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-briefing.d.ts +16 -14
- package/dist/access-http-briefing.js +38 -38
- package/dist/access-http-lcm-compaction.d.ts +16 -14
- package/dist/access-http-lifecycle-flush.d.ts +16 -14
- package/dist/access-http-offline-stream.d.ts +16 -14
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +39 -39
- package/dist/access-http.d.ts +17 -15
- package/dist/access-http.js +53 -53
- package/dist/access-identity-continuity-surface.d.ts +13 -12
- package/dist/access-identity-continuity-surface.js +37 -37
- package/dist/access-lcm-surface.d.ts +16 -14
- package/dist/access-lcm-surface.js +37 -37
- package/dist/access-mcp.d.ts +16 -14
- package/dist/access-mcp.js +45 -45
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-DY4z6L5X.d.ts → access-namespace-preflight-CKBumJ8W.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +37 -37
- package/dist/access-observe-transcript.d.ts +13 -12
- package/dist/access-observe-write-category.d.ts +1 -1
- package/dist/access-observe-write-category.js +2 -2
- package/dist/access-observe-write-surface.d.ts +16 -14
- package/dist/access-observe-write-surface.js +37 -37
- package/dist/access-offline-manifest.d.ts +37 -13
- package/dist/access-offline-manifest.js +7 -3
- package/dist/access-operations-batch.js +39 -39
- package/dist/access-operations.d.ts +16 -14
- package/dist/access-operations.js +44 -44
- package/dist/access-recall-concurrency.d.ts +16 -14
- package/dist/access-recall-concurrency.js +37 -37
- package/dist/access-recall-response.d.ts +16 -14
- package/dist/access-recall-response.js +37 -37
- package/dist/access-recall-surface.d.ts +16 -14
- package/dist/access-recall-surface.js +37 -37
- package/dist/access-schema.d.ts +5 -3
- package/dist/access-schema.js +1 -1
- package/dist/{access-service-MY4bsr_Q.d.ts → access-service-DJ3qogNt.d.ts} +8 -8
- package/dist/access-service-helpers.d.ts +16 -14
- package/dist/access-service.d.ts +16 -14
- package/dist/access-service.js +37 -37
- package/dist/access-surface-catalog.d.ts +16 -14
- package/dist/access-surface-catalog.js +39 -39
- package/dist/access-wearables-meetings-surface.d.ts +6 -5
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +6 -5
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +1 -1
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-RP4C6ZPF.js → auto-sync-D6BAPIJV.js} +5 -5
- package/dist/background-generation-config.d.ts +1 -1
- package/dist/background-generation-config.js +3 -1
- package/dist/background-generation.d.ts +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +13 -12
- package/dist/briefing-window.d.ts +2 -2
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +15 -15
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +5 -5
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +3 -2
- package/dist/calibration.js +2 -2
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-CW87xGx8.d.ts → catalog-BHXkBVhg.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +19 -18
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-B36GUU6T.js → chunk-23HFXQ5J.js} +36 -3
- package/dist/chunk-23HFXQ5J.js.map +1 -0
- package/dist/{chunk-YFTNZMGR.js → chunk-27NO2KVB.js} +31 -8
- package/dist/chunk-27NO2KVB.js.map +1 -0
- package/dist/{chunk-JTQR6L2N.js → chunk-2SKMZUOW.js} +2 -2
- package/dist/{chunk-GG5FHZJJ.js → chunk-2SNCQHJZ.js} +2 -2
- package/dist/{chunk-O76F5QPP.js → chunk-3QEVOQF5.js} +2 -2
- package/dist/{chunk-3N3PBBEH.js → chunk-3XPN7AVY.js} +2 -2
- package/dist/{chunk-X4TD4O2F.js → chunk-46Z3VGWF.js} +2 -2
- package/dist/{chunk-2ZTDRNCS.js → chunk-4CMXI55L.js} +2 -2
- package/dist/{chunk-FWWWUPOE.js → chunk-5LYSEZOF.js} +18 -9
- package/dist/chunk-5LYSEZOF.js.map +1 -0
- package/dist/{chunk-IQEJIOEU.js → chunk-62HFZNCJ.js} +17 -10
- package/dist/chunk-62HFZNCJ.js.map +1 -0
- package/dist/{chunk-YKREX63Z.js → chunk-6L2II3KS.js} +5 -3
- package/dist/chunk-6L2II3KS.js.map +1 -0
- package/dist/{chunk-MUTVRKKY.js → chunk-7D6SER6A.js} +8 -8
- package/dist/{chunk-WBM2MVBK.js → chunk-7Z54NXVS.js} +2 -2
- package/dist/{chunk-ACY4ZPF7.js → chunk-AEOOGXMQ.js} +10 -5
- package/dist/chunk-AEOOGXMQ.js.map +1 -0
- package/dist/{chunk-UHRZ324M.js → chunk-BGRTZOJB.js} +3 -3
- package/dist/{chunk-ZEGL7YCC.js → chunk-BXIJSPCL.js} +2 -2
- package/dist/{chunk-JKKII6GX.js → chunk-BYQX4IOG.js} +2 -2
- package/dist/{chunk-WIWLX65T.js → chunk-C5R73BON.js} +2 -2
- package/dist/{chunk-BD7JTBYP.js → chunk-D7MAYFQP.js} +2 -2
- package/dist/{chunk-TNZNSMVJ.js → chunk-DAZANIYU.js} +249 -295
- package/dist/chunk-DAZANIYU.js.map +1 -0
- package/dist/{chunk-LMLGBG6H.js → chunk-DFVSJFHK.js} +2 -2
- package/dist/{chunk-3NPNBVFR.js → chunk-ES5BUPYB.js} +2 -2
- package/dist/{chunk-MVAQ2WM3.js → chunk-G2XZFGYN.js} +6 -2
- package/dist/chunk-G2XZFGYN.js.map +1 -0
- package/dist/{chunk-TNSCIPBQ.js → chunk-G6NQ3L4T.js} +2 -2
- package/dist/{chunk-5N4MZLEH.js → chunk-GO5LOHCD.js} +2 -2
- package/dist/{chunk-AECJY3GJ.js → chunk-GSSDHAYH.js} +2 -2
- package/dist/{chunk-TSP5WH72.js → chunk-HJUP3K6L.js} +2 -2
- package/dist/{chunk-AAZEKXUP.js → chunk-ICNJ6J46.js} +2 -2
- package/dist/{chunk-6EHM2AV7.js → chunk-IMBQFHRV.js} +2 -2
- package/dist/{chunk-4RZLTZVM.js → chunk-IOPIGX7Y.js} +1 -1
- package/dist/{chunk-EYKIDK33.js → chunk-IS2IDFJP.js} +13 -13
- package/dist/{chunk-VJIE4D2I.js → chunk-J4WGTN2N.js} +2 -2
- package/dist/{chunk-NXGSONWM.js → chunk-J7FVMLBR.js} +2 -2
- package/dist/{chunk-VSL63CFJ.js → chunk-JAJIMTFB.js} +6 -6
- package/dist/{chunk-4JVQRFZD.js → chunk-JOP7W24J.js} +9 -9
- package/dist/{chunk-YUW66UAH.js → chunk-JUDT33RX.js} +2 -2
- package/dist/{chunk-QHT7MOUF.js → chunk-K4A6UVPB.js} +22 -11
- package/dist/chunk-K4A6UVPB.js.map +1 -0
- package/dist/{chunk-D545Z7UH.js → chunk-K4JKAXMO.js} +2 -2
- package/dist/{chunk-BV4ZKIZH.js → chunk-K75A5XWU.js} +3 -2
- package/dist/{chunk-3CBI2ZSA.js → chunk-KG2OOAFF.js} +20 -12
- package/dist/chunk-KG2OOAFF.js.map +1 -0
- package/dist/{chunk-M6HBPLBA.js → chunk-KOTG3RXE.js} +2 -2
- package/dist/{chunk-CWTCMZGE.js → chunk-KTOXQMW3.js} +119 -3
- package/dist/chunk-KTOXQMW3.js.map +1 -0
- package/dist/{chunk-OB3XMWX5.js → chunk-KVO2BTA4.js} +2 -2
- package/dist/{chunk-GI4ZBWPQ.js → chunk-KY236SP5.js} +3 -3
- package/dist/{chunk-4BCHFSC7.js → chunk-LFVZD5EC.js} +3 -3
- package/dist/{chunk-O4M4BDIJ.js → chunk-LKFVVN7R.js} +2 -2
- package/dist/{chunk-IYKZJVL5.js → chunk-MDIEES23.js} +1 -1
- package/dist/chunk-MDIEES23.js.map +1 -0
- package/dist/{chunk-4RX5O34R.js → chunk-MJC7UKH7.js} +2 -2
- package/dist/{chunk-CZTPU65V.js → chunk-MVG3KXON.js} +63 -16
- package/dist/chunk-MVG3KXON.js.map +1 -0
- package/dist/{chunk-YDVAM7S4.js → chunk-NETQXOPY.js} +2 -2
- package/dist/chunk-NETQXOPY.js.map +1 -0
- package/dist/{chunk-UZZ7SQT3.js → chunk-NVVZPBKI.js} +2 -2
- package/dist/{chunk-BLDBT6HZ.js → chunk-PJRKLB4Z.js} +18 -2
- package/dist/chunk-PJRKLB4Z.js.map +1 -0
- package/dist/{chunk-VBSNUH4J.js → chunk-PKUJNICO.js} +2 -2
- package/dist/{chunk-OPBFP4TF.js → chunk-QE6YVNP5.js} +7 -7
- package/dist/{chunk-WKDFJXW5.js → chunk-QM2SPLKQ.js} +1 -1
- package/dist/chunk-QM2SPLKQ.js.map +1 -0
- package/dist/{chunk-ENBPQEVU.js → chunk-QPVNK2VE.js} +2 -2
- package/dist/{chunk-RLJHJQUY.js → chunk-QS5Q5RBV.js} +2 -2
- package/dist/{chunk-3EKVN2OP.js → chunk-RDLPFM7I.js} +2 -2
- package/dist/{chunk-F4EHXVP7.js → chunk-RJQAP333.js} +2 -2
- package/dist/{chunk-QTQ6XKGT.js → chunk-RLU2Y5GV.js} +4 -4
- package/dist/chunk-RLU2Y5GV.js.map +1 -0
- package/dist/{chunk-5SPCMAUC.js → chunk-ROEFLU37.js} +4 -4
- package/dist/{chunk-UZEHHXYC.js → chunk-SFHLQPBF.js} +22 -22
- package/dist/chunk-SK7D34OL.js +68 -0
- package/dist/chunk-SK7D34OL.js.map +1 -0
- package/dist/{chunk-ZBW7A667.js → chunk-SUEOG2S4.js} +2 -2
- package/dist/{chunk-Q7CLGFA7.js → chunk-TEMKBSV6.js} +2 -2
- package/dist/{chunk-LQNRVPTV.js → chunk-THTF2W7M.js} +151 -118
- package/dist/chunk-THTF2W7M.js.map +1 -0
- package/dist/{chunk-GMIQV6DD.js → chunk-TO36VPZI.js} +2 -2
- package/dist/{chunk-6YAIN5XJ.js → chunk-TZ44E732.js} +44 -6
- package/dist/chunk-TZ44E732.js.map +1 -0
- package/dist/{chunk-JXN77SGO.js → chunk-U2VDCFXW.js} +1 -1
- package/dist/chunk-U2VDCFXW.js.map +1 -0
- package/dist/{chunk-LPYYY4AP.js → chunk-UZ6JYPJ6.js} +500 -218
- package/dist/chunk-UZ6JYPJ6.js.map +1 -0
- package/dist/{chunk-FXHOZGSE.js → chunk-V2ZA4YWE.js} +2 -2
- package/dist/{chunk-XH3HGI2N.js → chunk-VHKXRYQN.js} +2 -2
- package/dist/{chunk-GAS7KYC7.js → chunk-VKWFNPBH.js} +2 -2
- package/dist/{chunk-6H2G7RFT.js → chunk-VNQRRUNS.js} +11 -10
- package/dist/chunk-VNQRRUNS.js.map +1 -0
- package/dist/{chunk-IL6ODG6M.js → chunk-VQWBUPSJ.js} +2 -2
- package/dist/{chunk-5YCNDC3C.js → chunk-VQYWKCDR.js} +2 -2
- package/dist/{chunk-54NX5EG4.js → chunk-W23JARAQ.js} +2 -2
- package/dist/{chunk-YQNNHLCG.js → chunk-WPGR3RW4.js} +2 -2
- package/dist/{chunk-FNHLI2RE.js → chunk-WZYHPAG5.js} +3 -3
- package/dist/{chunk-5HYUUFMQ.js → chunk-XCPNH2MG.js} +259 -10
- package/dist/chunk-XCPNH2MG.js.map +1 -0
- package/dist/{chunk-TA4C3XB7.js → chunk-XM46Y66S.js} +2 -2
- package/dist/{chunk-PCOVEDPK.js → chunk-YRIFXXMI.js} +3 -3
- package/dist/{chunk-TRLOFIQC.js → chunk-YTK5MVNF.js} +2 -2
- package/dist/{chunk-Q432REND.js → chunk-YTZN2UZO.js} +2 -2
- package/dist/{chunk-6AGWBKQU.js → chunk-Z4GUX2M6.js} +2 -2
- package/dist/{chunk-AENM6GKU.js → chunk-ZAEPD4C2.js} +2 -2
- package/dist/{chunk-KQW3YGEN.js → chunk-ZRMMXWYI.js} +2 -2
- package/dist/{chunk-P4ZAEYKG.js → chunk-ZX3AYNNV.js} +6 -3
- package/dist/chunk-ZX3AYNNV.js.map +1 -0
- package/dist/{chunk-MCRVQ5YQ.js → chunk-ZZCR2QYL.js} +2 -2
- package/dist/{cli-DGq0MNpO.d.ts → cli-BWri5-am.d.ts} +5 -5
- package/dist/cli.d.ts +18 -16
- package/dist/cli.js +75 -74
- package/dist/coding/export-okf-codegraph.d.ts +1 -1
- package/dist/coding/export-okf-codegraph.js +14 -14
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +15 -15
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +6 -5
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +15 -15
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +15 -15
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +6 -5
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +17 -17
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +17 -17
- package/dist/cross-lingual-recall.d.ts +1 -1
- package/dist/day-summary.d.ts +1 -1
- package/dist/deep-recall-http-glue.d.ts +16 -14
- package/dist/deep-recall-http-glue.js +2 -2
- package/dist/deep-recall-mcp-tools.d.ts +16 -14
- package/dist/deep-recall-policy-llm.d.ts +4 -3
- package/dist/deep-recall-policy-llm.js +3 -3
- package/dist/deep-recall-seeds.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-Cq1ekOwV.d.ts → dependency-propagation-delivery-ueZlKTQB.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-origin-fields.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +15 -15
- package/dist/entity-schema.d.ts +1 -1
- package/dist/episodic-context.d.ts +1 -1
- package/dist/eval-trajectory-contracts.d.ts +1 -1
- package/dist/eval-trajectory-store.d.ts +1 -1
- package/dist/eval-trajectory.d.ts +1 -1
- package/dist/explicit-capture.d.ts +13 -12
- package/dist/external-wiki-access.d.ts +16 -14
- package/dist/external-wiki-access.js +38 -38
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +16 -14
- package/dist/extraction-error-classification.d.ts +14 -3
- package/dist/extraction-error-classification.js +5 -3
- package/dist/extraction-faithfulness.d.ts +4 -3
- package/dist/extraction-faithfulness.js +3 -3
- package/dist/extraction-judge-telemetry.d.ts +4 -3
- package/dist/extraction-judge-training.d.ts +4 -3
- package/dist/extraction-judge.d.ts +4 -3
- package/dist/extraction-judge.js +3 -3
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-prompt.d.ts +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction-span-config.d.ts +1 -1
- package/dist/extraction-span-materialize.d.ts +1 -1
- package/dist/extraction.d.ts +4 -4
- package/dist/extraction.js +25 -23
- package/dist/fallback-llm-codex-subscription.d.ts +52 -7
- package/dist/fallback-llm-codex-subscription.js +17 -1
- package/dist/fallback-llm.d.ts +25 -28
- package/dist/fallback-llm.js +4 -3
- package/dist/{generic-recall-paths-BcySh_f9.d.ts → generic-recall-paths-CpyVmA88.d.ts} +1 -1
- package/dist/graph-append-error.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-jsonl.d.ts +1 -1
- package/dist/graph-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/importers/test-utils.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/{index-DWOb4wz9.d.ts → index-BvUA4S7M.d.ts} +3 -3
- package/dist/index.d.ts +79 -39
- package/dist/index.js +119 -103
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +3 -3
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm-BsJGulur.d.ts +247 -0
- package/dist/local-llm-config.d.ts +4 -1
- package/dist/local-llm-config.js +4 -2
- package/dist/local-llm-helpers.d.ts +18 -69
- package/dist/local-llm-helpers.js +1 -1
- package/dist/local-llm.d.ts +3 -170
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/location/index.d.ts +3 -3
- package/dist/location/index.js +17 -17
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +15 -15
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +15 -15
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +16 -16
- package/dist/{maintenance-CW9wCzMP.d.ts → maintenance-CYubtIRr.d.ts} +9 -3
- package/dist/mcp-memory-inspector-app.d.ts +16 -14
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-controller.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +16 -14
- package/dist/memory-subject.d.ts +16 -14
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +16 -16
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +12 -1
- package/dist/namespaces/search.js +9 -9
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +15 -15
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +18 -18
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +29 -28
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +26 -26
- package/dist/{orchestrator-ComHLm49.d.ts → orchestrator-BWDRJ_0d.d.ts} +24 -11
- package/dist/orchestrator.d.ts +13 -12
- package/dist/orchestrator.js +101 -98
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-CiYcqqhl.d.ts → pipeline-7JMn2yMH.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +2 -2
- package/dist/provenance.d.ts +1 -1
- package/dist/{public-http-CuK4_Cb1.d.ts → public-http-CJWs3mo9.d.ts} +1 -1
- package/dist/{qmd-qXD4vatU.d.ts → qmd-CxCH9G9m.d.ts} +2 -2
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/qmd.js +2 -2
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-navigate-access.d.ts +1 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +1 -1
- package/dist/recall-navigate-disclosure.js +1 -1
- package/dist/recall-navigate.d.ts +1 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-planner-llm.d.ts +3 -2
- package/dist/recall-planner-llm.js +4 -3
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.d.ts +13 -3
- package/dist/recall-state-view-admission.js +8 -8
- package/dist/recall-state-view-anchors.d.ts +1 -1
- package/dist/recall-state-view-anchors.js +2 -2
- package/dist/recall-state-view-inject.js +2 -2
- package/dist/recall-state-view-render.js +2 -2
- package/dist/recall-state-view-widen.js +2 -2
- package/dist/recall-state-view-wire.js +3 -3
- package/dist/recall-state-view.d.ts +1 -0
- package/dist/recall-state-view.js +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +7 -6
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/{scope-profiles-BT9rqC3w.d.ts → scope-profiles-BGAUqhBR.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +8 -8
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +10 -10
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +2 -2
- package/dist/search/port.d.ts +2 -2
- package/dist/search/port.js +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/search/remote-backend.js +2 -2
- package/dist/{semantic-consolidation-CmZi7thY.d.ts → semantic-consolidation-CCeRD9pV.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +16 -16
- package/dist/semantic-rule-promotion.js +15 -15
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +15 -15
- package/dist/{service-CLkA7AQB.d.ts → service-BwpzRduk.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +18 -18
- package/dist/standup/build.js +15 -15
- package/dist/{storage-wvX01lht.d.ts → storage-BprAGBG0.d.ts} +2 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +14 -14
- package/dist/subject-config.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +5 -5
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +18 -17
- package/dist/support-passport/index.js +40 -40
- package/dist/task-llm-config.d.ts +16 -0
- package/dist/task-llm-config.js +12 -0
- package/dist/task-llm-config.js.map +1 -0
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/export-okf.d.ts +1 -1
- package/dist/transfer/export-okf.js +15 -15
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-Cyr32ABj.d.ts → types-nJV23pa3.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +15 -15
- package/dist/who-knows-cli.d.ts +16 -14
- package/dist/who-knows-cli.js +16 -16
- package/dist/who-knows.d.ts +16 -14
- package/dist/who-knows.js +15 -15
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-category-alias.test.ts +93 -0
- package/src/access-offline-manifest.ts +52 -2
- package/src/access-schema.ts +9 -4
- package/src/activity/config.test.ts +61 -0
- package/src/activity/config.ts +40 -1
- package/src/activity/timeline/analysis-provider.ts +8 -2
- package/src/activity/timeline/analysis-run.test.ts +82 -0
- package/src/activity/timeline/publish-cli.test.ts +30 -0
- package/src/activity/timeline/publish-cli.ts +7 -0
- package/src/activity/timeline/query.ts +8 -1
- package/src/activity/timeline/regenerate.test.ts +82 -2
- package/src/activity/timeline/regenerate.ts +7 -1
- package/src/activity/vault-frontmatter.test.ts +99 -1
- package/src/activity/vault-frontmatter.ts +131 -0
- package/src/activity/vault-publish.ts +6 -0
- package/src/activity/vault-publisher.test.ts +172 -0
- package/src/activity/vault-publisher.ts +69 -15
- package/src/activity/vault-region.test.ts +7 -2
- package/src/activity/vault-region.ts +7 -3
- package/src/background-generation-config.ts +32 -6
- package/src/background-generation.test.ts +10 -1
- package/src/cli/timeline-publish-commands.ts +9 -0
- package/src/config.test.ts +170 -43
- package/src/config.ts +17 -5
- package/src/extraction-error-classification.ts +36 -1
- package/src/extraction-timeout.test.ts +110 -1
- package/src/extraction.test.ts +19 -1
- package/src/extraction.ts +23 -21
- package/src/fallback-llm-codex-subscription.ts +193 -7
- package/src/fallback-llm-parse-failure.test.ts +156 -0
- package/src/fallback-llm.test.ts +58 -0
- package/src/fallback-llm.ts +187 -186
- package/src/index.ts +1 -0
- package/src/local-llm-config.ts +11 -10
- package/src/local-llm-headers-timeout.test.ts +30 -0
- package/src/local-llm-helpers.ts +28 -0
- package/src/local-llm.ts +8 -19
- package/src/namespaces/search.test.ts +51 -1
- package/src/namespaces/search.ts +48 -3
- package/src/orchestration/extraction-persist-promotion.test.ts +228 -2
- package/src/orchestration/extraction-persist-promotion.ts +17 -14
- package/src/orchestration/orchestrator-helpers.test.ts +104 -0
- package/src/orchestration/orchestrator-init.ts +366 -106
- package/src/orchestration/recall-internal.ts +5 -11
- package/src/orchestration/semantic-merge-promotion-payload.ts +62 -6
- package/src/orchestration/startup-collection-checks.ts +85 -0
- package/src/orchestrator-flush.test.ts +7 -0
- package/src/orchestrator-init.test.ts +1539 -0
- package/src/orchestrator.ts +7 -0
- package/src/qmd.ts +21 -10
- package/src/recall-state-view-admission.ts +11 -1
- package/src/recall-state-view-cron-intent.test.ts +268 -0
- package/src/recall-state-view-widen.test.ts +14 -5
- package/src/recall-state-view-widen.ts +8 -1
- package/src/recall-state-view.ts +5 -2
- package/src/reconcile-identity-cache.test.ts +82 -1
- package/src/search/port.ts +1 -1
- package/src/storage/cas-revision-store.test.ts +4 -0
- package/src/storage/cas-revision-store.ts +104 -12
- package/src/storage-frontmatter-cas.test.ts +19 -17
- package/src/summarizer.ts +5 -1
- package/src/task-llm-config.test.ts +124 -0
- package/src/task-llm-config.ts +88 -0
- package/src/testing/subjects/startup-discovery-lifecycle.test.ts +273 -0
- package/src/types.ts +1 -0
- package/dist/chunk-3CBI2ZSA.js.map +0 -1
- package/dist/chunk-5HYUUFMQ.js.map +0 -1
- package/dist/chunk-6H2G7RFT.js.map +0 -1
- package/dist/chunk-6YAIN5XJ.js.map +0 -1
- package/dist/chunk-ACY4ZPF7.js.map +0 -1
- package/dist/chunk-B36GUU6T.js.map +0 -1
- package/dist/chunk-BLDBT6HZ.js.map +0 -1
- package/dist/chunk-CWTCMZGE.js.map +0 -1
- package/dist/chunk-CZTPU65V.js.map +0 -1
- package/dist/chunk-FWWWUPOE.js.map +0 -1
- package/dist/chunk-IQEJIOEU.js.map +0 -1
- package/dist/chunk-IYKZJVL5.js.map +0 -1
- package/dist/chunk-JXN77SGO.js.map +0 -1
- package/dist/chunk-LPYYY4AP.js.map +0 -1
- package/dist/chunk-LQNRVPTV.js.map +0 -1
- package/dist/chunk-MVAQ2WM3.js.map +0 -1
- package/dist/chunk-P4ZAEYKG.js.map +0 -1
- package/dist/chunk-QHT7MOUF.js.map +0 -1
- package/dist/chunk-QTQ6XKGT.js.map +0 -1
- package/dist/chunk-TNZNSMVJ.js.map +0 -1
- package/dist/chunk-WKDFJXW5.js.map +0 -1
- package/dist/chunk-YDVAM7S4.js.map +0 -1
- package/dist/chunk-YFTNZMGR.js.map +0 -1
- package/dist/chunk-YKREX63Z.js.map +0 -1
- /package/dist/{auto-sync-RP4C6ZPF.js.map → auto-sync-D6BAPIJV.js.map} +0 -0
- /package/dist/{chunk-JTQR6L2N.js.map → chunk-2SKMZUOW.js.map} +0 -0
- /package/dist/{chunk-GG5FHZJJ.js.map → chunk-2SNCQHJZ.js.map} +0 -0
- /package/dist/{chunk-O76F5QPP.js.map → chunk-3QEVOQF5.js.map} +0 -0
- /package/dist/{chunk-3N3PBBEH.js.map → chunk-3XPN7AVY.js.map} +0 -0
- /package/dist/{chunk-X4TD4O2F.js.map → chunk-46Z3VGWF.js.map} +0 -0
- /package/dist/{chunk-2ZTDRNCS.js.map → chunk-4CMXI55L.js.map} +0 -0
- /package/dist/{chunk-MUTVRKKY.js.map → chunk-7D6SER6A.js.map} +0 -0
- /package/dist/{chunk-WBM2MVBK.js.map → chunk-7Z54NXVS.js.map} +0 -0
- /package/dist/{chunk-UHRZ324M.js.map → chunk-BGRTZOJB.js.map} +0 -0
- /package/dist/{chunk-ZEGL7YCC.js.map → chunk-BXIJSPCL.js.map} +0 -0
- /package/dist/{chunk-JKKII6GX.js.map → chunk-BYQX4IOG.js.map} +0 -0
- /package/dist/{chunk-WIWLX65T.js.map → chunk-C5R73BON.js.map} +0 -0
- /package/dist/{chunk-BD7JTBYP.js.map → chunk-D7MAYFQP.js.map} +0 -0
- /package/dist/{chunk-LMLGBG6H.js.map → chunk-DFVSJFHK.js.map} +0 -0
- /package/dist/{chunk-3NPNBVFR.js.map → chunk-ES5BUPYB.js.map} +0 -0
- /package/dist/{chunk-TNSCIPBQ.js.map → chunk-G6NQ3L4T.js.map} +0 -0
- /package/dist/{chunk-5N4MZLEH.js.map → chunk-GO5LOHCD.js.map} +0 -0
- /package/dist/{chunk-AECJY3GJ.js.map → chunk-GSSDHAYH.js.map} +0 -0
- /package/dist/{chunk-TSP5WH72.js.map → chunk-HJUP3K6L.js.map} +0 -0
- /package/dist/{chunk-AAZEKXUP.js.map → chunk-ICNJ6J46.js.map} +0 -0
- /package/dist/{chunk-6EHM2AV7.js.map → chunk-IMBQFHRV.js.map} +0 -0
- /package/dist/{chunk-4RZLTZVM.js.map → chunk-IOPIGX7Y.js.map} +0 -0
- /package/dist/{chunk-EYKIDK33.js.map → chunk-IS2IDFJP.js.map} +0 -0
- /package/dist/{chunk-VJIE4D2I.js.map → chunk-J4WGTN2N.js.map} +0 -0
- /package/dist/{chunk-NXGSONWM.js.map → chunk-J7FVMLBR.js.map} +0 -0
- /package/dist/{chunk-VSL63CFJ.js.map → chunk-JAJIMTFB.js.map} +0 -0
- /package/dist/{chunk-4JVQRFZD.js.map → chunk-JOP7W24J.js.map} +0 -0
- /package/dist/{chunk-YUW66UAH.js.map → chunk-JUDT33RX.js.map} +0 -0
- /package/dist/{chunk-D545Z7UH.js.map → chunk-K4JKAXMO.js.map} +0 -0
- /package/dist/{chunk-BV4ZKIZH.js.map → chunk-K75A5XWU.js.map} +0 -0
- /package/dist/{chunk-M6HBPLBA.js.map → chunk-KOTG3RXE.js.map} +0 -0
- /package/dist/{chunk-OB3XMWX5.js.map → chunk-KVO2BTA4.js.map} +0 -0
- /package/dist/{chunk-GI4ZBWPQ.js.map → chunk-KY236SP5.js.map} +0 -0
- /package/dist/{chunk-4BCHFSC7.js.map → chunk-LFVZD5EC.js.map} +0 -0
- /package/dist/{chunk-O4M4BDIJ.js.map → chunk-LKFVVN7R.js.map} +0 -0
- /package/dist/{chunk-4RX5O34R.js.map → chunk-MJC7UKH7.js.map} +0 -0
- /package/dist/{chunk-UZZ7SQT3.js.map → chunk-NVVZPBKI.js.map} +0 -0
- /package/dist/{chunk-VBSNUH4J.js.map → chunk-PKUJNICO.js.map} +0 -0
- /package/dist/{chunk-OPBFP4TF.js.map → chunk-QE6YVNP5.js.map} +0 -0
- /package/dist/{chunk-ENBPQEVU.js.map → chunk-QPVNK2VE.js.map} +0 -0
- /package/dist/{chunk-RLJHJQUY.js.map → chunk-QS5Q5RBV.js.map} +0 -0
- /package/dist/{chunk-3EKVN2OP.js.map → chunk-RDLPFM7I.js.map} +0 -0
- /package/dist/{chunk-F4EHXVP7.js.map → chunk-RJQAP333.js.map} +0 -0
- /package/dist/{chunk-5SPCMAUC.js.map → chunk-ROEFLU37.js.map} +0 -0
- /package/dist/{chunk-UZEHHXYC.js.map → chunk-SFHLQPBF.js.map} +0 -0
- /package/dist/{chunk-ZBW7A667.js.map → chunk-SUEOG2S4.js.map} +0 -0
- /package/dist/{chunk-Q7CLGFA7.js.map → chunk-TEMKBSV6.js.map} +0 -0
- /package/dist/{chunk-GMIQV6DD.js.map → chunk-TO36VPZI.js.map} +0 -0
- /package/dist/{chunk-FXHOZGSE.js.map → chunk-V2ZA4YWE.js.map} +0 -0
- /package/dist/{chunk-XH3HGI2N.js.map → chunk-VHKXRYQN.js.map} +0 -0
- /package/dist/{chunk-GAS7KYC7.js.map → chunk-VKWFNPBH.js.map} +0 -0
- /package/dist/{chunk-IL6ODG6M.js.map → chunk-VQWBUPSJ.js.map} +0 -0
- /package/dist/{chunk-5YCNDC3C.js.map → chunk-VQYWKCDR.js.map} +0 -0
- /package/dist/{chunk-54NX5EG4.js.map → chunk-W23JARAQ.js.map} +0 -0
- /package/dist/{chunk-YQNNHLCG.js.map → chunk-WPGR3RW4.js.map} +0 -0
- /package/dist/{chunk-FNHLI2RE.js.map → chunk-WZYHPAG5.js.map} +0 -0
- /package/dist/{chunk-TA4C3XB7.js.map → chunk-XM46Y66S.js.map} +0 -0
- /package/dist/{chunk-PCOVEDPK.js.map → chunk-YRIFXXMI.js.map} +0 -0
- /package/dist/{chunk-TRLOFIQC.js.map → chunk-YTK5MVNF.js.map} +0 -0
- /package/dist/{chunk-Q432REND.js.map → chunk-YTZN2UZO.js.map} +0 -0
- /package/dist/{chunk-6AGWBKQU.js.map → chunk-Z4GUX2M6.js.map} +0 -0
- /package/dist/{chunk-AENM6GKU.js.map → chunk-ZAEPD4C2.js.map} +0 -0
- /package/dist/{chunk-KQW3YGEN.js.map → chunk-ZRMMXWYI.js.map} +0 -0
- /package/dist/{chunk-MCRVQ5YQ.js.map → chunk-ZZCR2QYL.js.map} +0 -0
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
loadSyncState,
|
|
7
7
|
syncWearableSource,
|
|
8
8
|
wearableSourceLabel
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VKWFNPBH.js";
|
|
10
10
|
import {
|
|
11
11
|
CompressionGuidelineCoordinator
|
|
12
12
|
} from "./chunk-UXREWVW4.js";
|
|
13
13
|
import {
|
|
14
14
|
ActivityStore,
|
|
15
15
|
MaintenanceScheduler
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-62HFZNCJ.js";
|
|
17
17
|
import {
|
|
18
18
|
runPeerProfileReasoner
|
|
19
19
|
} from "./chunk-I74SUMNI.js";
|
|
@@ -23,19 +23,19 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
LcmEngine
|
|
25
25
|
} from "./chunk-A7GQBJP5.js";
|
|
26
|
+
import {
|
|
27
|
+
chunkTranscriptEntries
|
|
28
|
+
} from "./chunk-TECVW3JP.js";
|
|
26
29
|
import {
|
|
27
30
|
cleanupConversationChunks
|
|
28
31
|
} from "./chunk-C5JF6EZ7.js";
|
|
29
32
|
import {
|
|
30
33
|
CompoundingEngine,
|
|
31
34
|
defaultTierMigrationCycleBudget
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-46Z3VGWF.js";
|
|
33
36
|
import {
|
|
34
37
|
SharedContextManager
|
|
35
38
|
} from "./chunk-CARRTDKC.js";
|
|
36
|
-
import {
|
|
37
|
-
chunkTranscriptEntries
|
|
38
|
-
} from "./chunk-TECVW3JP.js";
|
|
39
39
|
import {
|
|
40
40
|
cleanArchivedUserMessage
|
|
41
41
|
} from "./chunk-47DU4SGJ.js";
|
|
@@ -109,17 +109,17 @@ import {
|
|
|
109
109
|
rerankLocalOrNoop
|
|
110
110
|
} from "./chunk-LUDXM7MD.js";
|
|
111
111
|
import {
|
|
112
|
-
indexStateViewAnnotatedResults
|
|
113
|
-
|
|
112
|
+
indexStateViewAnnotatedResults,
|
|
113
|
+
resolveRecallStateViewActive
|
|
114
|
+
} from "./chunk-RLU2Y5GV.js";
|
|
114
115
|
import {
|
|
115
116
|
applyRecallStateViews
|
|
116
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-DFVSJFHK.js";
|
|
117
118
|
import {
|
|
118
119
|
StateViewAnchorTracker,
|
|
119
120
|
filterRecentScanMemories,
|
|
120
|
-
resolveRecallStateViewFlags,
|
|
121
121
|
stateViewPacketActive
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-Z4GUX2M6.js";
|
|
123
123
|
import {
|
|
124
124
|
dedupeResultsByNamespace,
|
|
125
125
|
hasMemoryForResult,
|
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
} from "./chunk-OH7QLI6W.js";
|
|
167
167
|
import {
|
|
168
168
|
ExtractionEngine
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-K4A6UVPB.js";
|
|
170
170
|
import {
|
|
171
171
|
parseMemoryActionEligibilityContext
|
|
172
172
|
} from "./chunk-JHU4EYDV.js";
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
getVerdictKind,
|
|
180
180
|
judgeFactDurability,
|
|
181
181
|
validateProcedureExtraction
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-JUDT33RX.js";
|
|
183
183
|
import {
|
|
184
184
|
buildEventOrderRecallSection
|
|
185
185
|
} from "./chunk-645WOU5I.js";
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
buildEntityRecallSection,
|
|
198
198
|
entityRecentTranscriptLookbackHours,
|
|
199
199
|
readRecentEntityTranscriptEntries
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-QS5Q5RBV.js";
|
|
201
201
|
import {
|
|
202
202
|
planEpisodeWindowsWithFallback
|
|
203
203
|
} from "./chunk-T3GIETKV.js";
|
|
@@ -212,7 +212,7 @@ import {
|
|
|
212
212
|
} from "./chunk-LVXBC6YB.js";
|
|
213
213
|
import {
|
|
214
214
|
refreshConvergedNamespaces
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-4CMXI55L.js";
|
|
216
216
|
import {
|
|
217
217
|
builtInConnectorPackageSpecifier,
|
|
218
218
|
ensureBuiltInWearableConnectors,
|
|
@@ -221,7 +221,7 @@ import {
|
|
|
221
221
|
runTimelinePublishCli,
|
|
222
222
|
screenCandidateFact,
|
|
223
223
|
summarizeVaultPublish
|
|
224
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-DAZANIYU.js";
|
|
225
225
|
import {
|
|
226
226
|
normalizeReplaySessionKey
|
|
227
227
|
} from "./chunk-AJVLDJU6.js";
|
|
@@ -231,14 +231,14 @@ import {
|
|
|
231
231
|
import {
|
|
232
232
|
compareVerifiedEpisodeResults,
|
|
233
233
|
searchVerifiedEpisodes
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-ICNJ6J46.js";
|
|
235
235
|
import {
|
|
236
236
|
ThreadingManager
|
|
237
237
|
} from "./chunk-OJP3N7UK.js";
|
|
238
238
|
import {
|
|
239
239
|
compareVerifiedSemanticRuleResults,
|
|
240
240
|
searchVerifiedSemanticRules
|
|
241
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-ZAEPD4C2.js";
|
|
242
242
|
import {
|
|
243
243
|
searchWorkProductLedgerEntries
|
|
244
244
|
} from "./chunk-G7NYVKD6.js";
|
|
@@ -251,10 +251,10 @@ import {
|
|
|
251
251
|
import {
|
|
252
252
|
runNamespaceMaintenanceFanout,
|
|
253
253
|
summarizeNamespaceMaintenanceHealth
|
|
254
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-7D6SER6A.js";
|
|
255
255
|
import {
|
|
256
256
|
planNamespaceMaintenance
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-WZYHPAG5.js";
|
|
258
258
|
import {
|
|
259
259
|
isAboveImportanceThreshold,
|
|
260
260
|
scoreImportance
|
|
@@ -276,7 +276,7 @@ import {
|
|
|
276
276
|
} from "./chunk-NHLLKEKK.js";
|
|
277
277
|
import {
|
|
278
278
|
SmartBuffer
|
|
279
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-MJC7UKH7.js";
|
|
280
280
|
import {
|
|
281
281
|
buildConsolidationPrompt,
|
|
282
282
|
buildExtensionsBlockForConsolidation,
|
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
materializeAfterSemanticConsolidation,
|
|
287
287
|
parseConsolidationResponse,
|
|
288
288
|
parseOperatorAwareConsolidationResponse
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-YTZN2UZO.js";
|
|
290
290
|
import {
|
|
291
291
|
buildBehaviorSignalsForMemory,
|
|
292
292
|
dedupeBehaviorSignalsByMemoryAndHash
|
|
@@ -314,7 +314,7 @@ import {
|
|
|
314
314
|
detectMeetings,
|
|
315
315
|
embeddingsFromCosineHits,
|
|
316
316
|
normalizeConnectorScope
|
|
317
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-5LYSEZOF.js";
|
|
318
318
|
import {
|
|
319
319
|
compileCorrectionRule,
|
|
320
320
|
correctionsFilePath,
|
|
@@ -325,7 +325,7 @@ import {
|
|
|
325
325
|
isAnalysisFailureKind,
|
|
326
326
|
resolveJournalSource,
|
|
327
327
|
resolveVaultNotePath
|
|
328
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-XCPNH2MG.js";
|
|
329
329
|
import {
|
|
330
330
|
AMBIENT_CAPTURE_PROMPT_RULE,
|
|
331
331
|
isHighImpactPersonalFact
|
|
@@ -338,7 +338,7 @@ import {
|
|
|
338
338
|
} from "./chunk-MI2OTWV5.js";
|
|
339
339
|
import {
|
|
340
340
|
MeetingsInputError
|
|
341
|
-
} from "./chunk-
|
|
341
|
+
} from "./chunk-IS2IDFJP.js";
|
|
342
342
|
import {
|
|
343
343
|
WearablesInputError,
|
|
344
344
|
describeErrorForOperator
|
|
@@ -356,14 +356,14 @@ import {
|
|
|
356
356
|
} from "./chunk-DGS34QSY.js";
|
|
357
357
|
import {
|
|
358
358
|
NamespaceCatalog
|
|
359
|
-
} from "./chunk-
|
|
359
|
+
} from "./chunk-W23JARAQ.js";
|
|
360
360
|
import {
|
|
361
361
|
RecallResultFormatter,
|
|
362
362
|
SessionContextCoordinator,
|
|
363
363
|
capturePassiveCorrections,
|
|
364
364
|
clusterByKey,
|
|
365
365
|
detectPassiveCorrections
|
|
366
|
-
} from "./chunk-
|
|
366
|
+
} from "./chunk-SFHLQPBF.js";
|
|
367
367
|
import {
|
|
368
368
|
importCapsule
|
|
369
369
|
} from "./chunk-ZHXSOMYH.js";
|
|
@@ -383,7 +383,7 @@ import {
|
|
|
383
383
|
} from "./chunk-ROBHL3GL.js";
|
|
384
384
|
import {
|
|
385
385
|
HourlySummarizer
|
|
386
|
-
} from "./chunk-
|
|
386
|
+
} from "./chunk-AEOOGXMQ.js";
|
|
387
387
|
import {
|
|
388
388
|
LastRecallStore,
|
|
389
389
|
RecallHandleHistoryStore,
|
|
@@ -396,17 +396,17 @@ import {
|
|
|
396
396
|
isTopLevelArchivePath,
|
|
397
397
|
journalPath,
|
|
398
398
|
writeJournalFile
|
|
399
|
-
} from "./chunk-
|
|
399
|
+
} from "./chunk-NVVZPBKI.js";
|
|
400
400
|
import {
|
|
401
401
|
buildXraySnapshot
|
|
402
|
-
} from "./chunk-
|
|
402
|
+
} from "./chunk-BXIJSPCL.js";
|
|
403
403
|
import {
|
|
404
404
|
objectiveStateStoreOverrideForNamespace,
|
|
405
405
|
searchObjectiveStateSnapshots
|
|
406
406
|
} from "./chunk-HM7RHKS4.js";
|
|
407
407
|
import {
|
|
408
408
|
searchHarmonicRetrieval
|
|
409
|
-
} from "./chunk-
|
|
409
|
+
} from "./chunk-IOPIGX7Y.js";
|
|
410
410
|
import {
|
|
411
411
|
ProfilingCollector
|
|
412
412
|
} from "./chunk-NLE6TSLG.js";
|
|
@@ -415,7 +415,7 @@ import {
|
|
|
415
415
|
} from "./chunk-WLZYGLJ4.js";
|
|
416
416
|
import {
|
|
417
417
|
LocalLlmClient
|
|
418
|
-
} from "./chunk-
|
|
418
|
+
} from "./chunk-G2XZFGYN.js";
|
|
419
419
|
import {
|
|
420
420
|
contentMatchesRedactionRules,
|
|
421
421
|
loadRedactionRules
|
|
@@ -433,7 +433,7 @@ import {
|
|
|
433
433
|
} from "./chunk-7ZNJN5WZ.js";
|
|
434
434
|
import {
|
|
435
435
|
NamespaceStorageRouter
|
|
436
|
-
} from "./chunk-
|
|
436
|
+
} from "./chunk-2SNCQHJZ.js";
|
|
437
437
|
import {
|
|
438
438
|
pruneOrphanCueAnchors
|
|
439
439
|
} from "./chunk-BMWN7B3Y.js";
|
|
@@ -447,7 +447,7 @@ import {
|
|
|
447
447
|
ExtractionDeadlineError,
|
|
448
448
|
ExtractionRunCoordinator,
|
|
449
449
|
classifyExtractionOrigin
|
|
450
|
-
} from "./chunk-
|
|
450
|
+
} from "./chunk-IMBQFHRV.js";
|
|
451
451
|
import {
|
|
452
452
|
ARTIFACT_STATUS_CACHE_TTL_MS,
|
|
453
453
|
BulkImportBatchPartialFailureError,
|
|
@@ -472,6 +472,7 @@ import {
|
|
|
472
472
|
parseGraphRecallRankedResults,
|
|
473
473
|
parseMemoryIntentSnapshot,
|
|
474
474
|
parseQmdRecallResults,
|
|
475
|
+
qmdStartupCollectionCheckTimeoutMs,
|
|
475
476
|
qmdStartupCollectionCheckWithTimeout,
|
|
476
477
|
raceRecallAbort,
|
|
477
478
|
resolvePersistedMemoryRelativePath,
|
|
@@ -486,7 +487,7 @@ import {
|
|
|
486
487
|
throwIfRecallAborted,
|
|
487
488
|
tokenizeRecallQuery,
|
|
488
489
|
utcDateKeysForLocalDay
|
|
489
|
-
} from "./chunk-
|
|
490
|
+
} from "./chunk-K75A5XWU.js";
|
|
490
491
|
import {
|
|
491
492
|
inferIntentFromText,
|
|
492
493
|
intentCompatibilityScore,
|
|
@@ -495,10 +496,11 @@ import {
|
|
|
495
496
|
} from "./chunk-CSAKJVXW.js";
|
|
496
497
|
import {
|
|
497
498
|
buildChainFollowupGenerator
|
|
498
|
-
} from "./chunk-
|
|
499
|
+
} from "./chunk-VQYWKCDR.js";
|
|
499
500
|
import {
|
|
500
501
|
QmdResultResolver,
|
|
501
502
|
StorageManager,
|
|
503
|
+
canonicalSemanticFileText,
|
|
502
504
|
compareEntityTimestamps,
|
|
503
505
|
composeFusionDayMeta,
|
|
504
506
|
composeMeetingRecord,
|
|
@@ -514,7 +516,7 @@ import {
|
|
|
514
516
|
reconstructFusionInputs,
|
|
515
517
|
selfDeps,
|
|
516
518
|
serializeFusionDay
|
|
517
|
-
} from "./chunk-
|
|
519
|
+
} from "./chunk-MVG3KXON.js";
|
|
518
520
|
import {
|
|
519
521
|
buildRetiredFactTombstoneInputs
|
|
520
522
|
} from "./chunk-46WM6JX2.js";
|
|
@@ -531,12 +533,12 @@ import {
|
|
|
531
533
|
import {
|
|
532
534
|
NamespaceSearchRouter,
|
|
533
535
|
namespaceCollectionName
|
|
534
|
-
} from "./chunk-
|
|
536
|
+
} from "./chunk-TZ44E732.js";
|
|
535
537
|
import {
|
|
536
538
|
createConversationIndexRuntime,
|
|
537
539
|
createSearchBackend,
|
|
538
540
|
isSearchBackendEnabled
|
|
539
|
-
} from "./chunk-
|
|
541
|
+
} from "./chunk-JOP7W24J.js";
|
|
540
542
|
import {
|
|
541
543
|
NoopSearchBackend
|
|
542
544
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -550,7 +552,7 @@ import {
|
|
|
550
552
|
} from "./chunk-S2V7RUCL.js";
|
|
551
553
|
import {
|
|
552
554
|
confidenceTier
|
|
553
|
-
} from "./chunk-
|
|
555
|
+
} from "./chunk-MDIEES23.js";
|
|
554
556
|
import {
|
|
555
557
|
lintWorkspaceFiles,
|
|
556
558
|
rotateMarkdownFileToArchive
|
|
@@ -559,7 +561,7 @@ import {
|
|
|
559
561
|
applyFaithfulnessVerdict,
|
|
560
562
|
createFaithfulnessCounters,
|
|
561
563
|
runFaithfulnessGateBatch
|
|
562
|
-
} from "./chunk-
|
|
564
|
+
} from "./chunk-3XPN7AVY.js";
|
|
563
565
|
import {
|
|
564
566
|
casCommittedRevisionOf
|
|
565
567
|
} from "./chunk-SHEHQBCG.js";
|
|
@@ -618,13 +620,15 @@ import {
|
|
|
618
620
|
} from "./chunk-42JKGUFJ.js";
|
|
619
621
|
import {
|
|
620
622
|
FallbackLlmClient,
|
|
621
|
-
fallbackLlmRuntimeContextFromConfig,
|
|
622
623
|
gatewayTaskChainOptions
|
|
623
|
-
} from "./chunk-
|
|
624
|
+
} from "./chunk-THTF2W7M.js";
|
|
625
|
+
import {
|
|
626
|
+
fallbackLlmRuntimeContextFromConfig
|
|
627
|
+
} from "./chunk-KTOXQMW3.js";
|
|
624
628
|
import {
|
|
625
629
|
capStateViewPackets,
|
|
626
630
|
reconcileStateViewPairs
|
|
627
|
-
} from "./chunk-
|
|
631
|
+
} from "./chunk-NETQXOPY.js";
|
|
628
632
|
import {
|
|
629
633
|
assertExternalWikiRootOutsideMemoryDirCanonical
|
|
630
634
|
} from "./chunk-JV3C2MNQ.js";
|
|
@@ -820,7 +824,7 @@ import {
|
|
|
820
824
|
|
|
821
825
|
// src/orchestrator.ts
|
|
822
826
|
import path21 from "path";
|
|
823
|
-
import { createHash as
|
|
827
|
+
import { createHash as createHash9 } from "crypto";
|
|
824
828
|
|
|
825
829
|
// src/orchestration/tier-migration-coordinator.ts
|
|
826
830
|
import path from "path";
|
|
@@ -4948,6 +4952,8 @@ async function decideSemanticDedup(content, lookup, options) {
|
|
|
4948
4952
|
}
|
|
4949
4953
|
|
|
4950
4954
|
// src/orchestration/semantic-merge-promotion-payload.ts
|
|
4955
|
+
import { createHash as createHash3 } from "crypto";
|
|
4956
|
+
import { readFile as readFile2 } from "fs/promises";
|
|
4951
4957
|
async function buildMergedTargetPromotionPayload(storage, merge) {
|
|
4952
4958
|
if (!merge.provenancePatched) {
|
|
4953
4959
|
log.warn(
|
|
@@ -4972,6 +4978,7 @@ async function buildMergedTargetPromotionPayload(storage, merge) {
|
|
|
4972
4978
|
}
|
|
4973
4979
|
const fm = committed.frontmatter;
|
|
4974
4980
|
const snapshotDigest = typeof storage.readDurableFileDigest === "function" ? await storage.readDurableFileDigest(committed.path).catch(() => null) : null;
|
|
4981
|
+
const snapshotSemanticFingerprint = await readDurableSemanticFingerprint(committed.path);
|
|
4975
4982
|
const receipt = await readPromotionReceiptStatus(storage, committed.path);
|
|
4976
4983
|
if (!receipt.available) {
|
|
4977
4984
|
log.warn(
|
|
@@ -4979,7 +4986,13 @@ async function buildMergedTargetPromotionPayload(storage, merge) {
|
|
|
4979
4986
|
);
|
|
4980
4987
|
return { payload: null, readFailed: true };
|
|
4981
4988
|
}
|
|
4982
|
-
if (receipt.
|
|
4989
|
+
if (receipt.committedSemanticFingerprint !== void 0 && snapshotSemanticFingerprint !== receipt.committedSemanticFingerprint) {
|
|
4990
|
+
log.warn(
|
|
4991
|
+
snapshotSemanticFingerprint == null ? `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 the semantic snapshot fingerprint is unavailable while the CAS receipt carries ${receipt.committedSemanticFingerprint}; promotion and reconciliation retry on the next merge` : `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 record semantic fingerprint (${snapshotSemanticFingerprint}) does not match committed receipt fingerprint (${receipt.committedSemanticFingerprint}); record metadata was mutated concurrently`
|
|
4992
|
+
);
|
|
4993
|
+
return { payload: null, readFailed: true };
|
|
4994
|
+
}
|
|
4995
|
+
if (receipt.committedSemanticFingerprint === void 0 && receipt.committedDigest !== void 0 && snapshotDigest !== receipt.committedDigest) {
|
|
4983
4996
|
log.warn(
|
|
4984
4997
|
snapshotDigest == null ? `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 the record snapshot digest is unavailable while the CAS receipt carries committed digest ${receipt.committedDigest}; promotion and reconciliation retry on the next merge` : `semantic-merge: merged-target promotion refused for ${merge.targetId} \u2014 record snapshot digest (${snapshotDigest}) does not match committed receipt digest (${receipt.committedDigest}); record metadata was mutated concurrently`
|
|
4985
4998
|
);
|
|
@@ -5011,11 +5024,19 @@ async function buildMergedTargetPromotionPayload(storage, merge) {
|
|
|
5011
5024
|
...fm.toolScoped === true ? { toolScoped: true } : {},
|
|
5012
5025
|
...fm.sourceConnector !== void 0 ? { sourceConnector: fm.sourceConnector } : {},
|
|
5013
5026
|
...receipt.revision !== void 0 ? { committedRevision: receipt.revision } : {},
|
|
5014
|
-
...receipt.committedDigest !== void 0 ? { committedDigest: receipt.committedDigest } : snapshotDigest !== null ? { committedDigest: snapshotDigest } : {}
|
|
5027
|
+
...receipt.committedDigest !== void 0 ? { committedDigest: receipt.committedDigest } : snapshotDigest !== null ? { committedDigest: snapshotDigest } : {},
|
|
5028
|
+
...receipt.committedSemanticFingerprint !== void 0 ? { committedSemanticFingerprint: receipt.committedSemanticFingerprint } : snapshotSemanticFingerprint !== null ? { committedSemanticFingerprint: snapshotSemanticFingerprint } : {}
|
|
5015
5029
|
},
|
|
5016
5030
|
readFailed: false
|
|
5017
5031
|
};
|
|
5018
5032
|
}
|
|
5033
|
+
async function readDurableSemanticFingerprint(filePath) {
|
|
5034
|
+
try {
|
|
5035
|
+
return createHash3("sha256").update(canonicalSemanticFileText(await readFile2(filePath, "utf8"))).digest("hex");
|
|
5036
|
+
} catch {
|
|
5037
|
+
return null;
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5019
5040
|
async function readPromotionReceiptStatus(storage, filePath) {
|
|
5020
5041
|
try {
|
|
5021
5042
|
const status = await storage.readCasRevisionStatus(filePath);
|
|
@@ -5023,7 +5044,8 @@ async function readPromotionReceiptStatus(storage, filePath) {
|
|
|
5023
5044
|
return {
|
|
5024
5045
|
available: true,
|
|
5025
5046
|
revision: status.status === "present" ? status.revision : void 0,
|
|
5026
|
-
committedDigest: status.status === "present" ? status.committedDigest : void 0
|
|
5047
|
+
committedDigest: status.status === "present" ? status.committedDigest : void 0,
|
|
5048
|
+
committedSemanticFingerprint: status.status === "present" ? status.committedSemanticFingerprint : void 0
|
|
5027
5049
|
};
|
|
5028
5050
|
} catch (err) {
|
|
5029
5051
|
return { available: false, reason: err instanceof Error ? err.message : String(err) };
|
|
@@ -5183,10 +5205,10 @@ async function promoteAndReconcileMergedTarget(args) {
|
|
|
5183
5205
|
return;
|
|
5184
5206
|
}
|
|
5185
5207
|
const standingReceipt = await readPromotionReceiptStatus(args.sourceStorage, current.path);
|
|
5186
|
-
const
|
|
5187
|
-
if (!standingReceipt.available || (standingReceipt.revision ?? void 0) !== (payload.committedRevision ?? void 0) || payload.committedDigest !== void 0 && standingReceipt.committedDigest !== void 0 && standingReceipt.committedDigest !== payload.committedDigest || payload.
|
|
5208
|
+
const standingSemanticFingerprint = await readDurableSemanticFingerprint(current.path);
|
|
5209
|
+
if (!standingReceipt.available || (standingReceipt.revision ?? void 0) !== (payload.committedRevision ?? void 0) || payload.committedDigest !== void 0 && standingReceipt.committedDigest !== void 0 && standingReceipt.committedDigest !== payload.committedDigest || payload.committedSemanticFingerprint !== void 0 && standingSemanticFingerprint !== null && standingSemanticFingerprint !== payload.committedSemanticFingerprint) {
|
|
5188
5210
|
log.warn(
|
|
5189
|
-
`persistExtraction: merged-target promotion abandoned for ${args.sourceMemoryId} \u2014 the committed record's CAS receipt or
|
|
5211
|
+
`persistExtraction: merged-target promotion abandoned for ${args.sourceMemoryId} \u2014 the committed record's CAS receipt or semantic fingerprint ${standingReceipt.available ? "does not match the cached payload's" : "is unreadable"}, so the cached body is not confirmed`
|
|
5190
5212
|
);
|
|
5191
5213
|
return;
|
|
5192
5214
|
}
|
|
@@ -5347,9 +5369,9 @@ async function persistConstructedHarmonicRecords(options) {
|
|
|
5347
5369
|
import path5 from "path";
|
|
5348
5370
|
|
|
5349
5371
|
// src/orchestration/semantic-merge-commit-effects.ts
|
|
5350
|
-
import { readFile as
|
|
5372
|
+
import { readFile as readFile3 } from "fs/promises";
|
|
5351
5373
|
async function stageMergedTargetSnapshot(target, versioning, memoryDir) {
|
|
5352
|
-
const currentFile = await
|
|
5374
|
+
const currentFile = await readFile3(target.path, "utf8");
|
|
5353
5375
|
const version = await createVersion(
|
|
5354
5376
|
target.path,
|
|
5355
5377
|
currentFile,
|
|
@@ -8079,14 +8101,14 @@ async function drainExtractionAndShutdownDependencyPropagation(extractionQueue,
|
|
|
8079
8101
|
|
|
8080
8102
|
// src/orchestration/dependency-propagation-delivery.ts
|
|
8081
8103
|
import { randomUUID } from "crypto";
|
|
8082
|
-
import { readFile as
|
|
8104
|
+
import { readFile as readFile4, unlink } from "fs/promises";
|
|
8083
8105
|
import path7 from "path";
|
|
8084
8106
|
|
|
8085
8107
|
// src/orchestration/dependency-propagation-recovery-replay.ts
|
|
8086
|
-
import { createHash as
|
|
8108
|
+
import { createHash as createHash4 } from "crypto";
|
|
8087
8109
|
function memoryFingerprint(memory) {
|
|
8088
8110
|
const { accessCount: _accessCount, lastAccessed: _lastAccessed, ...frontmatter } = memory.frontmatter;
|
|
8089
|
-
return
|
|
8111
|
+
return createHash4("sha256").update(JSON.stringify(canonicalize({ content: memory.content, frontmatter }))).digest("hex");
|
|
8090
8112
|
}
|
|
8091
8113
|
async function findRecoverySource(storage, sourceId) {
|
|
8092
8114
|
const hot = await storage.getMemoryById(sourceId);
|
|
@@ -8256,7 +8278,7 @@ var DependencyPropagationDelivery = class {
|
|
|
8256
8278
|
}, delayMs);
|
|
8257
8279
|
timer.unref();
|
|
8258
8280
|
});
|
|
8259
|
-
this.readQueueFile = options.readQueueFile ?? ((filePath) =>
|
|
8281
|
+
this.readQueueFile = options.readQueueFile ?? ((filePath) => readFile4(filePath, "utf8"));
|
|
8260
8282
|
this.writeQueueFile = options.writeQueueFile ?? ((filePath, content) => writeJsonFileAtomic(filePath, JSON.parse(content)));
|
|
8261
8283
|
this.replayReconciliation = options.replayReconciliation;
|
|
8262
8284
|
}
|
|
@@ -9103,8 +9125,8 @@ function createDependencyPropagationReplayReconciliation(host) {
|
|
|
9103
9125
|
}
|
|
9104
9126
|
|
|
9105
9127
|
// src/orchestration/recall-internal.ts
|
|
9106
|
-
import { createHash as
|
|
9107
|
-
import { readFile as
|
|
9128
|
+
import { createHash as createHash6 } from "crypto";
|
|
9129
|
+
import { readFile as readFile5, stat, unlink as unlink2 } from "fs/promises";
|
|
9108
9130
|
import path11 from "path";
|
|
9109
9131
|
|
|
9110
9132
|
// src/orchestration/graph-path-state-loader.ts
|
|
@@ -9352,7 +9374,7 @@ var GraphPathStateLoader = class {
|
|
|
9352
9374
|
};
|
|
9353
9375
|
|
|
9354
9376
|
// src/orchestration/graph-recall-coordinator.ts
|
|
9355
|
-
import { createHash as
|
|
9377
|
+
import { createHash as createHash5 } from "crypto";
|
|
9356
9378
|
import { mkdir as mkdir3, writeFile as writeFile3 } from "fs/promises";
|
|
9357
9379
|
import path9 from "path";
|
|
9358
9380
|
function mergeGraphExpandedResults(primary, expanded) {
|
|
@@ -9740,7 +9762,7 @@ var GraphRecallCoordinator = class {
|
|
|
9740
9762
|
const payload = {
|
|
9741
9763
|
recordedAt: now,
|
|
9742
9764
|
mode: options.recallMode,
|
|
9743
|
-
queryHash:
|
|
9765
|
+
queryHash: createHash5("sha256").update(options.prompt).digest("hex"),
|
|
9744
9766
|
queryLength: options.prompt.length,
|
|
9745
9767
|
namespaces: options.recallNamespaces,
|
|
9746
9768
|
seedCount: totalSeedCount,
|
|
@@ -10255,8 +10277,8 @@ var RecallInternalCoordinator = class {
|
|
|
10255
10277
|
record: recordRecallSectionMetric,
|
|
10256
10278
|
logger: log
|
|
10257
10279
|
});
|
|
10258
|
-
const promptHash =
|
|
10259
|
-
const traceId =
|
|
10280
|
+
const promptHash = createHash6("sha256").update(prompt).digest("hex");
|
|
10281
|
+
const traceId = createHash6("sha256").update(`${sessionKey ?? "default"}:${recallStart}:${promptHash}`).digest("hex").slice(0, 16);
|
|
10260
10282
|
const sectionBuckets = /* @__PURE__ */ new Map();
|
|
10261
10283
|
const queryPolicy = buildRecallQueryPolicy(prompt, sessionKey, {
|
|
10262
10284
|
cronRecallPolicyEnabled: resolveRecallAuxiliaryCapabilities(this.deps.config).cronRecallPolicy,
|
|
@@ -10265,13 +10287,9 @@ var RecallInternalCoordinator = class {
|
|
|
10265
10287
|
cronConversationRecallMode: this.deps.config.cronConversationRecallMode
|
|
10266
10288
|
});
|
|
10267
10289
|
const retrievalQuery = queryPolicy.retrievalQuery || prompt;
|
|
10268
|
-
const
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
retrievalQuery,
|
|
10272
|
-
asOfMs
|
|
10273
|
-
);
|
|
10274
|
-
const retrievalQueryHash = createHash5("sha256").update(retrievalQuery).digest("hex");
|
|
10290
|
+
const stateViewActive = resolveRecallStateViewActive(options, this.deps.config, prompt);
|
|
10291
|
+
const stateViewPacketActive2 = stateViewActive === true && !(typeof asOfMs === "number" && Number.isFinite(asOfMs));
|
|
10292
|
+
const retrievalQueryHash = createHash6("sha256").update(retrievalQuery).digest("hex");
|
|
10275
10293
|
const policyVersion = this.deps.currentPolicyVersion();
|
|
10276
10294
|
let recallSource = "none";
|
|
10277
10295
|
let recalledMemoryCount = 0;
|
|
@@ -11957,7 +11975,7 @@ ${formatted}`;
|
|
|
11957
11975
|
const signalStat = await stat(signalPath).catch(() => null);
|
|
11958
11976
|
if (!signalStat) return null;
|
|
11959
11977
|
const signalAge = Date.now() - signalStat.mtimeMs;
|
|
11960
|
-
const signalData = JSON.parse(await
|
|
11978
|
+
const signalData = JSON.parse(await readFile5(signalPath, "utf-8"));
|
|
11961
11979
|
if (signalData.sessionKey !== effectiveSessionKey) {
|
|
11962
11980
|
log.debug(
|
|
11963
11981
|
`recall: compaction signal is for ${signalData.sessionKey}, not ${effectiveSessionKey} \u2014 skipping`
|
|
@@ -11977,7 +11995,7 @@ ${formatted}`;
|
|
|
11977
11995
|
|
|
11978
11996
|
`;
|
|
11979
11997
|
try {
|
|
11980
|
-
const bootContent = await
|
|
11998
|
+
const bootContent = await readFile5(bootPath, "utf-8");
|
|
11981
11999
|
section += "### BOOT.md (working state before compaction)\n\n";
|
|
11982
12000
|
section += bootContent + "\n";
|
|
11983
12001
|
} catch {
|
|
@@ -14237,7 +14255,7 @@ ${tmtNode.summary}`
|
|
|
14237
14255
|
};
|
|
14238
14256
|
|
|
14239
14257
|
// src/orchestration/recall-search-pipeline.ts
|
|
14240
|
-
import { createHash as
|
|
14258
|
+
import { createHash as createHash7 } from "crypto";
|
|
14241
14259
|
import path13 from "path";
|
|
14242
14260
|
|
|
14243
14261
|
// src/orchestration/recall-search-prefilter.ts
|
|
@@ -14460,7 +14478,7 @@ var RecallSearchPipelineCoordinator = class {
|
|
|
14460
14478
|
if (!options.onDebugSnapshot) return;
|
|
14461
14479
|
await options.onDebugSnapshot({
|
|
14462
14480
|
recordedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
14463
|
-
queryHash:
|
|
14481
|
+
queryHash: createHash7("sha256").update(prompt).digest("hex"),
|
|
14464
14482
|
queryLength: prompt.length,
|
|
14465
14483
|
collection: options.collection,
|
|
14466
14484
|
namespaces: options.recallNamespaces,
|
|
@@ -15430,7 +15448,7 @@ var RecallSearchPipelineCoordinator = class {
|
|
|
15430
15448
|
};
|
|
15431
15449
|
|
|
15432
15450
|
// src/orchestration/turn-ingestion.ts
|
|
15433
|
-
import { createHash as
|
|
15451
|
+
import { createHash as createHash8, randomBytes } from "crypto";
|
|
15434
15452
|
function isFlushPlanRecoveryTurn(turn) {
|
|
15435
15453
|
const provenance = turn.importProvenance;
|
|
15436
15454
|
if (provenance?.sourceLabel === "OpenClaw flush plan") return true;
|
|
@@ -15621,7 +15639,7 @@ var TurnIngestionCoordinator = class {
|
|
|
15621
15639
|
const shouldUseStableBatchKey = turns.some(
|
|
15622
15640
|
(turn) => turn.persistProcessedFingerprint === true || typeof turn.turnFingerprint === "string" && turn.turnFingerprint.length > 0
|
|
15623
15641
|
);
|
|
15624
|
-
const stableBatchFingerprint = shouldUseStableBatchKey ?
|
|
15642
|
+
const stableBatchFingerprint = shouldUseStableBatchKey ? createHash8("sha256").update(
|
|
15625
15643
|
turns.map(
|
|
15626
15644
|
(turn) => [
|
|
15627
15645
|
turn.role,
|
|
@@ -15967,7 +15985,7 @@ var TurnIngestionCoordinator = class {
|
|
|
15967
15985
|
};
|
|
15968
15986
|
|
|
15969
15987
|
// src/orchestration/recall-introspection.ts
|
|
15970
|
-
import { mkdir as mkdir5, readFile as
|
|
15988
|
+
import { mkdir as mkdir5, readFile as readFile7, writeFile as writeFile5 } from "fs/promises";
|
|
15971
15989
|
import path15 from "path";
|
|
15972
15990
|
|
|
15973
15991
|
// src/taxonomy/default-taxonomy.ts
|
|
@@ -16090,7 +16108,7 @@ function generateResolverDocument(taxonomy) {
|
|
|
16090
16108
|
}
|
|
16091
16109
|
|
|
16092
16110
|
// src/taxonomy/taxonomy-loader.ts
|
|
16093
|
-
import { readFile as
|
|
16111
|
+
import { readFile as readFile6, mkdir as mkdir4, writeFile as writeFile4 } from "fs/promises";
|
|
16094
16112
|
import path14 from "path";
|
|
16095
16113
|
var TAXONOMY_DIR = ".taxonomy";
|
|
16096
16114
|
var TAXONOMY_FILE = "taxonomy.json";
|
|
@@ -16192,7 +16210,7 @@ async function loadTaxonomy(memoryDir) {
|
|
|
16192
16210
|
const taxonomyPath = path14.join(memoryDir, TAXONOMY_DIR, TAXONOMY_FILE);
|
|
16193
16211
|
let raw;
|
|
16194
16212
|
try {
|
|
16195
|
-
raw = await
|
|
16213
|
+
raw = await readFile6(taxonomyPath, "utf-8");
|
|
16196
16214
|
} catch (err) {
|
|
16197
16215
|
if (err instanceof Error && err.code === "ENOENT") {
|
|
16198
16216
|
return structuredClone(DEFAULT_TAXONOMY);
|
|
@@ -16278,7 +16296,7 @@ var RecallIntrospectionCoordinator = class {
|
|
|
16278
16296
|
"last_graph_recall.json"
|
|
16279
16297
|
);
|
|
16280
16298
|
try {
|
|
16281
|
-
const raw = await
|
|
16299
|
+
const raw = await readFile7(snapshotPath, "utf-8");
|
|
16282
16300
|
const parsed = JSON.parse(raw);
|
|
16283
16301
|
if (!parsed || typeof parsed !== "object") return null;
|
|
16284
16302
|
return {
|
|
@@ -16313,7 +16331,7 @@ var RecallIntrospectionCoordinator = class {
|
|
|
16313
16331
|
const storage = await this.deps.getStorage(namespace);
|
|
16314
16332
|
const snapshotPath = path15.join(storage.dir, "state", "last_intent.json");
|
|
16315
16333
|
try {
|
|
16316
|
-
const raw = await
|
|
16334
|
+
const raw = await readFile7(snapshotPath, "utf-8");
|
|
16317
16335
|
const parsed = JSON.parse(raw);
|
|
16318
16336
|
if (!parsed || typeof parsed !== "object") return null;
|
|
16319
16337
|
const graphDecision = parsed.graphDecision && typeof parsed.graphDecision === "object" ? parsed.graphDecision : void 0;
|
|
@@ -16350,7 +16368,7 @@ var RecallIntrospectionCoordinator = class {
|
|
|
16350
16368
|
"last_qmd_recall.json"
|
|
16351
16369
|
);
|
|
16352
16370
|
try {
|
|
16353
|
-
const raw = await
|
|
16371
|
+
const raw = await readFile7(snapshotPath, "utf-8");
|
|
16354
16372
|
const parsed = JSON.parse(raw);
|
|
16355
16373
|
if (!parsed || typeof parsed !== "object") return null;
|
|
16356
16374
|
return {
|
|
@@ -16689,15 +16707,214 @@ var RecallIntrospectionCoordinator = class {
|
|
|
16689
16707
|
// src/orchestration/orchestrator-init.ts
|
|
16690
16708
|
import { readdir as readdir2, stat as stat2, unlink as unlink3 } from "fs/promises";
|
|
16691
16709
|
import path16 from "path";
|
|
16710
|
+
|
|
16711
|
+
// src/orchestration/startup-collection-checks.ts
|
|
16712
|
+
async function startupDiscoveryWithTimeout(discover, configuredFallback, timeoutMs = qmdStartupCollectionCheckTimeoutMs()) {
|
|
16713
|
+
let timer;
|
|
16714
|
+
const fallback = {
|
|
16715
|
+
value: configuredFallback,
|
|
16716
|
+
complete: false
|
|
16717
|
+
};
|
|
16718
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
16719
|
+
timer = setTimeout(() => {
|
|
16720
|
+
log.warn(
|
|
16721
|
+
`startup discovery timed out after ${timeoutMs}ms; using configured fallback fail-open`
|
|
16722
|
+
);
|
|
16723
|
+
resolve(fallback);
|
|
16724
|
+
}, timeoutMs);
|
|
16725
|
+
});
|
|
16726
|
+
try {
|
|
16727
|
+
return await Promise.race([
|
|
16728
|
+
Promise.resolve().then(discover).then((value) => ({ value, complete: true })),
|
|
16729
|
+
timeoutPromise
|
|
16730
|
+
]);
|
|
16731
|
+
} finally {
|
|
16732
|
+
if (timer) clearTimeout(timer);
|
|
16733
|
+
}
|
|
16734
|
+
}
|
|
16735
|
+
async function qmdStartupCollectionChecksWithTimeout(checks, namespaces, timeoutMs = qmdStartupCollectionCheckTimeoutMs() + 1e3) {
|
|
16736
|
+
if (checks.length === 0) return [];
|
|
16737
|
+
const settled = /* @__PURE__ */ new Map();
|
|
16738
|
+
const trackedChecks = checks.map((check) => check.then((result) => {
|
|
16739
|
+
settled.set(result.namespace, result);
|
|
16740
|
+
return result;
|
|
16741
|
+
}));
|
|
16742
|
+
let timer;
|
|
16743
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
16744
|
+
timer = setTimeout(() => {
|
|
16745
|
+
log.warn(
|
|
16746
|
+
`QMD startup collection check batch timed out after ${timeoutMs}ms; keeping search enabled fail-open`
|
|
16747
|
+
);
|
|
16748
|
+
resolve(namespaces.map(
|
|
16749
|
+
(namespace) => settled.get(namespace) ?? { namespace, state: "unknown" }
|
|
16750
|
+
));
|
|
16751
|
+
}, timeoutMs);
|
|
16752
|
+
});
|
|
16753
|
+
try {
|
|
16754
|
+
return await Promise.race([Promise.all(trackedChecks), timeoutPromise]);
|
|
16755
|
+
} finally {
|
|
16756
|
+
if (timer) clearTimeout(timer);
|
|
16757
|
+
}
|
|
16758
|
+
}
|
|
16759
|
+
|
|
16760
|
+
// src/orchestration/orchestrator-init.ts
|
|
16692
16761
|
var OrchestratorInitCoordinator = class {
|
|
16693
16762
|
constructor(deps) {
|
|
16694
16763
|
this.deps = deps;
|
|
16695
16764
|
}
|
|
16696
16765
|
deps;
|
|
16766
|
+
nextStartupEpoch = 0;
|
|
16767
|
+
activeStartupEpoch = null;
|
|
16768
|
+
startupClosed = false;
|
|
16769
|
+
maintenanceNamespacesFlight;
|
|
16770
|
+
correctionCatalogFlight;
|
|
16771
|
+
recoveredCorrectionNamespaces = /* @__PURE__ */ new Set();
|
|
16772
|
+
correctionRecoveryChain = Promise.resolve();
|
|
16773
|
+
startupEpochAbort;
|
|
16774
|
+
/** Retire the current lifecycle without constructing a lazy coordinator. */
|
|
16775
|
+
retireStartupEpoch() {
|
|
16776
|
+
this.startupEpochAbort?.controller.abort();
|
|
16777
|
+
this.startupEpochAbort = void 0;
|
|
16778
|
+
this.startupClosed = true;
|
|
16779
|
+
this.activeStartupEpoch = null;
|
|
16780
|
+
}
|
|
16781
|
+
beginStartupEpoch() {
|
|
16782
|
+
this.startupEpochAbort?.controller.abort();
|
|
16783
|
+
this.startupEpochAbort = void 0;
|
|
16784
|
+
this.deps.deferredInitAbort?.abort();
|
|
16785
|
+
this.deps.deferredInitAbort = null;
|
|
16786
|
+
this.deps.deferredSyncSucceeded = false;
|
|
16787
|
+
const epoch = ++this.nextStartupEpoch;
|
|
16788
|
+
this.startupEpochAbort = { epoch, controller: new AbortController() };
|
|
16789
|
+
this.activeStartupEpoch = epoch;
|
|
16790
|
+
this.startupClosed = false;
|
|
16791
|
+
this.maintenanceNamespacesFlight = void 0;
|
|
16792
|
+
this.correctionCatalogFlight = void 0;
|
|
16793
|
+
this.recoveredCorrectionNamespaces = /* @__PURE__ */ new Set();
|
|
16794
|
+
this.correctionRecoveryChain = Promise.resolve();
|
|
16795
|
+
return epoch;
|
|
16796
|
+
}
|
|
16797
|
+
currentOrNewStartupEpoch() {
|
|
16798
|
+
if (this.startupClosed) return null;
|
|
16799
|
+
return this.activeStartupEpoch ?? this.beginStartupEpoch();
|
|
16800
|
+
}
|
|
16801
|
+
isCurrentStartupEpoch(epoch) {
|
|
16802
|
+
return !this.startupClosed && this.activeStartupEpoch === epoch;
|
|
16803
|
+
}
|
|
16804
|
+
startupEpochSignal(epoch) {
|
|
16805
|
+
return this.startupEpochAbort?.epoch === epoch ? this.startupEpochAbort.controller.signal : void 0;
|
|
16806
|
+
}
|
|
16807
|
+
linkedEpochAbortController(epoch, externalSignal) {
|
|
16808
|
+
const controller = new AbortController();
|
|
16809
|
+
const signals = [this.startupEpochSignal(epoch), externalSignal].filter((signal) => signal !== void 0);
|
|
16810
|
+
const abort = () => controller.abort();
|
|
16811
|
+
for (const signal of signals) {
|
|
16812
|
+
if (signal.aborted) abort();
|
|
16813
|
+
else signal.addEventListener("abort", abort, { once: true });
|
|
16814
|
+
}
|
|
16815
|
+
return {
|
|
16816
|
+
controller,
|
|
16817
|
+
dispose: () => {
|
|
16818
|
+
for (const signal of signals) signal.removeEventListener("abort", abort);
|
|
16819
|
+
}
|
|
16820
|
+
};
|
|
16821
|
+
}
|
|
16822
|
+
async probeForStartupEpoch(epoch, externalSignal) {
|
|
16823
|
+
const abort = this.linkedEpochAbortController(epoch, externalSignal);
|
|
16824
|
+
try {
|
|
16825
|
+
if (!this.isCurrentStartupEpoch(epoch) || abort.controller.signal.aborted) return false;
|
|
16826
|
+
return await this.deps.qmd.probe({ signal: abort.controller.signal });
|
|
16827
|
+
} finally {
|
|
16828
|
+
abort.dispose();
|
|
16829
|
+
}
|
|
16830
|
+
}
|
|
16831
|
+
maintenanceNamespacesFlightFor(epoch) {
|
|
16832
|
+
if (this.maintenanceNamespacesFlight?.epoch === epoch) {
|
|
16833
|
+
return this.maintenanceNamespacesFlight.promise;
|
|
16834
|
+
}
|
|
16835
|
+
const promise = Promise.resolve().then(() => {
|
|
16836
|
+
if (!this.isCurrentStartupEpoch(epoch)) return [];
|
|
16837
|
+
return this.deps.maintenanceNamespaces();
|
|
16838
|
+
});
|
|
16839
|
+
this.maintenanceNamespacesFlight = { epoch, promise };
|
|
16840
|
+
void promise.catch(() => {
|
|
16841
|
+
if (this.isCurrentStartupEpoch(epoch) && this.maintenanceNamespacesFlight?.epoch === epoch && this.maintenanceNamespacesFlight.promise === promise) {
|
|
16842
|
+
this.maintenanceNamespacesFlight = void 0;
|
|
16843
|
+
}
|
|
16844
|
+
});
|
|
16845
|
+
return promise;
|
|
16846
|
+
}
|
|
16847
|
+
correctionCatalogFlightFor(epoch) {
|
|
16848
|
+
if (!this.isCurrentStartupEpoch(epoch)) {
|
|
16849
|
+
return Promise.resolve([]);
|
|
16850
|
+
}
|
|
16851
|
+
if (this.correctionCatalogFlight?.epoch === epoch) {
|
|
16852
|
+
return this.correctionCatalogFlight.promise;
|
|
16853
|
+
}
|
|
16854
|
+
const promise = Promise.resolve().then(() => {
|
|
16855
|
+
if (!this.isCurrentStartupEpoch(epoch)) return [];
|
|
16856
|
+
return this.deps.namespaceCatalog.listNamespaces();
|
|
16857
|
+
});
|
|
16858
|
+
this.correctionCatalogFlight = { epoch, promise };
|
|
16859
|
+
return promise;
|
|
16860
|
+
}
|
|
16861
|
+
enqueueCorrectionRecovery(epoch, namespaces) {
|
|
16862
|
+
if (!this.isCurrentStartupEpoch(epoch)) return Promise.resolve();
|
|
16863
|
+
const unrecovered = [...new Set(namespaces)].filter(
|
|
16864
|
+
(namespace) => !this.recoveredCorrectionNamespaces.has(namespace)
|
|
16865
|
+
);
|
|
16866
|
+
if (unrecovered.length === 0) return this.correctionRecoveryChain;
|
|
16867
|
+
for (const namespace of unrecovered) this.recoveredCorrectionNamespaces.add(namespace);
|
|
16868
|
+
this.correctionRecoveryChain = this.correctionRecoveryChain.then(async () => {
|
|
16869
|
+
if (!this.isCurrentStartupEpoch(epoch)) return;
|
|
16870
|
+
try {
|
|
16871
|
+
const recovered = await this.deps.passiveCorrectionService().recoverStaleApplyingPlans(
|
|
16872
|
+
unrecovered
|
|
16873
|
+
);
|
|
16874
|
+
if (recovered > 0) {
|
|
16875
|
+
log.info(`correction: recovered ${recovered} stale applying plan(s) on startup`);
|
|
16876
|
+
}
|
|
16877
|
+
} catch (staleErr) {
|
|
16878
|
+
log.debug(`correction: stale-plan recovery skipped: ${staleErr instanceof Error ? staleErr.message : String(staleErr)}`);
|
|
16879
|
+
}
|
|
16880
|
+
});
|
|
16881
|
+
return this.correctionRecoveryChain;
|
|
16882
|
+
}
|
|
16883
|
+
async startupNamespaces(epoch) {
|
|
16884
|
+
if (!this.isCurrentStartupEpoch(epoch)) {
|
|
16885
|
+
return { namespaces: this.deps.configuredNamespaceList(), complete: false };
|
|
16886
|
+
}
|
|
16887
|
+
if (!resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
16888
|
+
return { namespaces: [this.deps.config.defaultNamespace], complete: true };
|
|
16889
|
+
}
|
|
16890
|
+
const discovery = await startupDiscoveryWithTimeout(
|
|
16891
|
+
() => this.maintenanceNamespacesFlightFor(epoch),
|
|
16892
|
+
this.deps.configuredNamespaceList()
|
|
16893
|
+
);
|
|
16894
|
+
return { namespaces: discovery.value, complete: discovery.complete };
|
|
16895
|
+
}
|
|
16697
16896
|
async initialize() {
|
|
16897
|
+
const epoch = this.beginStartupEpoch();
|
|
16898
|
+
let resolveDeferred;
|
|
16698
16899
|
this.deps.deferredReady = new Promise((resolve) => {
|
|
16699
|
-
|
|
16900
|
+
resolveDeferred = () => resolve();
|
|
16901
|
+
this.deps.resolveDeferredReady = resolveDeferred;
|
|
16700
16902
|
});
|
|
16903
|
+
const settleOwnDeferredReady = () => {
|
|
16904
|
+
if (this.deps.resolveDeferredReady === resolveDeferred) {
|
|
16905
|
+
this.deps.resolveDeferredReady = null;
|
|
16906
|
+
}
|
|
16907
|
+
resolveDeferred?.();
|
|
16908
|
+
};
|
|
16909
|
+
const exitIfStale = () => {
|
|
16910
|
+
if (this.isCurrentStartupEpoch(epoch)) return false;
|
|
16911
|
+
if (this.startupClosed && this.deps.resolveInit) {
|
|
16912
|
+
this.deps.resolveInit();
|
|
16913
|
+
this.deps.resolveInit = null;
|
|
16914
|
+
}
|
|
16915
|
+
settleOwnDeferredReady();
|
|
16916
|
+
return true;
|
|
16917
|
+
};
|
|
16701
16918
|
try {
|
|
16702
16919
|
await migrateFromEngram({
|
|
16703
16920
|
quiet: true,
|
|
@@ -16730,21 +16947,34 @@ var OrchestratorInitCoordinator = class {
|
|
|
16730
16947
|
const correctionNamespaces = new Set(this.deps.configuredNamespaceList());
|
|
16731
16948
|
if (this.deps.namespaceCatalog.enabled) {
|
|
16732
16949
|
try {
|
|
16733
|
-
|
|
16950
|
+
const catalogFlight = this.correctionCatalogFlightFor(epoch);
|
|
16951
|
+
const catalogDiscovery = await startupDiscoveryWithTimeout(
|
|
16952
|
+
() => catalogFlight,
|
|
16953
|
+
[]
|
|
16954
|
+
);
|
|
16955
|
+
for (const rec of catalogDiscovery.value) {
|
|
16734
16956
|
correctionNamespaces.add(rec.namespace);
|
|
16735
16957
|
}
|
|
16958
|
+
if (!catalogDiscovery.complete) {
|
|
16959
|
+
void catalogFlight.then(
|
|
16960
|
+
(records) => {
|
|
16961
|
+
if (!this.isCurrentStartupEpoch(epoch)) return;
|
|
16962
|
+
void this.enqueueCorrectionRecovery(
|
|
16963
|
+
epoch,
|
|
16964
|
+
records.map((record) => record.namespace)
|
|
16965
|
+
);
|
|
16966
|
+
},
|
|
16967
|
+
() => void 0
|
|
16968
|
+
);
|
|
16969
|
+
}
|
|
16736
16970
|
} catch {
|
|
16737
16971
|
}
|
|
16738
16972
|
}
|
|
16739
|
-
|
|
16740
|
-
[...correctionNamespaces]
|
|
16741
|
-
);
|
|
16742
|
-
if (recovered > 0) {
|
|
16743
|
-
log.info(`correction: recovered ${recovered} stale applying plan(s) on startup`);
|
|
16744
|
-
}
|
|
16973
|
+
await this.enqueueCorrectionRecovery(epoch, correctionNamespaces);
|
|
16745
16974
|
} catch (staleErr) {
|
|
16746
16975
|
log.debug(`correction: stale-plan recovery skipped: ${staleErr instanceof Error ? staleErr.message : String(staleErr)}`);
|
|
16747
16976
|
}
|
|
16977
|
+
if (exitIfStale()) return;
|
|
16748
16978
|
await this.deps.relevance.load();
|
|
16749
16979
|
await this.deps.negatives.load();
|
|
16750
16980
|
await this.deps.lastRecall.load();
|
|
@@ -16805,52 +17035,68 @@ var OrchestratorInitCoordinator = class {
|
|
|
16805
17035
|
}
|
|
16806
17036
|
}
|
|
16807
17037
|
try {
|
|
16808
|
-
const available = await this.
|
|
17038
|
+
const available = await this.probeForStartupEpoch(epoch);
|
|
16809
17039
|
if (available) {
|
|
16810
17040
|
log.info(`Search backend: available ${this.deps.qmd.debugStatus()}`);
|
|
16811
|
-
const
|
|
16812
|
-
const
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
this.deps.
|
|
16821
|
-
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
16831
|
-
|
|
16832
|
-
|
|
16833
|
-
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16837
|
-
|
|
16838
|
-
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
)
|
|
17041
|
+
const namespaceCapabilities = resolveNamespaceCapabilities(this.deps.config).namespaces;
|
|
17042
|
+
const discovery = await this.startupNamespaces(epoch);
|
|
17043
|
+
if (!this.isCurrentStartupEpoch(epoch)) {
|
|
17044
|
+
log.debug("startup collection check skipped for a retired startup epoch");
|
|
17045
|
+
} else {
|
|
17046
|
+
const checks = discovery.namespaces.map(async (namespace) => {
|
|
17047
|
+
const epochAbort = this.linkedEpochAbortController(epoch);
|
|
17048
|
+
try {
|
|
17049
|
+
const state = await qmdStartupCollectionCheckWithTimeout(
|
|
17050
|
+
namespaceCapabilities ? this.deps.namespaceSearchRouter.ensureNamespaceCollection(
|
|
17051
|
+
namespace,
|
|
17052
|
+
{ signal: epochAbort.controller.signal }
|
|
17053
|
+
) : this.deps.qmd.ensureCollection(
|
|
17054
|
+
this.deps.config.memoryDir,
|
|
17055
|
+
this.deps.config.qmdCollection,
|
|
17056
|
+
{ signal: epochAbort.controller.signal }
|
|
17057
|
+
),
|
|
17058
|
+
epochAbort.controller,
|
|
17059
|
+
namespace
|
|
17060
|
+
);
|
|
17061
|
+
return { namespace, state };
|
|
17062
|
+
} finally {
|
|
17063
|
+
epochAbort.dispose();
|
|
17064
|
+
}
|
|
17065
|
+
});
|
|
17066
|
+
const states = await qmdStartupCollectionChecksWithTimeout(checks, discovery.namespaces);
|
|
17067
|
+
if (!this.isCurrentStartupEpoch(epoch)) {
|
|
17068
|
+
log.debug("startup collection-check batch completed for a retired startup epoch");
|
|
17069
|
+
} else {
|
|
17070
|
+
const defaultState = states.find(
|
|
17071
|
+
(entry) => entry.namespace === this.deps.config.defaultNamespace
|
|
17072
|
+
)?.state ?? "unknown";
|
|
17073
|
+
if (defaultState === "missing") {
|
|
17074
|
+
await this.deps.disposeSearchBackendIfNeeded();
|
|
17075
|
+
if (!this.isCurrentStartupEpoch(epoch)) {
|
|
17076
|
+
log.debug("startup collection-check disposal completed for a retired startup epoch");
|
|
17077
|
+
} else {
|
|
17078
|
+
this.deps.qmd = new NoopSearchBackend();
|
|
17079
|
+
log.warn(
|
|
17080
|
+
"Search collection missing for Remnic memory store; disabling search retrieval for this runtime (fallback retrieval remains enabled)"
|
|
17081
|
+
);
|
|
17082
|
+
}
|
|
17083
|
+
} else if (defaultState === "unknown") {
|
|
17084
|
+
log.warn(
|
|
17085
|
+
"Search collection check unavailable; keeping search retrieval enabled for fail-open behavior"
|
|
17086
|
+
);
|
|
17087
|
+
} else if (defaultState === "skipped") {
|
|
17088
|
+
log.debug(
|
|
17089
|
+
"Search collection check skipped (remote or daemon-only mode)"
|
|
17090
|
+
);
|
|
17091
|
+
}
|
|
17092
|
+
for (const entry of states) {
|
|
17093
|
+
if (entry.namespace === this.deps.config.defaultNamespace) continue;
|
|
17094
|
+
if (entry.state === "missing") {
|
|
17095
|
+
log.warn(
|
|
17096
|
+
`Search collection missing for namespace '${entry.namespace}'; namespace retrieval will fail open to non-search paths`
|
|
17097
|
+
);
|
|
17098
|
+
}
|
|
17099
|
+
}
|
|
16854
17100
|
}
|
|
16855
17101
|
}
|
|
16856
17102
|
} else if (this.deps.qmd instanceof NoopSearchBackend) {
|
|
@@ -16861,46 +17107,55 @@ var OrchestratorInitCoordinator = class {
|
|
|
16861
17107
|
} catch (err) {
|
|
16862
17108
|
log.error(`QMD probe/collection check failed (non-fatal): ${err}`);
|
|
16863
17109
|
}
|
|
17110
|
+
if (exitIfStale()) return;
|
|
16864
17111
|
if (this.deps.resolveInit) {
|
|
16865
17112
|
this.deps.resolveInit();
|
|
16866
17113
|
this.deps.resolveInit = null;
|
|
16867
17114
|
log.info("init gate opened (essential state + QMD state loaded)");
|
|
16868
17115
|
}
|
|
16869
|
-
|
|
16870
|
-
|
|
17116
|
+
if (this.deps.resolveDeferredReady === resolveDeferred) {
|
|
17117
|
+
this.deps.resolveDeferredReady = null;
|
|
17118
|
+
}
|
|
16871
17119
|
this.deps.deferredInitAbort = new AbortController();
|
|
16872
17120
|
this.deps.deferredInitialize(this.deps.deferredInitAbort.signal).catch((err) => {
|
|
16873
17121
|
log.error(`deferred initialization failed (non-fatal): ${err}`);
|
|
16874
17122
|
}).finally(() => {
|
|
16875
|
-
|
|
17123
|
+
settleOwnDeferredReady();
|
|
16876
17124
|
});
|
|
16877
17125
|
} catch (err) {
|
|
16878
|
-
if (this.deps.resolveInit) {
|
|
17126
|
+
if ((this.isCurrentStartupEpoch(epoch) || this.startupClosed) && this.deps.resolveInit) {
|
|
16879
17127
|
this.deps.resolveInit();
|
|
16880
17128
|
this.deps.resolveInit = null;
|
|
16881
17129
|
}
|
|
16882
|
-
|
|
16883
|
-
this.deps.resolveDeferredReady();
|
|
16884
|
-
this.deps.resolveDeferredReady = null;
|
|
16885
|
-
}
|
|
17130
|
+
settleOwnDeferredReady();
|
|
16886
17131
|
throw err;
|
|
16887
17132
|
}
|
|
16888
17133
|
}
|
|
16889
17134
|
async deferredInitialize(signal) {
|
|
17135
|
+
const epoch = this.currentOrNewStartupEpoch();
|
|
17136
|
+
if (epoch === null) return;
|
|
16890
17137
|
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.deps.config);
|
|
16891
17138
|
if (this.deps.qmd.isAvailable() && resolveQmdCapabilities(this.deps.config).qmdMaintenance) {
|
|
16892
17139
|
try {
|
|
16893
17140
|
log.info("QMD startup sync: updating index to match current disk state");
|
|
17141
|
+
const discovery = await this.startupNamespaces(epoch);
|
|
17142
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16894
17143
|
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
16895
17144
|
await this.deps.namespaceSearchRouter.updateNamespaces(
|
|
16896
|
-
|
|
17145
|
+
discovery.namespaces,
|
|
16897
17146
|
{ signal }
|
|
16898
17147
|
);
|
|
16899
17148
|
} else {
|
|
16900
17149
|
await this.deps.qmd.update({ signal });
|
|
16901
17150
|
}
|
|
17151
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16902
17152
|
log.info("QMD startup sync: complete");
|
|
16903
|
-
|
|
17153
|
+
if (discovery.complete) {
|
|
17154
|
+
this.deps.deferredSyncSucceeded = true;
|
|
17155
|
+
} else {
|
|
17156
|
+
this.deps.deferredSyncSucceeded = false;
|
|
17157
|
+
log.warn("QMD startup sync used configured namespace fallback; retry remains armed");
|
|
17158
|
+
}
|
|
16904
17159
|
} catch (err) {
|
|
16905
17160
|
log.warn(`QMD startup sync failed (non-fatal): ${err}`);
|
|
16906
17161
|
}
|
|
@@ -16908,7 +17163,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
16908
17163
|
} else {
|
|
16909
17164
|
this.deps.deferredSyncSucceeded = true;
|
|
16910
17165
|
}
|
|
16911
|
-
if (signal.aborted) return;
|
|
17166
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16912
17167
|
const warmupPromises = [];
|
|
16913
17168
|
if (this.deps.qmd.isAvailable()) {
|
|
16914
17169
|
const warmupNs = this.deps.config.defaultNamespace;
|
|
@@ -16933,7 +17188,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
16933
17188
|
);
|
|
16934
17189
|
}
|
|
16935
17190
|
await Promise.all(warmupPromises);
|
|
16936
|
-
if (signal.aborted) return;
|
|
17191
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16937
17192
|
const cacheWarmups = [];
|
|
16938
17193
|
if (resolveRecallAuxiliaryCapabilities(this.deps.config).knowledgeIndex) {
|
|
16939
17194
|
cacheWarmups.push(
|
|
@@ -16955,10 +17210,11 @@ var OrchestratorInitCoordinator = class {
|
|
|
16955
17210
|
}).catch(() => {
|
|
16956
17211
|
}));
|
|
16957
17212
|
await Promise.all(cacheWarmups);
|
|
16958
|
-
if (signal.aborted) return;
|
|
17213
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16959
17214
|
if (resolveIndexingCapabilities(this.deps.config).conversationIndex && this.deps.conversationIndexBackend) {
|
|
16960
17215
|
try {
|
|
16961
17216
|
const init = await this.deps.conversationIndexBackend.initialize();
|
|
17217
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16962
17218
|
if (!init.enabled) {
|
|
16963
17219
|
this.deps.config.conversationIndexEnabled = false;
|
|
16964
17220
|
}
|
|
@@ -16970,11 +17226,12 @@ var OrchestratorInitCoordinator = class {
|
|
|
16970
17226
|
log.debug(init.message);
|
|
16971
17227
|
}
|
|
16972
17228
|
} catch (err) {
|
|
17229
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16973
17230
|
log.error(`Conversation index initialization failed (non-fatal): ${err}`);
|
|
16974
17231
|
this.deps.config.conversationIndexEnabled = false;
|
|
16975
17232
|
}
|
|
16976
17233
|
}
|
|
16977
|
-
if (signal.aborted) return;
|
|
17234
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16978
17235
|
if (resolveLocalLlmCapabilities(this.deps.config).localLlm) {
|
|
16979
17236
|
try {
|
|
16980
17237
|
await this.deps.validateLocalLlmModel();
|
|
@@ -16982,12 +17239,13 @@ var OrchestratorInitCoordinator = class {
|
|
|
16982
17239
|
log.error(`Local LLM validation failed (non-fatal): ${err}`);
|
|
16983
17240
|
}
|
|
16984
17241
|
}
|
|
16985
|
-
if (signal.aborted) return;
|
|
17242
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16986
17243
|
await this.deps.maintenanceScheduler.autoRegisterCrons(signal);
|
|
16987
|
-
if (signal.aborted) return;
|
|
17244
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16988
17245
|
if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
|
|
16989
17246
|
try {
|
|
16990
17247
|
const { runFirstStartMigration } = await import("./first-start-migration-ZWMV5CX4.js");
|
|
17248
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
16991
17249
|
const result = await runFirstStartMigration({
|
|
16992
17250
|
storage: this.deps.storage,
|
|
16993
17251
|
config: this.deps.config,
|
|
@@ -17007,11 +17265,11 @@ var OrchestratorInitCoordinator = class {
|
|
|
17007
17265
|
log.warn(`first-start lifecycle migration failed (non-fatal): ${err}`);
|
|
17008
17266
|
}
|
|
17009
17267
|
}
|
|
17010
|
-
if (signal.aborted) return;
|
|
17268
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
17011
17269
|
if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
|
|
17012
17270
|
try {
|
|
17013
|
-
const { startWearablesAutoSync } = await import("./auto-sync-
|
|
17014
|
-
if (signal.aborted) return;
|
|
17271
|
+
const { startWearablesAutoSync } = await import("./auto-sync-D6BAPIJV.js");
|
|
17272
|
+
if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
|
|
17015
17273
|
this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
|
|
17016
17274
|
{
|
|
17017
17275
|
intervalMinutes: this.deps.config.wearables.autoSyncIntervalMinutes,
|
|
@@ -17057,33 +17315,58 @@ var OrchestratorInitCoordinator = class {
|
|
|
17057
17315
|
*/
|
|
17058
17316
|
async startupSearchSync(signal) {
|
|
17059
17317
|
if (signal?.aborted) return false;
|
|
17060
|
-
const
|
|
17318
|
+
const epoch = this.currentOrNewStartupEpoch();
|
|
17319
|
+
if (epoch === null) return false;
|
|
17320
|
+
const available = await this.probeForStartupEpoch(epoch, signal);
|
|
17061
17321
|
if (!available) return false;
|
|
17062
|
-
if (signal?.aborted) {
|
|
17063
|
-
log.debug("startupSearchSync: aborted after probe");
|
|
17322
|
+
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
17323
|
+
log.debug("startupSearchSync: aborted or retired after probe");
|
|
17064
17324
|
return false;
|
|
17065
17325
|
}
|
|
17066
17326
|
log.info(`startupSearchSync: backend now available ${this.deps.qmd.debugStatus()}`);
|
|
17067
17327
|
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
17068
17328
|
this.deps.namespaceSearchRouter.clearCache();
|
|
17069
17329
|
}
|
|
17070
|
-
const
|
|
17330
|
+
const discovery = await this.startupNamespaces(epoch);
|
|
17331
|
+
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
17332
|
+
log.debug("startupSearchSync: aborted or retired after namespace discovery");
|
|
17333
|
+
return false;
|
|
17334
|
+
}
|
|
17335
|
+
const namespaces = discovery.namespaces;
|
|
17071
17336
|
const states = await Promise.all(
|
|
17072
|
-
namespaces.map(async (namespace) =>
|
|
17073
|
-
|
|
17074
|
-
|
|
17075
|
-
|
|
17337
|
+
namespaces.map(async (namespace) => {
|
|
17338
|
+
const epochAbort = this.linkedEpochAbortController(epoch, signal);
|
|
17339
|
+
try {
|
|
17340
|
+
return {
|
|
17341
|
+
namespace,
|
|
17342
|
+
state: resolveNamespaceCapabilities(this.deps.config).namespaces ? await this.deps.namespaceSearchRouter.ensureNamespaceCollection(
|
|
17343
|
+
namespace,
|
|
17344
|
+
{ signal: epochAbort.controller.signal }
|
|
17345
|
+
) : await this.deps.qmd.ensureCollection(
|
|
17346
|
+
this.deps.config.memoryDir,
|
|
17347
|
+
this.deps.config.qmdCollection,
|
|
17348
|
+
{ signal: epochAbort.controller.signal }
|
|
17349
|
+
)
|
|
17350
|
+
};
|
|
17351
|
+
} finally {
|
|
17352
|
+
epochAbort.dispose();
|
|
17353
|
+
}
|
|
17354
|
+
})
|
|
17076
17355
|
);
|
|
17077
|
-
if (signal?.aborted) {
|
|
17078
|
-
log.debug("startupSearchSync: aborted after ensureCollection");
|
|
17356
|
+
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
17357
|
+
log.debug("startupSearchSync: aborted or retired after ensureCollection");
|
|
17079
17358
|
return false;
|
|
17080
17359
|
}
|
|
17081
17360
|
const defaultState = states.find((e) => e.namespace === this.deps.config.defaultNamespace)?.state ?? "unknown";
|
|
17082
17361
|
if (defaultState === "missing") {
|
|
17362
|
+
await this.deps.disposeSearchBackendIfNeeded();
|
|
17363
|
+
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
17364
|
+
log.debug("startupSearchSync: aborted or retired while disposing a missing backend");
|
|
17365
|
+
return false;
|
|
17366
|
+
}
|
|
17083
17367
|
if ("available" in this.deps.qmd) {
|
|
17084
17368
|
this.deps.qmd.available = false;
|
|
17085
17369
|
}
|
|
17086
|
-
await this.deps.disposeSearchBackendIfNeeded();
|
|
17087
17370
|
this.deps.qmd = new NoopSearchBackend();
|
|
17088
17371
|
log.warn("startupSearchSync: search collection missing; disabling search (fallback retrieval remains enabled)");
|
|
17089
17372
|
return false;
|
|
@@ -17096,17 +17379,22 @@ var OrchestratorInitCoordinator = class {
|
|
|
17096
17379
|
this.deps.qmd.resetUpdateThrottles();
|
|
17097
17380
|
}
|
|
17098
17381
|
log.info("startupSearchSync: updating index to match current disk state");
|
|
17382
|
+
const updateAbort = this.linkedEpochAbortController(epoch, signal);
|
|
17099
17383
|
let namespacesUpdated = 0;
|
|
17100
|
-
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17384
|
+
try {
|
|
17385
|
+
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
17386
|
+
namespacesUpdated = await this.deps.namespaceSearchRouter.updateNamespaces(
|
|
17387
|
+
namespaces,
|
|
17388
|
+
{ signal: updateAbort.controller.signal }
|
|
17389
|
+
);
|
|
17390
|
+
} else {
|
|
17391
|
+
await this.deps.qmd.update({ signal: updateAbort.controller.signal });
|
|
17392
|
+
}
|
|
17393
|
+
} finally {
|
|
17394
|
+
updateAbort.dispose();
|
|
17107
17395
|
}
|
|
17108
|
-
if (signal?.aborted) {
|
|
17109
|
-
log.debug("startupSearchSync: aborted after update");
|
|
17396
|
+
if (signal?.aborted || !this.isCurrentStartupEpoch(epoch)) {
|
|
17397
|
+
log.debug("startupSearchSync: aborted or retired after update");
|
|
17110
17398
|
return false;
|
|
17111
17399
|
}
|
|
17112
17400
|
const failTsAfter = "lastUpdateFailedAtMs" in this.deps.qmd ? this.deps.qmd.lastUpdateFailedAtMs : null;
|
|
@@ -17131,15 +17419,24 @@ var OrchestratorInitCoordinator = class {
|
|
|
17131
17419
|
return false;
|
|
17132
17420
|
}
|
|
17133
17421
|
}
|
|
17134
|
-
if (!signal?.aborted) {
|
|
17422
|
+
if (!signal?.aborted && this.isCurrentStartupEpoch(epoch)) {
|
|
17423
|
+
const warmupAbort = this.linkedEpochAbortController(epoch, signal);
|
|
17135
17424
|
try {
|
|
17136
|
-
await this.deps.qmd.search(
|
|
17425
|
+
await this.deps.qmd.search(
|
|
17426
|
+
"warmup",
|
|
17427
|
+
this.deps.config.defaultNamespace,
|
|
17428
|
+
1,
|
|
17429
|
+
void 0,
|
|
17430
|
+
{ signal: warmupAbort.controller.signal }
|
|
17431
|
+
);
|
|
17137
17432
|
log.info("startupSearchSync: warmup complete");
|
|
17138
17433
|
} catch (err) {
|
|
17139
17434
|
log.debug(`startupSearchSync: warmup search failed (non-fatal): ${err}`);
|
|
17435
|
+
} finally {
|
|
17436
|
+
warmupAbort.dispose();
|
|
17140
17437
|
}
|
|
17141
17438
|
}
|
|
17142
|
-
return
|
|
17439
|
+
return discovery.complete;
|
|
17143
17440
|
}
|
|
17144
17441
|
};
|
|
17145
17442
|
|
|
@@ -17490,7 +17787,7 @@ var PersistenceIndexCoordinator = class {
|
|
|
17490
17787
|
};
|
|
17491
17788
|
|
|
17492
17789
|
// src/orchestration/workspace-ops.ts
|
|
17493
|
-
import { lstat as lstat2, mkdir as mkdir6, readFile as
|
|
17790
|
+
import { lstat as lstat2, mkdir as mkdir6, readFile as readFile8, readdir as readdir3, realpath as realpath2, writeFile as writeFile6 } from "fs/promises";
|
|
17494
17791
|
import path18 from "path";
|
|
17495
17792
|
|
|
17496
17793
|
// src/maintenance/pattern-reinforcement.ts
|
|
@@ -19492,7 +19789,7 @@ var WorkspaceOpsCoordinator = class {
|
|
|
19492
19789
|
for (const rel of hygiene.rotatePaths) {
|
|
19493
19790
|
const abs = path18.isAbsolute(rel) ? rel : path18.join(this.deps.config.workspaceDir, rel);
|
|
19494
19791
|
try {
|
|
19495
|
-
const raw = await
|
|
19792
|
+
const raw = await readFile8(abs, "utf-8");
|
|
19496
19793
|
if (raw.length > hygiene.rotateMaxBytes) {
|
|
19497
19794
|
const archiveDir = path18.join(
|
|
19498
19795
|
this.deps.config.workspaceDir,
|
|
@@ -19533,7 +19830,7 @@ var WorkspaceOpsCoordinator = class {
|
|
|
19533
19830
|
` + warnings.map((w) => `- ${w.message}`).join("\n") + "\n";
|
|
19534
19831
|
let existing = "";
|
|
19535
19832
|
try {
|
|
19536
|
-
existing = await
|
|
19833
|
+
existing = await readFile8(fp, "utf-8");
|
|
19537
19834
|
} catch {
|
|
19538
19835
|
existing = "# Engram File Hygiene Warnings\n";
|
|
19539
19836
|
}
|
|
@@ -19603,7 +19900,7 @@ var WorkspaceOpsCoordinator = class {
|
|
|
19603
19900
|
for (const date of datesToScan) {
|
|
19604
19901
|
const summaryFile = path18.join(hourlyBaseDir, sk.name, `${date}.md`);
|
|
19605
19902
|
try {
|
|
19606
|
-
const raw = await
|
|
19903
|
+
const raw = await readFile8(summaryFile, "utf-8");
|
|
19607
19904
|
const filtered = filterHourlySummaryMarkdownForLocalDay(
|
|
19608
19905
|
raw,
|
|
19609
19906
|
date,
|
|
@@ -21001,6 +21298,10 @@ var Orchestrator = class {
|
|
|
21001
21298
|
this.deferredInitAbort = null;
|
|
21002
21299
|
}
|
|
21003
21300
|
}
|
|
21301
|
+
async disposeSearchBackendIfNeeded() {
|
|
21302
|
+
await this.namespaceSearchRouter.disableSearchBackends();
|
|
21303
|
+
await this.qmd.dispose?.();
|
|
21304
|
+
}
|
|
21004
21305
|
/** Track a recall-side write so destroy() can wait for it before teardown. @internal */
|
|
21005
21306
|
trackRecallBackgroundWrite(promise, label) {
|
|
21006
21307
|
trackRecallWrite(this, promise, label);
|
|
@@ -21011,6 +21312,7 @@ var Orchestrator = class {
|
|
|
21011
21312
|
* commands should call it before returning to let Node exit naturally.
|
|
21012
21313
|
*/
|
|
21013
21314
|
async destroy() {
|
|
21315
|
+
this._orchestratorInitCoordinator?.retireStartupEpoch();
|
|
21014
21316
|
this.abortDeferredInit();
|
|
21015
21317
|
this.extractionQueueCoordinator.stopAccepting();
|
|
21016
21318
|
if (this.wearablesAutoSyncHandle) {
|
|
@@ -21649,7 +21951,7 @@ var Orchestrator = class {
|
|
|
21649
21951
|
utilityPromoteThresholdDelta: this.utilityRuntimeValues?.promoteThresholdDelta ?? 0,
|
|
21650
21952
|
utilityDemoteThresholdDelta: this.utilityRuntimeValues?.demoteThresholdDelta ?? 0
|
|
21651
21953
|
};
|
|
21652
|
-
return
|
|
21954
|
+
return createHash9("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 12);
|
|
21653
21955
|
}
|
|
21654
21956
|
effectiveLifecycleThresholds() {
|
|
21655
21957
|
const archiveDecayThreshold = this.config.lifecycleArchiveDecayThreshold;
|
|
@@ -27403,7 +27705,12 @@ async function runTimelineCliCommand(deps, args, io) {
|
|
|
27403
27705
|
io.stderr.write("timeline publish requires the Remnic config \u2014 run `remnic doctor`\n");
|
|
27404
27706
|
return 1;
|
|
27405
27707
|
}
|
|
27406
|
-
const publishFlags = parseFlags(rest, PUBLISH_FLAGS)
|
|
27708
|
+
const { flags: publishFlags, positional } = parseFlags(rest, PUBLISH_FLAGS);
|
|
27709
|
+
if (positional.length > 0) {
|
|
27710
|
+
throw new TypeError(
|
|
27711
|
+
`timeline publish takes no positional arguments (got ${JSON.stringify(positional.join(" "))})`
|
|
27712
|
+
);
|
|
27713
|
+
}
|
|
27407
27714
|
return runTimelinePublishCli(
|
|
27408
27715
|
deps.config,
|
|
27409
27716
|
{
|
|
@@ -28481,7 +28788,7 @@ function readVerifiedDailyNote(root, filePath) {
|
|
|
28481
28788
|
}
|
|
28482
28789
|
|
|
28483
28790
|
// src/activity/journal-state.ts
|
|
28484
|
-
import { createHash as
|
|
28791
|
+
import { createHash as createHash10, randomBytes as randomBytes4 } from "crypto";
|
|
28485
28792
|
import { mkdirSync as mkdirSync2, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
28486
28793
|
import path35 from "path";
|
|
28487
28794
|
var STATE_DIR_NAME = "state";
|
|
@@ -28490,7 +28797,7 @@ function timelineStatePath(memoryDir) {
|
|
|
28490
28797
|
return path35.join(memoryDir, STATE_DIR_NAME, STATE_FILE_NAME);
|
|
28491
28798
|
}
|
|
28492
28799
|
function hashJournalText(text) {
|
|
28493
|
-
return
|
|
28800
|
+
return createHash10("sha256").update(text, "utf8").digest("hex");
|
|
28494
28801
|
}
|
|
28495
28802
|
function readTimelineState(memoryDir) {
|
|
28496
28803
|
const filePath = timelineStatePath(memoryDir);
|
|
@@ -29211,31 +29518,6 @@ function filterPrivacyWindow(items, options) {
|
|
|
29211
29518
|
});
|
|
29212
29519
|
}
|
|
29213
29520
|
|
|
29214
|
-
// src/activity/vault-frontmatter.ts
|
|
29215
|
-
function assertNoNewlineKey(key) {
|
|
29216
|
-
if (key.includes("\n") || key.includes("\r")) {
|
|
29217
|
-
throw new RangeError("Vault frontmatter keys must not contain newlines.");
|
|
29218
|
-
}
|
|
29219
|
-
}
|
|
29220
|
-
function applyVaultFrontmatter(existingYaml, updates) {
|
|
29221
|
-
const entries = Object.entries(updates);
|
|
29222
|
-
if (entries.length === 0) return existingYaml;
|
|
29223
|
-
const merged = /* @__PURE__ */ new Map();
|
|
29224
|
-
for (const line of existingYaml.split("\n")) {
|
|
29225
|
-
const idx = line.indexOf(":");
|
|
29226
|
-
if (idx === -1) continue;
|
|
29227
|
-
const key = line.slice(0, idx).trim();
|
|
29228
|
-
if (key.length === 0) continue;
|
|
29229
|
-
assertNoNewlineKey(key);
|
|
29230
|
-
merged.set(key, line.slice(idx + 1).trim());
|
|
29231
|
-
}
|
|
29232
|
-
for (const [key, value] of entries) {
|
|
29233
|
-
assertNoNewlineKey(key);
|
|
29234
|
-
merged.set(key, value);
|
|
29235
|
-
}
|
|
29236
|
-
return [...merged.keys()].sort((a, b) => a < b ? -1 : a > b ? 1 : 0).map((key) => `${key}: ${merged.get(key)}`).join("\n");
|
|
29237
|
-
}
|
|
29238
|
-
|
|
29239
29521
|
// src/activity/vault-wikilink.ts
|
|
29240
29522
|
import path36 from "path";
|
|
29241
29523
|
function formatVaultWikilink(notePath) {
|
|
@@ -29335,8 +29617,8 @@ function planVaultDryRun(inputs) {
|
|
|
29335
29617
|
}
|
|
29336
29618
|
|
|
29337
29619
|
// src/session-summaries/index.ts
|
|
29338
|
-
import { createHash as
|
|
29339
|
-
import { lstat as lstat3, mkdir as mkdir7, readFile as
|
|
29620
|
+
import { createHash as createHash11 } from "crypto";
|
|
29621
|
+
import { lstat as lstat3, mkdir as mkdir7, readFile as readFile9, readdir as readdir4, rename, rm, stat as stat4, writeFile as writeFile7 } from "fs/promises";
|
|
29340
29622
|
import path38 from "path";
|
|
29341
29623
|
|
|
29342
29624
|
// src/session-summaries/adapters.ts
|
|
@@ -29837,7 +30119,7 @@ var DEFAULT_MAX_FILES = 5e3;
|
|
|
29837
30119
|
var DEFAULT_MAX_SESSIONS = 500;
|
|
29838
30120
|
var SUPPORTED_EXTENSIONS = /* @__PURE__ */ new Set([".json", ".jsonl"]);
|
|
29839
30121
|
function shortHash(value, length = 16) {
|
|
29840
|
-
return
|
|
30122
|
+
return createHash11("sha256").update(value).digest("hex").slice(0, length);
|
|
29841
30123
|
}
|
|
29842
30124
|
async function listTranscriptFiles(root, maxFiles) {
|
|
29843
30125
|
const out = [];
|
|
@@ -30031,7 +30313,7 @@ async function collectLocalSessionSummaries(options) {
|
|
|
30031
30313
|
});
|
|
30032
30314
|
}
|
|
30033
30315
|
for (const filePath of files) {
|
|
30034
|
-
const content = await
|
|
30316
|
+
const content = await readFile9(filePath, "utf-8");
|
|
30035
30317
|
const fileHash = shortHash(content, 24);
|
|
30036
30318
|
if (seenFileHashes.has(fileHash)) {
|
|
30037
30319
|
warnings.push({
|
|
@@ -30102,7 +30384,7 @@ async function collectLocalSessionSummaries(options) {
|
|
|
30102
30384
|
}
|
|
30103
30385
|
async function readRedactionConfig(pathLike) {
|
|
30104
30386
|
if (!pathLike) return void 0;
|
|
30105
|
-
const raw = await
|
|
30387
|
+
const raw = await readFile9(path38.resolve(expandTildePath(pathLike)), "utf-8");
|
|
30106
30388
|
const parsed = JSON.parse(raw);
|
|
30107
30389
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
30108
30390
|
throw new Error("redaction config must be a JSON object");
|
|
@@ -30175,7 +30457,7 @@ async function runLocalSessionSummaryCliCommand(options) {
|
|
|
30175
30457
|
}
|
|
30176
30458
|
|
|
30177
30459
|
// src/transfer/capsule-fork.ts
|
|
30178
|
-
import { lstat as lstat4, mkdir as mkdir8, readFile as
|
|
30460
|
+
import { lstat as lstat4, mkdir as mkdir8, readFile as readFile10, realpath as realpath3, writeFile as writeFile8 } from "fs/promises";
|
|
30179
30461
|
import path39 from "path";
|
|
30180
30462
|
async function forkCapsule(opts) {
|
|
30181
30463
|
validateForkId(opts.forkId);
|
|
@@ -30237,7 +30519,7 @@ async function readForkLineage(targetRoot, forkId) {
|
|
|
30237
30519
|
if (!await isLineagePathContained(rootReal, lineagePath)) {
|
|
30238
30520
|
return null;
|
|
30239
30521
|
}
|
|
30240
|
-
const raw = await
|
|
30522
|
+
const raw = await readFile10(lineagePath, "utf-8").catch(() => null);
|
|
30241
30523
|
if (raw === null) return null;
|
|
30242
30524
|
try {
|
|
30243
30525
|
const parsed = JSON.parse(raw);
|
|
@@ -30431,7 +30713,6 @@ export {
|
|
|
30431
30713
|
ACTIVITY_FEATURE_GATES,
|
|
30432
30714
|
resolveActivityGates,
|
|
30433
30715
|
filterPrivacyWindow,
|
|
30434
|
-
applyVaultFrontmatter,
|
|
30435
30716
|
formatVaultWikilink,
|
|
30436
30717
|
stripVaultMdSuffix,
|
|
30437
30718
|
joinVaultSegments,
|
|
@@ -30467,6 +30748,7 @@ export {
|
|
|
30467
30748
|
mergeGraphExpandedResults,
|
|
30468
30749
|
graphPathRelativeToStorage,
|
|
30469
30750
|
blendGraphExpandedRecallScore,
|
|
30751
|
+
qmdStartupCollectionChecksWithTimeout,
|
|
30470
30752
|
Orchestrator
|
|
30471
30753
|
};
|
|
30472
|
-
//# sourceMappingURL=chunk-
|
|
30754
|
+
//# sourceMappingURL=chunk-UZ6JYPJ6.js.map
|