@remnic/core 9.69.33 → 9.69.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.d.ts +14 -11
- package/dist/access-admin-ops-surface.js +65 -60
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +14 -11
- package/dist/access-authorization-probe.js +66 -61
- package/dist/access-boundary.d.ts +14 -11
- package/dist/access-boundary.js +65 -60
- package/dist/access-cli.js +137 -133
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +3 -1
- package/dist/access-coding-context-resolution.js +3 -3
- package/dist/access-extraction-force-flush.d.ts +14 -11
- package/dist/access-extraction-force-flush.js +65 -60
- package/dist/access-health-types.d.ts +3 -1
- package/dist/access-http-briefing.d.ts +14 -11
- package/dist/access-http-briefing.js +66 -61
- package/dist/access-http-lcm-compaction.d.ts +14 -11
- package/dist/access-http-lifecycle-flush.d.ts +14 -11
- package/dist/access-http-offline-stream.d.ts +14 -11
- package/dist/access-http-query.d.ts +4 -2
- package/dist/access-http-query.js +67 -62
- package/dist/access-http.d.ts +15 -12
- package/dist/access-http.js +86 -82
- package/dist/access-identity-continuity-surface.d.ts +12 -9
- package/dist/access-identity-continuity-surface.js +65 -60
- package/dist/access-lcm-surface.d.ts +14 -11
- package/dist/access-lcm-surface.js +65 -60
- package/dist/access-mcp.d.ts +14 -11
- package/dist/access-mcp.js +74 -70
- package/dist/access-memory-search-fanout.d.ts +4 -2
- package/dist/{access-namespace-preflight-DMR-jOMS.d.ts → access-namespace-preflight-D8qri11P.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +5 -3
- package/dist/access-namespace-preflight.js +65 -60
- package/dist/access-observe-transcript.d.ts +12 -9
- package/dist/access-observe-transcript.js +3 -3
- package/dist/access-observe-write-surface.d.ts +16 -13
- package/dist/access-observe-write-surface.js +65 -60
- package/dist/access-offline-manifest.d.ts +48 -11
- package/dist/access-offline-manifest.js +18 -16
- package/dist/access-operations-batch.js +68 -64
- package/dist/access-operations.d.ts +15 -12
- package/dist/access-operations.js +73 -69
- package/dist/access-recall-concurrency.d.ts +14 -11
- package/dist/access-recall-concurrency.js +65 -60
- package/dist/access-recall-response.d.ts +14 -11
- package/dist/access-recall-response.js +65 -60
- package/dist/access-recall-surface.d.ts +14 -11
- package/dist/access-recall-surface.js +65 -60
- package/dist/access-schema.d.ts +56 -13
- package/dist/access-schema.js +15 -1
- package/dist/{access-service-CJQoQvRa.d.ts → access-service-CKu5ixg9.d.ts} +52 -50
- package/dist/access-service-helpers.d.ts +14 -11
- package/dist/access-service.d.ts +14 -11
- package/dist/access-service.js +65 -60
- package/dist/access-surface-catalog.d.ts +14 -11
- package/dist/access-surface-catalog.js +67 -62
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +5 -3
- package/dist/action-confidence.d.ts +3 -1
- package/dist/active-memory-bridge.d.ts +3 -1
- package/dist/active-memory-bridge.js +2 -2
- package/dist/active-recall.d.ts +3 -1
- package/dist/active-recall.js +12 -10
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +3 -1
- package/dist/adapters/index.d.ts +46 -1
- package/dist/adapters/index.js +10 -6
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +3 -1
- package/dist/artifact-search.d.ts +3 -1
- package/dist/{auto-sync-NSHLUAQI.js → auto-sync-4YFATLFQ.js} +10 -9
- package/dist/{auto-sync-NSHLUAQI.js.map → auto-sync-4YFATLFQ.js.map} +1 -1
- package/dist/behavior-learner.d.ts +3 -1
- package/dist/behavior-signals.d.ts +3 -1
- package/dist/bootstrap.d.ts +12 -9
- package/dist/briefing-window.d.ts +4 -2
- package/dist/briefing.d.ts +4 -2
- package/dist/briefing.js +26 -25
- package/dist/buffer-surprise-report.d.ts +3 -1
- package/dist/buffer-turn-helpers.d.ts +3 -1
- package/dist/buffer.d.ts +4 -2
- package/dist/buffer.js +11 -10
- package/dist/bulk-import/index.d.ts +5 -3
- package/dist/calibration.d.ts +3 -1
- package/dist/calibration.js +3 -2
- package/dist/calibration.js.map +1 -1
- package/dist/capabilities.d.ts +3 -1
- package/dist/{capsule-merge-IPG4IOFP.js → capsule-merge-ZCXUPLNJ.js} +2 -2
- package/dist/{catalog-8O9KY9eA.d.ts → catalog-Bq1AxZwF.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +3 -1
- package/dist/causal-consolidation.d.ts +3 -1
- package/dist/causal-consolidation.js +27 -26
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +3 -1
- package/dist/{chunk-CDKHKZL5.js → chunk-2524MOWK.js} +2 -2
- package/dist/{chunk-HVAEXYPL.js → chunk-255PC37A.js} +47 -25
- package/dist/chunk-255PC37A.js.map +1 -0
- package/dist/{chunk-2C3S7J2S.js → chunk-2BQ4ZIWC.js} +741 -28
- package/dist/chunk-2BQ4ZIWC.js.map +1 -0
- package/dist/{chunk-RKBLRTNT.js → chunk-2YLMUME2.js} +2 -2
- package/dist/{chunk-QOIOACIE.js → chunk-326KUXIR.js} +15 -648
- package/dist/chunk-326KUXIR.js.map +1 -0
- package/dist/{chunk-DBQWVT2H.js → chunk-3CBI2ZSA.js} +2 -2
- package/dist/{chunk-MWFGUESQ.js → chunk-3FJKJ5UZ.js} +2 -2
- package/dist/{chunk-NZXEK3UF.js → chunk-3Q3N35W7.js} +2 -2
- package/dist/{chunk-YYGZJPOK.js → chunk-42DJ235G.js} +2 -2
- package/dist/{chunk-SO7SV523.js → chunk-4MDKNUV4.js} +1 -1
- package/dist/chunk-4MDKNUV4.js.map +1 -0
- package/dist/chunk-5HYUUFMQ.js +1280 -0
- package/dist/chunk-5HYUUFMQ.js.map +1 -0
- package/dist/{chunk-2JVJ7UHC.js → chunk-5JG5EBVL.js} +4 -2
- package/dist/chunk-5JG5EBVL.js.map +1 -0
- package/dist/{chunk-HV7OY4DM.js → chunk-5VAF4ID4.js} +643 -202
- package/dist/chunk-5VAF4ID4.js.map +1 -0
- package/dist/{chunk-N7RWREIQ.js → chunk-65RENJGB.js} +6 -1
- package/dist/chunk-65RENJGB.js.map +1 -0
- package/dist/{chunk-JTH2SE6B.js → chunk-6J6K3STG.js} +8 -8
- package/dist/{chunk-H4VH5VIB.js → chunk-776GVKL7.js} +2 -2
- package/dist/{chunk-BUTCAMJM.js → chunk-A2YQL2FF.js} +5 -5
- package/dist/chunk-A5UQ52YQ.js +211 -0
- package/dist/chunk-A5UQ52YQ.js.map +1 -0
- package/dist/{chunk-X2NFFBTO.js → chunk-A7GQBJP5.js} +4 -4
- package/dist/{chunk-CGC5UQCF.js → chunk-AKE4GGQ3.js} +2 -2
- package/dist/{chunk-B325AGLK.js → chunk-AZSKROVQ.js} +2 -2
- package/dist/{chunk-I5DZ3WGR.js → chunk-BJETIR53.js} +3 -3
- package/dist/{chunk-JT3EB7ZL.js → chunk-BNGHPYZU.js} +5 -5
- package/dist/chunk-BRZWWUCJ.js +13 -0
- package/dist/{chunk-FYDW33ZB.js.map → chunk-BRZWWUCJ.js.map} +1 -1
- package/dist/{chunk-3JVLGJCY.js → chunk-C6KRO3SU.js} +2 -2
- package/dist/{chunk-5NANRSCD.js → chunk-CNV2A557.js} +5 -5
- package/dist/{chunk-PBGVVDLY.js → chunk-DK4X5B6I.js} +2 -2
- package/dist/{chunk-MFDTVQJX.js → chunk-DVOBLPSQ.js} +22 -7
- package/dist/chunk-DVOBLPSQ.js.map +1 -0
- package/dist/{chunk-N2ZNPHA3.js → chunk-ECKG5WSI.js} +2 -2
- package/dist/{chunk-PYLL63BF.js → chunk-EEBQFG5E.js} +9 -9
- package/dist/{chunk-ET356KSB.js → chunk-F4TWWUMP.js} +2 -2
- package/dist/{chunk-RHQMKJFG.js → chunk-F6IVBYFS.js} +55 -51
- package/dist/{chunk-RHQMKJFG.js.map → chunk-F6IVBYFS.js.map} +1 -1
- package/dist/{chunk-CLLPJ6QT.js → chunk-FQXJAC3T.js} +2 -2
- package/dist/{chunk-JGHXXQ2G.js → chunk-FVJ4D6L7.js} +2 -2
- package/dist/{chunk-DD5JFCWM.js → chunk-GCBIXUPT.js} +2 -2
- package/dist/{chunk-MN3LK3KN.js → chunk-GLZH5VEN.js} +2 -2
- package/dist/{chunk-S7T2TY65.js → chunk-HC4GFLMQ.js} +3 -3
- package/dist/{chunk-EQHDH4C2.js → chunk-HUT2JR6I.js} +3 -3
- package/dist/{chunk-UUQG7HAD.js → chunk-HXSAWV3A.js} +4 -4
- package/dist/{chunk-XXIHX75O.js → chunk-J7PB5UQ4.js} +3 -3
- package/dist/{chunk-UGPUYIET.js → chunk-JHZCXUQI.js} +221 -400
- package/dist/chunk-JHZCXUQI.js.map +1 -0
- package/dist/{chunk-LTIZHLV7.js → chunk-JR6H5CYS.js} +2 -2
- package/dist/{chunk-FCSZ4K2X.js → chunk-JR6PP7UM.js} +3 -3
- package/dist/{chunk-TCUKRAMK.js → chunk-JRWW7GM6.js} +10 -10
- package/dist/{chunk-Q726HSJO.js → chunk-JSRVXI6E.js} +16 -15
- package/dist/chunk-JSRVXI6E.js.map +1 -0
- package/dist/{chunk-DB5TGMLZ.js → chunk-JZ2CHRLB.js} +6 -4
- package/dist/{chunk-DB5TGMLZ.js.map → chunk-JZ2CHRLB.js.map} +1 -1
- package/dist/{chunk-JEIXTYVG.js → chunk-L2QLDZJC.js} +46 -17
- package/dist/chunk-L2QLDZJC.js.map +1 -0
- package/dist/{chunk-PL7FYKHT.js → chunk-L2WQVSKP.js} +2 -2
- package/dist/{chunk-JSN44KIB.js → chunk-LEMD7WZJ.js} +9 -9
- package/dist/{chunk-VZWXFXLX.js → chunk-LMCD5W5B.js} +2 -2
- package/dist/{chunk-7BMXZCOT.js → chunk-LNDLXMH6.js} +3 -3
- package/dist/{chunk-3QQTXYZ6.js → chunk-LSLCFCCQ.js} +2 -1
- package/dist/chunk-LSLCFCCQ.js.map +1 -0
- package/dist/{chunk-EONF76DT.js → chunk-LYDJRF45.js} +2 -2
- package/dist/{chunk-MKD3OMPS.js → chunk-M3MYMWXG.js} +2 -2
- package/dist/{chunk-VGXM5B4H.js → chunk-MNIPH6LD.js} +2 -2
- package/dist/{chunk-A7XEPMQ6.js → chunk-MVAQ2WM3.js} +6 -6
- package/dist/chunk-MVAQ2WM3.js.map +1 -0
- package/dist/{chunk-6N3TQFZU.js → chunk-NN4JEFON.js} +3 -3
- package/dist/chunk-NPNSKE76.js +220 -0
- package/dist/chunk-NPNSKE76.js.map +1 -0
- package/dist/{chunk-MOZXTRC2.js → chunk-OQ7SSRXP.js} +19 -19
- package/dist/{chunk-XU6OEECT.js → chunk-OQQXGYMX.js} +3 -3
- package/dist/{chunk-4MHYKEOM.js → chunk-OS2AT2JU.js} +10 -10
- package/dist/{chunk-N57A4KPV.js → chunk-P3ONDDIJ.js} +2 -2
- package/dist/chunk-PCEYGOSL.js +66 -0
- package/dist/chunk-PCEYGOSL.js.map +1 -0
- package/dist/{chunk-R3HKWWUB.js → chunk-PHP3MUGF.js} +2 -2
- package/dist/{chunk-EEOUMG3J.js → chunk-PWPIERBM.js} +38 -6
- package/dist/chunk-PWPIERBM.js.map +1 -0
- package/dist/chunk-Q4AUIFUA.js +111 -0
- package/dist/chunk-Q4AUIFUA.js.map +1 -0
- package/dist/{chunk-P3SB5BNT.js → chunk-QATYVTP7.js} +2 -2
- package/dist/{chunk-LSYDG6MJ.js → chunk-QBLDCI6E.js} +2 -2
- package/dist/{chunk-KCB7F4J7.js → chunk-QURNMKME.js} +2 -2
- package/dist/{chunk-XOVKXJEP.js → chunk-R3TLVTWW.js} +3 -3
- package/dist/{chunk-XXE5P6HJ.js → chunk-RRZKTSFG.js} +2 -2
- package/dist/{chunk-44T3Y7SZ.js → chunk-RUXPVSML.js} +5 -5
- package/dist/{chunk-DCJ3YFIC.js → chunk-S2ULTQZR.js} +2 -2
- package/dist/{chunk-H272ZPQ3.js → chunk-SHEHQBCG.js} +124 -23
- package/dist/chunk-SHEHQBCG.js.map +1 -0
- package/dist/{chunk-EEC4PCG5.js → chunk-SZDLX763.js} +2 -2
- package/dist/{chunk-E2ZHGBAK.js → chunk-T2JSUEH6.js} +2 -2
- package/dist/{chunk-227UFSEQ.js → chunk-TFA6HPOA.js} +2 -2
- package/dist/{chunk-BA6WOZOT.js → chunk-TK4FHQRN.js} +4 -4
- package/dist/{chunk-W27OW7AB.js → chunk-TKFSXDOB.js} +2 -2
- package/dist/chunk-TLHNF6GA.js +647 -0
- package/dist/chunk-TLHNF6GA.js.map +1 -0
- package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
- package/dist/{chunk-FDLDOEO6.js → chunk-UBG4GAEP.js} +51 -6
- package/dist/chunk-UBG4GAEP.js.map +1 -0
- package/dist/{chunk-CETXNLEX.js → chunk-UDZYNIDJ.js} +2 -2
- package/dist/{chunk-H5AFCNGA.js → chunk-UJX4I26O.js} +2 -2
- package/dist/{chunk-E6TDQRF6.js → chunk-UYUCCQ46.js} +2 -2
- package/dist/{chunk-BLUYQFRH.js → chunk-VELCIWJZ.js} +15 -11
- package/dist/chunk-VELCIWJZ.js.map +1 -0
- package/dist/{chunk-OQDPBRQ6.js → chunk-VYXDUPYE.js} +2 -2
- package/dist/{chunk-ZG74PWRW.js → chunk-VZAKYDMJ.js} +2 -2
- package/dist/chunk-W6IJMWTZ.js +72 -0
- package/dist/chunk-W6IJMWTZ.js.map +1 -0
- package/dist/{chunk-NB5BCFUY.js → chunk-WHHEPAO3.js} +4 -4
- package/dist/{chunk-H3TKENU4.js → chunk-WIKO4SCR.js} +5 -5
- package/dist/{chunk-TX2UTLXC.js → chunk-WPDKBUWX.js} +2 -2
- package/dist/{chunk-YFLLGRXO.js → chunk-X2QPKLPL.js} +2 -2
- package/dist/{chunk-PFFZWDPE.js → chunk-XCOV45MO.js} +3 -3
- package/dist/{chunk-5BCNEBEN.js → chunk-XPJNT6PI.js} +4 -4
- package/dist/chunk-XW2T4QAW.js +1 -0
- package/dist/{chunk-J7HFPA6O.js → chunk-Y63ZFP4X.js} +2 -2
- package/dist/{chunk-D223ZDQV.js → chunk-YEDVOYL2.js} +2 -2
- package/dist/{chunk-TLPZ6MKZ.js → chunk-YEN4TREG.js} +541 -5
- package/dist/chunk-YEN4TREG.js.map +1 -0
- package/dist/{chunk-22FVR2KE.js → chunk-YJ6VCDMZ.js} +6 -2
- package/dist/chunk-YJ6VCDMZ.js.map +1 -0
- package/dist/{chunk-RC5DXXWC.js → chunk-YM7YN37H.js} +2 -2
- package/dist/{chunk-BPJNF7J2.js → chunk-YNN26CIZ.js} +2 -2
- package/dist/{chunk-VLXBE57O.js → chunk-YVGXH72Y.js} +2 -2
- package/dist/{chunk-YQAXP5AC.js → chunk-YXLUTALO.js} +5 -5
- package/dist/{chunk-DGGB65KC.js → chunk-Z7ACR6MJ.js} +3 -3
- package/dist/{chunk-X35W4S3L.js → chunk-ZBEGS7OB.js} +4 -4
- package/dist/{chunk-O75CRYGF.js → chunk-ZEFVK7XC.js} +1 -1
- package/dist/chunk-ZEFVK7XC.js.map +1 -0
- package/dist/{chunk-XUE46UYW.js → chunk-ZLN7AROH.js} +6 -6
- package/dist/{chunk-E6JA6XWY.js → chunk-ZTG4P7NZ.js} +1013 -1317
- package/dist/chunk-ZTG4P7NZ.js.map +1 -0
- package/dist/{chunk-HK32G473.js → chunk-ZWEZXVYH.js} +2 -2
- package/dist/{cli-D57e2Mqt.d.ts → cli-Bk7Ctql4.d.ts} +5 -5
- package/dist/cli-fallback.d.ts +11 -4
- package/dist/cli-fallback.js +5 -1
- package/dist/cli.d.ts +16 -13
- package/dist/cli.js +107 -103
- package/dist/coding/export-okf-codegraph.d.ts +3 -1
- package/dist/coding/export-okf-codegraph.js +32 -30
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/coding/pre-action-gate.d.ts +3 -1
- package/dist/compat/checks.js +2 -2
- package/dist/compat/codex-cli-fallback.d.ts +1 -1
- package/dist/compat/codex-cli-fallback.js +5 -1
- package/dist/compat/codex-cli-fallback.js.map +1 -1
- package/dist/compounding/engine.d.ts +4 -2
- package/dist/compounding/engine.js +27 -26
- package/dist/compounding/preference-consolidator.d.ts +3 -1
- package/dist/compression-optimizer.d.ts +3 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.js +12 -10
- package/dist/connectors/codex-materialize-runner.d.ts +3 -1
- package/dist/connectors/codex-materialize-runner.js +26 -25
- package/dist/connectors/codex-materialize.d.ts +3 -1
- package/dist/connectors/index.d.ts +3 -1
- package/dist/connectors/index.js +28 -27
- package/dist/consolidation-provenance-check.d.ts +4 -2
- package/dist/consolidation-undo.d.ts +4 -2
- package/dist/contradiction/index.d.ts +5 -3
- package/dist/contradiction/index.js +5 -5
- package/dist/{contradiction-scan-NOYMFG66.js → contradiction-scan-GVD4JJ7B.js} +3 -3
- package/dist/converge-config.d.ts +3 -1
- package/dist/convergence-refresh.d.ts +4 -2
- package/dist/convergence-refresh.js +28 -27
- package/dist/conversation-index/backend.d.ts +3 -1
- package/dist/conversation-index/backend.js +3 -3
- package/dist/conversation-index/chunker.d.ts +3 -1
- package/dist/conversation-index/faiss-adapter.d.ts +3 -1
- package/dist/conversation-index/faiss-adapter.js +2 -2
- package/dist/conversation-index/indexer.d.ts +3 -1
- package/dist/conversation-index/search.d.ts +3 -1
- package/dist/corpus-watermark.d.ts +3 -1
- package/dist/corpus-watermark.js +29 -28
- package/dist/cross-lingual-recall.d.ts +3 -1
- package/dist/day-summary.d.ts +3 -1
- package/dist/deep-recall-http-glue.d.ts +14 -11
- package/dist/deep-recall-http-glue.js +12 -2
- package/dist/deep-recall-mcp-tools.d.ts +14 -11
- package/dist/deep-recall-policy-llm.d.ts +3 -1
- package/dist/deep-recall-policy-llm.js +4 -3
- package/dist/deep-recall-seeds.d.ts +3 -1
- package/dist/delinearize.d.ts +3 -1
- package/dist/dependency-propagation-config.d.ts +3 -1
- package/dist/{dependency-propagation-delivery-CmniEsUK.d.ts → dependency-propagation-delivery-DLiAtj25.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +3 -1
- package/dist/direct-answer.d.ts +3 -1
- package/dist/embedding-fallback.d.ts +3 -1
- package/dist/enrichment/index.d.ts +3 -1
- package/dist/entity-origin-fields.d.ts +3 -1
- package/dist/entity-retrieval.d.ts +4 -2
- package/dist/entity-retrieval.js +26 -25
- package/dist/entity-schema.d.ts +3 -1
- package/dist/episodic-context.d.ts +3 -1
- package/dist/eval-trajectory-contracts.d.ts +3 -1
- package/dist/eval-trajectory-store.d.ts +3 -1
- package/dist/eval-trajectory.d.ts +3 -1
- package/dist/explicit-capture.d.ts +12 -9
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.d.ts +14 -11
- package/dist/external-wiki-access.js +66 -61
- package/dist/external-wiki-collection-registration.d.ts +3 -1
- package/dist/external-wiki-collection.d.ts +3 -1
- package/dist/external-wiki-mcp-tools.d.ts +14 -11
- package/dist/extraction-error-classification.d.ts +3 -1
- package/dist/extraction-faithfulness.d.ts +3 -1
- package/dist/extraction-faithfulness.js +4 -3
- package/dist/extraction-judge-telemetry.d.ts +3 -1
- package/dist/extraction-judge-training.d.ts +3 -1
- package/dist/extraction-judge.d.ts +3 -1
- package/dist/extraction-judge.js +5 -4
- package/dist/extraction-liveness.d.ts +3 -1
- package/dist/extraction-normalization.d.ts +3 -1
- package/dist/extraction-prompt.d.ts +3 -1
- package/dist/extraction-source-grounding-rules.d.ts +3 -1
- package/dist/extraction-source-grounding.d.ts +3 -1
- package/dist/extraction.d.ts +3 -1
- package/dist/extraction.js +38 -36
- package/dist/fallback-llm.d.ts +3 -1
- package/dist/fallback-llm.js +3 -2
- package/dist/{first-start-migration-RC345GPL.js → first-start-migration-L3UFX5CU.js} +3 -3
- package/dist/generic-recall-paths-DbitKJI5.d.ts +23 -0
- package/dist/graph-append-error.d.ts +3 -1
- package/dist/graph-dashboard-diff.d.ts +3 -1
- package/dist/graph-dashboard-key.d.ts +3 -1
- package/dist/graph-dashboard-parser.d.ts +3 -1
- package/dist/graph-edge-reinforcement.d.ts +3 -1
- package/dist/graph-jsonl.d.ts +3 -1
- package/dist/graph-path-reconstruction.d.ts +3 -1
- package/dist/graph-path-scoring.d.ts +3 -1
- package/dist/graph-snapshot.d.ts +3 -1
- package/dist/graph.d.ts +3 -1
- package/dist/harmonic-retrieval.js +2 -2
- package/dist/importance.d.ts +3 -1
- package/dist/importers/index.d.ts +3 -1
- package/dist/importers/test-utils.d.ts +3 -1
- package/dist/in-flight-reads.d.ts +3 -1
- package/dist/{index-BTAsSkPG.d.ts → index-BINUgPFo.d.ts} +2 -2
- package/dist/index.d.ts +303 -245
- package/dist/index.js +316 -214
- package/dist/intent.d.ts +3 -1
- package/dist/lcm/engine.d.ts +3 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +3 -1
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/tools.d.ts +3 -1
- package/dist/lifecycle.d.ts +3 -1
- package/dist/live-connectors-runner.d.ts +3 -1
- package/dist/local-llm-config.d.ts +26 -0
- package/dist/local-llm-config.js +1 -0
- package/dist/local-llm.d.ts +5 -1
- package/dist/local-llm.js +3 -3
- package/dist/local-model-endpoint.d.ts +3 -1
- package/dist/location/index.d.ts +5 -3
- package/dist/location/index.js +29 -28
- package/dist/maintenance/memory-governance.d.ts +3 -1
- package/dist/maintenance/memory-governance.js +26 -25
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +4 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +26 -25
- package/dist/maintenance/rebuild-memory-projection.d.ts +4 -2
- package/dist/maintenance/rebuild-memory-projection.js +27 -26
- package/dist/{maintenance-DCvQGTzL.d.ts → maintenance-ag1gYztC.d.ts} +378 -4
- package/dist/mcp-memory-inspector-app.d.ts +14 -11
- package/dist/memory-action-policy.d.ts +3 -1
- package/dist/memory-cache.d.ts +3 -1
- package/dist/memory-controller.d.ts +3 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +3 -1
- package/dist/memory-projection-store.d.ts +3 -1
- package/dist/memory-provenance.d.ts +3 -1
- package/dist/memory-snapshot.d.ts +3 -1
- package/dist/memory-subject-cli.d.ts +14 -11
- package/dist/memory-subject.d.ts +14 -11
- package/dist/memory-worth-outcomes.d.ts +4 -2
- package/dist/migrate/from-engram.js +2 -2
- package/dist/models-json.d.ts +3 -1
- package/dist/namespaces/migrate.d.ts +5 -3
- package/dist/namespaces/migrate.js +27 -26
- package/dist/namespaces/principal.d.ts +3 -1
- package/dist/namespaces/search.d.ts +3 -1
- package/dist/namespaces/search.js +8 -8
- package/dist/namespaces/storage.d.ts +5 -3
- package/dist/namespaces/storage.js +26 -25
- package/dist/native-knowledge.d.ts +3 -1
- package/dist/network/tailscale.js +2 -2
- package/dist/offline-sync-impression-drain.d.ts +3 -1
- package/dist/offline-sync-impression-drain.js +6 -6
- package/dist/operator-doctor-corpus.d.ts +3 -1
- package/dist/operator-doctor-corpus.js +30 -29
- package/dist/operator-doctor-replica.d.ts +3 -1
- package/dist/operator-toolkit.d.ts +5 -3
- package/dist/operator-toolkit.js +44 -42
- package/dist/orchestration/compression-guideline-coordinator.d.ts +4 -2
- package/dist/orchestration/maintenance.d.ts +6 -4
- package/dist/orchestration/maintenance.js +44 -39
- package/dist/{orchestrator-CvCsp1tz.d.ts → orchestrator-Cf3G-3Ed.d.ts} +17 -29
- package/dist/orchestrator.d.ts +12 -9
- package/dist/orchestrator.js +141 -135
- package/dist/patterns-cli.d.ts +3 -1
- package/dist/{pipeline-JAdwKBS7.d.ts → pipeline-AwB03fw_.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +3 -1
- package/dist/proactive-contention.d.ts +3 -1
- package/dist/provenance.d.ts +3 -1
- package/dist/{public-http-h-yWu9rj.d.ts → public-http-BetSQn7q.d.ts} +1 -1
- package/dist/{qmd-Cvw9RWKr.d.ts → qmd-Bfaydrfm.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +4 -2
- package/dist/qmd-recall-cache.d.ts +3 -1
- package/dist/qmd.d.ts +4 -2
- package/dist/qmd.js +2 -2
- package/dist/recall-concurrency-config.d.ts +3 -1
- package/dist/recall-disclosure-escalation.d.ts +3 -1
- package/dist/recall-explain-renderer.d.ts +3 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +3 -1
- package/dist/recall-navigate-access.d.ts +3 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +3 -1
- package/dist/recall-navigate-disclosure.js +1 -1
- package/dist/recall-navigate.d.ts +3 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-planner-llm.d.ts +3 -1
- package/dist/recall-planner-llm.js +3 -2
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.d.ts +57 -0
- package/dist/recall-state-view-admission.js +39 -0
- package/dist/recall-state-view-admission.js.map +1 -0
- package/dist/recall-state-view-inject.js +2 -2
- package/dist/recall-state-view-render.js +2 -2
- package/dist/recall-state-view-widen.d.ts +18 -1
- package/dist/recall-state-view-widen.js +2 -2
- package/dist/recall-state-view-wire.d.ts +1 -1
- package/dist/recall-state-view-wire.js +3 -3
- package/dist/recall-state-view.d.ts +1 -0
- package/dist/recall-state-view.js +1 -1
- package/dist/recall-state.d.ts +3 -1
- package/dist/recall-tag-filter.d.ts +3 -1
- package/dist/recall-timings.d.ts +3 -1
- package/dist/recall-xray-cli.d.ts +3 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +3 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +10 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +12 -2
- package/dist/reconcile/cursor.js +6 -4
- package/dist/reconcile/cursor.js.map +1 -1
- package/dist/reconcile/manifest.d.ts +38 -2
- package/dist/reconcile/manifest.js +15 -5
- package/dist/reconcile/plan.d.ts +3 -1
- package/dist/replay/normalizers/chatgpt.d.ts +3 -1
- package/dist/replay/normalizers/claude.d.ts +3 -1
- package/dist/replay/normalizers/openclaw.d.ts +3 -1
- package/dist/replay/normalizers/shared.d.ts +3 -1
- package/dist/replay/runner.d.ts +3 -1
- package/dist/replay/types.d.ts +3 -1
- package/dist/replica-divergence.d.ts +3 -1
- package/dist/replica-peers-config.d.ts +3 -1
- package/dist/{resolution-VKATP2HT.js → resolution-OHJZG45O.js} +6 -6
- package/dist/resolution-OHJZG45O.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +3 -1
- package/dist/resume-bundles.js +13 -11
- package/dist/retrieval-agents.d.ts +4 -2
- package/dist/retrieval-tiers.d.ts +3 -1
- package/dist/routing/engine.d.ts +3 -1
- package/dist/routing/store.d.ts +3 -1
- package/dist/runtime/child-process.d.ts +1 -1
- package/dist/runtime/child-process.js +1 -1
- package/dist/salvage-envelope.d.ts +3 -1
- package/dist/salvage-envelope.js +2 -2
- package/dist/{scope-profiles-BShpTPeV.d.ts → scope-profiles-nxTKvjE-.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +3 -1
- package/dist/search/factory.d.ts +3 -1
- package/dist/search/factory.js +7 -7
- package/dist/search/index.d.ts +3 -1
- package/dist/search/index.js +11 -11
- package/dist/search/lancedb-backend.d.ts +3 -1
- package/dist/search/meilisearch-backend.d.ts +3 -1
- package/dist/search/noop-backend.d.ts +3 -1
- package/dist/search/orama-backend.d.ts +3 -1
- package/dist/search/port.d.ts +3 -1
- package/dist/search/remote-backend.d.ts +3 -1
- package/dist/{semantic-consolidation-CusOpe9F.d.ts → semantic-consolidation-C83DVakV.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +4 -2
- package/dist/semantic-consolidation.js +27 -26
- package/dist/semantic-rule-promotion.js +26 -25
- package/dist/semantic-rule-verifier.d.ts +3 -1
- package/dist/semantic-rule-verifier.js +26 -25
- package/dist/{service-BbuVh1eS.d.ts → service-q-xtOoAr.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +3 -1
- package/dist/session-observer-state.d.ts +3 -1
- package/dist/shared-context/manager.d.ts +3 -1
- package/dist/signal.d.ts +3 -1
- package/dist/source-agent-qualifier.d.ts +3 -1
- package/dist/source-agent-qualifier.js +35 -33
- package/dist/standup/build.js +26 -25
- package/dist/{storage-BBLLuVTF.d.ts → storage-Ca0MbTfm.d.ts} +67 -6
- package/dist/storage.d.ts +5 -3
- package/dist/storage.js +25 -24
- package/dist/subject-config.d.ts +3 -1
- package/dist/subject-config.js +2 -2
- package/dist/summarizer.d.ts +3 -1
- package/dist/summarizer.js +6 -6
- package/dist/summary-snapshot.d.ts +3 -1
- package/dist/support-passport/index.d.ts +50 -15
- package/dist/support-passport/index.js +73 -64
- package/dist/temporal-supersession.d.ts +4 -2
- package/dist/temporal-timeline-recall.d.ts +3 -1
- package/dist/temporal-validity.d.ts +3 -1
- package/dist/threading.d.ts +3 -1
- package/dist/tier-migration.d.ts +4 -2
- package/dist/tier-routing.d.ts +3 -1
- package/dist/tier-routing.js +2 -2
- package/dist/{tier-stats-KA6OZX2C.js → tier-stats-VK5PCO2L.js} +3 -3
- package/dist/topics.d.ts +3 -1
- package/dist/transcript.d.ts +3 -1
- package/dist/transfer/capsule-import.js +1 -1
- package/dist/transfer/export-okf.d.ts +3 -1
- package/dist/transfer/export-okf.js +27 -26
- package/dist/transfer/types.d.ts +24 -24
- package/dist/trust-score-stage.d.ts +3 -1
- package/dist/trust-score.d.ts +3 -1
- package/dist/{types-igV4-sbB.d.ts → types-yDgWDkrJ.d.ts} +60 -34
- package/dist/types.d.ts +3 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +3 -1
- package/dist/verified-recall.js +26 -25
- package/dist/who-knows-cli.d.ts +14 -11
- package/dist/who-knows-cli.js +27 -26
- package/dist/who-knows.d.ts +14 -11
- package/dist/who-knows.js +26 -25
- package/dist/write-envelope.d.ts +5 -2
- package/dist/write-envelope.js +3 -1
- package/package.json +2 -2
- package/src/access-category-alias.test.ts +216 -0
- package/src/access-mcp.test.ts +73 -0
- package/src/access-mcp.ts +6 -6
- package/src/access-observe-write-surface.ts +19 -4
- package/src/access-offline-manifest.ts +297 -16
- package/src/access-recall-surface.ts +5 -5
- package/src/access-schema.ts +76 -7
- package/src/access-service.ts +11 -2
- package/src/activity/config.test.ts +124 -1
- package/src/activity/config.ts +150 -18
- package/src/activity/index.ts +3 -0
- package/src/activity/journal-extract-storage.test.ts +129 -0
- package/src/activity/journal-extract.test.ts +314 -0
- package/src/activity/journal-extract.ts +247 -0
- package/src/activity/journal-heading.test.ts +24 -1
- package/src/activity/journal-heading.ts +36 -0
- package/src/activity/journal-read.test.ts +242 -0
- package/src/activity/journal-read.ts +183 -0
- package/src/activity/journal-source.test.ts +15 -15
- package/src/activity/journal-source.ts +21 -14
- package/src/activity/journal-state.lock-worker.ts +30 -0
- package/src/activity/journal-state.test.ts +144 -0
- package/src/activity/journal-state.ts +107 -0
- package/src/activity/journal-strip.test.ts +106 -52
- package/src/activity/journal-strip.ts +35 -10
- package/src/activity/journal-vault-integration.test.ts +230 -0
- package/src/activity/journal-vault-provenance.test.ts +9 -7
- package/src/activity/journal-vault-provenance.ts +4 -10
- package/src/activity/journal-vault-read.test.ts +3 -2
- package/src/activity/journal-vault-read.ts +9 -139
- package/src/activity/journal.test.ts +74 -23
- package/src/activity/runner.test.ts +116 -1
- package/src/activity/runner.ts +25 -0
- package/src/activity/scheduler.ts +4 -0
- package/src/activity/store.test.ts +18 -0
- package/src/activity/store.ts +14 -0
- package/src/activity/sync-registration.ts +4 -0
- package/src/activity/timeline/analysis-metadata.ts +2 -0
- package/src/activity/timeline/analysis-provider.ts +140 -0
- package/src/activity/timeline/analysis-run.test.ts +419 -0
- package/src/activity/timeline/analysis-run.ts +106 -0
- package/src/activity/timeline/analysis.ts +66 -37
- package/src/activity/timeline/corrections.ts +9 -0
- package/src/activity/timeline/index.ts +3 -0
- package/src/activity/timeline/query.test.ts +71 -0
- package/src/activity/timeline/query.ts +57 -8
- package/src/activity/timeline/regenerate.test.ts +505 -0
- package/src/activity/timeline/regenerate.ts +373 -0
- package/src/activity/types.ts +40 -5
- package/src/adapters/grok-opencode.test.ts +146 -0
- package/src/adapters/grok.ts +53 -0
- package/src/adapters/index.ts +2 -0
- package/src/adapters/opencode.ts +52 -0
- package/src/adapters/registry.ts +4 -0
- package/src/cli-fallback.ts +13 -4
- package/src/config.test.ts +27 -1
- package/src/config.ts +17 -1
- package/src/dedup/merge.test.ts +732 -25
- package/src/fallback-llm.test.ts +53 -0
- package/src/fallback-llm.ts +12 -0
- package/src/index.ts +2 -0
- package/src/local-llm-config.ts +25 -0
- package/src/local-llm.ts +3 -1
- package/src/orchestration/dependency-propagation-recovery-replay.ts +1 -1
- package/src/orchestration/extraction-persist-deps.ts +9 -0
- package/src/orchestration/extraction-persist-promotion.test.ts +265 -6
- package/src/orchestration/extraction-persist-promotion.ts +42 -3
- package/src/orchestration/extraction-persist.ts +3 -3
- package/src/orchestration/harmonic-construction-persist.test.ts +115 -4
- package/src/orchestration/harmonic-construction-persist.ts +34 -6
- package/src/orchestration/maintenance.ts +1 -0
- package/src/orchestration/orchestrator-helpers.ts +6 -0
- package/src/orchestration/recall-entry.ts +16 -0
- package/src/orchestration/recall-internal-deps.ts +14 -0
- package/src/orchestration/recall-internal.ts +41 -58
- package/src/orchestration/recall-result-formatter.ts +11 -1
- package/src/orchestration/recall-search-pipeline.ts +121 -11
- package/src/orchestration/recall-state-view-pipeline.test.ts +211 -0
- package/src/orchestration/semantic-merge-commit-effects.ts +76 -17
- package/src/orchestration/semantic-merge-persist.ts +121 -16
- package/src/orchestration/semantic-merge-promotion-payload.ts +133 -54
- package/src/orchestrator.ts +7 -35
- package/src/providers/codex-subscription.test.ts +666 -0
- package/src/providers/codex-subscription.ts +743 -0
- package/src/recall-disclosure.test.ts +20 -0
- package/src/recall-state-view-admission.ts +114 -0
- package/src/recall-state-view-asof.test.ts +176 -0
- package/src/recall-state-view-call.test.ts +175 -0
- package/src/recall-state-view-config.test.ts +16 -0
- package/src/recall-state-view-widen.test.ts +70 -0
- package/src/recall-state-view-widen.ts +28 -7
- package/src/recall-state-view-wire.ts +3 -1
- package/src/recall-state-view-zero-diff.test.ts +20 -11
- package/src/recall-state-view.test.ts +142 -0
- package/src/recall-state-view.ts +72 -24
- package/src/recall-xray-renderer.test.ts +27 -0
- package/src/recall-xray-renderer.ts +4 -0
- package/src/recall-xray.ts +13 -0
- package/src/reconcile/cursor.ts +23 -33
- package/src/reconcile/manifest.ts +96 -11
- package/src/reconcile-identity-cache.test.ts +378 -0
- package/src/runtime/child-process.ts +1 -1
- package/src/storage/cas-revision-host.ts +75 -0
- package/src/storage/cas-revision-store.test.ts +459 -0
- package/src/storage/cas-revision-store.ts +661 -0
- package/src/storage/deletion-revision-store.ts +80 -6
- package/src/storage/tombstone-blocked-capture-index.ts +15 -0
- package/src/storage/tombstone-blocked-capture-mutation.ts +67 -7
- package/src/storage/tombstone-blocked-capture-sync.ts +55 -20
- package/src/storage-contract/failure-semantics.test.ts +1 -1
- package/src/storage-frontmatter-cas.test.ts +698 -1
- package/src/storage-replay.test.ts +166 -3
- package/src/storage.ts +41 -41
- package/src/support-passport/card-projection.ts +82 -33
- package/src/temporal-supersession.test.ts +10 -10
- package/src/types.ts +10 -29
- package/src/write-envelope.ts +1 -1
- package/dist/chunk-22FVR2KE.js.map +0 -1
- package/dist/chunk-2C3S7J2S.js.map +0 -1
- package/dist/chunk-2JVJ7UHC.js.map +0 -1
- package/dist/chunk-2QSZNTDO.js +0 -56
- package/dist/chunk-2QSZNTDO.js.map +0 -1
- package/dist/chunk-3QQTXYZ6.js.map +0 -1
- package/dist/chunk-5VCDKQWQ.js +0 -560
- package/dist/chunk-5VCDKQWQ.js.map +0 -1
- package/dist/chunk-A7XEPMQ6.js.map +0 -1
- package/dist/chunk-BLUYQFRH.js.map +0 -1
- package/dist/chunk-E6JA6XWY.js.map +0 -1
- package/dist/chunk-EEOUMG3J.js.map +0 -1
- package/dist/chunk-FDLDOEO6.js.map +0 -1
- package/dist/chunk-FYDW33ZB.js +0 -13
- package/dist/chunk-H272ZPQ3.js.map +0 -1
- package/dist/chunk-HV7OY4DM.js.map +0 -1
- package/dist/chunk-HVAEXYPL.js.map +0 -1
- package/dist/chunk-JEIXTYVG.js.map +0 -1
- package/dist/chunk-LRICZIGN.js +0 -52
- package/dist/chunk-LRICZIGN.js.map +0 -1
- package/dist/chunk-MFDTVQJX.js.map +0 -1
- package/dist/chunk-N7RWREIQ.js.map +0 -1
- package/dist/chunk-O75CRYGF.js.map +0 -1
- package/dist/chunk-Q726HSJO.js.map +0 -1
- package/dist/chunk-QOIOACIE.js.map +0 -1
- package/dist/chunk-SEDEKFYQ.js +0 -1
- package/dist/chunk-SO7SV523.js.map +0 -1
- package/dist/chunk-TLPZ6MKZ.js.map +0 -1
- package/dist/chunk-UGPUYIET.js.map +0 -1
- package/src/activity/journal-mode.test.ts +0 -32
- package/src/activity/journal-mode.ts +0 -20
- /package/dist/{capsule-merge-IPG4IOFP.js.map → capsule-merge-ZCXUPLNJ.js.map} +0 -0
- /package/dist/{chunk-CDKHKZL5.js.map → chunk-2524MOWK.js.map} +0 -0
- /package/dist/{chunk-RKBLRTNT.js.map → chunk-2YLMUME2.js.map} +0 -0
- /package/dist/{chunk-DBQWVT2H.js.map → chunk-3CBI2ZSA.js.map} +0 -0
- /package/dist/{chunk-MWFGUESQ.js.map → chunk-3FJKJ5UZ.js.map} +0 -0
- /package/dist/{chunk-NZXEK3UF.js.map → chunk-3Q3N35W7.js.map} +0 -0
- /package/dist/{chunk-YYGZJPOK.js.map → chunk-42DJ235G.js.map} +0 -0
- /package/dist/{chunk-JTH2SE6B.js.map → chunk-6J6K3STG.js.map} +0 -0
- /package/dist/{chunk-H4VH5VIB.js.map → chunk-776GVKL7.js.map} +0 -0
- /package/dist/{chunk-BUTCAMJM.js.map → chunk-A2YQL2FF.js.map} +0 -0
- /package/dist/{chunk-X2NFFBTO.js.map → chunk-A7GQBJP5.js.map} +0 -0
- /package/dist/{chunk-CGC5UQCF.js.map → chunk-AKE4GGQ3.js.map} +0 -0
- /package/dist/{chunk-B325AGLK.js.map → chunk-AZSKROVQ.js.map} +0 -0
- /package/dist/{chunk-I5DZ3WGR.js.map → chunk-BJETIR53.js.map} +0 -0
- /package/dist/{chunk-JT3EB7ZL.js.map → chunk-BNGHPYZU.js.map} +0 -0
- /package/dist/{chunk-3JVLGJCY.js.map → chunk-C6KRO3SU.js.map} +0 -0
- /package/dist/{chunk-5NANRSCD.js.map → chunk-CNV2A557.js.map} +0 -0
- /package/dist/{chunk-PBGVVDLY.js.map → chunk-DK4X5B6I.js.map} +0 -0
- /package/dist/{chunk-N2ZNPHA3.js.map → chunk-ECKG5WSI.js.map} +0 -0
- /package/dist/{chunk-PYLL63BF.js.map → chunk-EEBQFG5E.js.map} +0 -0
- /package/dist/{chunk-ET356KSB.js.map → chunk-F4TWWUMP.js.map} +0 -0
- /package/dist/{chunk-CLLPJ6QT.js.map → chunk-FQXJAC3T.js.map} +0 -0
- /package/dist/{chunk-JGHXXQ2G.js.map → chunk-FVJ4D6L7.js.map} +0 -0
- /package/dist/{chunk-DD5JFCWM.js.map → chunk-GCBIXUPT.js.map} +0 -0
- /package/dist/{chunk-MN3LK3KN.js.map → chunk-GLZH5VEN.js.map} +0 -0
- /package/dist/{chunk-S7T2TY65.js.map → chunk-HC4GFLMQ.js.map} +0 -0
- /package/dist/{chunk-EQHDH4C2.js.map → chunk-HUT2JR6I.js.map} +0 -0
- /package/dist/{chunk-UUQG7HAD.js.map → chunk-HXSAWV3A.js.map} +0 -0
- /package/dist/{chunk-XXIHX75O.js.map → chunk-J7PB5UQ4.js.map} +0 -0
- /package/dist/{chunk-LTIZHLV7.js.map → chunk-JR6H5CYS.js.map} +0 -0
- /package/dist/{chunk-FCSZ4K2X.js.map → chunk-JR6PP7UM.js.map} +0 -0
- /package/dist/{chunk-TCUKRAMK.js.map → chunk-JRWW7GM6.js.map} +0 -0
- /package/dist/{chunk-PL7FYKHT.js.map → chunk-L2WQVSKP.js.map} +0 -0
- /package/dist/{chunk-JSN44KIB.js.map → chunk-LEMD7WZJ.js.map} +0 -0
- /package/dist/{chunk-VZWXFXLX.js.map → chunk-LMCD5W5B.js.map} +0 -0
- /package/dist/{chunk-7BMXZCOT.js.map → chunk-LNDLXMH6.js.map} +0 -0
- /package/dist/{chunk-EONF76DT.js.map → chunk-LYDJRF45.js.map} +0 -0
- /package/dist/{chunk-MKD3OMPS.js.map → chunk-M3MYMWXG.js.map} +0 -0
- /package/dist/{chunk-VGXM5B4H.js.map → chunk-MNIPH6LD.js.map} +0 -0
- /package/dist/{chunk-6N3TQFZU.js.map → chunk-NN4JEFON.js.map} +0 -0
- /package/dist/{chunk-MOZXTRC2.js.map → chunk-OQ7SSRXP.js.map} +0 -0
- /package/dist/{chunk-XU6OEECT.js.map → chunk-OQQXGYMX.js.map} +0 -0
- /package/dist/{chunk-4MHYKEOM.js.map → chunk-OS2AT2JU.js.map} +0 -0
- /package/dist/{chunk-N57A4KPV.js.map → chunk-P3ONDDIJ.js.map} +0 -0
- /package/dist/{chunk-R3HKWWUB.js.map → chunk-PHP3MUGF.js.map} +0 -0
- /package/dist/{chunk-P3SB5BNT.js.map → chunk-QATYVTP7.js.map} +0 -0
- /package/dist/{chunk-LSYDG6MJ.js.map → chunk-QBLDCI6E.js.map} +0 -0
- /package/dist/{chunk-KCB7F4J7.js.map → chunk-QURNMKME.js.map} +0 -0
- /package/dist/{chunk-XOVKXJEP.js.map → chunk-R3TLVTWW.js.map} +0 -0
- /package/dist/{chunk-XXE5P6HJ.js.map → chunk-RRZKTSFG.js.map} +0 -0
- /package/dist/{chunk-44T3Y7SZ.js.map → chunk-RUXPVSML.js.map} +0 -0
- /package/dist/{chunk-DCJ3YFIC.js.map → chunk-S2ULTQZR.js.map} +0 -0
- /package/dist/{chunk-EEC4PCG5.js.map → chunk-SZDLX763.js.map} +0 -0
- /package/dist/{chunk-E2ZHGBAK.js.map → chunk-T2JSUEH6.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-TFA6HPOA.js.map} +0 -0
- /package/dist/{chunk-BA6WOZOT.js.map → chunk-TK4FHQRN.js.map} +0 -0
- /package/dist/{chunk-W27OW7AB.js.map → chunk-TKFSXDOB.js.map} +0 -0
- /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
- /package/dist/{chunk-CETXNLEX.js.map → chunk-UDZYNIDJ.js.map} +0 -0
- /package/dist/{chunk-H5AFCNGA.js.map → chunk-UJX4I26O.js.map} +0 -0
- /package/dist/{chunk-E6TDQRF6.js.map → chunk-UYUCCQ46.js.map} +0 -0
- /package/dist/{chunk-OQDPBRQ6.js.map → chunk-VYXDUPYE.js.map} +0 -0
- /package/dist/{chunk-ZG74PWRW.js.map → chunk-VZAKYDMJ.js.map} +0 -0
- /package/dist/{chunk-NB5BCFUY.js.map → chunk-WHHEPAO3.js.map} +0 -0
- /package/dist/{chunk-H3TKENU4.js.map → chunk-WIKO4SCR.js.map} +0 -0
- /package/dist/{chunk-TX2UTLXC.js.map → chunk-WPDKBUWX.js.map} +0 -0
- /package/dist/{chunk-YFLLGRXO.js.map → chunk-X2QPKLPL.js.map} +0 -0
- /package/dist/{chunk-PFFZWDPE.js.map → chunk-XCOV45MO.js.map} +0 -0
- /package/dist/{chunk-5BCNEBEN.js.map → chunk-XPJNT6PI.js.map} +0 -0
- /package/dist/{chunk-SEDEKFYQ.js.map → chunk-XW2T4QAW.js.map} +0 -0
- /package/dist/{chunk-J7HFPA6O.js.map → chunk-Y63ZFP4X.js.map} +0 -0
- /package/dist/{chunk-D223ZDQV.js.map → chunk-YEDVOYL2.js.map} +0 -0
- /package/dist/{chunk-RC5DXXWC.js.map → chunk-YM7YN37H.js.map} +0 -0
- /package/dist/{chunk-BPJNF7J2.js.map → chunk-YNN26CIZ.js.map} +0 -0
- /package/dist/{chunk-VLXBE57O.js.map → chunk-YVGXH72Y.js.map} +0 -0
- /package/dist/{chunk-YQAXP5AC.js.map → chunk-YXLUTALO.js.map} +0 -0
- /package/dist/{chunk-DGGB65KC.js.map → chunk-Z7ACR6MJ.js.map} +0 -0
- /package/dist/{chunk-X35W4S3L.js.map → chunk-ZBEGS7OB.js.map} +0 -0
- /package/dist/{chunk-XUE46UYW.js.map → chunk-ZLN7AROH.js.map} +0 -0
- /package/dist/{chunk-HK32G473.js.map → chunk-ZWEZXVYH.js.map} +0 -0
- /package/dist/{contradiction-scan-NOYMFG66.js.map → contradiction-scan-GVD4JJ7B.js.map} +0 -0
- /package/dist/{first-start-migration-RC345GPL.js.map → first-start-migration-L3UFX5CU.js.map} +0 -0
- /package/dist/{resolution-VKATP2HT.js.map → local-llm-config.js.map} +0 -0
- /package/dist/{tier-stats-KA6OZX2C.js.map → tier-stats-VK5PCO2L.js.map} +0 -0
package/src/fallback-llm.test.ts
CHANGED
|
@@ -827,6 +827,59 @@ test("fallback llm invokes registered codex-cli fallback runner", { concurrency:
|
|
|
827
827
|
}
|
|
828
828
|
});
|
|
829
829
|
|
|
830
|
+
test("fallback llm leaves codex-cli call timeout unset so provider retryOptions applies", { concurrency: false }, async () => {
|
|
831
|
+
clearModelsJsonCache();
|
|
832
|
+
clearSecretCache();
|
|
833
|
+
|
|
834
|
+
let capturedOptionTimeout: unknown;
|
|
835
|
+
let capturedProviderTimeout: unknown;
|
|
836
|
+
const restoreRunner = __codexCliFallbackTestHooks.setRunCodexCliForTest(
|
|
837
|
+
async (request) => {
|
|
838
|
+
capturedOptionTimeout = request.options.timeoutMs;
|
|
839
|
+
capturedProviderTimeout = request.config.retryOptions?.timeoutMs;
|
|
840
|
+
return { content: "provider timeout answer" };
|
|
841
|
+
},
|
|
842
|
+
);
|
|
843
|
+
|
|
844
|
+
const llm = new FallbackLlmClient({
|
|
845
|
+
agents: {
|
|
846
|
+
defaults: {
|
|
847
|
+
model: {
|
|
848
|
+
primary: "codex-cli/gpt-custom",
|
|
849
|
+
},
|
|
850
|
+
},
|
|
851
|
+
},
|
|
852
|
+
models: {
|
|
853
|
+
providers: {
|
|
854
|
+
"codex-cli": {
|
|
855
|
+
baseUrl: "",
|
|
856
|
+
api: "codex-cli",
|
|
857
|
+
executable: "codex-test-bin",
|
|
858
|
+
retryOptions: { timeoutMs: 1234 },
|
|
859
|
+
models: [],
|
|
860
|
+
},
|
|
861
|
+
},
|
|
862
|
+
},
|
|
863
|
+
});
|
|
864
|
+
|
|
865
|
+
try {
|
|
866
|
+
const response = await llm.chatCompletion(
|
|
867
|
+
[
|
|
868
|
+
{ role: "user", content: "Say OK" },
|
|
869
|
+
],
|
|
870
|
+
{ temperature: 0, maxTokens: 16 },
|
|
871
|
+
);
|
|
872
|
+
|
|
873
|
+
assert.equal(response?.content, "provider timeout answer");
|
|
874
|
+
assert.equal(capturedOptionTimeout, undefined);
|
|
875
|
+
assert.equal(capturedProviderTimeout, 1234);
|
|
876
|
+
} finally {
|
|
877
|
+
restoreRunner();
|
|
878
|
+
clearModelsJsonCache();
|
|
879
|
+
clearSecretCache();
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
|
|
830
883
|
test("fallback llm aborts codex-cli fallback requests when timeout wins", { concurrency: false }, async () => {
|
|
831
884
|
clearModelsJsonCache();
|
|
832
885
|
clearSecretCache();
|
package/src/fallback-llm.ts
CHANGED
|
@@ -13,6 +13,11 @@ import {
|
|
|
13
13
|
type GetRuntimeAuthForModelFn,
|
|
14
14
|
type ResolveApiKeyFn,
|
|
15
15
|
} from "./resolve-provider-secret.js";
|
|
16
|
+
import {
|
|
17
|
+
CODEX_SUBSCRIPTION_PROVIDER_ID,
|
|
18
|
+
codexSubscriptionBuiltinProviderConfig,
|
|
19
|
+
ensureCodexSubscriptionRunnerRegistered,
|
|
20
|
+
} from "./providers/codex-subscription.js";
|
|
16
21
|
import { loadModelsJsonProviders } from "./models-json.js";
|
|
17
22
|
import { callCodexCliFallback } from "./cli-fallback.js";
|
|
18
23
|
import { resolveHomeDir } from "./runtime/env.js";
|
|
@@ -160,6 +165,10 @@ const BUILT_IN_PROVIDER_FALLBACKS: Record<string, ModelProviderConfig> = {
|
|
|
160
165
|
models: [],
|
|
161
166
|
[PROVIDER_API_KEY_FIELD]: MANAGED_SECRETREF_MARKER,
|
|
162
167
|
},
|
|
168
|
+
// Subscription-OAuth extraction provider (issue #2784): no apiKey — the
|
|
169
|
+
// codex CLI login authenticates, via the runner the codex-subscription
|
|
170
|
+
// module registers on this same seam.
|
|
171
|
+
[CODEX_SUBSCRIPTION_PROVIDER_ID]: codexSubscriptionBuiltinProviderConfig(),
|
|
163
172
|
};
|
|
164
173
|
|
|
165
174
|
/**
|
|
@@ -667,6 +676,9 @@ export class FallbackLlmClient {
|
|
|
667
676
|
}
|
|
668
677
|
|
|
669
678
|
if (model.providerConfig.api === "codex-cli") {
|
|
679
|
+
// Registers the core subprocess transport only when no host/benchmark
|
|
680
|
+
// runner claimed the seam, so daemon/plugin runtimes work out of the box.
|
|
681
|
+
ensureCodexSubscriptionRunnerRegistered();
|
|
670
682
|
return await callCodexCliFallback(
|
|
671
683
|
effectiveConfig,
|
|
672
684
|
model.modelId,
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ export * from "./memory-projection-format.js";
|
|
|
48
48
|
export { searchWithGenericExclusion } from "./access-memory-search-fanout.js";
|
|
49
49
|
export * from "./model-registry.js";
|
|
50
50
|
export * from "./contradiction/index.js";
|
|
51
|
+
export * from "./recall-state-view.js";
|
|
51
52
|
|
|
52
53
|
export {
|
|
53
54
|
buildEvidencePack,
|
|
@@ -149,6 +150,7 @@ export {
|
|
|
149
150
|
type CodexCliFallbackResult,
|
|
150
151
|
type CodexCliFallbackRunner,
|
|
151
152
|
} from "./cli-fallback.js";
|
|
153
|
+
export { CODEX_SUBSCRIPTION_PROVIDER_ID, codexSubscriptionBuiltinProviderConfig, createCodexSubscriptionRunner, ensureCodexSubscriptionRunnerRegistered, CodexSubscriptionAuthError, CodexSubscriptionConfigError, CodexSubscriptionTimeoutError } from "./providers/codex-subscription.js";
|
|
152
154
|
|
|
153
155
|
// ---------------------------------------------------------------------------
|
|
154
156
|
// Smart buffer (issue #563)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface LocalLlmConfig {
|
|
2
|
+
// Local LLM Provider (v2.1)
|
|
3
|
+
localLlmEnabled: boolean;
|
|
4
|
+
localLlmUrl: string;
|
|
5
|
+
localLlmModel: string;
|
|
6
|
+
/** Optional API key for authenticated OpenAI-compatible endpoints. */
|
|
7
|
+
localLlmApiKey?: string;
|
|
8
|
+
/** Optional environment-variable name that supplies localLlmApiKey at runtime. */
|
|
9
|
+
localLlmApiKeyEnv?: string;
|
|
10
|
+
/** Additional headers for local/compatible endpoint requests. */
|
|
11
|
+
localLlmHeaders?: Record<string, string>;
|
|
12
|
+
/** If false, do not send Authorization header even when localLlmApiKey is set. */
|
|
13
|
+
localLlmAuthHeader: boolean;
|
|
14
|
+
localLlmFallback: boolean;
|
|
15
|
+
/** Optional home directory override for local LLM helpers (LM Studio settings, CLI PATH). */
|
|
16
|
+
localLlmHomeDir?: string;
|
|
17
|
+
/** Optional absolute path to LMS CLI binary (preferred over auto-detection). */
|
|
18
|
+
localLmsCliPath?: string;
|
|
19
|
+
/** Optional bin directory prepended to PATH for LMS CLI execution. */
|
|
20
|
+
localLmsBinDir?: string;
|
|
21
|
+
/** Hard timeout for local LLM and gateway fallback requests (ms). */
|
|
22
|
+
localLlmTimeoutMs: number;
|
|
23
|
+
/** Max context window for local LLM (override auto-detection). Set lower if your LLM server defaults to smaller contexts. */
|
|
24
|
+
localLlmMaxContext?: number;
|
|
25
|
+
}
|
package/src/local-llm.ts
CHANGED
|
@@ -237,6 +237,8 @@ interface LocalLlmChatCompletionOptions {
|
|
|
237
237
|
priority?: LocalLlmRequestPriority;
|
|
238
238
|
signal?: AbortSignal;
|
|
239
239
|
redactProviderErrors?: boolean;
|
|
240
|
+
/** Per-request model; defaults to config.localLlmModel. */
|
|
241
|
+
model?: string;
|
|
240
242
|
}
|
|
241
243
|
interface LocalLlmQueuedRequest {
|
|
242
244
|
messages: Array<{ role: string; content: string }>;
|
|
@@ -958,7 +960,7 @@ export class LocalLlmClient {
|
|
|
958
960
|
|
|
959
961
|
const promptChars = messages.reduce((sum, m) => sum + (m.content?.length ?? 0), 0);
|
|
960
962
|
const requestBody: Record<string, unknown> = {
|
|
961
|
-
model: this.config.localLlmModel,
|
|
963
|
+
model: options.model ?? this.config.localLlmModel,
|
|
962
964
|
messages,
|
|
963
965
|
temperature: options.temperature ?? 0.7,
|
|
964
966
|
// Use max_tokens consistent with cloud models
|
|
@@ -96,5 +96,14 @@ export interface ExtractionPersistDeps {
|
|
|
96
96
|
fallbackCausalPredecessor: string | undefined,
|
|
97
97
|
graphCaps?: GraphConstructionCapabilitySet
|
|
98
98
|
) => Promise<GraphEdge[] | void>;
|
|
99
|
+
/**
|
|
100
|
+
* #2807 (finding 4): invalidate the in-process GraphIndex edge cache for
|
|
101
|
+
* a storage dir. Called after a merged-target graph rewrite rolls back —
|
|
102
|
+
* the rollback repairs the JSONL files, but the warm cache served by
|
|
103
|
+
* `loadEdgesCached()` would otherwise keep the rolled-back edges for the
|
|
104
|
+
* full TTL. Optional so existing partial deps keep compiling; production
|
|
105
|
+
* wiring always supplies it.
|
|
106
|
+
*/
|
|
107
|
+
invalidateGraphEdgeCache?: (storage: StorageManager) => void;
|
|
99
108
|
updateTemporalTagIndexes: (storage: StorageManager, persistedIds: string[]) => Promise<void>;
|
|
100
109
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
2
|
import test, { mock } from "node:test";
|
|
3
|
-
import { mkdtemp } from "node:fs/promises";
|
|
4
|
-
import
|
|
3
|
+
import { mkdir, mkdtemp, readFile, writeFile } from "node:fs/promises";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
|
+
import type { MemoryFile } from "../types.js";
|
|
7
8
|
|
|
8
9
|
import { StorageManager } from "../index.js";
|
|
9
10
|
import { parseConfig } from "../config.js";
|
|
10
11
|
import { createBatchPromotedCopyProbe, mergeTargetHasPromotedCopies, promoteAndReconcileMergedTarget, retireStaleMergedTargetPromotionCopies } from "./extraction-persist-promotion.js";
|
|
11
|
-
import { buildMergedTargetPromotionPayload } from "./semantic-merge-promotion-payload.js";
|
|
12
|
+
import { buildMergedTargetPromotionPayload, type MergedTargetPromotionPayload } from "./semantic-merge-promotion-payload.js";
|
|
12
13
|
import type { ResolvedScopeProfilePlan } from "../namespaces/scope-profiles.js";
|
|
13
14
|
|
|
14
15
|
// Synthetic fixtures only — no real paths, hosts, or memory content.
|
|
@@ -418,7 +419,7 @@ async function commitWriterMerge(
|
|
|
418
419
|
): Promise<void> {
|
|
419
420
|
const snapshot = await storage.getMemoryByIdIncludingArchived(targetId);
|
|
420
421
|
assert.ok(snapshot);
|
|
421
|
-
assert.
|
|
422
|
+
assert.ok(await storage.updateMemoryIfUnchanged(snapshot, body));
|
|
422
423
|
}
|
|
423
424
|
|
|
424
425
|
test("promoteAndReconcileMergedTarget: abandons the cached promotion when the target advanced past it (round N+15 A)", async () => {
|
|
@@ -433,7 +434,7 @@ test("promoteAndReconcileMergedTarget: abandons the cached promotion when the ta
|
|
|
433
434
|
source: "test",
|
|
434
435
|
});
|
|
435
436
|
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
436
|
-
const payload = await buildMergedTargetPromotionPayload(s.source, {
|
|
437
|
+
const { payload } = await buildMergedTargetPromotionPayload(s.source, {
|
|
437
438
|
targetId: target.id,
|
|
438
439
|
mergedContent: A_MERGED_BODY,
|
|
439
440
|
provenancePatched: true,
|
|
@@ -480,7 +481,7 @@ test("promoteAndReconcileMergedTarget: reconciliation canonical is the re-read r
|
|
|
480
481
|
source: "test",
|
|
481
482
|
});
|
|
482
483
|
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
483
|
-
const payload = await buildMergedTargetPromotionPayload(s.source, {
|
|
484
|
+
const { payload } = await buildMergedTargetPromotionPayload(s.source, {
|
|
484
485
|
targetId: target.id,
|
|
485
486
|
mergedContent: A_MERGED_BODY,
|
|
486
487
|
provenancePatched: true,
|
|
@@ -532,3 +533,261 @@ test("promoteAndReconcileMergedTarget: reconciliation canonical is the re-read r
|
|
|
532
533
|
"the supersession lands on the source target — the live canonical record",
|
|
533
534
|
);
|
|
534
535
|
});
|
|
536
|
+
|
|
537
|
+
test("promoteAndReconcileMergedTarget: an unreadable payload skips destructive reconciliation (#2807)", async () => {
|
|
538
|
+
// The payload builder's post-commit reread failed TRANSIENTLY (secure
|
|
539
|
+
// store locked, corpus read I/O error). A null from that path means
|
|
540
|
+
// "payload unknown", not "no promotion warranted" — but the caller
|
|
541
|
+
// conflated both, so reconciliation immediately reread successfully,
|
|
542
|
+
// interpreted the missing payload as an intentional no-promotion result,
|
|
543
|
+
// and superseded a concurrent writer's PRE-merge copy with no
|
|
544
|
+
// current-body replacement, removing an otherwise eligible memory from
|
|
545
|
+
// the shared layer. An unknown payload must skip the destructive pass;
|
|
546
|
+
// the next merge retries both.
|
|
547
|
+
const s = await makeStorages();
|
|
548
|
+
const target = await s.source.writeMemory("fact", PRE_MERGE_BODY, {
|
|
549
|
+
source: "test",
|
|
550
|
+
});
|
|
551
|
+
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
552
|
+
// A concurrent writer published the PRE-merge body after the initial
|
|
553
|
+
// guard — the exact race reconciliation exists to clean up, but ONLY
|
|
554
|
+
// once the no-promotion outcome is confirmed intentional.
|
|
555
|
+
const staleCopy = await s.shared.writeMemory("fact", PRE_MERGE_BODY, {
|
|
556
|
+
source: "writer-b",
|
|
557
|
+
sourceMemoryId: target.id,
|
|
558
|
+
});
|
|
559
|
+
let reads = 0;
|
|
560
|
+
const lockedThenRecovered = {
|
|
561
|
+
dir: s.source.dir,
|
|
562
|
+
getMemoryByIdIncludingArchived: async (id: string) => {
|
|
563
|
+
reads += 1;
|
|
564
|
+
if (reads === 1) throw new Error("secure store locked");
|
|
565
|
+
return s.source.getMemoryByIdIncludingArchived(id);
|
|
566
|
+
},
|
|
567
|
+
} as unknown as StorageManager;
|
|
568
|
+
const built = (await buildMergedTargetPromotionPayload(lockedThenRecovered, {
|
|
569
|
+
targetId: target.id,
|
|
570
|
+
mergedContent: A_MERGED_BODY,
|
|
571
|
+
provenancePatched: true,
|
|
572
|
+
})) as { payload: MergedTargetPromotionPayload | null; readFailed?: boolean } | null;
|
|
573
|
+
// Pre-#2807 the builder returned a bare null; the result object now
|
|
574
|
+
// preserves WHY. This normalization keeps the test runnable against
|
|
575
|
+
// both shapes.
|
|
576
|
+
const payload = built === null ? null : built.payload;
|
|
577
|
+
const readFailed = built !== null && built.readFailed === true;
|
|
578
|
+
let promotions = 0;
|
|
579
|
+
await promoteAndReconcileMergedTarget({
|
|
580
|
+
promote: async () => {
|
|
581
|
+
promotions += 1;
|
|
582
|
+
return `copy-${promotions}`;
|
|
583
|
+
},
|
|
584
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
585
|
+
getStorageRouter: () => s.router,
|
|
586
|
+
scopeProfileWritePlan: null,
|
|
587
|
+
sourceStorage: s.source,
|
|
588
|
+
sourceMemoryId: target.id,
|
|
589
|
+
mergedPromotion: payload,
|
|
590
|
+
mergedPromotionReadFailed: readFailed,
|
|
591
|
+
normalize: (content: string) => content,
|
|
592
|
+
});
|
|
593
|
+
assert.equal(promotions, 0, "an unreadable payload promotes nothing");
|
|
594
|
+
const row = await s.shared.getMemoryByIdIncludingArchived(staleCopy.id);
|
|
595
|
+
assert.equal(
|
|
596
|
+
row?.frontmatter.status ?? "active",
|
|
597
|
+
"active",
|
|
598
|
+
"an unconfirmed no-promotion outcome must never retire copies — the next merge retries promotion and reconciliation",
|
|
599
|
+
);
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
function casShardPath(storageDir: string, memoryPath: string): string {
|
|
603
|
+
const relative = path.relative(storageDir, memoryPath).split(path.sep).join("/");
|
|
604
|
+
const hash = createHash("sha256").update(relative).digest("hex");
|
|
605
|
+
return path.join(storageDir, ".offline-sync", "cas-revisions", `${hash}.json`);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
test("buildMergedTargetPromotionPayload: an unreadable CAS receipt shard refuses the promotion (#2813 P1 A)", async () => {
|
|
609
|
+
const s = await makeStorages();
|
|
610
|
+
const target = await s.source.writeMemory("fact", PRE_MERGE_BODY, { source: "test" });
|
|
611
|
+
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
612
|
+
const committedRow = await s.source.getMemoryByIdIncludingArchived(target.id);
|
|
613
|
+
assert.ok(committedRow);
|
|
614
|
+
const shardPath = casShardPath(s.source.dir, committedRow.path);
|
|
615
|
+
// Prove a real standing receipt existed before tearing the shard.
|
|
616
|
+
const shard = JSON.parse(await readFile(shardPath, "utf8")) as { revision?: string };
|
|
617
|
+
assert.ok(shard.revision, "the merge commit minted a standing receipt");
|
|
618
|
+
await writeFile(shardPath, "{corrupt", "utf8");
|
|
619
|
+
|
|
620
|
+
// A concurrent writer published the PRE-merge body after the initial
|
|
621
|
+
// guard — reconciliation may retire it ONLY off a confirmed outcome.
|
|
622
|
+
const staleCopy = await s.shared.writeMemory("fact", PRE_MERGE_BODY, {
|
|
623
|
+
source: "writer-b",
|
|
624
|
+
sourceMemoryId: target.id,
|
|
625
|
+
});
|
|
626
|
+
const built = await buildMergedTargetPromotionPayload(s.source, {
|
|
627
|
+
targetId: target.id,
|
|
628
|
+
mergedContent: A_MERGED_BODY,
|
|
629
|
+
provenancePatched: true,
|
|
630
|
+
});
|
|
631
|
+
assert.equal(built.payload, null, "an unreadable receipt must refuse the promotion");
|
|
632
|
+
assert.equal(built.readFailed, true, "the refusal is an unknown outcome, not a no-promotion verdict");
|
|
633
|
+
|
|
634
|
+
let promotions = 0;
|
|
635
|
+
await promoteAndReconcileMergedTarget({
|
|
636
|
+
promote: async () => {
|
|
637
|
+
promotions += 1;
|
|
638
|
+
return `copy-${promotions}`;
|
|
639
|
+
},
|
|
640
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
641
|
+
getStorageRouter: () => s.router,
|
|
642
|
+
scopeProfileWritePlan: null,
|
|
643
|
+
sourceStorage: s.source,
|
|
644
|
+
sourceMemoryId: target.id,
|
|
645
|
+
mergedPromotion: built.payload,
|
|
646
|
+
mergedPromotionReadFailed: built.readFailed,
|
|
647
|
+
normalize: (content) => content,
|
|
648
|
+
});
|
|
649
|
+
assert.equal(promotions, 0, "nothing is promoted off an unconfirmable receipt");
|
|
650
|
+
const row = await s.shared.getMemoryByIdIncludingArchived(staleCopy.id);
|
|
651
|
+
assert.equal(
|
|
652
|
+
row?.frontmatter.status ?? "active",
|
|
653
|
+
"active",
|
|
654
|
+
"no destructive reconciliation runs off an unknown payload",
|
|
655
|
+
);
|
|
656
|
+
});
|
|
657
|
+
|
|
658
|
+
test("promoteAndReconcileMergedTarget: a receipt that becomes unreadable before the promotion abandons it (#2813 P1 A)", async () => {
|
|
659
|
+
const s = await makeStorages();
|
|
660
|
+
// Fresh target, never minted: the payload legitimately carries no token.
|
|
661
|
+
const target = await s.source.writeMemory("fact", A_MERGED_BODY, { source: "test" });
|
|
662
|
+
const { payload } = await buildMergedTargetPromotionPayload(s.source, {
|
|
663
|
+
targetId: target.id,
|
|
664
|
+
mergedContent: A_MERGED_BODY,
|
|
665
|
+
provenancePatched: true,
|
|
666
|
+
});
|
|
667
|
+
assert.ok(payload);
|
|
668
|
+
assert.equal(payload.committedRevision, undefined, "a genuinely absent receipt builds a tokenless payload");
|
|
669
|
+
// A torn shard write lands between build and promotion: absence became
|
|
670
|
+
// UNREADABLE, and the old undefined-vs-undefined comparison would have
|
|
671
|
+
// confirmed the cached body anyway.
|
|
672
|
+
const committedRow = await s.source.getMemoryByIdIncludingArchived(target.id);
|
|
673
|
+
assert.ok(committedRow);
|
|
674
|
+
const tornShardPath = casShardPath(s.source.dir, committedRow.path);
|
|
675
|
+
await mkdir(path.dirname(tornShardPath), { recursive: true });
|
|
676
|
+
await writeFile(tornShardPath, "{corrupt", "utf8");
|
|
677
|
+
|
|
678
|
+
let promotions = 0;
|
|
679
|
+
await promoteAndReconcileMergedTarget({
|
|
680
|
+
promote: async () => {
|
|
681
|
+
promotions += 1;
|
|
682
|
+
return `copy-${promotions}`;
|
|
683
|
+
},
|
|
684
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
685
|
+
getStorageRouter: () => s.router,
|
|
686
|
+
scopeProfileWritePlan: null,
|
|
687
|
+
sourceStorage: s.source,
|
|
688
|
+
sourceMemoryId: target.id,
|
|
689
|
+
mergedPromotion: payload,
|
|
690
|
+
normalize: (content) => content,
|
|
691
|
+
});
|
|
692
|
+
assert.equal(promotions, 0, "an unreadable standing receipt must not confirm the cached payload");
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
test("promoteAndReconcileMergedTarget: a genuinely absent receipt still confirms and promotes (#2813 P1 A)", async () => {
|
|
696
|
+
const s = await makeStorages();
|
|
697
|
+
const target = await s.source.writeMemory("fact", A_MERGED_BODY, { source: "test" });
|
|
698
|
+
const { payload } = await buildMergedTargetPromotionPayload(s.source, {
|
|
699
|
+
targetId: target.id,
|
|
700
|
+
mergedContent: A_MERGED_BODY,
|
|
701
|
+
provenancePatched: true,
|
|
702
|
+
});
|
|
703
|
+
assert.ok(payload);
|
|
704
|
+
assert.equal(payload.committedRevision, undefined, "a pre-sidecar target promotes without a token");
|
|
705
|
+
|
|
706
|
+
let promotions = 0;
|
|
707
|
+
await promoteAndReconcileMergedTarget({
|
|
708
|
+
promote: async (promotionPayload) => {
|
|
709
|
+
promotions += 1;
|
|
710
|
+
assert.equal(promotionPayload.content, A_MERGED_BODY);
|
|
711
|
+
return `copy-${promotions}`;
|
|
712
|
+
},
|
|
713
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
714
|
+
getStorageRouter: () => s.router,
|
|
715
|
+
scopeProfileWritePlan: null,
|
|
716
|
+
sourceStorage: s.source,
|
|
717
|
+
sourceMemoryId: target.id,
|
|
718
|
+
mergedPromotion: payload,
|
|
719
|
+
normalize: (content) => content,
|
|
720
|
+
});
|
|
721
|
+
assert.equal(promotions, 1, "absent-versus-absent confirms — pre-sidecar records keep their promotion semantics");
|
|
722
|
+
});
|
|
723
|
+
test("buildMergedTargetPromotionPayload and promotion refuse when interleaving writer updates metadata with same body (#2813 P1 B)", async () => {
|
|
724
|
+
const s = await makeStorages();
|
|
725
|
+
const target = await s.source.writeMemory("fact", PRE_MERGE_BODY, { source: "test", confidence: 0.5 });
|
|
726
|
+
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
727
|
+
const { payload } = await buildMergedTargetPromotionPayload(s.source, {
|
|
728
|
+
targetId: target.id,
|
|
729
|
+
mergedContent: A_MERGED_BODY,
|
|
730
|
+
provenancePatched: true,
|
|
731
|
+
});
|
|
732
|
+
assert.ok(payload);
|
|
733
|
+
assert.ok(payload.committedRevision);
|
|
734
|
+
assert.ok(payload.committedDigest);
|
|
735
|
+
|
|
736
|
+
// Interleaving writer updates metadata with the SAME body/content:
|
|
737
|
+
assert.ok(await s.source.updateMemoryFrontmatter(target.id, { confidence: 0.95 }));
|
|
738
|
+
|
|
739
|
+
let promotions = 0;
|
|
740
|
+
await promoteAndReconcileMergedTarget({
|
|
741
|
+
promote: async () => {
|
|
742
|
+
promotions += 1;
|
|
743
|
+
return `copy-${promotions}`;
|
|
744
|
+
},
|
|
745
|
+
config: parseConfig({ memoryDir: s.source.dir, sharedNamespace: "shared" }),
|
|
746
|
+
getStorageRouter: () => s.router,
|
|
747
|
+
scopeProfileWritePlan: null,
|
|
748
|
+
sourceStorage: s.source,
|
|
749
|
+
sourceMemoryId: target.id,
|
|
750
|
+
mergedPromotion: payload,
|
|
751
|
+
normalize: (content) => content,
|
|
752
|
+
});
|
|
753
|
+
assert.equal(
|
|
754
|
+
promotions,
|
|
755
|
+
0,
|
|
756
|
+
"promotion must be abandoned when standing receipt digest/revision changes due to same-body metadata update",
|
|
757
|
+
);
|
|
758
|
+
});
|
|
759
|
+
|
|
760
|
+
test("buildMergedTargetPromotionPayload: unavailable snapshot digest refuses when a committed digest exists (#2813 P1)", async () => {
|
|
761
|
+
const s = await makeStorages();
|
|
762
|
+
const target = await s.source.writeMemory("fact", PRE_MERGE_BODY, { source: "test" });
|
|
763
|
+
await commitWriterMerge(s.source, target.id, A_MERGED_BODY);
|
|
764
|
+
const committedRow = await s.source.getMemoryByIdIncludingArchived(target.id);
|
|
765
|
+
assert.ok(committedRow);
|
|
766
|
+
const status = await s.source.readCasRevisionStatus(committedRow.path);
|
|
767
|
+
assert.equal(status.status, "present", "the merge minted a standing receipt");
|
|
768
|
+
assert.ok(
|
|
769
|
+
status.status === "present" && status.committedDigest,
|
|
770
|
+
"the standing receipt carries a committed digest",
|
|
771
|
+
);
|
|
772
|
+
|
|
773
|
+
s.source.readDurableFileDigest = async () => null;
|
|
774
|
+
const built = await buildMergedTargetPromotionPayload(s.source, {
|
|
775
|
+
targetId: target.id,
|
|
776
|
+
mergedContent: A_MERGED_BODY,
|
|
777
|
+
provenancePatched: true,
|
|
778
|
+
});
|
|
779
|
+
assert.equal(built.payload, null, "an unreadable snapshot digest must refuse the promotion");
|
|
780
|
+
assert.equal(built.readFailed, true, "unavailable snapshot is unknown, not an absent revision");
|
|
781
|
+
|
|
782
|
+
const legacyStore = await makeStorages();
|
|
783
|
+
const fresh = await legacyStore.source.writeMemory("fact", A_MERGED_BODY, { source: "test" });
|
|
784
|
+
legacyStore.source.readDurableFileDigest = async () => null;
|
|
785
|
+
const legacy = await buildMergedTargetPromotionPayload(legacyStore.source, {
|
|
786
|
+
targetId: fresh.id,
|
|
787
|
+
mergedContent: A_MERGED_BODY,
|
|
788
|
+
provenancePatched: true,
|
|
789
|
+
});
|
|
790
|
+
assert.ok(legacy.payload, "a genuinely absent receipt still builds a payload");
|
|
791
|
+
assert.equal(legacy.readFailed, false, "missing snapshot must not be conflated with an absent revision");
|
|
792
|
+
assert.equal(legacy.payload.committedRevision, undefined);
|
|
793
|
+
});
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "../capabilities.js";
|
|
23
23
|
import type { MemoryFile, PluginConfig } from "../types.js";
|
|
24
24
|
import type { ResolvedScopeProfilePlan } from "../namespaces/scope-profiles.js";
|
|
25
|
-
import type
|
|
25
|
+
import { readPromotionReceiptStatus, type MergedTargetPromotionPayload } from "./semantic-merge-promotion-payload.js";
|
|
26
26
|
|
|
27
27
|
export const confidenceTierOrder = [
|
|
28
28
|
"explicit",
|
|
@@ -361,9 +361,24 @@ export async function promoteAndReconcileMergedTarget(args: {
|
|
|
361
361
|
sourceMemoryId: string;
|
|
362
362
|
/** Null = payload builder refused (degraded merge / target replaced mid-flight). */
|
|
363
363
|
mergedPromotion: MergedTargetPromotionPayload | null;
|
|
364
|
+
/** #2807 (finding 1): the builder's post-commit reread FAILED — the payload is unknown, not refused. Skips the destructive reconciliation. */
|
|
365
|
+
mergedPromotionReadFailed?: boolean;
|
|
364
366
|
normalize: (content: string) => string;
|
|
365
367
|
onReconciled?: () => void;
|
|
366
368
|
}): Promise<void> {
|
|
369
|
+
// #2807 (finding 1): an unreadable payload is not a no-promotion
|
|
370
|
+
// verdict. Reconciling anyway rereads the record successfully a moment
|
|
371
|
+
// later and interprets the missing payload as "no promotion warranted" —
|
|
372
|
+
// retiring a concurrently published PRE-merge copy with no current-body
|
|
373
|
+
// replacement and removing an otherwise eligible memory from the
|
|
374
|
+
// shared/profile layer. Skip the destructive pass; the next merge
|
|
375
|
+
// retries promotion and reconciliation against a readable record.
|
|
376
|
+
if (args.mergedPromotion === null && args.mergedPromotionReadFailed === true) {
|
|
377
|
+
log.warn(
|
|
378
|
+
`persistExtraction: merged-target promotion reconciliation skipped for ${args.sourceMemoryId} — the committed record was unreadable at payload-build time, so no promotion outcome is confirmed`,
|
|
379
|
+
);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
367
382
|
let promotedCopyId: string | undefined;
|
|
368
383
|
if (args.mergedPromotion) {
|
|
369
384
|
const payload = args.mergedPromotion;
|
|
@@ -373,14 +388,38 @@ export async function promoteAndReconcileMergedTarget(args: {
|
|
|
373
388
|
if (
|
|
374
389
|
!current ||
|
|
375
390
|
inferMemoryStatus(current.frontmatter, current.path) !== "active" ||
|
|
376
|
-
current.content !== payload.content
|
|
377
|
-
(current.frontmatter.updated ?? undefined) !== (payload.committedRevision ?? undefined)
|
|
391
|
+
current.content !== payload.content
|
|
378
392
|
) {
|
|
379
393
|
log.warn(
|
|
380
394
|
`persistExtraction: merged-target promotion abandoned for ${args.sourceMemoryId} — the committed record advanced past the cached payload, so the newer writer's copy stands`,
|
|
381
395
|
);
|
|
382
396
|
return;
|
|
383
397
|
}
|
|
398
|
+
// #2813 (P1 A, P1 B): confirm the cached payload against a TRUTHFUL receipt
|
|
399
|
+
// read and digest check. An unavailable sidecar or digest mismatch abandons the
|
|
400
|
+
// promotion — the previous undefined-vs-undefined comparison confirmed any
|
|
401
|
+
// payload whose receipt identity had become unreadable. A genuinely absent receipt
|
|
402
|
+
// still compares equal and promotes.
|
|
403
|
+
const standingReceipt = await readPromotionReceiptStatus(args.sourceStorage, current.path);
|
|
404
|
+
const standingDigest =
|
|
405
|
+
typeof args.sourceStorage.readDurableFileDigest === "function"
|
|
406
|
+
? await args.sourceStorage.readDurableFileDigest(current.path).catch(() => null)
|
|
407
|
+
: null;
|
|
408
|
+
if (
|
|
409
|
+
!standingReceipt.available ||
|
|
410
|
+
(standingReceipt.revision ?? undefined) !== (payload.committedRevision ?? undefined) ||
|
|
411
|
+
(payload.committedDigest !== undefined &&
|
|
412
|
+
standingReceipt.committedDigest !== undefined &&
|
|
413
|
+
standingReceipt.committedDigest !== payload.committedDigest) ||
|
|
414
|
+
(payload.committedDigest !== undefined &&
|
|
415
|
+
standingDigest !== null &&
|
|
416
|
+
standingDigest !== payload.committedDigest)
|
|
417
|
+
) {
|
|
418
|
+
log.warn(
|
|
419
|
+
`persistExtraction: merged-target promotion abandoned for ${args.sourceMemoryId} — the committed record's CAS receipt or digest ${standingReceipt.available ? "does not match the cached payload's" : "is unreadable"}, so the cached body is not confirmed`,
|
|
420
|
+
);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
384
423
|
try {
|
|
385
424
|
promotedCopyId = await args.promote(payload);
|
|
386
425
|
} catch (err) {
|
|
@@ -2554,14 +2554,14 @@ export class ExtractionPersistCoordinator {
|
|
|
2554
2554
|
await anchorSnapshots.replace(targetStorage, semanticMerge.targetId, writeCategory, memoryPathById);
|
|
2555
2555
|
// D + final round (A/B) + N+7 (A/B) + N+18 (B): with no promoted copies the create path's promotion must still run — fail-open, the merge stands — and its payload derives SOLELY from the re-read committed record (no field reads the incoming extraction; the null cases — replaced mid-flight, retired, degraded merge, or the isolated fail-open reread failure — are documented on buildMergedTargetPromotionPayload). After the current copy lands, any concurrently promoted PRE-merge copy is superseded. Promotion eligibility gates on the committed record's tier — the downgraded min(incoming, target) confidence where a lower incoming fact merged in.
|
|
2556
2556
|
const mergedPromotion = await buildMergedTargetPromotionPayload(targetStorage, semanticMerge);
|
|
2557
|
-
// Round N+10 (A): promotion AND reconciliation — including the no-promotion path, where a below-threshold downgrade or a degraded merge writes no replacement copy but a concurrently published PRE-merge copy must still retire. See promoteAndReconcileMergedTarget.
|
|
2558
|
-
await promoteAndReconcileMergedTarget({ promote: (payload) => promoteMemoryToShared({ sourceStorage: targetStorage, ...payload }), config: this.deps.config, getStorageRouter: this.deps.getStorageRouter, scopeProfileWritePlan, sourceStorage: targetStorage, sourceMemoryId: semanticMerge.targetId, mergedPromotion, normalize: normalizeStoredHashSource, onReconciled: () => promotedCopyProbe.invalidate() });
|
|
2557
|
+
// Round N+10 (A) + #2807 (finding 1): promotion AND reconciliation — including the no-promotion path, where a below-threshold downgrade or a degraded merge writes no replacement copy but a concurrently published PRE-merge copy must still retire. An UNREADABLE payload (readFailed) skips the destructive pass. See promoteAndReconcileMergedTarget.
|
|
2558
|
+
await promoteAndReconcileMergedTarget({ promote: (payload) => promoteMemoryToShared({ sourceStorage: targetStorage, ...payload }), config: this.deps.config, getStorageRouter: this.deps.getStorageRouter, scopeProfileWritePlan, sourceStorage: targetStorage, sourceMemoryId: semanticMerge.targetId, mergedPromotion: mergedPromotion.payload, mergedPromotionReadFailed: mergedPromotion.readFailed, normalize: normalizeStoredHashSource, onReconciled: () => promotedCopyProbe.invalidate() });
|
|
2559
2559
|
// Round N+7 (D): the merged body joins the INTERNAL temporal/tag index refresh (id-keyed, incremental); the PUBLIC persistedIds return stays new-fragment only. Round N+11 (B): the target is also persisted into the thread's DURABLE episode set via the same appendEpisodeIds path the create path uses — the batch-local adjacency list is not durable, so without this the target leaves the thread at the next extraction.
|
|
2560
2560
|
trackPersistedId(targetStorage, semanticMerge.targetId, { includeReturnedIds: false });
|
|
2561
2561
|
await persistMergedTargetThreadEpisode(this.deps.getThreading(), threadIdForExtraction, semanticMerge.targetId);
|
|
2562
2562
|
// Finding B (round N+3): enqueue the surviving target so the end-of-batch harmonic pass covers the committed merged claims.
|
|
2563
2563
|
if (harmonicConstructionEnabled) {
|
|
2564
|
-
enqueueMergedTargetForHarmonicConstruction(harmonicFactsByStorage, targetStorage, harmonicFact, semanticMerge.targetId, semanticMerge.mergedContent, new Date(harmonicSourceInsertedAtBase + harmonicSourceOrder++).toISOString());
|
|
2564
|
+
await enqueueMergedTargetForHarmonicConstruction(harmonicFactsByStorage, targetStorage, harmonicFact, semanticMerge.targetId, semanticMerge.mergedContent, new Date(harmonicSourceInsertedAtBase + harmonicSourceOrder++).toISOString());
|
|
2565
2565
|
}
|
|
2566
2566
|
// Round N+5 (A+B): create-path parity — the create path's graph-edge build and
|
|
2567
2567
|
// behavior-signal ledger entry must also observe a committed merge.
|