@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
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test, { mock } from "node:test";
|
|
3
|
+
import { mkdtemp } from "node:fs/promises";
|
|
4
|
+
import type { MemoryFile } from "../types.js";
|
|
5
|
+
import os from "node:os";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
|
|
8
|
+
import { StorageManager } from "../index.js";
|
|
9
|
+
import { parseConfig } from "../config.js";
|
|
10
|
+
import { createBatchPromotedCopyProbe, mergeTargetHasPromotedCopies, promoteAndReconcileMergedTarget, retireStaleMergedTargetPromotionCopies } from "./extraction-persist-promotion.js";
|
|
11
|
+
import { buildMergedTargetPromotionPayload } from "./semantic-merge-promotion-payload.js";
|
|
12
|
+
import type { ResolvedScopeProfilePlan } from "../namespaces/scope-profiles.js";
|
|
13
|
+
|
|
14
|
+
// Synthetic fixtures only — no real paths, hosts, or memory content.
|
|
15
|
+
const PROMOTED_BODY = "Promoted copy of the billing deploy cadence fact.";
|
|
16
|
+
|
|
17
|
+
async function makeStorages(): Promise<{
|
|
18
|
+
source: StorageManager;
|
|
19
|
+
shared: StorageManager;
|
|
20
|
+
router: { storageFor: (namespace: string) => Promise<StorageManager> };
|
|
21
|
+
}> {
|
|
22
|
+
const source = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-src-")));
|
|
23
|
+
const shared = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-shared-")));
|
|
24
|
+
await source.ensureDirectories();
|
|
25
|
+
await shared.ensureDirectories();
|
|
26
|
+
const router = {
|
|
27
|
+
storageFor: async (namespace: string): Promise<StorageManager> => {
|
|
28
|
+
if (namespace === "shared") return shared;
|
|
29
|
+
throw new Error(`unexpected namespace "${namespace}"`);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
return { source, shared, router };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function argsFor(overrides: {
|
|
36
|
+
source: StorageManager;
|
|
37
|
+
router: { storageFor: (namespace: string) => Promise<StorageManager> };
|
|
38
|
+
failRouter?: boolean;
|
|
39
|
+
}) {
|
|
40
|
+
return {
|
|
41
|
+
config: parseConfig({ memoryDir: overrides.source.dir, sharedNamespace: "shared" }),
|
|
42
|
+
getStorageRouter: () =>
|
|
43
|
+
overrides.failRouter === true
|
|
44
|
+
? {
|
|
45
|
+
storageFor: (_namespace: string) =>
|
|
46
|
+
Promise.reject(new Error("router down")),
|
|
47
|
+
}
|
|
48
|
+
: overrides.router,
|
|
49
|
+
scopeProfileWritePlan: null,
|
|
50
|
+
sourceStorage: overrides.source,
|
|
51
|
+
targetMemoryId: "fact-target",
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
test("mergeTargetHasPromotedCopies: a shared copy linked by sourceMemoryId blocks the merge", async () => {
|
|
56
|
+
const s = await makeStorages();
|
|
57
|
+
const unrelated = await s.shared.writeMemory("fact", PROMOTED_BODY, { source: "test" });
|
|
58
|
+
assert.equal(
|
|
59
|
+
await mergeTargetHasPromotedCopies(argsFor({ source: s.source, router: s.router })),
|
|
60
|
+
false,
|
|
61
|
+
"an unrelated shared fact (no sourceMemoryId) must not block",
|
|
62
|
+
);
|
|
63
|
+
await s.shared.writeMemory("fact", PROMOTED_BODY, {
|
|
64
|
+
source: "test",
|
|
65
|
+
sourceMemoryId: "fact-target",
|
|
66
|
+
});
|
|
67
|
+
assert.equal(
|
|
68
|
+
await mergeTargetHasPromotedCopies(argsFor({ source: s.source, router: s.router })),
|
|
69
|
+
true,
|
|
70
|
+
`a shared copy linked to the target must block (unrelated copy id: ${unrelated.id})`,
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test("mergeTargetHasPromotedCopies: a copy in the source namespace itself does not block", async () => {
|
|
75
|
+
const s = await makeStorages();
|
|
76
|
+
await s.source.writeMemory("fact", PROMOTED_BODY, {
|
|
77
|
+
source: "test",
|
|
78
|
+
sourceMemoryId: "fact-target",
|
|
79
|
+
});
|
|
80
|
+
assert.equal(
|
|
81
|
+
await mergeTargetHasPromotedCopies(argsFor({ source: s.source, router: s.router })),
|
|
82
|
+
false,
|
|
83
|
+
"the target's own namespace holds the source row, not a promoted copy",
|
|
84
|
+
);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
test("mergeTargetHasPromotedCopies: an unreadable promotion namespace fails safe (blocks the merge)", async () => {
|
|
88
|
+
const s = await makeStorages();
|
|
89
|
+
assert.equal(
|
|
90
|
+
await mergeTargetHasPromotedCopies(
|
|
91
|
+
argsFor({ source: s.source, router: s.router, failRouter: true }),
|
|
92
|
+
),
|
|
93
|
+
true,
|
|
94
|
+
"an unreadable namespace may hold a copy we cannot see — create instead",
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test("mergeTargetHasPromotedCopies: a shared copy still blocks when shared-write authorization is revoked", async () => {
|
|
99
|
+
// The copy was promoted while shared writes were allowed; the profile has
|
|
100
|
+
// since lost that authorization. Current write authorization must not
|
|
101
|
+
// make an existing copy invisible to the scan — the merge is bypassed so
|
|
102
|
+
// the shared copy cannot keep serving the pre-merge body.
|
|
103
|
+
const s = await makeStorages();
|
|
104
|
+
await s.shared.writeMemory("fact", PROMOTED_BODY, {
|
|
105
|
+
source: "test",
|
|
106
|
+
sourceMemoryId: "fact-target",
|
|
107
|
+
});
|
|
108
|
+
assert.equal(
|
|
109
|
+
await mergeTargetHasPromotedCopies(argsFor({ source: s.source, router: s.router })),
|
|
110
|
+
true,
|
|
111
|
+
"a historical shared copy blocks even though no authorization gate is consulted",
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test("mergeTargetHasPromotedCopies: an unauthorized profile target's historical copy still blocks", async () => {
|
|
116
|
+
const source = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-src-")));
|
|
117
|
+
const team = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-team-")));
|
|
118
|
+
await source.ensureDirectories();
|
|
119
|
+
await team.ensureDirectories();
|
|
120
|
+
await team.writeMemory("fact", PROMOTED_BODY, { source: "test", sourceMemoryId: "fact-target" });
|
|
121
|
+
const args = {
|
|
122
|
+
...argsFor({
|
|
123
|
+
source,
|
|
124
|
+
router: {
|
|
125
|
+
storageFor: async (namespace: string) => {
|
|
126
|
+
if (namespace === "team" || namespace === "shared") return team;
|
|
127
|
+
throw new Error(`unexpected namespace "${namespace}"`);
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
}),
|
|
131
|
+
scopeProfileWritePlan: {
|
|
132
|
+
profileId: "synthetic",
|
|
133
|
+
profile: { autoPromote: { targets: ["team-project"] } },
|
|
134
|
+
promotionTargets: [
|
|
135
|
+
// Authorized NOW: false — the copy was promoted under an older plan.
|
|
136
|
+
{ target: "team-project", namespace: "team", authorized: false, reason: "revoked" },
|
|
137
|
+
],
|
|
138
|
+
} as unknown as ResolvedScopeProfilePlan,
|
|
139
|
+
};
|
|
140
|
+
assert.equal(
|
|
141
|
+
await mergeTargetHasPromotedCopies(args),
|
|
142
|
+
true,
|
|
143
|
+
"current authorization must not drop a known promotion layer from the scan",
|
|
144
|
+
);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test("mergeTargetHasPromotedCopies: a layer removed from today's autoPromote targets still blocks (finding E)", async () => {
|
|
148
|
+
// The copy was promoted while the layer was listed in autoPromote.targets;
|
|
149
|
+
// the operator has since removed it. The layer is still a resolved
|
|
150
|
+
// promotionTarget, so historical-copy detection must keep scanning it —
|
|
151
|
+
// today's selection policy must not blind the scan.
|
|
152
|
+
const source = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-src-")));
|
|
153
|
+
const team = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-team-")));
|
|
154
|
+
await source.ensureDirectories();
|
|
155
|
+
await team.ensureDirectories();
|
|
156
|
+
await team.writeMemory("fact", PROMOTED_BODY, { source: "test", sourceMemoryId: "fact-target" });
|
|
157
|
+
const args = {
|
|
158
|
+
...argsFor({
|
|
159
|
+
source,
|
|
160
|
+
router: {
|
|
161
|
+
storageFor: async (namespace: string) => {
|
|
162
|
+
if (namespace === "team" || namespace === "shared") return team;
|
|
163
|
+
throw new Error(`unexpected namespace "${namespace}"`);
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
}),
|
|
167
|
+
scopeProfileWritePlan: {
|
|
168
|
+
profileId: "synthetic",
|
|
169
|
+
profile: { autoPromote: { targets: [] } },
|
|
170
|
+
promotionTargets: [
|
|
171
|
+
{ target: "team-project", namespace: "team", authorized: true, reason: "ok" },
|
|
172
|
+
],
|
|
173
|
+
} as unknown as ResolvedScopeProfilePlan,
|
|
174
|
+
};
|
|
175
|
+
assert.equal(
|
|
176
|
+
await mergeTargetHasPromotedCopies(args),
|
|
177
|
+
true,
|
|
178
|
+
"a copy on a deselected layer still blocks — detection scans history, policy governs writes",
|
|
179
|
+
);
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
test("createBatchPromotedCopyProbe: one scan per namespace per batch, not per fact (finding F)", async () => {
|
|
183
|
+
const source = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-src-")));
|
|
184
|
+
const team = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-team-")));
|
|
185
|
+
const shared = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-shared-")));
|
|
186
|
+
await source.ensureDirectories();
|
|
187
|
+
await team.ensureDirectories();
|
|
188
|
+
await shared.ensureDirectories();
|
|
189
|
+
await team.writeMemory("fact", PROMOTED_BODY, { source: "test", sourceMemoryId: "fact-target" });
|
|
190
|
+
let storageForCalls = 0;
|
|
191
|
+
const probe = createBatchPromotedCopyProbe(
|
|
192
|
+
parseConfig({ memoryDir: source.dir, sharedNamespace: "shared" }),
|
|
193
|
+
() => ({
|
|
194
|
+
storageFor: async (namespace: string) => {
|
|
195
|
+
storageForCalls++;
|
|
196
|
+
if (namespace === "team") return team;
|
|
197
|
+
if (namespace === "shared") return shared;
|
|
198
|
+
throw new Error(`unexpected namespace "${namespace}"`);
|
|
199
|
+
},
|
|
200
|
+
}),
|
|
201
|
+
{
|
|
202
|
+
profileId: "synthetic",
|
|
203
|
+
profile: { autoPromote: { targets: ["team-project"] } },
|
|
204
|
+
promotionTargets: [
|
|
205
|
+
{ target: "team-project", namespace: "team", authorized: true, reason: "ok" },
|
|
206
|
+
],
|
|
207
|
+
} as unknown as ResolvedScopeProfilePlan,
|
|
208
|
+
);
|
|
209
|
+
// Three judge-approved facts in one batch, each probing the same target:
|
|
210
|
+
// every probe must see the historical copy, and the team corpus scan must
|
|
211
|
+
// have run exactly once (the hit short-circuits before shared).
|
|
212
|
+
for (let factIndex = 0; factIndex < 3; factIndex++) {
|
|
213
|
+
assert.equal(
|
|
214
|
+
await probe.check(source, "fact-target"),
|
|
215
|
+
true,
|
|
216
|
+
`fact ${factIndex}: the historical copy must block`,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
assert.equal(storageForCalls, 1, "the team namespace scanned once — not once per fact");
|
|
220
|
+
// A fact with no copy anywhere probes PAST team into shared, once:
|
|
221
|
+
assert.equal(await probe.check(source, "fact-without-copy"), false);
|
|
222
|
+
assert.equal(await probe.check(source, "fact-without-copy"), false);
|
|
223
|
+
assert.equal(storageForCalls, 2, "the shared namespace also scanned once per batch");
|
|
224
|
+
// A promotion this batch performed must force the next fact to rescan.
|
|
225
|
+
probe.invalidate();
|
|
226
|
+
assert.equal(await probe.check(source, "fact-target"), true);
|
|
227
|
+
assert.equal(storageForCalls, 3, "invalidation drops the cache; the next fact rescans");
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
test("retireStaleMergedTargetPromotionCopies: a concurrent promotion of the pre-merge body is reconciled to the current copy (round N+7 B)", async () => {
|
|
231
|
+
// Race being modeled: the pre-mutation promoted-copy probe reported none,
|
|
232
|
+
// another writer promoted the PRE-merge body, and only then did the merge
|
|
233
|
+
// commit and promote the current body. Promotion dedups by content, so
|
|
234
|
+
// without reconciliation both copies stay active across namespaces. The
|
|
235
|
+
// helper is imported dynamically so the PRE-fix run fails this test alone
|
|
236
|
+
// (the reconciliation being absent) instead of failing the whole file at
|
|
237
|
+
// import time.
|
|
238
|
+
const { retireStaleMergedTargetPromotionCopies } = await import(
|
|
239
|
+
"./extraction-persist-promotion.js"
|
|
240
|
+
);
|
|
241
|
+
assert.equal(
|
|
242
|
+
typeof retireStaleMergedTargetPromotionCopies,
|
|
243
|
+
"function",
|
|
244
|
+
"the merged-target promotion reconciliation must exist",
|
|
245
|
+
);
|
|
246
|
+
const s = await makeStorages();
|
|
247
|
+
const PRE_MERGE_BODY = "Billing service deploys happen on Tuesdays.";
|
|
248
|
+
const MERGED_BODY = "Billing service deploys happen on Tuesdays at 09:00 UTC.";
|
|
249
|
+
// The committed source record holds the merged body — the canonical
|
|
250
|
+
// record reconciliation re-reads (round N+15 A: always, not only when no
|
|
251
|
+
// promoted body is supplied).
|
|
252
|
+
const target = await s.source.writeMemory("fact", MERGED_BODY, {
|
|
253
|
+
source: "test",
|
|
254
|
+
});
|
|
255
|
+
// The concurrent writer's copy: same sourceMemoryId, pre-merge body.
|
|
256
|
+
const stale = await s.shared.writeMemory("fact", PRE_MERGE_BODY, {
|
|
257
|
+
source: "test",
|
|
258
|
+
sourceMemoryId: target.id,
|
|
259
|
+
});
|
|
260
|
+
// The merged-target promotion's copy: same sourceMemoryId, merged body.
|
|
261
|
+
const current = await s.shared.writeMemory("fact", MERGED_BODY, {
|
|
262
|
+
source: "test",
|
|
263
|
+
sourceMemoryId: target.id,
|
|
264
|
+
});
|
|
265
|
+
const retired = await retireStaleMergedTargetPromotionCopies({
|
|
266
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
267
|
+
getStorageRouter: () => s.router,
|
|
268
|
+
scopeProfileWritePlan: null,
|
|
269
|
+
sourceStorage: s.source,
|
|
270
|
+
sourceMemoryId: target.id,
|
|
271
|
+
promotedContent: MERGED_BODY,
|
|
272
|
+
promotedMemoryId: current.id,
|
|
273
|
+
normalize: (content: string) => content,
|
|
274
|
+
});
|
|
275
|
+
assert.equal(retired, 1, "exactly the pre-merge copy is retired");
|
|
276
|
+
const staleRow = await s.shared.getMemoryByIdIncludingArchived(stale.id);
|
|
277
|
+
assert.equal(staleRow?.frontmatter.status, "superseded");
|
|
278
|
+
assert.equal(staleRow?.frontmatter.supersededBy, current.id);
|
|
279
|
+
const currentRow = await s.shared.getMemoryByIdIncludingArchived(current.id);
|
|
280
|
+
assert.equal(currentRow?.frontmatter.status ?? "active", "active");
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
test("retireStaleMergedTargetPromotionCopies: an unreadable canonical record aborts reconciliation — no copy is retired (round N+13 A)", async () => {
|
|
284
|
+
// No-promotion path: the committed source record is re-read to serve as
|
|
285
|
+
// the canonical body. When that re-read fails transiently, returns nothing,
|
|
286
|
+
// or yields an empty body, there is NO confirmed replacement body to
|
|
287
|
+
// compare against — an empty-string fallback would classify every
|
|
288
|
+
// non-empty active copy as stale and supersede it (keep-vs-destroy guard:
|
|
289
|
+
// unreadable input resolves toward keep). Reconciliation aborts; the next
|
|
290
|
+
// merge retries it.
|
|
291
|
+
const s = await makeStorages();
|
|
292
|
+
const copy = await s.shared.writeMemory("fact", PROMOTED_BODY, {
|
|
293
|
+
source: "test",
|
|
294
|
+
sourceMemoryId: "fact-target",
|
|
295
|
+
});
|
|
296
|
+
const cases: Array<{ label: string; read: () => Promise<MemoryFile | null> }> = [
|
|
297
|
+
{
|
|
298
|
+
label: "transient read failure",
|
|
299
|
+
read: async () => {
|
|
300
|
+
throw new Error("transient canonical read failure");
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
{ label: "record not found", read: async () => null },
|
|
304
|
+
{
|
|
305
|
+
label: "record with empty body",
|
|
306
|
+
read: async () =>
|
|
307
|
+
({
|
|
308
|
+
path: `${s.source.dir}/facts/2026-08-20/fact-target.md`,
|
|
309
|
+
frontmatter: { id: "fact-target", category: "fact" },
|
|
310
|
+
content: "",
|
|
311
|
+
}) as unknown as MemoryFile,
|
|
312
|
+
},
|
|
313
|
+
];
|
|
314
|
+
for (const testCase of cases) {
|
|
315
|
+
const readSpy = mock.method(s.source, "getMemoryByIdIncludingArchived", testCase.read);
|
|
316
|
+
try {
|
|
317
|
+
const retired = await retireStaleMergedTargetPromotionCopies({
|
|
318
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
319
|
+
getStorageRouter: () => s.router,
|
|
320
|
+
scopeProfileWritePlan: null,
|
|
321
|
+
sourceStorage: s.source,
|
|
322
|
+
sourceMemoryId: "fact-target",
|
|
323
|
+
normalize: (content: string) => content,
|
|
324
|
+
});
|
|
325
|
+
assert.equal(
|
|
326
|
+
retired,
|
|
327
|
+
0,
|
|
328
|
+
`${testCase.label}: no copy may be retired without a confirmed canonical body`,
|
|
329
|
+
);
|
|
330
|
+
} finally {
|
|
331
|
+
readSpy.mock.restore();
|
|
332
|
+
}
|
|
333
|
+
const row = await s.shared.getMemoryByIdIncludingArchived(copy.id);
|
|
334
|
+
assert.equal(
|
|
335
|
+
row?.frontmatter.status ?? "active",
|
|
336
|
+
"active",
|
|
337
|
+
`${testCase.label}: the promoted copy stays active`,
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
test("former promotion layers still resolvable are scanned: a copy on a layer removed from promotionTargets is detected and reconciled (round N+12 B)", async () => {
|
|
343
|
+
// The namespace received promoted copies while "userGlobal" was listed in
|
|
344
|
+
// profile.promotionTargets. The operator has since removed the layer from
|
|
345
|
+
// the promotion selection, but it remains resolvable through the plan's
|
|
346
|
+
// layers (readOrder). Historical copies there must stay detectable — and
|
|
347
|
+
// reconcilable — or that namespace keeps serving the stale pre-merge body.
|
|
348
|
+
const source = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-src-")));
|
|
349
|
+
const global = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-global-")));
|
|
350
|
+
const shared = new StorageManager(await mkdtemp(path.join(os.tmpdir(), "remnic-mc-shared-")));
|
|
351
|
+
await source.ensureDirectories();
|
|
352
|
+
await global.ensureDirectories();
|
|
353
|
+
await shared.ensureDirectories();
|
|
354
|
+
const PRE_MERGE_BODY = "Billing service deploys happen on Tuesdays.";
|
|
355
|
+
const MERGED_BODY = "Billing service deploys happen on Tuesdays at 09:00 UTC.";
|
|
356
|
+
// The committed source record (canonical for reconciliation, N+15 A).
|
|
357
|
+
const target = await source.writeMemory("fact", MERGED_BODY, { source: "test" });
|
|
358
|
+
const stale = await global.writeMemory("fact", PRE_MERGE_BODY, {
|
|
359
|
+
source: "test",
|
|
360
|
+
sourceMemoryId: target.id,
|
|
361
|
+
});
|
|
362
|
+
const router = {
|
|
363
|
+
storageFor: async (namespace: string): Promise<StorageManager> => {
|
|
364
|
+
if (namespace === "global" || namespace === "shared") {
|
|
365
|
+
return namespace === "global" ? global : shared;
|
|
366
|
+
}
|
|
367
|
+
throw new Error(`unexpected namespace "${namespace}"`);
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
const plan = {
|
|
371
|
+
profileId: "synthetic",
|
|
372
|
+
profile: { autoPromote: { targets: [] } },
|
|
373
|
+
// The layer is GONE from today's promotion targets...
|
|
374
|
+
promotionTargets: [],
|
|
375
|
+
// ...but still resolvable through the plan's resolved layers.
|
|
376
|
+
layers: [{ id: "userGlobal", namespace: "global" }],
|
|
377
|
+
} as unknown as ResolvedScopeProfilePlan;
|
|
378
|
+
const config = parseConfig({ memoryDir: source.dir, sharedNamespace: "shared" });
|
|
379
|
+
// Detection: the probe must still find the historical copy there.
|
|
380
|
+
assert.equal(
|
|
381
|
+
await mergeTargetHasPromotedCopies({
|
|
382
|
+
config,
|
|
383
|
+
getStorageRouter: () => router,
|
|
384
|
+
scopeProfileWritePlan: plan,
|
|
385
|
+
sourceStorage: source,
|
|
386
|
+
targetMemoryId: target.id,
|
|
387
|
+
}),
|
|
388
|
+
true,
|
|
389
|
+
"a copy on a former-but-still-resolvable promotion layer must block the merge",
|
|
390
|
+
);
|
|
391
|
+
// Reconciliation: after a merge, the stale copy there is superseded.
|
|
392
|
+
const retired = await retireStaleMergedTargetPromotionCopies({
|
|
393
|
+
config,
|
|
394
|
+
getStorageRouter: () => router,
|
|
395
|
+
scopeProfileWritePlan: plan,
|
|
396
|
+
sourceStorage: source,
|
|
397
|
+
sourceMemoryId: target.id,
|
|
398
|
+
promotedContent: MERGED_BODY,
|
|
399
|
+
normalize: (content: string) => content,
|
|
400
|
+
});
|
|
401
|
+
assert.equal(retired, 1, "the stale copy on the former layer is retired");
|
|
402
|
+
const staleRow = await global.getMemoryByIdIncludingArchived(stale.id);
|
|
403
|
+
assert.equal(staleRow?.frontmatter.status, "superseded");
|
|
404
|
+
assert.equal(staleRow?.frontmatter.supersededBy, target.id);
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
// ── Round N+15 (A): multi-writer promotion races ────────────────────────────
|
|
408
|
+
|
|
409
|
+
const PRE_MERGE_BODY = "Billing service deploys happen on Tuesdays.";
|
|
410
|
+
const A_MERGED_BODY = "Billing service deploys happen on Tuesdays at 09:00 UTC.";
|
|
411
|
+
const B_MERGED_BODY =
|
|
412
|
+
"Billing service deploys happen on Tuesdays at 09:00 UTC, paging the on-call engineer.";
|
|
413
|
+
|
|
414
|
+
async function commitWriterMerge(
|
|
415
|
+
storage: StorageManager,
|
|
416
|
+
targetId: string,
|
|
417
|
+
body: string,
|
|
418
|
+
): Promise<void> {
|
|
419
|
+
const snapshot = await storage.getMemoryByIdIncludingArchived(targetId);
|
|
420
|
+
assert.ok(snapshot);
|
|
421
|
+
assert.equal(await storage.updateMemoryIfUnchanged(snapshot, body), true);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
test("promoteAndReconcileMergedTarget: abandons the cached promotion when the target advanced past it (round N+15 A)", async () => {
|
|
425
|
+
// Race: writer A built its promotion payload from the committed record,
|
|
426
|
+
// then writer B merged the SAME target again and published its copy
|
|
427
|
+
// before A resumed at the promotion. Promoting A's cached older body
|
|
428
|
+
// would hand reconciliation a stale canonical body that supersedes B's
|
|
429
|
+
// current copy. A must abandon the promotion AND its reconciliation —
|
|
430
|
+
// B's copy stands; the next merge retries both.
|
|
431
|
+
const s = await makeStorages();
|
|
432
|
+
const target = await s.source.writeMemory("fact", PRE_MERGE_BODY, {
|
|
433
|
+
source: "test",
|
|
434
|
+
});
|
|
435
|
+
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
436
|
+
const payload = await buildMergedTargetPromotionPayload(s.source, {
|
|
437
|
+
targetId: target.id,
|
|
438
|
+
mergedContent: A_MERGED_BODY,
|
|
439
|
+
provenancePatched: true,
|
|
440
|
+
});
|
|
441
|
+
assert.ok(payload);
|
|
442
|
+
// Writer B merges the same target again and publishes its newer copy.
|
|
443
|
+
await commitWriterMerge(s.source, target.id, B_MERGED_BODY);
|
|
444
|
+
const bCopy = await s.shared.writeMemory("fact", B_MERGED_BODY, {
|
|
445
|
+
source: "writer-b",
|
|
446
|
+
sourceMemoryId: target.id,
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
let promotions = 0;
|
|
450
|
+
await promoteAndReconcileMergedTarget({
|
|
451
|
+
promote: async () => {
|
|
452
|
+
promotions += 1;
|
|
453
|
+
return `copy-${promotions}`;
|
|
454
|
+
},
|
|
455
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
456
|
+
getStorageRouter: () => s.router,
|
|
457
|
+
scopeProfileWritePlan: null,
|
|
458
|
+
sourceStorage: s.source,
|
|
459
|
+
sourceMemoryId: target.id,
|
|
460
|
+
mergedPromotion: payload,
|
|
461
|
+
normalize: (content: string) => content,
|
|
462
|
+
});
|
|
463
|
+
assert.equal(promotions, 0, "the stale cached payload must never be promoted");
|
|
464
|
+
const bRow = await s.shared.getMemoryByIdIncludingArchived(bCopy.id);
|
|
465
|
+
assert.equal(
|
|
466
|
+
bRow?.frontmatter.status ?? "active",
|
|
467
|
+
"active",
|
|
468
|
+
"the newer writer's current copy stands",
|
|
469
|
+
);
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
test("promoteAndReconcileMergedTarget: reconciliation canonical is the re-read record, never the cached promoted body (round N+15 A)", async () => {
|
|
473
|
+
// The residual window: the payload revalidates clean, the promotion
|
|
474
|
+
// writes, and ONLY THEN does writer B commit a newer merge and publish
|
|
475
|
+
// its copy — before A's reconciliation runs. A cached-body canonical
|
|
476
|
+
// would supersede B's current copy; the re-read committed record is the
|
|
477
|
+
// only body reconciliation may treat as canonical.
|
|
478
|
+
const s = await makeStorages();
|
|
479
|
+
const target = await s.source.writeMemory("fact", PRE_MERGE_BODY, {
|
|
480
|
+
source: "test",
|
|
481
|
+
});
|
|
482
|
+
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
483
|
+
const payload = await buildMergedTargetPromotionPayload(s.source, {
|
|
484
|
+
targetId: target.id,
|
|
485
|
+
mergedContent: A_MERGED_BODY,
|
|
486
|
+
provenancePatched: true,
|
|
487
|
+
});
|
|
488
|
+
assert.ok(payload);
|
|
489
|
+
|
|
490
|
+
let aCopyId = "";
|
|
491
|
+
let bCopyId = "";
|
|
492
|
+
await promoteAndReconcileMergedTarget({
|
|
493
|
+
promote: async (promotionPayload) => {
|
|
494
|
+
const aCopy = await s.shared.writeMemory("fact", promotionPayload.content, {
|
|
495
|
+
source: "writer-a",
|
|
496
|
+
sourceMemoryId: target.id,
|
|
497
|
+
});
|
|
498
|
+
aCopyId = aCopy.id;
|
|
499
|
+
// Writer B's second merge lands HERE — after the promotion wrote,
|
|
500
|
+
// before reconciliation runs.
|
|
501
|
+
await commitWriterMerge(s.source, target.id, B_MERGED_BODY);
|
|
502
|
+
const bCopy = await s.shared.writeMemory("fact", B_MERGED_BODY, {
|
|
503
|
+
source: "writer-b",
|
|
504
|
+
sourceMemoryId: target.id,
|
|
505
|
+
});
|
|
506
|
+
bCopyId = bCopy.id;
|
|
507
|
+
return aCopy.id;
|
|
508
|
+
},
|
|
509
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
510
|
+
getStorageRouter: () => s.router,
|
|
511
|
+
scopeProfileWritePlan: null,
|
|
512
|
+
sourceStorage: s.source,
|
|
513
|
+
sourceMemoryId: target.id,
|
|
514
|
+
mergedPromotion: payload,
|
|
515
|
+
normalize: (content: string) => content,
|
|
516
|
+
});
|
|
517
|
+
const bRow = await s.shared.getMemoryByIdIncludingArchived(bCopyId);
|
|
518
|
+
assert.equal(
|
|
519
|
+
bRow?.frontmatter.status ?? "active",
|
|
520
|
+
"active",
|
|
521
|
+
"B's current copy is never superseded off A's cached body",
|
|
522
|
+
);
|
|
523
|
+
const aRow = await s.shared.getMemoryByIdIncludingArchived(aCopyId);
|
|
524
|
+
assert.equal(
|
|
525
|
+
aRow?.frontmatter.status,
|
|
526
|
+
"superseded",
|
|
527
|
+
"A's raced copy retires once the committed record moved past its body",
|
|
528
|
+
);
|
|
529
|
+
assert.equal(
|
|
530
|
+
aRow?.frontmatter.supersededBy,
|
|
531
|
+
target.id,
|
|
532
|
+
"the supersession lands on the source target — the live canonical record",
|
|
533
|
+
);
|
|
534
|
+
});
|