@remnic/core 9.69.39 → 9.69.41
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 +16 -14
- package/dist/access-admin-ops-surface.js +75 -74
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +16 -14
- package/dist/access-authorization-probe.js +76 -75
- package/dist/access-boundary.d.ts +16 -14
- package/dist/access-boundary.js +75 -74
- package/dist/access-cli.js +173 -170
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +16 -14
- package/dist/access-extraction-force-flush.js +75 -74
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-briefing.d.ts +16 -14
- package/dist/access-http-briefing.js +76 -75
- package/dist/access-http-lcm-compaction.d.ts +16 -14
- package/dist/access-http-lifecycle-flush.d.ts +16 -14
- package/dist/access-http-offline-stream.d.ts +16 -14
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +77 -76
- package/dist/access-http.d.ts +17 -15
- package/dist/access-http.js +95 -92
- package/dist/access-identity-continuity-surface.d.ts +13 -12
- package/dist/access-identity-continuity-surface.js +75 -74
- package/dist/access-lcm-surface.d.ts +16 -14
- package/dist/access-lcm-surface.js +75 -74
- package/dist/access-mcp-shared-context-tools.d.ts +156 -0
- package/dist/access-mcp-shared-context-tools.js +8 -0
- package/dist/access-mcp.d.ts +16 -14
- package/dist/access-mcp.js +86 -83
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-DY4z6L5X.d.ts → access-namespace-preflight-DWsMc9Dh.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +75 -74
- package/dist/access-observe-transcript.d.ts +13 -12
- package/dist/access-observe-write-category.d.ts +1 -1
- package/dist/access-observe-write-category.js +4 -4
- package/dist/access-observe-write-surface.d.ts +16 -14
- package/dist/access-observe-write-surface.js +75 -74
- package/dist/access-offline-manifest.d.ts +37 -13
- package/dist/access-offline-manifest.js +15 -11
- package/dist/access-operations-batch.js +79 -77
- package/dist/access-operations.d.ts +16 -14
- package/dist/access-operations.js +84 -82
- package/dist/access-recall-concurrency.d.ts +16 -14
- package/dist/access-recall-concurrency.js +75 -74
- package/dist/access-recall-response.d.ts +16 -14
- package/dist/access-recall-response.js +75 -74
- package/dist/access-recall-surface.d.ts +16 -14
- package/dist/access-recall-surface.js +75 -74
- package/dist/access-schema.d.ts +5 -3
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-MY4bsr_Q.d.ts → access-service-Cisy5YDq.d.ts} +14 -9
- package/dist/access-service-helpers.d.ts +16 -14
- package/dist/access-service.d.ts +16 -14
- package/dist/access-service.js +75 -74
- package/dist/access-surface-catalog.d.ts +16 -14
- package/dist/access-surface-catalog.js +77 -76
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +6 -5
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-memory-bridge.js +3 -3
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +10 -9
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +1 -1
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-RP4C6ZPF.js → auto-sync-7PGUFY7U.js} +7 -7
- package/dist/background-generation-config.d.ts +1 -1
- package/dist/background-generation-config.js +3 -1
- package/dist/background-generation.d.ts +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +13 -12
- package/dist/briefing-window.d.ts +2 -2
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +23 -23
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +7 -7
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +3 -2
- package/dist/calibration.js +2 -2
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/{capsule-merge-IPG4IOFP.js → capsule-merge-3MNURAQ3.js} +2 -2
- package/dist/{catalog-CW87xGx8.d.ts → catalog-wcX1QhtQ.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +29 -28
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-YFTNZMGR.js → chunk-27NO2KVB.js} +31 -8
- package/dist/chunk-27NO2KVB.js.map +1 -0
- package/dist/{chunk-M6RORUO5.js → chunk-2EYZ32LH.js} +24 -2
- package/dist/{chunk-M6RORUO5.js.map → chunk-2EYZ32LH.js.map} +1 -1
- package/dist/{chunk-XH3HGI2N.js → chunk-2HQPE2NM.js} +2 -2
- package/dist/{chunk-3EKVN2OP.js → chunk-2ZG2LLZT.js} +2 -2
- package/dist/{chunk-6EHM2AV7.js → chunk-3BLHPQHT.js} +5 -5
- package/dist/{chunk-YKREX63Z.js → chunk-3D75XIYO.js} +5 -3
- package/dist/chunk-3D75XIYO.js.map +1 -0
- package/dist/{chunk-J272ODKJ.js → chunk-42DJ235G.js} +2 -2
- package/dist/{chunk-F4EHXVP7.js → chunk-46RII65S.js} +2 -2
- package/dist/{chunk-YUW66UAH.js → chunk-4AX5OYKC.js} +2 -2
- package/dist/{chunk-AECJY3GJ.js → chunk-4IGOLIWM.js} +2 -2
- package/dist/{chunk-2ZTDRNCS.js → chunk-54QPOE45.js} +2 -2
- package/dist/{chunk-O4M4BDIJ.js → chunk-563X6JJX.js} +2 -2
- package/dist/{chunk-IL6ODG6M.js → chunk-5EQT62HH.js} +2 -2
- package/dist/{chunk-JKKII6GX.js → chunk-6MQMYXSQ.js} +2 -2
- package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
- package/dist/{chunk-BV4ZKIZH.js → chunk-7ZLC4DTZ.js} +5 -4
- package/dist/{chunk-WBM2MVBK.js → chunk-A4OIJYCV.js} +2 -2
- package/dist/{chunk-RLJHJQUY.js → chunk-AFJHNHAM.js} +8 -8
- package/dist/{chunk-6YAIN5XJ.js → chunk-AIVRD66I.js} +44 -6
- package/dist/chunk-AIVRD66I.js.map +1 -0
- package/dist/{chunk-OEDW4ER7.js → chunk-AJBWVDRV.js} +2 -1
- package/dist/chunk-AJBWVDRV.js.map +1 -0
- package/dist/{chunk-4RZLTZVM.js → chunk-AKABVXFS.js} +2 -2
- package/dist/{chunk-M6HBPLBA.js → chunk-AUSRUOMQ.js} +2 -2
- package/dist/{chunk-QHT7MOUF.js → chunk-BTPCP535.js} +25 -14
- package/dist/chunk-BTPCP535.js.map +1 -0
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-Q7CLGFA7.js → chunk-C3G6MW4W.js} +3 -3
- package/dist/{chunk-O76F5QPP.js → chunk-D6PY63OM.js} +2 -2
- package/dist/{chunk-BD7JTBYP.js → chunk-D7MAYFQP.js} +2 -2
- package/dist/{chunk-LMLGBG6H.js → chunk-DBB5JPSL.js} +2 -2
- package/dist/{chunk-TSP5WH72.js → chunk-DIXZQTGY.js} +2 -2
- package/dist/{chunk-P4ZAEYKG.js → chunk-DM5CU5J7.js} +7 -4
- package/dist/chunk-DM5CU5J7.js.map +1 -0
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/{chunk-UHRZ324M.js → chunk-E3I3NDUP.js} +4 -4
- package/dist/{chunk-AENM6GKU.js → chunk-E4LMQTST.js} +2 -2
- package/dist/{chunk-YDVAM7S4.js → chunk-EH3HNCAM.js} +13 -8
- package/dist/chunk-EH3HNCAM.js.map +1 -0
- package/dist/{chunk-MUTVRKKY.js → chunk-EMSYMYXO.js} +14 -14
- package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
- package/dist/{chunk-FXHOZGSE.js → chunk-F5H6YG5P.js} +2 -2
- package/dist/{chunk-TRLOFIQC.js → chunk-FGFC2EFR.js} +14 -13
- package/dist/chunk-FGFC2EFR.js.map +1 -0
- package/dist/{chunk-TNSCIPBQ.js → chunk-G6NQ3L4T.js} +2 -2
- package/dist/{chunk-ZMWSYUUL.js → chunk-GCBIXUPT.js} +2 -2
- package/dist/{chunk-EYKIDK33.js → chunk-GMH5QPUU.js} +22 -22
- package/dist/chunk-GMH5QPUU.js.map +1 -0
- package/dist/{chunk-4BCHFSC7.js → chunk-GWNSKQDA.js} +3 -3
- package/dist/{chunk-JDX2OA4R.js → chunk-HNHIHXSD.js} +2 -2
- package/dist/{chunk-GG5FHZJJ.js → chunk-I33QYUAF.js} +6 -6
- package/dist/{chunk-LPYYY4AP.js → chunk-I46BYY7U.js} +653 -328
- package/dist/chunk-I46BYY7U.js.map +1 -0
- package/dist/{chunk-CZTPU65V.js → chunk-ICN37XHG.js} +74 -27
- package/dist/chunk-ICN37XHG.js.map +1 -0
- package/dist/chunk-IFBSZGW3.js +42 -0
- package/dist/chunk-IFBSZGW3.js.map +1 -0
- package/dist/{chunk-AAZEKXUP.js → chunk-IYIPXAIJ.js} +2 -2
- package/dist/{chunk-ACY4ZPF7.js → chunk-J2MGTGKC.js} +10 -5
- package/dist/chunk-J2MGTGKC.js.map +1 -0
- package/dist/chunk-JATHBCAV.js +94 -0
- package/dist/chunk-JATHBCAV.js.map +1 -0
- package/dist/{chunk-5U7K4W6K.js → chunk-JDOBQPJY.js} +3 -3
- package/dist/{chunk-TG3FAM2S.js → chunk-JL4TQYM5.js} +48 -1
- package/dist/{chunk-TG3FAM2S.js.map → chunk-JL4TQYM5.js.map} +1 -1
- package/dist/{chunk-UZZ7SQT3.js → chunk-JMWUPUE6.js} +2 -2
- package/dist/{chunk-ENBPQEVU.js → chunk-JSD7Q7LD.js} +2 -2
- package/dist/{chunk-QTQ6XKGT.js → chunk-K5D2XVNN.js} +4 -4
- package/dist/chunk-K5D2XVNN.js.map +1 -0
- package/dist/{chunk-3CBI2ZSA.js → chunk-KG2OOAFF.js} +20 -12
- package/dist/chunk-KG2OOAFF.js.map +1 -0
- package/dist/{chunk-Q432REND.js → chunk-KJLLPG26.js} +2 -2
- package/dist/{chunk-JTQR6L2N.js → chunk-KLUC2GSG.js} +6 -6
- package/dist/{chunk-OB3XMWX5.js → chunk-KVO2BTA4.js} +2 -2
- package/dist/{chunk-PCOVEDPK.js → chunk-KZJM7R4F.js} +3 -3
- package/dist/{chunk-X4TD4O2F.js → chunk-LE2KZ72G.js} +3 -3
- package/dist/{chunk-HIP6DKJJ.js → chunk-LQVXSRAJ.js} +2 -2
- package/dist/{chunk-A7GQBJP5.js → chunk-LVFI5LG7.js} +7 -7
- package/dist/{chunk-FWWWUPOE.js → chunk-MCMS4VUK.js} +25 -15
- package/dist/chunk-MCMS4VUK.js.map +1 -0
- package/dist/{chunk-5SPCMAUC.js → chunk-N6XTC56E.js} +13 -81
- package/dist/chunk-N6XTC56E.js.map +1 -0
- package/dist/{chunk-VBSNUH4J.js → chunk-ND7MAIJC.js} +2 -2
- package/dist/{chunk-TNZNSMVJ.js → chunk-NYWCFC3K.js} +301 -348
- package/dist/chunk-NYWCFC3K.js.map +1 -0
- package/dist/{chunk-54NX5EG4.js → chunk-P66QH6R6.js} +2 -2
- package/dist/{chunk-62D2PAAM.js → chunk-PAAJWQH5.js} +4 -4
- package/dist/{chunk-TA4C3XB7.js → chunk-PFKIOYJH.js} +2 -2
- package/dist/{chunk-WIWLX65T.js → chunk-PGGPRF6J.js} +2 -2
- package/dist/{chunk-V6EGNVUT.js → chunk-PIWFNPQT.js} +4 -4
- package/dist/{chunk-BLDBT6HZ.js → chunk-PJRKLB4Z.js} +18 -2
- package/dist/chunk-PJRKLB4Z.js.map +1 -0
- package/dist/{chunk-4JVQRFZD.js → chunk-PLJ2MQFT.js} +11 -11
- package/dist/{chunk-4RX5O34R.js → chunk-PQ42DJNG.js} +2 -2
- package/dist/{chunk-37CAEC7E.js → chunk-PWPIERBM.js} +4 -4
- package/dist/{chunk-ZEGL7YCC.js → chunk-Q62GA5U2.js} +2 -2
- package/dist/{chunk-CC37E3QM.js → chunk-QKCXRS5A.js} +16 -1
- package/dist/chunk-QKCXRS5A.js.map +1 -0
- package/dist/{chunk-WKDFJXW5.js → chunk-QM2SPLKQ.js} +1 -1
- package/dist/chunk-QM2SPLKQ.js.map +1 -0
- package/dist/{chunk-GAS7KYC7.js → chunk-RQQO3ORQ.js} +2 -2
- package/dist/{chunk-UZEHHXYC.js → chunk-S4MJTIPG.js} +85 -81
- package/dist/chunk-S4MJTIPG.js.map +1 -0
- package/dist/chunk-SK7D34OL.js +68 -0
- package/dist/chunk-SK7D34OL.js.map +1 -0
- package/dist/{chunk-LQNRVPTV.js → chunk-TRTLWUDD.js} +164 -130
- package/dist/chunk-TRTLWUDD.js.map +1 -0
- package/dist/{chunk-JXN77SGO.js → chunk-U2VDCFXW.js} +1 -1
- package/dist/chunk-U2VDCFXW.js.map +1 -0
- package/dist/{chunk-CWTCMZGE.js → chunk-UHSOPTNB.js} +132 -6
- package/dist/chunk-UHSOPTNB.js.map +1 -0
- package/dist/{chunk-3NPNBVFR.js → chunk-UZGHKD3T.js} +2 -2
- package/dist/{chunk-IQEJIOEU.js → chunk-V2EXYQEQ.js} +20 -12
- package/dist/chunk-V2EXYQEQ.js.map +1 -0
- package/dist/{chunk-OPBFP4TF.js → chunk-V2TOGJPM.js} +46 -13
- package/dist/chunk-V2TOGJPM.js.map +1 -0
- package/dist/{chunk-VJIE4D2I.js → chunk-V62YYBBY.js} +4 -4
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-6H2G7RFT.js → chunk-VNQRRUNS.js} +11 -10
- package/dist/chunk-VNQRRUNS.js.map +1 -0
- package/dist/{chunk-6AGWBKQU.js → chunk-VSN2DMQK.js} +2 -2
- package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
- package/dist/{chunk-GI4ZBWPQ.js → chunk-W7UV2ZCA.js} +3 -3
- package/dist/{chunk-GMIQV6DD.js → chunk-WBQ4ONQJ.js} +2 -2
- package/dist/{chunk-FNHLI2RE.js → chunk-WFMQN7JE.js} +3 -3
- package/dist/{chunk-MVAQ2WM3.js → chunk-WGZHSQDV.js} +9 -5
- package/dist/chunk-WGZHSQDV.js.map +1 -0
- package/dist/{chunk-IYKZJVL5.js → chunk-WN2OXGGH.js} +1 -1
- package/dist/chunk-WN2OXGGH.js.map +1 -0
- package/dist/{chunk-ZBW7A667.js → chunk-WPGA4RYI.js} +2 -2
- package/dist/{chunk-YQNNHLCG.js → chunk-WPGR3RW4.js} +2 -2
- package/dist/{chunk-SV4Z2S67.js → chunk-WUUGE7QC.js} +54 -21
- package/dist/chunk-WUUGE7QC.js.map +1 -0
- package/dist/{chunk-NXGSONWM.js → chunk-WZIO3TW6.js} +2 -2
- package/dist/{chunk-ZZUVBZL2.js → chunk-X2QPKLPL.js} +2 -2
- package/dist/{chunk-5HYUUFMQ.js → chunk-XCPNH2MG.js} +259 -10
- package/dist/chunk-XCPNH2MG.js.map +1 -0
- package/dist/{chunk-VSL63CFJ.js → chunk-XRS65T4O.js} +9 -9
- package/dist/{chunk-5N4MZLEH.js → chunk-YFXAWGMR.js} +2 -2
- package/dist/{chunk-KQW3YGEN.js → chunk-YR5QT4SR.js} +32 -9
- package/dist/chunk-YR5QT4SR.js.map +1 -0
- package/dist/{chunk-CARRTDKC.js → chunk-Z22M4JCY.js} +4 -3
- package/dist/chunk-Z22M4JCY.js.map +1 -0
- package/dist/{chunk-D545Z7UH.js → chunk-Z535ADTC.js} +3 -3
- package/dist/{chunk-B36GUU6T.js → chunk-Z7NBT6AK.js} +38 -5
- package/dist/chunk-Z7NBT6AK.js.map +1 -0
- package/dist/{chunk-5YCNDC3C.js → chunk-ZX6NNFSY.js} +3 -3
- package/dist/{chunk-3N3PBBEH.js → chunk-ZYSOT6HD.js} +2 -2
- package/dist/{chunk-MCRVQ5YQ.js → chunk-ZZEIL3MI.js} +2 -2
- package/dist/{cli-DGq0MNpO.d.ts → cli-CUlMlS2N.d.ts} +5 -5
- package/dist/cli.d.ts +18 -16
- package/dist/cli.js +129 -126
- package/dist/coding/export-okf-codegraph.d.ts +1 -1
- package/dist/coding/export-okf-codegraph.js +22 -22
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +25 -25
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +10 -9
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +25 -25
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/codex-materialize.js +2 -2
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +25 -25
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +6 -5
- package/dist/contradiction/index.js +4 -4
- package/dist/{contradiction-scan-BSGKZHYJ.js → contradiction-scan-GVD4JJ7B.js} +4 -4
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +26 -26
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +25 -25
- package/dist/cross-lingual-recall.d.ts +1 -1
- package/dist/dashboard-runtime.js +2 -2
- package/dist/day-summary.d.ts +1 -1
- package/dist/deep-recall-config.d.ts +12 -1
- package/dist/deep-recall-config.js +5 -3
- package/dist/deep-recall-http-glue.d.ts +19 -15
- package/dist/deep-recall-http-glue.js +7 -4
- package/dist/deep-recall-mcp-tools.d.ts +16 -14
- package/dist/deep-recall-policy-llm.d.ts +14 -3
- package/dist/deep-recall-policy-llm.js +3 -3
- package/dist/deep-recall-seeds.d.ts +4 -1
- package/dist/deep-recall-seeds.js +1 -1
- package/dist/deep-recall.d.ts +12 -1
- package/dist/deep-recall.js +3 -2
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-Cq1ekOwV.d.ts → dependency-propagation-delivery-BDDjImQn.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-origin-fields.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +24 -24
- package/dist/entity-schema.d.ts +1 -1
- package/dist/episodic-context.d.ts +1 -1
- package/dist/eval-trajectory-contracts.d.ts +1 -1
- package/dist/eval-trajectory-store.d.ts +1 -1
- package/dist/eval-trajectory.d.ts +1 -1
- package/dist/explicit-capture.d.ts +13 -12
- package/dist/explicit-capture.js +3 -3
- package/dist/external-wiki-access.d.ts +16 -14
- package/dist/external-wiki-access.js +76 -75
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +16 -14
- package/dist/extraction-error-classification.d.ts +14 -3
- package/dist/extraction-error-classification.js +5 -3
- package/dist/extraction-faithfulness.d.ts +4 -3
- package/dist/extraction-faithfulness.js +3 -3
- package/dist/extraction-judge-telemetry.d.ts +4 -3
- package/dist/extraction-judge-training.d.ts +4 -3
- package/dist/extraction-judge.d.ts +4 -3
- package/dist/extraction-judge.js +3 -3
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-prompt.d.ts +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction-span-config.d.ts +1 -1
- package/dist/extraction-span-materialize.d.ts +1 -1
- package/dist/extraction.d.ts +4 -4
- package/dist/extraction.js +40 -38
- package/dist/fallback-llm-codex-subscription.d.ts +65 -10
- package/dist/fallback-llm-codex-subscription.js +19 -1
- package/dist/fallback-llm.d.ts +25 -28
- package/dist/fallback-llm.js +4 -3
- package/dist/{first-start-migration-ZWMV5CX4.js → first-start-migration-L3UFX5CU.js} +4 -4
- package/dist/{generic-recall-paths-BcySh_f9.d.ts → generic-recall-paths-CpDzNO_I.d.ts} +1 -1
- package/dist/graph-append-error.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-jsonl.d.ts +1 -1
- package/dist/graph-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/harmonic-retrieval.js +3 -3
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/importers/test-utils.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/{index-DWOb4wz9.d.ts → index-CtmmCJoo.d.ts} +3 -3
- package/dist/index.d.ts +80 -40
- package/dist/index.js +316 -296
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +11 -11
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm-DpXIvm6F.d.ts +247 -0
- package/dist/local-llm-config.d.ts +4 -1
- package/dist/local-llm-config.js +4 -2
- package/dist/local-llm-helpers.d.ts +18 -69
- package/dist/local-llm-helpers.js +1 -1
- package/dist/local-llm.d.ts +3 -170
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/location/index.d.ts +3 -3
- package/dist/location/index.js +25 -25
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +24 -24
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +23 -23
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +25 -25
- package/dist/{maintenance-CW9wCzMP.d.ts → maintenance-CNgoLsoM.d.ts} +13 -6
- package/dist/mcp-memory-inspector-app.d.ts +16 -14
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-controller.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +16 -14
- package/dist/memory-subject.d.ts +16 -14
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +24 -24
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +12 -1
- package/dist/namespaces/search.js +9 -9
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +23 -23
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +26 -26
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +45 -44
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +36 -36
- package/dist/{orchestrator-ComHLm49.d.ts → orchestrator-DT7ybIFz.d.ts} +32 -11
- package/dist/orchestrator.d.ts +13 -12
- package/dist/orchestrator.js +176 -171
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-CiYcqqhl.d.ts → pipeline-CgBEmHcz.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +2 -2
- package/dist/provenance.d.ts +1 -1
- package/dist/{public-http-CuK4_Cb1.d.ts → public-http-C8P8fyiO.d.ts} +1 -1
- package/dist/{qmd-qXD4vatU.d.ts → qmd-BkY8KpCh.d.ts} +2 -2
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/qmd.js +2 -2
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-navigate-access.d.ts +1 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +1 -1
- package/dist/recall-navigate-disclosure.js +1 -1
- package/dist/recall-navigate.d.ts +1 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-planner-llm.d.ts +3 -2
- package/dist/recall-planner-llm.js +4 -3
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.d.ts +13 -3
- package/dist/recall-state-view-admission.js +9 -9
- package/dist/recall-state-view-anchors.d.ts +1 -1
- package/dist/recall-state-view-anchors.js +2 -2
- package/dist/recall-state-view-inject.js +2 -2
- package/dist/recall-state-view-render.js +2 -2
- package/dist/recall-state-view-widen.js +2 -2
- package/dist/recall-state-view-wire.js +3 -3
- package/dist/recall-state-view.d.ts +10 -1
- package/dist/recall-state-view.js +5 -3
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/cursor.js +2 -2
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/manifest.js +4 -4
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/reconcile/plan.js +2 -2
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/{resolution-4GG3QZRJ.js → resolution-LXFQQ4AE.js} +5 -5
- package/dist/resolution-LXFQQ4AE.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +12 -11
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/{scope-profiles-BT9rqC3w.d.ts → scope-profiles-BBPjZ9jb.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +8 -8
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +12 -12
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +2 -2
- package/dist/search/port.d.ts +2 -2
- package/dist/search/port.js +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/search/remote-backend.js +2 -2
- package/dist/{semantic-consolidation-CmZi7thY.d.ts → semantic-consolidation-BPFFVO84.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +26 -26
- package/dist/semantic-rule-promotion.js +23 -23
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +23 -23
- package/dist/{service-CLkA7AQB.d.ts → service-jKcr6Jvr.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/shared-context/manager.js +2 -2
- package/dist/shared-context/write-output-controls.d.ts +34 -0
- package/dist/shared-context/write-output-controls.js +10 -0
- package/dist/shared-context/write-output-controls.js.map +1 -0
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +31 -31
- package/dist/source-attribution.d.ts +23 -1
- package/dist/source-attribution.js +13 -3
- package/dist/standup/build.js +23 -23
- package/dist/{storage-wvX01lht.d.ts → storage-C-0Ah5OY.d.ts} +2 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +22 -22
- package/dist/subject-config.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +6 -6
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +18 -17
- package/dist/support-passport/index.js +78 -77
- package/dist/task-llm-config.d.ts +16 -0
- package/dist/task-llm-config.js +12 -0
- package/dist/task-llm-config.js.map +1 -0
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/tier-routing.js +3 -3
- package/dist/{tier-stats-LUSUUNU6.js → tier-stats-VK5PCO2L.js} +4 -4
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +3 -3
- package/dist/transfer/export-okf.d.ts +1 -1
- package/dist/transfer/export-okf.js +23 -23
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-Cyr32ABj.d.ts → types-cK5LydjL.d.ts} +6 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +23 -23
- package/dist/who-knows-cli.d.ts +16 -14
- package/dist/who-knows-cli.js +24 -24
- package/dist/who-knows.d.ts +16 -14
- package/dist/who-knows.js +23 -23
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +12 -2
- package/src/access-category-alias.test.ts +93 -0
- package/src/access-http.ts +1 -1
- package/src/access-mcp-shared-context-tools.ts +103 -0
- package/src/access-mcp.ts +4 -74
- package/src/access-offline-manifest.ts +52 -2
- package/src/access-operations-batch.ts +45 -2
- package/src/access-schema.ts +9 -4
- package/src/access-service.ts +14 -7
- package/src/activity/config.test.ts +61 -0
- package/src/activity/config.ts +40 -1
- package/src/activity/timeline/analysis-provider.ts +8 -2
- package/src/activity/timeline/analysis-run.test.ts +82 -0
- package/src/activity/timeline/publish-cli.test.ts +30 -0
- package/src/activity/timeline/publish-cli.ts +7 -0
- package/src/activity/timeline/query.ts +8 -1
- package/src/activity/timeline/regenerate.test.ts +130 -2
- package/src/activity/timeline/regenerate.ts +14 -6
- package/src/activity/vault-frontmatter.test.ts +99 -1
- package/src/activity/vault-frontmatter.ts +131 -0
- package/src/activity/vault-publish.ts +6 -0
- package/src/activity/vault-publisher.test.ts +172 -0
- package/src/activity/vault-publisher.ts +69 -15
- package/src/activity/vault-region.test.ts +7 -2
- package/src/activity/vault-region.ts +7 -3
- package/src/background-generation-config.ts +32 -6
- package/src/background-generation.test.ts +10 -1
- package/src/cli/deep-recall-commands.ts +22 -10
- package/src/cli/timeline-publish-commands.ts +9 -0
- package/src/config.test.ts +170 -43
- package/src/config.ts +22 -5
- package/src/dedup/merge.test.ts +283 -0
- package/src/deep-recall-boundary.test.ts +66 -0
- package/src/deep-recall-cli.test.ts +82 -0
- package/src/deep-recall-config.test.ts +56 -0
- package/src/deep-recall-config.ts +32 -0
- package/src/deep-recall-http-glue.ts +10 -10
- package/src/deep-recall-policy-llm.test.ts +242 -0
- package/src/deep-recall-policy-llm.ts +37 -7
- package/src/deep-recall-seeds.test.ts +53 -0
- package/src/deep-recall-seeds.ts +7 -1
- package/src/deep-recall-surface.test.ts +93 -0
- package/src/deep-recall.test.ts +121 -0
- package/src/deep-recall.ts +88 -28
- package/src/extraction-error-classification.ts +36 -1
- package/src/extraction-timeout.test.ts +110 -1
- package/src/extraction.test.ts +19 -1
- package/src/extraction.ts +23 -21
- package/src/fallback-llm-codex-subscription.ts +220 -12
- package/src/fallback-llm-parse-failure.test.ts +156 -0
- package/src/fallback-llm.test.ts +178 -0
- package/src/fallback-llm.ts +200 -198
- package/src/index.ts +1 -0
- package/src/local-llm-config.ts +11 -10
- package/src/local-llm-headers-timeout.test.ts +30 -0
- package/src/local-llm-helpers.ts +28 -0
- package/src/local-llm.ts +8 -19
- package/src/meetings/config.test.ts +58 -0
- package/src/namespaces/search.test.ts +51 -1
- package/src/namespaces/search.ts +48 -3
- package/src/orchestration/extraction-persist-promotion.test.ts +228 -2
- package/src/orchestration/extraction-persist-promotion.ts +17 -14
- package/src/orchestration/extraction-persist.ts +1 -1
- package/src/orchestration/orchestrator-helpers.test.ts +104 -0
- package/src/orchestration/orchestrator-init.ts +366 -106
- package/src/orchestration/recall-entry.ts +15 -1
- package/src/orchestration/recall-internal.ts +6 -11
- package/src/orchestration/recall-section-coordinator.ts +65 -28
- package/src/orchestration/recall-state-view-pipeline.test.ts +8 -2
- package/src/orchestration/semantic-merge-commit-effects.ts +45 -16
- package/src/orchestration/semantic-merge-persist.ts +23 -36
- package/src/orchestration/semantic-merge-promotion-payload.ts +62 -6
- package/src/orchestration/startup-collection-checks.ts +85 -0
- package/src/orchestrator-flush.test.ts +7 -0
- package/src/orchestrator-init.test.ts +1539 -0
- package/src/orchestrator.ts +7 -0
- package/src/providers/codex-subscription.test.ts +127 -0
- package/src/providers/codex-subscription.ts +1 -1
- package/src/qmd.ts +21 -10
- package/src/recall-state-view-admission.ts +11 -1
- package/src/recall-state-view-budget.test.ts +424 -0
- package/src/recall-state-view-cron-intent.test.ts +268 -0
- package/src/recall-state-view-widen.test.ts +14 -5
- package/src/recall-state-view-widen.ts +8 -1
- package/src/recall-state-view.ts +35 -18
- package/src/reconcile-identity-cache.test.ts +82 -1
- package/src/search/port.ts +1 -1
- package/src/shared-context/envelope-io.ts +25 -0
- package/src/shared-context/envelope-wiring.test.ts +4 -2
- package/src/shared-context/manager.ts +1 -0
- package/src/shared-context/write-output-controls.test.ts +192 -0
- package/src/shared-context/write-output-controls.ts +72 -0
- package/src/source-attribution.test.ts +39 -0
- package/src/source-attribution.ts +72 -0
- package/src/storage/cas-revision-store.test.ts +4 -0
- package/src/storage/cas-revision-store.ts +104 -12
- package/src/storage-frontmatter-cas.test.ts +19 -17
- package/src/summarizer.ts +5 -1
- package/src/task-llm-config.test.ts +124 -0
- package/src/task-llm-config.ts +88 -0
- package/src/testing/subjects/startup-discovery-lifecycle.test.ts +273 -0
- package/src/types.ts +6 -0
- package/dist/chunk-3CBI2ZSA.js.map +0 -1
- package/dist/chunk-5HYUUFMQ.js.map +0 -1
- package/dist/chunk-5SPCMAUC.js.map +0 -1
- package/dist/chunk-6H2G7RFT.js.map +0 -1
- package/dist/chunk-6YAIN5XJ.js.map +0 -1
- package/dist/chunk-ACY4ZPF7.js.map +0 -1
- package/dist/chunk-B36GUU6T.js.map +0 -1
- package/dist/chunk-BLDBT6HZ.js.map +0 -1
- package/dist/chunk-CARRTDKC.js.map +0 -1
- package/dist/chunk-CC37E3QM.js.map +0 -1
- package/dist/chunk-CWTCMZGE.js.map +0 -1
- package/dist/chunk-CZTPU65V.js.map +0 -1
- package/dist/chunk-EYKIDK33.js.map +0 -1
- package/dist/chunk-FWWWUPOE.js.map +0 -1
- package/dist/chunk-IQEJIOEU.js.map +0 -1
- package/dist/chunk-IYKZJVL5.js.map +0 -1
- package/dist/chunk-JXN77SGO.js.map +0 -1
- package/dist/chunk-KQW3YGEN.js.map +0 -1
- package/dist/chunk-LPYYY4AP.js.map +0 -1
- package/dist/chunk-LQNRVPTV.js.map +0 -1
- package/dist/chunk-MVAQ2WM3.js.map +0 -1
- package/dist/chunk-OEDW4ER7.js.map +0 -1
- package/dist/chunk-OPBFP4TF.js.map +0 -1
- package/dist/chunk-P4ZAEYKG.js.map +0 -1
- package/dist/chunk-QHT7MOUF.js.map +0 -1
- package/dist/chunk-QTQ6XKGT.js.map +0 -1
- package/dist/chunk-SV4Z2S67.js.map +0 -1
- package/dist/chunk-TNZNSMVJ.js.map +0 -1
- package/dist/chunk-TRLOFIQC.js.map +0 -1
- package/dist/chunk-UZEHHXYC.js.map +0 -1
- package/dist/chunk-WKDFJXW5.js.map +0 -1
- package/dist/chunk-YDVAM7S4.js.map +0 -1
- package/dist/chunk-YFTNZMGR.js.map +0 -1
- package/dist/chunk-YKREX63Z.js.map +0 -1
- /package/dist/{capsule-crypto-7FJQINUR.js.map → access-mcp-shared-context-tools.js.map} +0 -0
- /package/dist/{auto-sync-RP4C6ZPF.js.map → auto-sync-7PGUFY7U.js.map} +0 -0
- /package/dist/{contradiction-scan-BSGKZHYJ.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{capsule-merge-IPG4IOFP.js.map → capsule-merge-3MNURAQ3.js.map} +0 -0
- /package/dist/{chunk-XH3HGI2N.js.map → chunk-2HQPE2NM.js.map} +0 -0
- /package/dist/{chunk-3EKVN2OP.js.map → chunk-2ZG2LLZT.js.map} +0 -0
- /package/dist/{chunk-6EHM2AV7.js.map → chunk-3BLHPQHT.js.map} +0 -0
- /package/dist/{chunk-J272ODKJ.js.map → chunk-42DJ235G.js.map} +0 -0
- /package/dist/{chunk-F4EHXVP7.js.map → chunk-46RII65S.js.map} +0 -0
- /package/dist/{chunk-YUW66UAH.js.map → chunk-4AX5OYKC.js.map} +0 -0
- /package/dist/{chunk-AECJY3GJ.js.map → chunk-4IGOLIWM.js.map} +0 -0
- /package/dist/{chunk-2ZTDRNCS.js.map → chunk-54QPOE45.js.map} +0 -0
- /package/dist/{chunk-O4M4BDIJ.js.map → chunk-563X6JJX.js.map} +0 -0
- /package/dist/{chunk-IL6ODG6M.js.map → chunk-5EQT62HH.js.map} +0 -0
- /package/dist/{chunk-JKKII6GX.js.map → chunk-6MQMYXSQ.js.map} +0 -0
- /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
- /package/dist/{chunk-BV4ZKIZH.js.map → chunk-7ZLC4DTZ.js.map} +0 -0
- /package/dist/{chunk-WBM2MVBK.js.map → chunk-A4OIJYCV.js.map} +0 -0
- /package/dist/{chunk-RLJHJQUY.js.map → chunk-AFJHNHAM.js.map} +0 -0
- /package/dist/{chunk-4RZLTZVM.js.map → chunk-AKABVXFS.js.map} +0 -0
- /package/dist/{chunk-M6HBPLBA.js.map → chunk-AUSRUOMQ.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-Q7CLGFA7.js.map → chunk-C3G6MW4W.js.map} +0 -0
- /package/dist/{chunk-O76F5QPP.js.map → chunk-D6PY63OM.js.map} +0 -0
- /package/dist/{chunk-BD7JTBYP.js.map → chunk-D7MAYFQP.js.map} +0 -0
- /package/dist/{chunk-LMLGBG6H.js.map → chunk-DBB5JPSL.js.map} +0 -0
- /package/dist/{chunk-TSP5WH72.js.map → chunk-DIXZQTGY.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-UHRZ324M.js.map → chunk-E3I3NDUP.js.map} +0 -0
- /package/dist/{chunk-AENM6GKU.js.map → chunk-E4LMQTST.js.map} +0 -0
- /package/dist/{chunk-MUTVRKKY.js.map → chunk-EMSYMYXO.js.map} +0 -0
- /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
- /package/dist/{chunk-FXHOZGSE.js.map → chunk-F5H6YG5P.js.map} +0 -0
- /package/dist/{chunk-TNSCIPBQ.js.map → chunk-G6NQ3L4T.js.map} +0 -0
- /package/dist/{chunk-ZMWSYUUL.js.map → chunk-GCBIXUPT.js.map} +0 -0
- /package/dist/{chunk-4BCHFSC7.js.map → chunk-GWNSKQDA.js.map} +0 -0
- /package/dist/{chunk-JDX2OA4R.js.map → chunk-HNHIHXSD.js.map} +0 -0
- /package/dist/{chunk-GG5FHZJJ.js.map → chunk-I33QYUAF.js.map} +0 -0
- /package/dist/{chunk-AAZEKXUP.js.map → chunk-IYIPXAIJ.js.map} +0 -0
- /package/dist/{chunk-5U7K4W6K.js.map → chunk-JDOBQPJY.js.map} +0 -0
- /package/dist/{chunk-UZZ7SQT3.js.map → chunk-JMWUPUE6.js.map} +0 -0
- /package/dist/{chunk-ENBPQEVU.js.map → chunk-JSD7Q7LD.js.map} +0 -0
- /package/dist/{chunk-Q432REND.js.map → chunk-KJLLPG26.js.map} +0 -0
- /package/dist/{chunk-JTQR6L2N.js.map → chunk-KLUC2GSG.js.map} +0 -0
- /package/dist/{chunk-OB3XMWX5.js.map → chunk-KVO2BTA4.js.map} +0 -0
- /package/dist/{chunk-PCOVEDPK.js.map → chunk-KZJM7R4F.js.map} +0 -0
- /package/dist/{chunk-X4TD4O2F.js.map → chunk-LE2KZ72G.js.map} +0 -0
- /package/dist/{chunk-HIP6DKJJ.js.map → chunk-LQVXSRAJ.js.map} +0 -0
- /package/dist/{chunk-A7GQBJP5.js.map → chunk-LVFI5LG7.js.map} +0 -0
- /package/dist/{chunk-VBSNUH4J.js.map → chunk-ND7MAIJC.js.map} +0 -0
- /package/dist/{chunk-54NX5EG4.js.map → chunk-P66QH6R6.js.map} +0 -0
- /package/dist/{chunk-62D2PAAM.js.map → chunk-PAAJWQH5.js.map} +0 -0
- /package/dist/{chunk-TA4C3XB7.js.map → chunk-PFKIOYJH.js.map} +0 -0
- /package/dist/{chunk-WIWLX65T.js.map → chunk-PGGPRF6J.js.map} +0 -0
- /package/dist/{chunk-V6EGNVUT.js.map → chunk-PIWFNPQT.js.map} +0 -0
- /package/dist/{chunk-4JVQRFZD.js.map → chunk-PLJ2MQFT.js.map} +0 -0
- /package/dist/{chunk-4RX5O34R.js.map → chunk-PQ42DJNG.js.map} +0 -0
- /package/dist/{chunk-37CAEC7E.js.map → chunk-PWPIERBM.js.map} +0 -0
- /package/dist/{chunk-ZEGL7YCC.js.map → chunk-Q62GA5U2.js.map} +0 -0
- /package/dist/{chunk-GAS7KYC7.js.map → chunk-RQQO3ORQ.js.map} +0 -0
- /package/dist/{chunk-3NPNBVFR.js.map → chunk-UZGHKD3T.js.map} +0 -0
- /package/dist/{chunk-VJIE4D2I.js.map → chunk-V62YYBBY.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-6AGWBKQU.js.map → chunk-VSN2DMQK.js.map} +0 -0
- /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
- /package/dist/{chunk-GI4ZBWPQ.js.map → chunk-W7UV2ZCA.js.map} +0 -0
- /package/dist/{chunk-GMIQV6DD.js.map → chunk-WBQ4ONQJ.js.map} +0 -0
- /package/dist/{chunk-FNHLI2RE.js.map → chunk-WFMQN7JE.js.map} +0 -0
- /package/dist/{chunk-ZBW7A667.js.map → chunk-WPGA4RYI.js.map} +0 -0
- /package/dist/{chunk-YQNNHLCG.js.map → chunk-WPGR3RW4.js.map} +0 -0
- /package/dist/{chunk-NXGSONWM.js.map → chunk-WZIO3TW6.js.map} +0 -0
- /package/dist/{chunk-ZZUVBZL2.js.map → chunk-X2QPKLPL.js.map} +0 -0
- /package/dist/{chunk-VSL63CFJ.js.map → chunk-XRS65T4O.js.map} +0 -0
- /package/dist/{chunk-5N4MZLEH.js.map → chunk-YFXAWGMR.js.map} +0 -0
- /package/dist/{chunk-D545Z7UH.js.map → chunk-Z535ADTC.js.map} +0 -0
- /package/dist/{chunk-5YCNDC3C.js.map → chunk-ZX6NNFSY.js.map} +0 -0
- /package/dist/{chunk-3N3PBBEH.js.map → chunk-ZYSOT6HD.js.map} +0 -0
- /package/dist/{chunk-MCRVQ5YQ.js.map → chunk-ZZEIL3MI.js.map} +0 -0
- /package/dist/{resolution-4GG3QZRJ.js.map → contradiction-scan-GVD4JJ7B.js.map} +0 -0
- /package/dist/{first-start-migration-ZWMV5CX4.js.map → first-start-migration-L3UFX5CU.js.map} +0 -0
- /package/dist/{tier-stats-LUSUUNU6.js.map → tier-stats-VK5PCO2L.js.map} +0 -0
package/src/deep-recall.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { z } from "zod";
|
|
|
17
17
|
import type { AbstractionNode } from "./abstraction-nodes.js";
|
|
18
18
|
import type { CueAnchor } from "./cue-anchors.js";
|
|
19
19
|
import { compareDeterministicStrings } from "./deterministic-order.js";
|
|
20
|
+
import { abortError, isAbortError, raceAbort, throwIfAborted } from "./abort-error.js";
|
|
20
21
|
import { extractJsonCandidates, stripCodeFences } from "./json-extract.js";
|
|
21
22
|
import { rankDeepRecallFrontier } from "./recall-deep-frontier.js";
|
|
22
23
|
import { selectExpandNodeIds } from "./recall-deep-expand-select.js";
|
|
@@ -94,8 +95,19 @@ export interface DeepRecallDeps {
|
|
|
94
95
|
loadGraph(): Promise<DeepRecallGraphSnapshot>;
|
|
95
96
|
/** Namespace-scoped memory-by-id read; null when absent from the caller's namespace (§30). */
|
|
96
97
|
loadMemory(memoryId: string): Promise<DeepRecallMemoryView | null>;
|
|
97
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Raw policy LLM output (JSON text); null when the call failed. The
|
|
100
|
+
* per-call timeout already spans both LLM legs (issue #2915).
|
|
101
|
+
*/
|
|
98
102
|
callPolicy(statePrompt: string, timeoutMs: number): Promise<string | null>;
|
|
103
|
+
/**
|
|
104
|
+
* Cancellation from the transport (MCP tools/call cancelled, HTTP client
|
|
105
|
+
* disconnected — issue #2915). Checked before every step and raced against
|
|
106
|
+
* every dependency call; an abort surfaces as a standard AbortError, which
|
|
107
|
+
* both transports already translate (silently end the dead socket / rethrow
|
|
108
|
+
* the cancellation) instead of a partial `ok: true` result.
|
|
109
|
+
*/
|
|
110
|
+
signal?: AbortSignal;
|
|
99
111
|
nowMs?(): number;
|
|
100
112
|
}
|
|
101
113
|
|
|
@@ -121,28 +133,49 @@ class DeepRecallDeadlineExceeded extends Error {
|
|
|
121
133
|
}
|
|
122
134
|
|
|
123
135
|
/**
|
|
124
|
-
* Race one dependency call against the SHARED whole-invocation deadline
|
|
136
|
+
* Race one dependency call against the SHARED whole-invocation deadline AND
|
|
137
|
+
* the transport cancellation signal — one helper, never two nested races
|
|
138
|
+
* (issue #2915: an early abort return that abandons an already-started
|
|
139
|
+
* deadline timer leaves its eventual rejection unhandled).
|
|
125
140
|
*
|
|
126
141
|
* `deadlineMs` is an absolute instant computed once per invocation, so every
|
|
127
142
|
* await subtracts elapsed time instead of restarting the budget, and a stalled
|
|
128
143
|
* seed search, graph load, or memory read can no longer outlive the documented
|
|
129
144
|
* `totalTimeoutMs` just because the deadline is only *checked* between steps.
|
|
130
|
-
* An infinite deadline (`totalTimeoutMs: 0`, a documented disable value)
|
|
131
|
-
* the
|
|
145
|
+
* An infinite deadline (`totalTimeoutMs: 0`, a documented disable value) races
|
|
146
|
+
* only the signal — no timer. The timer stays REFERENCED: it is the only thing
|
|
147
|
+
* keeping the loop alive when the awaited dependency never settles. Every
|
|
148
|
+
* arm is cleared in the `finally`, whichever wins.
|
|
132
149
|
*/
|
|
133
|
-
async function
|
|
134
|
-
|
|
150
|
+
async function guardCall<T>(
|
|
151
|
+
work: Promise<T>,
|
|
152
|
+
deadlineMs: number,
|
|
153
|
+
signal: AbortSignal | undefined,
|
|
154
|
+
now: () => number,
|
|
155
|
+
): Promise<T> {
|
|
156
|
+
if (signal?.aborted) throw abortError("deep recall aborted");
|
|
157
|
+
if (!Number.isFinite(deadlineMs)) {
|
|
158
|
+
return await raceAbort(work, signal, "deep recall aborted");
|
|
159
|
+
}
|
|
135
160
|
const remaining = deadlineMs - now();
|
|
136
161
|
if (remaining <= 0) throw new DeepRecallDeadlineExceeded();
|
|
137
|
-
// The timer stays REFERENCED: it is the only thing keeping the loop alive
|
|
138
|
-
// when the awaited dependency never settles, which is precisely the case the
|
|
139
|
-
// deadline exists for. It is always cleared in the `finally`.
|
|
140
162
|
const expiry = Promise.withResolvers<never>();
|
|
141
163
|
const timer = setTimeout(() => expiry.reject(new DeepRecallDeadlineExceeded()), remaining);
|
|
164
|
+
let onAbort: (() => void) | undefined;
|
|
142
165
|
try {
|
|
143
|
-
|
|
166
|
+
const racers: Promise<T | never>[] = [work, expiry.promise];
|
|
167
|
+
if (signal) {
|
|
168
|
+
racers.push(
|
|
169
|
+
new Promise<never>((_resolve, reject) => {
|
|
170
|
+
onAbort = () => reject(abortError("deep recall aborted"));
|
|
171
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
return await Promise.race(racers);
|
|
144
176
|
} finally {
|
|
145
177
|
clearTimeout(timer);
|
|
178
|
+
if (signal && onAbort) signal.removeEventListener("abort", onAbort);
|
|
146
179
|
}
|
|
147
180
|
}
|
|
148
181
|
|
|
@@ -234,8 +267,11 @@ function nodeAddsNothing(node: AbstractionNode, workingSet: ReadonlyMap<string,
|
|
|
234
267
|
/**
|
|
235
268
|
* Frontier refresh (after every working-set change): for each working-set
|
|
236
269
|
* memory, anchors whose nodeRefs include a node listing that memory make
|
|
237
|
-
* every OTHER referenced node a frontier candidate.
|
|
238
|
-
*
|
|
270
|
+
* every OTHER referenced node a frontier candidate. `sharedAnchorCount`
|
|
271
|
+
* counts DISTINCT anchors (issue #2915): one anchor adds one no matter how
|
|
272
|
+
* many working-set memories or nodes reach the candidate through it. Ranked
|
|
273
|
+
* by the shared pure helper (shared-anchor count desc, nodeId asc — total
|
|
274
|
+
* comparator).
|
|
239
275
|
*
|
|
240
276
|
* Nodes in `expandedNodeIds` are dropped: a node EXPAND already followed is
|
|
241
277
|
* not an unretrieved candidate, even when some of its source memories never
|
|
@@ -251,7 +287,10 @@ function refreshFrontier(
|
|
|
251
287
|
const index = graph.index;
|
|
252
288
|
interface Candidate {
|
|
253
289
|
nodeId: string;
|
|
254
|
-
|
|
290
|
+
// Distinct shared anchors ONLY (issue #2915): one anchor counts once no
|
|
291
|
+
// matter how many working-set memories reach the candidate through it,
|
|
292
|
+
// so a candidate sharing one anchor can never outrank one sharing two.
|
|
293
|
+
sharedAnchorIds: Set<string>;
|
|
255
294
|
parentMemoryId: string;
|
|
256
295
|
parentScore: number;
|
|
257
296
|
anchorValue: string;
|
|
@@ -268,22 +307,32 @@ function refreshFrontier(
|
|
|
268
307
|
const otherNode = index.nodeIdToNode.get(otherNodeRef);
|
|
269
308
|
if (!otherNode || nodeAddsNothing(otherNode, workingSet)) continue;
|
|
270
309
|
const current = byNodeId.get(otherNodeRef);
|
|
271
|
-
if (current === undefined
|
|
310
|
+
if (current === undefined) {
|
|
272
311
|
byNodeId.set(otherNodeRef, {
|
|
273
312
|
nodeId: otherNodeRef,
|
|
274
|
-
|
|
313
|
+
sharedAnchorIds: new Set([anchorId]),
|
|
275
314
|
parentMemoryId: memoryId,
|
|
276
315
|
parentScore: entry.score,
|
|
277
316
|
anchorValue: anchor.anchorValue,
|
|
278
317
|
});
|
|
279
318
|
} else {
|
|
280
|
-
current.
|
|
319
|
+
current.sharedAnchorIds.add(anchorId);
|
|
320
|
+
if (entry.score > current.parentScore) {
|
|
321
|
+
current.parentMemoryId = memoryId;
|
|
322
|
+
current.parentScore = entry.score;
|
|
323
|
+
current.anchorValue = anchor.anchorValue;
|
|
324
|
+
}
|
|
281
325
|
}
|
|
282
326
|
}
|
|
283
327
|
}
|
|
284
328
|
}
|
|
285
329
|
}
|
|
286
|
-
const ranked = rankDeepRecallFrontier(
|
|
330
|
+
const ranked = rankDeepRecallFrontier(
|
|
331
|
+
[...byNodeId.values()].map((candidate) => ({
|
|
332
|
+
nodeId: candidate.nodeId,
|
|
333
|
+
sharedAnchorCount: candidate.sharedAnchorIds.size,
|
|
334
|
+
})),
|
|
335
|
+
);
|
|
287
336
|
return ranked.flatMap((rankedCandidate) => {
|
|
288
337
|
const candidate = byNodeId.get(rankedCandidate.nodeId);
|
|
289
338
|
const node = index.nodeIdToNode.get(rankedCandidate.nodeId);
|
|
@@ -363,6 +412,14 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
363
412
|
const now = deps.nowMs ?? Date.now;
|
|
364
413
|
const startedMs = now();
|
|
365
414
|
const deadlineMs = cfg.totalTimeoutMs > 0 ? startedMs + cfg.totalTimeoutMs : Number.POSITIVE_INFINITY;
|
|
415
|
+
// Every dependency await races BOTH bounds: the shared whole-invocation
|
|
416
|
+
// deadline and the transport cancellation signal (issue #2915). An abort
|
|
417
|
+
// propagates as a standard AbortError — never as ok:false backend failure
|
|
418
|
+
// and never as a partial result — so each transport applies its own
|
|
419
|
+
// cancelled-response semantics.
|
|
420
|
+
const guarded = <T>(work: Promise<T>): Promise<T> =>
|
|
421
|
+
guardCall(work, deadlineMs, deps.signal, now);
|
|
422
|
+
|
|
366
423
|
|
|
367
424
|
const trace: DeepRecallTraceStep[] = [];
|
|
368
425
|
const contentCache = new Map<string, string>();
|
|
@@ -378,7 +435,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
378
435
|
* would surface content the active-set check excluded.
|
|
379
436
|
*/
|
|
380
437
|
const hydrateOrDrop = async (memoryId: string): Promise<void> => {
|
|
381
|
-
const memory = await
|
|
438
|
+
const memory = await guarded(deps.loadMemory(memoryId));
|
|
382
439
|
if (!memory || !memory.active) {
|
|
383
440
|
workingSet.delete(memoryId);
|
|
384
441
|
contentCache.delete(memoryId);
|
|
@@ -393,9 +450,11 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
393
450
|
// working set rather than blocking the later check from ever running.
|
|
394
451
|
let exhaustedDetail: string | null = null;
|
|
395
452
|
try {
|
|
396
|
-
|
|
453
|
+
throwIfAborted(deps.signal, "deep recall aborted");
|
|
454
|
+
const seedHits = await guarded(deps.searchSeed(query, cfg.maxResults));
|
|
397
455
|
mergeIntoWorkingSet(workingSet, seedHits, "seed", contentFor);
|
|
398
456
|
} catch (err) {
|
|
457
|
+
if (isAbortError(err)) throw err;
|
|
399
458
|
if (!(err instanceof DeepRecallDeadlineExceeded)) {
|
|
400
459
|
// Seed backend failure is the only ok:false path (§22: an empty index
|
|
401
460
|
// proceeds; a thrown search does not).
|
|
@@ -405,13 +464,14 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
405
464
|
}
|
|
406
465
|
if (exhaustedDetail === null) {
|
|
407
466
|
try {
|
|
408
|
-
graph = { index: buildFrontierIndex(await
|
|
467
|
+
graph = { index: buildFrontierIndex(await guarded(deps.loadGraph())) };
|
|
409
468
|
// Seed hydration also enforces the active set: a stale or non-active
|
|
410
469
|
// QMD hit leaves the working set instead of being hydrated in place.
|
|
411
470
|
for (const memoryId of [...workingSet.keys()]) {
|
|
412
471
|
await hydrateOrDrop(memoryId);
|
|
413
472
|
}
|
|
414
473
|
} catch (err) {
|
|
474
|
+
if (isAbortError(err)) throw err;
|
|
415
475
|
if (!(err instanceof DeepRecallDeadlineExceeded)) throw err;
|
|
416
476
|
exhaustedDetail = "total timeout reached loading the graph or hydrating seeds";
|
|
417
477
|
}
|
|
@@ -447,6 +507,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
447
507
|
try {
|
|
448
508
|
while (exhaustedDetail === null && cfg.maxSteps > 0 && step < cfg.maxSteps) {
|
|
449
509
|
const stepStartMs = now();
|
|
510
|
+
throwIfAborted(deps.signal, "deep recall aborted");
|
|
450
511
|
if (now() >= deadlineMs) {
|
|
451
512
|
pushStep(step, "BUDGET_EXHAUSTED", "total timeout reached before policy call", stepStartMs);
|
|
452
513
|
break;
|
|
@@ -459,13 +520,11 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
459
520
|
const stepBudgetMs = cfg.stepTimeoutMs > 0 ? cfg.stepTimeoutMs : Number.POSITIVE_INFINITY;
|
|
460
521
|
const effectiveBudgetMs = Math.min(stepBudgetMs, deadlineMs - now());
|
|
461
522
|
const timeoutMs = Number.isFinite(effectiveBudgetMs) ? Math.max(1, effectiveBudgetMs) : 0;
|
|
462
|
-
const raw = await
|
|
523
|
+
const raw = await guarded(
|
|
463
524
|
deps.callPolicy(
|
|
464
525
|
renderStatePrompt({ query: currentQuery, workingSet, frontier, stepsRemaining: cfg.maxSteps - step }),
|
|
465
526
|
timeoutMs
|
|
466
|
-
)
|
|
467
|
-
deadlineMs,
|
|
468
|
-
now
|
|
527
|
+
)
|
|
469
528
|
);
|
|
470
529
|
const parsed = parsePolicyOutput(raw);
|
|
471
530
|
if (parsed === null) {
|
|
@@ -489,7 +548,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
489
548
|
currentQuery = rewrite.refinedQuery;
|
|
490
549
|
refinesUsed += 1;
|
|
491
550
|
try {
|
|
492
|
-
const refinedHits = await
|
|
551
|
+
const refinedHits = await guarded(deps.searchSeed(currentQuery, cfg.maxResults));
|
|
493
552
|
mergeIntoWorkingSet(workingSet, refinedHits, "refine", contentFor);
|
|
494
553
|
for (const hit of refinedHits) {
|
|
495
554
|
if (workingSet.has(hit.memoryId) && !contentCache.has(hit.memoryId)) {
|
|
@@ -499,8 +558,9 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
499
558
|
} catch (err) {
|
|
500
559
|
// Re-search failure mid-loop is partial, not fatal (§22): the loop
|
|
501
560
|
// keeps what it has and the policy decides the next move. Deadline
|
|
502
|
-
// expiry
|
|
503
|
-
|
|
561
|
+
// expiry and cancellation are NOT partial failures — they end the
|
|
562
|
+
// invocation.
|
|
563
|
+
if (err instanceof DeepRecallDeadlineExceeded || isAbortError(err)) throw err;
|
|
504
564
|
}
|
|
505
565
|
frontier = refreshFrontier(workingSet, graph, expandedNodeIds);
|
|
506
566
|
pushStep(step, "REFINE", currentQuery, stepStartMs);
|
|
@@ -528,7 +588,7 @@ export async function runBudgetedDeepRecall(deps: DeepRecallDeps, query: string)
|
|
|
528
588
|
if (!item || !node) continue;
|
|
529
589
|
for (const memoryId of (node.sourceMemoryIds ?? []).slice(0, MAX_SOURCE_MEMORY_IDS_PER_NODE)) {
|
|
530
590
|
if (workingSet.has(memoryId)) continue;
|
|
531
|
-
const memory = await
|
|
591
|
+
const memory = await guarded(deps.loadMemory(memoryId));
|
|
532
592
|
// Only active memories enter the working set (§41); a null read
|
|
533
593
|
// (foreign namespace, §30) skips the same way.
|
|
534
594
|
if (!memory || !memory.active) continue;
|
|
@@ -39,14 +39,49 @@ export function classifyExtractionThrownError(err: unknown): ExtractionFailureCl
|
|
|
39
39
|
* genuine empty-parse.
|
|
40
40
|
*/
|
|
41
41
|
export function classifyFallbackParseFailure(
|
|
42
|
-
reason: "no_models" | "empty" | "http_error",
|
|
42
|
+
reason: "no_models" | "empty" | "http_error" | "schema_rejection" | "timeout",
|
|
43
43
|
): ExtractionFailureClass {
|
|
44
44
|
switch (reason) {
|
|
45
45
|
case "no_models":
|
|
46
46
|
return "auth_config";
|
|
47
47
|
case "http_error":
|
|
48
|
+
case "timeout":
|
|
48
49
|
return "provider_retryable";
|
|
49
50
|
case "empty":
|
|
51
|
+
case "schema_rejection":
|
|
50
52
|
return "parse_empty";
|
|
51
53
|
}
|
|
52
54
|
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Operator-visible extraction parse-failure line. Keeps the historical
|
|
58
|
+
* greppable prefix and appends the fields that used to live only at debug.
|
|
59
|
+
*/
|
|
60
|
+
export function formatExtractionParseFailureLog(input: {
|
|
61
|
+
failureReason: string;
|
|
62
|
+
attemptedModel?: string;
|
|
63
|
+
httpStatus?: number;
|
|
64
|
+
errorClass?: string;
|
|
65
|
+
traceId: string;
|
|
66
|
+
}): string {
|
|
67
|
+
const modelUsed =
|
|
68
|
+
typeof input.attemptedModel === "string" && input.attemptedModel.length > 0
|
|
69
|
+
? input.attemptedModel
|
|
70
|
+
: "unknown";
|
|
71
|
+
const errorClass =
|
|
72
|
+
typeof input.errorClass === "string" && input.errorClass.length > 0
|
|
73
|
+
? input.errorClass
|
|
74
|
+
: "none";
|
|
75
|
+
const httpStatus =
|
|
76
|
+
typeof input.httpStatus === "number" && Number.isFinite(input.httpStatus)
|
|
77
|
+
? String(input.httpStatus)
|
|
78
|
+
: "none";
|
|
79
|
+
return [
|
|
80
|
+
"extraction fallback returned no parsed output",
|
|
81
|
+
`failureReason=${input.failureReason}`,
|
|
82
|
+
`modelUsed=${modelUsed}`,
|
|
83
|
+
`errorClass=${errorClass}`,
|
|
84
|
+
`httpStatus=${httpStatus}`,
|
|
85
|
+
`traceId=${input.traceId}`,
|
|
86
|
+
].join(" ");
|
|
87
|
+
}
|
|
@@ -3,7 +3,9 @@ import test from "node:test";
|
|
|
3
3
|
|
|
4
4
|
import { parseConfig } from "./config.js";
|
|
5
5
|
import { ExtractionEngine } from "./extraction.js";
|
|
6
|
-
import
|
|
6
|
+
import { initLogger, resetLogger } from "./logger.js";
|
|
7
|
+
import type { BufferTurn, ExtractionFailureClass, LlmTraceEvent } from "./types.js";
|
|
8
|
+
import type { StructuredParseFailure } from "./fallback-llm.js";
|
|
7
9
|
|
|
8
10
|
test("gateway extraction fallback honors configured timeout and output budget", async () => {
|
|
9
11
|
const config = parseConfig({
|
|
@@ -320,3 +322,110 @@ test("gateway extraction forwards caller cancellation to the provider", async ()
|
|
|
320
322
|
controller.abort(new Error("deadline"));
|
|
321
323
|
await assert.rejects(extraction, /deadline/);
|
|
322
324
|
});
|
|
325
|
+
|
|
326
|
+
function gatewayConfig() {
|
|
327
|
+
return {
|
|
328
|
+
modelSource: "gateway" as const,
|
|
329
|
+
gatewayConfig: {
|
|
330
|
+
agents: {
|
|
331
|
+
defaults: { model: { primary: "bench-internal/gpt-5.5" } },
|
|
332
|
+
list: [],
|
|
333
|
+
},
|
|
334
|
+
models: {
|
|
335
|
+
providers: {
|
|
336
|
+
"bench-internal": {
|
|
337
|
+
api: "codex-cli" as const,
|
|
338
|
+
baseUrl: "codex-cli://local",
|
|
339
|
+
models: [{ id: "gpt-5.5", name: "gpt-5.5" }],
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const RETRYABLE: ReadonlySet<ExtractionFailureClass> = new Set([
|
|
348
|
+
"provider_retryable",
|
|
349
|
+
"parse_empty",
|
|
350
|
+
"auth_config",
|
|
351
|
+
]);
|
|
352
|
+
|
|
353
|
+
test("extraction warn and llm_error keep failure classes distinct and fingerprints retryable", async () => {
|
|
354
|
+
const cases: Array<{
|
|
355
|
+
failure: StructuredParseFailure;
|
|
356
|
+
expectedClass: ExtractionFailureClass;
|
|
357
|
+
}> = [
|
|
358
|
+
{
|
|
359
|
+
failure: { result: null, failureReason: "empty", attemptedModel: "bench-internal/gpt-5.5", errorClass: "empty" },
|
|
360
|
+
expectedClass: "parse_empty",
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
failure: {
|
|
364
|
+
result: null,
|
|
365
|
+
failureReason: "schema_rejection",
|
|
366
|
+
attemptedModel: "bench-internal/gpt-5.5",
|
|
367
|
+
errorClass: "schema_rejection",
|
|
368
|
+
},
|
|
369
|
+
expectedClass: "parse_empty",
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
failure: {
|
|
373
|
+
result: null,
|
|
374
|
+
failureReason: "http_error",
|
|
375
|
+
attemptedModel: "bench-internal/gpt-5.5",
|
|
376
|
+
httpStatus: 502,
|
|
377
|
+
errorClass: "http_5xx",
|
|
378
|
+
},
|
|
379
|
+
expectedClass: "provider_retryable",
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
failure: { result: null, failureReason: "timeout", errorClass: "timeout" },
|
|
383
|
+
expectedClass: "provider_retryable",
|
|
384
|
+
},
|
|
385
|
+
];
|
|
386
|
+
|
|
387
|
+
for (const { failure, expectedClass } of cases) {
|
|
388
|
+
const warns: string[] = [];
|
|
389
|
+
const events: LlmTraceEvent[] = [];
|
|
390
|
+
initLogger({ info() {}, warn(msg) { warns.push(msg); }, error() {} }, false, { timestamps: false });
|
|
391
|
+
(globalThis as { __openclawEngramTrace?: (event: LlmTraceEvent) => void }).__openclawEngramTrace = (event) => {
|
|
392
|
+
events.push(event);
|
|
393
|
+
};
|
|
394
|
+
try {
|
|
395
|
+
const engine = new ExtractionEngine(parseConfig(gatewayConfig()));
|
|
396
|
+
(engine as unknown as {
|
|
397
|
+
fallbackLlm: {
|
|
398
|
+
parseWithSchemaDetailed(): Promise<StructuredParseFailure>;
|
|
399
|
+
};
|
|
400
|
+
}).fallbackLlm = {
|
|
401
|
+
async parseWithSchemaDetailed() {
|
|
402
|
+
return failure;
|
|
403
|
+
},
|
|
404
|
+
};
|
|
405
|
+
const result = await engine.extract([
|
|
406
|
+
{ role: "user", content: "Remember that the depot is cedar hall.", timestamp: "2026-05-08T00:00:00.000Z" },
|
|
407
|
+
]);
|
|
408
|
+
assert.equal(result.extractionFailure, "fallback_no_parsed_output");
|
|
409
|
+
assert.equal(result.extractionFailureClass, expectedClass);
|
|
410
|
+
assert.equal(RETRYABLE.has(result.extractionFailureClass ?? "provider_retryable"), true);
|
|
411
|
+
const warn = warns.find((line) => line.includes("extraction fallback returned no parsed output"));
|
|
412
|
+
assert.ok(warn, `missing warn for ${failure.failureReason}`);
|
|
413
|
+
assert.match(warn, new RegExp(`failureReason=${failure.failureReason}`));
|
|
414
|
+
assert.match(warn, /modelUsed=/);
|
|
415
|
+
assert.match(warn, /errorClass=/);
|
|
416
|
+
assert.match(warn, /httpStatus=/);
|
|
417
|
+
assert.match(warn, /traceId=/);
|
|
418
|
+
if (failure.httpStatus !== undefined) {
|
|
419
|
+
assert.match(warn, new RegExp(`httpStatus=${failure.httpStatus}`));
|
|
420
|
+
}
|
|
421
|
+
const errorEvent = events.find((event) => event.kind === "llm_error");
|
|
422
|
+
assert.ok(errorEvent, `missing llm_error for ${failure.failureReason}`);
|
|
423
|
+
assert.match(errorEvent.error ?? "", new RegExp(`failureReason=${failure.failureReason}`));
|
|
424
|
+
assert.match(errorEvent.error ?? "", /traceId=/);
|
|
425
|
+
assert.equal(errorEvent.traceId.length > 0, true);
|
|
426
|
+
} finally {
|
|
427
|
+
resetLogger();
|
|
428
|
+
delete (globalThis as { __openclawEngramTrace?: unknown }).__openclawEngramTrace;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
});
|
package/src/extraction.test.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import assert from "node:assert/strict";
|
|
11
11
|
import test from "node:test";
|
|
12
12
|
|
|
13
|
-
import { classifyExtractionThrownError, classifyFallbackParseFailure } from "./extraction.js";
|
|
13
|
+
import { classifyExtractionThrownError, classifyFallbackParseFailure, formatExtractionParseFailureLog } from "./extraction.js";
|
|
14
14
|
|
|
15
15
|
test("classifyExtractionThrownError: 401/403 → auth_config", () => {
|
|
16
16
|
assert.equal(classifyExtractionThrownError({ status: 401 }), "auth_config");
|
|
@@ -36,4 +36,22 @@ test("classifyFallbackParseFailure: maps the gateway parse-failure reasons", ()
|
|
|
36
36
|
assert.equal(classifyFallbackParseFailure("no_models"), "auth_config");
|
|
37
37
|
assert.equal(classifyFallbackParseFailure("http_error"), "provider_retryable");
|
|
38
38
|
assert.equal(classifyFallbackParseFailure("empty"), "parse_empty");
|
|
39
|
+
assert.equal(classifyFallbackParseFailure("schema_rejection"), "parse_empty");
|
|
40
|
+
assert.equal(classifyFallbackParseFailure("timeout"), "provider_retryable");
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test("formatExtractionParseFailureLog keeps the greppable prefix and distinct fields", () => {
|
|
44
|
+
const line = formatExtractionParseFailureLog({
|
|
45
|
+
failureReason: "http_error",
|
|
46
|
+
attemptedModel: "openai/test-model",
|
|
47
|
+
httpStatus: 502,
|
|
48
|
+
errorClass: "http_5xx",
|
|
49
|
+
traceId: "trace-1",
|
|
50
|
+
});
|
|
51
|
+
assert.match(line, /^extraction fallback returned no parsed output /);
|
|
52
|
+
assert.match(line, /failureReason=http_error/);
|
|
53
|
+
assert.match(line, /modelUsed=openai\/test-model/);
|
|
54
|
+
assert.match(line, /errorClass=http_5xx/);
|
|
55
|
+
assert.match(line, /httpStatus=502/);
|
|
56
|
+
assert.match(line, /traceId=trace-1/);
|
|
39
57
|
});
|
package/src/extraction.ts
CHANGED
|
@@ -38,7 +38,8 @@ import {
|
|
|
38
38
|
} from "./extraction-source-grounding.js";
|
|
39
39
|
import { applyGroundingWithConnector, headerConnector, renderExtractionConversation, resolveSourceConnector, type ExtractionGroundingContext } from "./source-agent-qualifier.js";
|
|
40
40
|
import { isMemoryCategory } from "./write-envelope.js";
|
|
41
|
-
|
|
41
|
+
export { classifyExtractionThrownError, classifyFallbackParseFailure, formatExtractionParseFailureLog } from "./extraction-error-classification.js";
|
|
42
|
+
import { classifyExtractionThrownError, classifyFallbackParseFailure, formatExtractionParseFailureLog } from "./extraction-error-classification.js";
|
|
42
43
|
import { AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT, clampAmbientCaptureConfidence } from "./ambient-provenance.js";
|
|
43
44
|
import {
|
|
44
45
|
CONSOLIDATION_RESPONSE_SCHEMA,
|
|
@@ -53,22 +54,8 @@ import {
|
|
|
53
54
|
spanModePromptSection,
|
|
54
55
|
} from "./extraction-prompt.js";
|
|
55
56
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
56
|
-
import {
|
|
57
|
-
|
|
58
|
-
extractionAttributes,
|
|
59
|
-
extractionCueAnchors,
|
|
60
|
-
extractionText,
|
|
61
|
-
isPlainRecord,
|
|
62
|
-
} from "./extraction-normalization.js";
|
|
63
|
-
export { classifyExtractionThrownError, classifyFallbackParseFailure } from "./extraction-error-classification.js";
|
|
64
|
-
import {
|
|
65
|
-
applyExtractionSpanMaterialization,
|
|
66
|
-
bindLocalExtractionPrompt,
|
|
67
|
-
buildSpanMaterializeTurns,
|
|
68
|
-
stripUntrustedFactSpans,
|
|
69
|
-
truncateLocalExtractionConversation,
|
|
70
|
-
type SpanMaterializeTurn,
|
|
71
|
-
} from "./extraction-span-materialize.js";
|
|
57
|
+
import { containsExtractionPlaceholder, extractionAttributes, extractionCueAnchors, extractionText, isPlainRecord } from "./extraction-normalization.js";
|
|
58
|
+
import { applyExtractionSpanMaterialization, bindLocalExtractionPrompt, buildSpanMaterializeTurns, stripUntrustedFactSpans, truncateLocalExtractionConversation, type SpanMaterializeTurn } from "./extraction-span-materialize.js";
|
|
72
59
|
import { resolveLocalLlmCapabilities, resolveMemoryLifecycleCapabilities, resolvePipelineProcessingCapabilities, resolveRecallAuxiliaryCapabilities } from "./capabilities.js";
|
|
73
60
|
type ExtractionQuestion = ExtractionResult["questions"][number];
|
|
74
61
|
type ExtractedFactResult = ExtractionResult["facts"][number];
|
|
@@ -1363,7 +1350,7 @@ export class ExtractionEngine {
|
|
|
1363
1350
|
this.withGatewayAgent({
|
|
1364
1351
|
temperature: 0.3,
|
|
1365
1352
|
maxTokens: this.config.extractionMaxOutputTokens,
|
|
1366
|
-
timeoutMs: this.config.localLlmTimeoutMs,
|
|
1353
|
+
timeoutMs: this.config.taskLlmTimeoutMs ?? this.config.localLlmTimeoutMs,
|
|
1367
1354
|
jsonSchema: {
|
|
1368
1355
|
name: "extraction_result",
|
|
1369
1356
|
schema: EXTRACTION_PROVIDER_JSON_SCHEMA,
|
|
@@ -1391,11 +1378,26 @@ export class ExtractionEngine {
|
|
|
1391
1378
|
return this.finalizeExtractionResult(finalResult, boundedTurns, resolvedConnector, ambientCapture);
|
|
1392
1379
|
}
|
|
1393
1380
|
|
|
1381
|
+
const parseFailure =
|
|
1382
|
+
detailed.result === null
|
|
1383
|
+
? detailed
|
|
1384
|
+
: { failureReason: "empty" as const, attemptedModel: undefined, httpStatus: undefined, errorClass: "empty" };
|
|
1385
|
+
const failureLog = formatExtractionParseFailureLog({
|
|
1386
|
+
failureReason: parseFailure.failureReason,
|
|
1387
|
+
attemptedModel: parseFailure.attemptedModel,
|
|
1388
|
+
httpStatus: parseFailure.httpStatus,
|
|
1389
|
+
errorClass: parseFailure.errorClass,
|
|
1390
|
+
traceId: fallbackTraceId,
|
|
1391
|
+
});
|
|
1394
1392
|
this.emit({
|
|
1395
|
-
kind: "llm_error",
|
|
1396
|
-
|
|
1393
|
+
kind: "llm_error",
|
|
1394
|
+
traceId: fallbackTraceId,
|
|
1395
|
+
model: parseFailure.attemptedModel ?? "fallback",
|
|
1396
|
+
operation: "extraction",
|
|
1397
|
+
durationMs: fallbackDurationMs,
|
|
1398
|
+
error: failureLog,
|
|
1397
1399
|
});
|
|
1398
|
-
log.warn(
|
|
1400
|
+
log.warn(failureLog);
|
|
1399
1401
|
const fallbackParseFailureClass: ExtractionFailureClass =
|
|
1400
1402
|
detailed.result === null
|
|
1401
1403
|
? detailed.failureReason === "no_models" && primaryExtractorAttempted
|