@remnic/core 1.1.31 → 9.3.516
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 +2 -2
- package/dist/access-cli.d.ts +1 -1
- package/dist/access-cli.js +158 -121
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +9 -5
- package/dist/access-http.js +51 -51
- package/dist/access-idempotency.d.ts +2 -0
- package/dist/access-idempotency.js +1 -1
- package/dist/access-mcp.d.ts +16 -9
- package/dist/access-mcp.js +44 -44
- package/dist/access-schema.d.ts +45 -13
- package/dist/access-schema.js +8 -8
- package/dist/{access-service-CkZyb35d.d.ts → access-service-CZfksQuS.d.ts} +11 -130
- package/dist/access-service.d.ts +7 -4
- package/dist/access-service.js +40 -40
- package/dist/action-confidence.d.ts +1 -0
- package/dist/active-memory-bridge.d.ts +1 -0
- package/dist/active-memory-bridge.js +3 -2
- package/dist/active-recall.d.ts +1 -0
- package/dist/active-recall.js +14 -9
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/claude-code.d.ts +6 -2
- package/dist/adapters/claude-code.js +2 -2
- package/dist/adapters/codex.d.ts +5 -1
- package/dist/adapters/codex.js +2 -2
- package/dist/adapters/hermes.js +2 -2
- package/dist/adapters/index.js +6 -6
- package/dist/adapters/registry.js +6 -6
- package/dist/adapters/replit.d.ts +4 -2
- package/dist/adapters/replit.js +2 -2
- package/dist/adapters/types.d.ts +4 -0
- package/dist/adapters/types.js +1 -1
- package/dist/behavior-learner.d.ts +1 -0
- package/dist/behavior-signals.d.ts +1 -0
- package/dist/behavior-signals.js +1 -1
- package/dist/bootstrap.d.ts +5 -3
- package/dist/bootstrap.js +2 -2
- package/dist/boxes.d.ts +1 -0
- package/dist/boxes.js +1 -1
- package/dist/briefing.d.ts +1 -0
- package/dist/briefing.js +9 -9
- package/dist/buffer-surprise-report.d.ts +1 -0
- package/dist/buffer.d.ts +1 -0
- package/dist/buffer.js +2 -2
- package/dist/bulk-import/index.d.ts +28 -0
- package/dist/bulk-import/index.js +31 -0
- package/dist/calibration.d.ts +2 -0
- package/dist/calibration.js +50 -17
- package/dist/calibration.js.map +1 -1
- package/dist/{capsule-crypto-5CYAGVC5.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/{capsule-merge-4MGKE7C5.js → capsule-merge-T2JRE46P.js} +3 -3
- package/dist/causal-behavior.d.ts +1 -0
- package/dist/causal-behavior.js +4 -4
- package/dist/causal-chain.js +4 -4
- package/dist/causal-consolidation.d.ts +16 -1
- package/dist/causal-consolidation.js +115 -32
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +14 -6
- package/dist/causal-retrieval.js.map +1 -1
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +2 -2
- package/dist/{chunk-SAZS2QZB.js → chunk-23UORJ4S.js} +3 -3
- package/dist/{chunk-76FLAAUC.js → chunk-2AN2L4NL.js} +17 -6
- package/dist/chunk-2AN2L4NL.js.map +1 -0
- package/dist/{chunk-W4L6CZKA.js → chunk-2DL3OFLD.js} +15 -10
- package/dist/chunk-2DL3OFLD.js.map +1 -0
- package/dist/{chunk-NJ3MJQZX.js → chunk-2I5JGH3M.js} +2 -2
- package/dist/{chunk-NJ3MJQZX.js.map → chunk-2I5JGH3M.js.map} +1 -1
- package/dist/{chunk-7OZ53EXP.js → chunk-2NLLXCJG.js} +21 -10
- package/dist/chunk-2NLLXCJG.js.map +1 -0
- package/dist/{chunk-PK7H5L6Y.js → chunk-2NM43EWN.js} +2 -2
- package/dist/{chunk-PYXS46O7.js → chunk-3BP57I6J.js} +2 -2
- package/dist/{chunk-FBYESMQ2.js → chunk-3C5RPJAX.js} +2 -2
- package/dist/{chunk-FKFMOY3N.js → chunk-42NQ7AVG.js} +3 -4
- package/dist/{chunk-FKFMOY3N.js.map → chunk-42NQ7AVG.js.map} +1 -1
- package/dist/chunk-4426WSWL.js +73 -0
- package/dist/chunk-4426WSWL.js.map +1 -0
- package/dist/{chunk-LIRZNNUP.js → chunk-44442YCH.js} +5 -2
- package/dist/chunk-44442YCH.js.map +1 -0
- package/dist/{chunk-H3ME6L6D.js → chunk-46GJIW5M.js} +23 -20
- package/dist/chunk-46GJIW5M.js.map +1 -0
- package/dist/{chunk-QDZ2RLEC.js → chunk-472U7RDF.js} +3 -3
- package/dist/chunk-472U7RDF.js.map +1 -0
- package/dist/{chunk-NN2DKE4T.js → chunk-4H5ZJHEN.js} +16 -3
- package/dist/{chunk-NN2DKE4T.js.map → chunk-4H5ZJHEN.js.map} +1 -1
- package/dist/{chunk-56K5QLHX.js → chunk-4HP7HIE3.js} +56 -13
- package/dist/chunk-4HP7HIE3.js.map +1 -0
- package/dist/{chunk-RK2Y4XOM.js → chunk-4JRRISLU.js} +9 -6
- package/dist/chunk-4JRRISLU.js.map +1 -0
- package/dist/{chunk-XKLD5OK4.js → chunk-4RR6ROTB.js} +10 -11
- package/dist/chunk-4RR6ROTB.js.map +1 -0
- package/dist/{chunk-YROHKYBY.js → chunk-5UHVGNZD.js} +22 -6
- package/dist/chunk-5UHVGNZD.js.map +1 -0
- package/dist/{chunk-ZAVUCJ4H.js → chunk-5V456VRV.js} +154 -69
- package/dist/chunk-5V456VRV.js.map +1 -0
- package/dist/{chunk-77H5NU3M.js → chunk-6BR7L222.js} +82 -18
- package/dist/chunk-6BR7L222.js.map +1 -0
- package/dist/{chunk-4KGVTPGD.js → chunk-6F6BXB7A.js} +9 -8
- package/dist/chunk-6F6BXB7A.js.map +1 -0
- package/dist/{chunk-NMZY542O.js → chunk-6URPAY2D.js} +41 -17
- package/dist/chunk-6URPAY2D.js.map +1 -0
- package/dist/{chunk-N53K2EXC.js → chunk-6VF75M3X.js} +2 -2
- package/dist/{chunk-XSZEP4SF.js → chunk-6XSPNR6L.js} +6 -5
- package/dist/chunk-6XSPNR6L.js.map +1 -0
- package/dist/{chunk-6H2TESSP.js → chunk-765K3SAT.js} +3 -3
- package/dist/{chunk-EDTHC6UD.js → chunk-77NAFXUD.js} +2 -2
- package/dist/{chunk-S7KDBTWT.js → chunk-7F7Z6MOS.js} +29 -14
- package/dist/chunk-7F7Z6MOS.js.map +1 -0
- package/dist/{chunk-MZH6EHNR.js → chunk-7H6CFEBJ.js} +41 -14
- package/dist/chunk-7H6CFEBJ.js.map +1 -0
- package/dist/{chunk-MGKYQQYF.js → chunk-7Q3RCKAQ.js} +2 -2
- package/dist/chunk-7RXCMVFQ.js +27 -0
- package/dist/chunk-7RXCMVFQ.js.map +1 -0
- package/dist/{chunk-DGXUHMOV.js → chunk-A2IYSXDQ.js} +25 -6
- package/dist/chunk-A2IYSXDQ.js.map +1 -0
- package/dist/{chunk-EABGC2TL.js → chunk-A2Z6UCWT.js} +26 -4
- package/dist/chunk-A2Z6UCWT.js.map +1 -0
- package/dist/{chunk-5375UYTQ.js → chunk-A6D7A2FW.js} +4 -4
- package/dist/chunk-A6D7A2FW.js.map +1 -0
- package/dist/{chunk-FAAFWE4G.js → chunk-ALEPI75L.js} +24 -6
- package/dist/chunk-ALEPI75L.js.map +1 -0
- package/dist/{chunk-3SLRNYNG.js → chunk-AUDJPF4N.js} +15 -4
- package/dist/chunk-AUDJPF4N.js.map +1 -0
- package/dist/chunk-B5XMS73R.js +145 -0
- package/dist/chunk-B5XMS73R.js.map +1 -0
- package/dist/{chunk-HXXBL2KD.js → chunk-BECQDWBA.js} +44 -4
- package/dist/chunk-BECQDWBA.js.map +1 -0
- package/dist/{chunk-7SEAZFFB.js → chunk-BEUDU7Y4.js} +24 -4
- package/dist/chunk-BEUDU7Y4.js.map +1 -0
- package/dist/chunk-CHBI22MI.js +159 -0
- package/dist/chunk-CHBI22MI.js.map +1 -0
- package/dist/{chunk-GDFS42HT.js → chunk-CHCA44C3.js} +15 -8
- package/dist/chunk-CHCA44C3.js.map +1 -0
- package/dist/chunk-CINZGPSJ.js +22 -0
- package/dist/chunk-CINZGPSJ.js.map +1 -0
- package/dist/chunk-CMTINOFS.js +36 -0
- package/dist/chunk-CMTINOFS.js.map +1 -0
- package/dist/{chunk-34DQE4KF.js → chunk-CO7ZO4TU.js} +2 -2
- package/dist/{chunk-PFV5C235.js → chunk-CPPS65WS.js} +2 -1
- package/dist/{chunk-PFV5C235.js.map → chunk-CPPS65WS.js.map} +1 -1
- package/dist/{chunk-DINWEURR.js → chunk-CSKLPDN6.js} +20 -6
- package/dist/chunk-CSKLPDN6.js.map +1 -0
- package/dist/chunk-CWWMTTQE.js +566 -0
- package/dist/chunk-CWWMTTQE.js.map +1 -0
- package/dist/{chunk-IQT3XTKW.js → chunk-D24OXEPB.js} +13 -7
- package/dist/chunk-D24OXEPB.js.map +1 -0
- package/dist/{chunk-WIICJPET.js → chunk-DEUNUKTD.js} +6 -4
- package/dist/{chunk-WIICJPET.js.map → chunk-DEUNUKTD.js.map} +1 -1
- package/dist/{chunk-ZYVPLJ4T.js → chunk-DHGSZ3UD.js} +9 -7
- package/dist/chunk-DHGSZ3UD.js.map +1 -0
- package/dist/{chunk-JR4ZC3G4.js → chunk-DLJ4IR6M.js} +91 -41
- package/dist/chunk-DLJ4IR6M.js.map +1 -0
- package/dist/{chunk-U4SCL7B7.js → chunk-DRD2Q7HQ.js} +82 -18
- package/dist/chunk-DRD2Q7HQ.js.map +1 -0
- package/dist/{chunk-2IWUMAES.js → chunk-E62SBGQ3.js} +28 -13
- package/dist/chunk-E62SBGQ3.js.map +1 -0
- package/dist/{chunk-C5BCH4ZS.js → chunk-EAZGEEG2.js} +21 -3
- package/dist/chunk-EAZGEEG2.js.map +1 -0
- package/dist/{chunk-TPB3I2AC.js → chunk-ECZU5BJH.js} +31 -10
- package/dist/chunk-ECZU5BJH.js.map +1 -0
- package/dist/chunk-EDQVAMQI.js +308 -0
- package/dist/chunk-EDQVAMQI.js.map +1 -0
- package/dist/{chunk-RRF5UOBJ.js → chunk-EI6V5UXY.js} +22 -15
- package/dist/chunk-EI6V5UXY.js.map +1 -0
- package/dist/{chunk-ZKSK55RC.js → chunk-ETUPBUHB.js} +2 -2
- package/dist/{chunk-25MQ7IHJ.js → chunk-EUML3N6B.js} +17 -6
- package/dist/chunk-EUML3N6B.js.map +1 -0
- package/dist/{chunk-5RGLBDQF.js → chunk-EVZFIAPG.js} +12 -12
- package/dist/chunk-EVZFIAPG.js.map +1 -0
- package/dist/{chunk-QRNI5JBH.js → chunk-EYIEWJNI.js} +2 -2
- package/dist/{chunk-TPU5L5EY.js → chunk-FCOQXV3T.js} +272 -411
- package/dist/chunk-FCOQXV3T.js.map +1 -0
- package/dist/{chunk-TMQLARTH.js → chunk-FK556DDH.js} +34 -15
- package/dist/chunk-FK556DDH.js.map +1 -0
- package/dist/{chunk-43PJZYGL.js → chunk-FPGE5NVO.js} +45 -10
- package/dist/chunk-FPGE5NVO.js.map +1 -0
- package/dist/{chunk-3VAL7ZL2.js → chunk-FUC4LZMD.js} +60 -25
- package/dist/chunk-FUC4LZMD.js.map +1 -0
- package/dist/{chunk-C6QPK5GG.js → chunk-FZZ2QTJI.js} +2 -2
- package/dist/{chunk-D46YSIYX.js → chunk-G3Z3QEF5.js} +19 -11
- package/dist/{chunk-D46YSIYX.js.map → chunk-G3Z3QEF5.js.map} +1 -1
- package/dist/{chunk-3JXBXXM2.js → chunk-G4IAEX6D.js} +2 -2
- package/dist/{chunk-MSWG7JI6.js → chunk-G56P5RLD.js} +8 -2
- package/dist/chunk-G56P5RLD.js.map +1 -0
- package/dist/{chunk-AGZQD76C.js → chunk-GCGJW34D.js} +48 -2
- package/dist/chunk-GCGJW34D.js.map +1 -0
- package/dist/chunk-H2NCNXMS.js +159 -0
- package/dist/chunk-H2NCNXMS.js.map +1 -0
- package/dist/{chunk-XYIK4LF6.js → chunk-H3FZVNRN.js} +8 -2
- package/dist/chunk-H3FZVNRN.js.map +1 -0
- package/dist/{chunk-YU5KIWYQ.js → chunk-HC6EKOID.js} +94 -43
- package/dist/chunk-HC6EKOID.js.map +1 -0
- package/dist/{chunk-TK4UEOSK.js → chunk-HDDRVXX4.js} +8 -8
- package/dist/chunk-HDDRVXX4.js.map +1 -0
- package/dist/{chunk-LLQ2LLWF.js → chunk-HENLZHIT.js} +15 -5
- package/dist/chunk-HENLZHIT.js.map +1 -0
- package/dist/{chunk-N2D6GXBM.js → chunk-HINSGUA7.js} +28 -20
- package/dist/chunk-HINSGUA7.js.map +1 -0
- package/dist/{chunk-APO3DCMU.js → chunk-HLAVGJ62.js} +30 -8
- package/dist/chunk-HLAVGJ62.js.map +1 -0
- package/dist/{chunk-TPMQ3G6Z.js → chunk-HOJZMQ4J.js} +2 -2
- package/dist/chunk-HOJZMQ4J.js.map +1 -0
- package/dist/{chunk-LUDTDZLK.js → chunk-HPWVAEET.js} +33 -7
- package/dist/chunk-HPWVAEET.js.map +1 -0
- package/dist/{chunk-NZL6GGQE.js → chunk-HQ6NIBL6.js} +92 -30
- package/dist/chunk-HQ6NIBL6.js.map +1 -0
- package/dist/{chunk-UWVJF25J.js → chunk-HWVTS5NO.js} +20 -6
- package/dist/chunk-HWVTS5NO.js.map +1 -0
- package/dist/{chunk-2WWLHTZY.js → chunk-IC4GELZE.js} +2 -2
- package/dist/{chunk-QA2ZAPBU.js → chunk-IPLYGWQF.js} +28 -20
- package/dist/chunk-IPLYGWQF.js.map +1 -0
- package/dist/{chunk-A6KTB5R6.js → chunk-IQ3OI2RR.js} +3 -3
- package/dist/chunk-IQ3OI2RR.js.map +1 -0
- package/dist/{chunk-6LVVDPJ4.js → chunk-J64TK33U.js} +3 -4
- package/dist/chunk-J64TK33U.js.map +1 -0
- package/dist/{chunk-6FC5EGNV.js → chunk-JBPKEARU.js} +15 -5
- package/dist/{chunk-6FC5EGNV.js.map → chunk-JBPKEARU.js.map} +1 -1
- package/dist/{chunk-RHY3HH7P.js → chunk-JFEKNTX7.js} +125 -33
- package/dist/chunk-JFEKNTX7.js.map +1 -0
- package/dist/{chunk-TZOLIGIG.js → chunk-JJEJJ7RK.js} +4 -2
- package/dist/chunk-JJEJJ7RK.js.map +1 -0
- package/dist/{chunk-PCUKNJAZ.js → chunk-JKV57BTN.js} +2 -2
- package/dist/{chunk-EJI5XIBB.js → chunk-JLNBQWZ2.js} +55 -7
- package/dist/chunk-JLNBQWZ2.js.map +1 -0
- package/dist/{chunk-PIRJPV5T.js → chunk-JNANKJLN.js} +2 -2
- package/dist/chunk-JNANKJLN.js.map +1 -0
- package/dist/{chunk-XIG5PDM7.js → chunk-JUC24CTX.js} +8 -12
- package/dist/chunk-JUC24CTX.js.map +1 -0
- package/dist/{chunk-OIGNEXKZ.js → chunk-K5O2QY6T.js} +5 -1
- package/dist/{chunk-OIGNEXKZ.js.map → chunk-K5O2QY6T.js.map} +1 -1
- package/dist/{chunk-ZTFCYYEZ.js → chunk-KCYE2MZM.js} +3 -3
- package/dist/chunk-KCYE2MZM.js.map +1 -0
- package/dist/{chunk-JWPLJLDU.js → chunk-KD3QD3A5.js} +2 -2
- package/dist/{chunk-JWPLJLDU.js.map → chunk-KD3QD3A5.js.map} +1 -1
- package/dist/{chunk-YRMVARQP.js → chunk-KFY3SGN7.js} +49 -2
- package/dist/chunk-KFY3SGN7.js.map +1 -0
- package/dist/{chunk-CYFQJMUV.js → chunk-KIB7SDIJ.js} +15 -10
- package/dist/chunk-KIB7SDIJ.js.map +1 -0
- package/dist/{chunk-3KW65B36.js → chunk-KILOTVIF.js} +95 -48
- package/dist/chunk-KILOTVIF.js.map +1 -0
- package/dist/{chunk-MXFBBHJU.js → chunk-KJMYHC7K.js} +10 -5
- package/dist/chunk-KJMYHC7K.js.map +1 -0
- package/dist/{chunk-W3LR522O.js → chunk-KM2A35EO.js} +36 -34
- package/dist/chunk-KM2A35EO.js.map +1 -0
- package/dist/{chunk-575RMLWN.js → chunk-KXULCVOC.js} +30 -24
- package/dist/chunk-KXULCVOC.js.map +1 -0
- package/dist/{chunk-WELDCG6C.js → chunk-L227SKTB.js} +109 -36
- package/dist/chunk-L227SKTB.js.map +1 -0
- package/dist/{chunk-BVF3AGJP.js → chunk-LJBOVCQG.js} +26 -11
- package/dist/chunk-LJBOVCQG.js.map +1 -0
- package/dist/{chunk-2KI4QFHU.js → chunk-LMDRGRJ2.js} +2 -2
- package/dist/{chunk-MY6TPVXW.js → chunk-LMPHTYJC.js} +2 -2
- package/dist/{chunk-EHRTFRWW.js → chunk-LQHDIS7L.js} +10 -5
- package/dist/chunk-LQHDIS7L.js.map +1 -0
- package/dist/chunk-LUDUFZTV.js +170 -0
- package/dist/chunk-LUDUFZTV.js.map +1 -0
- package/dist/{chunk-5HRY2WRF.js → chunk-LZ3VEOU5.js} +2 -2
- package/dist/{chunk-Q7P4WJDP.js → chunk-M5T4Q2ZU.js} +1 -1
- package/dist/chunk-M5T4Q2ZU.js.map +1 -0
- package/dist/{chunk-ICRIXAP2.js → chunk-MC4FJXPA.js} +16 -6
- package/dist/chunk-MC4FJXPA.js.map +1 -0
- package/dist/{chunk-WPGJYVUH.js → chunk-MGVIEM2O.js} +23 -6
- package/dist/chunk-MGVIEM2O.js.map +1 -0
- package/dist/{chunk-NGAVDO7E.js → chunk-OADWQ5CR.js} +2 -2
- package/dist/{chunk-2NMMFZ5T.js → chunk-OD4FM2U7.js} +6 -3
- package/dist/chunk-OD4FM2U7.js.map +1 -0
- package/dist/{chunk-OZHRDTDX.js → chunk-OKTXM5H4.js} +11 -1
- package/dist/chunk-OKTXM5H4.js.map +1 -0
- package/dist/{chunk-RXDLTSWT.js → chunk-ONPLNAPX.js} +16 -7
- package/dist/chunk-ONPLNAPX.js.map +1 -0
- package/dist/{chunk-FJ43PRLT.js → chunk-ORFGK3XI.js} +20 -14
- package/dist/chunk-ORFGK3XI.js.map +1 -0
- package/dist/{chunk-DOM4GKSW.js → chunk-OZKVVUJB.js} +3 -3
- package/dist/{chunk-3TNBOMQT.js → chunk-PCI747N2.js} +13 -13
- package/dist/{chunk-3TNBOMQT.js.map → chunk-PCI747N2.js.map} +1 -1
- package/dist/{chunk-MT4HVDUZ.js → chunk-PM3QHTFT.js} +3 -3
- package/dist/{chunk-4DWOBS2A.js → chunk-PRQJ5ESM.js} +27 -2
- package/dist/{chunk-4DWOBS2A.js.map → chunk-PRQJ5ESM.js.map} +1 -1
- package/dist/chunk-PU44GBL4.js +52 -0
- package/dist/chunk-PU44GBL4.js.map +1 -0
- package/dist/{chunk-MJFNCJXV.js → chunk-Q4CAQGKQ.js} +47 -9
- package/dist/chunk-Q4CAQGKQ.js.map +1 -0
- package/dist/{chunk-U3WSW6PZ.js → chunk-QMYXNM4P.js} +90 -35
- package/dist/chunk-QMYXNM4P.js.map +1 -0
- package/dist/{chunk-XVVIG67A.js → chunk-QVJ4NWL2.js} +62 -18
- package/dist/chunk-QVJ4NWL2.js.map +1 -0
- package/dist/{chunk-NBNN5GOB.js → chunk-QY7YA7OL.js} +11 -2
- package/dist/chunk-QY7YA7OL.js.map +1 -0
- package/dist/{chunk-ZK7I7JYV.js → chunk-R3PS27B4.js} +7 -7
- package/dist/{chunk-2PRLKQAH.js → chunk-RLV3PQGH.js} +35 -19
- package/dist/chunk-RLV3PQGH.js.map +1 -0
- package/dist/{chunk-WW3QQF4H.js → chunk-ROZJACKP.js} +16 -1
- package/dist/chunk-ROZJACKP.js.map +1 -0
- package/dist/{chunk-7MNMYOFP.js → chunk-RSUYKGGZ.js} +3 -4
- package/dist/chunk-RSUYKGGZ.js.map +1 -0
- package/dist/{chunk-LT3NLYSI.js → chunk-RUZOJKNF.js} +10 -7
- package/dist/chunk-RUZOJKNF.js.map +1 -0
- package/dist/{chunk-326G7DJK.js → chunk-RW5DGAGO.js} +67 -13
- package/dist/chunk-RW5DGAGO.js.map +1 -0
- package/dist/{chunk-KOSORCJG.js → chunk-S53PKKWK.js} +63 -24
- package/dist/chunk-S53PKKWK.js.map +1 -0
- package/dist/{chunk-65PG43EQ.js → chunk-S7WU3Y3D.js} +21 -4
- package/dist/chunk-S7WU3Y3D.js.map +1 -0
- package/dist/{chunk-SKE7JYKA.js → chunk-SFXKHM7P.js} +2 -2
- package/dist/{chunk-HMDCOMYU.js → chunk-SKGV326D.js} +3 -3
- package/dist/{chunk-I5GLV3VE.js → chunk-SML26KED.js} +33 -26
- package/dist/{chunk-I5GLV3VE.js.map → chunk-SML26KED.js.map} +1 -1
- package/dist/chunk-T2PO5MUF.js +62 -0
- package/dist/chunk-T2PO5MUF.js.map +1 -0
- package/dist/{chunk-C7VW7C3F.js → chunk-TDKQGLJW.js} +3 -3
- package/dist/chunk-TDKQGLJW.js.map +1 -0
- package/dist/{chunk-3QKK7QOS.js → chunk-TERNBNJB.js} +3 -3
- package/dist/chunk-TERNBNJB.js.map +1 -0
- package/dist/{chunk-MXC3AP5I.js → chunk-TGQ2NTWH.js} +12 -7
- package/dist/chunk-TGQ2NTWH.js.map +1 -0
- package/dist/{chunk-3Y4P7RXM.js → chunk-TMSXWOBZ.js} +3 -4
- package/dist/chunk-TMSXWOBZ.js.map +1 -0
- package/dist/{chunk-3ZLVGM76.js → chunk-TTGZV5R3.js} +106 -44
- package/dist/chunk-TTGZV5R3.js.map +1 -0
- package/dist/{chunk-5UM2VJ6D.js → chunk-UEY3VB6W.js} +2 -2
- package/dist/{chunk-I6K5FBRQ.js → chunk-UI3NYK34.js} +4 -1
- package/dist/{chunk-I6K5FBRQ.js.map → chunk-UI3NYK34.js.map} +1 -1
- package/dist/{chunk-VBJ7V5SK.js → chunk-UIPDNLXA.js} +21 -8
- package/dist/chunk-UIPDNLXA.js.map +1 -0
- package/dist/{chunk-GIF42EW3.js → chunk-UP6MOYCB.js} +3 -3
- package/dist/{chunk-K4FLSOR5.js → chunk-USYGGIJZ.js} +44 -15
- package/dist/chunk-USYGGIJZ.js.map +1 -0
- package/dist/{chunk-FIT6DMX6.js → chunk-UWY7GIVS.js} +152 -54
- package/dist/chunk-UWY7GIVS.js.map +1 -0
- package/dist/{chunk-MRILGULB.js → chunk-V2RCP53Q.js} +2 -2
- package/dist/{chunk-XKECPATV.js → chunk-VFUEZZBS.js} +113 -4
- package/dist/chunk-VFUEZZBS.js.map +1 -0
- package/dist/{chunk-FSFEQI74.js → chunk-W7L6HXUC.js} +2 -2
- package/dist/{chunk-3IQ2TR4N.js → chunk-WLEB7WCG.js} +2 -2
- package/dist/{chunk-GL6I6MEQ.js → chunk-WSGF57U2.js} +3 -3
- package/dist/{chunk-KNKUID7G.js → chunk-X7Y7WX73.js} +72 -6
- package/dist/chunk-X7Y7WX73.js.map +1 -0
- package/dist/{chunk-5NPGSAVB.js → chunk-XEKAG3FM.js} +23 -5
- package/dist/chunk-XEKAG3FM.js.map +1 -0
- package/dist/{chunk-3APJ5EVB.js → chunk-XKIQZXUB.js} +41 -26
- package/dist/chunk-XKIQZXUB.js.map +1 -0
- package/dist/chunk-XKXKSQU7.js +92 -0
- package/dist/chunk-XKXKSQU7.js.map +1 -0
- package/dist/{chunk-JA3AK3PT.js → chunk-XNLXAWHX.js} +4 -4
- package/dist/{chunk-CULXMQJH.js → chunk-XPXEJRUB.js} +3 -3
- package/dist/chunk-XPXEJRUB.js.map +1 -0
- package/dist/{chunk-PZIAX57I.js → chunk-XR6DNK4U.js} +7 -4
- package/dist/chunk-XR6DNK4U.js.map +1 -0
- package/dist/{chunk-47VWKCAF.js → chunk-XSQ4SGM5.js} +33 -4
- package/dist/chunk-XSQ4SGM5.js.map +1 -0
- package/dist/{chunk-66DHUKLO.js → chunk-XSWKORGM.js} +16 -14
- package/dist/chunk-XSWKORGM.js.map +1 -0
- package/dist/{chunk-QR3C7BKQ.js → chunk-XZ4WBBB5.js} +7 -8
- package/dist/chunk-XZ4WBBB5.js.map +1 -0
- package/dist/{chunk-WNARATI3.js → chunk-Y2SXZ5KZ.js} +59 -11
- package/dist/chunk-Y2SXZ5KZ.js.map +1 -0
- package/dist/{chunk-QLLBRHAT.js → chunk-YDMVYYD2.js} +229 -264
- package/dist/chunk-YDMVYYD2.js.map +1 -0
- package/dist/{chunk-SIC6U3GZ.js → chunk-YHV3KRKS.js} +3 -3
- package/dist/{chunk-ZPKBYX2F.js → chunk-YNDLCWXS.js} +85 -9
- package/dist/chunk-YNDLCWXS.js.map +1 -0
- package/dist/{chunk-W6AQJ2PY.js → chunk-YNXOKMJP.js} +35 -16
- package/dist/chunk-YNXOKMJP.js.map +1 -0
- package/dist/{chunk-VLXA6PI2.js → chunk-YQMZ7IH2.js} +4 -4
- package/dist/{chunk-TMM4S4IJ.js → chunk-YR6GIWWY.js} +58 -8
- package/dist/chunk-YR6GIWWY.js.map +1 -0
- package/dist/{chunk-DK5LDEQM.js → chunk-YR7XMOWK.js} +39 -23
- package/dist/chunk-YR7XMOWK.js.map +1 -0
- package/dist/{chunk-U7EJOMFC.js → chunk-ZEY4KYRQ.js} +41 -14
- package/dist/chunk-ZEY4KYRQ.js.map +1 -0
- package/dist/chunk-ZFXCQPNO.js +27 -0
- package/dist/chunk-ZFXCQPNO.js.map +1 -0
- package/dist/citations.js +1 -1
- package/dist/{cli-kuh9PwZ5.d.ts → cli-CPe_2KB1.d.ts} +8 -31
- package/dist/cli.d.ts +10 -6
- package/dist/cli.js +124 -119
- package/dist/commitment-ledger.js +2 -2
- package/dist/compat/checks.js +1 -2
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +11 -11
- package/dist/compounding/preference-consolidator.d.ts +1 -0
- package/dist/compounding/preference-consolidator.js +8 -8
- package/dist/compounding/preference-consolidator.js.map +1 -1
- package/dist/compression-optimizer.d.ts +1 -0
- package/dist/compression-optimizer.js +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.js +3 -2
- package/dist/connectors/codex-materialize-runner.d.ts +1 -0
- package/dist/connectors/codex-materialize-runner.js +12 -11
- package/dist/connectors/codex-materialize.d.ts +1 -0
- package/dist/connectors/codex-materialize.js +3 -2
- package/dist/connectors/index.d.ts +1 -0
- package/dist/connectors/index.js +14 -14
- package/dist/{connectors-cli-CwbyjGR7.d.ts → connectors-cli-DbTPNj2H.d.ts} +7 -1
- package/dist/connectors-cli.d.ts +1 -1
- package/dist/connectors-cli.js +3 -1
- package/dist/consolidation-provenance-check.d.ts +1 -0
- package/dist/consolidation-provenance-check.js +2 -2
- package/dist/consolidation-undo.d.ts +1 -0
- package/dist/consolidation-undo.js +1 -1
- package/dist/contradiction/index.d.ts +3 -1
- package/dist/contradiction/index.js +3 -3
- package/dist/{contradiction-review-ATP4S6IC.js → contradiction-review-6V2LXXK6.js} +2 -2
- package/dist/{contradiction-scan-5A4IDZV5.js → contradiction-scan-GIRVC4C7.js} +3 -3
- package/dist/conversation-index/backend.d.ts +3 -1
- package/dist/conversation-index/backend.js +3 -3
- package/dist/conversation-index/chunker.d.ts +1 -0
- package/dist/conversation-index/cleanup.js +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.js +1 -1
- package/dist/conversation-index/indexer.d.ts +5 -2
- package/dist/conversation-index/indexer.js +1 -1
- package/dist/conversation-index/search.d.ts +2 -1
- package/dist/cross-namespace-budget.js +1 -1
- package/dist/cue-anchors.js +2 -2
- package/dist/dashboard-runtime.d.ts +6 -0
- package/dist/dashboard-runtime.js +3 -3
- package/dist/day-summary.d.ts +1 -0
- package/dist/day-summary.js +2 -2
- package/dist/delinearize.d.ts +1 -0
- package/dist/direct-answer-wiring.d.ts +1 -0
- package/dist/direct-answer.d.ts +1 -0
- package/dist/{dreams-ledger-LR2NBAZE.js → dreams-ledger-3WSCI5V4.js} +5 -4
- package/dist/{dreams-ledger-LR2NBAZE.js.map → dreams-ledger-3WSCI5V4.js.map} +1 -1
- package/dist/embedding-fallback.d.ts +3 -0
- package/dist/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +1 -0
- package/dist/enrichment/index.js +1 -1
- package/dist/entity-retrieval.d.ts +2 -0
- package/dist/entity-retrieval.js +9 -9
- package/dist/entity-schema.d.ts +1 -0
- package/dist/evals.js +1 -1
- package/dist/explicit-capture.d.ts +5 -3
- package/dist/explicit-capture.js +2 -2
- package/dist/extraction-judge-telemetry.d.ts +2 -0
- package/dist/extraction-judge-training.d.ts +2 -0
- package/dist/extraction-judge.d.ts +2 -0
- package/dist/extraction.d.ts +2 -0
- package/dist/extraction.js +12 -12
- package/dist/{faiss-adapter-CzPghc4C.d.ts → faiss-adapter-BHecI1fF.d.ts} +4 -1
- package/dist/fallback-llm.d.ts +11 -1
- package/dist/fallback-llm.js +8 -6
- package/dist/{first-start-migration-4MHQEOSD.js → first-start-migration-CKTCTCQI.js} +5 -5
- package/dist/graph-dashboard-diff.d.ts +4 -0
- package/dist/graph-dashboard-diff.js +1 -1
- package/dist/graph-dashboard-parser.js +1 -1
- package/dist/{graph-edge-decay-5DI5GUNL.js → graph-edge-decay-MUP5J7CC.js} +6 -6
- package/dist/graph-events.js +1 -1
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.js +2 -2
- package/dist/harmonic-retrieval.js +4 -4
- package/dist/identity-continuity.d.ts +1 -0
- package/dist/importance.d.ts +1 -0
- package/dist/importers/index.d.ts +244 -0
- package/dist/importers/index.js +20 -0
- package/dist/index.d.ts +20 -350
- package/dist/index.js +885 -562
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +1 -0
- package/dist/lcm/archive.d.ts +2 -2
- package/dist/lcm/archive.js +2 -2
- package/dist/lcm/engine.d.ts +3 -2
- package/dist/lcm/engine.js +6 -6
- package/dist/lcm/index.d.ts +1 -0
- package/dist/lcm/index.js +8 -8
- package/dist/lcm/recall.js +1 -1
- package/dist/lcm/summarizer.js +3 -3
- package/dist/lcm/tools.d.ts +1 -0
- package/dist/lifecycle.d.ts +1 -0
- package/dist/live-connectors-runner.d.ts +1 -0
- package/dist/live-connectors-runner.js +6 -6
- package/dist/local-llm.d.ts +1 -0
- package/dist/local-llm.js +2 -2
- package/dist/maintenance/archive-observations.js +1 -1
- package/dist/maintenance/memory-governance.d.ts +3 -1
- package/dist/maintenance/memory-governance.js +10 -8
- package/dist/maintenance/migrate-observations.js +3 -2
- package/dist/maintenance/observation-ledger-utils.d.ts +3 -0
- package/dist/maintenance/observation-ledger-utils.js +2 -1
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -1
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -8
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -1
- package/dist/maintenance/rebuild-memory-projection.js +13 -10
- package/dist/maintenance/rebuild-observations.d.ts +1 -0
- package/dist/maintenance/rebuild-observations.js +3 -2
- package/dist/mcp-memory-inspector-app.d.ts +7 -4
- package/dist/mcp-memory-inspector-app.js +1 -1
- package/dist/memory-action-policy.d.ts +1 -0
- package/dist/memory-cache.d.ts +1 -0
- package/dist/memory-cache.js +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -0
- package/dist/memory-projection-store.d.ts +1 -0
- package/dist/memory-projection-store.js +1 -1
- package/dist/memory-provenance.d.ts +1 -0
- package/dist/memory-worth-outcomes.d.ts +1 -0
- package/dist/migrate/from-engram.js +2 -2
- package/dist/{migrate-from-identity-anchor-G27MCD6A.js → migrate-from-identity-anchor-EB4XI4Q2.js} +2 -2
- package/dist/model-registry.js +1 -1
- package/dist/models-json.d.ts +1 -0
- package/dist/namespaces/migrate.d.ts +3 -0
- package/dist/namespaces/migrate.js +26 -24
- package/dist/namespaces/principal.d.ts +1 -0
- package/dist/namespaces/principal.js +2 -1
- package/dist/namespaces/search.d.ts +2 -1
- package/dist/namespaces/search.js +17 -15
- package/dist/namespaces/storage.d.ts +4 -2
- package/dist/namespaces/storage.js +10 -9
- package/dist/native-knowledge.d.ts +1 -0
- package/dist/native-knowledge.js +1 -1
- package/dist/negative.js +1 -1
- package/dist/network/webdav.d.ts +16 -1
- package/dist/network/webdav.js +5 -3
- package/dist/objective-state-writers.js +4 -4
- package/dist/objective-state.js +2 -2
- package/dist/offline-sync.d.ts +4 -0
- package/dist/offline-sync.js +4 -4
- package/dist/operator-toolkit.d.ts +4 -1
- package/dist/operator-toolkit.js +37 -34
- package/dist/opik-exporter.js +1 -1
- package/dist/{orchestrator-DuWl9Hwx.d.ts → orchestrator-Co9nxRLF.d.ts} +4 -74
- package/dist/orchestrator.d.ts +5 -3
- package/dist/orchestrator.js +101 -98
- package/dist/page-versioning.js +1 -1
- package/dist/path-X2K5XCHL.js +9 -0
- package/dist/patterns-cli.d.ts +1 -0
- package/dist/peers/index.d.ts +328 -0
- package/dist/{peers-HCVGHMAE.js → peers/index.js} +4 -4
- package/dist/pipeline-D18UAKlN.d.ts +32 -0
- package/dist/plugin-entry-resolver.d.ts +9 -0
- package/dist/plugin-entry-resolver.js +8 -0
- package/dist/plugin-entry-resolver.js.map +1 -0
- package/dist/plugin-id.d.ts +2 -21
- package/dist/plugin-id.js +33 -4
- package/dist/plugin-id.js.map +1 -1
- package/dist/policy-runtime.d.ts +4 -0
- package/dist/policy-runtime.js +1 -1
- package/dist/profiling.js +1 -1
- package/dist/qmd-recall-cache.d.ts +1 -0
- package/dist/qmd.d.ts +2 -1
- package/dist/qmd.js +3 -3
- package/dist/recall-disclosure-escalation.d.ts +1 -0
- package/dist/recall-explain-renderer.d.ts +1 -0
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-state.d.ts +8 -1
- package/dist/recall-state.js +2 -1
- package/dist/recall-tag-filter.d.ts +1 -0
- package/dist/recall-xray-cli.d.ts +1 -0
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -0
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -0
- package/dist/recall-xray.js +2 -2
- package/dist/relevance.d.ts +7 -1
- package/dist/relevance.js +2 -1
- package/dist/replay/normalizers/chatgpt.js +2 -2
- package/dist/replay/normalizers/claude.js +2 -2
- package/dist/replay/normalizers/openclaw.js +2 -2
- package/dist/replay/normalizers/shared.js +1 -1
- package/dist/replay/runner.js +1 -1
- package/dist/rerank.js +1 -1
- package/dist/{resolution-B7FNQSSP.js → resolution-ZY7VM6WS.js} +3 -3
- package/dist/resolution-ZY7VM6WS.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +1 -0
- package/dist/resolve-auth-token.js +1 -1
- package/dist/resolve-provider-secret.d.ts +19 -29
- package/dist/resolve-provider-secret.js +2 -6
- package/dist/resume-bundles.js +10 -9
- package/dist/retrieval-agents.d.ts +2 -1
- package/dist/retrieval-agents.js +2 -1
- package/dist/retrieval-tiers.d.ts +1 -0
- package/dist/routing/engine.d.ts +1 -0
- package/dist/routing/store.d.ts +3 -0
- package/dist/routing/store.js +1 -1
- package/dist/runtime/env.js +1 -1
- package/dist/schemas.d.ts +191 -17
- package/dist/schemas.js +1 -1
- package/dist/sdk-compat.js +1 -1
- package/dist/search/document-scanner.js +1 -1
- package/dist/search/embed-helper.d.ts +7 -2
- package/dist/search/embed-helper.js +3 -1
- package/dist/search/factory.d.ts +2 -1
- package/dist/search/factory.js +15 -14
- package/dist/search/index.d.ts +2 -1
- package/dist/search/index.js +21 -20
- package/dist/search/lancedb-backend.d.ts +8 -7
- package/dist/search/lancedb-backend.js +4 -2
- package/dist/search/meilisearch-backend.d.ts +8 -7
- package/dist/search/meilisearch-backend.js +4 -2
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/noop-backend.js +1 -1
- package/dist/search/orama-backend.d.ts +10 -8
- package/dist/search/orama-backend.js +8 -4
- package/dist/search/port.d.ts +2 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/search/remote-backend.js +1 -1
- package/dist/secure-store/index.d.ts +16 -3
- package/dist/secure-store/index.js +2 -2
- package/dist/{semantic-VwGI14Ok.d.ts → semantic-SLAa_prH.d.ts} +5 -3
- package/dist/semantic-consolidation.d.ts +1 -0
- package/dist/semantic-consolidation.js +14 -13
- package/dist/semantic-rule-promotion.js +8 -8
- package/dist/semantic-rule-verifier.d.ts +1 -0
- package/dist/semantic-rule-verifier.js +8 -8
- package/dist/session-integrity.d.ts +1 -0
- package/dist/session-integrity.js +1 -1
- package/dist/session-observer-bands.d.ts +1 -0
- package/dist/session-observer-state.d.ts +6 -1
- package/dist/session-observer-state.js +1 -1
- package/dist/shared-context/manager.d.ts +5 -0
- package/dist/shared-context/manager.js +3 -3
- package/dist/signal.d.ts +1 -0
- package/dist/signal.js +1 -1
- package/dist/source-attribution.js +1 -1
- package/dist/state-store-4QZISH3J.js +30 -0
- package/dist/state-store-4QZISH3J.js.map +1 -0
- package/dist/storage-C4DX8CuG.d.ts +157 -0
- package/dist/storage.d.ts +2 -0
- package/dist/storage.js +7 -7
- package/dist/store-contract.js +1 -1
- package/dist/summarizer.d.ts +1 -0
- package/dist/summarizer.js +7 -7
- package/dist/summary-snapshot.d.ts +1 -0
- package/dist/surfaces/dreams.js +48 -17
- package/dist/surfaces/dreams.js.map +1 -1
- package/dist/temporal-supersession.d.ts +1 -0
- package/dist/temporal-supersession.js +1 -1
- package/dist/temporal-validity.d.ts +1 -0
- package/dist/threading.d.ts +1 -0
- package/dist/tier-migration.d.ts +1 -0
- package/dist/tier-routing.d.ts +1 -0
- package/dist/{tier-stats-62ZVDFKS.js → tier-stats-SKML2OSF.js} +5 -5
- package/dist/tmt.js +1 -1
- package/dist/tokens.js +2 -2
- package/dist/topics.d.ts +1 -0
- package/dist/{trace-C5ETWBEF.js → trace-WM7V4CKI.js} +31 -1
- package/dist/trace-WM7V4CKI.js.map +1 -0
- package/dist/transcript.d.ts +1 -0
- package/dist/transcript.js +2 -2
- package/dist/transfer/autodetect.js +7 -7
- package/dist/transfer/backup.js +5 -5
- package/dist/transfer/capsule-export.js +5 -5
- package/dist/transfer/capsule-import.d.ts +6 -0
- package/dist/transfer/capsule-import.js +4 -4
- package/dist/transfer/export-json.js +3 -3
- package/dist/transfer/export-md.js +3 -3
- package/dist/transfer/export-sqlite.js +3 -3
- package/dist/transfer/fs-utils.d.ts +2 -1
- package/dist/transfer/fs-utils.js +5 -3
- package/dist/transfer/import-json.js +3 -3
- package/dist/transfer/import-md.js +3 -3
- package/dist/transfer/import-sqlite.js +3 -3
- package/dist/trust-zones.js +2 -2
- package/dist/types-B1VHaf2w.d.ts +126 -0
- package/dist/types-BliCnURB.d.ts +83 -0
- package/dist/types.d.ts +35 -0
- package/dist/types.js +1 -1
- package/dist/utility-learner.js +3 -3
- package/dist/utility-runtime.d.ts +1 -0
- package/dist/utility-runtime.js +4 -4
- package/dist/utility-telemetry.js +2 -2
- package/dist/verified-recall.js +9 -9
- package/dist/work/board.js +2 -2
- package/dist/work/boundary.js +1 -1
- package/dist/work/storage.d.ts +5 -0
- package/dist/work/storage.js +1 -1
- package/dist/work-product-ledger.js +2 -2
- package/package.json +74 -3
- package/scripts/ensure-better-sqlite3.mjs +8 -7
- package/scripts/faiss_index.py +141 -29
- package/src/access-cli.test.ts +87 -2
- package/src/access-cli.ts +59 -5
- package/src/access-http.test.ts +150 -0
- package/src/access-http.ts +103 -34
- package/src/access-idempotency.ts +136 -3
- package/src/access-mcp.test.ts +155 -0
- package/src/access-mcp.ts +116 -30
- package/src/access-schema.ts +22 -4
- package/src/access-service-namespace.test.ts +9 -9
- package/src/access-service-project-tag.test.ts +37 -0
- package/src/access-service.ts +15 -14
- package/src/active-recall.test.ts +29 -1
- package/src/active-recall.ts +11 -7
- package/src/adapters/claude-code.ts +7 -8
- package/src/adapters/codex.ts +6 -7
- package/src/adapters/hermes.ts +1 -5
- package/src/adapters/registry.test.ts +63 -0
- package/src/adapters/registry.ts +10 -0
- package/src/adapters/replit.ts +5 -7
- package/src/adapters/types.ts +24 -1
- package/src/behavior-signals.ts +1 -1
- package/src/binary-lifecycle/backend.ts +16 -4
- package/src/binary-lifecycle/pipeline.test.ts +149 -0
- package/src/binary-lifecycle/pipeline.ts +49 -7
- package/src/binary-lifecycle/scanner.ts +19 -4
- package/src/boxes.ts +119 -32
- package/src/buffer-session.test.ts +28 -0
- package/src/buffer.ts +10 -14
- package/src/bulk-import/types.ts +10 -0
- package/src/calibration.test.ts +99 -0
- package/src/calibration.ts +57 -13
- package/src/causal-consolidation.test.ts +214 -0
- package/src/causal-consolidation.ts +131 -14
- package/src/causal-retrieval.ts +16 -3
- package/src/citations.test.ts +75 -0
- package/src/citations.ts +19 -6
- package/src/cli.ts +134 -109
- package/src/coding/coding-namespace.test.ts +7 -0
- package/src/coding/coding-namespace.ts +8 -0
- package/src/coding/review-context.test.ts +30 -0
- package/src/coding/review-context.ts +79 -9
- package/src/coding/wire-coding-context.test.ts +16 -0
- package/src/compat/checks.test.ts +33 -0
- package/src/compat/checks.ts +64 -4
- package/src/compounding/engine.ts +2 -2
- package/src/compounding/preference-consolidator.test.ts +47 -0
- package/src/compounding/preference-consolidator.ts +8 -8
- package/src/compression-optimizer.ts +5 -2
- package/src/config.test.ts +34 -2
- package/src/config.ts +62 -18
- package/src/connectors/codex-materialize-runner.ts +4 -3
- package/src/connectors/codex-materialize.ts +149 -34
- package/src/connectors/index.test.ts +144 -7
- package/src/connectors/index.ts +86 -15
- package/src/connectors/live/github.test.ts +47 -0
- package/src/connectors/live/github.ts +29 -1
- package/src/connectors/live/index.ts +2 -0
- package/src/connectors/live/live-connectors.test.ts +359 -73
- package/src/connectors/live/notion.test.ts +84 -0
- package/src/connectors/live/notion.ts +18 -1
- package/src/connectors/live/state-store.ts +419 -38
- package/src/connectors/weclone-installer.test.ts +16 -18
- package/src/connectors-cli.ts +19 -0
- package/src/console/trace.test.ts +28 -0
- package/src/console/trace.ts +42 -5
- package/src/contradiction/contradiction-judge.test.ts +49 -0
- package/src/contradiction/contradiction-judge.ts +15 -5
- package/src/contradiction/contradiction-review.ts +31 -7
- package/src/contradiction/contradiction-scan.ts +28 -18
- package/src/contradiction/contradiction.test.ts +237 -1
- package/src/contradiction/resolution.ts +43 -4
- package/src/conversation-index/backend.ts +13 -5
- package/src/conversation-index/cleanup.ts +25 -4
- package/src/conversation-index/faiss-adapter.ts +24 -15
- package/src/conversation-index/indexer.test.ts +71 -10
- package/src/conversation-index/indexer.ts +22 -3
- package/src/cross-namespace-budget.test.ts +59 -0
- package/src/cross-namespace-budget.ts +15 -7
- package/src/curation/index.ts +18 -17
- package/src/dashboard-runtime.test.ts +98 -0
- package/src/dashboard-runtime.ts +96 -6
- package/src/dedup/index.test.ts +133 -0
- package/src/dedup/index.ts +73 -10
- package/src/dedup/semantic.test.ts +77 -2
- package/src/dedup/semantic.ts +26 -6
- package/src/embedding-fallback.ts +47 -15
- package/src/enrichment/audit.ts +8 -1
- package/src/enrichment/pipeline.ts +21 -13
- package/src/enrichment/web-search-provider.ts +1 -6
- package/src/entity-retrieval.ts +57 -6
- package/src/evals.ts +22 -13
- package/src/explicit-capture.test.ts +40 -0
- package/src/explicit-capture.ts +14 -2
- package/src/extraction.ts +42 -30
- package/src/fallback-llm.ts +35 -2
- package/src/graph-dashboard-diff.test.ts +57 -0
- package/src/graph-dashboard-diff.ts +24 -2
- package/src/graph-dashboard-parser.test.ts +31 -0
- package/src/graph-dashboard-parser.ts +4 -1
- package/src/graph-events.ts +6 -4
- package/src/graph.test.ts +69 -0
- package/src/graph.ts +7 -4
- package/src/importers/base.test.ts +70 -0
- package/src/importers/base.ts +56 -7
- package/src/index.ts +5 -2
- package/src/lcm/archive.ts +65 -16
- package/src/lcm/engine.ts +27 -8
- package/src/lcm/recall.ts +5 -5
- package/src/lcm-engine.test.ts +87 -1
- package/src/lcm-recall.test.ts +71 -0
- package/src/live-connectors-runner.ts +100 -36
- package/src/maintenance/archive-observations.ts +24 -3
- package/src/maintenance/atomic-file.ts +85 -0
- package/src/maintenance/dreams-ledger.ts +15 -8
- package/src/maintenance/memory-governance.test.ts +53 -0
- package/src/maintenance/memory-governance.ts +15 -5
- package/src/maintenance/observation-ledger-utils.ts +6 -5
- package/src/maintenance/purge.test.ts +64 -0
- package/src/maintenance/rebuild-memory-lifecycle-ledger.ts +22 -9
- package/src/maintenance/rebuild-memory-projection.ts +22 -9
- package/src/maintenance/rebuild-observations.ts +7 -3
- package/src/mcp-memory-inspector-app.ts +26 -3
- package/src/memory-cache.test.ts +19 -0
- package/src/memory-cache.ts +1 -0
- package/src/memory-extension/codex-publisher.ts +25 -4
- package/src/memory-extension-host/host-discovery.test.ts +69 -0
- package/src/memory-extension-host/host-discovery.ts +63 -6
- package/src/memory-projection-store.ts +114 -62
- package/src/message-parts/index.ts +46 -31
- package/src/message-parts/message-parts.test.ts +77 -0
- package/src/migrate/from-engram.ts +68 -14
- package/src/model-registry.test.ts +38 -0
- package/src/model-registry.ts +12 -7
- package/src/namespaces/identity.test.ts +66 -0
- package/src/namespaces/identity.ts +23 -0
- package/src/namespaces/migrate.test.ts +62 -0
- package/src/namespaces/migrate.ts +82 -14
- package/src/namespaces/principal.test.ts +37 -1
- package/src/namespaces/principal.ts +18 -7
- package/src/namespaces/search.test.ts +96 -7
- package/src/namespaces/search.ts +32 -25
- package/src/namespaces/storage.ts +93 -11
- package/src/native-knowledge.ts +23 -3
- package/src/negative.ts +50 -5
- package/src/network/webdav.ts +177 -58
- package/src/offline-sync.test.ts +128 -18
- package/src/offline-sync.ts +41 -7
- package/src/onboarding/index.test.ts +105 -0
- package/src/onboarding/index.ts +17 -5
- package/src/operator-toolkit.ts +43 -5
- package/src/orchestrator.ts +120 -27
- package/src/page-versioning.ts +31 -5
- package/src/peers/peers.test.ts +70 -0
- package/src/peers/storage.ts +32 -3
- package/src/plugin-entry-resolver.test.ts +60 -0
- package/src/plugin-entry-resolver.ts +48 -0
- package/src/plugin-id.test.ts +38 -0
- package/src/plugin-id.ts +31 -64
- package/src/policy-runtime.test.ts +75 -0
- package/src/policy-runtime.ts +32 -3
- package/src/procedural/procedure-miner.test.ts +152 -0
- package/src/procedural/procedure-miner.ts +124 -19
- package/src/profiling.test.ts +23 -0
- package/src/profiling.ts +10 -1
- package/src/projection/index.test.ts +253 -0
- package/src/projection/index.ts +159 -18
- package/src/qmd-client.test.ts +45 -0
- package/src/qmd.ts +13 -10
- package/src/recall-disclosure.test.ts +15 -1
- package/src/recall-state.ts +24 -5
- package/src/relevance.ts +24 -5
- package/src/replay/normalizers/chatgpt.ts +14 -4
- package/src/replay/normalizers/claude.ts +8 -3
- package/src/replay/normalizers/openclaw.ts +35 -12
- package/src/replay/normalizers/replay-normalizers.test.ts +65 -0
- package/src/replay/normalizers/shared.ts +4 -1
- package/src/replay/runner.ts +1 -1
- package/src/rerank.test.ts +41 -1
- package/src/rerank.ts +2 -2
- package/src/resolve-auth-token.test.ts +29 -0
- package/src/resolve-auth-token.ts +12 -7
- package/src/resolve-provider-secret.test.ts +78 -22
- package/src/resolve-provider-secret.ts +55 -223
- package/src/retrieval-agents.ts +51 -14
- package/src/review/index.test.ts +75 -1
- package/src/review/index.ts +88 -30
- package/src/routing/store.ts +36 -6
- package/src/runtime/env.test.ts +73 -0
- package/src/runtime/env.ts +7 -11
- package/src/schemas.ts +16 -1
- package/src/search/abort.ts +18 -0
- package/src/search/document-scanner.test.ts +80 -0
- package/src/search/document-scanner.ts +51 -9
- package/src/search/embed-helper.ts +19 -6
- package/src/search/factory.ts +9 -5
- package/src/search/lancedb-backend.ts +66 -23
- package/src/search/meilisearch-backend.ts +39 -13
- package/src/search/noop-backend.ts +1 -1
- package/src/search/orama-backend.test.ts +27 -0
- package/src/search/orama-backend.ts +69 -16
- package/src/search/port.ts +4 -1
- package/src/search/remote-backend.ts +1 -1
- package/src/secure-store/cli-handlers.ts +70 -6
- package/src/secure-store/cli-renderer.ts +13 -7
- package/src/secure-store/secure-fs.ts +11 -5
- package/src/secure-store/secure-store.test.ts +70 -0
- package/src/semantic-consolidation.test.ts +45 -0
- package/src/semantic-consolidation.ts +3 -3
- package/src/session-integrity.test.ts +98 -0
- package/src/session-integrity.ts +51 -1
- package/src/session-observer-state.ts +108 -41
- package/src/shared-context/manager.ts +93 -15
- package/src/signal.test.ts +14 -0
- package/src/signal.ts +8 -1
- package/src/source-attribution.test.ts +8 -0
- package/src/source-attribution.ts +24 -2
- package/src/spaces/index.test.ts +93 -0
- package/src/spaces/index.ts +75 -9
- package/src/storage.ts +14 -1
- package/src/store-contract.test.ts +35 -0
- package/src/store-contract.ts +39 -5
- package/src/summarizer.ts +24 -18
- package/src/summary-snapshot.test.ts +77 -0
- package/src/surfaces/dreams.test.ts +73 -0
- package/src/surfaces/dreams.ts +53 -19
- package/src/sync/index.ts +42 -17
- package/src/taxonomy/taxonomy-loader.ts +43 -4
- package/src/temporal-supersession.test.ts +67 -0
- package/src/temporal-supersession.ts +8 -0
- package/src/tmt.test.ts +50 -0
- package/src/tmt.ts +35 -11
- package/src/tokens.test.ts +18 -0
- package/src/tokens.ts +7 -0
- package/src/training-export/converter.test.ts +55 -2
- package/src/training-export/converter.ts +36 -10
- package/src/training-export/registry.test.ts +17 -0
- package/src/training-export/registry.ts +19 -1
- package/src/transcript.ts +2 -2
- package/src/transfer/backup.ts +18 -7
- package/src/transfer/capsule-crypto.ts +105 -21
- package/src/transfer/capsule-encrypt.test.ts +106 -7
- package/src/transfer/capsule-export.ts +23 -14
- package/src/transfer/capsule-import.ts +11 -2
- package/src/transfer/exclusions.ts +7 -0
- package/src/transfer/export-sqlite.ts +14 -13
- package/src/transfer/fs-utils.ts +52 -1
- package/src/transfer/import-json.ts +12 -7
- package/src/transfer/import-md.ts +5 -5
- package/src/transfer/import-sqlite.ts +4 -5
- package/src/trust-zones.ts +1 -1
- package/src/types.ts +25 -0
- package/src/utility-telemetry.ts +1 -1
- package/src/utils/category-dir.test.ts +15 -0
- package/src/utils/category-dir.ts +3 -1
- package/src/work/boundary.ts +30 -18
- package/src/work/storage.ts +116 -38
- package/src/work-product-ledger.ts +1 -1
- package/dist/chunk-25MQ7IHJ.js.map +0 -1
- package/dist/chunk-2IWUMAES.js.map +0 -1
- package/dist/chunk-2NMMFZ5T.js.map +0 -1
- package/dist/chunk-2PRLKQAH.js.map +0 -1
- package/dist/chunk-326G7DJK.js.map +0 -1
- package/dist/chunk-3APJ5EVB.js.map +0 -1
- package/dist/chunk-3KW65B36.js.map +0 -1
- package/dist/chunk-3QKK7QOS.js.map +0 -1
- package/dist/chunk-3SLRNYNG.js.map +0 -1
- package/dist/chunk-3VAL7ZL2.js.map +0 -1
- package/dist/chunk-3Y4P7RXM.js.map +0 -1
- package/dist/chunk-3ZLVGM76.js.map +0 -1
- package/dist/chunk-43PJZYGL.js.map +0 -1
- package/dist/chunk-47VWKCAF.js.map +0 -1
- package/dist/chunk-4KGVTPGD.js.map +0 -1
- package/dist/chunk-5375UYTQ.js.map +0 -1
- package/dist/chunk-56K5QLHX.js.map +0 -1
- package/dist/chunk-575RMLWN.js.map +0 -1
- package/dist/chunk-5NPGSAVB.js.map +0 -1
- package/dist/chunk-5RGLBDQF.js.map +0 -1
- package/dist/chunk-65PG43EQ.js.map +0 -1
- package/dist/chunk-66DHUKLO.js.map +0 -1
- package/dist/chunk-6LVVDPJ4.js.map +0 -1
- package/dist/chunk-76FLAAUC.js.map +0 -1
- package/dist/chunk-77H5NU3M.js.map +0 -1
- package/dist/chunk-7MNMYOFP.js.map +0 -1
- package/dist/chunk-7OZ53EXP.js.map +0 -1
- package/dist/chunk-7SEAZFFB.js.map +0 -1
- package/dist/chunk-A6KTB5R6.js.map +0 -1
- package/dist/chunk-AGZQD76C.js.map +0 -1
- package/dist/chunk-APO3DCMU.js.map +0 -1
- package/dist/chunk-BVF3AGJP.js.map +0 -1
- package/dist/chunk-C5BCH4ZS.js.map +0 -1
- package/dist/chunk-C7VW7C3F.js.map +0 -1
- package/dist/chunk-CULXMQJH.js.map +0 -1
- package/dist/chunk-CYFQJMUV.js.map +0 -1
- package/dist/chunk-D654IBA6.js +0 -61
- package/dist/chunk-D654IBA6.js.map +0 -1
- package/dist/chunk-DGXUHMOV.js.map +0 -1
- package/dist/chunk-DINWEURR.js.map +0 -1
- package/dist/chunk-DK5LDEQM.js.map +0 -1
- package/dist/chunk-EABGC2TL.js.map +0 -1
- package/dist/chunk-EHRTFRWW.js.map +0 -1
- package/dist/chunk-EJI5XIBB.js.map +0 -1
- package/dist/chunk-FAAFWE4G.js.map +0 -1
- package/dist/chunk-FAJ7FZYM.js +0 -11
- package/dist/chunk-FAJ7FZYM.js.map +0 -1
- package/dist/chunk-FDU6HUUL.js +0 -147
- package/dist/chunk-FDU6HUUL.js.map +0 -1
- package/dist/chunk-FIT6DMX6.js.map +0 -1
- package/dist/chunk-FJ43PRLT.js.map +0 -1
- package/dist/chunk-FLTNHQK6.js +0 -262
- package/dist/chunk-FLTNHQK6.js.map +0 -1
- package/dist/chunk-GDFS42HT.js.map +0 -1
- package/dist/chunk-H3ME6L6D.js.map +0 -1
- package/dist/chunk-HXXBL2KD.js.map +0 -1
- package/dist/chunk-ICRIXAP2.js.map +0 -1
- package/dist/chunk-IQT3XTKW.js.map +0 -1
- package/dist/chunk-JR4ZC3G4.js.map +0 -1
- package/dist/chunk-K4FLSOR5.js.map +0 -1
- package/dist/chunk-KNKUID7G.js.map +0 -1
- package/dist/chunk-KOSORCJG.js.map +0 -1
- package/dist/chunk-LIRZNNUP.js.map +0 -1
- package/dist/chunk-LLQ2LLWF.js.map +0 -1
- package/dist/chunk-LPMVBPA3.js +0 -236
- package/dist/chunk-LPMVBPA3.js.map +0 -1
- package/dist/chunk-LT3NLYSI.js.map +0 -1
- package/dist/chunk-LUDTDZLK.js.map +0 -1
- package/dist/chunk-MJFNCJXV.js.map +0 -1
- package/dist/chunk-MSWG7JI6.js.map +0 -1
- package/dist/chunk-MXC3AP5I.js.map +0 -1
- package/dist/chunk-MXFBBHJU.js.map +0 -1
- package/dist/chunk-MZH6EHNR.js.map +0 -1
- package/dist/chunk-N2D6GXBM.js.map +0 -1
- package/dist/chunk-NBNN5GOB.js.map +0 -1
- package/dist/chunk-NMZY542O.js.map +0 -1
- package/dist/chunk-NZL6GGQE.js.map +0 -1
- package/dist/chunk-OZHRDTDX.js.map +0 -1
- package/dist/chunk-PIRJPV5T.js.map +0 -1
- package/dist/chunk-PZIAX57I.js.map +0 -1
- package/dist/chunk-Q7P4WJDP.js.map +0 -1
- package/dist/chunk-QA2ZAPBU.js.map +0 -1
- package/dist/chunk-QDZ2RLEC.js.map +0 -1
- package/dist/chunk-QLLBRHAT.js.map +0 -1
- package/dist/chunk-QR3C7BKQ.js.map +0 -1
- package/dist/chunk-RHY3HH7P.js.map +0 -1
- package/dist/chunk-RK2Y4XOM.js.map +0 -1
- package/dist/chunk-RR2PKP3I.js +0 -63
- package/dist/chunk-RR2PKP3I.js.map +0 -1
- package/dist/chunk-RRF5UOBJ.js.map +0 -1
- package/dist/chunk-RXDLTSWT.js.map +0 -1
- package/dist/chunk-RYED3SPJ.js +0 -42
- package/dist/chunk-RYED3SPJ.js.map +0 -1
- package/dist/chunk-S7KDBTWT.js.map +0 -1
- package/dist/chunk-TK4UEOSK.js.map +0 -1
- package/dist/chunk-TMM4S4IJ.js.map +0 -1
- package/dist/chunk-TMQLARTH.js.map +0 -1
- package/dist/chunk-TPB3I2AC.js.map +0 -1
- package/dist/chunk-TPMQ3G6Z.js.map +0 -1
- package/dist/chunk-TPU5L5EY.js.map +0 -1
- package/dist/chunk-TZOLIGIG.js.map +0 -1
- package/dist/chunk-U3WSW6PZ.js.map +0 -1
- package/dist/chunk-U4SCL7B7.js.map +0 -1
- package/dist/chunk-U66YHYC7.js +0 -31
- package/dist/chunk-U66YHYC7.js.map +0 -1
- package/dist/chunk-U7EJOMFC.js.map +0 -1
- package/dist/chunk-UWVJF25J.js.map +0 -1
- package/dist/chunk-VBJ7V5SK.js.map +0 -1
- package/dist/chunk-W3LR522O.js.map +0 -1
- package/dist/chunk-W4L6CZKA.js.map +0 -1
- package/dist/chunk-W6AQJ2PY.js.map +0 -1
- package/dist/chunk-WELDCG6C.js.map +0 -1
- package/dist/chunk-WNARATI3.js.map +0 -1
- package/dist/chunk-WPGJYVUH.js.map +0 -1
- package/dist/chunk-WW3QQF4H.js.map +0 -1
- package/dist/chunk-XIG5PDM7.js.map +0 -1
- package/dist/chunk-XKECPATV.js.map +0 -1
- package/dist/chunk-XKLD5OK4.js.map +0 -1
- package/dist/chunk-XSZEP4SF.js.map +0 -1
- package/dist/chunk-XVVIG67A.js.map +0 -1
- package/dist/chunk-XYIK4LF6.js.map +0 -1
- package/dist/chunk-YRMVARQP.js.map +0 -1
- package/dist/chunk-YROHKYBY.js.map +0 -1
- package/dist/chunk-YU5KIWYQ.js.map +0 -1
- package/dist/chunk-ZAVUCJ4H.js.map +0 -1
- package/dist/chunk-ZPKBYX2F.js.map +0 -1
- package/dist/chunk-ZTFCYYEZ.js.map +0 -1
- package/dist/chunk-ZYVPLJ4T.js.map +0 -1
- package/dist/path-MR5JPYOP.js +0 -9
- package/dist/state-store-VZU2IA53.js +0 -16
- package/dist/trace-C5ETWBEF.js.map +0 -1
- /package/dist/{capsule-crypto-5CYAGVC5.js.map → bulk-import/index.js.map} +0 -0
- /package/dist/{contradiction-review-ATP4S6IC.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{capsule-merge-4MGKE7C5.js.map → capsule-merge-T2JRE46P.js.map} +0 -0
- /package/dist/{chunk-SAZS2QZB.js.map → chunk-23UORJ4S.js.map} +0 -0
- /package/dist/{chunk-PK7H5L6Y.js.map → chunk-2NM43EWN.js.map} +0 -0
- /package/dist/{chunk-PYXS46O7.js.map → chunk-3BP57I6J.js.map} +0 -0
- /package/dist/{chunk-FBYESMQ2.js.map → chunk-3C5RPJAX.js.map} +0 -0
- /package/dist/{chunk-N53K2EXC.js.map → chunk-6VF75M3X.js.map} +0 -0
- /package/dist/{chunk-6H2TESSP.js.map → chunk-765K3SAT.js.map} +0 -0
- /package/dist/{chunk-EDTHC6UD.js.map → chunk-77NAFXUD.js.map} +0 -0
- /package/dist/{chunk-MGKYQQYF.js.map → chunk-7Q3RCKAQ.js.map} +0 -0
- /package/dist/{chunk-34DQE4KF.js.map → chunk-CO7ZO4TU.js.map} +0 -0
- /package/dist/{chunk-ZKSK55RC.js.map → chunk-ETUPBUHB.js.map} +0 -0
- /package/dist/{chunk-QRNI5JBH.js.map → chunk-EYIEWJNI.js.map} +0 -0
- /package/dist/{chunk-C6QPK5GG.js.map → chunk-FZZ2QTJI.js.map} +0 -0
- /package/dist/{chunk-3JXBXXM2.js.map → chunk-G4IAEX6D.js.map} +0 -0
- /package/dist/{chunk-2WWLHTZY.js.map → chunk-IC4GELZE.js.map} +0 -0
- /package/dist/{chunk-PCUKNJAZ.js.map → chunk-JKV57BTN.js.map} +0 -0
- /package/dist/{chunk-2KI4QFHU.js.map → chunk-LMDRGRJ2.js.map} +0 -0
- /package/dist/{chunk-MY6TPVXW.js.map → chunk-LMPHTYJC.js.map} +0 -0
- /package/dist/{chunk-5HRY2WRF.js.map → chunk-LZ3VEOU5.js.map} +0 -0
- /package/dist/{chunk-NGAVDO7E.js.map → chunk-OADWQ5CR.js.map} +0 -0
- /package/dist/{chunk-DOM4GKSW.js.map → chunk-OZKVVUJB.js.map} +0 -0
- /package/dist/{chunk-MT4HVDUZ.js.map → chunk-PM3QHTFT.js.map} +0 -0
- /package/dist/{chunk-ZK7I7JYV.js.map → chunk-R3PS27B4.js.map} +0 -0
- /package/dist/{chunk-SKE7JYKA.js.map → chunk-SFXKHM7P.js.map} +0 -0
- /package/dist/{chunk-HMDCOMYU.js.map → chunk-SKGV326D.js.map} +0 -0
- /package/dist/{chunk-5UM2VJ6D.js.map → chunk-UEY3VB6W.js.map} +0 -0
- /package/dist/{chunk-GIF42EW3.js.map → chunk-UP6MOYCB.js.map} +0 -0
- /package/dist/{chunk-MRILGULB.js.map → chunk-V2RCP53Q.js.map} +0 -0
- /package/dist/{chunk-FSFEQI74.js.map → chunk-W7L6HXUC.js.map} +0 -0
- /package/dist/{chunk-3IQ2TR4N.js.map → chunk-WLEB7WCG.js.map} +0 -0
- /package/dist/{chunk-GL6I6MEQ.js.map → chunk-WSGF57U2.js.map} +0 -0
- /package/dist/{chunk-JA3AK3PT.js.map → chunk-XNLXAWHX.js.map} +0 -0
- /package/dist/{chunk-SIC6U3GZ.js.map → chunk-YHV3KRKS.js.map} +0 -0
- /package/dist/{chunk-VLXA6PI2.js.map → chunk-YQMZ7IH2.js.map} +0 -0
- /package/dist/{contradiction-scan-5A4IDZV5.js.map → contradiction-review-6V2LXXK6.js.map} +0 -0
- /package/dist/{migrate-from-identity-anchor-G27MCD6A.js.map → contradiction-scan-GIRVC4C7.js.map} +0 -0
- /package/dist/{first-start-migration-4MHQEOSD.js.map → first-start-migration-CKTCTCQI.js.map} +0 -0
- /package/dist/{graph-edge-decay-5DI5GUNL.js.map → graph-edge-decay-MUP5J7CC.js.map} +0 -0
- /package/dist/{path-MR5JPYOP.js.map → importers/index.js.map} +0 -0
- /package/dist/{peers-HCVGHMAE.js.map → migrate-from-identity-anchor-EB4XI4Q2.js.map} +0 -0
- /package/dist/{resolution-B7FNQSSP.js.map → path-X2K5XCHL.js.map} +0 -0
- /package/dist/{state-store-VZU2IA53.js.map → peers/index.js.map} +0 -0
- /package/dist/{tier-stats-62ZVDFKS.js.map → tier-stats-SKML2OSF.js.map} +0 -0
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
* The `input` field is empty string (synthesis is left to adapters).
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { constants } from "node:fs";
|
|
13
|
+
import { lstat, open, readdir, realpath } from "node:fs/promises";
|
|
13
14
|
import path from "node:path";
|
|
14
15
|
|
|
16
|
+
import { parseStrictCliDate } from "./date-parse.js";
|
|
15
17
|
import type { TrainingExportOptions, TrainingExportRecord } from "./types.js";
|
|
16
18
|
|
|
17
19
|
// ---------------------------------------------------------------------------
|
|
@@ -85,6 +87,10 @@ async function safeRealpath(p: string): Promise<string | null> {
|
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
|
|
90
|
+
function isContainedPath(real: string, containmentRoot: string): boolean {
|
|
91
|
+
return real === containmentRoot || real.startsWith(containmentRoot + path.sep);
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
/**
|
|
89
95
|
* Recursively collect `.md` files under `dir`, returning deterministic,
|
|
90
96
|
* lexicographically-sorted absolute paths.
|
|
@@ -157,7 +163,7 @@ async function collectMarkdownFiles(
|
|
|
157
163
|
|
|
158
164
|
const real = await safeRealpath(full);
|
|
159
165
|
if (!real) continue;
|
|
160
|
-
if (real
|
|
166
|
+
if (!isContainedPath(real, containmentRoot)) {
|
|
161
167
|
continue;
|
|
162
168
|
}
|
|
163
169
|
files.push(full);
|
|
@@ -172,6 +178,27 @@ async function collectMarkdownFiles(
|
|
|
172
178
|
return files.sort((a, b) => a.localeCompare(b));
|
|
173
179
|
}
|
|
174
180
|
|
|
181
|
+
export async function readContainedMarkdownFile(
|
|
182
|
+
filePath: string,
|
|
183
|
+
containmentRoot: string,
|
|
184
|
+
): Promise<string | null> {
|
|
185
|
+
let handle: Awaited<ReturnType<typeof open>> | null = null;
|
|
186
|
+
try {
|
|
187
|
+
handle = await open(filePath, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
188
|
+
const st = await handle.stat();
|
|
189
|
+
if (!st.isFile() || st.nlink > 1) return null;
|
|
190
|
+
|
|
191
|
+
const real = await safeRealpath(filePath);
|
|
192
|
+
if (!real || !isContainedPath(real, containmentRoot)) return null;
|
|
193
|
+
|
|
194
|
+
return await handle.readFile("utf-8");
|
|
195
|
+
} catch {
|
|
196
|
+
return null;
|
|
197
|
+
} finally {
|
|
198
|
+
await handle?.close().catch(() => undefined);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
175
202
|
// ---------------------------------------------------------------------------
|
|
176
203
|
// Build instruction from category + tags
|
|
177
204
|
// ---------------------------------------------------------------------------
|
|
@@ -214,8 +241,11 @@ function buildInstruction(category: string, tags: string[]): string {
|
|
|
214
241
|
|
|
215
242
|
function parseIsoDate(isoStr: string): Date | null {
|
|
216
243
|
if (!isoStr) return null;
|
|
217
|
-
|
|
218
|
-
|
|
244
|
+
try {
|
|
245
|
+
return parseStrictCliDate(isoStr, "memory created timestamp");
|
|
246
|
+
} catch {
|
|
247
|
+
return null;
|
|
248
|
+
}
|
|
219
249
|
}
|
|
220
250
|
|
|
221
251
|
// ---------------------------------------------------------------------------
|
|
@@ -254,12 +284,8 @@ export async function convertMemoriesToRecords(
|
|
|
254
284
|
const records: TrainingExportRecord[] = [];
|
|
255
285
|
|
|
256
286
|
for (const filePath of allFiles) {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
raw = await readFile(filePath, "utf-8");
|
|
260
|
-
} catch {
|
|
261
|
-
continue; // skip unreadable files
|
|
262
|
-
}
|
|
287
|
+
const raw = await readContainedMarkdownFile(filePath, containmentRoot);
|
|
288
|
+
if (raw === null) continue; // skip unreadable files
|
|
263
289
|
|
|
264
290
|
const parsed = parseFrontmatter(raw);
|
|
265
291
|
if (!parsed) continue; // skip malformed files
|
|
@@ -71,6 +71,23 @@ describe("TrainingExportAdapter registry", () => {
|
|
|
71
71
|
);
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
it("rejects malformed adapters without mutating the registry", () => {
|
|
75
|
+
assert.throws(
|
|
76
|
+
() => registerTrainingExportAdapter({ name: "no-format" } as unknown as TrainingExportAdapter),
|
|
77
|
+
/formatRecords must be a function/,
|
|
78
|
+
);
|
|
79
|
+
assert.throws(
|
|
80
|
+
() => registerTrainingExportAdapter({
|
|
81
|
+
name: "bad-ext",
|
|
82
|
+
formatRecords: () => "",
|
|
83
|
+
fileExtension: "",
|
|
84
|
+
} as unknown as TrainingExportAdapter),
|
|
85
|
+
/fileExtension must be a non-empty extension/,
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
assert.deepEqual(listTrainingExportAdapters(), []);
|
|
89
|
+
});
|
|
90
|
+
|
|
74
91
|
it("trims adapter name on lookup", () => {
|
|
75
92
|
registerTrainingExportAdapter(makeAdapter("axolotl"));
|
|
76
93
|
assert.ok(getTrainingExportAdapter(" axolotl "));
|
|
@@ -16,12 +16,30 @@ const adapters = new Map<string, TrainingExportAdapter>();
|
|
|
16
16
|
* listing valid actions (CLAUDE.md rule #51).
|
|
17
17
|
*/
|
|
18
18
|
export function registerTrainingExportAdapter(adapter: TrainingExportAdapter): void {
|
|
19
|
-
if (!adapter || typeof adapter
|
|
19
|
+
if (!adapter || typeof adapter !== "object" || Array.isArray(adapter)) {
|
|
20
|
+
throw new Error(
|
|
21
|
+
"registerTrainingExportAdapter: adapter must be an object with name, fileExtension, and formatRecords.",
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
if (typeof adapter.name !== "string" || adapter.name.trim().length === 0) {
|
|
20
25
|
throw new Error(
|
|
21
26
|
"registerTrainingExportAdapter: adapter.name must be a non-empty string. " +
|
|
22
27
|
"Provide a unique adapter name (e.g. 'weclone', 'axolotl', 'mlx').",
|
|
23
28
|
);
|
|
24
29
|
}
|
|
30
|
+
if (typeof adapter.formatRecords !== "function") {
|
|
31
|
+
throw new Error(
|
|
32
|
+
"registerTrainingExportAdapter: adapter.formatRecords must be a function.",
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
if (
|
|
36
|
+
typeof adapter.fileExtension !== "string" ||
|
|
37
|
+
!/^\.[A-Za-z0-9][A-Za-z0-9._-]*$/.test(adapter.fileExtension.trim())
|
|
38
|
+
) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
"registerTrainingExportAdapter: adapter.fileExtension must be a non-empty extension like '.jsonl'.",
|
|
41
|
+
);
|
|
42
|
+
}
|
|
25
43
|
|
|
26
44
|
const key = adapter.name.trim();
|
|
27
45
|
|
package/src/transcript.ts
CHANGED
|
@@ -659,7 +659,7 @@ export class TranscriptManager {
|
|
|
659
659
|
const entryTime = new Date(entry.timestamp);
|
|
660
660
|
|
|
661
661
|
// Check if entry is within time range
|
|
662
|
-
if (entryTime >= start && entryTime
|
|
662
|
+
if (entryTime >= start && entryTime < end) {
|
|
663
663
|
// Filter by sessionKey if provided
|
|
664
664
|
if (!sessionKey || entry.sessionKey === sessionKey) {
|
|
665
665
|
entries.push(entry);
|
|
@@ -739,7 +739,7 @@ export class TranscriptManager {
|
|
|
739
739
|
try {
|
|
740
740
|
const entry = JSON.parse(line) as TranscriptEntry;
|
|
741
741
|
const ts = new Date(entry.timestamp);
|
|
742
|
-
if (ts >= start && ts
|
|
742
|
+
if (ts >= start && ts < end && entry.sessionKey === sessionKey) {
|
|
743
743
|
entries.push(entry);
|
|
744
744
|
}
|
|
745
745
|
} catch {
|
package/src/transfer/backup.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { mkdir, readdir, rm, unlink, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { gzipSync } from "node:zlib";
|
|
4
4
|
import { exportMarkdownBundle } from "./export-md.js";
|
|
5
5
|
import { encryptCapsuleFile } from "./capsule-crypto.js";
|
|
6
|
-
import { isTransferPathExcluded } from "./exclusions.js";
|
|
6
|
+
import { computeTransferOutputRel, isTransferPathExcluded } from "./exclusions.js";
|
|
7
7
|
|
|
8
8
|
export interface BackupOptions {
|
|
9
9
|
memoryDir: string;
|
|
@@ -43,13 +43,14 @@ export async function backupMemoryDir(opts: BackupOptions): Promise<string> {
|
|
|
43
43
|
const { readFile } = await import("node:fs/promises");
|
|
44
44
|
|
|
45
45
|
const memoryDirAbs = path.resolve(opts.memoryDir);
|
|
46
|
+
const outputRelPosix = computeTransferOutputRel(memoryDirAbs, outDirAbs);
|
|
46
47
|
const filesAbs = await listFilesRecursive(memoryDirAbs);
|
|
47
48
|
const includeTranscripts = opts.includeTranscripts === true;
|
|
48
49
|
|
|
49
50
|
const records: Array<{ path: string; content: string }> = [];
|
|
50
51
|
for (const abs of filesAbs) {
|
|
51
52
|
const relPosix = toPosixRelPath(abs, memoryDirAbs);
|
|
52
|
-
if (isTransferPathExcluded(relPosix, { includeTranscripts })) continue;
|
|
53
|
+
if (isTransferPathExcluded(relPosix, { includeTranscripts, outputRelPosix })) continue;
|
|
53
54
|
const content = await readFile(abs, "utf-8");
|
|
54
55
|
records.push({ path: relPosix, content });
|
|
55
56
|
}
|
|
@@ -67,11 +68,21 @@ export async function backupMemoryDir(opts: BackupOptions): Promise<string> {
|
|
|
67
68
|
await writeFile(tempGzPath, gz);
|
|
68
69
|
|
|
69
70
|
// Encrypt and remove plaintext.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
let encPath: string;
|
|
72
|
+
try {
|
|
73
|
+
({ encPath } = await encryptCapsuleFile({
|
|
74
|
+
sourceGzPath: tempGzPath,
|
|
75
|
+
memoryDir: opts.memoryDir,
|
|
76
|
+
}));
|
|
77
|
+
await unlink(tempGzPath);
|
|
78
|
+
} catch (error) {
|
|
79
|
+
try {
|
|
80
|
+
await unlink(tempGzPath);
|
|
81
|
+
} catch {
|
|
82
|
+
// Best-effort cleanup: do not leave a plaintext backup after failed encryption.
|
|
83
|
+
}
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
75
86
|
|
|
76
87
|
if (opts.retentionDays && opts.retentionDays > 0) {
|
|
77
88
|
await enforceRetention(outDirAbs, opts.retentionDays);
|
|
@@ -61,6 +61,13 @@ import path from "node:path";
|
|
|
61
61
|
import { open, seal } from "../secure-store/cipher.js";
|
|
62
62
|
import * as keyring from "../secure-store/keyring.js";
|
|
63
63
|
import { readHeader, secureStoreDir } from "../secure-store/header.js";
|
|
64
|
+
import {
|
|
65
|
+
deriveKey,
|
|
66
|
+
KDF_SALT_LENGTH,
|
|
67
|
+
type Argon2idParams,
|
|
68
|
+
type KdfAlgorithm,
|
|
69
|
+
type ScryptParams,
|
|
70
|
+
} from "../secure-store/kdf.js";
|
|
64
71
|
|
|
65
72
|
// ---------------------------------------------------------------------------
|
|
66
73
|
// On-disk magic
|
|
@@ -125,9 +132,17 @@ export interface DecryptCapsuleOptions {
|
|
|
125
132
|
|
|
126
133
|
/**
|
|
127
134
|
* Absolute path to the memory directory whose secure-store keyring will
|
|
128
|
-
* be queried for the master key.
|
|
135
|
+
* be queried for the master key when no passphrase is supplied. Required
|
|
136
|
+
* for v1 archives, optional for v2 passphrase-based restores.
|
|
129
137
|
*/
|
|
130
|
-
memoryDir
|
|
138
|
+
memoryDir?: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Original secure-store passphrase. For format-v2 archives this is used
|
|
142
|
+
* with the embedded KDF params to restore on a machine that does not have
|
|
143
|
+
* the source memory directory's unlocked keyring entry.
|
|
144
|
+
*/
|
|
145
|
+
passphrase?: string;
|
|
131
146
|
|
|
132
147
|
/**
|
|
133
148
|
* Destination path for the decrypted output. If omitted, defaults to
|
|
@@ -235,14 +250,13 @@ export async function encryptCapsuleFile(
|
|
|
235
250
|
* decryption. Throws with a clear message on:
|
|
236
251
|
* - non-enc file / wrong magic
|
|
237
252
|
* - unsupported format version
|
|
238
|
-
|
|
253
|
+
* - locked/uninitialized secure-store (when keyring is not unlocked and no passphrase)
|
|
239
254
|
* - wrong key / tampered ciphertext (AES-GCM auth failure)
|
|
240
255
|
*
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
* passphrase prompt needed).
|
|
256
|
+
* Format v2 archives carry embedded KDF params. If a `passphrase` is
|
|
257
|
+
* provided, the key is re-derived from the passphrase + embedded KDF params
|
|
258
|
+
* for cross-machine restore. Without a passphrase, an unlocked keyring key
|
|
259
|
+
* from `memoryDir` is used directly.
|
|
246
260
|
*/
|
|
247
261
|
export async function decryptCapsuleFile(
|
|
248
262
|
opts: DecryptCapsuleOptions,
|
|
@@ -273,7 +287,14 @@ export async function decryptCapsuleFile(
|
|
|
273
287
|
}
|
|
274
288
|
|
|
275
289
|
// Resolve the decryption key and the envelope offset.
|
|
276
|
-
const { key, envelopeOffset } = resolveKeyAndOffset(
|
|
290
|
+
const { key, envelopeOffset } = resolveKeyAndOffset(
|
|
291
|
+
buf,
|
|
292
|
+
version,
|
|
293
|
+
opts.memoryDir,
|
|
294
|
+
"decryptCapsuleFile",
|
|
295
|
+
opts.encPath,
|
|
296
|
+
opts.passphrase,
|
|
297
|
+
);
|
|
277
298
|
|
|
278
299
|
// The sealed envelope starts at `envelopeOffset`.
|
|
279
300
|
const envelope = buf.subarray(envelopeOffset);
|
|
@@ -312,7 +333,8 @@ export async function decryptCapsuleFile(
|
|
|
312
333
|
*/
|
|
313
334
|
export async function decryptCapsuleFileInMemory(
|
|
314
335
|
encPath: string,
|
|
315
|
-
memoryDir
|
|
336
|
+
memoryDir?: string,
|
|
337
|
+
options: { passphrase?: string } = {},
|
|
316
338
|
): Promise<Buffer> {
|
|
317
339
|
const buf = await readFile(encPath);
|
|
318
340
|
|
|
@@ -335,7 +357,14 @@ export async function decryptCapsuleFileInMemory(
|
|
|
335
357
|
);
|
|
336
358
|
}
|
|
337
359
|
|
|
338
|
-
const { key, envelopeOffset } = resolveKeyAndOffset(
|
|
360
|
+
const { key, envelopeOffset } = resolveKeyAndOffset(
|
|
361
|
+
buf,
|
|
362
|
+
version,
|
|
363
|
+
memoryDir,
|
|
364
|
+
"decryptCapsuleFileInMemory",
|
|
365
|
+
encPath,
|
|
366
|
+
options.passphrase,
|
|
367
|
+
);
|
|
339
368
|
const envelope = buf.subarray(envelopeOffset);
|
|
340
369
|
|
|
341
370
|
const basename = path.basename(encPath);
|
|
@@ -370,6 +399,12 @@ interface KdfSection {
|
|
|
370
399
|
salt: Buffer;
|
|
371
400
|
}
|
|
372
401
|
|
|
402
|
+
interface ParsedKdfSection {
|
|
403
|
+
algorithm: KdfAlgorithm;
|
|
404
|
+
params: ScryptParams | Argon2idParams;
|
|
405
|
+
salt: Buffer;
|
|
406
|
+
}
|
|
407
|
+
|
|
373
408
|
/**
|
|
374
409
|
* Read the KDF params + canonical salt from the secure-store header and
|
|
375
410
|
* return both a compact JSON representation (for embedding in the archive)
|
|
@@ -419,14 +454,20 @@ async function loadKdfSection(memoryDir: string): Promise<KdfSection> {
|
|
|
419
454
|
* Rule 51: never silently default when the user's intent is clear but the
|
|
420
455
|
* precondition (unlocked keyring) is not met.
|
|
421
456
|
*/
|
|
422
|
-
function getKeyOrThrow(memoryDir: string, action: string): Buffer {
|
|
457
|
+
function getKeyOrThrow(memoryDir: string | undefined, action: string): Buffer {
|
|
458
|
+
if (!memoryDir) {
|
|
459
|
+
throw new Error(
|
|
460
|
+
`Secure-store memoryDir is required — cannot ${action} without either an unlocked keyring or a format-v2 passphrase.`,
|
|
461
|
+
);
|
|
462
|
+
}
|
|
423
463
|
const storeId = secureStoreDir(memoryDir);
|
|
424
464
|
const key = keyring.getKey(storeId);
|
|
425
465
|
if (key === null) {
|
|
426
466
|
throw new Error(
|
|
427
467
|
`Secure-store is locked or not initialized — cannot ${action}. ` +
|
|
428
|
-
`Run \`remnic secure-store unlock\` first,
|
|
429
|
-
`if the store
|
|
468
|
+
`Run \`remnic secure-store unlock\` first, provide the original passphrase for ` +
|
|
469
|
+
`a format-v2 archive restore, or run \`remnic secure-store init\` if the store ` +
|
|
470
|
+
`has never been initialized.`,
|
|
430
471
|
);
|
|
431
472
|
}
|
|
432
473
|
return key;
|
|
@@ -437,11 +478,9 @@ function getKeyOrThrow(memoryDir: string, action: string): Buffer {
|
|
|
437
478
|
* within `buf`, handling both format v1 (no KDF section) and format v2
|
|
438
479
|
* (embedded KDF params for cross-machine restore).
|
|
439
480
|
*
|
|
440
|
-
* For v2 archives:
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
* public API — this is the foundation). For now, locked keyring still
|
|
444
|
-
* throws the same clear error as v1.
|
|
481
|
+
* For v2 archives: a caller-supplied passphrase is derived against the
|
|
482
|
+
* embedded KDF section for cross-machine restore. Without a passphrase, the
|
|
483
|
+
* keyring is used as the fast local path.
|
|
445
484
|
*
|
|
446
485
|
* The KDF-params section serves two roles:
|
|
447
486
|
* 1. Documents what algorithm was used so cross-machine tooling knows
|
|
@@ -453,9 +492,10 @@ function getKeyOrThrow(memoryDir: string, action: string): Buffer {
|
|
|
453
492
|
function resolveKeyAndOffset(
|
|
454
493
|
buf: Buffer,
|
|
455
494
|
version: number,
|
|
456
|
-
memoryDir: string,
|
|
495
|
+
memoryDir: string | undefined,
|
|
457
496
|
caller: string,
|
|
458
497
|
encPath: string,
|
|
498
|
+
passphrase?: string,
|
|
459
499
|
): { key: Buffer; envelopeOffset: number } {
|
|
460
500
|
if (version === 1) {
|
|
461
501
|
// v1: envelope starts immediately after magic (11) + version (1).
|
|
@@ -477,9 +517,53 @@ function resolveKeyAndOffset(
|
|
|
477
517
|
`${caller}: file too short for format v2 KDF params section (expected ${kdfLen} bytes): ${encPath}`,
|
|
478
518
|
);
|
|
479
519
|
}
|
|
520
|
+
if (kdfLen <= 0) {
|
|
521
|
+
throw new Error(`${caller}: format v2 KDF params section is empty: ${encPath}`);
|
|
522
|
+
}
|
|
523
|
+
const kdfJson = buf.subarray(kdfJsonOffset, kdfJsonOffset + kdfLen).toString("utf-8");
|
|
524
|
+
const kdf = parseEmbeddedKdfSection(kdfJson, caller, encPath);
|
|
480
525
|
const envelopeOffset = kdfJsonOffset + kdfLen;
|
|
481
526
|
|
|
482
|
-
|
|
527
|
+
if (passphrase !== undefined) {
|
|
528
|
+
if (passphrase.length === 0) {
|
|
529
|
+
throw new Error(`${caller}: passphrase must not be empty for format v2 archive restore`);
|
|
530
|
+
}
|
|
531
|
+
const key = deriveKey(kdf.algorithm, passphrase, kdf.salt, kdf.params);
|
|
532
|
+
return { key, envelopeOffset };
|
|
533
|
+
}
|
|
534
|
+
|
|
483
535
|
const key = getKeyOrThrow(memoryDir, "decrypt capsule");
|
|
484
536
|
return { key, envelopeOffset };
|
|
485
537
|
}
|
|
538
|
+
|
|
539
|
+
function parseEmbeddedKdfSection(json: string, caller: string, encPath: string): ParsedKdfSection {
|
|
540
|
+
let parsed: unknown;
|
|
541
|
+
try {
|
|
542
|
+
parsed = JSON.parse(json);
|
|
543
|
+
} catch (cause) {
|
|
544
|
+
throw new Error(`${caller}: format v2 KDF params are not valid JSON: ${encPath}`, { cause: cause as Error });
|
|
545
|
+
}
|
|
546
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
547
|
+
throw new Error(`${caller}: format v2 KDF params must be a JSON object: ${encPath}`);
|
|
548
|
+
}
|
|
549
|
+
const obj = parsed as Record<string, unknown>;
|
|
550
|
+
const algorithm = obj.algorithm;
|
|
551
|
+
if (algorithm !== "scrypt" && algorithm !== "argon2id") {
|
|
552
|
+
throw new Error(`${caller}: unsupported format v2 KDF algorithm ${String(algorithm)}: ${encPath}`);
|
|
553
|
+
}
|
|
554
|
+
if (typeof obj.params !== "object" || obj.params === null || Array.isArray(obj.params)) {
|
|
555
|
+
throw new Error(`${caller}: format v2 KDF params.params must be an object: ${encPath}`);
|
|
556
|
+
}
|
|
557
|
+
if (typeof obj.salt !== "string" || !/^[0-9a-fA-F]+$/.test(obj.salt) || obj.salt.length % 2 !== 0) {
|
|
558
|
+
throw new Error(`${caller}: format v2 KDF salt must be an even-length hex string: ${encPath}`);
|
|
559
|
+
}
|
|
560
|
+
const salt = Buffer.from(obj.salt, "hex");
|
|
561
|
+
if (salt.length !== KDF_SALT_LENGTH) {
|
|
562
|
+
throw new Error(`${caller}: format v2 KDF salt decoded to ${salt.length} bytes, expected ${KDF_SALT_LENGTH}: ${encPath}`);
|
|
563
|
+
}
|
|
564
|
+
return {
|
|
565
|
+
algorithm,
|
|
566
|
+
params: obj.params as ScryptParams | Argon2idParams,
|
|
567
|
+
salt,
|
|
568
|
+
};
|
|
569
|
+
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import assert from "node:assert/strict";
|
|
24
24
|
import test from "node:test";
|
|
25
|
-
import { mkdtemp, rm, writeFile, readFile, mkdir, stat } from "node:fs/promises";
|
|
25
|
+
import { mkdtemp, rm, writeFile, readFile, mkdir, stat, readdir } from "node:fs/promises";
|
|
26
26
|
import path from "node:path";
|
|
27
27
|
import { tmpdir } from "node:os";
|
|
28
28
|
import { gzipSync, gunzipSync } from "node:zlib";
|
|
@@ -231,12 +231,6 @@ test("exportCapsule with encrypt=true + importCapsule roundtrip restores all fil
|
|
|
231
231
|
);
|
|
232
232
|
assert.equal(exportResult.encryptedArchivePath, exportResult.archivePath);
|
|
233
233
|
|
|
234
|
-
// Cross-machine restore scenario: the destination machine uses the same
|
|
235
|
-
// passphrase as the source. For this unit test, we simply pass srcDir as
|
|
236
|
-
// the memoryDir for the import — the key was registered there and is still
|
|
237
|
-
// in the keyring. In production, the operator runs `secure-store init` +
|
|
238
|
-
// `unlock` on the destination with the same passphrase; the recorded KDF
|
|
239
|
-
// derives the same key because the salt is embedded in the sealed envelope.
|
|
240
234
|
const importResult = await importCapsule({
|
|
241
235
|
archivePath: exportResult.archivePath,
|
|
242
236
|
root: dstDir,
|
|
@@ -260,6 +254,77 @@ test("exportCapsule with encrypt=true + importCapsule roundtrip restores all fil
|
|
|
260
254
|
}
|
|
261
255
|
});
|
|
262
256
|
|
|
257
|
+
test("encrypted format-v2 capsule restores from passphrase without source keyring", async () => {
|
|
258
|
+
const srcDir = await makeTempDir();
|
|
259
|
+
const dstDir = await makeTempDir();
|
|
260
|
+
const outDir = await makeTempDir();
|
|
261
|
+
try {
|
|
262
|
+
await makeMemoryDir(srcDir);
|
|
263
|
+
await initAndUnlockStore(srcDir);
|
|
264
|
+
|
|
265
|
+
const exportResult = await exportCapsule({
|
|
266
|
+
name: "test-capsule-passphrase",
|
|
267
|
+
root: srcDir,
|
|
268
|
+
outDir,
|
|
269
|
+
pluginVersion: "0.0.0-test",
|
|
270
|
+
encrypt: true,
|
|
271
|
+
memoryDir: srcDir,
|
|
272
|
+
now: 1_700_000_000_500,
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
keyring.lockAll();
|
|
276
|
+
|
|
277
|
+
const importResult = await importCapsule({
|
|
278
|
+
archivePath: exportResult.archivePath,
|
|
279
|
+
root: dstDir,
|
|
280
|
+
mode: "skip",
|
|
281
|
+
passphrase: TEST_PASSPHRASE,
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
assert.equal(importResult.imported.length, 2);
|
|
285
|
+
assert.equal(importResult.skipped.length, 0);
|
|
286
|
+
|
|
287
|
+
const aContent = await readFile(path.join(dstDir, "facts", "a.md"), "utf-8");
|
|
288
|
+
assert.ok(aContent.includes("Fact A content."));
|
|
289
|
+
const bContent = await readFile(path.join(dstDir, "facts", "b.md"), "utf-8");
|
|
290
|
+
assert.ok(bContent.includes("Fact B content."));
|
|
291
|
+
} finally {
|
|
292
|
+
keyring.lockAll();
|
|
293
|
+
await rm(srcDir, { recursive: true, force: true });
|
|
294
|
+
await rm(dstDir, { recursive: true, force: true });
|
|
295
|
+
await rm(outDir, { recursive: true, force: true });
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
test("exportCapsule with encrypt=true removes plaintext archive when encryption fails", async () => {
|
|
300
|
+
const srcDir = await makeTempDir();
|
|
301
|
+
const outDir = await makeTempDir();
|
|
302
|
+
try {
|
|
303
|
+
await makeMemoryDir(srcDir);
|
|
304
|
+
|
|
305
|
+
await assert.rejects(
|
|
306
|
+
async () =>
|
|
307
|
+
exportCapsule({
|
|
308
|
+
name: "locked-capsule",
|
|
309
|
+
root: srcDir,
|
|
310
|
+
outDir,
|
|
311
|
+
pluginVersion: "0.0.0-test",
|
|
312
|
+
encrypt: true,
|
|
313
|
+
memoryDir: srcDir,
|
|
314
|
+
now: 1_700_000_000_700,
|
|
315
|
+
}),
|
|
316
|
+
/Secure-store is locked/,
|
|
317
|
+
);
|
|
318
|
+
|
|
319
|
+
const files = await readdir(outDir);
|
|
320
|
+
assert.equal(files.some((name) => name.endsWith(".capsule.json.gz")), false);
|
|
321
|
+
} finally {
|
|
322
|
+
keyring.lockAll();
|
|
323
|
+
await rm(srcDir, { recursive: true, force: true });
|
|
324
|
+
await rm(outDir, { recursive: true, force: true });
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
|
|
263
328
|
// ─── Test 3: import without unlocked store → clear error ─────────────────────
|
|
264
329
|
|
|
265
330
|
test("importCapsule with encrypted archive and locked store throws clear error", async () => {
|
|
@@ -439,6 +504,8 @@ test("backupMemoryDir with encrypt=true and locked store throws clear error", as
|
|
|
439
504
|
/Secure-store is locked/,
|
|
440
505
|
"should surface locked error when store not unlocked",
|
|
441
506
|
);
|
|
507
|
+
const files = await readdir(backupDir);
|
|
508
|
+
assert.equal(files.some((name) => name.endsWith(".backup.json.gz")), false);
|
|
442
509
|
} finally {
|
|
443
510
|
keyring.lockAll();
|
|
444
511
|
await rm(memDir, { recursive: true, force: true });
|
|
@@ -647,6 +714,38 @@ test("backupMemoryDir excludes .secure-store and .capsules directories from encr
|
|
|
647
714
|
}
|
|
648
715
|
});
|
|
649
716
|
|
|
717
|
+
test("backupMemoryDir excludes nested encrypted backup output directory", async () => {
|
|
718
|
+
const memDir = await makeTempDir();
|
|
719
|
+
try {
|
|
720
|
+
await makeMemoryDir(memDir);
|
|
721
|
+
await initAndUnlockStore(memDir);
|
|
722
|
+
|
|
723
|
+
const backupDir = path.join(memDir, "backups");
|
|
724
|
+
await mkdir(backupDir, { recursive: true });
|
|
725
|
+
await writeFile(path.join(backupDir, "old.backup.json.gz.enc"), Buffer.from("old backup"));
|
|
726
|
+
|
|
727
|
+
const encPath = await backupMemoryDir({
|
|
728
|
+
memoryDir: memDir,
|
|
729
|
+
outDir: backupDir,
|
|
730
|
+
pluginVersion: "0.0.0-test",
|
|
731
|
+
encrypt: true,
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
const { gzPath } = await decryptCapsuleFile({ encPath, memoryDir: memDir });
|
|
735
|
+
const gz = await readFile(gzPath);
|
|
736
|
+
const bundle = JSON.parse(gunzipSync(gz).toString("utf-8")) as {
|
|
737
|
+
records: Array<{ path: string }>;
|
|
738
|
+
};
|
|
739
|
+
const paths = bundle.records.map((record) => record.path);
|
|
740
|
+
|
|
741
|
+
assert.equal(paths.some((entry) => entry === "backups" || entry.startsWith("backups/")), false);
|
|
742
|
+
assert.equal(paths.some((entry) => entry.startsWith("facts/")), true);
|
|
743
|
+
} finally {
|
|
744
|
+
keyring.lockAll();
|
|
745
|
+
await rm(memDir, { recursive: true, force: true });
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
|
|
650
749
|
// ─── Test 12: exportCapsule includeTranscripts=true includes all dirs (Cursor) ─
|
|
651
750
|
|
|
652
751
|
test("exportCapsule with includeTranscripts=true includes transcripts and peers dirs without dropping other dirs", async () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
1
|
+
import { mkdir, readFile, stat, unlink, writeFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { gzipSync } from "node:zlib";
|
|
4
4
|
import { CAPSULE_SCHEMA_VERSION, EXPORT_FORMAT } from "./constants.js";
|
|
@@ -151,6 +151,13 @@ export async function exportCapsule(
|
|
|
151
151
|
opts: ExportCapsuleOptions,
|
|
152
152
|
): Promise<ExportCapsuleResult> {
|
|
153
153
|
validateName(opts.name);
|
|
154
|
+
if (opts.encrypt === true && !opts.memoryDir) {
|
|
155
|
+
throw new Error(
|
|
156
|
+
"exportCapsule: 'memoryDir' is required when 'encrypt' is true so the " +
|
|
157
|
+
"secure-store key can be retrieved.",
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
const encryptionMemoryDir = opts.encrypt === true ? opts.memoryDir : undefined;
|
|
154
161
|
const sinceMs = parseSince(opts.since);
|
|
155
162
|
const includeKinds = normalizeIncludeKinds(opts.includeKinds);
|
|
156
163
|
const peerFilter = normalizePeerIds(opts.peerIds);
|
|
@@ -245,20 +252,22 @@ export async function exportCapsule(
|
|
|
245
252
|
// Per gotcha #54: write the encrypted file before removing the plaintext so
|
|
246
253
|
// a crash mid-encrypt does not destroy the only copy.
|
|
247
254
|
if (opts.encrypt === true) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
);
|
|
255
|
+
try {
|
|
256
|
+
const { encPath } = await encryptCapsuleFile({
|
|
257
|
+
sourceGzPath: archivePath,
|
|
258
|
+
memoryDir: encryptionMemoryDir!,
|
|
259
|
+
});
|
|
260
|
+
// Remove the plaintext only after the encrypted file was written successfully.
|
|
261
|
+
await unlink(archivePath);
|
|
262
|
+
return { archivePath: encPath, manifestPath, manifest, encryptedArchivePath: encPath };
|
|
263
|
+
} catch (error) {
|
|
264
|
+
try {
|
|
265
|
+
await unlink(archivePath);
|
|
266
|
+
} catch {
|
|
267
|
+
// Best-effort cleanup: do not leave a plaintext capsule after a failed encrypted export.
|
|
268
|
+
}
|
|
269
|
+
throw error;
|
|
253
270
|
}
|
|
254
|
-
const { encPath } = await encryptCapsuleFile({
|
|
255
|
-
sourceGzPath: archivePath,
|
|
256
|
-
memoryDir: opts.memoryDir,
|
|
257
|
-
});
|
|
258
|
-
// Remove the plaintext only after the encrypted file was written successfully.
|
|
259
|
-
const { unlink } = await import("node:fs/promises");
|
|
260
|
-
await unlink(archivePath);
|
|
261
|
-
return { archivePath: encPath, manifestPath, manifest, encryptedArchivePath: encPath };
|
|
262
271
|
}
|
|
263
272
|
|
|
264
273
|
return { archivePath, manifestPath, manifest, encryptedArchivePath: null };
|
|
@@ -84,6 +84,12 @@ export interface ImportCapsuleOptions {
|
|
|
84
84
|
* When provided and the archive is NOT encrypted, the value is ignored.
|
|
85
85
|
*/
|
|
86
86
|
memoryDir?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Original secure-store passphrase for encrypted format-v2 archives. When
|
|
89
|
+
* supplied, the importer derives the archive key from the embedded KDF
|
|
90
|
+
* header, enabling restore without the source machine's unlocked keyring.
|
|
91
|
+
*/
|
|
92
|
+
passphrase?: string;
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
export interface ImportCapsuleSkippedRecord {
|
|
@@ -167,14 +173,17 @@ export async function importCapsule(
|
|
|
167
173
|
const encrypted = await isEncryptedCapsuleFile(archiveAbs);
|
|
168
174
|
let raw: Buffer;
|
|
169
175
|
if (encrypted) {
|
|
170
|
-
if (!opts.memoryDir) {
|
|
176
|
+
if (!opts.memoryDir && !opts.passphrase) {
|
|
171
177
|
throw new Error(
|
|
172
178
|
`importCapsule: archive is encrypted but 'memoryDir' was not provided. ` +
|
|
173
179
|
`Pass the memory directory so the secure-store key can be retrieved, ` +
|
|
180
|
+
`provide the original passphrase for a format-v2 archive restore, ` +
|
|
174
181
|
`or run \`remnic secure-store unlock\` before importing.`,
|
|
175
182
|
);
|
|
176
183
|
}
|
|
177
|
-
raw = await decryptCapsuleFileInMemory(archiveAbs, opts.memoryDir
|
|
184
|
+
raw = await decryptCapsuleFileInMemory(archiveAbs, opts.memoryDir, {
|
|
185
|
+
passphrase: opts.passphrase,
|
|
186
|
+
});
|
|
178
187
|
} else {
|
|
179
188
|
raw = await readFile(archiveAbs);
|
|
180
189
|
}
|
|
@@ -31,6 +31,13 @@ export function isTransferPathExcluded(relPosix: string, options: TransferPathEx
|
|
|
31
31
|
if (outputRelPosix !== null) {
|
|
32
32
|
if (outputRelPosix === ".") return true;
|
|
33
33
|
if (relPosix === outputRelPosix || relPosix.startsWith(`${outputRelPosix}/`)) return true;
|
|
34
|
+
if (
|
|
35
|
+
relPosix === `${outputRelPosix}-wal` ||
|
|
36
|
+
relPosix === `${outputRelPosix}-shm` ||
|
|
37
|
+
relPosix === `${outputRelPosix}-journal`
|
|
38
|
+
) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
34
41
|
}
|
|
35
42
|
|
|
36
43
|
return false;
|