@remnic/core 9.69.22 → 9.69.24
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/abstraction-nodes.js +3 -2
- package/dist/access-admin-ops-surface.d.ts +14 -12
- package/dist/access-admin-ops-surface.js +94 -91
- package/dist/access-authorization-probe.d.ts +14 -12
- package/dist/access-authorization-probe.js +95 -92
- package/dist/access-boundary.d.ts +14 -12
- package/dist/access-boundary.js +94 -91
- package/dist/access-citation-namespace.js +3 -3
- package/dist/access-cli.js +200 -195
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +2 -1
- package/dist/access-extraction-force-flush.d.ts +14 -12
- package/dist/access-extraction-force-flush.js +94 -91
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-briefing.d.ts +156 -0
- package/dist/access-http-briefing.js +233 -0
- package/dist/access-http-lcm-compaction.d.ts +14 -12
- package/dist/access-http-lifecycle-flush.d.ts +14 -12
- package/dist/access-http-offline-stream.d.ts +14 -12
- package/dist/access-http-query.d.ts +3 -2
- package/dist/access-http-query.js +96 -93
- package/dist/access-http.d.ts +15 -13
- package/dist/access-http.js +119 -114
- package/dist/access-identity-continuity-surface.d.ts +12 -10
- package/dist/access-identity-continuity-surface.js +94 -91
- package/dist/access-lcm-surface.d.ts +14 -12
- package/dist/access-lcm-surface.js +94 -91
- package/dist/access-mcp.d.ts +14 -12
- package/dist/access-mcp.js +105 -101
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-BMHhxoL9.d.ts → access-namespace-preflight-BsvmyENS.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +4 -3
- package/dist/access-namespace-preflight.js +94 -91
- package/dist/access-observe-transcript.d.ts +12 -10
- package/dist/access-observe-write-surface.d.ts +14 -12
- package/dist/access-observe-write-surface.js +94 -91
- package/dist/access-offline-manifest.d.ts +12 -10
- package/dist/access-offline-manifest.js +15 -15
- package/dist/access-operations-batch.js +99 -95
- package/dist/access-operations.d.ts +14 -12
- package/dist/access-operations.js +104 -100
- package/dist/access-recall-concurrency.d.ts +14 -12
- package/dist/access-recall-concurrency.js +94 -91
- package/dist/access-recall-response.d.ts +14 -12
- package/dist/access-recall-response.js +94 -91
- package/dist/access-recall-surface.d.ts +14 -12
- package/dist/access-recall-surface.js +94 -91
- package/dist/access-schema.js +8 -7
- package/dist/{access-service-BlsNXFwx.d.ts → access-service-DWdY9Mlk.d.ts} +7 -7
- package/dist/access-service-helpers.d.ts +14 -12
- package/dist/access-service.d.ts +14 -12
- package/dist/access-service.js +94 -91
- package/dist/access-surface-catalog.d.ts +14 -12
- package/dist/access-surface-catalog.js +97 -93
- 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-recall.d.ts +2 -1
- package/dist/active-recall.js +16 -13
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +7 -7
- 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-GRUJFD2F.js → auto-sync-WNGG2GC2.js} +9 -9
- package/dist/behavior-learner.d.ts +2 -1
- package/dist/behavior-signals.d.ts +2 -1
- package/dist/bootstrap.d.ts +12 -10
- package/dist/briefing-window.d.ts +3 -2
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +36 -36
- 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 +13 -13
- package/dist/bulk-import/index.d.ts +4 -3
- package/dist/calibration.d.ts +2 -1
- package/dist/calibration.js +2 -1
- package/dist/calibration.js.map +1 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/{capsule-merge-SEHERWWP.js → capsule-merge-IPG4IOFP.js} +5 -5
- package/dist/{catalog-C1qHsGew.d.ts → catalog-CDZLyiXL.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +2 -1
- package/dist/causal-behavior.js +4 -3
- package/dist/causal-behavior.js.map +1 -1
- package/dist/causal-chain.js +4 -3
- package/dist/causal-consolidation.d.ts +2 -1
- package/dist/causal-consolidation.js +42 -42
- package/dist/causal-retrieval.js +4 -3
- package/dist/causal-retrieval.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +5 -2
- package/dist/causal-trajectory-graph.js +6 -2
- package/dist/causal-trajectory-graph.js.map +1 -1
- package/dist/causal-trajectory.js +3 -2
- package/dist/{chunk-KTVSPFCQ.js → chunk-22FVR2KE.js} +2 -2
- package/dist/{chunk-7Y5V3LAP.js → chunk-27QVNSQ3.js} +2 -2
- package/dist/{chunk-R7LY4YKF.js → chunk-2EKJDQZB.js} +2 -2
- package/dist/{chunk-FCATYKQA.js → chunk-2IOHTUP3.js} +263 -13
- package/dist/chunk-2IOHTUP3.js.map +1 -0
- package/dist/{chunk-HOUST5UX.js → chunk-2ITE4C2Z.js} +2 -2
- package/dist/{chunk-JOYC4RYC.js → chunk-2JVJ7UHC.js} +2 -2
- package/dist/{chunk-X2NFFBTO.js → chunk-2L5FSNPC.js} +7 -7
- package/dist/{chunk-DUAJKRR2.js → chunk-2SGLMP2E.js} +2 -2
- package/dist/{chunk-6FUMA6AA.js → chunk-2Z4GS5E6.js} +2 -2
- package/dist/{chunk-G6MXN2G5.js → chunk-37KUQPX4.js} +6 -6
- package/dist/{chunk-DDQQY2E3.js → chunk-3BTFBQLO.js} +7 -7
- package/dist/chunk-3BTFBQLO.js.map +1 -0
- package/dist/{chunk-UR6PBX2J.js → chunk-3K7V3HE6.js} +35 -60
- package/dist/chunk-3K7V3HE6.js.map +1 -0
- package/dist/{chunk-WKAXBXVA.js → chunk-3QQTXYZ6.js} +2 -2
- package/dist/{chunk-DJUKBGAD.js → chunk-46EST7JO.js} +5 -5
- package/dist/chunk-46EST7JO.js.map +1 -0
- package/dist/{chunk-4ZWCQJNM.js → chunk-46WM6JX2.js} +5 -5
- package/dist/{chunk-CASWJ2HM.js → chunk-46ZPIGWI.js} +3 -3
- package/dist/{chunk-HTIIXNJQ.js → chunk-4FIH6MPS.js} +6 -3
- package/dist/chunk-4FIH6MPS.js.map +1 -0
- package/dist/{chunk-MCA2X4WH.js → chunk-4IHBN6WU.js} +2 -2
- package/dist/{chunk-W7IGLX4G.js → chunk-4O6WRBGE.js} +7 -7
- package/dist/chunk-4O6WRBGE.js.map +1 -0
- package/dist/{chunk-FB7LAJQM.js → chunk-4TKJGOCJ.js} +2 -2
- package/dist/{chunk-H7BZBSP6.js → chunk-52II7PB6.js} +4 -4
- package/dist/{chunk-N4Y5T6VD.js → chunk-54WHLA65.js} +4 -4
- package/dist/chunk-56Y6EKZN.js +24 -0
- package/dist/chunk-56Y6EKZN.js.map +1 -0
- package/dist/{chunk-YVLENSNS.js → chunk-5ATKSPEQ.js} +2 -2
- package/dist/{chunk-OLT3YTDH.js → chunk-5FAGCOZD.js} +37 -24
- package/dist/chunk-5FAGCOZD.js.map +1 -0
- package/dist/{chunk-ZVZHG7AI.js → chunk-5UBH37SL.js} +3 -3
- package/dist/{chunk-N3WZU76A.js → chunk-66OJSCI6.js} +2 -2
- package/dist/{chunk-D35XLYQ7.js → chunk-6CVNSDCZ.js} +11 -11
- package/dist/{chunk-KA2HZCMG.js → chunk-6NXSYYGP.js} +2 -2
- package/dist/{chunk-2HIJHXB3.js → chunk-6WHJ2EAB.js} +2 -2
- package/dist/{chunk-ZZM476NV.js → chunk-6XL73HQ4.js} +4 -4
- package/dist/{chunk-EJ5RKUXW.js → chunk-AQ7SYDVO.js} +2 -2
- package/dist/{chunk-2Z3DG5CQ.js → chunk-B3O3IRZN.js} +2 -2
- package/dist/{chunk-P77QX3ID.js → chunk-B6O2YLUR.js} +21 -20
- package/dist/chunk-B6O2YLUR.js.map +1 -0
- package/dist/{chunk-RACZB5HT.js → chunk-BD7JTBYP.js} +4 -4
- package/dist/{chunk-I762GW7V.js → chunk-BLJWYCNO.js} +5 -5
- package/dist/{chunk-ACPCA4NO.js → chunk-BMWN7B3Y.js} +6 -6
- package/dist/chunk-BMWN7B3Y.js.map +1 -0
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-KK66P5GQ.js → chunk-C553ZTLF.js} +46 -48
- package/dist/chunk-C553ZTLF.js.map +1 -0
- package/dist/{chunk-GCASGYIO.js → chunk-C7HJ3NEI.js} +2 -2
- package/dist/{chunk-C24UZSFW.js → chunk-CEH2AFXG.js} +6 -6
- package/dist/{chunk-WVGXCBOC.js → chunk-D5F7TKMH.js} +2 -2
- package/dist/chunk-DGS34QSY.js +141 -0
- package/dist/chunk-DGS34QSY.js.map +1 -0
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/{chunk-2OXIPF3A.js → chunk-DZD3WGCD.js} +4 -4
- package/dist/{chunk-UMEOXLIZ.js → chunk-E2P7TZTF.js} +5 -5
- package/dist/{chunk-6FC3IZ26.js → chunk-EBA5DA77.js} +2 -2
- package/dist/{chunk-N7JK2RKG.js → chunk-EOQ6FSQP.js} +2 -2
- package/dist/chunk-EUT2WCWS.js +54 -0
- package/dist/chunk-EUT2WCWS.js.map +1 -0
- package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
- package/dist/{chunk-XDMI5VKE.js → chunk-FVOP3NT7.js} +2 -2
- package/dist/{chunk-NRLELHAY.js → chunk-G7NYVKD6.js} +2 -2
- package/dist/{chunk-B3W7GWQB.js → chunk-GHTSNGBZ.js} +2 -2
- package/dist/chunk-GKCXTSFF.js +17 -0
- package/dist/chunk-GKCXTSFF.js.map +1 -0
- package/dist/{chunk-LUDBXTBJ.js → chunk-H272ZPQ3.js} +5 -5
- package/dist/{chunk-SN4JXNLL.js → chunk-H3TKENU4.js} +2 -2
- package/dist/{chunk-4HYNMLT6.js → chunk-H4SEGIZY.js} +2 -2
- package/dist/{chunk-ACZN5ZXD.js → chunk-H54VWRPS.js} +13 -13
- package/dist/{chunk-HTP6XRUI.js → chunk-HM7RHKS4.js} +2 -2
- package/dist/{chunk-Z3SQEEB6.js → chunk-HWLIMQE2.js} +2 -2
- package/dist/{chunk-NQFCLAYT.js → chunk-ICKJ52PE.js} +99 -322
- package/dist/chunk-ICKJ52PE.js.map +1 -0
- package/dist/{chunk-2QSZNTDO.js → chunk-JBPKEARU.js} +7 -7
- package/dist/{chunk-DK6GMO6D.js → chunk-JEC4DVM3.js} +16 -16
- package/dist/chunk-JEC4DVM3.js.map +1 -0
- package/dist/{chunk-ET2CNMLD.js → chunk-JN72EPOE.js} +2 -2
- package/dist/{chunk-U62OK7BB.js → chunk-JPKK466T.js} +188 -21
- package/dist/chunk-JPKK466T.js.map +1 -0
- package/dist/{chunk-JCCWJHOP.js → chunk-JYZSRNR7.js} +2 -2
- package/dist/{chunk-7D6HXODY.js → chunk-K7724CH2.js} +2 -2
- package/dist/{chunk-X33MJFD2.js → chunk-KAXCYM66.js} +3 -3
- package/dist/{chunk-7RRUHJPG.js → chunk-KB2G2I6Q.js} +3 -3
- package/dist/{chunk-ZXBTTMGZ.js → chunk-KEF46KL2.js} +5 -5
- package/dist/{chunk-5UZXUTVO.js → chunk-KNA3BXXL.js} +6 -2
- package/dist/chunk-KNA3BXXL.js.map +1 -0
- package/dist/{chunk-UWTDARPF.js → chunk-KTWG7CNY.js} +6 -6
- package/dist/{chunk-XQYTSZW3.js → chunk-L7Z57SID.js} +6 -6
- package/dist/{chunk-JMAG7WZ7.js → chunk-LO4UKPKX.js} +3 -3
- package/dist/{chunk-LDWIPYJ6.js → chunk-LS2FHUML.js} +3 -3
- package/dist/{chunk-GDB4J2H3.js → chunk-MPC7TYTZ.js} +2 -2
- package/dist/{chunk-2GF27PGH.js → chunk-MRPOZBJC.js} +3 -3
- package/dist/{chunk-BR3OOQZQ.js → chunk-MWN6QEI2.js} +2 -2
- package/dist/{chunk-NZGO2GKL.js → chunk-MY5EDR46.js} +4 -4
- package/dist/{chunk-LCMUZDBZ.js → chunk-N3ZOP7KC.js} +3 -3
- package/dist/{chunk-TVW4C7PV.js → chunk-NB3LRY4T.js} +6 -6
- package/dist/{chunk-QJCWK2A7.js → chunk-ND6IQGSZ.js} +2 -2
- package/dist/{chunk-NOB2T2FC.js → chunk-NHLLKEKK.js} +2 -2
- package/dist/{chunk-7GSSHAXC.js → chunk-NLYVH66G.js} +6 -6
- package/dist/chunk-NLYVH66G.js.map +1 -0
- package/dist/{chunk-EJIWBTVM.js → chunk-O6ZNNVSP.js} +2 -2
- package/dist/{chunk-AG46P24C.js → chunk-OB3XMWX5.js} +4 -4
- package/dist/{chunk-NYRB7BKY.js → chunk-OEYZXDQI.js} +6 -6
- package/dist/chunk-OEYZXDQI.js.map +1 -0
- package/dist/{chunk-46QMN7I7.js → chunk-PAZY2ZKP.js} +6 -6
- package/dist/{chunk-EF4JUM55.js → chunk-PX4UMA5Z.js} +2 -2
- package/dist/chunk-QLK3SL7Q.js +242 -0
- package/dist/chunk-QLK3SL7Q.js.map +1 -0
- package/dist/{chunk-GGYDJJBO.js → chunk-QOOBICJF.js} +5 -5
- package/dist/chunk-QOOBICJF.js.map +1 -0
- package/dist/{chunk-NNZFPYYX.js → chunk-R7QY5ZVB.js} +2 -2
- package/dist/{chunk-RO2X2EYM.js → chunk-R7RTXEYG.js} +2 -2
- package/dist/{chunk-3LJPSRAN.js → chunk-RBCQVOVJ.js} +3 -3
- package/dist/{chunk-N4F7ZSSG.js → chunk-RC5DXXWC.js} +2 -2
- package/dist/{chunk-VLAQV4HT.js → chunk-RJYJ7KR7.js} +1636 -611
- package/dist/chunk-RJYJ7KR7.js.map +1 -0
- package/dist/{chunk-5CF2R4NS.js → chunk-RKBLRTNT.js} +2 -2
- package/dist/{chunk-5QZR2RA3.js → chunk-ROBHL3GL.js} +2 -2
- package/dist/{chunk-D5ZNOKR7.js → chunk-S7T2TY65.js} +3 -3
- package/dist/{chunk-C2JCVZWX.js → chunk-SCXURCVT.js} +25 -13
- package/dist/chunk-SCXURCVT.js.map +1 -0
- package/dist/{chunk-3LADWWMA.js → chunk-SJDQ5RSN.js} +3 -3
- package/dist/{chunk-45XVII3J.js → chunk-SMWTZLHE.js} +99 -89
- package/dist/{chunk-45XVII3J.js.map → chunk-SMWTZLHE.js.map} +1 -1
- package/dist/{chunk-XOQGUGJL.js → chunk-SO7SV523.js} +1 -1
- package/dist/{chunk-XOQGUGJL.js.map → chunk-SO7SV523.js.map} +1 -1
- package/dist/{chunk-CHWUICVY.js → chunk-SV4Z2S67.js} +4 -4
- package/dist/{chunk-JHP45LO5.js → chunk-SVXJLDDC.js} +9 -7
- package/dist/{chunk-JHP45LO5.js.map → chunk-SVXJLDDC.js.map} +1 -1
- package/dist/{chunk-SEF4IOFE.js → chunk-SWIKABKI.js} +2 -2
- package/dist/{chunk-JRRQ747T.js → chunk-TBXAY2SS.js} +13 -13
- package/dist/{chunk-J6A3CX5N.js → chunk-TG3FAM2S.js} +33 -8
- package/dist/{chunk-J6A3CX5N.js.map → chunk-TG3FAM2S.js.map} +1 -1
- package/dist/{chunk-XZBXINXZ.js → chunk-TNSCIPBQ.js} +4 -4
- package/dist/{chunk-S37NN23M.js → chunk-TVEONGBU.js} +2 -2
- package/dist/{chunk-5RPMTFB6.js → chunk-TWF35IC6.js} +3 -3
- package/dist/{chunk-BZTJEILZ.js → chunk-U6N5IBVY.js} +2 -2
- package/dist/{chunk-7TUB6JWA.js → chunk-UCKYTA2T.js} +3 -3
- package/dist/{chunk-PPOT6SPR.js → chunk-UNNPNBR2.js} +11 -11
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-J2R275FN.js → chunk-VVX5PZFS.js} +4 -4
- package/dist/{chunk-ME35HVDJ.js → chunk-VYCOJKSX.js} +2 -2
- package/dist/{chunk-F5UWQ4LX.js → chunk-W24T5YMW.js} +2 -2
- package/dist/{chunk-HDQUQBPW.js → chunk-W3K3HITK.js} +2 -2
- package/dist/{chunk-GDASG7NC.js → chunk-W4F3C7N7.js} +2 -2
- package/dist/{chunk-LFK623SF.js → chunk-WJHGDE7X.js} +5 -5
- package/dist/{chunk-DP4EBV7C.js → chunk-WMLEPWMO.js} +16 -16
- package/dist/chunk-WMLEPWMO.js.map +1 -0
- package/dist/{chunk-3Q6RD76J.js → chunk-WQZZDN5M.js} +5 -5
- package/dist/{chunk-ZJWDWPX6.js → chunk-X5K5TAQZ.js} +4 -4
- package/dist/{chunk-ZL3XX5LW.js → chunk-XM24CDZX.js} +3 -3
- package/dist/{chunk-JTWZKNUH.js → chunk-XOVKXJEP.js} +3 -3
- package/dist/{chunk-OGTKQ5MJ.js → chunk-XSGUMQQQ.js} +62 -50
- package/dist/chunk-XSGUMQQQ.js.map +1 -0
- package/dist/{chunk-X5YYSAZX.js → chunk-XUE46UYW.js} +3 -3
- package/dist/{chunk-DJORULH3.js → chunk-YRLHEEQT.js} +2 -2
- package/dist/{chunk-TA7UZZMW.js → chunk-Z3O53WZR.js} +2 -2
- package/dist/{chunk-4LG4CPOC.js → chunk-Z6COGHHN.js} +2 -2
- package/dist/{chunk-RE3H6Y2X.js → chunk-ZIW5JVRM.js} +2 -2
- package/dist/{cli-BNtvR-nU.d.ts → cli-DD0P-lu8.d.ts} +6 -6
- package/dist/cli.d.ts +16 -14
- package/dist/cli.js +154 -149
- package/dist/coding/export-okf-codegraph.d.ts +2 -1
- package/dist/coding/export-okf-codegraph.js +37 -37
- package/dist/coding/pre-action-gate.d.ts +2 -1
- package/dist/coding/pre-action-gate.js +4 -3
- package/dist/commitment-ledger.js +3 -2
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +37 -37
- 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 +16 -13
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +38 -38
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/codex-materialize.js +4 -4
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +38 -38
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-provenance-check.js +4 -4
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/consolidation-undo.js +3 -3
- package/dist/contradiction/index.d.ts +4 -3
- package/dist/contradiction/index.js +9 -9
- package/dist/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +3 -2
- package/dist/convergence-refresh.js +38 -38
- package/dist/conversation-index/backend.d.ts +2 -1
- package/dist/conversation-index/chunker.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.d.ts +2 -1
- 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 +38 -38
- package/dist/cross-lingual-recall.d.ts +2 -1
- package/dist/cue-anchors.js +4 -3
- package/dist/dashboard-runtime.js +2 -2
- package/dist/day-summary.d.ts +2 -1
- package/dist/deep-recall-http-glue.d.ts +14 -12
- package/dist/deep-recall-http-glue.js +9 -8
- package/dist/deep-recall-mcp-tools.d.ts +14 -12
- package/dist/deep-recall-policy-llm.d.ts +2 -1
- package/dist/deep-recall-seeds.d.ts +2 -1
- package/dist/deep-recall.js +2 -2
- package/dist/delinearize.d.ts +2 -1
- package/dist/dependency-propagation-config.d.ts +2 -1
- package/dist/{dependency-propagation-delivery-DjpUlhLi.d.ts → dependency-propagation-delivery-CQPCu0o5.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 +36 -36
- 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-store.js +4 -3
- package/dist/eval-trajectory.d.ts +2 -1
- package/dist/eval-trajectory.js +4 -3
- package/dist/evals.js +3 -2
- package/dist/event-order-recall.js +2 -2
- package/dist/explicit-capture.d.ts +12 -10
- package/dist/explicit-capture.js +10 -10
- package/dist/external-wiki-access.d.ts +14 -12
- package/dist/external-wiki-access.js +95 -92
- 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 +14 -12
- package/dist/extraction-error-classification.d.ts +2 -1
- package/dist/extraction-faithfulness.d.ts +2 -1
- 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-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 +43 -43
- package/dist/fallback-llm.d.ts +2 -1
- package/dist/{first-start-migration-KHIMCBIC.js → first-start-migration-RC345GPL.js} +6 -5
- package/dist/{first-start-migration-KHIMCBIC.js.map → first-start-migration-RC345GPL.js.map} +1 -1
- package/dist/{forget-2AE4MDK3.js → forget-SZ2BXDGF.js} +3 -3
- package/dist/{graph-444E-DrF.d.ts → graph-DRkl22KE.d.ts} +10 -12
- package/dist/graph-append-error.d.ts +40 -0
- package/dist/graph-append-error.js +8 -0
- package/dist/graph-dashboard-diff.d.ts +5 -2
- package/dist/graph-dashboard-key.d.ts +5 -2
- package/dist/graph-dashboard-parser.d.ts +5 -2
- package/dist/{graph-edge-decay-DGTBFALQ.js → graph-edge-decay-MKIRZ762.js} +10 -4
- package/dist/graph-edge-decay-MKIRZ762.js.map +1 -0
- package/dist/graph-edge-reinforcement.d.ts +5 -2
- package/dist/graph-jsonl.d.ts +82 -0
- package/dist/graph-jsonl.js +23 -0
- package/dist/graph-jsonl.js.map +1 -0
- package/dist/graph-path-reconstruction.d.ts +5 -2
- package/dist/graph-path-scoring.d.ts +5 -2
- package/dist/graph-snapshot.d.ts +5 -2
- package/dist/graph-snapshot.js +7 -3
- package/dist/graph-write-lock.d.ts +84 -0
- package/dist/graph-write-lock.js +15 -0
- package/dist/graph-write-lock.js.map +1 -0
- package/dist/graph.d.ts +5 -2
- package/dist/graph.js +10 -3
- package/dist/harmonic-construction.js +5 -4
- package/dist/harmonic-retrieval.js +5 -4
- package/dist/importance.d.ts +2 -1
- package/dist/importers/index.d.ts +2 -1
- package/dist/in-flight-reads.d.ts +2 -1
- package/dist/{index-CsUrdMyL.d.ts → index-C9VXenR8.d.ts} +2 -2
- package/dist/index.d.ts +39 -25
- package/dist/index.js +291 -284
- package/dist/intent.d.ts +2 -1
- package/dist/json-store.js +2 -1
- package/dist/lcm/engine.d.ts +2 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +2 -1
- package/dist/lcm/index.js +6 -6
- 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/live-connectors-runner.js +3 -2
- package/dist/local-llm.d.ts +2 -1
- package/dist/local-model-endpoint.d.ts +2 -1
- package/dist/location/index.d.ts +4 -3
- package/dist/location/index.js +39 -39
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +36 -36
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +36 -36
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +37 -37
- package/dist/{maintenance-D1GRGLTE.d.ts → maintenance-C14sorKa.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +14 -12
- 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-mutations.js +3 -3
- 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 +14 -12
- package/dist/memory-subject.d.ts +14 -12
- package/dist/memory-subject.js +5 -5
- package/dist/memory-worth-outcomes.d.ts +3 -2
- package/dist/models-json.d.ts +2 -1
- package/dist/namespaces/migrate.d.ts +4 -3
- package/dist/namespaces/migrate.js +37 -37
- 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 +36 -36
- package/dist/native-knowledge.d.ts +2 -1
- package/dist/objective-state-writers.js +4 -3
- package/dist/objective-state.js +3 -2
- package/dist/offline-sync-file-io.js +4 -3
- package/dist/offline-sync-impression-drain.d.ts +2 -1
- package/dist/offline-sync-impression-drain.js +7 -7
- package/dist/offline-sync.js +5 -4
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +39 -39
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-toolkit.d.ts +6 -4
- package/dist/operator-toolkit.js +61 -58
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +46 -46
- package/dist/{orchestrator-DeqaPGT5.d.ts → orchestrator-DgyvFfPR.d.ts} +9 -9
- package/dist/orchestrator.d.ts +12 -10
- package/dist/orchestrator.js +201 -196
- package/dist/page-versioning.d.ts +73 -4
- package/dist/page-versioning.js +11 -3
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-umUzU0D1.d.ts → pipeline-DRUwHb1X.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-Bevrjll9.d.ts → public-http-C4i8Opxc.d.ts} +1 -1
- package/dist/{purge-OP6BEDFY.js → purge-TZKRE6ZQ.js} +5 -5
- package/dist/purge-TZKRE6ZQ.js.map +1 -0
- package/dist/{qmd-BasT78PP.d.ts → qmd-BVWlg1YS.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 +4 -4
- 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-state.d.ts +2 -1
- package/dist/recall-state.js +3 -3
- 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 +2 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +2 -1
- package/dist/reconcile/manifest.d.ts +2 -1
- package/dist/reconcile/manifest.js +7 -7
- 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-4DLI3IOR.js → resolution-VKATP2HT.js} +10 -10
- package/dist/resolution-VKATP2HT.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +21 -18
- 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/salvage-envelope.d.ts +2 -1
- package/dist/salvage-envelope.js +7 -7
- package/dist/{scope-profiles-DXYzyOXW.d.ts → scope-profiles-Vl00B1KU.d.ts} +1 -1
- package/dist/search/document-scanner.js +3 -3
- 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 +16 -16
- package/dist/search/lancedb-backend.d.ts +2 -1
- package/dist/search/lancedb-backend.js +4 -4
- package/dist/search/meilisearch-backend.d.ts +2 -1
- package/dist/search/meilisearch-backend.js +4 -4
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/orama-backend.d.ts +2 -1
- package/dist/search/orama-backend.js +4 -4
- package/dist/search/port.d.ts +2 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/secure-store/index.js +3 -3
- package/dist/{semantic-consolidation-CqDeaY0U.d.ts → semantic-consolidation-BC9-GFuT.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +39 -39
- package/dist/semantic-merge-config.d.ts +17 -0
- package/dist/semantic-merge-config.js +1 -0
- package/dist/semantic-merge-config.js.map +1 -0
- package/dist/semantic-rule-promotion.js +36 -36
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +36 -36
- package/dist/{service-BKD-DVYZ.d.ts → service-BOy6dHfc.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 +2 -1
- package/dist/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +42 -42
- package/dist/source-attribution.d.ts +18 -6
- package/dist/source-attribution.js +3 -1
- package/dist/standup/build.js +36 -36
- package/dist/{storage-BcFd1lN_.d.ts → storage-BLJRnFi6.d.ts} +15 -8
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +35 -35
- package/dist/subject-config.d.ts +2 -1
- package/dist/subject-config.js +6 -6
- package/dist/summarizer.d.ts +2 -1
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/support-passport/index.d.ts +17 -15
- package/dist/support-passport/index.js +97 -94
- 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-stats-2TOW3QNL.js → tier-stats-KA6OZX2C.js} +6 -5
- package/dist/{tier-stats-2TOW3QNL.js.map → tier-stats-KA6OZX2C.js.map} +1 -1
- package/dist/topics.d.ts +2 -1
- package/dist/transcript.d.ts +2 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +6 -6
- package/dist/transfer/export-okf.d.ts +2 -1
- package/dist/transfer/export-okf.js +37 -37
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/trust-zones.js +3 -2
- package/dist/{types-BRg3tMyp.d.ts → types-YY-eKKU7.d.ts} +3 -0
- package/dist/types.d.ts +2 -1
- package/dist/types.js +1 -1
- package/dist/utility-learner.js +4 -3
- package/dist/utility-runtime.d.ts +2 -1
- package/dist/utility-runtime.js +5 -4
- package/dist/utility-telemetry.js +3 -2
- package/dist/verified-recall.js +36 -36
- package/dist/who-knows-cli.d.ts +14 -12
- package/dist/who-knows-cli.js +37 -37
- package/dist/who-knows.d.ts +14 -12
- package/dist/who-knows.js +36 -36
- package/dist/work/board.js +3 -3
- package/dist/work/storage.js +2 -2
- package/dist/work-product-ledger.js +3 -2
- package/dist/write-envelope.d.ts +2 -1
- package/dist/write-envelope.js +6 -6
- package/package.json +2 -2
- package/src/abstraction-nodes.ts +1 -4
- package/src/access-http-briefing.ts +35 -0
- package/src/access-http.test.ts +76 -0
- package/src/access-http.ts +20 -23
- package/src/access-surface-catalog.test.ts +9 -0
- package/src/access-surface-catalog.ts +1 -0
- package/src/binary-lifecycle/backend.ts +2 -1
- package/src/config.ts +2 -0
- package/src/connectors/live/github.ts +10 -17
- package/src/connectors/live/gmail.ts +8 -19
- package/src/connectors/live/google-drive.ts +6 -13
- package/src/connectors/live/notion.ts +11 -21
- package/src/cue-anchors.ts +1 -6
- package/src/dedup/connector-scope.ts +39 -0
- package/src/dedup/merge-content.test.ts +21 -0
- package/src/dedup/merge-content.ts +21 -7
- package/src/dedup/merge-judge.ts +146 -0
- package/src/dedup/merge.test.ts +3542 -0
- package/src/dedup/merge.ts +384 -0
- package/src/dedup/novelty-gate.ts +12 -10
- package/src/dedup/semantic.ts +7 -9
- package/src/graph-append-error.ts +28 -0
- package/src/graph-jsonl.ts +267 -0
- package/src/graph-write-lock.test.ts +228 -0
- package/src/graph-write-lock.ts +132 -0
- package/src/graph.ts +49 -45
- package/src/harmonic-construction.test.ts +329 -0
- package/src/json-store.ts +17 -20
- package/src/live-connectors-runner.ts +2 -1
- package/src/location/store.ts +1 -4
- package/src/maintenance/graph-edge-decay.ts +24 -13
- package/src/maintenance/purge.ts +2 -5
- package/src/maintenance/rebuild-memory-lifecycle-ledger.ts +3 -6
- package/src/maintenance/rebuild-memory-projection.ts +2 -5
- package/src/namespaces/catalog.ts +1 -9
- package/src/offline-sync-file-io.test.ts +39 -0
- package/src/offline-sync-file-io.ts +3 -7
- package/src/orchestration/contradiction-localization.integration.test.ts +35 -0
- package/src/orchestration/extraction-anchor-snapshot.ts +6 -1
- package/src/orchestration/extraction-persist-deps.ts +2 -1
- package/src/orchestration/extraction-persist-profile-promotion.test.ts +456 -0
- package/src/orchestration/extraction-persist-promotion.test.ts +534 -0
- package/src/orchestration/extraction-persist-promotion.ts +387 -1
- package/src/orchestration/extraction-persist.ts +95 -94
- package/src/orchestration/harmonic-construction-persist.test.ts +69 -0
- package/src/orchestration/harmonic-construction-persist.ts +55 -0
- package/src/orchestration/persistence-index.ts +35 -7
- package/src/orchestration/semantic-merge-commit-effects.ts +354 -0
- package/src/orchestration/semantic-merge-persist.ts +1095 -0
- package/src/orchestration/semantic-merge-promotion-payload.ts +161 -0
- package/src/orchestrator.ts +2 -2
- package/src/page-versioning.ts +396 -22
- package/src/procedural/procedure-miner.ts +1 -9
- package/src/search/document-scanner.ts +3 -6
- package/src/semantic-merge-config.ts +16 -0
- package/src/semantic-rule-promotion.ts +1 -4
- package/src/source-attribution-roundtrip.test.ts +21 -0
- package/src/source-attribution.ts +57 -17
- package/src/storage-contract/versioning.test.ts +500 -1
- package/src/storage.ts +30 -30
- package/src/testing/subjects/graph-edge-decay.test.ts +163 -0
- package/src/testing/subjects/semantic-merge-lifecycle.test.ts +1175 -0
- package/src/types.ts +2 -0
- package/src/utils/errno.test.ts +31 -0
- package/src/utils/errno.ts +5 -0
- package/src/wearables/index.ts +1 -0
- package/src/wearables/registry.ts +23 -0
- package/dist/chunk-5UZXUTVO.js.map +0 -1
- package/dist/chunk-7GSSHAXC.js.map +0 -1
- package/dist/chunk-ACPCA4NO.js.map +0 -1
- package/dist/chunk-C2JCVZWX.js.map +0 -1
- package/dist/chunk-DDQQY2E3.js.map +0 -1
- package/dist/chunk-DJUKBGAD.js.map +0 -1
- package/dist/chunk-DK6GMO6D.js.map +0 -1
- package/dist/chunk-DP4EBV7C.js.map +0 -1
- package/dist/chunk-FCATYKQA.js.map +0 -1
- package/dist/chunk-GGYDJJBO.js.map +0 -1
- package/dist/chunk-HTIIXNJQ.js.map +0 -1
- package/dist/chunk-KK66P5GQ.js.map +0 -1
- package/dist/chunk-NQFCLAYT.js.map +0 -1
- package/dist/chunk-NYRB7BKY.js.map +0 -1
- package/dist/chunk-OGTKQ5MJ.js.map +0 -1
- package/dist/chunk-OLT3YTDH.js.map +0 -1
- package/dist/chunk-P77QX3ID.js.map +0 -1
- package/dist/chunk-U62OK7BB.js.map +0 -1
- package/dist/chunk-UR6PBX2J.js.map +0 -1
- package/dist/chunk-VLAQV4HT.js.map +0 -1
- package/dist/chunk-W7IGLX4G.js.map +0 -1
- package/dist/purge-OP6BEDFY.js.map +0 -1
- /package/dist/{capsule-crypto-7FJQINUR.js.map → access-http-briefing.js.map} +0 -0
- /package/dist/{auto-sync-GRUJFD2F.js.map → auto-sync-WNGG2GC2.js.map} +0 -0
- /package/dist/{graph-edge-decay-DGTBFALQ.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{capsule-merge-SEHERWWP.js.map → capsule-merge-IPG4IOFP.js.map} +0 -0
- /package/dist/{chunk-KTVSPFCQ.js.map → chunk-22FVR2KE.js.map} +0 -0
- /package/dist/{chunk-7Y5V3LAP.js.map → chunk-27QVNSQ3.js.map} +0 -0
- /package/dist/{chunk-R7LY4YKF.js.map → chunk-2EKJDQZB.js.map} +0 -0
- /package/dist/{chunk-HOUST5UX.js.map → chunk-2ITE4C2Z.js.map} +0 -0
- /package/dist/{chunk-JOYC4RYC.js.map → chunk-2JVJ7UHC.js.map} +0 -0
- /package/dist/{chunk-X2NFFBTO.js.map → chunk-2L5FSNPC.js.map} +0 -0
- /package/dist/{chunk-DUAJKRR2.js.map → chunk-2SGLMP2E.js.map} +0 -0
- /package/dist/{chunk-6FUMA6AA.js.map → chunk-2Z4GS5E6.js.map} +0 -0
- /package/dist/{chunk-G6MXN2G5.js.map → chunk-37KUQPX4.js.map} +0 -0
- /package/dist/{chunk-WKAXBXVA.js.map → chunk-3QQTXYZ6.js.map} +0 -0
- /package/dist/{chunk-4ZWCQJNM.js.map → chunk-46WM6JX2.js.map} +0 -0
- /package/dist/{chunk-CASWJ2HM.js.map → chunk-46ZPIGWI.js.map} +0 -0
- /package/dist/{chunk-MCA2X4WH.js.map → chunk-4IHBN6WU.js.map} +0 -0
- /package/dist/{chunk-FB7LAJQM.js.map → chunk-4TKJGOCJ.js.map} +0 -0
- /package/dist/{chunk-H7BZBSP6.js.map → chunk-52II7PB6.js.map} +0 -0
- /package/dist/{chunk-N4Y5T6VD.js.map → chunk-54WHLA65.js.map} +0 -0
- /package/dist/{chunk-YVLENSNS.js.map → chunk-5ATKSPEQ.js.map} +0 -0
- /package/dist/{chunk-ZVZHG7AI.js.map → chunk-5UBH37SL.js.map} +0 -0
- /package/dist/{chunk-N3WZU76A.js.map → chunk-66OJSCI6.js.map} +0 -0
- /package/dist/{chunk-D35XLYQ7.js.map → chunk-6CVNSDCZ.js.map} +0 -0
- /package/dist/{chunk-KA2HZCMG.js.map → chunk-6NXSYYGP.js.map} +0 -0
- /package/dist/{chunk-2HIJHXB3.js.map → chunk-6WHJ2EAB.js.map} +0 -0
- /package/dist/{chunk-ZZM476NV.js.map → chunk-6XL73HQ4.js.map} +0 -0
- /package/dist/{chunk-EJ5RKUXW.js.map → chunk-AQ7SYDVO.js.map} +0 -0
- /package/dist/{chunk-2Z3DG5CQ.js.map → chunk-B3O3IRZN.js.map} +0 -0
- /package/dist/{chunk-RACZB5HT.js.map → chunk-BD7JTBYP.js.map} +0 -0
- /package/dist/{chunk-I762GW7V.js.map → chunk-BLJWYCNO.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-GCASGYIO.js.map → chunk-C7HJ3NEI.js.map} +0 -0
- /package/dist/{chunk-C24UZSFW.js.map → chunk-CEH2AFXG.js.map} +0 -0
- /package/dist/{chunk-WVGXCBOC.js.map → chunk-D5F7TKMH.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-2OXIPF3A.js.map → chunk-DZD3WGCD.js.map} +0 -0
- /package/dist/{chunk-UMEOXLIZ.js.map → chunk-E2P7TZTF.js.map} +0 -0
- /package/dist/{chunk-6FC3IZ26.js.map → chunk-EBA5DA77.js.map} +0 -0
- /package/dist/{chunk-N7JK2RKG.js.map → chunk-EOQ6FSQP.js.map} +0 -0
- /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
- /package/dist/{chunk-XDMI5VKE.js.map → chunk-FVOP3NT7.js.map} +0 -0
- /package/dist/{chunk-NRLELHAY.js.map → chunk-G7NYVKD6.js.map} +0 -0
- /package/dist/{chunk-B3W7GWQB.js.map → chunk-GHTSNGBZ.js.map} +0 -0
- /package/dist/{chunk-LUDBXTBJ.js.map → chunk-H272ZPQ3.js.map} +0 -0
- /package/dist/{chunk-SN4JXNLL.js.map → chunk-H3TKENU4.js.map} +0 -0
- /package/dist/{chunk-4HYNMLT6.js.map → chunk-H4SEGIZY.js.map} +0 -0
- /package/dist/{chunk-ACZN5ZXD.js.map → chunk-H54VWRPS.js.map} +0 -0
- /package/dist/{chunk-HTP6XRUI.js.map → chunk-HM7RHKS4.js.map} +0 -0
- /package/dist/{chunk-Z3SQEEB6.js.map → chunk-HWLIMQE2.js.map} +0 -0
- /package/dist/{chunk-2QSZNTDO.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-ET2CNMLD.js.map → chunk-JN72EPOE.js.map} +0 -0
- /package/dist/{chunk-JCCWJHOP.js.map → chunk-JYZSRNR7.js.map} +0 -0
- /package/dist/{chunk-7D6HXODY.js.map → chunk-K7724CH2.js.map} +0 -0
- /package/dist/{chunk-X33MJFD2.js.map → chunk-KAXCYM66.js.map} +0 -0
- /package/dist/{chunk-7RRUHJPG.js.map → chunk-KB2G2I6Q.js.map} +0 -0
- /package/dist/{chunk-ZXBTTMGZ.js.map → chunk-KEF46KL2.js.map} +0 -0
- /package/dist/{chunk-UWTDARPF.js.map → chunk-KTWG7CNY.js.map} +0 -0
- /package/dist/{chunk-XQYTSZW3.js.map → chunk-L7Z57SID.js.map} +0 -0
- /package/dist/{chunk-JMAG7WZ7.js.map → chunk-LO4UKPKX.js.map} +0 -0
- /package/dist/{chunk-LDWIPYJ6.js.map → chunk-LS2FHUML.js.map} +0 -0
- /package/dist/{chunk-GDB4J2H3.js.map → chunk-MPC7TYTZ.js.map} +0 -0
- /package/dist/{chunk-2GF27PGH.js.map → chunk-MRPOZBJC.js.map} +0 -0
- /package/dist/{chunk-BR3OOQZQ.js.map → chunk-MWN6QEI2.js.map} +0 -0
- /package/dist/{chunk-NZGO2GKL.js.map → chunk-MY5EDR46.js.map} +0 -0
- /package/dist/{chunk-LCMUZDBZ.js.map → chunk-N3ZOP7KC.js.map} +0 -0
- /package/dist/{chunk-TVW4C7PV.js.map → chunk-NB3LRY4T.js.map} +0 -0
- /package/dist/{chunk-QJCWK2A7.js.map → chunk-ND6IQGSZ.js.map} +0 -0
- /package/dist/{chunk-NOB2T2FC.js.map → chunk-NHLLKEKK.js.map} +0 -0
- /package/dist/{chunk-EJIWBTVM.js.map → chunk-O6ZNNVSP.js.map} +0 -0
- /package/dist/{chunk-AG46P24C.js.map → chunk-OB3XMWX5.js.map} +0 -0
- /package/dist/{chunk-46QMN7I7.js.map → chunk-PAZY2ZKP.js.map} +0 -0
- /package/dist/{chunk-EF4JUM55.js.map → chunk-PX4UMA5Z.js.map} +0 -0
- /package/dist/{chunk-NNZFPYYX.js.map → chunk-R7QY5ZVB.js.map} +0 -0
- /package/dist/{chunk-RO2X2EYM.js.map → chunk-R7RTXEYG.js.map} +0 -0
- /package/dist/{chunk-3LJPSRAN.js.map → chunk-RBCQVOVJ.js.map} +0 -0
- /package/dist/{chunk-N4F7ZSSG.js.map → chunk-RC5DXXWC.js.map} +0 -0
- /package/dist/{chunk-5CF2R4NS.js.map → chunk-RKBLRTNT.js.map} +0 -0
- /package/dist/{chunk-5QZR2RA3.js.map → chunk-ROBHL3GL.js.map} +0 -0
- /package/dist/{chunk-D5ZNOKR7.js.map → chunk-S7T2TY65.js.map} +0 -0
- /package/dist/{chunk-3LADWWMA.js.map → chunk-SJDQ5RSN.js.map} +0 -0
- /package/dist/{chunk-CHWUICVY.js.map → chunk-SV4Z2S67.js.map} +0 -0
- /package/dist/{chunk-SEF4IOFE.js.map → chunk-SWIKABKI.js.map} +0 -0
- /package/dist/{chunk-JRRQ747T.js.map → chunk-TBXAY2SS.js.map} +0 -0
- /package/dist/{chunk-XZBXINXZ.js.map → chunk-TNSCIPBQ.js.map} +0 -0
- /package/dist/{chunk-S37NN23M.js.map → chunk-TVEONGBU.js.map} +0 -0
- /package/dist/{chunk-5RPMTFB6.js.map → chunk-TWF35IC6.js.map} +0 -0
- /package/dist/{chunk-BZTJEILZ.js.map → chunk-U6N5IBVY.js.map} +0 -0
- /package/dist/{chunk-7TUB6JWA.js.map → chunk-UCKYTA2T.js.map} +0 -0
- /package/dist/{chunk-PPOT6SPR.js.map → chunk-UNNPNBR2.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-J2R275FN.js.map → chunk-VVX5PZFS.js.map} +0 -0
- /package/dist/{chunk-ME35HVDJ.js.map → chunk-VYCOJKSX.js.map} +0 -0
- /package/dist/{chunk-F5UWQ4LX.js.map → chunk-W24T5YMW.js.map} +0 -0
- /package/dist/{chunk-HDQUQBPW.js.map → chunk-W3K3HITK.js.map} +0 -0
- /package/dist/{chunk-GDASG7NC.js.map → chunk-W4F3C7N7.js.map} +0 -0
- /package/dist/{chunk-LFK623SF.js.map → chunk-WJHGDE7X.js.map} +0 -0
- /package/dist/{chunk-3Q6RD76J.js.map → chunk-WQZZDN5M.js.map} +0 -0
- /package/dist/{chunk-ZJWDWPX6.js.map → chunk-X5K5TAQZ.js.map} +0 -0
- /package/dist/{chunk-ZL3XX5LW.js.map → chunk-XM24CDZX.js.map} +0 -0
- /package/dist/{chunk-JTWZKNUH.js.map → chunk-XOVKXJEP.js.map} +0 -0
- /package/dist/{chunk-X5YYSAZX.js.map → chunk-XUE46UYW.js.map} +0 -0
- /package/dist/{chunk-DJORULH3.js.map → chunk-YRLHEEQT.js.map} +0 -0
- /package/dist/{chunk-TA7UZZMW.js.map → chunk-Z3O53WZR.js.map} +0 -0
- /package/dist/{chunk-4LG4CPOC.js.map → chunk-Z6COGHHN.js.map} +0 -0
- /package/dist/{chunk-RE3H6Y2X.js.map → chunk-ZIW5JVRM.js.map} +0 -0
- /package/dist/{forget-2AE4MDK3.js.map → forget-SZ2BXDGF.js.map} +0 -0
- /package/dist/{resolution-4DLI3IOR.js.map → graph-append-error.js.map} +0 -0
package/src/graph.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { appendFile, mkdir, readFile, stat } from "node:fs/promises";
|
|
14
14
|
import * as path from "node:path";
|
|
15
|
-
|
|
15
|
+
import { GraphEdgeAppendError } from "./graph-append-error.js";
|
|
16
16
|
import { readEdgeConfidence } from "./graph-edge-reinforcement.js";
|
|
17
17
|
import { emitGraphEvent } from "./graph-events.js";
|
|
18
18
|
import type { GraphConstructionCapabilitySet } from "./capabilities.js";
|
|
@@ -24,6 +24,13 @@ import {
|
|
|
24
24
|
type ActivationPredecessor,
|
|
25
25
|
} from "./graph-path-reconstruction.js";
|
|
26
26
|
export { reconstructActivationPath, type ActivationPredecessor };
|
|
27
|
+
import {
|
|
28
|
+
assertGraphLockHeld,
|
|
29
|
+
GraphLockLostError,
|
|
30
|
+
withGraphWriteLock,
|
|
31
|
+
yieldForLockHeartbeat,
|
|
32
|
+
} from "./graph-write-lock.js";
|
|
33
|
+
import { isErrnoCode } from "./utils/errno.js";
|
|
27
34
|
|
|
28
35
|
export type GraphType = "entity" | "time" | "causal";
|
|
29
36
|
|
|
@@ -110,44 +117,19 @@ export async function ensureGraphsDir(memoryDir: string): Promise<void> {
|
|
|
110
117
|
await mkdir(graphsDir(memoryDir), { recursive: true });
|
|
111
118
|
}
|
|
112
119
|
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
// JSONL file path. Without this, an extraction can append a new edge
|
|
119
|
-
// between the decay job's read-snapshot and rewrite, silently dropping
|
|
120
|
-
// the appended edge during active traffic (issue #729 / Codex P1).
|
|
121
|
-
// ---------------------------------------------------------------------------
|
|
122
|
-
const graphWriteLocks = new Map<string, Promise<void>>();
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Run `fn` while holding the write lock for the given graph JSONL file.
|
|
126
|
-
*
|
|
127
|
-
* The lock is keyed by absolute file path so concurrent writes to
|
|
128
|
-
* different graph types proceed independently. The chain recovers from
|
|
129
|
-
* rejection (gotcha #40) so a single I/O failure does not poison all
|
|
130
|
-
* future writers, but the original error is still surfaced to the
|
|
131
|
-
* caller of `withGraphWriteLock`.
|
|
132
|
-
*/
|
|
133
|
-
export function withGraphWriteLock<T>(filePath: string, fn: () => Promise<T>): Promise<T> {
|
|
134
|
-
const prev = graphWriteLocks.get(filePath) ?? Promise.resolve();
|
|
135
|
-
const next = prev.then(fn, fn);
|
|
136
|
-
graphWriteLocks.set(
|
|
137
|
-
filePath,
|
|
138
|
-
next.then(
|
|
139
|
-
() => undefined,
|
|
140
|
-
() => undefined
|
|
141
|
-
)
|
|
142
|
-
);
|
|
143
|
-
return next;
|
|
144
|
-
}
|
|
120
|
+
// Per-graph-file write lock lives in the graph-write-lock.ts sibling (the
|
|
121
|
+
// in-process chain plus the cross-process advisory lock, issue #2330 round
|
|
122
|
+
// N+18 A). Re-exported here because `@remnic/core/graph` is a public
|
|
123
|
+
// subpath export whose consumers import `withGraphWriteLock` from it.
|
|
124
|
+
export { withGraphWriteLock, GraphLockLostError };
|
|
145
125
|
|
|
146
126
|
export async function appendEdge(memoryDir: string, edge: GraphEdge): Promise<void> {
|
|
147
127
|
await ensureGraphsDir(memoryDir);
|
|
148
128
|
const filePath = graphFilePath(memoryDir, edge.type);
|
|
149
129
|
const line = `${JSON.stringify(edge)}\n`;
|
|
150
|
-
await withGraphWriteLock(filePath, async () => {
|
|
130
|
+
await withGraphWriteLock(filePath, async (lock) => {
|
|
131
|
+
// Round N+19 A: never append into a file a peer that broke this lock may rename over.
|
|
132
|
+
await assertGraphLockHeld(filePath, lock);
|
|
151
133
|
await appendFile(filePath, line, "utf8");
|
|
152
134
|
});
|
|
153
135
|
// Emit edge-added event for SSE subscribers (issue #691 PR 5/5).
|
|
@@ -163,10 +145,6 @@ export async function appendEdge(memoryDir: string, edge: GraphEdge): Promise<vo
|
|
|
163
145
|
});
|
|
164
146
|
}
|
|
165
147
|
|
|
166
|
-
function isNodeError(err: unknown): err is NodeJS.ErrnoException {
|
|
167
|
-
return typeof err === "object" && err !== null && "code" in err;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
148
|
function parseEdgesJsonl(raw: string, expectedType: GraphType): GraphEdge[] {
|
|
171
149
|
const edges: GraphEdge[] = [];
|
|
172
150
|
for (const line of raw.split("\n")) {
|
|
@@ -184,6 +162,23 @@ function parseEdgesJsonl(raw: string, expectedType: GraphType): GraphEdge[] {
|
|
|
184
162
|
return edges;
|
|
185
163
|
}
|
|
186
164
|
|
|
165
|
+
/** Parse batch size at which locked-section parsing yields to the event loop
|
|
166
|
+
* so the graph lock's heartbeat timer can fire (round N+19 A). */
|
|
167
|
+
const EDGE_PARSE_YIELD_BATCH = 5_000;
|
|
168
|
+
|
|
169
|
+
/** Chunked {@link parseEdgesJsonl} yielding between batches; used by
|
|
170
|
+
* {@link readEdgesStrict} (the locked-section reader) — the hot recall path
|
|
171
|
+
* (`readEdges`) keeps the synchronous parse. */
|
|
172
|
+
async function parseEdgesJsonlYielding(raw: string, expectedType: GraphType): Promise<GraphEdge[]> {
|
|
173
|
+
const lines = raw.split("\n");
|
|
174
|
+
const edges: GraphEdge[] = [];
|
|
175
|
+
for (let i = 0; i < lines.length; i += EDGE_PARSE_YIELD_BATCH) {
|
|
176
|
+
if (i > 0) await yieldForLockHeartbeat();
|
|
177
|
+
edges.push(...parseEdgesJsonl(lines.slice(i, i + EDGE_PARSE_YIELD_BATCH).join("\n"), expectedType));
|
|
178
|
+
}
|
|
179
|
+
return edges;
|
|
180
|
+
}
|
|
181
|
+
|
|
187
182
|
/**
|
|
188
183
|
* Read all edges of a given type from the JSONL file.
|
|
189
184
|
* Returns [] if the file doesn't exist or any read error occurs (fail-open).
|
|
@@ -214,9 +209,9 @@ export async function readEdgesStrict(memoryDir: string, type: GraphType): Promi
|
|
|
214
209
|
const filePath = graphFilePath(memoryDir, type);
|
|
215
210
|
try {
|
|
216
211
|
const raw = await readFile(filePath, "utf8");
|
|
217
|
-
return
|
|
212
|
+
return await parseEdgesJsonlYielding(raw, type);
|
|
218
213
|
} catch (err) {
|
|
219
|
-
if (
|
|
214
|
+
if (isErrnoCode(err, "ENOENT")) {
|
|
220
215
|
return [];
|
|
221
216
|
}
|
|
222
217
|
throw err;
|
|
@@ -567,6 +562,12 @@ export class GraphIndex {
|
|
|
567
562
|
/**
|
|
568
563
|
* Called after a memory is written to disk.
|
|
569
564
|
*
|
|
565
|
+
* Throws when an edge append fails (after logging): the merged-target rewrite
|
|
566
|
+
* path depends on the rejection to restore the edges `removeNodeEdgesForRewrite`
|
|
567
|
+
* dropped — swallowing here left that restore dead and the prior edge set
|
|
568
|
+
* permanently lost (#2330). Fail-open is the CALLER's decision; the create
|
|
569
|
+
* paths already catch (see persistence-index.buildGraphEdge).
|
|
570
|
+
*
|
|
570
571
|
* @param memoryPath - relative path from memoryDir (e.g. "facts/2026-02-22/abc.md")
|
|
571
572
|
* @param entityRef - entityRef frontmatter field (if any)
|
|
572
573
|
* @param content - full memory text (for causal detection)
|
|
@@ -595,16 +596,15 @@ export class GraphIndex {
|
|
|
595
596
|
causalGraph: boolean;
|
|
596
597
|
multiGraphMemory: boolean;
|
|
597
598
|
};
|
|
598
|
-
}): Promise<
|
|
599
|
+
}): Promise<GraphEdge[]> {
|
|
599
600
|
const g = opts.graphCapsOverride;
|
|
600
601
|
const multiGraphOn = g ? g.multiGraphMemory : this.cfg.multiGraphMemoryEnabled;
|
|
601
|
-
if (!multiGraphOn) return;
|
|
602
|
+
if (!multiGraphOn) return [];
|
|
602
603
|
const entityOn = g ? g.entityGraph : this.cfg.entityGraphEnabled;
|
|
603
604
|
const timeOn = g ? g.timeGraph : this.cfg.timeGraphEnabled;
|
|
604
605
|
const causalOn = g ? g.causalGraph : this.cfg.causalGraphEnabled;
|
|
605
606
|
const ts = new Date().toISOString();
|
|
606
|
-
//
|
|
607
|
-
// extend the warm edge cache in place instead of nulling it (issue #1904).
|
|
607
|
+
// Appended this call: warm-cache in-place push (#1904) + surgical rollback rows (N+14).
|
|
608
608
|
const appended: GraphEdge[] = [];
|
|
609
609
|
|
|
610
610
|
try {
|
|
@@ -659,9 +659,12 @@ export class GraphIndex {
|
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
} catch (err) {
|
|
662
|
-
//
|
|
662
|
+
// Log, then rethrow (#2330): the rewrite path's restore step only runs
|
|
663
|
+
// when this rejection reaches its caller (fail-open callers catch). The
|
|
664
|
+
// error carries the rows already appended (N+16 A) — surgical rollback.
|
|
663
665
|
const { log } = await import("./logger.js");
|
|
664
666
|
log.warn(`[graph] onMemoryWritten error: ${err}`);
|
|
667
|
+
throw new GraphEdgeAppendError(err, appended);
|
|
665
668
|
} finally {
|
|
666
669
|
// Edge-cache coherence (issue #1904). Legacy behavior nulled the cache on
|
|
667
670
|
// every write, paying a 2-4 s full re-read + parse on the next traversal.
|
|
@@ -700,6 +703,7 @@ export class GraphIndex {
|
|
|
700
703
|
}
|
|
701
704
|
}
|
|
702
705
|
}
|
|
706
|
+
return appended;
|
|
703
707
|
}
|
|
704
708
|
|
|
705
709
|
/**
|
|
@@ -1190,6 +1190,335 @@ test("persistExtraction writes nodes with harmonic retrieval and gates cue ancho
|
|
|
1190
1190
|
}
|
|
1191
1191
|
});
|
|
1192
1192
|
|
|
1193
|
+
test("persistExtraction enqueues a merged target for harmonic construction (merge-only batch)", async () => {
|
|
1194
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-harmonic-merge-"));
|
|
1195
|
+
const TARGET_ID = "merge-target-main";
|
|
1196
|
+
const SEED = "The billing service deploys on a Tuesday cadence.";
|
|
1197
|
+
const INCOMING = "The billing service deploys at 09:00 UTC sharp.";
|
|
1198
|
+
try {
|
|
1199
|
+
const config = parseConfig({
|
|
1200
|
+
openaiApiKey: "sk-test",
|
|
1201
|
+
memoryDir,
|
|
1202
|
+
workspaceDir: path.join(memoryDir, "workspace"),
|
|
1203
|
+
qmdEnabled: false,
|
|
1204
|
+
embeddingFallbackEnabled: true,
|
|
1205
|
+
chunkingEnabled: false,
|
|
1206
|
+
harmonicRetrievalEnabled: true,
|
|
1207
|
+
abstractionAnchorsEnabled: true,
|
|
1208
|
+
versioningEnabled: true,
|
|
1209
|
+
semanticMerge: { enabled: true },
|
|
1210
|
+
});
|
|
1211
|
+
const orchestrator = new Orchestrator(config) as unknown as PersistenceHarness & {
|
|
1212
|
+
embeddingFallback: {
|
|
1213
|
+
isAvailable: () => Promise<boolean>;
|
|
1214
|
+
search: (
|
|
1215
|
+
query: string,
|
|
1216
|
+
limit: number,
|
|
1217
|
+
options?: unknown,
|
|
1218
|
+
) => Promise<Array<{ id: string; score: number; path: string }>>;
|
|
1219
|
+
indexFile: (id: string, content: string, path: string) => Promise<void>;
|
|
1220
|
+
removeFromIndex: (id: string) => Promise<void>;
|
|
1221
|
+
};
|
|
1222
|
+
localLlm: {
|
|
1223
|
+
chatCompletion: (
|
|
1224
|
+
messages: Array<{ role: string; content: string }>,
|
|
1225
|
+
) => Promise<{ content: string } | null>;
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
const storage = await orchestrator.getStorage("default");
|
|
1229
|
+
await storage.ensureDirectories();
|
|
1230
|
+
// Seed a merge target with past timestamps and high importance so the
|
|
1231
|
+
// incoming fact never bypasses as unpreservable metadata.
|
|
1232
|
+
const created = new Date(Date.now() - 3600_000).toISOString();
|
|
1233
|
+
const seededDir = path.join(memoryDir, "facts", created.slice(0, 10));
|
|
1234
|
+
await mkdir(seededDir, { recursive: true });
|
|
1235
|
+
await writeFile(
|
|
1236
|
+
path.join(seededDir, `${TARGET_ID}.md`),
|
|
1237
|
+
[
|
|
1238
|
+
"---",
|
|
1239
|
+
`id: ${TARGET_ID}`,
|
|
1240
|
+
"category: fact",
|
|
1241
|
+
`created: ${created}`,
|
|
1242
|
+
`updated: ${created}`,
|
|
1243
|
+
"source: extraction",
|
|
1244
|
+
"confidence: 0.9",
|
|
1245
|
+
"confidenceTier: explicit",
|
|
1246
|
+
"status: active",
|
|
1247
|
+
"importanceScore: 0.9",
|
|
1248
|
+
"importanceLevel: high",
|
|
1249
|
+
"---",
|
|
1250
|
+
"",
|
|
1251
|
+
SEED,
|
|
1252
|
+
"",
|
|
1253
|
+
].join("\n"),
|
|
1254
|
+
"utf8",
|
|
1255
|
+
);
|
|
1256
|
+
// Band neighbor for the incoming fact only ([minSimilarity, threshold)).
|
|
1257
|
+
orchestrator.embeddingFallback = {
|
|
1258
|
+
isAvailable: async () => true,
|
|
1259
|
+
search: async (query: string) =>
|
|
1260
|
+
query === INCOMING ? [{ id: TARGET_ID, score: 0.85, path: "" }] : [],
|
|
1261
|
+
indexFile: async () => {},
|
|
1262
|
+
removeFromIndex: async () => {},
|
|
1263
|
+
};
|
|
1264
|
+
// Deterministic judge: merge into the top candidate's current body.
|
|
1265
|
+
orchestrator.localLlm = {
|
|
1266
|
+
chatCompletion: async (messages) => {
|
|
1267
|
+
if (
|
|
1268
|
+
messages[0]?.role !== "system" ||
|
|
1269
|
+
!messages[0].content.startsWith("You maintain a long-term memory store")
|
|
1270
|
+
) {
|
|
1271
|
+
return null;
|
|
1272
|
+
}
|
|
1273
|
+
const input = JSON.parse(messages[1]?.content ?? "{}") as {
|
|
1274
|
+
new?: { content?: string };
|
|
1275
|
+
existing?: Array<{ id?: string; content?: string }>;
|
|
1276
|
+
};
|
|
1277
|
+
const target = input.existing?.[0];
|
|
1278
|
+
if (!target?.id || typeof target.content !== "string" || typeof input.new?.content !== "string") {
|
|
1279
|
+
return { content: JSON.stringify({ decision: "create", targetId: null, mergedContent: null, reason: "no candidate" }) };
|
|
1280
|
+
}
|
|
1281
|
+
return {
|
|
1282
|
+
content: JSON.stringify({
|
|
1283
|
+
decision: "merge",
|
|
1284
|
+
targetId: target.id,
|
|
1285
|
+
mergedContent: `${target.content} ${input.new.content}`.trim(),
|
|
1286
|
+
reason: "deterministic judge for merge-only harmonic coverage",
|
|
1287
|
+
}),
|
|
1288
|
+
};
|
|
1289
|
+
},
|
|
1290
|
+
};
|
|
1291
|
+
const result: ExtractionResult = {
|
|
1292
|
+
facts: [
|
|
1293
|
+
{
|
|
1294
|
+
category: "fact",
|
|
1295
|
+
content: INCOMING,
|
|
1296
|
+
confidence: 0.9,
|
|
1297
|
+
tags: [],
|
|
1298
|
+
cueAnchors: [{ type: "tool", value: "billing deploy window" }],
|
|
1299
|
+
},
|
|
1300
|
+
],
|
|
1301
|
+
entities: [],
|
|
1302
|
+
profileUpdates: [],
|
|
1303
|
+
questions: [],
|
|
1304
|
+
relationships: [],
|
|
1305
|
+
episodeTitle: "Billing deploy cadence",
|
|
1306
|
+
};
|
|
1307
|
+
const { persistedIds } = await orchestrator.persistExtraction(result, storage, null, {
|
|
1308
|
+
sessionKey: "session:harmonic-merge",
|
|
1309
|
+
});
|
|
1310
|
+
// Contract preserved: persistedIds stays new-fragment only — the merged
|
|
1311
|
+
// target is updated in place, never reported as a new fragment.
|
|
1312
|
+
assert.deepEqual(persistedIds, []);
|
|
1313
|
+
|
|
1314
|
+
const nodeStatus = await getAbstractionNodeStoreStatus({
|
|
1315
|
+
memoryDir: storage.dir,
|
|
1316
|
+
enabled: true,
|
|
1317
|
+
anchorsEnabled: true,
|
|
1318
|
+
});
|
|
1319
|
+
assert.equal(
|
|
1320
|
+
nodeStatus.nodes.total,
|
|
1321
|
+
1,
|
|
1322
|
+
"a merge-only batch must still derive an episode node for the committed target",
|
|
1323
|
+
);
|
|
1324
|
+
assert.ok(
|
|
1325
|
+
nodeStatus.latestNode?.sourceMemoryIds?.includes(TARGET_ID),
|
|
1326
|
+
"the episode node must cite the surviving target id",
|
|
1327
|
+
);
|
|
1328
|
+
const anchorStatus = await getCueAnchorStoreStatus({
|
|
1329
|
+
memoryDir: storage.dir,
|
|
1330
|
+
enabled: true,
|
|
1331
|
+
anchorsEnabled: true,
|
|
1332
|
+
});
|
|
1333
|
+
assert.ok(
|
|
1334
|
+
anchorStatus.anchors.total >= 1,
|
|
1335
|
+
"the extracted cue anchors must reach the anchor store for the merged claims",
|
|
1336
|
+
);
|
|
1337
|
+
const searchResults = await searchHarmonicRetrieval({
|
|
1338
|
+
memoryDir: storage.dir,
|
|
1339
|
+
query: "billing deploy cadence",
|
|
1340
|
+
maxResults: 5,
|
|
1341
|
+
anchorsEnabled: true,
|
|
1342
|
+
});
|
|
1343
|
+
assert.ok(
|
|
1344
|
+
searchResults.some((item) => item.node.sourceMemoryIds?.includes(TARGET_ID)),
|
|
1345
|
+
"harmonic retrieval must surface the merged target's episode",
|
|
1346
|
+
);
|
|
1347
|
+
} finally {
|
|
1348
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
1349
|
+
}
|
|
1350
|
+
});
|
|
1351
|
+
|
|
1352
|
+
test("persistExtraction keeps a merged target in the thread episode set across extractions (round N+11 B)", async () => {
|
|
1353
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-harmonic-merge-thread-"));
|
|
1354
|
+
const TARGET_ID = "merge-target-thread";
|
|
1355
|
+
const SEED = "The billing service deploys on a Tuesday cadence.";
|
|
1356
|
+
const INCOMING = "The billing service deploys at 09:00 UTC sharp.";
|
|
1357
|
+
const LATER = "The billing service pages an on-call engineer after a failed deploy.";
|
|
1358
|
+
const SESSION_KEY = "session:harmonic-merge-thread";
|
|
1359
|
+
try {
|
|
1360
|
+
const config = parseConfig({
|
|
1361
|
+
openaiApiKey: "sk-test",
|
|
1362
|
+
memoryDir,
|
|
1363
|
+
workspaceDir: path.join(memoryDir, "workspace"),
|
|
1364
|
+
qmdEnabled: false,
|
|
1365
|
+
embeddingFallbackEnabled: true,
|
|
1366
|
+
chunkingEnabled: false,
|
|
1367
|
+
harmonicRetrievalEnabled: false,
|
|
1368
|
+
abstractionAnchorsEnabled: false,
|
|
1369
|
+
versioningEnabled: true,
|
|
1370
|
+
semanticMerge: { enabled: true },
|
|
1371
|
+
});
|
|
1372
|
+
const orchestrator = new Orchestrator(config) as unknown as PersistenceHarness & {
|
|
1373
|
+
embeddingFallback: {
|
|
1374
|
+
isAvailable: () => Promise<boolean>;
|
|
1375
|
+
search: (
|
|
1376
|
+
query: string,
|
|
1377
|
+
limit: number,
|
|
1378
|
+
options?: unknown,
|
|
1379
|
+
) => Promise<Array<{ id: string; score: number; path: string }>>;
|
|
1380
|
+
indexFile: (id: string, content: string, path: string) => Promise<void>;
|
|
1381
|
+
removeFromIndex: (id: string) => Promise<void>;
|
|
1382
|
+
};
|
|
1383
|
+
localLlm: {
|
|
1384
|
+
chatCompletion: (
|
|
1385
|
+
messages: Array<{ role: string; content: string }>,
|
|
1386
|
+
) => Promise<{ content: string } | null>;
|
|
1387
|
+
};
|
|
1388
|
+
threading: {
|
|
1389
|
+
processTurn: (
|
|
1390
|
+
turn: { role: string; content: string; timestamp: string; sessionKey: string },
|
|
1391
|
+
episodeIds: string[],
|
|
1392
|
+
) => Promise<string>;
|
|
1393
|
+
loadThread: (id: string) => Promise<{ episodeIds: string[] } | null>;
|
|
1394
|
+
};
|
|
1395
|
+
appendPersistedThreadEpisodes: (threadId: string, persistedIds: string[]) => Promise<void>;
|
|
1396
|
+
};
|
|
1397
|
+
const storage = await orchestrator.getStorage("default");
|
|
1398
|
+
await storage.ensureDirectories();
|
|
1399
|
+
// Seed a merge target the way the sibling merge-only test does: past
|
|
1400
|
+
// timestamps, high importance, active — preservable metadata only.
|
|
1401
|
+
const created = new Date(Date.now() - 3600_000).toISOString();
|
|
1402
|
+
const seededDir = path.join(memoryDir, "facts", created.slice(0, 10));
|
|
1403
|
+
await mkdir(seededDir, { recursive: true });
|
|
1404
|
+
await writeFile(
|
|
1405
|
+
path.join(seededDir, `${TARGET_ID}.md`),
|
|
1406
|
+
[
|
|
1407
|
+
"---",
|
|
1408
|
+
`id: ${TARGET_ID}`,
|
|
1409
|
+
"category: fact",
|
|
1410
|
+
`created: ${created}`,
|
|
1411
|
+
`updated: ${created}`,
|
|
1412
|
+
"source: extraction",
|
|
1413
|
+
"confidence: 0.9",
|
|
1414
|
+
"confidenceTier: explicit",
|
|
1415
|
+
"status: active",
|
|
1416
|
+
"importanceScore: 0.9",
|
|
1417
|
+
"importanceLevel: high",
|
|
1418
|
+
"---",
|
|
1419
|
+
"",
|
|
1420
|
+
SEED,
|
|
1421
|
+
"",
|
|
1422
|
+
].join("\n"),
|
|
1423
|
+
"utf8",
|
|
1424
|
+
);
|
|
1425
|
+
// Band neighbor for the incoming fact only; the later fact finds none.
|
|
1426
|
+
orchestrator.embeddingFallback = {
|
|
1427
|
+
isAvailable: async () => true,
|
|
1428
|
+
search: async (query: string) =>
|
|
1429
|
+
query === INCOMING ? [{ id: TARGET_ID, score: 0.85, path: "" }] : [],
|
|
1430
|
+
indexFile: async () => {},
|
|
1431
|
+
removeFromIndex: async () => {},
|
|
1432
|
+
};
|
|
1433
|
+
// Deterministic judge: merge into the top candidate's current body.
|
|
1434
|
+
orchestrator.localLlm = {
|
|
1435
|
+
chatCompletion: async (messages) => {
|
|
1436
|
+
if (
|
|
1437
|
+
messages[0]?.role !== "system" ||
|
|
1438
|
+
!messages[0].content.startsWith("You maintain a long-term memory store")
|
|
1439
|
+
) {
|
|
1440
|
+
return null;
|
|
1441
|
+
}
|
|
1442
|
+
const input = JSON.parse(messages[1]?.content ?? "{}") as {
|
|
1443
|
+
new?: { content?: string };
|
|
1444
|
+
existing?: Array<{ id?: string; content?: string }>;
|
|
1445
|
+
};
|
|
1446
|
+
const target = input.existing?.[0];
|
|
1447
|
+
if (!target?.id || typeof target.content !== "string" || typeof input.new?.content !== "string") {
|
|
1448
|
+
return { content: JSON.stringify({ decision: "create", targetId: null, mergedContent: null, reason: "no candidate" }) };
|
|
1449
|
+
}
|
|
1450
|
+
return {
|
|
1451
|
+
content: JSON.stringify({
|
|
1452
|
+
decision: "merge",
|
|
1453
|
+
targetId: target.id,
|
|
1454
|
+
mergedContent: `${target.content} ${input.new.content}`.trim(),
|
|
1455
|
+
reason: "deterministic judge for thread-episode persistence",
|
|
1456
|
+
}),
|
|
1457
|
+
};
|
|
1458
|
+
},
|
|
1459
|
+
};
|
|
1460
|
+
// Establish the thread the way runExtraction's processTurn step does,
|
|
1461
|
+
// so appendEpisodeIds has a thread file to write into.
|
|
1462
|
+
const threadId = await orchestrator.threading.processTurn(
|
|
1463
|
+
{
|
|
1464
|
+
role: "user",
|
|
1465
|
+
content: "Tell me about billing deploys.",
|
|
1466
|
+
timestamp: "2026-08-22T10:00:00.000Z",
|
|
1467
|
+
sessionKey: SESSION_KEY,
|
|
1468
|
+
},
|
|
1469
|
+
[],
|
|
1470
|
+
);
|
|
1471
|
+
assert.ok(threadId, "thread established via processTurn");
|
|
1472
|
+
|
|
1473
|
+
const mergeResult: ExtractionResult = {
|
|
1474
|
+
facts: [{ category: "fact", content: INCOMING, confidence: 0.9, tags: [] }],
|
|
1475
|
+
entities: [],
|
|
1476
|
+
profileUpdates: [],
|
|
1477
|
+
questions: [],
|
|
1478
|
+
relationships: [],
|
|
1479
|
+
};
|
|
1480
|
+
// --- Flush 1: merge-only. persistedIds stays new-fragment only. ---
|
|
1481
|
+
const flush1 = await orchestrator.persistExtraction(mergeResult, storage, threadId, {
|
|
1482
|
+
sessionKey: SESSION_KEY,
|
|
1483
|
+
});
|
|
1484
|
+
assert.deepEqual(flush1.persistedIds, [], "a merge-only batch reports no new fragments");
|
|
1485
|
+
// runExtraction's append step, exactly as production runs it.
|
|
1486
|
+
await orchestrator.appendPersistedThreadEpisodes(threadId, flush1.persistedIds);
|
|
1487
|
+
|
|
1488
|
+
// --- Flush 2: a NEW fact in the same thread + the append step. ---
|
|
1489
|
+
const laterResult: ExtractionResult = {
|
|
1490
|
+
facts: [{ category: "fact", content: LATER, confidence: 0.9, tags: [] }],
|
|
1491
|
+
entities: [],
|
|
1492
|
+
profileUpdates: [],
|
|
1493
|
+
questions: [],
|
|
1494
|
+
relationships: [],
|
|
1495
|
+
};
|
|
1496
|
+
const flush2 = await orchestrator.persistExtraction(laterResult, storage, threadId, {
|
|
1497
|
+
sessionKey: SESSION_KEY,
|
|
1498
|
+
});
|
|
1499
|
+
await orchestrator.appendPersistedThreadEpisodes(threadId, flush2.persistedIds);
|
|
1500
|
+
const laterId = flush2.persistedIds[0];
|
|
1501
|
+
assert.ok(laterId, "the later fact persisted as a new fragment");
|
|
1502
|
+
|
|
1503
|
+
const thread = await orchestrator.threading.loadThread(threadId);
|
|
1504
|
+
const episodes = thread?.episodeIds ?? [];
|
|
1505
|
+
assert.ok(
|
|
1506
|
+
episodes.includes(TARGET_ID),
|
|
1507
|
+
`the merged target must persist into the thread episode set (got ${JSON.stringify(episodes)})`,
|
|
1508
|
+
);
|
|
1509
|
+
assert.ok(
|
|
1510
|
+
laterId && episodes.includes(laterId),
|
|
1511
|
+
"the later fragment persists into the thread episode set",
|
|
1512
|
+
);
|
|
1513
|
+
assert.ok(
|
|
1514
|
+
episodes.indexOf(TARGET_ID) < episodes.indexOf(laterId),
|
|
1515
|
+
"adjacency: the merged target precedes the fragment extracted after it",
|
|
1516
|
+
);
|
|
1517
|
+
} finally {
|
|
1518
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
|
|
1193
1522
|
test("harmonic anchors stay scoped to projected active sources in a mixed episode", async () => {
|
|
1194
1523
|
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-harmonic-anchor-sources-"));
|
|
1195
1524
|
try {
|
package/src/json-store.ts
CHANGED
|
@@ -13,17 +13,14 @@ import {
|
|
|
13
13
|
type FileHandle,
|
|
14
14
|
} from "node:fs/promises";
|
|
15
15
|
import path from "node:path";
|
|
16
|
-
|
|
17
|
-
function hasErrorCode(error: unknown, code: string): boolean {
|
|
18
|
-
return typeof error === "object" && error !== null && "code" in error && (error as { code?: unknown }).code === code;
|
|
19
|
-
}
|
|
16
|
+
import { isErrnoCode } from "./utils/errno.js";
|
|
20
17
|
|
|
21
18
|
async function listJsonFilesStrictInner(dir: string, allowMissingDirectory: boolean): Promise<string[]> {
|
|
22
19
|
let entries: Dirent[];
|
|
23
20
|
try {
|
|
24
21
|
entries = await readdir(dir, { withFileTypes: true });
|
|
25
22
|
} catch (error) {
|
|
26
|
-
if (allowMissingDirectory &&
|
|
23
|
+
if (allowMissingDirectory && isErrnoCode(error, "ENOENT")) return [];
|
|
27
24
|
throw error;
|
|
28
25
|
}
|
|
29
26
|
const out: string[] = [];
|
|
@@ -107,7 +104,7 @@ function jsonStoreLockTimeoutMs(): number {
|
|
|
107
104
|
async function closeAndRemoveJsonStoreReclaimGuard(reclaimPath: string, reclaimHandle: FileHandle): Promise<void> {
|
|
108
105
|
await reclaimHandle.close().catch(() => undefined);
|
|
109
106
|
await unlink(reclaimPath).catch((error) => {
|
|
110
|
-
if (!
|
|
107
|
+
if (!isErrnoCode(error, "ENOENT")) throw error;
|
|
111
108
|
});
|
|
112
109
|
}
|
|
113
110
|
|
|
@@ -116,7 +113,7 @@ async function removeStaleJsonStoreReclaimGuard(reclaimPath: string): Promise<vo
|
|
|
116
113
|
try {
|
|
117
114
|
initial = await readJsonStoreLockState(reclaimPath);
|
|
118
115
|
} catch (error) {
|
|
119
|
-
if (
|
|
116
|
+
if (isErrnoCode(error, "ENOENT")) return;
|
|
120
117
|
throw error;
|
|
121
118
|
}
|
|
122
119
|
if (Date.now() - initial.mtimeMs <= jsonStoreLockStaleMs()) return;
|
|
@@ -134,12 +131,12 @@ async function removeStaleJsonStoreReclaimGuard(reclaimPath: string): Promise<vo
|
|
|
134
131
|
try {
|
|
135
132
|
confirmed = await readJsonStoreLockState(reclaimPath);
|
|
136
133
|
} catch (error) {
|
|
137
|
-
if (
|
|
134
|
+
if (isErrnoCode(error, "ENOENT")) return;
|
|
138
135
|
throw error;
|
|
139
136
|
}
|
|
140
137
|
if (!sameJsonStoreLockState(initial, confirmed)) return;
|
|
141
138
|
await unlink(reclaimPath).catch((error) => {
|
|
142
|
-
if (!
|
|
139
|
+
if (!isErrnoCode(error, "ENOENT")) throw error;
|
|
143
140
|
});
|
|
144
141
|
}
|
|
145
142
|
|
|
@@ -147,12 +144,12 @@ async function acquireJsonStoreReclaimGuard(reclaimPath: string): Promise<FileHa
|
|
|
147
144
|
try {
|
|
148
145
|
return await open(reclaimPath, "wx", 0o600);
|
|
149
146
|
} catch (error) {
|
|
150
|
-
if (!
|
|
147
|
+
if (!isErrnoCode(error, "EEXIST")) throw error;
|
|
151
148
|
await removeStaleJsonStoreReclaimGuard(reclaimPath);
|
|
152
149
|
try {
|
|
153
150
|
return await open(reclaimPath, "wx", 0o600);
|
|
154
151
|
} catch (retryError) {
|
|
155
|
-
if (
|
|
152
|
+
if (isErrnoCode(retryError, "EEXIST")) return undefined;
|
|
156
153
|
throw retryError;
|
|
157
154
|
}
|
|
158
155
|
}
|
|
@@ -169,7 +166,7 @@ function processIsRunning(pid: number): boolean {
|
|
|
169
166
|
process.kill(pid, 0);
|
|
170
167
|
return true;
|
|
171
168
|
} catch (error) {
|
|
172
|
-
return !
|
|
169
|
+
return !isErrnoCode(error, "ESRCH");
|
|
173
170
|
}
|
|
174
171
|
}
|
|
175
172
|
|
|
@@ -208,7 +205,7 @@ async function removeJsonStoreMutationLockIfOwned(lockPath: string, token: strin
|
|
|
208
205
|
const metadata = JSON.parse(state.content) as { token?: unknown };
|
|
209
206
|
if (metadata.token === token) await unlink(lockPath);
|
|
210
207
|
} catch (error) {
|
|
211
|
-
if (!
|
|
208
|
+
if (!isErrnoCode(error, "ENOENT") && !(error instanceof SyntaxError)) throw error;
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
211
|
|
|
@@ -224,7 +221,7 @@ async function removeStaleJsonStoreLock(lockPath: string): Promise<void> {
|
|
|
224
221
|
try {
|
|
225
222
|
initial = await readJsonStoreLockState(lockPath);
|
|
226
223
|
} catch (error) {
|
|
227
|
-
if (
|
|
224
|
+
if (isErrnoCode(error, "ENOENT")) return;
|
|
228
225
|
throw error;
|
|
229
226
|
}
|
|
230
227
|
if (Date.now() - initial.mtimeMs <= jsonStoreLockStaleMs()) return;
|
|
@@ -241,12 +238,12 @@ async function removeStaleJsonStoreLock(lockPath: string): Promise<void> {
|
|
|
241
238
|
try {
|
|
242
239
|
confirmed = await readJsonStoreLockState(lockPath);
|
|
243
240
|
} catch (error) {
|
|
244
|
-
if (
|
|
241
|
+
if (isErrnoCode(error, "ENOENT")) return;
|
|
245
242
|
throw error;
|
|
246
243
|
}
|
|
247
244
|
if (!sameJsonStoreLockState(initial, confirmed)) return;
|
|
248
245
|
await unlink(lockPath).catch((error) => {
|
|
249
|
-
if (!
|
|
246
|
+
if (!isErrnoCode(error, "ENOENT")) throw error;
|
|
250
247
|
});
|
|
251
248
|
} finally {
|
|
252
249
|
await closeAndRemoveJsonStoreReclaimGuard(reclaimPath, reclaimHandle);
|
|
@@ -272,7 +269,7 @@ async function confirmJsonStoreMutationLockOwnership(
|
|
|
272
269
|
const metadata = JSON.parse(state.content) as { token?: unknown };
|
|
273
270
|
return metadata.token === token;
|
|
274
271
|
} catch (error) {
|
|
275
|
-
if (
|
|
272
|
+
if (isErrnoCode(error, "ENOENT") || error instanceof SyntaxError) return false;
|
|
276
273
|
throw error;
|
|
277
274
|
}
|
|
278
275
|
} finally {
|
|
@@ -291,9 +288,9 @@ async function acquireJsonStoreMutationFileLock(key: string): Promise<() => Prom
|
|
|
291
288
|
try {
|
|
292
289
|
handle = await open(lockPath, "wx", 0o600);
|
|
293
290
|
} catch (error) {
|
|
294
|
-
if (!
|
|
291
|
+
if (!isErrnoCode(error, "EEXIST")) throw error;
|
|
295
292
|
await removeStaleJsonStoreLock(lockPath).catch((staleError) => {
|
|
296
|
-
if (!
|
|
293
|
+
if (!isErrnoCode(staleError, "ENOENT")) throw staleError;
|
|
297
294
|
});
|
|
298
295
|
if (Date.now() >= deadline) {
|
|
299
296
|
throw new Error(`Timed out acquiring JSON store mutation lock: ${lockPath}`);
|
|
@@ -338,7 +335,7 @@ async function acquireJsonStoreMutationFileLock(key: string): Promise<() => Prom
|
|
|
338
335
|
const metadata = JSON.parse(await readFile(lockPath, "utf8")) as { token?: unknown };
|
|
339
336
|
if (metadata.token === token) await unlink(lockPath);
|
|
340
337
|
} catch (error) {
|
|
341
|
-
if (!
|
|
338
|
+
if (!isErrnoCode(error, "ENOENT")) throw error;
|
|
342
339
|
}
|
|
343
340
|
};
|
|
344
341
|
}
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
type ConnectorState,
|
|
30
30
|
type LiveConnector,
|
|
31
31
|
} from "./connectors/live/index.js";
|
|
32
|
+
import { abortError } from "./abort-error.js";
|
|
32
33
|
import type { LiveConnectorsConfig } from "./types.js";
|
|
33
34
|
|
|
34
35
|
export type LiveConnectorSkipReason =
|
|
@@ -428,7 +429,7 @@ function throwIfAborted(signal: AbortSignal | undefined): void {
|
|
|
428
429
|
if (reason instanceof Error) {
|
|
429
430
|
throw reason;
|
|
430
431
|
}
|
|
431
|
-
throw
|
|
432
|
+
throw abortError(reason === undefined ? "operation aborted" : String(reason));
|
|
432
433
|
}
|
|
433
434
|
|
|
434
435
|
async function writeConnectorErrorState(options: {
|
package/src/location/store.ts
CHANGED
|
@@ -21,6 +21,7 @@ import path from "node:path";
|
|
|
21
21
|
|
|
22
22
|
import { writeFileAtomically } from "../maintenance/atomic-file.js";
|
|
23
23
|
import { pathIsInside } from "../utils/path-containment.js";
|
|
24
|
+
import { isErrnoCode } from "../utils/errno.js";
|
|
24
25
|
import { isValidLocationDate, placeDurations } from "./intervals.js";
|
|
25
26
|
import type { LocationSegment } from "./types.js";
|
|
26
27
|
|
|
@@ -376,10 +377,6 @@ export function parseLocationDaySummary(raw: string): LocationDaySummary | null
|
|
|
376
377
|
|
|
377
378
|
// ── Containment-checked day-file IO ─────────────────────────────────────────
|
|
378
379
|
|
|
379
|
-
function isErrnoCode(err: unknown, code: string): boolean {
|
|
380
|
-
return err instanceof Error && (err as NodeJS.ErrnoException).code === code;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
380
|
async function assertNotSymlink(target: string, kind: "directory" | "day file"): Promise<void> {
|
|
384
381
|
let stat: { isSymbolicLink(): boolean };
|
|
385
382
|
try {
|