@remnic/core 9.69.32 → 9.69.34
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 +13 -11
- package/dist/access-admin-ops-surface.js +64 -59
- package/dist/access-authorization-probe.d.ts +13 -11
- package/dist/access-authorization-probe.js +65 -60
- package/dist/access-boundary.d.ts +13 -11
- package/dist/access-boundary.js +64 -59
- package/dist/access-cli.js +140 -136
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +2 -1
- package/dist/access-coding-context-resolution.js +3 -3
- package/dist/access-extraction-force-flush.d.ts +13 -11
- package/dist/access-extraction-force-flush.js +64 -59
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-briefing.d.ts +13 -11
- package/dist/access-http-briefing.js +65 -60
- package/dist/access-http-lcm-compaction.d.ts +13 -11
- package/dist/access-http-lifecycle-flush.d.ts +13 -11
- package/dist/access-http-offline-stream.d.ts +13 -11
- package/dist/access-http-query.d.ts +3 -2
- package/dist/access-http-query.js +66 -61
- package/dist/access-http.d.ts +14 -12
- package/dist/access-http.js +86 -82
- package/dist/access-identity-continuity-surface.d.ts +11 -9
- package/dist/access-identity-continuity-surface.js +64 -59
- package/dist/access-lcm-surface.d.ts +13 -11
- package/dist/access-lcm-surface.js +64 -59
- package/dist/access-mcp.d.ts +13 -11
- package/dist/access-mcp.js +73 -69
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-BsvmyENS.d.ts → access-namespace-preflight-kXG8MvYx.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +4 -3
- package/dist/access-namespace-preflight.js +64 -59
- package/dist/access-observe-transcript.d.ts +11 -9
- package/dist/access-observe-transcript.js +3 -3
- package/dist/access-observe-write-surface.d.ts +15 -13
- package/dist/access-observe-write-surface.js +64 -59
- package/dist/access-offline-manifest.d.ts +47 -11
- package/dist/access-offline-manifest.js +18 -16
- package/dist/access-operations-batch.js +67 -63
- package/dist/access-operations.d.ts +18 -16
- package/dist/access-operations.js +72 -68
- package/dist/access-recall-concurrency.d.ts +13 -11
- package/dist/access-recall-concurrency.js +64 -59
- package/dist/access-recall-response.d.ts +13 -11
- package/dist/access-recall-response.js +64 -59
- package/dist/access-recall-surface.d.ts +13 -11
- package/dist/access-recall-surface.js +64 -59
- package/dist/access-schema.d.ts +138 -96
- package/dist/access-schema.js +15 -1
- package/dist/{access-service-CCpOuS46.d.ts → access-service-WUm2LnXZ.d.ts} +110 -108
- package/dist/access-service-helpers.d.ts +13 -11
- package/dist/access-service.d.ts +13 -11
- package/dist/access-service.js +64 -59
- package/dist/access-surface-catalog.d.ts +13 -11
- package/dist/access-surface-catalog.js +66 -61
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +4 -3
- package/dist/action-confidence.d.ts +2 -1
- package/dist/active-memory-bridge.d.ts +2 -1
- package/dist/active-memory-bridge.js +2 -2
- package/dist/active-recall.d.ts +2 -1
- package/dist/active-recall.js +14 -12
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +56 -0
- package/dist/activity/digest.js +32 -0
- package/dist/adapters/index.d.ts +46 -1
- package/dist/adapters/index.js +13 -9
- package/dist/adapters/registry.js +3 -3
- package/dist/ambient-provenance.d.ts +2 -1
- package/dist/artifact-search.d.ts +2 -1
- package/dist/{auto-sync-NSHLUAQI.js → auto-sync-4YFATLFQ.js} +10 -9
- package/dist/{auto-sync-NSHLUAQI.js.map → auto-sync-4YFATLFQ.js.map} +1 -1
- package/dist/behavior-learner.d.ts +2 -1
- package/dist/behavior-signals.d.ts +2 -1
- package/dist/bootstrap.d.ts +11 -9
- package/dist/briefing-window.d.ts +3 -2
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +28 -27
- package/dist/buffer-surprise-report.d.ts +2 -1
- package/dist/buffer-turn-helpers.d.ts +2 -1
- package/dist/buffer.d.ts +3 -2
- package/dist/buffer.js +12 -11
- package/dist/bulk-import/index.d.ts +4 -3
- package/dist/calibration.d.ts +2 -1
- package/dist/calibration.js +3 -2
- package/dist/calibration.js.map +1 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/{capsule-merge-IPG4IOFP.js → capsule-merge-ZCXUPLNJ.js} +2 -2
- package/dist/{catalog-CDZLyiXL.d.ts → catalog-BaCx29iv.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +2 -1
- package/dist/causal-consolidation.d.ts +2 -1
- package/dist/causal-consolidation.js +29 -28
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +2 -1
- package/dist/{chunk-CDKHKZL5.js → chunk-2524MOWK.js} +2 -2
- package/dist/{chunk-HVAEXYPL.js → chunk-255PC37A.js} +47 -25
- package/dist/chunk-255PC37A.js.map +1 -0
- package/dist/{chunk-IY2FVXM6.js → chunk-2AU4D4HQ.js} +3 -3
- package/dist/{chunk-QDY6KYTN.js → chunk-2JCA2PQT.js} +3 -3
- package/dist/{chunk-RSVEP77Y.js → chunk-2UZ5ZH6W.js} +3 -3
- package/dist/{chunk-XQ2Q43XD.js → chunk-326KUXIR.js} +15 -648
- package/dist/chunk-326KUXIR.js.map +1 -0
- package/dist/{chunk-NWWXSJX5.js → chunk-34QW2LK2.js} +2 -2
- package/dist/{chunk-S7DPKM5W.js → chunk-353C5UNV.js} +1 -1
- package/dist/{chunk-GQOMZ3MK.js → chunk-36UBSLFN.js} +2 -2
- package/dist/{chunk-DBQWVT2H.js → chunk-3CBI2ZSA.js} +2 -2
- package/dist/{chunk-NZXEK3UF.js → chunk-3Q3N35W7.js} +2 -2
- package/dist/{chunk-YYGZJPOK.js → chunk-42DJ235G.js} +2 -2
- package/dist/{chunk-7VJXIDOC.js → chunk-4JVQRFZD.js} +9 -9
- package/dist/{chunk-22FVR2KE.js → chunk-4MIS4CQW.js} +6 -2
- package/dist/chunk-4MIS4CQW.js.map +1 -0
- package/dist/{chunk-WHBVXTUI.js → chunk-4PB2MBY6.js} +9 -9
- package/dist/{chunk-TEYN7ZYF.js → chunk-4WCNPQQ5.js} +4 -4
- package/dist/{chunk-Z4PCVRTN.js → chunk-5A7ZUOBA.js} +217 -396
- package/dist/chunk-5A7ZUOBA.js.map +1 -0
- package/dist/chunk-5HYUUFMQ.js +1280 -0
- package/dist/chunk-5HYUUFMQ.js.map +1 -0
- package/dist/{chunk-RBGREYVJ.js → chunk-5QBDLMGG.js} +2 -2
- package/dist/{chunk-RKBLRTNT.js → chunk-5SDSVX7N.js} +2 -2
- package/dist/{chunk-LPECRQO4.js → chunk-5THU7NFP.js} +3 -3
- package/dist/{chunk-N7RWREIQ.js → chunk-65RENJGB.js} +6 -1
- package/dist/chunk-65RENJGB.js.map +1 -0
- package/dist/{chunk-LWA7MDVO.js → chunk-6CCRSQWT.js} +2 -2
- package/dist/{chunk-TIT2C6WX.js → chunk-6XYC7NM4.js} +2 -2
- package/dist/{chunk-FHQSPTPZ.js → chunk-6YAIN5XJ.js} +2 -2
- package/dist/{chunk-PV36INNL.js → chunk-757NP436.js} +3 -3
- package/dist/{chunk-WJBZMNNS.js → chunk-7CAY3YKP.js} +742 -29
- package/dist/chunk-7CAY3YKP.js.map +1 -0
- package/dist/{chunk-6H5JYDOM.js → chunk-7J2CGXG3.js} +2 -2
- package/dist/{chunk-FBMYGNOC.js → chunk-A2YQL2FF.js} +6 -6
- package/dist/chunk-A5UQ52YQ.js +211 -0
- package/dist/chunk-A5UQ52YQ.js.map +1 -0
- package/dist/{chunk-X2NFFBTO.js → chunk-A7GQBJP5.js} +4 -4
- package/dist/{chunk-MPYD657E.js → chunk-A7WOWDZK.js} +2 -2
- package/dist/{chunk-C4OTC6WY.js → chunk-AIKTQVV3.js} +3 -3
- package/dist/{chunk-CGC5UQCF.js → chunk-AKE4GGQ3.js} +2 -2
- package/dist/{chunk-VP67GZ7T.js → chunk-APFKZVJS.js} +2 -2
- package/dist/{chunk-M75RYSHS.js → chunk-AQIRQUCP.js} +2 -2
- package/dist/{chunk-S7T2TY65.js → chunk-AXFR2NQ5.js} +3 -3
- package/dist/{chunk-PSPABFN2.js → chunk-BD7JTBYP.js} +4 -4
- package/dist/{chunk-FCSZ4K2X.js → chunk-BJJWRWER.js} +3 -3
- package/dist/{chunk-JT3EB7ZL.js → chunk-BNGHPYZU.js} +5 -5
- package/dist/chunk-BRZWWUCJ.js +13 -0
- package/dist/{chunk-FYDW33ZB.js.map → chunk-BRZWWUCJ.js.map} +1 -1
- package/dist/{chunk-MFJBANPX.js → chunk-C2BFTYD7.js} +2 -2
- package/dist/{chunk-3JVLGJCY.js → chunk-C6KRO3SU.js} +2 -2
- package/dist/{chunk-Q3O3VKRB.js → chunk-CRUFVJOX.js} +16 -15
- package/dist/chunk-CRUFVJOX.js.map +1 -0
- package/dist/{chunk-AOCP6JA7.js → chunk-D3IZCN5P.js} +4 -4
- package/dist/{chunk-ROKKIMON.js → chunk-EJIEQOPB.js} +5 -5
- package/dist/{chunk-ET356KSB.js → chunk-F4TWWUMP.js} +2 -2
- package/dist/{chunk-CLLPJ6QT.js → chunk-FQXJAC3T.js} +2 -2
- package/dist/{chunk-DD5JFCWM.js → chunk-GCBIXUPT.js} +2 -2
- package/dist/{chunk-ROGRI25A.js → chunk-I3H5LFOI.js} +2 -2
- package/dist/{chunk-S65WXHNK.js → chunk-IFFLUCCU.js} +2 -2
- package/dist/{chunk-MYMNC6O5.js → chunk-ISYZ5DUI.js} +64 -60
- package/dist/{chunk-MYMNC6O5.js.map → chunk-ISYZ5DUI.js.map} +1 -1
- package/dist/{chunk-D5LORF7A.js → chunk-JZDH2ZZK.js} +3 -3
- package/dist/{chunk-2GPE5UCR.js → chunk-K6IPSW5B.js} +2 -2
- package/dist/{chunk-HG6HXVHQ.js → chunk-KDJHLOZP.js} +10 -10
- package/dist/{chunk-I27RSQRR.js → chunk-KYGOQV37.js} +2 -2
- package/dist/{chunk-JEIXTYVG.js → chunk-L2QLDZJC.js} +46 -17
- package/dist/chunk-L2QLDZJC.js.map +1 -0
- package/dist/{chunk-A7XEPMQ6.js → chunk-LAVJC57X.js} +3 -3
- package/dist/chunk-LAVJC57X.js.map +1 -0
- package/dist/{chunk-VZWXFXLX.js → chunk-LMCD5W5B.js} +2 -2
- package/dist/{chunk-3QQTXYZ6.js → chunk-LSLCFCCQ.js} +2 -1
- package/dist/chunk-LSLCFCCQ.js.map +1 -0
- package/dist/{chunk-MKD3OMPS.js → chunk-M3MYMWXG.js} +2 -2
- package/dist/{chunk-DITMGZOL.js → chunk-MMG5K6XJ.js} +2 -2
- package/dist/{chunk-VGXM5B4H.js → chunk-MNIPH6LD.js} +2 -2
- package/dist/{chunk-CZYYJZB6.js → chunk-ND2O2PVN.js} +1014 -1318
- package/dist/chunk-ND2O2PVN.js.map +1 -0
- package/dist/chunk-NPNSKE76.js +220 -0
- package/dist/chunk-NPNSKE76.js.map +1 -0
- package/dist/{chunk-MKWKYHXJ.js → chunk-OB3XMWX5.js} +4 -4
- package/dist/{chunk-XU6OEECT.js → chunk-OQQXGYMX.js} +3 -3
- package/dist/{chunk-GTWHVXPA.js → chunk-OZUXKUPD.js} +6 -4
- package/dist/{chunk-GTWHVXPA.js.map → chunk-OZUXKUPD.js.map} +1 -1
- package/dist/chunk-PCEYGOSL.js +66 -0
- package/dist/chunk-PCEYGOSL.js.map +1 -0
- package/dist/{chunk-47DEYNMR.js → chunk-PEXW2JCK.js} +2 -2
- package/dist/{chunk-EEOUMG3J.js → chunk-PWPIERBM.js} +38 -6
- package/dist/chunk-PWPIERBM.js.map +1 -0
- package/dist/chunk-Q4AUIFUA.js +111 -0
- package/dist/chunk-Q4AUIFUA.js.map +1 -0
- package/dist/{chunk-SO7SV523.js → chunk-Q6LCCIZN.js} +1 -1
- package/dist/chunk-Q6LCCIZN.js.map +1 -0
- package/dist/{chunk-42SDNZCU.js → chunk-QF4J3KMV.js} +19 -19
- package/dist/{chunk-SB6PSOP7.js → chunk-QLJ6762U.js} +2 -2
- package/dist/{chunk-XOVKXJEP.js → chunk-R3TLVTWW.js} +3 -3
- package/dist/{chunk-PHNAB54Q.js → chunk-RQO3J4MR.js} +2 -2
- package/dist/{chunk-5N53UBH2.js → chunk-RR7G2X7C.js} +5 -5
- package/dist/{chunk-DCJ3YFIC.js → chunk-S2ULTQZR.js} +2 -2
- package/dist/{chunk-GY5WZBA6.js → chunk-S76KRJDG.js} +3 -3
- package/dist/{chunk-H272ZPQ3.js → chunk-SHEHQBCG.js} +124 -23
- package/dist/chunk-SHEHQBCG.js.map +1 -0
- package/dist/{chunk-EEC4PCG5.js → chunk-SZDLX763.js} +2 -2
- package/dist/{chunk-SQJ3SDIW.js → chunk-SZWEDG3H.js} +13 -7
- package/dist/chunk-SZWEDG3H.js.map +1 -0
- package/dist/{chunk-E2ZHGBAK.js → chunk-T2JSUEH6.js} +2 -2
- package/dist/{chunk-QMGXMJ2O.js → chunk-T2YFZ27G.js} +9 -9
- package/dist/{chunk-LEPOP46W.js → chunk-TFA6HPOA.js} +4 -4
- package/dist/{chunk-BA6WOZOT.js → chunk-TK4FHQRN.js} +4 -4
- package/dist/chunk-TLHNF6GA.js +647 -0
- package/dist/chunk-TLHNF6GA.js.map +1 -0
- package/dist/{chunk-ZNJSBIP4.js → chunk-TNSCIPBQ.js} +4 -4
- package/dist/{chunk-YUMDFDUA.js → chunk-TWYTGIBR.js} +4 -4
- package/dist/{chunk-FDLDOEO6.js → chunk-UBG4GAEP.js} +51 -6
- package/dist/chunk-UBG4GAEP.js.map +1 -0
- package/dist/{chunk-EZZV7OQL.js → chunk-UEZKN6VR.js} +2 -2
- package/dist/{chunk-HY55QQD7.js → chunk-UJX4I26O.js} +2 -2
- package/dist/{chunk-BLUYQFRH.js → chunk-VELCIWJZ.js} +15 -11
- package/dist/chunk-VELCIWJZ.js.map +1 -0
- package/dist/{chunk-CBCNKKZD.js → chunk-VIZR45AN.js} +2 -2
- package/dist/{chunk-ZG74PWRW.js → chunk-VZAKYDMJ.js} +2 -2
- package/dist/{chunk-ITPS5DDH.js → chunk-W5BLTZZJ.js} +8 -8
- package/dist/chunk-W6IJMWTZ.js +72 -0
- package/dist/chunk-W6IJMWTZ.js.map +1 -0
- package/dist/{chunk-H3TKENU4.js → chunk-WIKO4SCR.js} +5 -5
- package/dist/{chunk-YFLLGRXO.js → chunk-X2QPKLPL.js} +2 -2
- package/dist/{chunk-FGGYSN4P.js → chunk-X424T5JQ.js} +2 -2
- package/dist/{chunk-NAXDPKVM.js → chunk-XPJNT6PI.js} +4 -4
- package/dist/{chunk-2JVJ7UHC.js → chunk-XQU3CPF2.js} +4 -2
- package/dist/chunk-XQU3CPF2.js.map +1 -0
- package/dist/chunk-XW2T4QAW.js +1 -0
- package/dist/{chunk-VED2YHUD.js → chunk-YEDVOYL2.js} +2 -2
- package/dist/{chunk-TLPZ6MKZ.js → chunk-YEN4TREG.js} +541 -5
- package/dist/chunk-YEN4TREG.js.map +1 -0
- package/dist/{chunk-RC5DXXWC.js → chunk-YM7YN37H.js} +2 -2
- package/dist/{chunk-VLXBE57O.js → chunk-YVGXH72Y.js} +2 -2
- package/dist/{chunk-YQAXP5AC.js → chunk-YXLUTALO.js} +5 -5
- package/dist/{chunk-565C6ZFO.js → chunk-Z7YDVHDI.js} +2 -2
- package/dist/{chunk-O75CRYGF.js → chunk-ZEFVK7XC.js} +1 -1
- package/dist/chunk-ZEFVK7XC.js.map +1 -0
- package/dist/{chunk-XUE46UYW.js → chunk-ZLN7AROH.js} +6 -6
- package/dist/{chunk-GVG3JYBI.js → chunk-ZMKYCFJ7.js} +640 -199
- package/dist/chunk-ZMKYCFJ7.js.map +1 -0
- package/dist/{chunk-HK32G473.js → chunk-ZWEZXVYH.js} +2 -2
- package/dist/{cli-NEEdq5Rt.d.ts → cli-5mTYh1Tn.d.ts} +5 -5
- package/dist/cli-fallback.d.ts +11 -4
- package/dist/cli-fallback.js +5 -1
- package/dist/cli.d.ts +15 -13
- package/dist/cli.js +110 -106
- package/dist/coding/export-okf-codegraph.d.ts +2 -1
- package/dist/coding/export-okf-codegraph.js +34 -32
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/coding/pre-action-gate.d.ts +2 -1
- package/dist/compat/checks.js +2 -2
- package/dist/compat/codex-cli-fallback.d.ts +1 -1
- package/dist/compat/codex-cli-fallback.js +5 -1
- package/dist/compat/codex-cli-fallback.js.map +1 -1
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +29 -28
- package/dist/compounding/preference-consolidator.d.ts +2 -1
- package/dist/compression-optimizer.d.ts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/config.js +14 -12
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +28 -27
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +30 -29
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/contradiction/index.d.ts +4 -3
- package/dist/contradiction/index.js +5 -5
- package/dist/{contradiction-scan-NOYMFG66.js → contradiction-scan-GVD4JJ7B.js} +3 -3
- package/dist/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +3 -2
- package/dist/convergence-refresh.js +30 -29
- package/dist/conversation-index/backend.d.ts +2 -1
- package/dist/conversation-index/backend.js +3 -3
- package/dist/conversation-index/chunker.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.js +2 -2
- package/dist/conversation-index/indexer.d.ts +2 -1
- package/dist/conversation-index/search.d.ts +2 -1
- package/dist/corpus-watermark.d.ts +2 -1
- package/dist/corpus-watermark.js +31 -30
- package/dist/cross-lingual-recall.d.ts +2 -1
- package/dist/day-summary.d.ts +2 -1
- package/dist/deep-recall-http-glue.d.ts +13 -11
- package/dist/deep-recall-http-glue.js +12 -2
- package/dist/deep-recall-mcp-tools.d.ts +13 -11
- package/dist/deep-recall-policy-llm.d.ts +2 -1
- package/dist/deep-recall-policy-llm.js +4 -3
- package/dist/deep-recall-seeds.d.ts +2 -1
- package/dist/delinearize.d.ts +2 -1
- package/dist/dependency-propagation-config.d.ts +2 -1
- package/dist/{dependency-propagation-delivery-CQPCu0o5.d.ts → dependency-propagation-delivery-CDQCxNll.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +2 -1
- package/dist/direct-answer.d.ts +2 -1
- package/dist/embedding-fallback.d.ts +2 -1
- package/dist/enrichment/index.d.ts +2 -1
- package/dist/entity-origin-fields.d.ts +2 -1
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +28 -27
- package/dist/entity-schema.d.ts +2 -1
- package/dist/episodic-context.d.ts +2 -1
- package/dist/eval-trajectory-contracts.d.ts +2 -1
- package/dist/eval-trajectory-store.d.ts +2 -1
- package/dist/eval-trajectory.d.ts +2 -1
- package/dist/explicit-capture.d.ts +11 -9
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.d.ts +13 -11
- package/dist/external-wiki-access.js +65 -60
- package/dist/external-wiki-collection-registration.d.ts +2 -1
- package/dist/external-wiki-collection.d.ts +2 -1
- package/dist/external-wiki-mcp-tools.d.ts +13 -11
- package/dist/extraction-error-classification.d.ts +2 -1
- package/dist/extraction-faithfulness.d.ts +2 -1
- package/dist/extraction-faithfulness.js +4 -3
- package/dist/extraction-judge-telemetry.d.ts +2 -1
- package/dist/extraction-judge-training.d.ts +2 -1
- package/dist/extraction-judge.d.ts +2 -1
- package/dist/extraction-judge.js +5 -4
- package/dist/extraction-liveness.d.ts +2 -1
- package/dist/extraction-normalization.d.ts +2 -1
- package/dist/extraction-prompt.d.ts +2 -1
- package/dist/extraction-source-grounding-rules.d.ts +2 -1
- package/dist/extraction-source-grounding.d.ts +2 -1
- package/dist/extraction.d.ts +2 -1
- package/dist/extraction.js +40 -38
- package/dist/fallback-llm.d.ts +2 -1
- package/dist/fallback-llm.js +3 -2
- package/dist/{first-start-migration-RC345GPL.js → first-start-migration-L3UFX5CU.js} +3 -3
- package/dist/generic-recall-paths-CqAZyXKX.d.ts +23 -0
- package/dist/graph-append-error.d.ts +2 -1
- package/dist/graph-dashboard-diff.d.ts +2 -1
- package/dist/graph-dashboard-key.d.ts +2 -1
- package/dist/graph-dashboard-parser.d.ts +2 -1
- package/dist/graph-edge-reinforcement.d.ts +2 -1
- package/dist/graph-jsonl.d.ts +2 -1
- package/dist/graph-path-reconstruction.d.ts +2 -1
- package/dist/graph-path-scoring.d.ts +2 -1
- package/dist/graph-snapshot.d.ts +2 -1
- package/dist/graph.d.ts +2 -1
- package/dist/harmonic-retrieval.js +2 -2
- package/dist/importance.d.ts +2 -1
- package/dist/importers/index.d.ts +2 -1
- package/dist/importers/test-utils.d.ts +2 -1
- package/dist/in-flight-reads.d.ts +2 -1
- package/dist/{index-C9VXenR8.d.ts → index-BNluTxBp.d.ts} +2 -2
- package/dist/index.d.ts +963 -945
- package/dist/index.js +323 -221
- package/dist/intent.d.ts +2 -1
- package/dist/lcm/engine.d.ts +2 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +2 -1
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/tools.d.ts +2 -1
- package/dist/lifecycle.d.ts +2 -1
- package/dist/live-connectors-runner.d.ts +2 -1
- package/dist/local-llm.d.ts +4 -1
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +2 -1
- package/dist/location/index.d.ts +4 -3
- package/dist/location/index.js +33 -32
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +28 -27
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +28 -27
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +29 -28
- package/dist/{maintenance-C14sorKa.d.ts → maintenance-8hmWOMY_.d.ts} +378 -4
- package/dist/mcp-memory-inspector-app.d.ts +13 -11
- package/dist/memory-action-policy.d.ts +2 -1
- package/dist/memory-cache.d.ts +2 -1
- package/dist/memory-controller.d.ts +2 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
- package/dist/memory-projection-store.d.ts +2 -1
- package/dist/memory-provenance.d.ts +2 -1
- package/dist/memory-snapshot.d.ts +2 -1
- package/dist/memory-subject-cli.d.ts +13 -11
- package/dist/memory-subject.d.ts +13 -11
- package/dist/memory-worth-outcomes.d.ts +3 -2
- package/dist/migrate/from-engram.js +2 -2
- package/dist/models-json.d.ts +2 -1
- package/dist/namespaces/migrate.d.ts +4 -3
- package/dist/namespaces/migrate.js +29 -28
- package/dist/namespaces/principal.d.ts +2 -1
- package/dist/namespaces/search.d.ts +2 -1
- package/dist/namespaces/search.js +11 -11
- package/dist/namespaces/storage.d.ts +4 -3
- package/dist/namespaces/storage.js +28 -27
- package/dist/native-knowledge.d.ts +2 -1
- package/dist/network/tailscale.js +2 -2
- package/dist/offline-sync-impression-drain.d.ts +2 -1
- package/dist/offline-sync-impression-drain.js +6 -6
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +32 -31
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +48 -46
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +47 -42
- package/dist/{orchestrator-kqSzGv7e.d.ts → orchestrator-BUd_3Q86.d.ts} +17 -29
- package/dist/orchestrator.d.ts +11 -9
- package/dist/orchestrator.js +144 -138
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-DRUwHb1X.d.ts → pipeline-Dv1Bv0ma.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +2 -1
- package/dist/proactive-contention.d.ts +2 -1
- package/dist/provenance.d.ts +2 -1
- package/dist/{public-http-CW3l0g3P.d.ts → public-http-L-IymRBN.d.ts} +1 -1
- package/dist/{qmd-BVWlg1YS.d.ts → qmd-Mj508lHA.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +3 -2
- package/dist/qmd-recall-cache.d.ts +2 -1
- package/dist/qmd.d.ts +3 -2
- package/dist/qmd.js +2 -2
- package/dist/recall-concurrency-config.d.ts +2 -1
- package/dist/recall-disclosure-escalation.d.ts +2 -1
- package/dist/recall-explain-renderer.d.ts +2 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +2 -1
- package/dist/recall-navigate-access.d.ts +2 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +2 -1
- package/dist/recall-navigate-disclosure.js +1 -1
- package/dist/recall-navigate.d.ts +2 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-planner-llm.d.ts +2 -1
- package/dist/recall-planner-llm.js +3 -2
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.d.ts +56 -0
- package/dist/recall-state-view-admission.js +39 -0
- package/dist/recall-state-view-admission.js.map +1 -0
- package/dist/recall-state-view-inject.js +2 -2
- package/dist/recall-state-view-render.js +2 -2
- package/dist/recall-state-view-widen.d.ts +18 -1
- package/dist/recall-state-view-widen.js +2 -2
- package/dist/recall-state-view-wire.d.ts +1 -1
- 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 +2 -1
- package/dist/recall-tag-filter.d.ts +2 -1
- package/dist/recall-timings.d.ts +2 -1
- package/dist/recall-xray-cli.d.ts +2 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +2 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +9 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +11 -2
- package/dist/reconcile/cursor.js +6 -4
- package/dist/reconcile/cursor.js.map +1 -1
- package/dist/reconcile/manifest.d.ts +37 -2
- package/dist/reconcile/manifest.js +15 -5
- package/dist/reconcile/plan.d.ts +2 -1
- package/dist/replay/normalizers/chatgpt.d.ts +2 -1
- package/dist/replay/normalizers/claude.d.ts +2 -1
- package/dist/replay/normalizers/openclaw.d.ts +2 -1
- package/dist/replay/normalizers/shared.d.ts +2 -1
- package/dist/replay/runner.d.ts +2 -1
- package/dist/replay/types.d.ts +2 -1
- package/dist/replica-divergence.d.ts +2 -1
- package/dist/replica-peers-config.d.ts +2 -1
- package/dist/{resolution-VKATP2HT.js → resolution-OHJZG45O.js} +6 -6
- package/dist/resolution-OHJZG45O.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +15 -13
- package/dist/retrieval-agents.d.ts +3 -2
- package/dist/retrieval-tiers.d.ts +2 -1
- package/dist/routing/engine.d.ts +2 -1
- package/dist/routing/store.d.ts +2 -1
- package/dist/runtime/child-process.d.ts +1 -1
- package/dist/runtime/child-process.js +1 -1
- package/dist/salvage-envelope.d.ts +2 -1
- package/dist/salvage-envelope.js +2 -2
- package/dist/schemas.d.ts +176 -176
- package/dist/{scope-profiles-Vl00B1KU.d.ts → scope-profiles-B6BGVbxm.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +2 -1
- package/dist/search/factory.d.ts +2 -1
- package/dist/search/factory.js +10 -10
- package/dist/search/index.d.ts +2 -1
- package/dist/search/index.js +14 -14
- package/dist/search/lancedb-backend.d.ts +2 -1
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.d.ts +2 -1
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/orama-backend.d.ts +2 -1
- package/dist/search/orama-backend.js +2 -2
- package/dist/search/port.d.ts +2 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/{semantic-consolidation-BC9-GFuT.d.ts → semantic-consolidation-J-598F5M.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +29 -28
- package/dist/semantic-rule-promotion.js +28 -27
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +28 -27
- package/dist/{service-BOy6dHfc.d.ts → service-ZQkJ52cz.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +2 -1
- package/dist/session-observer-state.d.ts +2 -1
- package/dist/shared-context/manager.d.ts +8 -7
- package/dist/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +38 -36
- package/dist/standup/build.js +29 -28
- package/dist/{storage-BLJRnFi6.d.ts → storage-CU_hZUgP.d.ts} +67 -6
- package/dist/storage.d.ts +4 -3
- package/dist/storage.js +27 -26
- package/dist/subject-config.d.ts +2 -1
- package/dist/subject-config.js +2 -2
- package/dist/summarizer.d.ts +2 -1
- package/dist/summarizer.js +5 -5
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/support-passport/index.d.ts +49 -15
- package/dist/support-passport/index.js +72 -63
- package/dist/temporal-supersession.d.ts +3 -2
- package/dist/temporal-timeline-recall.d.ts +2 -1
- package/dist/temporal-validity.d.ts +2 -1
- package/dist/threading.d.ts +2 -1
- package/dist/tier-migration.d.ts +3 -2
- package/dist/tier-routing.d.ts +2 -1
- package/dist/tier-routing.js +2 -2
- package/dist/{tier-stats-KA6OZX2C.js → tier-stats-VK5PCO2L.js} +3 -3
- package/dist/topics.d.ts +2 -1
- package/dist/transcript.d.ts +2 -1
- package/dist/transfer/capsule-import.js +1 -1
- package/dist/transfer/export-okf.d.ts +2 -1
- package/dist/transfer/export-okf.js +29 -28
- package/dist/transfer/types.d.ts +102 -102
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/{types-YY-eKKU7.d.ts → types-BGxTvLBO.d.ts} +58 -13
- package/dist/types.d.ts +2 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +2 -1
- package/dist/verified-recall.js +28 -27
- package/dist/who-knows-cli.d.ts +13 -11
- package/dist/who-knows-cli.js +29 -28
- package/dist/who-knows.d.ts +13 -11
- package/dist/who-knows.js +28 -27
- package/dist/write-envelope.d.ts +4 -2
- package/dist/write-envelope.js +3 -1
- package/package.json +12 -2
- package/src/access-category-alias.test.ts +216 -0
- package/src/access-mcp.test.ts +73 -0
- package/src/access-mcp.ts +6 -6
- package/src/access-observe-write-surface.ts +19 -4
- package/src/access-offline-manifest.ts +297 -16
- package/src/access-recall-surface.ts +5 -5
- package/src/access-schema.ts +76 -7
- package/src/access-service.ts +11 -2
- package/src/activity/config.test.ts +124 -1
- package/src/activity/config.ts +150 -18
- package/src/activity/index.ts +3 -0
- package/src/activity/journal-extract-storage.test.ts +129 -0
- package/src/activity/journal-extract.test.ts +314 -0
- package/src/activity/journal-extract.ts +247 -0
- package/src/activity/journal-heading.test.ts +24 -1
- package/src/activity/journal-heading.ts +36 -0
- package/src/activity/journal-read.test.ts +242 -0
- package/src/activity/journal-read.ts +183 -0
- package/src/activity/journal-source.test.ts +15 -15
- package/src/activity/journal-source.ts +21 -14
- package/src/activity/journal-state.lock-worker.ts +30 -0
- package/src/activity/journal-state.test.ts +144 -0
- package/src/activity/journal-state.ts +107 -0
- package/src/activity/journal-strip.test.ts +106 -52
- package/src/activity/journal-strip.ts +35 -10
- package/src/activity/journal-vault-integration.test.ts +230 -0
- package/src/activity/journal-vault-provenance.test.ts +9 -7
- package/src/activity/journal-vault-provenance.ts +4 -10
- package/src/activity/journal-vault-read.test.ts +3 -2
- package/src/activity/journal-vault-read.ts +9 -139
- package/src/activity/journal.test.ts +74 -23
- package/src/activity/runner.test.ts +116 -1
- package/src/activity/runner.ts +25 -0
- package/src/activity/scheduler.ts +4 -0
- package/src/activity/store.test.ts +18 -0
- package/src/activity/store.ts +14 -0
- package/src/activity/sync-registration.ts +4 -0
- package/src/activity/timeline/analysis-metadata.ts +2 -0
- package/src/activity/timeline/analysis-provider.ts +140 -0
- package/src/activity/timeline/analysis-run.test.ts +419 -0
- package/src/activity/timeline/analysis-run.ts +106 -0
- package/src/activity/timeline/analysis.ts +66 -37
- package/src/activity/timeline/corrections.ts +9 -0
- package/src/activity/timeline/index.ts +3 -0
- package/src/activity/timeline/query.test.ts +71 -0
- package/src/activity/timeline/query.ts +57 -8
- package/src/activity/timeline/regenerate.test.ts +505 -0
- package/src/activity/timeline/regenerate.ts +373 -0
- package/src/activity/types.ts +40 -5
- package/src/adapters/grok-opencode.test.ts +146 -0
- package/src/adapters/grok.ts +53 -0
- package/src/adapters/index.ts +2 -0
- package/src/adapters/opencode.ts +52 -0
- package/src/adapters/registry.ts +4 -0
- package/src/cli-fallback.ts +13 -4
- package/src/config.test.ts +3 -1
- package/src/config.ts +4 -0
- package/src/dedup/merge.test.ts +732 -25
- package/src/fallback-llm.test.ts +53 -0
- package/src/fallback-llm.ts +12 -0
- package/src/index.ts +2 -0
- package/src/local-llm.ts +3 -1
- package/src/orchestration/dependency-propagation-recovery-replay.ts +1 -1
- package/src/orchestration/extraction-persist-deps.ts +9 -0
- package/src/orchestration/extraction-persist-promotion.test.ts +265 -6
- package/src/orchestration/extraction-persist-promotion.ts +42 -3
- package/src/orchestration/extraction-persist.ts +3 -3
- package/src/orchestration/harmonic-construction-persist.test.ts +115 -4
- package/src/orchestration/harmonic-construction-persist.ts +34 -6
- package/src/orchestration/maintenance.ts +1 -0
- package/src/orchestration/orchestrator-helpers.ts +6 -0
- package/src/orchestration/recall-entry.ts +16 -0
- package/src/orchestration/recall-internal-deps.ts +14 -0
- package/src/orchestration/recall-internal.ts +41 -58
- package/src/orchestration/recall-result-formatter.ts +11 -1
- package/src/orchestration/recall-search-pipeline.ts +121 -11
- package/src/orchestration/recall-state-view-pipeline.test.ts +211 -0
- package/src/orchestration/semantic-merge-commit-effects.ts +76 -17
- package/src/orchestration/semantic-merge-persist.ts +121 -16
- package/src/orchestration/semantic-merge-promotion-payload.ts +133 -54
- package/src/orchestrator.ts +7 -35
- package/src/providers/codex-subscription.test.ts +666 -0
- package/src/providers/codex-subscription.ts +743 -0
- package/src/recall-disclosure.test.ts +20 -0
- package/src/recall-state-view-admission.ts +114 -0
- package/src/recall-state-view-asof.test.ts +176 -0
- package/src/recall-state-view-call.test.ts +175 -0
- package/src/recall-state-view-config.test.ts +16 -0
- package/src/recall-state-view-widen.test.ts +70 -0
- package/src/recall-state-view-widen.ts +28 -7
- package/src/recall-state-view-wire.ts +3 -1
- package/src/recall-state-view-zero-diff.test.ts +20 -11
- package/src/recall-state-view.test.ts +142 -0
- package/src/recall-state-view.ts +72 -24
- package/src/recall-xray-renderer.test.ts +27 -0
- package/src/recall-xray-renderer.ts +4 -0
- package/src/recall-xray.ts +13 -0
- package/src/reconcile/cursor.ts +23 -33
- package/src/reconcile/manifest.ts +96 -11
- package/src/reconcile-identity-cache.test.ts +378 -0
- package/src/runtime/child-process.ts +1 -1
- package/src/storage/cas-revision-host.ts +75 -0
- package/src/storage/cas-revision-store.test.ts +459 -0
- package/src/storage/cas-revision-store.ts +661 -0
- package/src/storage/deletion-revision-store.ts +80 -6
- package/src/storage/tombstone-blocked-capture-index.ts +15 -0
- package/src/storage/tombstone-blocked-capture-mutation.ts +67 -7
- package/src/storage/tombstone-blocked-capture-sync.ts +55 -20
- package/src/storage-contract/failure-semantics.test.ts +1 -1
- package/src/storage-frontmatter-cas.test.ts +698 -1
- package/src/storage-replay.test.ts +166 -3
- package/src/storage.ts +41 -41
- package/src/support-passport/card-projection.ts +82 -33
- package/src/temporal-supersession.test.ts +10 -10
- package/src/types.ts +7 -7
- package/src/write-envelope.ts +1 -1
- package/dist/chunk-22FVR2KE.js.map +0 -1
- package/dist/chunk-2JVJ7UHC.js.map +0 -1
- package/dist/chunk-3QQTXYZ6.js.map +0 -1
- package/dist/chunk-4UDQUPT5.js +0 -560
- package/dist/chunk-4UDQUPT5.js.map +0 -1
- package/dist/chunk-A7XEPMQ6.js.map +0 -1
- package/dist/chunk-AU7Q3LSC.js +0 -56
- package/dist/chunk-AU7Q3LSC.js.map +0 -1
- package/dist/chunk-BLUYQFRH.js.map +0 -1
- package/dist/chunk-CZYYJZB6.js.map +0 -1
- package/dist/chunk-EEOUMG3J.js.map +0 -1
- package/dist/chunk-FDLDOEO6.js.map +0 -1
- package/dist/chunk-FYDW33ZB.js +0 -13
- package/dist/chunk-GVG3JYBI.js.map +0 -1
- package/dist/chunk-H272ZPQ3.js.map +0 -1
- package/dist/chunk-HVAEXYPL.js.map +0 -1
- package/dist/chunk-JEIXTYVG.js.map +0 -1
- package/dist/chunk-LRICZIGN.js +0 -52
- package/dist/chunk-LRICZIGN.js.map +0 -1
- package/dist/chunk-N7RWREIQ.js.map +0 -1
- package/dist/chunk-O75CRYGF.js.map +0 -1
- package/dist/chunk-Q3O3VKRB.js.map +0 -1
- package/dist/chunk-SEDEKFYQ.js +0 -1
- package/dist/chunk-SO7SV523.js.map +0 -1
- package/dist/chunk-SQJ3SDIW.js.map +0 -1
- package/dist/chunk-TLPZ6MKZ.js.map +0 -1
- package/dist/chunk-WJBZMNNS.js.map +0 -1
- package/dist/chunk-XQ2Q43XD.js.map +0 -1
- package/dist/chunk-Z4PCVRTN.js.map +0 -1
- package/src/activity/journal-mode.test.ts +0 -32
- package/src/activity/journal-mode.ts +0 -20
- /package/dist/{chunk-SEDEKFYQ.js.map → activity/digest.js.map} +0 -0
- /package/dist/{capsule-merge-IPG4IOFP.js.map → capsule-merge-ZCXUPLNJ.js.map} +0 -0
- /package/dist/{chunk-CDKHKZL5.js.map → chunk-2524MOWK.js.map} +0 -0
- /package/dist/{chunk-IY2FVXM6.js.map → chunk-2AU4D4HQ.js.map} +0 -0
- /package/dist/{chunk-QDY6KYTN.js.map → chunk-2JCA2PQT.js.map} +0 -0
- /package/dist/{chunk-RSVEP77Y.js.map → chunk-2UZ5ZH6W.js.map} +0 -0
- /package/dist/{chunk-NWWXSJX5.js.map → chunk-34QW2LK2.js.map} +0 -0
- /package/dist/{chunk-S7DPKM5W.js.map → chunk-353C5UNV.js.map} +0 -0
- /package/dist/{chunk-GQOMZ3MK.js.map → chunk-36UBSLFN.js.map} +0 -0
- /package/dist/{chunk-DBQWVT2H.js.map → chunk-3CBI2ZSA.js.map} +0 -0
- /package/dist/{chunk-NZXEK3UF.js.map → chunk-3Q3N35W7.js.map} +0 -0
- /package/dist/{chunk-YYGZJPOK.js.map → chunk-42DJ235G.js.map} +0 -0
- /package/dist/{chunk-7VJXIDOC.js.map → chunk-4JVQRFZD.js.map} +0 -0
- /package/dist/{chunk-WHBVXTUI.js.map → chunk-4PB2MBY6.js.map} +0 -0
- /package/dist/{chunk-TEYN7ZYF.js.map → chunk-4WCNPQQ5.js.map} +0 -0
- /package/dist/{chunk-RBGREYVJ.js.map → chunk-5QBDLMGG.js.map} +0 -0
- /package/dist/{chunk-RKBLRTNT.js.map → chunk-5SDSVX7N.js.map} +0 -0
- /package/dist/{chunk-LPECRQO4.js.map → chunk-5THU7NFP.js.map} +0 -0
- /package/dist/{chunk-LWA7MDVO.js.map → chunk-6CCRSQWT.js.map} +0 -0
- /package/dist/{chunk-TIT2C6WX.js.map → chunk-6XYC7NM4.js.map} +0 -0
- /package/dist/{chunk-FHQSPTPZ.js.map → chunk-6YAIN5XJ.js.map} +0 -0
- /package/dist/{chunk-PV36INNL.js.map → chunk-757NP436.js.map} +0 -0
- /package/dist/{chunk-6H5JYDOM.js.map → chunk-7J2CGXG3.js.map} +0 -0
- /package/dist/{chunk-FBMYGNOC.js.map → chunk-A2YQL2FF.js.map} +0 -0
- /package/dist/{chunk-X2NFFBTO.js.map → chunk-A7GQBJP5.js.map} +0 -0
- /package/dist/{chunk-MPYD657E.js.map → chunk-A7WOWDZK.js.map} +0 -0
- /package/dist/{chunk-C4OTC6WY.js.map → chunk-AIKTQVV3.js.map} +0 -0
- /package/dist/{chunk-CGC5UQCF.js.map → chunk-AKE4GGQ3.js.map} +0 -0
- /package/dist/{chunk-VP67GZ7T.js.map → chunk-APFKZVJS.js.map} +0 -0
- /package/dist/{chunk-M75RYSHS.js.map → chunk-AQIRQUCP.js.map} +0 -0
- /package/dist/{chunk-S7T2TY65.js.map → chunk-AXFR2NQ5.js.map} +0 -0
- /package/dist/{chunk-PSPABFN2.js.map → chunk-BD7JTBYP.js.map} +0 -0
- /package/dist/{chunk-FCSZ4K2X.js.map → chunk-BJJWRWER.js.map} +0 -0
- /package/dist/{chunk-JT3EB7ZL.js.map → chunk-BNGHPYZU.js.map} +0 -0
- /package/dist/{chunk-MFJBANPX.js.map → chunk-C2BFTYD7.js.map} +0 -0
- /package/dist/{chunk-3JVLGJCY.js.map → chunk-C6KRO3SU.js.map} +0 -0
- /package/dist/{chunk-AOCP6JA7.js.map → chunk-D3IZCN5P.js.map} +0 -0
- /package/dist/{chunk-ROKKIMON.js.map → chunk-EJIEQOPB.js.map} +0 -0
- /package/dist/{chunk-ET356KSB.js.map → chunk-F4TWWUMP.js.map} +0 -0
- /package/dist/{chunk-CLLPJ6QT.js.map → chunk-FQXJAC3T.js.map} +0 -0
- /package/dist/{chunk-DD5JFCWM.js.map → chunk-GCBIXUPT.js.map} +0 -0
- /package/dist/{chunk-ROGRI25A.js.map → chunk-I3H5LFOI.js.map} +0 -0
- /package/dist/{chunk-S65WXHNK.js.map → chunk-IFFLUCCU.js.map} +0 -0
- /package/dist/{chunk-D5LORF7A.js.map → chunk-JZDH2ZZK.js.map} +0 -0
- /package/dist/{chunk-2GPE5UCR.js.map → chunk-K6IPSW5B.js.map} +0 -0
- /package/dist/{chunk-HG6HXVHQ.js.map → chunk-KDJHLOZP.js.map} +0 -0
- /package/dist/{chunk-I27RSQRR.js.map → chunk-KYGOQV37.js.map} +0 -0
- /package/dist/{chunk-VZWXFXLX.js.map → chunk-LMCD5W5B.js.map} +0 -0
- /package/dist/{chunk-MKD3OMPS.js.map → chunk-M3MYMWXG.js.map} +0 -0
- /package/dist/{chunk-DITMGZOL.js.map → chunk-MMG5K6XJ.js.map} +0 -0
- /package/dist/{chunk-VGXM5B4H.js.map → chunk-MNIPH6LD.js.map} +0 -0
- /package/dist/{chunk-MKWKYHXJ.js.map → chunk-OB3XMWX5.js.map} +0 -0
- /package/dist/{chunk-XU6OEECT.js.map → chunk-OQQXGYMX.js.map} +0 -0
- /package/dist/{chunk-47DEYNMR.js.map → chunk-PEXW2JCK.js.map} +0 -0
- /package/dist/{chunk-42SDNZCU.js.map → chunk-QF4J3KMV.js.map} +0 -0
- /package/dist/{chunk-SB6PSOP7.js.map → chunk-QLJ6762U.js.map} +0 -0
- /package/dist/{chunk-XOVKXJEP.js.map → chunk-R3TLVTWW.js.map} +0 -0
- /package/dist/{chunk-PHNAB54Q.js.map → chunk-RQO3J4MR.js.map} +0 -0
- /package/dist/{chunk-5N53UBH2.js.map → chunk-RR7G2X7C.js.map} +0 -0
- /package/dist/{chunk-DCJ3YFIC.js.map → chunk-S2ULTQZR.js.map} +0 -0
- /package/dist/{chunk-GY5WZBA6.js.map → chunk-S76KRJDG.js.map} +0 -0
- /package/dist/{chunk-EEC4PCG5.js.map → chunk-SZDLX763.js.map} +0 -0
- /package/dist/{chunk-E2ZHGBAK.js.map → chunk-T2JSUEH6.js.map} +0 -0
- /package/dist/{chunk-QMGXMJ2O.js.map → chunk-T2YFZ27G.js.map} +0 -0
- /package/dist/{chunk-LEPOP46W.js.map → chunk-TFA6HPOA.js.map} +0 -0
- /package/dist/{chunk-BA6WOZOT.js.map → chunk-TK4FHQRN.js.map} +0 -0
- /package/dist/{chunk-ZNJSBIP4.js.map → chunk-TNSCIPBQ.js.map} +0 -0
- /package/dist/{chunk-YUMDFDUA.js.map → chunk-TWYTGIBR.js.map} +0 -0
- /package/dist/{chunk-EZZV7OQL.js.map → chunk-UEZKN6VR.js.map} +0 -0
- /package/dist/{chunk-HY55QQD7.js.map → chunk-UJX4I26O.js.map} +0 -0
- /package/dist/{chunk-CBCNKKZD.js.map → chunk-VIZR45AN.js.map} +0 -0
- /package/dist/{chunk-ZG74PWRW.js.map → chunk-VZAKYDMJ.js.map} +0 -0
- /package/dist/{chunk-ITPS5DDH.js.map → chunk-W5BLTZZJ.js.map} +0 -0
- /package/dist/{chunk-H3TKENU4.js.map → chunk-WIKO4SCR.js.map} +0 -0
- /package/dist/{chunk-YFLLGRXO.js.map → chunk-X2QPKLPL.js.map} +0 -0
- /package/dist/{chunk-FGGYSN4P.js.map → chunk-X424T5JQ.js.map} +0 -0
- /package/dist/{chunk-NAXDPKVM.js.map → chunk-XPJNT6PI.js.map} +0 -0
- /package/dist/{contradiction-scan-NOYMFG66.js.map → chunk-XW2T4QAW.js.map} +0 -0
- /package/dist/{chunk-VED2YHUD.js.map → chunk-YEDVOYL2.js.map} +0 -0
- /package/dist/{chunk-RC5DXXWC.js.map → chunk-YM7YN37H.js.map} +0 -0
- /package/dist/{chunk-VLXBE57O.js.map → chunk-YVGXH72Y.js.map} +0 -0
- /package/dist/{chunk-YQAXP5AC.js.map → chunk-YXLUTALO.js.map} +0 -0
- /package/dist/{chunk-565C6ZFO.js.map → chunk-Z7YDVHDI.js.map} +0 -0
- /package/dist/{chunk-XUE46UYW.js.map → chunk-ZLN7AROH.js.map} +0 -0
- /package/dist/{chunk-HK32G473.js.map → chunk-ZWEZXVYH.js.map} +0 -0
- /package/dist/{resolution-VKATP2HT.js.map → contradiction-scan-GVD4JJ7B.js.map} +0 -0
- /package/dist/{first-start-migration-RC345GPL.js.map → first-start-migration-L3UFX5CU.js.map} +0 -0
- /package/dist/{tier-stats-KA6OZX2C.js.map → tier-stats-VK5PCO2L.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { computeLegacyContentHash, normalizeLegacyContent } from "../content-hash.js";
|
|
3
3
|
import { inferMemoryStatus } from "../memory-lifecycle-ledger-utils.js";
|
|
4
|
-
import { ContentHashIndex, type ContentHashPathEntry } from "../storage/content-hash-index.js";
|
|
5
4
|
import { DEFAULT_CITATION_FORMAT, stripCitationForTemplate } from "../source-attribution.js";
|
|
5
|
+
import { ContentHashIndex, type ContentHashPathEntry } from "../storage/content-hash-index.js";
|
|
6
6
|
import { storedContentIdentityCandidates } from "../structured-attributes.js";
|
|
7
7
|
import type { MemoryFrontmatter, MemoryStatus } from "../types.js";
|
|
8
8
|
import { RECALL_FALLBACK_DIRS } from "../utils/category-dir.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
export const RECONCILE_MANIFEST_FORMAT = "remnic-reconcile-manifest";
|
|
21
21
|
export const RECONCILE_MANIFEST_SCHEMA_VERSION = 1;
|
|
22
|
-
const CONTENT_HASH_NORMALIZER_VERSION = 4;
|
|
22
|
+
export const CONTENT_HASH_NORMALIZER_VERSION = 4;
|
|
23
23
|
/**
|
|
24
24
|
* Version of the identity-resolution LOGIC (alias recovery, candidate
|
|
25
25
|
* ordering), independent of the content normalizer: a cached manifest entry
|
|
@@ -28,7 +28,7 @@ const CONTENT_HASH_NORMALIZER_VERSION = 4;
|
|
|
28
28
|
* review round 2). Bump when parsedMemoryIdentity's output shape or
|
|
29
29
|
* semantics change.
|
|
30
30
|
*/
|
|
31
|
-
const IDENTITY_RESOLUTION_VERSION = 2;
|
|
31
|
+
export const IDENTITY_RESOLUTION_VERSION = 2;
|
|
32
32
|
|
|
33
33
|
export interface ReconcileMemoryIdentity {
|
|
34
34
|
id: string;
|
|
@@ -49,6 +49,9 @@ export interface ReconcileMemoryIdentity {
|
|
|
49
49
|
|
|
50
50
|
export interface ReconcileManifestFile extends ReconcileFileState {
|
|
51
51
|
memory?: ReconcileMemoryIdentity;
|
|
52
|
+
/** Present on sha-only (negative) entries so an upgrade re-parses them. */
|
|
53
|
+
normalizerVersion?: number;
|
|
54
|
+
identityResolutionVersion?: number;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
type ActiveFactManifestFile = ReconcileManifestFile & { memory: ReconcileMemoryIdentity };
|
|
@@ -132,6 +135,65 @@ function parsedMemoryIdentity(
|
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Stable fingerprint of the citation template that `parsedMemoryIdentity` uses
|
|
140
|
+
* to strip inline attribution before hashing. A persisted identity cache is
|
|
141
|
+
* only reusable while this matches: identical file content under a different
|
|
142
|
+
* template yields a different `contentHash`, which would silently change
|
|
143
|
+
* duplicate and conflict decisions on a warm plan.
|
|
144
|
+
*/
|
|
145
|
+
export function citationTemplateFingerprint(citationTemplate?: string): string {
|
|
146
|
+
return createHash("sha256")
|
|
147
|
+
.update(citationTemplate ?? DEFAULT_CITATION_FORMAT)
|
|
148
|
+
.digest("hex")
|
|
149
|
+
.slice(0, 16);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Structural guard for identities read back from an on-disk cache. A cache file
|
|
154
|
+
* is untrusted JSON: without this an entry carrying `memory: null` survives the
|
|
155
|
+
* loader's cast and then throws when the hit path dereferences
|
|
156
|
+
* `memory.normalizerVersion`, aborting a manifest build that should instead
|
|
157
|
+
* fall back to a cold parse.
|
|
158
|
+
*/
|
|
159
|
+
export function isReconcileMemoryIdentity(value: unknown): value is ReconcileMemoryIdentity {
|
|
160
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
161
|
+
const memory = value as Record<string, unknown>;
|
|
162
|
+
if (typeof memory.id !== "string") return false;
|
|
163
|
+
if (typeof memory.category !== "string") return false;
|
|
164
|
+
if (typeof memory.contentHash !== "string" || !SHA256_PATTERN.test(memory.contentHash)) return false;
|
|
165
|
+
if (typeof memory.status !== "string") return false;
|
|
166
|
+
if (memory.normalizerVersion !== undefined && typeof memory.normalizerVersion !== "number") return false;
|
|
167
|
+
if (memory.identityResolutionVersion !== undefined && typeof memory.identityResolutionVersion !== "number") {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
if (
|
|
171
|
+
memory.contentHashAliases !== undefined &&
|
|
172
|
+
(!Array.isArray(memory.contentHashAliases) ||
|
|
173
|
+
memory.contentHashAliases.some((alias) => typeof alias !== "string" || !SHA256_PATTERN.test(alias)))
|
|
174
|
+
) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** A cache hit is valid only when the entry was built by the current parser.
|
|
181
|
+
* Positive hits carry versions on `memory`; sha-only negatives stamp the same
|
|
182
|
+
* versions on the entry itself. Unversioned negatives are pre-upgrade leftovers
|
|
183
|
+
* and must miss so a newer parser can recognize an identity it previously skipped. */
|
|
184
|
+
export function isCachedIdentityReusable(cached: ReconcileManifestFile): boolean {
|
|
185
|
+
if (cached.memory !== undefined) {
|
|
186
|
+
return (
|
|
187
|
+
cached.memory.normalizerVersion === CONTENT_HASH_NORMALIZER_VERSION &&
|
|
188
|
+
cached.memory.identityResolutionVersion === IDENTITY_RESOLUTION_VERSION
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
return (
|
|
192
|
+
cached.normalizerVersion === CONTENT_HASH_NORMALIZER_VERSION &&
|
|
193
|
+
cached.identityResolutionVersion === IDENTITY_RESOLUTION_VERSION
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
135
197
|
export async function buildReconcileManifestFile(
|
|
136
198
|
file: ReconcileFileState,
|
|
137
199
|
readFile: (file: ReconcileFileState) => Promise<Buffer | string | null>,
|
|
@@ -139,10 +201,12 @@ export async function buildReconcileManifestFile(
|
|
|
139
201
|
citationTemplate = DEFAULT_CITATION_FORMAT
|
|
140
202
|
): Promise<ReconcileManifestFile> {
|
|
141
203
|
let raw: Buffer | string | null = null;
|
|
204
|
+
let readFailed = false;
|
|
142
205
|
if (isMemoryPath(file.path)) {
|
|
143
206
|
try {
|
|
144
207
|
raw = await readFile(file);
|
|
145
208
|
} catch {
|
|
209
|
+
readFailed = true;
|
|
146
210
|
raw = null;
|
|
147
211
|
}
|
|
148
212
|
}
|
|
@@ -150,7 +214,18 @@ export async function buildReconcileManifestFile(
|
|
|
150
214
|
raw = null;
|
|
151
215
|
}
|
|
152
216
|
const memory = raw === null ? undefined : parsedMemoryIdentity(file.path, raw, parseMemory, citationTemplate);
|
|
153
|
-
|
|
217
|
+
// A thrown read is not a negative identity. Stamping versions here would
|
|
218
|
+
// make the next warm cycle treat the failure as "this file has no id".
|
|
219
|
+
if (readFailed) return { ...file };
|
|
220
|
+
return {
|
|
221
|
+
...file,
|
|
222
|
+
...(memory
|
|
223
|
+
? { memory }
|
|
224
|
+
: {
|
|
225
|
+
normalizerVersion: CONTENT_HASH_NORMALIZER_VERSION,
|
|
226
|
+
identityResolutionVersion: IDENTITY_RESOLUTION_VERSION,
|
|
227
|
+
}),
|
|
228
|
+
};
|
|
154
229
|
}
|
|
155
230
|
|
|
156
231
|
/** Read-batch size for manifest builds. Uncached files are independent (a
|
|
@@ -168,23 +243,33 @@ export async function buildReconcileManifest(options: BuildReconcileManifestOpti
|
|
|
168
243
|
cachedByPath.set(cached.path, cached);
|
|
169
244
|
}
|
|
170
245
|
|
|
171
|
-
const
|
|
246
|
+
const allFiles = [...options.files];
|
|
247
|
+
// Every result — cache hit or rebuild — is stored at its own input index.
|
|
248
|
+
// Pushing hits onto a dense array while rebuilds are assigned by index
|
|
249
|
+
// silently drops entries whenever a miss precedes a hit: the rebuild lands
|
|
250
|
+
// on the slot the hit already occupied.
|
|
251
|
+
const files: ReconcileManifestFile[] = new Array(allFiles.length);
|
|
172
252
|
// Cache hits stay on a synchronous fast path (no promise allocation, no
|
|
173
253
|
// Promise.all — a fully-cached rebuild must not regress); only the uncached
|
|
174
|
-
// entries ride the bounded batches.
|
|
254
|
+
// entries ride the bounded batches.
|
|
175
255
|
const uncached: Array<{ index: number; file: ReconcileFileState }> = [];
|
|
176
|
-
const allFiles = [...options.files];
|
|
177
256
|
for (let i = 0; i < allFiles.length; i += 1) {
|
|
178
257
|
const file = allFiles[i]!;
|
|
179
258
|
const cached = cachedByPath.get(file.path);
|
|
180
259
|
if (
|
|
181
260
|
cached !== undefined &&
|
|
182
261
|
cached.sha256.toLowerCase() === file.sha256.toLowerCase() &&
|
|
183
|
-
(cached
|
|
184
|
-
(cached.memory.normalizerVersion === CONTENT_HASH_NORMALIZER_VERSION &&
|
|
185
|
-
cached.memory.identityResolutionVersion === IDENTITY_RESOLUTION_VERSION))
|
|
262
|
+
isCachedIdentityReusable(cached)
|
|
186
263
|
) {
|
|
187
|
-
files
|
|
264
|
+
files[i] = {
|
|
265
|
+
...file,
|
|
266
|
+
...(cached.memory
|
|
267
|
+
? { memory: cached.memory }
|
|
268
|
+
: {
|
|
269
|
+
normalizerVersion: cached.normalizerVersion,
|
|
270
|
+
identityResolutionVersion: cached.identityResolutionVersion,
|
|
271
|
+
}),
|
|
272
|
+
};
|
|
188
273
|
} else {
|
|
189
274
|
uncached.push({ index: i, file });
|
|
190
275
|
}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import * as assert from "node:assert/strict";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import * as os from "node:os";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
import test from "node:test";
|
|
6
|
+
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
import { type ServerIdentityCacheEntry, planServerIdentityCacheWrite } from "./access-offline-manifest.js";
|
|
9
|
+
import { isInternalRemnicStatePath } from "./offline-sync.js";
|
|
10
|
+
import { convergeIdentityCachePath } from "./reconcile/cursor.js";
|
|
11
|
+
import {
|
|
12
|
+
buildReconcileManifest,
|
|
13
|
+
citationTemplateFingerprint,
|
|
14
|
+
isReconcileMemoryIdentity,
|
|
15
|
+
} from "./reconcile/manifest.js";
|
|
16
|
+
import { createPersistedSupportPassportPrivateFileExclusion } from "./support-passport/card-projection.js";
|
|
17
|
+
import { parseFrontmatter } from "./storage.js";
|
|
18
|
+
|
|
19
|
+
function memoryFile(id: string, body: string): string {
|
|
20
|
+
return [
|
|
21
|
+
"---",
|
|
22
|
+
`id: ${id}`,
|
|
23
|
+
"category: fact",
|
|
24
|
+
"created: 2026-01-01T00:00:00.000Z",
|
|
25
|
+
"updated: 2026-01-01T00:00:00.000Z",
|
|
26
|
+
"status: active",
|
|
27
|
+
"---",
|
|
28
|
+
body,
|
|
29
|
+
].join("\n");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
test("converge identity cache path lives beside cursors but in its own dir", () => {
|
|
33
|
+
const p = convergeIdentityCachePath("/tmp/mem", "http://peer", "default");
|
|
34
|
+
assert.ok(p.includes("converge-identity"));
|
|
35
|
+
assert.ok(!p.includes("converge-cursors"));
|
|
36
|
+
assert.ok(path.basename(p).startsWith("identity-"));
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test("cachedFiles with matching sha skip the content read (warm manifest build)", async () => {
|
|
40
|
+
const dir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "identity-cache-"));
|
|
41
|
+
try {
|
|
42
|
+
const content = memoryFile("warm-1", "warm body");
|
|
43
|
+
const file = path.join(dir, "facts/warm-1.md");
|
|
44
|
+
await fs.promises.mkdir(path.dirname(file), { recursive: true });
|
|
45
|
+
await fs.promises.writeFile(file, content);
|
|
46
|
+
|
|
47
|
+
const contentSha = createHash("sha256").update(content).digest("hex");
|
|
48
|
+
// First (cold) build reads content and produces identities.
|
|
49
|
+
const cold = await buildReconcileManifest({
|
|
50
|
+
files: [{ path: "facts/warm-1.md", sha256: contentSha, mtimeMs: 1, bytes: content.length }],
|
|
51
|
+
parseMemory: parseFrontmatter,
|
|
52
|
+
readFile: async () => content,
|
|
53
|
+
});
|
|
54
|
+
assert.ok(cold.files[0]?.memory?.id === "warm-1");
|
|
55
|
+
|
|
56
|
+
// Warm build with cachedFiles: readFile must NEVER be called.
|
|
57
|
+
let readCalled = false;
|
|
58
|
+
const warm = await buildReconcileManifest({
|
|
59
|
+
files: [{ path: "facts/warm-1.md", sha256: contentSha, mtimeMs: 1, bytes: content.length }],
|
|
60
|
+
parseMemory: parseFrontmatter,
|
|
61
|
+
cachedFiles: cold.files,
|
|
62
|
+
readFile: async () => {
|
|
63
|
+
readCalled = true;
|
|
64
|
+
return content;
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
assert.equal(readCalled, false);
|
|
68
|
+
assert.deepEqual(warm.files[0]?.memory, cold.files[0]?.memory);
|
|
69
|
+
} finally {
|
|
70
|
+
await fs.promises.rm(dir, { recursive: true, force: true });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test("a changed sha invalidates the cached identity (cold re-read)", async () => {
|
|
75
|
+
const dir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "identity-cache-"));
|
|
76
|
+
try {
|
|
77
|
+
const contentA = memoryFile("flip-1", "body a");
|
|
78
|
+
const contentB = memoryFile("flip-1", "body b");
|
|
79
|
+
const cold = await buildReconcileManifest({
|
|
80
|
+
files: [
|
|
81
|
+
{
|
|
82
|
+
path: "facts/flip-1.md",
|
|
83
|
+
sha256: createHash("sha256").update(contentA).digest("hex"),
|
|
84
|
+
mtimeMs: 1,
|
|
85
|
+
bytes: contentA.length,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
parseMemory: parseFrontmatter,
|
|
89
|
+
readFile: async () => contentA,
|
|
90
|
+
});
|
|
91
|
+
let readCalled = false;
|
|
92
|
+
const warm = await buildReconcileManifest({
|
|
93
|
+
files: [
|
|
94
|
+
{
|
|
95
|
+
path: "facts/flip-1.md",
|
|
96
|
+
sha256: createHash("sha256").update(contentB).digest("hex"),
|
|
97
|
+
mtimeMs: 2,
|
|
98
|
+
bytes: contentB.length,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
parseMemory: parseFrontmatter,
|
|
102
|
+
cachedFiles: cold.files,
|
|
103
|
+
readFile: async () => {
|
|
104
|
+
readCalled = true;
|
|
105
|
+
return contentB;
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
assert.equal(readCalled, true);
|
|
109
|
+
assert.ok(warm.files[0]?.memory);
|
|
110
|
+
} finally {
|
|
111
|
+
await fs.promises.rm(dir, { recursive: true, force: true });
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test("the server identity cache lives on a path snapshot enumeration excludes", () => {
|
|
116
|
+
// The cache is node-local: enumerating it would advertise it as a peer file
|
|
117
|
+
// and make convergence transfer the cache itself.
|
|
118
|
+
assert.equal(isInternalRemnicStatePath(".remnic/state/converge-identity-cache.json"), true);
|
|
119
|
+
assert.equal(isInternalRemnicStatePath("state/converge-identity-cache.json"), false);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
test("the CLI identity cache path is excluded from enumeration too", () => {
|
|
123
|
+
const absolute = convergeIdentityCachePath("/tmp/mem", "http://peer", "default");
|
|
124
|
+
const relative = absolute.slice("/tmp/mem/".length);
|
|
125
|
+
assert.equal(isInternalRemnicStatePath(relative), true);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test("citation templates fingerprint distinctly and default consistently", () => {
|
|
129
|
+
const fallback = citationTemplateFingerprint(undefined);
|
|
130
|
+
assert.equal(
|
|
131
|
+
citationTemplateFingerprint("{{source}} — {{title}}"),
|
|
132
|
+
citationTemplateFingerprint("{{source}} — {{title}}")
|
|
133
|
+
);
|
|
134
|
+
assert.notEqual(citationTemplateFingerprint("{{source}}"), citationTemplateFingerprint("{{title}}"));
|
|
135
|
+
assert.notEqual(citationTemplateFingerprint("{{source}}"), fallback);
|
|
136
|
+
assert.match(fallback, /^[0-9a-f]{16}$/);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
test("malformed cached identities are rejected instead of trusted", () => {
|
|
140
|
+
const hash = "a".repeat(64);
|
|
141
|
+
const otherHash = "b".repeat(64);
|
|
142
|
+
const valid = { id: "a", category: "fact", contentHash: hash, status: "active" };
|
|
143
|
+
assert.equal(isReconcileMemoryIdentity(valid), true);
|
|
144
|
+
assert.equal(isReconcileMemoryIdentity({ ...valid, contentHashAliases: [otherHash] }), true);
|
|
145
|
+
assert.equal(isReconcileMemoryIdentity(null), false);
|
|
146
|
+
assert.equal(isReconcileMemoryIdentity(undefined), false);
|
|
147
|
+
assert.equal(isReconcileMemoryIdentity([valid]), false);
|
|
148
|
+
assert.equal(isReconcileMemoryIdentity({ ...valid, id: 1 }), false);
|
|
149
|
+
assert.equal(isReconcileMemoryIdentity({ ...valid, status: undefined }), false);
|
|
150
|
+
assert.equal(isReconcileMemoryIdentity({ ...valid, normalizerVersion: "4" }), false);
|
|
151
|
+
assert.equal(isReconcileMemoryIdentity({ ...valid, contentHashAliases: [1] }), false);
|
|
152
|
+
// A well-typed but non-hash value would be reused without a parse and could
|
|
153
|
+
// shift duplicate decisions, so the guard enforces the producer's format.
|
|
154
|
+
assert.equal(isReconcileMemoryIdentity({ ...valid, contentHash: "not-a-hash" }), false);
|
|
155
|
+
assert.equal(isReconcileMemoryIdentity({ ...valid, contentHashAliases: ["not-a-hash"] }), false);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
test("a cache miss before a cache hit does not overwrite the hit", async () => {
|
|
159
|
+
const changed = memoryFile("mixed-a", "edited body");
|
|
160
|
+
const unchanged = memoryFile("mixed-b", "stable body");
|
|
161
|
+
const changedSha = createHash("sha256").update(changed).digest("hex");
|
|
162
|
+
const unchangedSha = createHash("sha256").update(unchanged).digest("hex");
|
|
163
|
+
const byPath = new Map([
|
|
164
|
+
["facts/mixed-a.md", changed],
|
|
165
|
+
["facts/mixed-b.md", unchanged],
|
|
166
|
+
]);
|
|
167
|
+
const files = [
|
|
168
|
+
{ path: "facts/mixed-a.md", sha256: changedSha, mtimeMs: 2, bytes: changed.length },
|
|
169
|
+
{ path: "facts/mixed-b.md", sha256: unchangedSha, mtimeMs: 1, bytes: unchanged.length },
|
|
170
|
+
];
|
|
171
|
+
|
|
172
|
+
const cold = await buildReconcileManifest({
|
|
173
|
+
files,
|
|
174
|
+
parseMemory: parseFrontmatter,
|
|
175
|
+
readFile: async (file) => byPath.get(file.path) ?? null,
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// Warm run where only the FIRST file changed: its rebuild is assigned by
|
|
179
|
+
// input index while the second file is a cache hit.
|
|
180
|
+
const staleSha = createHash("sha256").update("stale").digest("hex");
|
|
181
|
+
const warm = await buildReconcileManifest({
|
|
182
|
+
files,
|
|
183
|
+
parseMemory: parseFrontmatter,
|
|
184
|
+
cachedFiles: [
|
|
185
|
+
{ path: "facts/mixed-a.md", sha256: staleSha, mtimeMs: 1, bytes: 1 },
|
|
186
|
+
cold.files.find((file) => file.path === "facts/mixed-b.md")!,
|
|
187
|
+
],
|
|
188
|
+
readFile: async (file) => byPath.get(file.path) ?? null,
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
assert.equal(warm.files.length, 2);
|
|
192
|
+
assert.deepEqual(
|
|
193
|
+
warm.files.map((file) => file.path),
|
|
194
|
+
["facts/mixed-a.md", "facts/mixed-b.md"]
|
|
195
|
+
);
|
|
196
|
+
assert.equal(
|
|
197
|
+
warm.files.every((file) => file !== undefined),
|
|
198
|
+
true
|
|
199
|
+
);
|
|
200
|
+
assert.equal(warm.files[0]?.memory?.id, "mixed-a");
|
|
201
|
+
assert.equal(warm.files[1]?.memory?.id, "mixed-b");
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
test("the server cache write persists removals and prunes only completed walks", () => {
|
|
205
|
+
const entry = (path: string): ServerIdentityCacheEntry => ({
|
|
206
|
+
path,
|
|
207
|
+
sha256: "c".repeat(64),
|
|
208
|
+
memory: {
|
|
209
|
+
id: path,
|
|
210
|
+
category: "fact",
|
|
211
|
+
contentHash: "d".repeat(64),
|
|
212
|
+
normalizerVersion: 4,
|
|
213
|
+
identityResolutionVersion: 2,
|
|
214
|
+
status: "active",
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
const persisted = new Map([
|
|
218
|
+
["facts/kept.md", entry("facts/kept.md")],
|
|
219
|
+
["facts/deleted.md", entry("facts/deleted.md")],
|
|
220
|
+
]);
|
|
221
|
+
|
|
222
|
+
// A completed walk that only observed the surviving file must still write,
|
|
223
|
+
// or the deleted file's entry stays on disk forever.
|
|
224
|
+
const pruned = planServerIdentityCacheWrite({
|
|
225
|
+
persisted,
|
|
226
|
+
yieldedPaths: new Set(["facts/kept.md"]),
|
|
227
|
+
streamCompleted: true,
|
|
228
|
+
cacheDirty: false,
|
|
229
|
+
});
|
|
230
|
+
assert.equal(pruned.shouldWrite, true);
|
|
231
|
+
assert.deepEqual(
|
|
232
|
+
pruned.entries.map((e) => e.path),
|
|
233
|
+
["facts/kept.md"]
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
// An entry dropped because its file lost its identity is a mutation even
|
|
237
|
+
// though nothing was rebuilt.
|
|
238
|
+
const lostIdentity = planServerIdentityCacheWrite({
|
|
239
|
+
persisted: new Map([["facts/kept.md", entry("facts/kept.md")]]),
|
|
240
|
+
yieldedPaths: new Set(["facts/kept.md", "facts/lost.md"]),
|
|
241
|
+
streamCompleted: true,
|
|
242
|
+
cacheDirty: true,
|
|
243
|
+
});
|
|
244
|
+
assert.equal(lostIdentity.shouldWrite, true);
|
|
245
|
+
|
|
246
|
+
// Nothing changed: no write.
|
|
247
|
+
const unchanged = planServerIdentityCacheWrite({
|
|
248
|
+
persisted,
|
|
249
|
+
yieldedPaths: new Set(["facts/kept.md", "facts/deleted.md"]),
|
|
250
|
+
streamCompleted: true,
|
|
251
|
+
cacheDirty: false,
|
|
252
|
+
});
|
|
253
|
+
assert.equal(unchanged.shouldWrite, false);
|
|
254
|
+
|
|
255
|
+
// An aborted walk never prunes, so it can only add.
|
|
256
|
+
const aborted = planServerIdentityCacheWrite({
|
|
257
|
+
persisted,
|
|
258
|
+
yieldedPaths: new Set(["facts/kept.md"]),
|
|
259
|
+
streamCompleted: false,
|
|
260
|
+
cacheDirty: false,
|
|
261
|
+
});
|
|
262
|
+
assert.equal(aborted.shouldWrite, false);
|
|
263
|
+
assert.equal(aborted.entries.length, 2);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
test("a persisted classification with a matching stat identity skips the file read", async () => {
|
|
267
|
+
const dir = await fs.promises.mkdtemp(path.join(os.tmpdir(), "persisted-exclusion-"));
|
|
268
|
+
try {
|
|
269
|
+
const target = path.join(dir, "facts", "warm.md");
|
|
270
|
+
await fs.promises.mkdir(path.dirname(target), { recursive: true });
|
|
271
|
+
await fs.promises.writeFile(target, memoryFile("warm-excl", "body"));
|
|
272
|
+
await fs.promises.utimes(target, new Date(1_700_000_000_000), new Date(1_700_000_000_000));
|
|
273
|
+
|
|
274
|
+
let reads = 0;
|
|
275
|
+
const storage = {
|
|
276
|
+
readMemoryByPath: async () => {
|
|
277
|
+
reads += 1;
|
|
278
|
+
return null;
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
const persisted = new Map<string, { statIdentity?: string; excluded?: boolean }>();
|
|
283
|
+
const updates = new Map<string, { statIdentity: string; excluded: boolean }>();
|
|
284
|
+
const exclude = createPersistedSupportPassportPrivateFileExclusion(storage, persisted, updates);
|
|
285
|
+
|
|
286
|
+
// Cold: no persisted classification -> reads once and records it.
|
|
287
|
+
assert.equal(await exclude({ root: dir, path: "facts/warm.md", filePath: target }), false);
|
|
288
|
+
assert.equal(reads, 1);
|
|
289
|
+
const recorded = updates.get("facts/warm.md");
|
|
290
|
+
assert.ok(recorded, "the cold classification must be recorded for persistence");
|
|
291
|
+
persisted.set("facts/warm.md", recorded);
|
|
292
|
+
|
|
293
|
+
// Warm: the stat identity matches -> no read.
|
|
294
|
+
updates.clear();
|
|
295
|
+
assert.equal(await exclude({ root: dir, path: "facts/warm.md", filePath: target }), false);
|
|
296
|
+
assert.equal(reads, 1, "a matching persisted classification must not re-read the file");
|
|
297
|
+
|
|
298
|
+
// A content change moves ctime -> the classification is recomputed.
|
|
299
|
+
await fs.promises.writeFile(target, memoryFile("warm-excl", "changed body"));
|
|
300
|
+
updates.clear();
|
|
301
|
+
assert.equal(await exclude({ root: dir, path: "facts/warm.md", filePath: target }), false);
|
|
302
|
+
assert.equal(reads, 2, "a changed stat identity must re-classify");
|
|
303
|
+
assert.ok(updates.has("facts/warm.md"));
|
|
304
|
+
} finally {
|
|
305
|
+
await fs.promises.rm(dir, { recursive: true, force: true });
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
test("an unversioned sha-only cache entry is not reused", async () => {
|
|
310
|
+
const content = "not a memory file at all";
|
|
311
|
+
const sha = createHash("sha256").update(content).digest("hex");
|
|
312
|
+
let reads = 0;
|
|
313
|
+
await buildReconcileManifest({
|
|
314
|
+
files: [{ path: "facts/no-id.md", sha256: sha, mtimeMs: 1, bytes: content.length }],
|
|
315
|
+
parseMemory: parseFrontmatter,
|
|
316
|
+
cachedFiles: [{ path: "facts/no-id.md", sha256: sha, mtimeMs: 1, bytes: content.length }],
|
|
317
|
+
readFile: async () => {
|
|
318
|
+
reads += 1;
|
|
319
|
+
return content;
|
|
320
|
+
},
|
|
321
|
+
});
|
|
322
|
+
assert.equal(reads, 1, "a pre-upgrade sha-only entry must be reparsed");
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
test("a version-stamped sha-only cache entry is reused", async () => {
|
|
326
|
+
const content = "not a memory file at all";
|
|
327
|
+
const sha = createHash("sha256").update(content).digest("hex");
|
|
328
|
+
let reads = 0;
|
|
329
|
+
const warm = await buildReconcileManifest({
|
|
330
|
+
files: [{ path: "facts/no-id.md", sha256: sha, mtimeMs: 1, bytes: content.length }],
|
|
331
|
+
parseMemory: parseFrontmatter,
|
|
332
|
+
cachedFiles: [
|
|
333
|
+
{
|
|
334
|
+
path: "facts/no-id.md",
|
|
335
|
+
sha256: sha,
|
|
336
|
+
mtimeMs: 1,
|
|
337
|
+
bytes: content.length,
|
|
338
|
+
normalizerVersion: 4,
|
|
339
|
+
identityResolutionVersion: 2,
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
readFile: async () => {
|
|
343
|
+
reads += 1;
|
|
344
|
+
return content;
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
assert.equal(reads, 0, "a current-version sha-only entry must skip the read");
|
|
348
|
+
assert.equal(warm.files[0]?.memory, undefined);
|
|
349
|
+
assert.equal(warm.files[0]?.normalizerVersion, 4);
|
|
350
|
+
assert.equal(warm.files[0]?.identityResolutionVersion, 2);
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
test("a thrown memory-file read is not cached as a reusable negative", async () => {
|
|
354
|
+
const sha = "a".repeat(64);
|
|
355
|
+
const first = await buildReconcileManifest({
|
|
356
|
+
files: [{ path: "facts/flaky.md", sha256: sha, mtimeMs: 1, bytes: 1 }],
|
|
357
|
+
parseMemory: parseFrontmatter,
|
|
358
|
+
readFile: async () => {
|
|
359
|
+
throw new Error("transient");
|
|
360
|
+
},
|
|
361
|
+
});
|
|
362
|
+
assert.equal(first.files[0]?.memory, undefined);
|
|
363
|
+
assert.equal(first.files[0]?.normalizerVersion, undefined);
|
|
364
|
+
|
|
365
|
+
let reads = 0;
|
|
366
|
+
await buildReconcileManifest({
|
|
367
|
+
files: [{ path: "facts/flaky.md", sha256: sha, mtimeMs: 1, bytes: 1 }],
|
|
368
|
+
parseMemory: parseFrontmatter,
|
|
369
|
+
cachedFiles: first.files,
|
|
370
|
+
readFile: async () => {
|
|
371
|
+
reads += 1;
|
|
372
|
+
return "---\nid: recovered\ncategory: fact\nstatus: active\n---\nbody\n";
|
|
373
|
+
},
|
|
374
|
+
});
|
|
375
|
+
assert.equal(reads, 1, "a failed read must not become a warm negative hit");
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
|
|
@@ -4,7 +4,7 @@ type ProcessOptions = Record<string, unknown>;
|
|
|
4
4
|
type ProcessStream = {
|
|
5
5
|
destroyed?: boolean;
|
|
6
6
|
destroy: () => void;
|
|
7
|
-
end: () => void;
|
|
7
|
+
end: (chunk?: string | Buffer, callback?: (error?: Error | null) => void) => void;
|
|
8
8
|
on: (event: string, listener: (...args: any[]) => void) => ProcessStream;
|
|
9
9
|
once: (event: string, listener: (...args: any[]) => void) => ProcessStream;
|
|
10
10
|
setEncoding: (encoding: BufferEncoding) => void;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { log } from "../logger.js";
|
|
2
|
+
import {
|
|
3
|
+
CasRevisionStore,
|
|
4
|
+
type CasRevisionReadStatus,
|
|
5
|
+
type CasRevisionTransaction,
|
|
6
|
+
} from "./cas-revision-store.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* StorageManager CAS receipt host (#2813 / #2807).
|
|
10
|
+
* Owns fail-open reads, lazy pending recovery, durable digest, and begin-revision.
|
|
11
|
+
* Tests patch the inherited CasRevisionStore seam on `casRevisions`.
|
|
12
|
+
*/
|
|
13
|
+
export class CasRevisionHost extends CasRevisionStore {
|
|
14
|
+
/** Standing CAS revision token — receipt identity, never public `updated` (#2807). Fail-open on read errors. */
|
|
15
|
+
async readCasRevision(filePath: string): Promise<string | undefined> {
|
|
16
|
+
try {
|
|
17
|
+
return await this.readRevision(filePath);
|
|
18
|
+
} catch (err) {
|
|
19
|
+
log.warn(`storage.readCasRevision failed for ${filePath}: ${err}`);
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** #2813 (P1 A): truthful CAS receipt probe — distinguishes a genuinely
|
|
25
|
+
* ABSENT receipt (target predates the sidecar; `undefined` semantics stay
|
|
26
|
+
* correct) from an UNAVAILABLE one (unreadable shard: receipt identity is
|
|
27
|
+
* unknown). Transactional callers that must refuse on unknown identity
|
|
28
|
+
* route here; `readCasRevision` stays fail-open for advisory reads.
|
|
29
|
+
* #2807 (P1): a PENDING marker left by a crash is lazily recovered on
|
|
30
|
+
* this first read when its evidence is decisive; a reserve-only marker
|
|
31
|
+
* may belong to a live writer and defers to the path-locked write path,
|
|
32
|
+
* and ambiguity stays `unavailable` with an actionable reason. */
|
|
33
|
+
async readCasRevisionStatus(filePath: string): Promise<CasRevisionReadStatus> {
|
|
34
|
+
const status = await this.readRevisionStatus(filePath);
|
|
35
|
+
if (status.status !== "unavailable" || !/pending/i.test(status.reason)) return status;
|
|
36
|
+
// #2807: an evidenced PENDING marker (its write already landed) is
|
|
37
|
+
// lazily recovered here. A reserve-only marker may belong to a LIVE
|
|
38
|
+
// transaction — this read holds no capture path lock — so it is left
|
|
39
|
+
// for the path-locked write path, which cannot race the owner.
|
|
40
|
+
try {
|
|
41
|
+
const outcome = await this.recoverPendingRevision(filePath, {
|
|
42
|
+
onlyWithWriteEvidence: true,
|
|
43
|
+
});
|
|
44
|
+
if (outcome === "reserved") return status;
|
|
45
|
+
} catch (error) {
|
|
46
|
+
return {
|
|
47
|
+
status: "unavailable",
|
|
48
|
+
reason: error instanceof Error ? error.message : String(error),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return await this.readRevisionStatus(filePath);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async readDurableFileDigest(filePath: string): Promise<string | null> {
|
|
55
|
+
try {
|
|
56
|
+
return await this.digestDurableFile(filePath);
|
|
57
|
+
} catch (err) {
|
|
58
|
+
log.warn(`storage.readDurableFileDigest failed for ${filePath}: ${err}`);
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** #2807 (P1): reconcile any crash-orphaned PENDING marker for this
|
|
64
|
+
* target BEFORE the next semantic mutation reserves a new token —
|
|
65
|
+
* otherwise a crashed reservation would make the memory permanently
|
|
66
|
+
* unwritable. Decisive evidence heals; ambiguity throws so the
|
|
67
|
+
* mutation fails closed with the actionable recovery error. */
|
|
68
|
+
async beginRevision(
|
|
69
|
+
pathname: string,
|
|
70
|
+
expectedContent?: string | Buffer | null,
|
|
71
|
+
): Promise<CasRevisionTransaction> {
|
|
72
|
+
await this.recoverPendingRevision(pathname);
|
|
73
|
+
return await this.beginRevisionTransaction(pathname, expectedContent);
|
|
74
|
+
}
|
|
75
|
+
}
|