@remnic/core 10.0.12 → 10.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.js +97 -95
- package/dist/access-authorization-probe.js +98 -96
- package/dist/access-boundary.js +97 -95
- package/dist/access-cli.js +201 -198
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +97 -95
- package/dist/access-http-briefing.js +98 -96
- package/dist/access-http-query.js +99 -97
- package/dist/access-http.js +121 -119
- package/dist/access-idempotency.js +3 -2
- package/dist/access-identity-continuity-surface.js +97 -95
- package/dist/access-lcm-surface.js +97 -95
- package/dist/access-mcp.js +110 -108
- package/dist/access-memory-search-fanout.js +3 -3
- package/dist/access-namespace-preflight.js +97 -95
- package/dist/access-observe-write-category.js +18 -18
- package/dist/access-observe-write-surface.js +97 -95
- package/dist/access-offline-manifest.js +21 -20
- package/dist/access-operations-batch.js +101 -99
- package/dist/access-operations.js +108 -106
- package/dist/access-recall-concurrency.js +97 -95
- package/dist/access-recall-diagnostics.js +5 -5
- package/dist/access-recall-response.js +97 -95
- package/dist/access-recall-surface.js +97 -95
- package/dist/access-schema.d.ts +2 -2
- package/dist/access-schema.js +12 -12
- package/dist/access-service.js +97 -95
- package/dist/access-surface-catalog.js +99 -97
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/active-memory-bridge.js +3 -3
- package/dist/active-recall.js +42 -40
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-WSJAOLOP.js → auto-sync-7WWAKW6F.js} +12 -12
- package/dist/briefing.js +31 -29
- package/dist/buffer.js +17 -17
- package/dist/calibration.d.ts +20 -0
- package/dist/calibration.d.ts.map +1 -1
- package/dist/calibration.js +60 -13
- package/dist/calibration.js.map +1 -1
- package/dist/capabilities.d.ts +3 -2
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +1 -1
- package/dist/{capsule-merge-M4HETD27.js → capsule-merge-LGYURS3C.js} +6 -5
- package/dist/{capsule-merge-M4HETD27.js.map → capsule-merge-LGYURS3C.js.map} +1 -1
- package/dist/capture-write-lock-backoff.d.ts +50 -0
- package/dist/capture-write-lock-backoff.d.ts.map +1 -0
- package/dist/capture-write-lock-backoff.js +30 -0
- package/dist/capture-write-lock.d.ts +6 -0
- package/dist/capture-write-lock.d.ts.map +1 -0
- package/dist/capture-write-lock.js +15 -0
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +34 -32
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.js +7 -6
- package/dist/causal-trajectory-graph.js.map +1 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-RNPJ4GQA.js → chunk-22W2XWGH.js} +6 -6
- package/dist/{chunk-AV2OQF2O.js → chunk-3F3HA3R2.js} +2 -2
- package/dist/{chunk-QZZPUREO.js → chunk-3GYSZHMT.js} +3 -3
- package/dist/{chunk-QWWMS4AE.js → chunk-3MO4LWYU.js} +1 -1
- package/dist/chunk-3MO4LWYU.js.map +1 -0
- package/dist/{chunk-XYOT5GQU.js → chunk-3NF4QUNZ.js} +3 -3
- package/dist/{chunk-AL6EHLB5.js → chunk-3X3PNU3T.js} +2 -2
- package/dist/{chunk-BTJ6CAIA.js → chunk-4IYIGN53.js} +10 -10
- package/dist/{chunk-OM3RWZQK.js → chunk-4KY5GSMB.js} +2 -2
- package/dist/{chunk-4N2MFNTG.js → chunk-4OSG5Y6M.js} +2 -2
- package/dist/{chunk-EEDI3OXB.js → chunk-4Q26RNSR.js} +2 -2
- package/dist/{chunk-EHRE7ZG3.js → chunk-5B5WYAHQ.js} +2 -2
- package/dist/{chunk-WCGJK4NQ.js → chunk-5FNZ3G6X.js} +10 -10
- package/dist/{chunk-Y6DZ33PA.js → chunk-5GX5457J.js} +4 -4
- package/dist/{chunk-OFCHT2TN.js → chunk-5LRV557D.js} +2 -2
- package/dist/{chunk-VAOC6GHN.js → chunk-5PHOU5QI.js} +2 -2
- package/dist/{chunk-WL7N5VGG.js → chunk-5TJEOU6Y.js} +2 -2
- package/dist/{chunk-A2L3P2IY.js → chunk-5WCJLQTM.js} +2 -2
- package/dist/{chunk-MZBWIJJN.js → chunk-63B2IZYE.js} +19 -19
- package/dist/{chunk-DGRMWDQY.js → chunk-66BCOVW2.js} +7 -7
- package/dist/chunk-6EDW54SQ.js +298 -0
- package/dist/chunk-6EDW54SQ.js.map +1 -0
- package/dist/{chunk-P2S6P7X6.js → chunk-6LG7BWKW.js} +2 -2
- package/dist/chunk-77R7BQZ2.js +152 -0
- package/dist/chunk-77R7BQZ2.js.map +1 -0
- package/dist/{chunk-4G2YCKLT.js → chunk-7G5NTS7F.js} +2 -2
- package/dist/{chunk-IPLYGWQF.js → chunk-7LCGFUMB.js} +6 -6
- package/dist/{chunk-KYY4EACB.js → chunk-7Z3DLNSD.js} +2 -2
- package/dist/{chunk-LNH76ZJX.js → chunk-AIYXVWUH.js} +27 -2
- package/dist/{chunk-LNH76ZJX.js.map → chunk-AIYXVWUH.js.map} +1 -1
- package/dist/{chunk-7SUWY37K.js → chunk-B665A6BO.js} +2 -2
- package/dist/{chunk-AEGNDL24.js → chunk-BVRZSI7Q.js} +2 -2
- package/dist/{chunk-2EMROIXS.js → chunk-C5LWPYS3.js} +2 -1
- package/dist/{chunk-2EMROIXS.js.map → chunk-C5LWPYS3.js.map} +1 -1
- package/dist/{chunk-KJOGIRMF.js → chunk-CB6ANA2I.js} +2 -2
- package/dist/{chunk-5JMI26Q7.js → chunk-CBH2Z4UA.js} +2 -2
- package/dist/{chunk-YRH3C2OJ.js → chunk-CIIHIAJ2.js} +13 -5
- package/dist/chunk-CIIHIAJ2.js.map +1 -0
- package/dist/{chunk-W4RLOZOG.js → chunk-CJRENHVZ.js} +4 -4
- package/dist/{chunk-LOFVW6JA.js → chunk-CLWBFR7Q.js} +6 -6
- package/dist/{chunk-375ARKRS.js → chunk-D5SSBCYY.js} +70 -59
- package/dist/chunk-D5SSBCYY.js.map +1 -0
- package/dist/{chunk-KI6UOSNR.js → chunk-DEY7B77Y.js} +2 -2
- package/dist/chunk-DEY7B77Y.js.map +1 -0
- package/dist/{chunk-6VAHJ2F6.js → chunk-DMDWFQMR.js} +2 -2
- package/dist/{chunk-MO25AN7J.js → chunk-DPR2WTN3.js} +22 -22
- package/dist/{chunk-JXSYWTFK.js → chunk-DYJHGJZ4.js} +2 -2
- package/dist/{chunk-5X4ZJESN.js → chunk-EH4BQ7LT.js} +3 -3
- package/dist/chunk-EHHQJTAU.js +131 -0
- package/dist/chunk-EHHQJTAU.js.map +1 -0
- package/dist/{chunk-JXWTPOMJ.js → chunk-EPJDSQHF.js} +2 -2
- package/dist/{chunk-OEIA4IHU.js → chunk-ESG6ITGP.js} +2 -2
- package/dist/{chunk-7XI2UJHL.js → chunk-ETZUIRCI.js} +4 -4
- package/dist/{chunk-PPIASWWR.js → chunk-EU534WGS.js} +2 -2
- package/dist/{chunk-XLIK2VDE.js → chunk-EU6IRUCY.js} +7 -5
- package/dist/{chunk-XLIK2VDE.js.map → chunk-EU6IRUCY.js.map} +1 -1
- package/dist/{chunk-J7MDPTX7.js → chunk-EUAIYYYR.js} +190 -44
- package/dist/chunk-EUAIYYYR.js.map +1 -0
- package/dist/{chunk-E6KXJSMA.js → chunk-EUCYTCFP.js} +3 -3
- package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
- package/dist/{chunk-6OAXWYE3.js → chunk-FFOVKNQV.js} +2 -2
- package/dist/{chunk-2KRNPFPK.js → chunk-FLI6DEIU.js} +2 -2
- package/dist/{chunk-4G4B3Z2B.js → chunk-FP4JYE66.js} +2 -2
- package/dist/{chunk-PDVWGGX4.js → chunk-FSIMZNBC.js} +2 -2
- package/dist/{chunk-OAIWPB2I.js → chunk-FT4UQYOV.js} +2 -2
- package/dist/{chunk-D5UPBXZM.js → chunk-FUFAXVBA.js} +4 -4
- package/dist/{chunk-GKOML66M.js → chunk-G2OYFTUD.js} +5 -5
- package/dist/{chunk-XTN54NML.js → chunk-G3T6YMBO.js} +4 -4
- package/dist/{chunk-KWVI52ER.js → chunk-GELS5Z5Z.js} +4 -4
- package/dist/{chunk-J6FFBORM.js → chunk-GH7AOMJD.js} +2 -2
- package/dist/{chunk-TCYLCPC6.js → chunk-GKJJNO7C.js} +3 -3
- package/dist/{chunk-N75Q5ZSP.js → chunk-GMXWTJNU.js} +2 -2
- package/dist/{chunk-B657ZGDH.js → chunk-HQSK2INQ.js} +2 -2
- package/dist/{chunk-SQA2MM2F.js → chunk-I7S55EOB.js} +2 -2
- package/dist/{chunk-CAUNCRLQ.js → chunk-J7JWFZHI.js} +108 -108
- package/dist/{chunk-NQMG2W5L.js → chunk-JDZFIR2S.js} +2 -2
- package/dist/{chunk-O52WWLKU.js → chunk-JIHMUOOS.js} +5 -5
- package/dist/{chunk-YYO447A7.js → chunk-JNIVZNIB.js} +41 -253
- package/dist/chunk-JNIVZNIB.js.map +1 -0
- package/dist/{chunk-VUQDJ3JB.js → chunk-JPTPS4OB.js} +6 -6
- package/dist/{chunk-WXFKXCOQ.js → chunk-JQ7XU625.js} +10 -10
- package/dist/{chunk-3I3U6FFT.js → chunk-K7BN34IA.js} +2 -2
- package/dist/{chunk-7OAIOE5P.js → chunk-KH2LKDX7.js} +2 -2
- package/dist/{chunk-VDXTXVFZ.js → chunk-KR6ZKECI.js} +5 -5
- package/dist/{chunk-MK552I5J.js → chunk-L5DAHSEZ.js} +4 -4
- package/dist/{chunk-XQIHFXYP.js → chunk-LCKVXX5F.js} +2 -2
- package/dist/{chunk-ZI7LMSNI.js → chunk-LLHZZOIB.js} +2 -2
- package/dist/{chunk-E57LYSHI.js → chunk-LZACDIM2.js} +2 -2
- package/dist/{chunk-QAIKLICT.js → chunk-M7KGIW5F.js} +2 -2
- package/dist/{chunk-55ZVZBX4.js → chunk-MATDGSJ7.js} +4 -4
- package/dist/{chunk-3NFN4Y4P.js → chunk-MGCKZWAE.js} +5 -5
- package/dist/{chunk-YS7SA4HD.js → chunk-ML7ZJAKJ.js} +4 -4
- package/dist/{chunk-YDH2FSDI.js → chunk-N45NEBOD.js} +2 -2
- package/dist/{chunk-7UX44C4N.js → chunk-N4C7QKOG.js} +3 -3
- package/dist/{chunk-YYNHJF3N.js → chunk-N7KYEVLK.js} +2 -2
- package/dist/{chunk-HT2C4EXO.js → chunk-NIRQGDYC.js} +4 -4
- package/dist/{chunk-DXHVD4DS.js → chunk-NW2E4CI2.js} +3 -3
- package/dist/{chunk-BFIZXFUG.js → chunk-NWIT3U2N.js} +2 -2
- package/dist/{chunk-4NDWE44P.js → chunk-NZFFGO5O.js} +2 -2
- package/dist/{chunk-MB5EJ2CT.js → chunk-O2IPAX26.js} +10 -10
- package/dist/{chunk-UOA2VQ7C.js → chunk-O4SGYW7H.js} +2 -2
- package/dist/{chunk-SSAXGPXY.js → chunk-OP6N4H6A.js} +2 -2
- package/dist/{chunk-ZSJGYC3C.js → chunk-OQJKY3Z5.js} +2 -2
- package/dist/{chunk-OFEHITAZ.js → chunk-OXNTOHL6.js} +2 -2
- package/dist/{chunk-CDWFWOSZ.js → chunk-P4JED3ZL.js} +2 -2
- package/dist/{chunk-FQD2KPQH.js → chunk-P55FACBG.js} +2 -2
- package/dist/{chunk-KX36OCGK.js → chunk-P5NQN4JE.js} +3 -3
- package/dist/{chunk-3ZCRHW7U.js → chunk-P7TOIOT7.js} +2 -2
- package/dist/{chunk-BD5QEP3T.js → chunk-PAZ35RJ4.js} +45 -32
- package/dist/chunk-PAZ35RJ4.js.map +1 -0
- package/dist/chunk-PGRZ3FYC.js +34 -0
- package/dist/chunk-PGRZ3FYC.js.map +1 -0
- package/dist/{chunk-PBVNVKYN.js → chunk-PIN5OPBA.js} +2 -2
- package/dist/{chunk-O6YDGTH4.js → chunk-PZHQWFR3.js} +3 -3
- package/dist/{chunk-SVDU4OHO.js → chunk-Q35L7TYB.js} +2 -2
- package/dist/{chunk-SOJ3IQD3.js → chunk-QODKDRSP.js} +6 -6
- package/dist/{chunk-VJGDQA3D.js → chunk-QOZJCSFO.js} +3 -3
- package/dist/{chunk-6T42L5FI.js → chunk-QS3OLP5I.js} +2 -2
- package/dist/{chunk-PAAJWQH5.js → chunk-QUMKDRCF.js} +2 -2
- package/dist/{chunk-4TP3MJ3D.js → chunk-QX6JN3O4.js} +7 -7
- package/dist/{chunk-KZEMFD6E.js → chunk-R2H4ZFBJ.js} +3 -3
- package/dist/{chunk-N6UMXWBA.js → chunk-RTKV5XHL.js} +4 -4
- package/dist/{chunk-ZQ3WU6JO.js → chunk-RXFCU3CY.js} +2 -2
- package/dist/{chunk-BOOFTFFE.js → chunk-S2I7DL5Q.js} +1 -1
- package/dist/{chunk-2NCBDGND.js → chunk-SA6GMZJY.js} +3 -3
- package/dist/{chunk-2AFHZTPI.js → chunk-SIIRTDJ4.js} +3 -3
- package/dist/{chunk-WH4QXVKU.js → chunk-SS3IS2JR.js} +3 -3
- package/dist/{chunk-VFTK5WKI.js → chunk-STBX5X6B.js} +2 -2
- package/dist/{chunk-WVHRNAXL.js → chunk-SWWHIJUJ.js} +2 -2
- package/dist/{chunk-WADSXS4K.js → chunk-SX4QDWXK.js} +2 -2
- package/dist/{chunk-2U4BM3TW.js → chunk-TITG2NBS.js} +2 -2
- package/dist/{chunk-A5ZYP4K5.js → chunk-TNRCDMQT.js} +2 -2
- package/dist/{chunk-LZKOVXMX.js → chunk-TRMJ6BYC.js} +2 -2
- package/dist/{chunk-VA2HNBGQ.js → chunk-TZNDKTX5.js} +69 -69
- package/dist/{chunk-OFDIGTC2.js → chunk-UMTCNEVQ.js} +17 -17
- package/dist/{chunk-L3G5CGL5.js → chunk-UQDG3YLN.js} +68 -24
- package/dist/chunk-UQDG3YLN.js.map +1 -0
- package/dist/{chunk-AAM66QCP.js → chunk-UZRSI6NX.js} +2 -2
- package/dist/{chunk-2CXQZXWM.js → chunk-V4MB5ONM.js} +6 -6
- package/dist/{chunk-5BUCKFRE.js → chunk-VOKHZRHW.js} +2 -2
- package/dist/{chunk-CYEK6Z3P.js → chunk-VW6VIJOS.js} +2 -2
- package/dist/{chunk-I2M4ZVDD.js → chunk-W47S5TIH.js} +9 -9
- package/dist/{chunk-CBP4HWCL.js → chunk-W5MCEVUS.js} +3 -3
- package/dist/{chunk-E5H4TM4Y.js → chunk-WC3V7HHP.js} +3 -3
- package/dist/{chunk-WCTL3PVM.js → chunk-WLMZ2L5P.js} +2 -2
- package/dist/{chunk-SQ2O52SU.js → chunk-WSGPFRBH.js} +10 -10
- package/dist/{chunk-BH44JOLA.js → chunk-WVADKFWV.js} +3 -3
- package/dist/{chunk-JVNEXW6X.js → chunk-XISROV24.js} +2 -2
- package/dist/{chunk-FZVROZKC.js → chunk-XVZA6VXC.js} +4 -4
- package/dist/{chunk-56GJLXBA.js → chunk-Y4NKEXQT.js} +4 -4
- package/dist/{chunk-EKKAHJ4B.js → chunk-YE36AJL7.js} +4 -4
- package/dist/chunk-YET735EZ.js +99 -0
- package/dist/chunk-YET735EZ.js.map +1 -0
- package/dist/{chunk-OGWEWJRH.js → chunk-YFMBHQRG.js} +2 -2
- package/dist/{chunk-JLIGUFPF.js → chunk-YN2DQ2D6.js} +2 -2
- package/dist/{chunk-RBJQYMMT.js → chunk-YRULQW5J.js} +4 -4
- package/dist/{chunk-UCJINCZT.js → chunk-YUZRI3QU.js} +2 -2
- package/dist/{chunk-QUNDYIYZ.js → chunk-YYEOR4XN.js} +3 -3
- package/dist/{chunk-O5MW6CQL.js → chunk-ZJVMUBYF.js} +2 -2
- package/dist/{chunk-VBJD4RSJ.js → chunk-ZSH2NRDV.js} +2 -2
- package/dist/{chunk-BX4WDBTE.js → chunk-ZV65I6ME.js} +78 -78
- package/dist/cli.js +150 -148
- package/dist/coding/export-okf-codegraph.js +31 -29
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.d.ts +15 -11
- package/dist/compounding/engine.d.ts.map +1 -1
- package/dist/compounding/engine.js +34 -32
- package/dist/compounding/iso-week.d.ts +2 -0
- package/dist/compounding/iso-week.d.ts.map +1 -1
- package/dist/compounding/weekly-scheduler.d.ts +81 -0
- package/dist/compounding/weekly-scheduler.d.ts.map +1 -0
- package/dist/compounding/weekly-synthesis-queue.d.ts +9 -0
- package/dist/compounding/weekly-synthesis-queue.d.ts.map +1 -0
- package/dist/config.js +42 -40
- package/dist/connectors/codex-materialize-runner.js +31 -29
- package/dist/connectors/index.js +32 -30
- package/dist/console/trace.d.ts +5 -14
- package/dist/console/trace.d.ts.map +1 -1
- package/dist/consolidation-provenance-check.js +7 -6
- package/dist/consolidation-undo.js +5 -4
- package/dist/consolidation-undo.js.map +1 -1
- package/dist/contradiction/index.js +9 -8
- package/dist/{contradiction-scan-GGRTVB7C.js → contradiction-scan-P7KXB5R4.js} +3 -3
- package/dist/converge-config.d.ts +2 -0
- package/dist/converge-config.d.ts.map +1 -1
- package/dist/converge-config.js +7 -3
- package/dist/convergence-refresh.js +33 -31
- package/dist/corpus-watermark.js +33 -31
- package/dist/dashboard-runtime.js +2 -2
- package/dist/day-summary.js +2 -2
- package/dist/deep-recall-http-glue.js +13 -13
- package/dist/deep-recall.js +2 -2
- package/dist/embedding-fallback.js +6 -5
- package/dist/embedding-generation-lock.js +4 -3
- package/dist/entity-retrieval.js +32 -30
- package/dist/explicit-capture.js +12 -9
- package/dist/external-wiki-access.js +98 -96
- package/dist/extraction-judge.js +3 -3
- package/dist/extraction-normalization.js +3 -3
- package/dist/extraction-prompt.js +2 -2
- package/dist/extraction-quote-grounding.d.ts +67 -0
- package/dist/extraction-quote-grounding.d.ts.map +1 -0
- package/dist/extraction-quote-grounding.js +27 -0
- package/dist/extraction-quote-grounding.js.map +1 -0
- package/dist/extraction-source-grounding-helpers.d.ts +8 -0
- package/dist/extraction-source-grounding-helpers.d.ts.map +1 -1
- package/dist/extraction-source-grounding-helpers.js +11 -1
- package/dist/extraction-source-grounding-rules.d.ts +3 -1
- package/dist/extraction-source-grounding-rules.d.ts.map +1 -1
- package/dist/extraction-source-grounding-rules.js +3 -2
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts.map +1 -1
- package/dist/extraction-source-grounding.js +4 -3
- package/dist/extraction-span-materialize.js +2 -2
- package/dist/extraction.js +50 -47
- package/dist/{first-start-migration-OM3PHMZO.js → first-start-migration-6A5BJPDW.js} +5 -5
- package/dist/{forget-OHAJ6PSU.js → forget-GXBWFKRC.js} +5 -4
- package/dist/{forget-OHAJ6PSU.js.map → forget-GXBWFKRC.js.map} +1 -1
- package/dist/{graph-edge-decay-CZ3SYLM4.js → graph-edge-decay-BYPZVJT4.js} +10 -9
- package/dist/graph-edge-decay-BYPZVJT4.js.map +1 -0
- package/dist/graph-jsonl.js +8 -7
- package/dist/graph-snapshot.js +8 -7
- package/dist/graph-write-lock.js +4 -3
- package/dist/graph.js +9 -8
- package/dist/harmonic-retrieval.js +31 -29
- package/dist/http-retry.js +2 -1
- package/dist/http-retry.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +241 -236
- package/dist/lcm/engine.js +4 -4
- package/dist/lcm/index.js +12 -12
- package/dist/local-llm.js +2 -2
- package/dist/location/index.js +34 -32
- package/dist/maintenance/memory-governance.js +31 -29
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +31 -29
- package/dist/maintenance/rebuild-memory-projection-runner.js +33 -31
- package/dist/maintenance/rebuild-memory-projection.js +32 -30
- package/dist/memory-browse-operations.js +98 -96
- package/dist/memory-browse.js +7 -7
- package/dist/memory-subject.js +5 -4
- package/dist/namespaces/migrate.js +32 -30
- package/dist/namespaces/principal.js +2 -2
- package/dist/namespaces/search.js +10 -10
- package/dist/namespaces/storage.js +31 -29
- package/dist/offline-sync-changeset-generations.js +7 -6
- package/dist/offline-sync-embedding-generation.js +6 -5
- package/dist/offline-sync-impression-drain.js +8 -8
- package/dist/offline-sync-snapshot-stream.js +9 -9
- package/dist/offline-sync.js +10 -10
- package/dist/operator-doctor-corpus.js +34 -32
- package/dist/operator-toolkit.js +59 -57
- package/dist/orchestration/compression-guideline-coordinator.js +2 -2
- package/dist/orchestration/maintenance.d.ts +2 -0
- package/dist/orchestration/maintenance.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +49 -43
- package/dist/orchestrator.js +203 -200
- package/dist/page-versioning.js +5 -4
- package/dist/qmd-daemon-session.js +2 -2
- package/dist/qmd.js +4 -4
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation-operations.js +98 -96
- package/dist/recall-navigation.js +97 -95
- package/dist/recall-state-view-admission.js +7 -7
- package/dist/recall-state.js +4 -3
- package/dist/recall-why-service.js +11 -11
- package/dist/recall-why.js +3 -3
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.js +4 -2
- package/dist/reconcile/cursor.js.map +1 -1
- package/dist/reconcile/manifest.js +9 -6
- package/dist/reconcile/plan.js +4 -2
- package/dist/rerank-outcome.js +2 -2
- package/dist/{resolution-E4GLHLY6.js → resolution-7AY36LGJ.js} +10 -9
- package/dist/resolution-7AY36LGJ.js.map +1 -0
- package/dist/resume-bundles.js +43 -41
- package/dist/salvage-envelope.js +7 -6
- package/dist/search/embed-helper.js +2 -2
- package/dist/search/factory.js +9 -9
- package/dist/search/index.js +15 -15
- package/dist/semantic-consolidation.js +36 -34
- package/dist/semantic-rule-promotion.js +31 -29
- package/dist/semantic-rule-verifier.js +31 -29
- package/dist/shared-context/manager.js +2 -2
- package/dist/source-agent-qualifier.js +43 -40
- package/dist/standup/build.js +31 -29
- package/dist/storage/content-hash-index.d.ts +10 -0
- package/dist/storage/content-hash-index.d.ts.map +1 -1
- package/dist/storage/tombstone-blocked-capture-index.d.ts +3 -0
- package/dist/storage/tombstone-blocked-capture-index.d.ts.map +1 -1
- package/dist/storage/tombstone-blocked-capture-mutation.d.ts +23 -3
- package/dist/storage/tombstone-blocked-capture-mutation.d.ts.map +1 -1
- package/dist/storage.d.ts +6 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +32 -30
- package/dist/subject-config.js +6 -5
- package/dist/summarizer.js +6 -6
- package/dist/summary-snapshot.js +4 -3
- package/dist/support-passport/index.js +100 -98
- package/dist/{tier-stats-M2FMMD2N.js → tier-stats-RQM76XYY.js} +2 -2
- package/dist/{trace-LXXCMZJA.js → trace-QBQVS5BC.js} +5 -21
- package/dist/trace-QBQVS5BC.js.map +1 -0
- package/dist/transfer/autodetect.js +1 -1
- package/dist/transfer/backup.js +1 -1
- package/dist/transfer/capsule-export.js +3 -3
- package/dist/transfer/capsule-import.js +7 -6
- package/dist/transfer/export-okf.js +31 -29
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/utils/serialize-mutations.js +3 -2
- package/dist/utils/sleep.d.ts +6 -0
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/verified-recall.js +31 -29
- package/dist/who-knows-cli.js +32 -30
- package/dist/who-knows.js +31 -29
- package/dist/write-envelope.js +6 -5
- package/package.json +22 -2
- package/src/calibration.test.ts +80 -1
- package/src/calibration.ts +77 -8
- package/src/capabilities.test.ts +1 -0
- package/src/capabilities.ts +4 -4
- package/src/capture-write-lock-backoff.test.ts +534 -0
- package/src/capture-write-lock-backoff.ts +140 -0
- package/src/capture-write-lock.ts +8 -0
- package/src/compounding/engine.ts +32 -31
- package/src/compounding/iso-week.ts +16 -0
- package/src/compounding/weekly-scheduler.test.ts +426 -0
- package/src/compounding/weekly-scheduler.ts +231 -0
- package/src/compounding/weekly-synthesis-queue.ts +23 -0
- package/src/console/trace.ts +5 -36
- package/src/converge-config.ts +80 -1
- package/src/extraction-quote-grounding.test.ts +546 -0
- package/src/extraction-quote-grounding.ts +232 -0
- package/src/extraction-source-grounding-helpers.ts +35 -0
- package/src/extraction-source-grounding-rules.ts +90 -65
- package/src/extraction-source-grounding.ts +11 -2
- package/src/index.ts +1 -1
- package/src/orchestration/maintenance.ts +6 -2
- package/src/providers/codex-subscription.test.ts +15 -3
- package/src/storage/content-hash-index.ts +10 -0
- package/src/storage/tombstone-blocked-capture-index.ts +8 -1
- package/src/storage/tombstone-blocked-capture-mutation.ts +133 -43
- package/src/storage.ts +13 -0
- package/src/types.ts +9 -0
- package/src/utils/sleep.ts +28 -0
- package/dist/chunk-375ARKRS.js.map +0 -1
- package/dist/chunk-6MINUTGJ.js +0 -64
- package/dist/chunk-6MINUTGJ.js.map +0 -1
- package/dist/chunk-7LEQREP2.js +0 -9
- package/dist/chunk-7LEQREP2.js.map +0 -1
- package/dist/chunk-BD5QEP3T.js.map +0 -1
- package/dist/chunk-J7MDPTX7.js.map +0 -1
- package/dist/chunk-KI6UOSNR.js.map +0 -1
- package/dist/chunk-L3G5CGL5.js.map +0 -1
- package/dist/chunk-QWWMS4AE.js.map +0 -1
- package/dist/chunk-YRH3C2OJ.js.map +0 -1
- package/dist/chunk-YYO447A7.js.map +0 -1
- package/dist/trace-LXXCMZJA.js.map +0 -1
- /package/dist/{auto-sync-WSJAOLOP.js.map → auto-sync-7WWAKW6F.js.map} +0 -0
- /package/dist/{contradiction-scan-GGRTVB7C.js.map → capture-write-lock-backoff.js.map} +0 -0
- /package/dist/{graph-edge-decay-CZ3SYLM4.js.map → capture-write-lock.js.map} +0 -0
- /package/dist/{chunk-RNPJ4GQA.js.map → chunk-22W2XWGH.js.map} +0 -0
- /package/dist/{chunk-AV2OQF2O.js.map → chunk-3F3HA3R2.js.map} +0 -0
- /package/dist/{chunk-QZZPUREO.js.map → chunk-3GYSZHMT.js.map} +0 -0
- /package/dist/{chunk-XYOT5GQU.js.map → chunk-3NF4QUNZ.js.map} +0 -0
- /package/dist/{chunk-AL6EHLB5.js.map → chunk-3X3PNU3T.js.map} +0 -0
- /package/dist/{chunk-BTJ6CAIA.js.map → chunk-4IYIGN53.js.map} +0 -0
- /package/dist/{chunk-OM3RWZQK.js.map → chunk-4KY5GSMB.js.map} +0 -0
- /package/dist/{chunk-4N2MFNTG.js.map → chunk-4OSG5Y6M.js.map} +0 -0
- /package/dist/{chunk-EEDI3OXB.js.map → chunk-4Q26RNSR.js.map} +0 -0
- /package/dist/{chunk-EHRE7ZG3.js.map → chunk-5B5WYAHQ.js.map} +0 -0
- /package/dist/{chunk-WCGJK4NQ.js.map → chunk-5FNZ3G6X.js.map} +0 -0
- /package/dist/{chunk-Y6DZ33PA.js.map → chunk-5GX5457J.js.map} +0 -0
- /package/dist/{chunk-OFCHT2TN.js.map → chunk-5LRV557D.js.map} +0 -0
- /package/dist/{chunk-VAOC6GHN.js.map → chunk-5PHOU5QI.js.map} +0 -0
- /package/dist/{chunk-WL7N5VGG.js.map → chunk-5TJEOU6Y.js.map} +0 -0
- /package/dist/{chunk-A2L3P2IY.js.map → chunk-5WCJLQTM.js.map} +0 -0
- /package/dist/{chunk-MZBWIJJN.js.map → chunk-63B2IZYE.js.map} +0 -0
- /package/dist/{chunk-DGRMWDQY.js.map → chunk-66BCOVW2.js.map} +0 -0
- /package/dist/{chunk-P2S6P7X6.js.map → chunk-6LG7BWKW.js.map} +0 -0
- /package/dist/{chunk-4G2YCKLT.js.map → chunk-7G5NTS7F.js.map} +0 -0
- /package/dist/{chunk-IPLYGWQF.js.map → chunk-7LCGFUMB.js.map} +0 -0
- /package/dist/{chunk-KYY4EACB.js.map → chunk-7Z3DLNSD.js.map} +0 -0
- /package/dist/{chunk-7SUWY37K.js.map → chunk-B665A6BO.js.map} +0 -0
- /package/dist/{chunk-AEGNDL24.js.map → chunk-BVRZSI7Q.js.map} +0 -0
- /package/dist/{chunk-KJOGIRMF.js.map → chunk-CB6ANA2I.js.map} +0 -0
- /package/dist/{chunk-5JMI26Q7.js.map → chunk-CBH2Z4UA.js.map} +0 -0
- /package/dist/{chunk-W4RLOZOG.js.map → chunk-CJRENHVZ.js.map} +0 -0
- /package/dist/{chunk-LOFVW6JA.js.map → chunk-CLWBFR7Q.js.map} +0 -0
- /package/dist/{chunk-6VAHJ2F6.js.map → chunk-DMDWFQMR.js.map} +0 -0
- /package/dist/{chunk-MO25AN7J.js.map → chunk-DPR2WTN3.js.map} +0 -0
- /package/dist/{chunk-JXSYWTFK.js.map → chunk-DYJHGJZ4.js.map} +0 -0
- /package/dist/{chunk-5X4ZJESN.js.map → chunk-EH4BQ7LT.js.map} +0 -0
- /package/dist/{chunk-JXWTPOMJ.js.map → chunk-EPJDSQHF.js.map} +0 -0
- /package/dist/{chunk-OEIA4IHU.js.map → chunk-ESG6ITGP.js.map} +0 -0
- /package/dist/{chunk-7XI2UJHL.js.map → chunk-ETZUIRCI.js.map} +0 -0
- /package/dist/{chunk-PPIASWWR.js.map → chunk-EU534WGS.js.map} +0 -0
- /package/dist/{chunk-E6KXJSMA.js.map → chunk-EUCYTCFP.js.map} +0 -0
- /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
- /package/dist/{chunk-6OAXWYE3.js.map → chunk-FFOVKNQV.js.map} +0 -0
- /package/dist/{chunk-2KRNPFPK.js.map → chunk-FLI6DEIU.js.map} +0 -0
- /package/dist/{chunk-4G4B3Z2B.js.map → chunk-FP4JYE66.js.map} +0 -0
- /package/dist/{chunk-PDVWGGX4.js.map → chunk-FSIMZNBC.js.map} +0 -0
- /package/dist/{chunk-OAIWPB2I.js.map → chunk-FT4UQYOV.js.map} +0 -0
- /package/dist/{chunk-D5UPBXZM.js.map → chunk-FUFAXVBA.js.map} +0 -0
- /package/dist/{chunk-GKOML66M.js.map → chunk-G2OYFTUD.js.map} +0 -0
- /package/dist/{chunk-XTN54NML.js.map → chunk-G3T6YMBO.js.map} +0 -0
- /package/dist/{chunk-KWVI52ER.js.map → chunk-GELS5Z5Z.js.map} +0 -0
- /package/dist/{chunk-J6FFBORM.js.map → chunk-GH7AOMJD.js.map} +0 -0
- /package/dist/{chunk-TCYLCPC6.js.map → chunk-GKJJNO7C.js.map} +0 -0
- /package/dist/{chunk-N75Q5ZSP.js.map → chunk-GMXWTJNU.js.map} +0 -0
- /package/dist/{chunk-B657ZGDH.js.map → chunk-HQSK2INQ.js.map} +0 -0
- /package/dist/{chunk-SQA2MM2F.js.map → chunk-I7S55EOB.js.map} +0 -0
- /package/dist/{chunk-CAUNCRLQ.js.map → chunk-J7JWFZHI.js.map} +0 -0
- /package/dist/{chunk-NQMG2W5L.js.map → chunk-JDZFIR2S.js.map} +0 -0
- /package/dist/{chunk-O52WWLKU.js.map → chunk-JIHMUOOS.js.map} +0 -0
- /package/dist/{chunk-VUQDJ3JB.js.map → chunk-JPTPS4OB.js.map} +0 -0
- /package/dist/{chunk-WXFKXCOQ.js.map → chunk-JQ7XU625.js.map} +0 -0
- /package/dist/{chunk-3I3U6FFT.js.map → chunk-K7BN34IA.js.map} +0 -0
- /package/dist/{chunk-7OAIOE5P.js.map → chunk-KH2LKDX7.js.map} +0 -0
- /package/dist/{chunk-VDXTXVFZ.js.map → chunk-KR6ZKECI.js.map} +0 -0
- /package/dist/{chunk-MK552I5J.js.map → chunk-L5DAHSEZ.js.map} +0 -0
- /package/dist/{chunk-XQIHFXYP.js.map → chunk-LCKVXX5F.js.map} +0 -0
- /package/dist/{chunk-ZI7LMSNI.js.map → chunk-LLHZZOIB.js.map} +0 -0
- /package/dist/{chunk-E57LYSHI.js.map → chunk-LZACDIM2.js.map} +0 -0
- /package/dist/{chunk-QAIKLICT.js.map → chunk-M7KGIW5F.js.map} +0 -0
- /package/dist/{chunk-55ZVZBX4.js.map → chunk-MATDGSJ7.js.map} +0 -0
- /package/dist/{chunk-3NFN4Y4P.js.map → chunk-MGCKZWAE.js.map} +0 -0
- /package/dist/{chunk-YS7SA4HD.js.map → chunk-ML7ZJAKJ.js.map} +0 -0
- /package/dist/{chunk-YDH2FSDI.js.map → chunk-N45NEBOD.js.map} +0 -0
- /package/dist/{chunk-7UX44C4N.js.map → chunk-N4C7QKOG.js.map} +0 -0
- /package/dist/{chunk-YYNHJF3N.js.map → chunk-N7KYEVLK.js.map} +0 -0
- /package/dist/{chunk-HT2C4EXO.js.map → chunk-NIRQGDYC.js.map} +0 -0
- /package/dist/{chunk-DXHVD4DS.js.map → chunk-NW2E4CI2.js.map} +0 -0
- /package/dist/{chunk-BFIZXFUG.js.map → chunk-NWIT3U2N.js.map} +0 -0
- /package/dist/{chunk-4NDWE44P.js.map → chunk-NZFFGO5O.js.map} +0 -0
- /package/dist/{chunk-MB5EJ2CT.js.map → chunk-O2IPAX26.js.map} +0 -0
- /package/dist/{chunk-UOA2VQ7C.js.map → chunk-O4SGYW7H.js.map} +0 -0
- /package/dist/{chunk-SSAXGPXY.js.map → chunk-OP6N4H6A.js.map} +0 -0
- /package/dist/{chunk-ZSJGYC3C.js.map → chunk-OQJKY3Z5.js.map} +0 -0
- /package/dist/{chunk-OFEHITAZ.js.map → chunk-OXNTOHL6.js.map} +0 -0
- /package/dist/{chunk-CDWFWOSZ.js.map → chunk-P4JED3ZL.js.map} +0 -0
- /package/dist/{chunk-FQD2KPQH.js.map → chunk-P55FACBG.js.map} +0 -0
- /package/dist/{chunk-KX36OCGK.js.map → chunk-P5NQN4JE.js.map} +0 -0
- /package/dist/{chunk-3ZCRHW7U.js.map → chunk-P7TOIOT7.js.map} +0 -0
- /package/dist/{chunk-PBVNVKYN.js.map → chunk-PIN5OPBA.js.map} +0 -0
- /package/dist/{chunk-O6YDGTH4.js.map → chunk-PZHQWFR3.js.map} +0 -0
- /package/dist/{chunk-SVDU4OHO.js.map → chunk-Q35L7TYB.js.map} +0 -0
- /package/dist/{chunk-SOJ3IQD3.js.map → chunk-QODKDRSP.js.map} +0 -0
- /package/dist/{chunk-VJGDQA3D.js.map → chunk-QOZJCSFO.js.map} +0 -0
- /package/dist/{chunk-6T42L5FI.js.map → chunk-QS3OLP5I.js.map} +0 -0
- /package/dist/{chunk-PAAJWQH5.js.map → chunk-QUMKDRCF.js.map} +0 -0
- /package/dist/{chunk-4TP3MJ3D.js.map → chunk-QX6JN3O4.js.map} +0 -0
- /package/dist/{chunk-KZEMFD6E.js.map → chunk-R2H4ZFBJ.js.map} +0 -0
- /package/dist/{chunk-N6UMXWBA.js.map → chunk-RTKV5XHL.js.map} +0 -0
- /package/dist/{chunk-ZQ3WU6JO.js.map → chunk-RXFCU3CY.js.map} +0 -0
- /package/dist/{chunk-BOOFTFFE.js.map → chunk-S2I7DL5Q.js.map} +0 -0
- /package/dist/{chunk-2NCBDGND.js.map → chunk-SA6GMZJY.js.map} +0 -0
- /package/dist/{chunk-2AFHZTPI.js.map → chunk-SIIRTDJ4.js.map} +0 -0
- /package/dist/{chunk-WH4QXVKU.js.map → chunk-SS3IS2JR.js.map} +0 -0
- /package/dist/{chunk-VFTK5WKI.js.map → chunk-STBX5X6B.js.map} +0 -0
- /package/dist/{chunk-WVHRNAXL.js.map → chunk-SWWHIJUJ.js.map} +0 -0
- /package/dist/{chunk-WADSXS4K.js.map → chunk-SX4QDWXK.js.map} +0 -0
- /package/dist/{chunk-2U4BM3TW.js.map → chunk-TITG2NBS.js.map} +0 -0
- /package/dist/{chunk-A5ZYP4K5.js.map → chunk-TNRCDMQT.js.map} +0 -0
- /package/dist/{chunk-LZKOVXMX.js.map → chunk-TRMJ6BYC.js.map} +0 -0
- /package/dist/{chunk-VA2HNBGQ.js.map → chunk-TZNDKTX5.js.map} +0 -0
- /package/dist/{chunk-OFDIGTC2.js.map → chunk-UMTCNEVQ.js.map} +0 -0
- /package/dist/{chunk-AAM66QCP.js.map → chunk-UZRSI6NX.js.map} +0 -0
- /package/dist/{chunk-2CXQZXWM.js.map → chunk-V4MB5ONM.js.map} +0 -0
- /package/dist/{chunk-5BUCKFRE.js.map → chunk-VOKHZRHW.js.map} +0 -0
- /package/dist/{chunk-CYEK6Z3P.js.map → chunk-VW6VIJOS.js.map} +0 -0
- /package/dist/{chunk-I2M4ZVDD.js.map → chunk-W47S5TIH.js.map} +0 -0
- /package/dist/{chunk-CBP4HWCL.js.map → chunk-W5MCEVUS.js.map} +0 -0
- /package/dist/{chunk-E5H4TM4Y.js.map → chunk-WC3V7HHP.js.map} +0 -0
- /package/dist/{chunk-WCTL3PVM.js.map → chunk-WLMZ2L5P.js.map} +0 -0
- /package/dist/{chunk-SQ2O52SU.js.map → chunk-WSGPFRBH.js.map} +0 -0
- /package/dist/{chunk-BH44JOLA.js.map → chunk-WVADKFWV.js.map} +0 -0
- /package/dist/{chunk-JVNEXW6X.js.map → chunk-XISROV24.js.map} +0 -0
- /package/dist/{chunk-FZVROZKC.js.map → chunk-XVZA6VXC.js.map} +0 -0
- /package/dist/{chunk-56GJLXBA.js.map → chunk-Y4NKEXQT.js.map} +0 -0
- /package/dist/{chunk-EKKAHJ4B.js.map → chunk-YE36AJL7.js.map} +0 -0
- /package/dist/{chunk-OGWEWJRH.js.map → chunk-YFMBHQRG.js.map} +0 -0
- /package/dist/{chunk-JLIGUFPF.js.map → chunk-YN2DQ2D6.js.map} +0 -0
- /package/dist/{chunk-RBJQYMMT.js.map → chunk-YRULQW5J.js.map} +0 -0
- /package/dist/{chunk-UCJINCZT.js.map → chunk-YUZRI3QU.js.map} +0 -0
- /package/dist/{chunk-QUNDYIYZ.js.map → chunk-YYEOR4XN.js.map} +0 -0
- /package/dist/{chunk-O5MW6CQL.js.map → chunk-ZJVMUBYF.js.map} +0 -0
- /package/dist/{chunk-VBJD4RSJ.js.map → chunk-ZSH2NRDV.js.map} +0 -0
- /package/dist/{chunk-BX4WDBTE.js.map → chunk-ZV65I6ME.js.map} +0 -0
- /package/dist/{resolution-E4GLHLY6.js.map → contradiction-scan-P7KXB5R4.js.map} +0 -0
- /package/dist/{first-start-migration-OM3PHMZO.js.map → first-start-migration-6A5BJPDW.js.map} +0 -0
- /package/dist/{tier-stats-M2FMMD2N.js.map → tier-stats-RQM76XYY.js.map} +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-process weekly compounding run for the standalone daemon.
|
|
3
|
+
*
|
|
4
|
+
* OpenClaw delegate mode registers only memory_search and memory_get, so a
|
|
5
|
+
* gateway cron can no longer call `compounding_weekly_synthesize`. When both
|
|
6
|
+
* compounding flags are on, the standalone daemon arms this runner after
|
|
7
|
+
* its HTTP listener is up. Embedded OpenClaw init does not.
|
|
8
|
+
*
|
|
9
|
+
* Each tick synthesizes the ISO week that most recently ended (previous week,
|
|
10
|
+
* not the in-progress one) by calling `synthesizeWeekly`, which includes
|
|
11
|
+
* calibration when that gate is on. A scheduler-owned completion marker is
|
|
12
|
+
* the durable skip signal: only a scheduled run writes it, so a manual
|
|
13
|
+
* access-surface synthesis of the in-progress week cannot suppress the week's
|
|
14
|
+
* scheduled run, and a restart does not write a completed week twice. A
|
|
15
|
+
* daemon that was down at the Monday boundary still writes that missed week
|
|
16
|
+
* on the next start. Older gaps are left alone — one missed week, not a
|
|
17
|
+
* history backfill.
|
|
18
|
+
*
|
|
19
|
+
* The timer is unref'd. Startup fires one tick immediately; later ticks land
|
|
20
|
+
* on the next Monday 00:00 UTC. A failed tick remembers that week and retries
|
|
21
|
+
* it before the newly due week, including after the boundary. That memory is
|
|
22
|
+
* process-local: a restart still keys off the completion marker.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { lstat } from "node:fs/promises";
|
|
26
|
+
import path from "node:path";
|
|
27
|
+
|
|
28
|
+
import { resolveConsolidationCapabilities } from "../capabilities.js";
|
|
29
|
+
import { writeFileAtomically } from "../maintenance/atomic-file.js";
|
|
30
|
+
import { log as defaultLog } from "../logger.js";
|
|
31
|
+
import type { StorageManager } from "../storage.js";
|
|
32
|
+
import type { PluginConfig } from "../types.js";
|
|
33
|
+
import { CompoundingEngine } from "./engine.js";
|
|
34
|
+
import { isIsoWeekId, msUntilNextIsoWeek, previousIsoWeekId } from "./iso-week.js";
|
|
35
|
+
|
|
36
|
+
export interface CompoundingWeeklyLog {
|
|
37
|
+
info(message: string): void;
|
|
38
|
+
warn(message: string): void;
|
|
39
|
+
debug(message: string): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type TimerHandle = { unref?: () => void };
|
|
43
|
+
|
|
44
|
+
export interface CompoundingWeeklySchedulerOptions {
|
|
45
|
+
memoryDir: string;
|
|
46
|
+
/** Full `synthesizeWeekly` path, including its calibration pass. */
|
|
47
|
+
synthesizeWeekly: (weekId: string) => Promise<unknown>;
|
|
48
|
+
now?: () => Date;
|
|
49
|
+
/** Scheduler-owned completion check: has a scheduled run finished this week? */
|
|
50
|
+
weekDone?: (weekId: string) => Promise<boolean>;
|
|
51
|
+
/** Record a scheduled run's completion. Manual access-surface runs never do. */
|
|
52
|
+
markWeekDone?: (weekId: string) => Promise<void>;
|
|
53
|
+
setTimer?: (fn: () => void, ms: number) => TimerHandle;
|
|
54
|
+
clearTimer?: (handle: TimerHandle) => void;
|
|
55
|
+
log?: CompoundingWeeklyLog;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type CompoundingWeeklyTick =
|
|
59
|
+
| { status: "synthesized" | "skipped" | "failed"; weekId: string }
|
|
60
|
+
| { status: "stopped" | "coalesced"; weekId: null };
|
|
61
|
+
|
|
62
|
+
export interface CompoundingWeeklySchedulerHandle {
|
|
63
|
+
/** Run one check now (startup catch-up and tests). */
|
|
64
|
+
tick(): Promise<CompoundingWeeklyTick>;
|
|
65
|
+
/** Resolve when no tick is in flight, including a coalesced follow-up. */
|
|
66
|
+
whenIdle(): Promise<void>;
|
|
67
|
+
/** Prevent later ticks and wait for the one already running. */
|
|
68
|
+
stop(): Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function compoundingWeeklyReportPath(memoryDir: string, weekId: string): string {
|
|
72
|
+
if (!isIsoWeekId(weekId)) {
|
|
73
|
+
throw new Error("compounding weekly cron: week id must be YYYY-Www");
|
|
74
|
+
}
|
|
75
|
+
return path.join(memoryDir, "compounding", "weekly", `${weekId}.md`);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Completion marker for scheduled runs only. A manual access-surface run can
|
|
80
|
+
* synthesize the in-progress current week early; its report file must not
|
|
81
|
+
* satisfy the scheduler's due check, or the evidence added after the manual
|
|
82
|
+
* run would never reach that week's scheduled synthesis.
|
|
83
|
+
*/
|
|
84
|
+
export function compoundingWeeklyDoneMarkerPath(memoryDir: string, weekId: string): string {
|
|
85
|
+
if (!isIsoWeekId(weekId)) {
|
|
86
|
+
throw new Error("compounding weekly cron: week id must be YYYY-Www");
|
|
87
|
+
}
|
|
88
|
+
return path.join(memoryDir, "compounding", "weekly", ".scheduler", `${weekId}.done`);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
async function defaultWeekDone(memoryDir: string, weekId: string): Promise<boolean> {
|
|
92
|
+
try {
|
|
93
|
+
await lstat(compoundingWeeklyDoneMarkerPath(memoryDir, weekId));
|
|
94
|
+
return true;
|
|
95
|
+
} catch (error) {
|
|
96
|
+
if (isNotFound(error)) return false;
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async function defaultMarkWeekDone(memoryDir: string, weekId: string): Promise<void> {
|
|
102
|
+
// Atomic: a partially written marker must never satisfy the skip check.
|
|
103
|
+
await writeFileAtomically(compoundingWeeklyDoneMarkerPath(memoryDir, weekId), `${new Date().toISOString()}\n`);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function isNotFound(error: unknown): boolean {
|
|
107
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function startCompoundingWeeklyScheduler(
|
|
111
|
+
options: CompoundingWeeklySchedulerOptions
|
|
112
|
+
): CompoundingWeeklySchedulerHandle {
|
|
113
|
+
const now = options.now ?? (() => new Date());
|
|
114
|
+
const logger = options.log ?? defaultLog;
|
|
115
|
+
const weekDone = options.weekDone ?? ((weekId) => defaultWeekDone(options.memoryDir, weekId));
|
|
116
|
+
const markWeekDone = options.markWeekDone ?? ((weekId) => defaultMarkWeekDone(options.memoryDir, weekId));
|
|
117
|
+
const setTimer =
|
|
118
|
+
options.setTimer ??
|
|
119
|
+
((fn, ms) => {
|
|
120
|
+
const timer = setTimeout(fn, ms);
|
|
121
|
+
timer.unref?.();
|
|
122
|
+
return timer;
|
|
123
|
+
});
|
|
124
|
+
const clearTimer = options.clearTimer ?? ((handle) => clearTimeout(handle as NodeJS.Timeout));
|
|
125
|
+
|
|
126
|
+
let stopped = false;
|
|
127
|
+
let pending = false;
|
|
128
|
+
let inFlight: Promise<CompoundingWeeklyTick> | null = null;
|
|
129
|
+
let timer: TimerHandle | null = null;
|
|
130
|
+
let retryWeekId: string | null = null;
|
|
131
|
+
|
|
132
|
+
const runWeek = async (weekId: string): Promise<CompoundingWeeklyTick> => {
|
|
133
|
+
try {
|
|
134
|
+
if (await weekDone(weekId)) {
|
|
135
|
+
if (retryWeekId === weekId) retryWeekId = null;
|
|
136
|
+
logger.debug(`compounding weekly cron: ${weekId} already synthesized by the scheduler, skipping`);
|
|
137
|
+
return { status: "skipped", weekId };
|
|
138
|
+
}
|
|
139
|
+
await options.synthesizeWeekly(weekId);
|
|
140
|
+
await markWeekDone(weekId);
|
|
141
|
+
logger.info(`compounding weekly cron: synthesized ${weekId}`);
|
|
142
|
+
return { status: "synthesized", weekId };
|
|
143
|
+
} catch (error) {
|
|
144
|
+
retryWeekId = weekId;
|
|
145
|
+
const name = error instanceof Error ? error.name : "Error";
|
|
146
|
+
logger.warn(`compounding weekly cron: ${weekId} failed (${name}) — retrying on the next tick`);
|
|
147
|
+
return { status: "failed", weekId };
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const arm = (): void => {
|
|
152
|
+
if (stopped) return;
|
|
153
|
+
if (timer) clearTimer(timer);
|
|
154
|
+
const delay = msUntilNextIsoWeek(now());
|
|
155
|
+
timer = setTimer(() => {
|
|
156
|
+
timer = null;
|
|
157
|
+
if (stopped) return;
|
|
158
|
+
arm();
|
|
159
|
+
void request();
|
|
160
|
+
}, delay);
|
|
161
|
+
timer.unref?.();
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const doTick = async (): Promise<CompoundingWeeklyTick> => {
|
|
165
|
+
const due = previousIsoWeekId(now());
|
|
166
|
+
const weekId = retryWeekId ?? due;
|
|
167
|
+
const first = await runWeek(weekId);
|
|
168
|
+
if (first.status === "failed" || weekId === due) return first;
|
|
169
|
+
return runWeek(due);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const request = (): Promise<CompoundingWeeklyTick> => {
|
|
173
|
+
if (stopped) return Promise.resolve({ status: "stopped", weekId: null });
|
|
174
|
+
if (inFlight) {
|
|
175
|
+
pending = true;
|
|
176
|
+
return inFlight.then(() => ({ status: "coalesced" as const, weekId: null }));
|
|
177
|
+
}
|
|
178
|
+
const run = doTick().finally(() => {
|
|
179
|
+
inFlight = null;
|
|
180
|
+
if (!stopped && pending) {
|
|
181
|
+
pending = false;
|
|
182
|
+
void request();
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
inFlight = run;
|
|
186
|
+
return run;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
arm();
|
|
190
|
+
void request();
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
tick: () => request(),
|
|
194
|
+
async whenIdle() {
|
|
195
|
+
while (inFlight) await inFlight;
|
|
196
|
+
},
|
|
197
|
+
async stop() {
|
|
198
|
+
stopped = true;
|
|
199
|
+
pending = false;
|
|
200
|
+
if (timer) clearTimer(timer);
|
|
201
|
+
timer = null;
|
|
202
|
+
while (inFlight) await inFlight;
|
|
203
|
+
},
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Arm the daemon weekly run when both compounding flags are on.
|
|
209
|
+
* Returns null when the run stays off or arming fails. The returned handle's
|
|
210
|
+
* first tick is already in flight and includes calibration via synthesizeWeekly.
|
|
211
|
+
*/
|
|
212
|
+
export function createCompoundingWeeklyCron(deps: {
|
|
213
|
+
config: PluginConfig;
|
|
214
|
+
getStorage?: () => StorageManager | undefined;
|
|
215
|
+
}): CompoundingWeeklySchedulerHandle | null {
|
|
216
|
+
const caps = resolveConsolidationCapabilities(deps.config);
|
|
217
|
+
if (!caps.compounding || !caps.compoundingWeeklyCron) return null;
|
|
218
|
+
try {
|
|
219
|
+
const engine = new CompoundingEngine(deps.config, deps.getStorage?.());
|
|
220
|
+
const handle = startCompoundingWeeklyScheduler({
|
|
221
|
+
memoryDir: deps.config.memoryDir,
|
|
222
|
+
synthesizeWeekly: (weekId) => engine.synthesizeWeekly({ weekId }),
|
|
223
|
+
});
|
|
224
|
+
defaultLog.info("compounding weekly cron armed");
|
|
225
|
+
return handle;
|
|
226
|
+
} catch (error) {
|
|
227
|
+
const name = error instanceof Error ? error.name : "Error";
|
|
228
|
+
defaultLog.warn(`compounding weekly cron failed to arm (${name}) — non-fatal`);
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-flight boundary for weekly synthesis, keyed by memory directory.
|
|
3
|
+
* The daemon scheduler and the access surface each drive their own engine
|
|
4
|
+
* instance against the same files; without serialization, concurrent
|
|
5
|
+
* read-modify-write of mistakes.json, rubrics, and the calibration index
|
|
6
|
+
* would let the last finisher discard the other run's updates.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const weeklySynthesisTails = new Map<string, Promise<void>>();
|
|
10
|
+
|
|
11
|
+
export function queueWeeklySynthesis<T>(memoryDir: string, run: () => Promise<T>): Promise<T> {
|
|
12
|
+
const prior = weeklySynthesisTails.get(memoryDir);
|
|
13
|
+
const next = prior === undefined ? run() : prior.then(run, run);
|
|
14
|
+
const tail = next.then(
|
|
15
|
+
() => undefined,
|
|
16
|
+
() => undefined
|
|
17
|
+
);
|
|
18
|
+
weeklySynthesisTails.set(memoryDir, tail);
|
|
19
|
+
void tail.then(() => {
|
|
20
|
+
if (weeklySynthesisTails.get(memoryDir) === tail) weeklySynthesisTails.delete(memoryDir);
|
|
21
|
+
});
|
|
22
|
+
return next;
|
|
23
|
+
}
|
package/src/console/trace.ts
CHANGED
|
@@ -32,6 +32,7 @@ import path from "node:path";
|
|
|
32
32
|
import readline from "node:readline";
|
|
33
33
|
import { createReadStream } from "node:fs";
|
|
34
34
|
import type { Writable } from "node:stream";
|
|
35
|
+
import { sleepAbortable } from "../utils/sleep.js";
|
|
35
36
|
|
|
36
37
|
import { renderFrame } from "./tui.js";
|
|
37
38
|
import type { ConsoleStateSnapshot } from "./state.js";
|
|
@@ -465,43 +466,11 @@ function normalizeSpeed(speed: number | undefined): number {
|
|
|
465
466
|
}
|
|
466
467
|
|
|
467
468
|
/**
|
|
468
|
-
* Abortable sleep used by `replayTrace` between frames
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
* variant REJECTS with `AbortError` when `signal` fires (or is
|
|
472
|
-
* already aborted on entry). That gives callers a way to
|
|
473
|
-
* *distinguish* timer-expiry from signal-driven early exit, instead
|
|
474
|
-
* of silently resolving on both. The replay loop catches the
|
|
475
|
-
* `AbortError` and exits cleanly so Ctrl-C does not have to wait for
|
|
476
|
-
* the current inter-frame `setTimeout` (capped at 60s) to elapse.
|
|
477
|
-
*
|
|
478
|
-
* Resolves only on timer expiry. Rejects with `AbortError` (DOMException-
|
|
479
|
-
* shaped: `name === "AbortError"`) on abort. Exported so callers in
|
|
480
|
-
* tests and adjacent modules can reuse the same primitive.
|
|
469
|
+
* Abortable sleep used by `replayTrace` between frames: resolves on timer
|
|
470
|
+
* expiry, rejects with `AbortError` on abort so Ctrl-C exits without waiting
|
|
471
|
+
* out the inter-frame delay. Shared implementation lives in utils/sleep.js.
|
|
481
472
|
*/
|
|
482
|
-
export
|
|
483
|
-
ms: number,
|
|
484
|
-
signal?: AbortSignal,
|
|
485
|
-
): Promise<void> {
|
|
486
|
-
return new Promise((resolve, reject) => {
|
|
487
|
-
if (signal?.aborted) {
|
|
488
|
-
reject(makeAbortError());
|
|
489
|
-
return;
|
|
490
|
-
}
|
|
491
|
-
const timer = setTimeout(() => {
|
|
492
|
-
if (signal && onAbort) signal.removeEventListener("abort", onAbort);
|
|
493
|
-
resolve();
|
|
494
|
-
}, ms);
|
|
495
|
-
let onAbort: (() => void) | null = null;
|
|
496
|
-
if (signal) {
|
|
497
|
-
onAbort = () => {
|
|
498
|
-
clearTimeout(timer);
|
|
499
|
-
reject(makeAbortError());
|
|
500
|
-
};
|
|
501
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
}
|
|
473
|
+
export { sleepAbortable };
|
|
505
474
|
|
|
506
475
|
/**
|
|
507
476
|
* Construct an `AbortError`-shaped error. Prefers the standard
|
package/src/converge-config.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type CaptureWriteLockBackoffLimits,
|
|
3
|
+
normalizeCaptureWriteLockWaitMs,
|
|
4
|
+
resolveCaptureWriteLockBackoffLimits,
|
|
5
|
+
} from "./capture-write-lock-backoff.js";
|
|
6
|
+
import { readEnvVar } from "./runtime/env.js";
|
|
1
7
|
import type { ConvergeConfig, ConvergeConflictPolicy } from "./types.js";
|
|
2
8
|
|
|
3
9
|
export const CONVERGE_CONFLICT_POLICIES = [
|
|
@@ -38,6 +44,46 @@ function parsePeerRequestTimeoutMs(value: unknown, label: string): number {
|
|
|
38
44
|
return normalizeConvergePeerRequestTimeoutMs(value, label);
|
|
39
45
|
}
|
|
40
46
|
|
|
47
|
+
function parseOptionalCaptureLockMs(value: unknown, label: string): number | undefined {
|
|
48
|
+
if (value === undefined) return undefined;
|
|
49
|
+
return normalizeCaptureWriteLockWaitMs(value, label);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Config values win over env. An omitted knob stays omitted here so the
|
|
54
|
+
* caller can still fall through to the built-in default. Env is read with
|
|
55
|
+
* the REMNIC_ name and the legacy ENGRAM_ name.
|
|
56
|
+
*/
|
|
57
|
+
function envCaptureLockMs(name: string): number | undefined {
|
|
58
|
+
const raw = readEnvVar(name);
|
|
59
|
+
if (raw === undefined) return undefined;
|
|
60
|
+
const trimmed = raw.trim();
|
|
61
|
+
if (trimmed.length === 0) return undefined;
|
|
62
|
+
if (trimmed.length > 15) {
|
|
63
|
+
throw new Error(`${name} must be a positive integer number of milliseconds; got ${JSON.stringify(raw)}`);
|
|
64
|
+
}
|
|
65
|
+
for (let index = 0; index < trimmed.length; index += 1) {
|
|
66
|
+
const code = trimmed.charCodeAt(index);
|
|
67
|
+
if (code < 48 || code > 57) {
|
|
68
|
+
throw new Error(`${name} must be a positive integer number of milliseconds; got ${JSON.stringify(raw)}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return normalizeCaptureWriteLockWaitMs(Number(trimmed), name);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function resolveConvergeCaptureWriteLockBackoff(
|
|
75
|
+
config: ConvergeConfig | undefined
|
|
76
|
+
): CaptureWriteLockBackoffLimits {
|
|
77
|
+
return resolveCaptureWriteLockBackoffLimits({
|
|
78
|
+
captureWriteLockInitialDelayMs:
|
|
79
|
+
config?.captureWriteLockInitialDelayMs ?? envCaptureLockMs("REMNIC_CONVERGE_CAPTURE_LOCK_INITIAL_DELAY_MS"),
|
|
80
|
+
captureWriteLockMaxDelayMs:
|
|
81
|
+
config?.captureWriteLockMaxDelayMs ?? envCaptureLockMs("REMNIC_CONVERGE_CAPTURE_LOCK_MAX_DELAY_MS"),
|
|
82
|
+
captureWriteLockDeadlineMs:
|
|
83
|
+
config?.captureWriteLockDeadlineMs ?? envCaptureLockMs("REMNIC_CONVERGE_CAPTURE_LOCK_DEADLINE_MS"),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
41
87
|
export function parseConvergeConfig(block: unknown): ConvergeConfig {
|
|
42
88
|
if (block === undefined) {
|
|
43
89
|
return { conflictPolicy: DEFAULT_CONVERGE_CONFLICT_POLICY };
|
|
@@ -49,7 +95,14 @@ export function parseConvergeConfig(block: unknown): ConvergeConfig {
|
|
|
49
95
|
if (prototype !== Object.prototype && prototype !== null) {
|
|
50
96
|
throw new Error("converge must be a plain object");
|
|
51
97
|
}
|
|
52
|
-
const {
|
|
98
|
+
const {
|
|
99
|
+
conflictPolicy: rawConflictPolicy,
|
|
100
|
+
peerRequestTimeoutMs,
|
|
101
|
+
captureWriteLockInitialDelayMs,
|
|
102
|
+
captureWriteLockMaxDelayMs,
|
|
103
|
+
captureWriteLockDeadlineMs,
|
|
104
|
+
...unknown
|
|
105
|
+
} = block as Record<string, unknown>;
|
|
53
106
|
let conflictPolicy: unknown = rawConflictPolicy;
|
|
54
107
|
const unknownKey = Object.keys(unknown)[0];
|
|
55
108
|
if (unknownKey !== undefined) {
|
|
@@ -62,11 +115,37 @@ export function parseConvergeConfig(block: unknown): ConvergeConfig {
|
|
|
62
115
|
typeof conflictPolicy === "string" &&
|
|
63
116
|
CONVERGE_CONFLICT_POLICIES.includes(conflictPolicy as ConvergeConflictPolicy)
|
|
64
117
|
) {
|
|
118
|
+
const initialDelayMs = parseOptionalCaptureLockMs(
|
|
119
|
+
captureWriteLockInitialDelayMs,
|
|
120
|
+
"converge.captureWriteLockInitialDelayMs"
|
|
121
|
+
);
|
|
122
|
+
const maxDelayMs = parseOptionalCaptureLockMs(captureWriteLockMaxDelayMs, "converge.captureWriteLockMaxDelayMs");
|
|
123
|
+
const deadlineMs = parseOptionalCaptureLockMs(captureWriteLockDeadlineMs, "converge.captureWriteLockDeadlineMs");
|
|
124
|
+
// Reject an inverted schedule at parse time. Omitted knobs stay omitted
|
|
125
|
+
// and are filled from defaults only when the acquire runs.
|
|
126
|
+
if (initialDelayMs !== undefined && maxDelayMs !== undefined && initialDelayMs > maxDelayMs) {
|
|
127
|
+
throw new Error(
|
|
128
|
+
`converge.captureWriteLockInitialDelayMs (${initialDelayMs}) must be <= converge.captureWriteLockMaxDelayMs (${maxDelayMs})`
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
if (maxDelayMs !== undefined && deadlineMs !== undefined && maxDelayMs > deadlineMs) {
|
|
132
|
+
throw new Error(
|
|
133
|
+
`converge.captureWriteLockMaxDelayMs (${maxDelayMs}) must be <= converge.captureWriteLockDeadlineMs (${deadlineMs})`
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
if (initialDelayMs !== undefined && deadlineMs !== undefined && initialDelayMs > deadlineMs) {
|
|
137
|
+
throw new Error(
|
|
138
|
+
`converge.captureWriteLockInitialDelayMs (${initialDelayMs}) must be <= converge.captureWriteLockDeadlineMs (${deadlineMs})`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
65
141
|
return {
|
|
66
142
|
conflictPolicy: conflictPolicy as ConvergeConflictPolicy,
|
|
67
143
|
...(peerRequestTimeoutMs !== undefined
|
|
68
144
|
? { peerRequestTimeoutMs: parsePeerRequestTimeoutMs(peerRequestTimeoutMs, "converge.peerRequestTimeoutMs") }
|
|
69
145
|
: {}),
|
|
146
|
+
...(initialDelayMs !== undefined ? { captureWriteLockInitialDelayMs: initialDelayMs } : {}),
|
|
147
|
+
...(maxDelayMs !== undefined ? { captureWriteLockMaxDelayMs: maxDelayMs } : {}),
|
|
148
|
+
...(deadlineMs !== undefined ? { captureWriteLockDeadlineMs: deadlineMs } : {}),
|
|
70
149
|
};
|
|
71
150
|
}
|
|
72
151
|
|