@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,11 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Read-only vault daily-note journal section (issue #1987 first slice).
|
|
3
3
|
*
|
|
4
|
-
* Pure:
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Pure: caller supplies the file text (one read; the filesystem wrapper
|
|
5
|
+
* lives in journal-read.ts). Extracts the unique journal section via
|
|
6
|
+
* the shared ATX heading matcher, then strips every Remnic-owned region
|
|
7
|
+
* (journal-strip.ts) so published output can never re-enter the journal.
|
|
8
|
+
* Missing note and missing section are distinct, labeled no-journal
|
|
9
|
+
* outcomes (§22); duplicate headings refuse with line numbers.
|
|
7
10
|
*/
|
|
8
11
|
|
|
12
|
+
import { parseAtxHeading } from "./journal-section.js";
|
|
13
|
+
import { stripRemnicOwnedRegions } from "./journal-strip.js";
|
|
14
|
+
|
|
9
15
|
export interface ReadVaultJournalInput {
|
|
10
16
|
fileText: string | null | undefined;
|
|
11
17
|
journalSection: string;
|
|
@@ -17,8 +23,6 @@ export type ReadVaultJournalResult =
|
|
|
17
23
|
| { ok: true; exists: true; text: string; heading: string; warnings: readonly string[] }
|
|
18
24
|
| { ok: false; reason: "duplicate_heading"; lines: readonly number[] };
|
|
19
25
|
|
|
20
|
-
const REMNIC_OPEN = "<!-- remnic:";
|
|
21
|
-
|
|
22
26
|
export function readVaultJournal(input: ReadVaultJournalInput): ReadVaultJournalResult {
|
|
23
27
|
if (input.fileText === null || input.fileText === undefined) {
|
|
24
28
|
return { ok: true, exists: false, reason: "missing_file" };
|
|
@@ -62,18 +66,6 @@ export function readVaultJournal(input: ReadVaultJournalInput): ReadVaultJournal
|
|
|
62
66
|
};
|
|
63
67
|
}
|
|
64
68
|
|
|
65
|
-
/** Remove Remnic marker pairs and publisher-owned heading sections. */
|
|
66
|
-
export function stripRemnicOwnedRegions(
|
|
67
|
-
text: string,
|
|
68
|
-
publishSectionNames: readonly string[] = [],
|
|
69
|
-
): { text: string; warnings: readonly string[] } {
|
|
70
|
-
const marked = cutIntervals(text, remnicIntervals(text));
|
|
71
|
-
return {
|
|
72
|
-
text: stripPublishHeadings(marked.text, publishSectionNames),
|
|
73
|
-
warnings: marked.warnings,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
69
|
function splitFileLines(fileText: string): string[] {
|
|
78
70
|
const lines = fileText.split("\n");
|
|
79
71
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -83,128 +75,6 @@ function splitFileLines(fileText: string): string[] {
|
|
|
83
75
|
return lines;
|
|
84
76
|
}
|
|
85
77
|
|
|
86
|
-
function parseAtxHeading(line: string): { level: number; text: string } | null {
|
|
87
|
-
let level = 0;
|
|
88
|
-
while (level < line.length && level < 6 && line[level] === "#") level++;
|
|
89
|
-
if (level === 0) return null;
|
|
90
|
-
const after = line[level];
|
|
91
|
-
if (after !== " " && after !== "\t") return null;
|
|
92
|
-
|
|
93
|
-
let start = level + 1;
|
|
94
|
-
let end = line.length;
|
|
95
|
-
while (start < end && (line[start] === " " || line[start] === "\t")) start++;
|
|
96
|
-
while (end > start && (line[end - 1] === " " || line[end - 1] === "\t")) end--;
|
|
97
|
-
|
|
98
|
-
let hashEnd = end;
|
|
99
|
-
while (hashEnd > start && line[hashEnd - 1] === "#") hashEnd--;
|
|
100
|
-
if (hashEnd < end && hashEnd > start && (line[hashEnd - 1] === " " || line[hashEnd - 1] === "\t")) {
|
|
101
|
-
end = hashEnd;
|
|
102
|
-
while (end > start && (line[end - 1] === " " || line[end - 1] === "\t")) end--;
|
|
103
|
-
}
|
|
104
|
-
return { level, text: line.slice(start, end) };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function remnicIntervals(text: string): {
|
|
108
|
-
intervals: Array<{ start: number; end: number }>;
|
|
109
|
-
warnings: string[];
|
|
110
|
-
} {
|
|
111
|
-
const starts: Array<{ name: string; start: number; after: number }> = [];
|
|
112
|
-
const ends: Array<{ name: string; start: number; end: number }> = [];
|
|
113
|
-
|
|
114
|
-
let from = 0;
|
|
115
|
-
while (from < text.length) {
|
|
116
|
-
const open = text.indexOf(REMNIC_OPEN, from);
|
|
117
|
-
if (open === -1) break;
|
|
118
|
-
const afterOpen = open + REMNIC_OPEN.length;
|
|
119
|
-
const commentEnd = text.indexOf("-->", afterOpen);
|
|
120
|
-
if (commentEnd === -1) break;
|
|
121
|
-
const inner = text.slice(afterOpen, commentEnd).trim();
|
|
122
|
-
if (inner.endsWith(":start")) {
|
|
123
|
-
const name = inner.slice(0, -":start".length);
|
|
124
|
-
if (name.length > 0) starts.push({ name, start: open, after: commentEnd + 3 });
|
|
125
|
-
} else if (inner.endsWith(":end")) {
|
|
126
|
-
const name = inner.slice(0, -":end".length);
|
|
127
|
-
if (name.length > 0) ends.push({ name, start: open, end: commentEnd + 3 });
|
|
128
|
-
}
|
|
129
|
-
from = commentEnd + 3;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const usedEnds = new Set<number>();
|
|
133
|
-
const intervals: Array<{ start: number; end: number }> = [];
|
|
134
|
-
const warnings: string[] = [];
|
|
135
|
-
|
|
136
|
-
for (const start of starts) {
|
|
137
|
-
const match = ends.find((end) => end.name === start.name && end.start >= start.after && !usedEnds.has(end.start));
|
|
138
|
-
if (match) {
|
|
139
|
-
usedEnds.add(match.start);
|
|
140
|
-
intervals.push({ start: start.start, end: eatTrailingNewline(text, match.end) });
|
|
141
|
-
} else {
|
|
142
|
-
intervals.push({ start: start.start, end: text.length });
|
|
143
|
-
warnings.push(`unclosed remnic region "${start.name}"`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
for (const end of ends) {
|
|
148
|
-
if (usedEnds.has(end.start)) continue;
|
|
149
|
-
const startBefore = starts.some((start) => start.start < end.start);
|
|
150
|
-
if (!startBefore) intervals.push({ start: 0, end: eatTrailingNewline(text, end.end) });
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return { intervals: mergeIntervals(intervals), warnings };
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function eatTrailingNewline(text: string, index: number): number {
|
|
157
|
-
if (text[index] === "\n") return index + 1;
|
|
158
|
-
if (text[index] === "\r" && text[index + 1] === "\n") return index + 2;
|
|
159
|
-
if (text[index] === "\r") return index + 1;
|
|
160
|
-
return index;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function mergeIntervals(items: Array<{ start: number; end: number }>): Array<{ start: number; end: number }> {
|
|
164
|
-
if (items.length === 0) return [];
|
|
165
|
-
const sorted = items.slice().sort((a, b) => a.start - b.start || a.end - b.end);
|
|
166
|
-
const out = [{ start: sorted[0]!.start, end: sorted[0]!.end }];
|
|
167
|
-
for (let i = 1; i < sorted.length; i++) {
|
|
168
|
-
const cur = sorted[i]!;
|
|
169
|
-
const last = out[out.length - 1]!;
|
|
170
|
-
if (cur.start <= last.end) last.end = Math.max(last.end, cur.end);
|
|
171
|
-
else out.push({ start: cur.start, end: cur.end });
|
|
172
|
-
}
|
|
173
|
-
return out;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function cutIntervals(
|
|
177
|
-
text: string,
|
|
178
|
-
found: { intervals: Array<{ start: number; end: number }>; warnings: string[] },
|
|
179
|
-
): { text: string; warnings: string[] } {
|
|
180
|
-
let out = "";
|
|
181
|
-
let pos = 0;
|
|
182
|
-
for (const interval of found.intervals) {
|
|
183
|
-
if (interval.start > pos) out += text.slice(pos, interval.start);
|
|
184
|
-
pos = Math.max(pos, interval.end);
|
|
185
|
-
}
|
|
186
|
-
if (pos < text.length) out += text.slice(pos);
|
|
187
|
-
return { text: out, warnings: found.warnings };
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function stripPublishHeadings(text: string, names: readonly string[]): string {
|
|
191
|
-
if (names.length === 0 || text.length === 0) return text;
|
|
192
|
-
const lines = text.split("\n");
|
|
193
|
-
const keep = lines.map(() => true);
|
|
194
|
-
for (let i = 0; i < lines.length; i++) {
|
|
195
|
-
if (!keep[i]) continue;
|
|
196
|
-
const heading = parseAtxHeading(lines[i]!);
|
|
197
|
-
if (!heading || !names.includes(heading.text)) continue;
|
|
198
|
-
keep[i] = false;
|
|
199
|
-
for (let j = i + 1; j < lines.length; j++) {
|
|
200
|
-
const next = parseAtxHeading(lines[j]!);
|
|
201
|
-
if (next && next.level <= heading.level) break;
|
|
202
|
-
keep[j] = false;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
return lines.filter((_, i) => keep[i]).join("\n");
|
|
206
|
-
}
|
|
207
|
-
|
|
208
78
|
function trimNewlines(text: string): string {
|
|
209
79
|
let start = 0;
|
|
210
80
|
let end = text.length;
|
|
@@ -32,44 +32,95 @@ test("activity.timeline.journal.enabled defaults off", () => {
|
|
|
32
32
|
);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
test("activity.timeline.journal source defaults to
|
|
35
|
+
test("activity.timeline.journal source defaults to memoryDir with extraction off", () => {
|
|
36
36
|
const journal = parseActivityConfig(undefined).timeline.journal;
|
|
37
|
-
assert.
|
|
38
|
-
assert.equal(journal.heading, undefined);
|
|
37
|
+
assert.deepEqual(journal, { enabled: false, source: "memoryDir", extractionMode: "off" });
|
|
39
38
|
});
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
const VAULT_OK = {
|
|
41
|
+
enabled: true,
|
|
42
|
+
vaultPath: "/vault",
|
|
43
|
+
readback: { journalSection: "Journal" },
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
test("activity.timeline.journal vault mode parses with prerequisites satisfied", () => {
|
|
47
|
+
const journal = parseActivityConfig({
|
|
48
|
+
timeline: { journal: { enabled: true, source: "vault" }, vault: VAULT_OK },
|
|
49
|
+
}).timeline.journal;
|
|
50
|
+
assert.deepEqual(journal, { enabled: true, source: "vault", extractionMode: "off" });
|
|
44
51
|
});
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
);
|
|
53
|
+
function captureError(fn: () => unknown): Error {
|
|
54
|
+
try {
|
|
55
|
+
fn();
|
|
56
|
+
} catch (err) {
|
|
57
|
+
return err as Error;
|
|
52
58
|
}
|
|
59
|
+
throw new Error("expected parseActivityConfig to throw");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
test("activity.timeline.journal vault mode names every missing prerequisite", () => {
|
|
63
|
+
const err = captureError(() => parseActivityConfig({ timeline: { journal: { source: "vault" } } }));
|
|
64
|
+
assert.ok(err instanceof RangeError);
|
|
65
|
+
assert.match(err.message, /vault\.readback\.journalSection/);
|
|
53
66
|
});
|
|
54
67
|
|
|
55
|
-
test("activity.timeline.journal
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
test("activity.timeline.journal vault mode with only the section set still names vault.enabled and dailyNotePath", () => {
|
|
69
|
+
const err = captureError(() =>
|
|
70
|
+
parseActivityConfig({
|
|
71
|
+
timeline: { journal: { source: "vault" }, vault: { readback: { journalSection: "Diary" } } },
|
|
72
|
+
}),
|
|
59
73
|
);
|
|
74
|
+
assert.ok(err instanceof RangeError);
|
|
75
|
+
assert.doesNotMatch(err.message, /journalSection/);
|
|
76
|
+
assert.match(err.message, /vault\.enabled/);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test("activity.timeline.journal aliases source file to memoryDir", () => {
|
|
80
|
+
const journal = parseActivityConfig({ timeline: { journal: { source: "file" } } }).timeline.journal;
|
|
81
|
+
assert.equal(journal.source, "memoryDir");
|
|
60
82
|
});
|
|
61
83
|
|
|
62
|
-
test("activity.timeline.journal rejects
|
|
84
|
+
test("activity.timeline.journal rejects an unknown source", () => {
|
|
63
85
|
assert.throws(
|
|
64
|
-
() => parseActivityConfig({ timeline: { journal: {
|
|
65
|
-
/activity\.timeline\.journal\.
|
|
86
|
+
() => parseActivityConfig({ timeline: { journal: { source: "disk" } } }),
|
|
87
|
+
/activity\.timeline\.journal\.source must be one of "memoryDir", "vault"/,
|
|
66
88
|
);
|
|
67
89
|
});
|
|
68
90
|
|
|
69
|
-
test("activity.timeline.journal
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
91
|
+
test("activity.timeline.journal.heading fills vault.readback.journalSection when the new key is absent", () => {
|
|
92
|
+
const vault = parseActivityConfig({
|
|
93
|
+
timeline: { journal: { heading: " Diary " }, vault: { readback: { journalSection: "" } } },
|
|
94
|
+
}).timeline.vault;
|
|
95
|
+
assert.equal(vault.readback.journalSection, "Diary");
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test("activity.timeline.vault.readback.journalSection wins over journal.heading", () => {
|
|
99
|
+
const vault = parseActivityConfig({
|
|
100
|
+
timeline: {
|
|
101
|
+
journal: { heading: "Diary" },
|
|
102
|
+
vault: { readback: { journalSection: "Journal" } },
|
|
103
|
+
},
|
|
104
|
+
}).timeline.vault;
|
|
105
|
+
assert.equal(vault.readback.journalSection, "Journal");
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
test("activity.timeline.journal extractionMode allows off and review only", () => {
|
|
110
|
+
for (const extractionMode of ["off", "review"]) {
|
|
111
|
+
const journal = parseActivityConfig({
|
|
112
|
+
timeline: { journal: { extractionMode } },
|
|
113
|
+
}).timeline.journal;
|
|
114
|
+
assert.equal(journal.extractionMode, extractionMode);
|
|
115
|
+
}
|
|
116
|
+
assert.throws(
|
|
117
|
+
() => parseActivityConfig({ timeline: { journal: { extractionMode: "auto" } } }),
|
|
118
|
+
/activity\.timeline\.journal\.extractionMode must be one of "off", "review"/,
|
|
119
|
+
);
|
|
120
|
+
assert.throws(
|
|
121
|
+
() => parseActivityConfig({ timeline: { journal: { extractionMode: "smart" } } }),
|
|
122
|
+
/activity\.timeline\.journal\.extractionMode must be one of "off", "review"/,
|
|
123
|
+
);
|
|
73
124
|
});
|
|
74
125
|
|
|
75
126
|
test("seed is a hard no-op without force", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { access, mkdtemp, readFile, rm } from "node:fs/promises";
|
|
2
|
+
import { access, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import test from "node:test";
|
|
@@ -8,6 +8,7 @@ import { activityDatabasePath, ActivityStore } from "./store.js";
|
|
|
8
8
|
import { activityDigestPath } from "./digest.js";
|
|
9
9
|
import { runActivitySyncOnce } from "./runner.js";
|
|
10
10
|
import { activityCursorKey } from "./pipeline.js";
|
|
11
|
+
import { timelineDayPath } from "./timeline/regenerate.js";
|
|
11
12
|
import { defaultActivityConfig } from "./config.js";
|
|
12
13
|
import type {
|
|
13
14
|
ActivityConfig,
|
|
@@ -490,3 +491,117 @@ test("runActivitySyncOnce reports every local date that gained snapshots (issue
|
|
|
490
491
|
await rm(memoryDir, { recursive: true, force: true });
|
|
491
492
|
}
|
|
492
493
|
});
|
|
494
|
+
|
|
495
|
+
test("runActivitySyncOnce regenerates timeline analysis once per day", async () => {
|
|
496
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-activity-runner-"));
|
|
497
|
+
const store = ActivityStore.open(memoryDir);
|
|
498
|
+
try {
|
|
499
|
+
const pages = new Map<string | null, ActivitySnapshotPage>([
|
|
500
|
+
[null, { snapshots: [snapshot()], nextCursor: null }],
|
|
501
|
+
]);
|
|
502
|
+
const client = fixtureClient("workstation-a", pages);
|
|
503
|
+
let calls = 0;
|
|
504
|
+
const base = defaultActivityConfig();
|
|
505
|
+
const summary = await runActivitySyncOnce({
|
|
506
|
+
config: enabledConfig({
|
|
507
|
+
timeline: {
|
|
508
|
+
...base.timeline,
|
|
509
|
+
enabled: true,
|
|
510
|
+
analysis: { enabled: true, provider: "openai", model: "gpt-test" },
|
|
511
|
+
},
|
|
512
|
+
}),
|
|
513
|
+
memoryDir,
|
|
514
|
+
store,
|
|
515
|
+
now: NOW,
|
|
516
|
+
createSourceClient: () => client,
|
|
517
|
+
analysisDeps: {
|
|
518
|
+
remoteLlm: {
|
|
519
|
+
chatCompletion: async () => {
|
|
520
|
+
calls += 1;
|
|
521
|
+
return { content: '{"ops":[]}' };
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
});
|
|
526
|
+
assert.equal(summary.ranCount, 1);
|
|
527
|
+
assert.equal(calls, 1);
|
|
528
|
+
await runActivitySyncOnce({
|
|
529
|
+
config: enabledConfig({
|
|
530
|
+
timeline: {
|
|
531
|
+
...base.timeline,
|
|
532
|
+
enabled: true,
|
|
533
|
+
analysis: { enabled: true, provider: "openai", model: "gpt-test" },
|
|
534
|
+
},
|
|
535
|
+
}),
|
|
536
|
+
memoryDir,
|
|
537
|
+
store,
|
|
538
|
+
now: NOW,
|
|
539
|
+
createSourceClient: () => client,
|
|
540
|
+
analysisDeps: {
|
|
541
|
+
remoteLlm: {
|
|
542
|
+
chatCompletion: async () => {
|
|
543
|
+
calls += 1;
|
|
544
|
+
return { content: '{"ops":[]}' };
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
});
|
|
549
|
+
assert.equal(calls, 1, "second sync must not re-run analysis for unchanged evidence");
|
|
550
|
+
} finally {
|
|
551
|
+
store.close();
|
|
552
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
test("next sync re-analyzes a pending day and does not repeat a failed analysis", async () => {
|
|
557
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-activity-runner-"));
|
|
558
|
+
const store = ActivityStore.open(memoryDir);
|
|
559
|
+
try {
|
|
560
|
+
const pages = new Map<string | null, ActivitySnapshotPage>([
|
|
561
|
+
[null, { snapshots: [snapshot()], nextCursor: null }],
|
|
562
|
+
]);
|
|
563
|
+
const client = fixtureClient("workstation-a", pages);
|
|
564
|
+
const base = defaultActivityConfig();
|
|
565
|
+
const analysis = { enabled: true, provider: "openai", model: "gpt-test" };
|
|
566
|
+
const syncOpts = {
|
|
567
|
+
config: enabledConfig({ timeline: { ...base.timeline, enabled: true, analysis } }),
|
|
568
|
+
memoryDir,
|
|
569
|
+
store,
|
|
570
|
+
now: NOW,
|
|
571
|
+
createSourceClient: () => client,
|
|
572
|
+
analysisDeps: {
|
|
573
|
+
remoteLlm: {
|
|
574
|
+
chatCompletion: async () => {
|
|
575
|
+
throw new Error("unused");
|
|
576
|
+
},
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
};
|
|
580
|
+
let calls = 0;
|
|
581
|
+
const okRemote = {
|
|
582
|
+
remoteLlm: {
|
|
583
|
+
chatCompletion: async (): Promise<{ content: string }> => {
|
|
584
|
+
calls += 1;
|
|
585
|
+
return { content: '{"ops":[]}' };
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
};
|
|
589
|
+
await runActivitySyncOnce({ ...syncOpts, analysisDeps: okRemote });
|
|
590
|
+
assert.equal(calls, 1);
|
|
591
|
+
const dayPath = timelineDayPath(memoryDir, "2026-07-22");
|
|
592
|
+
const persisted = JSON.parse(await readFile(dayPath, "utf8")) as { status: string };
|
|
593
|
+
// A crash after the deterministic prewrite leaves "pending" on disk.
|
|
594
|
+
persisted.status = "pending";
|
|
595
|
+
await writeFile(dayPath, `${JSON.stringify(persisted)}\n`);
|
|
596
|
+
await runActivitySyncOnce({ ...syncOpts, analysisDeps: okRemote });
|
|
597
|
+
assert.equal(calls, 2, "a pending prewrite must be re-analyzed by the next sync");
|
|
598
|
+
// A completed provider failure is terminal: no repeated spend.
|
|
599
|
+
persisted.status = "provider_failed";
|
|
600
|
+
await writeFile(dayPath, `${JSON.stringify(persisted)}\n`);
|
|
601
|
+
await runActivitySyncOnce({ ...syncOpts, analysisDeps: okRemote });
|
|
602
|
+
assert.equal(calls, 2, "a completed provider failure must not repeat the provider call");
|
|
603
|
+
} finally {
|
|
604
|
+
store.close();
|
|
605
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
606
|
+
}
|
|
607
|
+
});
|
package/src/activity/runner.ts
CHANGED
|
@@ -26,7 +26,9 @@ import { syncActivitySource } from "./pipeline.js";
|
|
|
26
26
|
import { ActivityHttpSourceClient } from "./source-client.js";
|
|
27
27
|
import { activityDateInTimezone } from "./digest.js";
|
|
28
28
|
import { displayErrorDetail } from "../runtime/better-sqlite.js";
|
|
29
|
+
import type { PluginConfig } from "../types.js";
|
|
29
30
|
import type { ActivityConfig, ActivitySourceClient, ActivitySourceConfig } from "./types.js";
|
|
31
|
+
import { regenerateTimelineDay, type TimelineAnalysisClients } from "./timeline/regenerate.js";
|
|
30
32
|
|
|
31
33
|
type ActivityNow = Date | (() => Date);
|
|
32
34
|
|
|
@@ -86,6 +88,10 @@ export interface ActivitySyncRunOptions {
|
|
|
86
88
|
* Host wires the core index seam (SearchBackend.update); best-effort.
|
|
87
89
|
*/
|
|
88
90
|
reindexSearch?: (signal?: AbortSignal) => Promise<void>;
|
|
91
|
+
/** Full plugin config so regenerate can construct local/remote LLM clients. */
|
|
92
|
+
pluginConfig?: PluginConfig;
|
|
93
|
+
/** Injected analysis clients; tests and hosts that already own them. */
|
|
94
|
+
analysisDeps?: TimelineAnalysisClients;
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
/** Previous calendar date via pure date arithmetic (no DST wall-clock drift). */
|
|
@@ -217,6 +223,25 @@ export async function runActivitySyncOnce(options: ActivitySyncRunOptions): Prom
|
|
|
217
223
|
// a client or contacts a daemon — teardown settles promptly.
|
|
218
224
|
if (options.signal?.aborted) break;
|
|
219
225
|
}
|
|
226
|
+
if (options.config.timeline.enabled && !options.signal?.aborted) {
|
|
227
|
+
for (const date of dates) {
|
|
228
|
+
try {
|
|
229
|
+
await regenerateTimelineDay({
|
|
230
|
+
date,
|
|
231
|
+
timezone: options.config.timezone,
|
|
232
|
+
memoryDir: options.memoryDir,
|
|
233
|
+
store,
|
|
234
|
+
timelineEnabled: true,
|
|
235
|
+
analysis: options.config.timeline.analysis,
|
|
236
|
+
...(options.pluginConfig === undefined ? {} : { pluginConfig: options.pluginConfig }),
|
|
237
|
+
...(options.analysisDeps === undefined ? {} : { deps: options.analysisDeps }),
|
|
238
|
+
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
239
|
+
});
|
|
240
|
+
} catch {
|
|
241
|
+
// Analysis/persist faults must not fail the durable sync.
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
220
245
|
} finally {
|
|
221
246
|
if (ownStore) store.close();
|
|
222
247
|
}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { runActivitySyncOnce, type ActivitySyncRunSummary } from "./runner.js";
|
|
21
|
+
import type { PluginConfig } from "../types.js";
|
|
21
22
|
import type { ActivityConfig } from "./types.js";
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -47,6 +48,8 @@ export interface ActivitySyncSchedulerOptions {
|
|
|
47
48
|
onRun?: (summary: ActivitySyncRunSummary) => void;
|
|
48
49
|
/** Called when a tick's sync rejects; defaults to swallowing (best-effort). */
|
|
49
50
|
onError?: (error: unknown) => void;
|
|
51
|
+
/** Full plugin config forwarded to the default runner for analysis clients. */
|
|
52
|
+
pluginConfig?: PluginConfig;
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
export interface ActivitySyncRegistration {
|
|
@@ -88,6 +91,7 @@ export class ActivitySyncScheduler {
|
|
|
88
91
|
memoryDir: this.memoryDir,
|
|
89
92
|
signal,
|
|
90
93
|
...(options.reindexSearch === undefined ? {} : { reindexSearch: options.reindexSearch }),
|
|
94
|
+
...(options.pluginConfig === undefined ? {} : { pluginConfig: options.pluginConfig }),
|
|
91
95
|
}));
|
|
92
96
|
this.setTimer =
|
|
93
97
|
options.setTimer ??
|
|
@@ -224,3 +224,21 @@ test("insertSnapshot rejects an unknown textSource", async () => {
|
|
|
224
224
|
assert.throws(() => store.insertSnapshot(snapshot({ textSource: "screen" as unknown as "ax" })), RangeError);
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
|
+
|
|
228
|
+
test("snapshotCaptureExtent is null on an empty store", async () => {
|
|
229
|
+
await withStore((store) => {
|
|
230
|
+
assert.equal(store.snapshotCaptureExtent(), null);
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
test("snapshotCaptureExtent returns the min and max capture instants", async () => {
|
|
235
|
+
await withStore((store) => {
|
|
236
|
+
store.insertSnapshot(snapshot({ contentHash: "mid", capturedAtUtc: "2026-03-10T14:00:00.000Z" }));
|
|
237
|
+
store.insertSnapshot(snapshot({ contentHash: "old", capturedAtUtc: "2026-02-01T09:00:00.000Z" }));
|
|
238
|
+
store.insertSnapshot(snapshot({ contentHash: "new", capturedAtUtc: "2026-05-20T23:00:00.000Z" }));
|
|
239
|
+
assert.deepEqual(store.snapshotCaptureExtent(), {
|
|
240
|
+
firstUtc: "2026-02-01T09:00:00.000Z",
|
|
241
|
+
lastUtc: "2026-05-20T23:00:00.000Z",
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
});
|
package/src/activity/store.ts
CHANGED
|
@@ -346,6 +346,20 @@ export class ActivityStore {
|
|
|
346
346
|
return ids.length;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
+
/**
|
|
350
|
+
* First and last stored capture instants (canonical UTC strings), or null
|
|
351
|
+
* when no snapshots exist. Backs the unbounded timeline search window.
|
|
352
|
+
*/
|
|
353
|
+
snapshotCaptureExtent(): { firstUtc: string; lastUtc: string } | null {
|
|
354
|
+
const row = this.db
|
|
355
|
+
.prepare("SELECT MIN(captured_at_utc) AS first, MAX(captured_at_utc) AS last FROM activity_snapshots")
|
|
356
|
+
.get();
|
|
357
|
+
if (!isRecord(row) || typeof row.first !== "string" || typeof row.last !== "string") {
|
|
358
|
+
return null;
|
|
359
|
+
}
|
|
360
|
+
return { firstUtc: row.first, lastUtc: row.last };
|
|
361
|
+
}
|
|
362
|
+
|
|
349
363
|
close(): void {
|
|
350
364
|
this.db.close();
|
|
351
365
|
}
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
import { refreshActivityIndex, type ActivityIndexRefresher } from "./reindex.js";
|
|
26
26
|
import type { ActivitySyncRunSummary } from "./runner.js";
|
|
27
27
|
import { ActivitySyncScheduler, type ActivitySyncSchedulerOptions } from "./scheduler.js";
|
|
28
|
+
import type { PluginConfig } from "../types.js";
|
|
28
29
|
import type { ActivityConfig } from "./types.js";
|
|
29
30
|
import { log } from "../logger.js";
|
|
30
31
|
|
|
@@ -59,6 +60,8 @@ export interface ActivitySyncRegistrarDeps {
|
|
|
59
60
|
readonly onSynced?: (summary: ActivitySyncRunSummary) => void;
|
|
60
61
|
/** Scheduler factory (injectable for tests); defaults to the real scheduler. */
|
|
61
62
|
readonly createScheduler?: (options: ActivitySyncSchedulerOptions) => ActivitySyncSchedulerLike;
|
|
63
|
+
/** Full plugin config so the default runner can build analysis clients. */
|
|
64
|
+
readonly pluginConfig?: PluginConfig;
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
export class ActivitySyncRegistrar {
|
|
@@ -108,6 +111,7 @@ export class ActivitySyncRegistrar {
|
|
|
108
111
|
// Strict refresh after each digest write (rule 31): bypasses the
|
|
109
112
|
// min-interval gate and throws on a real failure.
|
|
110
113
|
reindexSearch: (sig) => refreshActivityIndex(this.deps.getQmd(), this.deps.qmdCollection, sig),
|
|
114
|
+
...(this.deps.pluginConfig === undefined ? {} : { pluginConfig: this.deps.pluginConfig }),
|
|
111
115
|
// A failed reindex (QMD down) leaves the next unchanged-digest tick
|
|
112
116
|
// skipping afterWrites, so route the retry through the durable,
|
|
113
117
|
// throttled QMD path — but never after teardown.
|
|
@@ -20,6 +20,8 @@ export interface AnalysisRunMetadata {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const ANALYSIS_METADATA_MAX_FIELD_LENGTH = 120;
|
|
23
|
+
/** True when value is an identifier-safe provider/model/promptVersion string. */
|
|
24
|
+
export const isAnalysisIdentifier = (value: string): boolean => IDENTIFIER.test(value);
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* Identifier syntax for provider and model: letters, digits, and the
|