@remnic/core 9.45.3 → 9.45.5
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/abort-error.d.ts +2 -1
- package/dist/abort-error.js +3 -1
- package/dist/access-admin-ops-surface.d.ts +14 -10
- package/dist/access-admin-ops-surface.js +84 -75
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +14 -10
- package/dist/access-authorization-probe.js +85 -76
- package/dist/access-boundary.d.ts +15 -11
- package/dist/access-boundary.js +84 -75
- package/dist/access-citation-namespace.js +2 -2
- package/dist/access-cli.js +191 -177
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +16 -0
- package/dist/access-coding-context-resolution.js +13 -0
- package/dist/access-coding-context-resolution.js.map +1 -0
- package/dist/access-extraction-force-flush.d.ts +14 -10
- package/dist/access-extraction-force-flush.js +84 -75
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-lcm-compaction.d.ts +16 -12
- package/dist/access-http-lcm-compaction.js +3 -3
- package/dist/access-http-lifecycle-flush.d.ts +14 -10
- package/dist/access-http-lifecycle-flush.js +2 -2
- package/dist/access-http-offline-stream.d.ts +123 -0
- package/dist/access-http-offline-stream.js +10 -0
- package/dist/access-http-offline-stream.js.map +1 -0
- package/dist/access-http-query.js +84 -75
- package/dist/access-http.d.ts +15 -11
- package/dist/access-http.js +104 -90
- package/dist/access-identity-continuity-surface.d.ts +9 -8
- package/dist/access-identity-continuity-surface.js +84 -75
- package/dist/access-lcm-surface.d.ts +14 -10
- package/dist/access-lcm-surface.js +84 -75
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +14 -10
- package/dist/access-mcp.js +95 -82
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-5yZ4g6F8.d.ts → access-namespace-preflight-CWUDwB4M.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +4 -3
- package/dist/access-namespace-preflight.js +84 -75
- package/dist/access-observe-helpers.d.ts +1 -0
- package/dist/access-observe-helpers.js +1 -1
- package/dist/access-observe-write-surface.d.ts +16 -10
- package/dist/access-observe-write-surface.js +84 -75
- package/dist/access-offline-manifest.d.ts +104 -0
- package/dist/access-offline-manifest.js +45 -0
- package/dist/access-offline-manifest.js.map +1 -0
- package/dist/access-operations-batch.js +86 -77
- package/dist/access-operations.d.ts +18 -14
- package/dist/access-operations.js +91 -79
- package/dist/access-recall-concurrency.d.ts +16 -26
- package/dist/access-recall-concurrency.js +86 -76
- package/dist/access-recall-response.d.ts +18 -14
- package/dist/access-recall-response.js +84 -75
- package/dist/access-recall-surface.d.ts +29 -24
- package/dist/access-recall-surface.js +84 -75
- package/dist/access-schema.d.ts +84 -84
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-CiJRsgAB.d.ts → access-service-CNN89xyn.d.ts} +25 -16
- package/dist/access-service-helpers.d.ts +14 -10
- package/dist/access-service.d.ts +14 -10
- package/dist/access-service.js +84 -75
- package/dist/access-surface-catalog.d.ts +14 -10
- package/dist/access-surface-catalog.js +4 -0
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +4 -3
- package/dist/action-confidence.d.ts +2 -1
- package/dist/active-memory-bridge.d.ts +2 -1
- package/dist/active-recall.d.ts +2 -1
- package/dist/active-recall.js +10 -8
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-5OE5QOZB.js → auto-sync-UPTUVE4X.js} +6 -6
- package/dist/behavior-learner.d.ts +2 -1
- package/dist/behavior-learner.js +1 -1
- package/dist/behavior-signals.d.ts +2 -1
- package/dist/bootstrap.d.ts +9 -8
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +24 -22
- package/dist/buffer-surprise-report.d.ts +2 -1
- package/dist/buffer-turn-helpers.d.ts +2 -1
- package/dist/buffer.d.ts +3 -2
- package/dist/buffer.js +12 -11
- package/dist/bulk-import/index.d.ts +4 -3
- package/dist/calibration.d.ts +2 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/{capsule-merge-IDWJPCWK.js → capsule-merge-Q6AR3XL7.js} +67 -54
- package/dist/capsule-merge-Q6AR3XL7.js.map +1 -0
- package/dist/{catalog-scBmy0sO.d.ts → catalog-bctMURhN.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +2 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +2 -1
- package/dist/causal-consolidation.js +28 -26
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +2 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-E5UK4VPE.js → chunk-2FSTB6BJ.js} +5 -5
- package/dist/{chunk-5ZE7QHTK.js → chunk-2X2T2UVE.js} +5 -5
- package/dist/{chunk-P4DRWEYC.js → chunk-3COYXTGM.js} +2 -2
- package/dist/{chunk-5IVLTFOV.js → chunk-44N6ESJ4.js} +2 -2
- package/dist/{chunk-DL7ZD3JH.js → chunk-4FBVAGV3.js} +14 -9
- package/dist/chunk-4FBVAGV3.js.map +1 -0
- package/dist/{chunk-WOCNN776.js → chunk-4POAMKV6.js} +100 -41
- package/dist/chunk-4POAMKV6.js.map +1 -0
- package/dist/{chunk-HO3QBJEY.js → chunk-5546W5SI.js} +2 -2
- package/dist/{chunk-AAIUERNB.js → chunk-5QJQHBLE.js} +6 -6
- package/dist/{chunk-6CZPDBJS.js → chunk-5U7ID3EZ.js} +3 -3
- package/dist/{chunk-RN7DY3FC.js → chunk-6ISC4AVB.js} +31 -12
- package/dist/chunk-6ISC4AVB.js.map +1 -0
- package/dist/chunk-773TRRGT.js +36 -0
- package/dist/chunk-773TRRGT.js.map +1 -0
- package/dist/chunk-7T4TOGMS.js +242 -0
- package/dist/chunk-7T4TOGMS.js.map +1 -0
- package/dist/{chunk-DLVPUX7U.js → chunk-7YKVM5H3.js} +8 -6
- package/dist/chunk-7YKVM5H3.js.map +1 -0
- package/dist/chunk-7YQ6ESEA.js +322 -0
- package/dist/chunk-7YQ6ESEA.js.map +1 -0
- package/dist/{chunk-DNWXFTLD.js → chunk-A4IJCD2Z.js} +2 -2
- package/dist/{chunk-3CE77VAP.js → chunk-A4JMGKCD.js} +87 -74
- package/dist/chunk-A4JMGKCD.js.map +1 -0
- package/dist/chunk-A5KNZSNA.js +26 -0
- package/dist/chunk-A5KNZSNA.js.map +1 -0
- package/dist/{chunk-PKNLM44P.js → chunk-AC5OWJLV.js} +9 -9
- package/dist/{chunk-LZ4LDKHZ.js → chunk-AMAUBUKY.js} +6 -6
- package/dist/{chunk-CUM2BBPN.js → chunk-AUMWZSE7.js} +19 -10
- package/dist/chunk-AUMWZSE7.js.map +1 -0
- package/dist/{chunk-BUE5E2HL.js → chunk-BGLY7EEM.js} +5 -314
- package/dist/chunk-BGLY7EEM.js.map +1 -0
- package/dist/chunk-BIPBQQFI.js +44 -0
- package/dist/chunk-BIPBQQFI.js.map +1 -0
- package/dist/{chunk-S5SLVSVY.js → chunk-BQIFZ2MP.js} +5 -5
- package/dist/chunk-BTTPKDIL.js +34 -0
- package/dist/{chunk-PVGDJXVK.js.map → chunk-BTTPKDIL.js.map} +1 -1
- package/dist/chunk-CK5KOVHW.js +69 -0
- package/dist/chunk-CK5KOVHW.js.map +1 -0
- package/dist/{chunk-Q6IP2ARR.js → chunk-CSOYVTRX.js} +2 -2
- package/dist/{chunk-XOQSEF7X.js → chunk-CVILPI77.js} +6 -6
- package/dist/{chunk-VWAXN2BN.js → chunk-CX4ZUMC6.js} +91 -83
- package/dist/chunk-CX4ZUMC6.js.map +1 -0
- package/dist/{chunk-NVRYW264.js → chunk-DAJPRXBR.js} +16 -13
- package/dist/chunk-DAJPRXBR.js.map +1 -0
- package/dist/{chunk-J7VGGECD.js → chunk-DZPFMQZ7.js} +1 -1
- package/dist/chunk-DZPFMQZ7.js.map +1 -0
- package/dist/{chunk-4LMA77JH.js → chunk-E5XQIWAL.js} +3 -3
- package/dist/{chunk-WUNIWKY4.js → chunk-ELIL2A37.js} +6 -6
- package/dist/{chunk-OQ5PRDDS.js → chunk-ERZ2R42X.js} +6 -6
- package/dist/{chunk-U7GW7NE7.js → chunk-FIK3CQNA.js} +10 -10
- package/dist/{chunk-D3J5SLQK.js → chunk-FR27HBBA.js} +81 -20
- package/dist/chunk-FR27HBBA.js.map +1 -0
- package/dist/{chunk-E6PNLPGJ.js → chunk-FUCYDRE5.js} +838 -480
- package/dist/chunk-FUCYDRE5.js.map +1 -0
- package/dist/{chunk-HZFHQ4AQ.js → chunk-G7A5HLUS.js} +23 -17
- package/dist/chunk-G7A5HLUS.js.map +1 -0
- package/dist/{chunk-33PLLLL7.js → chunk-GFCVUY6G.js} +6 -6
- package/dist/{chunk-HREE4JHI.js → chunk-GODSPTOT.js} +477 -278
- package/dist/chunk-GODSPTOT.js.map +1 -0
- package/dist/{chunk-S2NCTZGJ.js → chunk-GRUYA45P.js} +15 -15
- package/dist/chunk-GRUYA45P.js.map +1 -0
- package/dist/{chunk-VUPTKTDV.js → chunk-GUAL4PQH.js} +3 -3
- package/dist/{chunk-CINZGPSJ.js → chunk-GUMZC2BO.js} +2 -2
- package/dist/{chunk-H24WNPA2.js → chunk-GWFSVJ4P.js} +3 -3
- package/dist/{chunk-7XC2HX75.js → chunk-GYPQL6XN.js} +157 -16
- package/dist/chunk-GYPQL6XN.js.map +1 -0
- package/dist/{chunk-TSH56VPU.js → chunk-HAYSYUAB.js} +2 -2
- package/dist/{chunk-PDLBLTOK.js → chunk-HC3PBX23.js} +9 -9
- package/dist/{chunk-TDHTVMPG.js → chunk-HFPASSFV.js} +7 -2
- package/dist/chunk-HFPASSFV.js.map +1 -0
- package/dist/chunk-J2WC5LF4.js +395 -0
- package/dist/chunk-J2WC5LF4.js.map +1 -0
- package/dist/{chunk-KXB4VXHY.js → chunk-JIYDRBVZ.js} +2 -2
- package/dist/chunk-JV3C2MNQ.js +74 -0
- package/dist/chunk-JV3C2MNQ.js.map +1 -0
- package/dist/{chunk-HLPD7B7P.js → chunk-JZH4LWHB.js} +2 -2
- package/dist/{chunk-AV5ZEH4M.js → chunk-KVJRXN2E.js} +2 -2
- package/dist/{chunk-WFTIGIIS.js → chunk-L6CQ7WIW.js} +5 -5
- package/dist/{chunk-227UFSEQ.js → chunk-LEPOP46W.js} +4 -4
- package/dist/{chunk-EJUEXZHX.js → chunk-LLJMAULE.js} +2 -2
- package/dist/{chunk-N5Z4EVOR.js → chunk-LNEWDF2A.js} +36 -11
- package/dist/chunk-LNEWDF2A.js.map +1 -0
- package/dist/{chunk-QN25OCUF.js → chunk-LPYDOLSM.js} +5 -5
- package/dist/{chunk-AS7YMSL6.js → chunk-M23RF3LJ.js} +4 -4
- package/dist/{chunk-OAEQLRCY.js → chunk-MO4HSXHZ.js} +5 -5
- package/dist/{chunk-ECK75GDJ.js → chunk-N3LL5NEU.js} +43 -24
- package/dist/chunk-N3LL5NEU.js.map +1 -0
- package/dist/chunk-NEF7LR5J.js +29 -0
- package/dist/chunk-NEF7LR5J.js.map +1 -0
- package/dist/{chunk-3F2LKUMU.js → chunk-NIS256NW.js} +2 -2
- package/dist/{chunk-YIAA2X3D.js → chunk-NK5RGJ65.js} +3 -3
- package/dist/chunk-NLDVVWCL.js +84 -0
- package/dist/chunk-NLDVVWCL.js.map +1 -0
- package/dist/{chunk-4J7G5SY4.js → chunk-NZBZ7IS2.js} +72 -24
- package/dist/chunk-NZBZ7IS2.js.map +1 -0
- package/dist/{chunk-3TBLDMJA.js → chunk-O4KMGRXE.js} +5 -2
- package/dist/chunk-O4KMGRXE.js.map +1 -0
- package/dist/{chunk-7TWUCYER.js → chunk-PNRA7FAD.js} +7 -7
- package/dist/{chunk-5I4M26Q7.js → chunk-QBSFOKY6.js} +4 -4
- package/dist/{chunk-E53DSZEN.js → chunk-QR6G5KF4.js} +3 -3
- package/dist/{chunk-CJ2ZR7UA.js → chunk-QUENPGWZ.js} +261 -211
- package/dist/chunk-QUENPGWZ.js.map +1 -0
- package/dist/{chunk-4UH4BTGK.js → chunk-QVJPH7SH.js} +84 -84
- package/dist/{chunk-UYLMNVY6.js → chunk-R3KHKU7M.js} +16 -9
- package/dist/chunk-R3KHKU7M.js.map +1 -0
- package/dist/{chunk-JBPKEARU.js → chunk-RKNJBZ55.js} +4 -4
- package/dist/{chunk-WDISJRMG.js → chunk-RMMVQQA6.js} +2 -2
- package/dist/{chunk-JVLCVFQ4.js → chunk-RNHVVMFN.js} +3 -3
- package/dist/{chunk-QJAQNXWI.js → chunk-RVO6TCTU.js} +81 -84
- package/dist/chunk-RVO6TCTU.js.map +1 -0
- package/dist/chunk-S2HLHAZ4.js +16 -0
- package/dist/chunk-S2HLHAZ4.js.map +1 -0
- package/dist/{chunk-KWMXR7XS.js → chunk-S2V7RUCL.js} +8 -1
- package/dist/{chunk-KWMXR7XS.js.map → chunk-S2V7RUCL.js.map} +1 -1
- package/dist/{chunk-5SM35XZR.js → chunk-S5NZBKKQ.js} +2 -2
- package/dist/{chunk-VNA7W7QF.js → chunk-SVH57F5Z.js} +12 -4
- package/dist/chunk-SVH57F5Z.js.map +1 -0
- package/dist/{chunk-WIPEXG6R.js → chunk-SXIMQLGV.js} +2 -2
- package/dist/{chunk-RVLJEII5.js → chunk-SYUBB3WM.js} +256 -187
- package/dist/chunk-SYUBB3WM.js.map +1 -0
- package/dist/{chunk-VCD4PSK2.js → chunk-TQZ4DVBC.js} +7 -4
- package/dist/chunk-TQZ4DVBC.js.map +1 -0
- package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
- package/dist/{chunk-YV32N67O.js → chunk-URS5GSM7.js} +1 -1
- package/dist/chunk-URS5GSM7.js.map +1 -0
- package/dist/{chunk-4B77XSG5.js → chunk-UV72DEZD.js} +5 -5
- package/dist/{chunk-BJKPPZ6Z.js → chunk-UW66OZTD.js} +2 -2
- package/dist/{chunk-XYTOI63Z.js → chunk-V2TNYF6Q.js} +19 -11
- package/dist/chunk-V2TNYF6Q.js.map +1 -0
- package/dist/{chunk-S2BBISHU.js → chunk-VANZKHTN.js} +3 -3
- package/dist/chunk-VHFXP27N.js +250 -0
- package/dist/chunk-VHFXP27N.js.map +1 -0
- package/dist/chunk-VL35ZFSZ.js +102 -0
- package/dist/chunk-VL35ZFSZ.js.map +1 -0
- package/dist/{chunk-3Y224NYC.js → chunk-VYISFWVX.js} +2 -2
- package/dist/{chunk-JE7EK33X.js → chunk-W2V7UESE.js} +2 -2
- package/dist/{chunk-TIHMZFIV.js → chunk-W3IC7QOY.js} +3 -3
- package/dist/{chunk-NRV4Y3PM.js → chunk-W4FBGYGK.js} +1 -1
- package/dist/{chunk-P2BM76KT.js → chunk-WAS4HV46.js} +174 -43
- package/dist/chunk-WAS4HV46.js.map +1 -0
- package/dist/{chunk-57QKLRBV.js → chunk-WB7JSQCP.js} +2 -1
- package/dist/chunk-WB7JSQCP.js.map +1 -0
- package/dist/{chunk-A5OJCXZL.js → chunk-WZ3TOIDW.js} +15 -4
- package/dist/chunk-WZ3TOIDW.js.map +1 -0
- package/dist/{chunk-MU7ZHSZE.js → chunk-WZFAPHIK.js} +2 -2
- package/dist/{chunk-T2TTP3KU.js → chunk-X4IDNPOS.js} +2 -2
- package/dist/{chunk-UVIKWC7M.js → chunk-XAGYS7X6.js} +17 -17
- package/dist/{chunk-BLAKS3CP.js → chunk-XL3TATMJ.js} +3 -3
- package/dist/{chunk-W4XJFLAL.js → chunk-XPRJSHNI.js} +2 -2
- package/dist/{chunk-5TFP4CUL.js → chunk-XQ3HXAQH.js} +14 -11
- package/dist/chunk-XQ3HXAQH.js.map +1 -0
- package/dist/{chunk-E6EE5B67.js → chunk-YK6BDDHP.js} +4 -4
- package/dist/{chunk-ES36HTSC.js → chunk-YLHM5BQQ.js} +3 -3
- package/dist/{chunk-ULARSG5Z.js → chunk-YN6ASZUG.js} +10 -8
- package/dist/{chunk-ULARSG5Z.js.map → chunk-YN6ASZUG.js.map} +1 -1
- package/dist/{chunk-VOUOLGIP.js → chunk-YRFAYOFQ.js} +11 -13
- package/dist/chunk-YRFAYOFQ.js.map +1 -0
- package/dist/{chunk-IKKWIPYN.js → chunk-YYQAKIDJ.js} +37 -1
- package/dist/chunk-YYQAKIDJ.js.map +1 -0
- package/dist/{chunk-GF22HWS2.js → chunk-Z54EM5YZ.js} +4 -4
- package/dist/{chunk-64UDOIMI.js → chunk-ZLQ37WJX.js} +2 -2
- package/dist/{cli-BUGN3d6_.d.ts → cli-BHBswmUa.d.ts} +5 -5
- package/dist/cli.d.ts +16 -12
- package/dist/cli.js +138 -123
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +25 -23
- package/dist/compounding/preference-consolidator.d.ts +2 -1
- package/dist/compression-optimizer.d.ts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/config.js +10 -8
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +24 -22
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +27 -25
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-provenance-check.js +4 -4
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/consolidation-undo.js +10 -7
- package/dist/consolidation-undo.js.map +1 -1
- package/dist/contradiction/index.d.ts +3 -2
- package/dist/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +4 -3
- package/dist/convergence-refresh.js +28 -26
- package/dist/conversation-index/backend.d.ts +2 -1
- package/dist/conversation-index/backend.js +2 -2
- package/dist/conversation-index/chunker.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.d.ts +2 -1
- package/dist/conversation-index/indexer.d.ts +2 -1
- package/dist/conversation-index/search.d.ts +2 -1
- package/dist/corpus-watermark.d.ts +2 -1
- package/dist/corpus-watermark.js +43 -41
- package/dist/day-summary.d.ts +2 -1
- package/dist/delinearize.d.ts +2 -1
- package/dist/direct-answer-wiring.d.ts +2 -1
- package/dist/direct-answer-wiring.js +2 -2
- package/dist/direct-answer.d.ts +2 -1
- package/dist/embedding-fallback.d.ts +2 -1
- package/dist/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +2 -1
- package/dist/entity-retrieval-boundaries.js +1 -1
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +25 -23
- package/dist/entity-schema.d.ts +2 -1
- package/dist/explicit-capture.d.ts +9 -8
- package/dist/explicit-capture.js +11 -9
- package/dist/external-wiki-access.d.ts +127 -0
- package/dist/external-wiki-access.js +187 -0
- package/dist/external-wiki-access.js.map +1 -0
- package/dist/external-wiki-cli.d.ts +13 -0
- package/dist/external-wiki-cli.js +10 -0
- package/dist/external-wiki-cli.js.map +1 -0
- package/dist/external-wiki-collection-registration.d.ts +39 -0
- package/dist/external-wiki-collection-registration.js +79 -0
- package/dist/external-wiki-collection-registration.js.map +1 -0
- package/dist/external-wiki-collection.d.ts +50 -0
- package/dist/external-wiki-collection.js +387 -0
- package/dist/external-wiki-collection.js.map +1 -0
- package/dist/external-wiki-config.d.ts +13 -0
- package/dist/external-wiki-config.js +13 -0
- package/dist/external-wiki-config.js.map +1 -0
- package/dist/external-wiki-guard.d.ts +11 -0
- package/dist/external-wiki-guard.js +18 -0
- package/dist/external-wiki-guard.js.map +1 -0
- package/dist/external-wiki-mcp-tools.d.ts +123 -0
- package/dist/external-wiki-mcp-tools.js +8 -0
- package/dist/external-wiki-mcp-tools.js.map +1 -0
- package/dist/external-wiki-search.d.ts +42 -0
- package/dist/external-wiki-search.js +11 -0
- package/dist/external-wiki-search.js.map +1 -0
- package/dist/external-wiki.d.ts +39 -0
- package/dist/external-wiki.js +14 -0
- package/dist/external-wiki.js.map +1 -0
- package/dist/extraction-error-classification.d.ts +2 -1
- package/dist/extraction-faithfulness.d.ts +2 -1
- package/dist/extraction-judge-telemetry.d.ts +2 -1
- package/dist/extraction-judge-training.d.ts +2 -1
- package/dist/extraction-judge.d.ts +2 -1
- package/dist/extraction-liveness.d.ts +2 -1
- package/dist/extraction-source-grounding-helpers.d.ts +5 -3
- package/dist/extraction-source-grounding-helpers.js +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +2 -1
- package/dist/extraction-source-grounding-rules.js +2 -2
- package/dist/extraction-source-grounding.d.ts +2 -1
- package/dist/extraction-source-grounding.js +5 -5
- package/dist/extraction.d.ts +2 -1
- package/dist/extraction.js +46 -43
- package/dist/fallback-llm.d.ts +2 -1
- package/dist/{first-start-migration-F2QJD66E.js → first-start-migration-ZSHEFEI3.js} +10 -12
- package/dist/{first-start-migration-F2QJD66E.js.map → first-start-migration-ZSHEFEI3.js.map} +1 -1
- package/dist/graph-dashboard-diff.d.ts +2 -1
- package/dist/graph-dashboard-key.d.ts +2 -1
- package/dist/graph-dashboard-parser.d.ts +2 -1
- package/dist/graph-edge-reinforcement.d.ts +2 -1
- package/dist/graph-snapshot.d.ts +2 -1
- package/dist/graph.d.ts +2 -1
- package/dist/harmonic-retrieval.js +2 -2
- package/dist/importance.d.ts +2 -1
- package/dist/importers/index.d.ts +2 -1
- package/dist/in-flight-reads.d.ts +2 -1
- package/dist/index.d.ts +443 -430
- package/dist/index.js +304 -269
- package/dist/intent.d.ts +2 -1
- package/dist/lcm/engine.d.ts +2 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +2 -1
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/tools.d.ts +2 -1
- package/dist/lifecycle.d.ts +2 -1
- package/dist/live-connectors-runner.d.ts +2 -1
- package/dist/local-llm.d.ts +2 -1
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +2 -1
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +25 -23
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +25 -23
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +27 -25
- package/dist/{maintenance-LbuS2rUA.d.ts → maintenance-CoRikzIt.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +14 -10
- package/dist/mcp-read-only-tools.js +1 -1
- package/dist/memory-action-policy.d.ts +2 -1
- package/dist/memory-cache.d.ts +2 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
- package/dist/memory-projection-store.d.ts +2 -1
- package/dist/memory-provenance.d.ts +2 -1
- package/dist/memory-snapshot.d.ts +10 -0
- package/dist/memory-snapshot.js +8 -0
- package/dist/memory-snapshot.js.map +1 -0
- package/dist/memory-worth-outcomes.d.ts +3 -2
- package/dist/models-json.d.ts +2 -1
- package/dist/namespaces/migrate.d.ts +4 -3
- package/dist/namespaces/migrate.js +41 -39
- package/dist/namespaces/principal.d.ts +2 -1
- package/dist/namespaces/search.d.ts +2 -1
- package/dist/namespaces/search.js +18 -18
- package/dist/namespaces/storage.d.ts +4 -3
- package/dist/namespaces/storage.js +24 -22
- package/dist/native-knowledge.d.ts +2 -1
- package/dist/offline-sync-impression-drain.d.ts +2 -1
- package/dist/offline-sync-impression-drain.js +11 -9
- package/dist/offline-sync.d.ts +29 -3
- package/dist/offline-sync.js +6 -2
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +46 -44
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-doctor-replica.js +3 -3
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +60 -55
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +37 -33
- package/dist/{orchestrator-rHiWt32X.d.ts → orchestrator-BJeq7Pw1.d.ts} +14 -7
- package/dist/orchestrator.d.ts +9 -8
- package/dist/orchestrator.js +200 -186
- package/dist/page-versioning.js +3 -3
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-W_97O8BV.d.ts → pipeline-CNjY4wk3.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +2 -1
- package/dist/policy-runtime.js +1 -1
- package/dist/proactive-contention.d.ts +2 -1
- package/dist/provenance.d.ts +2 -1
- package/dist/provenance.js +2 -2
- package/dist/{qmd-LWtMofAf.d.ts → qmd-C0UDZidt.d.ts} +9 -7
- package/dist/qmd-preflight.d.ts +5 -4
- package/dist/qmd-preflight.js +2 -2
- package/dist/qmd-recall-cache.d.ts +2 -1
- package/dist/qmd.d.ts +4 -3
- package/dist/qmd.js +8 -8
- package/dist/recall-concurrency-config.d.ts +2 -1
- package/dist/recall-disclosure-escalation.d.ts +2 -1
- package/dist/recall-explain-renderer.d.ts +2 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +2 -1
- package/dist/recall-planner-llm.d.ts +2 -1
- package/dist/recall-state.d.ts +2 -1
- package/dist/recall-tag-filter.d.ts +2 -1
- package/dist/recall-timings.d.ts +2 -1
- package/dist/recall-xray-cli.d.ts +2 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +2 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +8 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +12 -2
- package/dist/reconcile/cursor.js +46 -7
- package/dist/reconcile/cursor.js.map +1 -1
- package/dist/reconcile/manifest.d.ts +9 -2
- package/dist/reconcile/manifest.js +15 -268
- package/dist/reconcile/manifest.js.map +1 -1
- package/dist/reconcile/plan.d.ts +4 -1
- package/dist/reconcile/plan.js +4 -4
- package/dist/replay/normalizers/chatgpt.d.ts +2 -1
- package/dist/replay/normalizers/claude.d.ts +2 -1
- package/dist/replay/normalizers/openclaw.d.ts +2 -1
- package/dist/replay/normalizers/shared.d.ts +2 -1
- package/dist/replay/runner.d.ts +2 -1
- package/dist/replay/types.d.ts +2 -1
- package/dist/replica-divergence.d.ts +2 -1
- package/dist/replica-divergence.js +2 -2
- package/dist/replica-peers-config.d.ts +2 -1
- package/dist/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +12 -10
- package/dist/retrieval-agents.d.ts +4 -3
- package/dist/retrieval-agents.js +2 -2
- package/dist/retrieval-tiers.d.ts +2 -1
- package/dist/routing/engine.d.ts +2 -1
- package/dist/routing/store.d.ts +2 -1
- package/dist/salvage-envelope.d.ts +2 -1
- package/dist/schemas.d.ts +54 -54
- package/dist/{scope-profiles-BiQKOE-p.d.ts → scope-profiles-BJzp2F5A.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +2 -1
- package/dist/search/embed-helper.js +3 -3
- package/dist/search/factory.d.ts +4 -2
- package/dist/search/factory.js +20 -18
- package/dist/search/index.d.ts +2 -1
- package/dist/search/index.js +20 -20
- package/dist/search/lancedb-backend.d.ts +2 -1
- package/dist/search/lancedb-backend.js +4 -4
- package/dist/search/meilisearch-backend.d.ts +2 -1
- package/dist/search/meilisearch-backend.js +4 -4
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/orama-backend.d.ts +2 -1
- package/dist/search/orama-backend.js +4 -4
- package/dist/search/port.d.ts +18 -1
- package/dist/search/port.js +1 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/search/remote-backend.js +2 -2
- package/dist/secure-store/index.js +2 -2
- package/dist/{semantic-consolidation-dHYCyqgh.d.ts → semantic-consolidation-D4KAZO2G.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +26 -24
- package/dist/semantic-rule-promotion.js +24 -22
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +25 -23
- package/dist/{service-DJG3KCQ4.d.ts → service-DWC4tq7p.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +2 -1
- package/dist/session-observer-state.d.ts +2 -1
- package/dist/shared-context/manager.d.ts +10 -9
- package/dist/shared-context/manager.js +2 -2
- package/dist/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +43 -40
- package/dist/{storage-F9FVh-w9.d.ts → storage-DPGjB-8e.d.ts} +28 -13
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +26 -24
- package/dist/summarizer.d.ts +2 -1
- package/dist/summarizer.js +5 -5
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/temporal-supersession.d.ts +3 -2
- package/dist/temporal-timeline-recall.d.ts +2 -1
- package/dist/temporal-validity.d.ts +2 -1
- package/dist/threading.d.ts +2 -1
- package/dist/tier-migration.d.ts +3 -2
- package/dist/tier-migration.js +1 -1
- package/dist/tier-routing.d.ts +2 -1
- package/dist/tool-scoped-memory.d.ts +5 -1
- package/dist/tool-scoped-memory.js +3 -1
- package/dist/topics.d.ts +2 -1
- package/dist/transcript.d.ts +2 -1
- package/dist/transfer/capsule-import.js +4 -4
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/{types-rEwubvim.d.ts → types-yX_FwERf.d.ts} +8 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +2 -1
- package/dist/verified-recall.js +25 -23
- package/dist/write-envelope.d.ts +2 -1
- package/package.json +2 -2
- package/src/abort-error.ts +17 -0
- package/src/access-admin-ops-surface.ts +1 -0
- package/src/access-boundary.ts +1 -0
- package/src/access-coding-context-resolution.ts +42 -0
- package/src/access-extraction-force-flush.ts +38 -2
- package/src/access-http-lcm-compaction.ts +5 -2
- package/src/access-http-offline-stream.ts +80 -0
- package/src/access-http.test.ts +310 -3
- package/src/access-http.ts +84 -77
- package/src/access-mcp-output-schemas.ts +36 -0
- package/src/access-mcp.test.ts +95 -1
- package/src/access-mcp.ts +7 -9
- package/src/access-observe-helpers.ts +64 -22
- package/src/access-observe-write-surface.ts +8 -0
- package/src/access-offline-manifest.ts +54 -0
- package/src/access-operations-batch.ts +3 -3
- package/src/access-operations.ts +13 -7
- package/src/access-recall-concurrency.ts +3 -27
- package/src/access-recall-surface.ts +3 -0
- package/src/access-service-health.test.ts +32 -7
- package/src/access-service-namespace.test.ts +55 -0
- package/src/access-service-observe-idempotency.test.ts +34 -2
- package/src/access-service-observe-lcm-parity.test.ts +183 -23
- package/src/access-service-observe-scope.test.ts +160 -1
- package/src/access-service-offline-file-content.test.ts +345 -1
- package/src/access-service.ts +88 -62
- package/src/access-surface-catalog.ts +4 -0
- package/src/admin/admin-surfaces.ts +2 -0
- package/src/binary-lifecycle/pipeline.test.ts +106 -1
- package/src/binary-lifecycle/pipeline.ts +3 -0
- package/src/coding/git-context.test.ts +47 -0
- package/src/coding/git-context.ts +129 -27
- package/src/config.test.ts +24 -0
- package/src/config.ts +9 -12
- package/src/connector-provenance.test.ts +101 -0
- package/src/consolidation-undo.ts +3 -0
- package/src/convergence-refresh.ts +14 -2
- package/src/correction/correction-access-wiring.ts +9 -7
- package/src/correction/correction-executor.test.ts +206 -2
- package/src/correction/correction-executor.ts +29 -20
- package/src/correction/correction-planner.test.ts +36 -0
- package/src/correction/correction-planner.ts +9 -15
- package/src/correction/correction-service.ts +3 -1
- package/src/correction/correction-storage-integration.test.ts +77 -0
- package/src/correction/correction-surfaces.test.ts +41 -28
- package/src/correction/passive-capture.test.ts +59 -0
- package/src/correction/passive-capture.ts +4 -1
- package/src/entity-retrieval-boundaries.ts +17 -4
- package/src/entity-retrieval.ts +27 -6
- package/src/external-wiki-access.test.ts +65 -0
- package/src/external-wiki-access.ts +31 -0
- package/src/external-wiki-cli.ts +100 -0
- package/src/external-wiki-collection-registration.test.ts +163 -0
- package/src/external-wiki-collection-registration.ts +101 -0
- package/src/external-wiki-collection.test.ts +502 -0
- package/src/external-wiki-collection.ts +503 -0
- package/src/external-wiki-config.test.ts +135 -0
- package/src/external-wiki-config.ts +100 -0
- package/src/external-wiki-guard.ts +83 -0
- package/src/external-wiki-mcp-tools.ts +23 -0
- package/src/external-wiki-search.test.ts +367 -0
- package/src/external-wiki-search.ts +362 -0
- package/src/external-wiki.test.ts +240 -0
- package/src/external-wiki.ts +427 -0
- package/src/extraction-scope-source-agent.test.ts +21 -0
- package/src/extraction-source-grounding-helpers.ts +243 -53
- package/src/extraction-source-grounding-rules.ts +133 -39
- package/src/extraction-source-grounding.test.ts +363 -33
- package/src/extraction-timeout.test.ts +1 -0
- package/src/extraction-watermark.test.ts +150 -7
- package/src/extraction.ts +8 -1
- package/src/index.ts +9 -5
- package/src/maintenance/first-start-migration.ts +11 -11
- package/src/mcp-read-only-tools.ts +1 -0
- package/src/memory-snapshot.ts +15 -0
- package/src/offline-sync.test.ts +194 -0
- package/src/offline-sync.ts +217 -13
- package/src/orchestration/external-wiki-recall-guard.test.ts +94 -0
- package/src/orchestration/extraction-persist.ts +19 -2
- package/src/orchestration/extraction-run-helpers.ts +37 -19
- package/src/orchestration/extraction-run.test.ts +171 -2
- package/src/orchestration/extraction-run.ts +11 -13
- package/src/orchestration/extraction-watermark.ts +106 -17
- package/src/orchestration/generic-recall-paths.ts +14 -0
- package/src/orchestration/orchestrator-helpers.ts +2 -0
- package/src/orchestration/orchestrator-init.ts +9 -0
- package/src/orchestration/recall-internal-deps.ts +6 -0
- package/src/orchestration/recall-internal.ts +154 -33
- package/src/orchestration/recall-rerank-coordinator.ts +60 -25
- package/src/orchestration/recall-search-pipeline.test.ts +75 -1
- package/src/orchestration/recall-search-pipeline.ts +50 -10
- package/src/orchestrator-convergence-refresh.test.ts +36 -2
- package/src/orchestrator.ts +13 -3
- package/src/page-versioning.ts +5 -19
- package/src/procedural/procedure-recall.ts +5 -1
- package/src/provenance-surfaces.test.ts +3 -0
- package/src/qmd-client.test.ts +78 -17
- package/src/qmd.test.ts +24 -0
- package/src/qmd.ts +224 -315
- package/src/recall-explain-renderer.ts +3 -0
- package/src/recall-rerank-coordinator.test.ts +61 -0
- package/src/recall-xray-renderer.test.ts +6 -0
- package/src/recall-xray.test.ts +88 -1
- package/src/recall-xray.ts +15 -0
- package/src/reconcile/cursor.test.ts +48 -0
- package/src/reconcile/cursor.ts +58 -11
- package/src/reconcile/manifest.test.ts +4 -0
- package/src/reconcile/manifest.ts +41 -51
- package/src/reconcile/plan.test.ts +4 -0
- package/src/reconcile/plan.ts +28 -16
- package/src/search/factory.ts +6 -6
- package/src/search/port.ts +25 -9
- package/src/secure-store/secure-fs.ts +20 -12
- package/src/secure-store/secure-store.test.ts +41 -2
- package/src/spaces/index.test.ts +61 -2
- package/src/spaces/index.ts +44 -18
- package/src/storage/entity-alias-config.ts +97 -0
- package/src/storage/entity-canonical-id-lock.ts +53 -23
- package/src/storage/entity-canonical-id-migration.ts +53 -22
- package/src/storage/entity-canonical-id-references.ts +3 -0
- package/src/storage/entity-id-safety.ts +7 -0
- package/src/storage/entity-store.ts +6 -2
- package/src/storage/memory-frontmatter-metadata.ts +4 -9
- package/src/storage/memory-migration-serialization.ts +10 -15
- package/src/storage/tombstone-blocked-capture-mutation.ts +52 -64
- package/src/storage/tombstone-blocked-capture-sync.ts +244 -199
- package/src/storage-contract/cache-coherence.test.ts +99 -0
- package/src/storage-deletion-revisions.test.ts +91 -0
- package/src/storage-fact-hash-index-defer.test.ts +460 -170
- package/src/storage.ts +572 -284
- package/src/testing/subjects/first-start-tier-migration.test.ts +75 -0
- package/src/tier-migration.ts +10 -12
- package/src/tool-scoped-memory.ts +10 -0
- package/src/transfer/capsule-import.ts +13 -0
- package/src/transfer/capsule-merge.ts +13 -0
- package/src/trust-score-recall-paths.test.ts +75 -1
- package/src/types.ts +7 -3
- package/dist/capsule-merge-IDWJPCWK.js.map +0 -1
- package/dist/chunk-3CE77VAP.js.map +0 -1
- package/dist/chunk-3TBLDMJA.js.map +0 -1
- package/dist/chunk-4J7G5SY4.js.map +0 -1
- package/dist/chunk-57QKLRBV.js.map +0 -1
- package/dist/chunk-5TFP4CUL.js.map +0 -1
- package/dist/chunk-7XC2HX75.js.map +0 -1
- package/dist/chunk-A5OJCXZL.js.map +0 -1
- package/dist/chunk-BUE5E2HL.js.map +0 -1
- package/dist/chunk-CJ2ZR7UA.js.map +0 -1
- package/dist/chunk-CUM2BBPN.js.map +0 -1
- package/dist/chunk-D3J5SLQK.js.map +0 -1
- package/dist/chunk-DL7ZD3JH.js.map +0 -1
- package/dist/chunk-DLVPUX7U.js.map +0 -1
- package/dist/chunk-E6PNLPGJ.js.map +0 -1
- package/dist/chunk-ECK75GDJ.js.map +0 -1
- package/dist/chunk-HREE4JHI.js.map +0 -1
- package/dist/chunk-HZFHQ4AQ.js.map +0 -1
- package/dist/chunk-IKKWIPYN.js.map +0 -1
- package/dist/chunk-J7VGGECD.js.map +0 -1
- package/dist/chunk-N5Z4EVOR.js.map +0 -1
- package/dist/chunk-NVRYW264.js.map +0 -1
- package/dist/chunk-P2BM76KT.js.map +0 -1
- package/dist/chunk-PVGDJXVK.js +0 -21
- package/dist/chunk-QJAQNXWI.js.map +0 -1
- package/dist/chunk-RN7DY3FC.js.map +0 -1
- package/dist/chunk-RVLJEII5.js.map +0 -1
- package/dist/chunk-S2NCTZGJ.js.map +0 -1
- package/dist/chunk-TDHTVMPG.js.map +0 -1
- package/dist/chunk-UYLMNVY6.js.map +0 -1
- package/dist/chunk-VCD4PSK2.js.map +0 -1
- package/dist/chunk-VNA7W7QF.js.map +0 -1
- package/dist/chunk-VOUOLGIP.js.map +0 -1
- package/dist/chunk-VWAXN2BN.js.map +0 -1
- package/dist/chunk-WOCNN776.js.map +0 -1
- package/dist/chunk-XYTOI63Z.js.map +0 -1
- package/dist/chunk-YV32N67O.js.map +0 -1
- /package/dist/{auto-sync-5OE5QOZB.js.map → auto-sync-UPTUVE4X.js.map} +0 -0
- /package/dist/{chunk-E5UK4VPE.js.map → chunk-2FSTB6BJ.js.map} +0 -0
- /package/dist/{chunk-5ZE7QHTK.js.map → chunk-2X2T2UVE.js.map} +0 -0
- /package/dist/{chunk-P4DRWEYC.js.map → chunk-3COYXTGM.js.map} +0 -0
- /package/dist/{chunk-5IVLTFOV.js.map → chunk-44N6ESJ4.js.map} +0 -0
- /package/dist/{chunk-HO3QBJEY.js.map → chunk-5546W5SI.js.map} +0 -0
- /package/dist/{chunk-AAIUERNB.js.map → chunk-5QJQHBLE.js.map} +0 -0
- /package/dist/{chunk-6CZPDBJS.js.map → chunk-5U7ID3EZ.js.map} +0 -0
- /package/dist/{chunk-DNWXFTLD.js.map → chunk-A4IJCD2Z.js.map} +0 -0
- /package/dist/{chunk-PKNLM44P.js.map → chunk-AC5OWJLV.js.map} +0 -0
- /package/dist/{chunk-LZ4LDKHZ.js.map → chunk-AMAUBUKY.js.map} +0 -0
- /package/dist/{chunk-S5SLVSVY.js.map → chunk-BQIFZ2MP.js.map} +0 -0
- /package/dist/{chunk-Q6IP2ARR.js.map → chunk-CSOYVTRX.js.map} +0 -0
- /package/dist/{chunk-XOQSEF7X.js.map → chunk-CVILPI77.js.map} +0 -0
- /package/dist/{chunk-4LMA77JH.js.map → chunk-E5XQIWAL.js.map} +0 -0
- /package/dist/{chunk-WUNIWKY4.js.map → chunk-ELIL2A37.js.map} +0 -0
- /package/dist/{chunk-OQ5PRDDS.js.map → chunk-ERZ2R42X.js.map} +0 -0
- /package/dist/{chunk-U7GW7NE7.js.map → chunk-FIK3CQNA.js.map} +0 -0
- /package/dist/{chunk-33PLLLL7.js.map → chunk-GFCVUY6G.js.map} +0 -0
- /package/dist/{chunk-VUPTKTDV.js.map → chunk-GUAL4PQH.js.map} +0 -0
- /package/dist/{chunk-CINZGPSJ.js.map → chunk-GUMZC2BO.js.map} +0 -0
- /package/dist/{chunk-H24WNPA2.js.map → chunk-GWFSVJ4P.js.map} +0 -0
- /package/dist/{chunk-TSH56VPU.js.map → chunk-HAYSYUAB.js.map} +0 -0
- /package/dist/{chunk-PDLBLTOK.js.map → chunk-HC3PBX23.js.map} +0 -0
- /package/dist/{chunk-KXB4VXHY.js.map → chunk-JIYDRBVZ.js.map} +0 -0
- /package/dist/{chunk-HLPD7B7P.js.map → chunk-JZH4LWHB.js.map} +0 -0
- /package/dist/{chunk-AV5ZEH4M.js.map → chunk-KVJRXN2E.js.map} +0 -0
- /package/dist/{chunk-WFTIGIIS.js.map → chunk-L6CQ7WIW.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-LEPOP46W.js.map} +0 -0
- /package/dist/{chunk-EJUEXZHX.js.map → chunk-LLJMAULE.js.map} +0 -0
- /package/dist/{chunk-QN25OCUF.js.map → chunk-LPYDOLSM.js.map} +0 -0
- /package/dist/{chunk-AS7YMSL6.js.map → chunk-M23RF3LJ.js.map} +0 -0
- /package/dist/{chunk-OAEQLRCY.js.map → chunk-MO4HSXHZ.js.map} +0 -0
- /package/dist/{chunk-3F2LKUMU.js.map → chunk-NIS256NW.js.map} +0 -0
- /package/dist/{chunk-YIAA2X3D.js.map → chunk-NK5RGJ65.js.map} +0 -0
- /package/dist/{chunk-7TWUCYER.js.map → chunk-PNRA7FAD.js.map} +0 -0
- /package/dist/{chunk-5I4M26Q7.js.map → chunk-QBSFOKY6.js.map} +0 -0
- /package/dist/{chunk-E53DSZEN.js.map → chunk-QR6G5KF4.js.map} +0 -0
- /package/dist/{chunk-4UH4BTGK.js.map → chunk-QVJPH7SH.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-RKNJBZ55.js.map} +0 -0
- /package/dist/{chunk-WDISJRMG.js.map → chunk-RMMVQQA6.js.map} +0 -0
- /package/dist/{chunk-JVLCVFQ4.js.map → chunk-RNHVVMFN.js.map} +0 -0
- /package/dist/{chunk-5SM35XZR.js.map → chunk-S5NZBKKQ.js.map} +0 -0
- /package/dist/{chunk-WIPEXG6R.js.map → chunk-SXIMQLGV.js.map} +0 -0
- /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
- /package/dist/{chunk-4B77XSG5.js.map → chunk-UV72DEZD.js.map} +0 -0
- /package/dist/{chunk-BJKPPZ6Z.js.map → chunk-UW66OZTD.js.map} +0 -0
- /package/dist/{chunk-S2BBISHU.js.map → chunk-VANZKHTN.js.map} +0 -0
- /package/dist/{chunk-3Y224NYC.js.map → chunk-VYISFWVX.js.map} +0 -0
- /package/dist/{chunk-JE7EK33X.js.map → chunk-W2V7UESE.js.map} +0 -0
- /package/dist/{chunk-TIHMZFIV.js.map → chunk-W3IC7QOY.js.map} +0 -0
- /package/dist/{chunk-NRV4Y3PM.js.map → chunk-W4FBGYGK.js.map} +0 -0
- /package/dist/{chunk-MU7ZHSZE.js.map → chunk-WZFAPHIK.js.map} +0 -0
- /package/dist/{chunk-T2TTP3KU.js.map → chunk-X4IDNPOS.js.map} +0 -0
- /package/dist/{chunk-UVIKWC7M.js.map → chunk-XAGYS7X6.js.map} +0 -0
- /package/dist/{chunk-BLAKS3CP.js.map → chunk-XL3TATMJ.js.map} +0 -0
- /package/dist/{chunk-W4XJFLAL.js.map → chunk-XPRJSHNI.js.map} +0 -0
- /package/dist/{chunk-E6EE5B67.js.map → chunk-YK6BDDHP.js.map} +0 -0
- /package/dist/{chunk-ES36HTSC.js.map → chunk-YLHM5BQQ.js.map} +0 -0
- /package/dist/{chunk-GF22HWS2.js.map → chunk-Z54EM5YZ.js.map} +0 -0
- /package/dist/{chunk-64UDOIMI.js.map → chunk-ZLQ37WJX.js.map} +0 -0
|
@@ -309,11 +309,11 @@ export async function runExtractionPostPersist(
|
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
312
|
+
* Record a processed fingerprint when applicable and advance the extraction
|
|
313
|
+
* liveness watermark only for a provider-backed empty success. Fingerprinted
|
|
314
|
+
* imports treat the metadata save as load-bearing dedupe state; normal live
|
|
315
|
+
* runs treat the stamp as diagnostic and fail open. Deadline errors always
|
|
316
|
+
* propagate.
|
|
317
317
|
*/
|
|
318
318
|
export async function commitEmptySuccessExtraction(args: {
|
|
319
319
|
storage: StorageManager;
|
|
@@ -321,6 +321,7 @@ export async function commitEmptySuccessExtraction(args: {
|
|
|
321
321
|
extractionFingerprint: string | null;
|
|
322
322
|
shouldPersistProcessedFingerprint: boolean;
|
|
323
323
|
hasExtractionFailure: boolean;
|
|
324
|
+
extractionSkippedReason: ExtractionResult["extractionSkippedReason"];
|
|
324
325
|
recordProcessedExtractionFingerprint: (storage: StorageManager, fingerprint: string, meta: MetaState) => Promise<unknown>;
|
|
325
326
|
runDeadlineAware: <T>(operation: () => Promise<T>, phase: string, clearTimerOnError?: boolean) => Promise<T>;
|
|
326
327
|
isDeadlineError: (error: unknown) => boolean;
|
|
@@ -331,26 +332,43 @@ export async function commitEmptySuccessExtraction(args: {
|
|
|
331
332
|
extractionFingerprint,
|
|
332
333
|
shouldPersistProcessedFingerprint,
|
|
333
334
|
hasExtractionFailure,
|
|
335
|
+
extractionSkippedReason,
|
|
334
336
|
recordProcessedExtractionFingerprint,
|
|
335
337
|
runDeadlineAware,
|
|
336
338
|
isDeadlineError,
|
|
337
339
|
} = args;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
340
|
+
const shouldRecordFingerprint =
|
|
341
|
+
extractionFingerprint !== null &&
|
|
342
|
+
shouldPersistProcessedFingerprint &&
|
|
343
|
+
!hasExtractionFailure;
|
|
344
|
+
const shouldStampLiveness =
|
|
345
|
+
!hasExtractionFailure && extractionSkippedReason === undefined;
|
|
346
|
+
if (!shouldRecordFingerprint && !shouldStampLiveness) return;
|
|
347
|
+
|
|
348
|
+
const metadataFailureIsFatal = shouldRecordFingerprint;
|
|
349
|
+
try {
|
|
350
|
+
const meta =
|
|
351
|
+
existingMeta ??
|
|
352
|
+
await runDeadlineAware(
|
|
353
|
+
() => storage.loadMeta(),
|
|
354
|
+
"during_empty_success_liveness_load",
|
|
355
|
+
false,
|
|
356
|
+
);
|
|
357
|
+
if (shouldRecordFingerprint) {
|
|
358
|
+
await recordProcessedExtractionFingerprint(storage, extractionFingerprint, meta);
|
|
359
|
+
}
|
|
360
|
+
if (shouldStampLiveness) {
|
|
347
361
|
meta.extractionCount += 1;
|
|
348
362
|
meta.lastExtractionAt = new Date().toISOString();
|
|
349
|
-
await runDeadlineAware(() => storage.saveMeta(meta!), "during_empty_success_liveness_save", false);
|
|
350
|
-
} catch (err) {
|
|
351
|
-
if (isDeadlineError(err)) throw err;
|
|
352
|
-
if (livenessStampFatal) throw err;
|
|
353
|
-
log.warn("runExtraction: failed to stamp empty-success liveness watermark (non-fatal)", err);
|
|
354
363
|
}
|
|
364
|
+
await runDeadlineAware(
|
|
365
|
+
() => storage.saveMeta(meta),
|
|
366
|
+
"during_empty_success_liveness_save",
|
|
367
|
+
false,
|
|
368
|
+
);
|
|
369
|
+
} catch (err) {
|
|
370
|
+
if (isDeadlineError(err)) throw err;
|
|
371
|
+
if (metadataFailureIsFatal) throw err;
|
|
372
|
+
log.warn("runExtraction: failed to stamp empty-success liveness watermark (non-fatal)", err);
|
|
355
373
|
}
|
|
356
374
|
}
|
|
@@ -93,7 +93,11 @@ interface Harness {
|
|
|
93
93
|
setRespond: (fn: (turns: BufferTurn[]) => ExtractionResult | Promise<ExtractionResult>) => void;
|
|
94
94
|
setPassiveCapture: (fn: () => void | Promise<void>) => void;
|
|
95
95
|
setMemoryBox: (fn: () => void | Promise<void>) => void;
|
|
96
|
+
setBufferClear: (fn: () => void | Promise<void>) => void;
|
|
96
97
|
setPersist: (fn: () => void | Promise<void>) => void;
|
|
98
|
+
setFingerprintRecorder: (
|
|
99
|
+
fn: ExtractionRunCoordinatorDeps["recordProcessedExtractionFingerprint"],
|
|
100
|
+
) => void;
|
|
97
101
|
recordedProcessedCount: () => number;
|
|
98
102
|
run: (
|
|
99
103
|
coord: ExtractionRunCoordinator,
|
|
@@ -140,6 +144,9 @@ async function makeHarness(overrides: Record<string, unknown> = {}): Promise<Har
|
|
|
140
144
|
let persistHandler: () => void | Promise<void> = async () => {};
|
|
141
145
|
let memoryBoxHandler: () => void | Promise<void> = async () => {};
|
|
142
146
|
let recordedProcessedCount = 0;
|
|
147
|
+
let fingerprintRecorder:
|
|
148
|
+
ExtractionRunCoordinatorDeps["recordProcessedExtractionFingerprint"] =
|
|
149
|
+
async () => {};
|
|
143
150
|
|
|
144
151
|
let threadingBlocked = false;
|
|
145
152
|
let persistCalls = 0;
|
|
@@ -184,8 +191,9 @@ async function makeHarness(overrides: Record<string, unknown> = {}): Promise<Har
|
|
|
184
191
|
requestQmdMaintenance: () => {},
|
|
185
192
|
runTierMigrationCycle: async () => migrationSummary,
|
|
186
193
|
getLastPersistExtractionDeferredCount: () => 0,
|
|
187
|
-
recordProcessedExtractionFingerprint: async () => {
|
|
194
|
+
recordProcessedExtractionFingerprint: async (storage, fingerprint, meta) => {
|
|
188
195
|
recordedProcessedCount += 1;
|
|
196
|
+
await fingerprintRecorder(storage, fingerprint, meta);
|
|
189
197
|
},
|
|
190
198
|
});
|
|
191
199
|
|
|
@@ -210,6 +218,14 @@ async function makeHarness(overrides: Record<string, unknown> = {}): Promise<Har
|
|
|
210
218
|
setMemoryBox: (fn) => {
|
|
211
219
|
memoryBoxHandler = fn;
|
|
212
220
|
},
|
|
221
|
+
setBufferClear: (fn) => {
|
|
222
|
+
buffer.clearAfterExtraction = async () => {
|
|
223
|
+
await fn();
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
setFingerprintRecorder: (fn) => {
|
|
227
|
+
fingerprintRecorder = fn;
|
|
228
|
+
},
|
|
213
229
|
setPersist: (fn) => {
|
|
214
230
|
persistHandler = fn;
|
|
215
231
|
},
|
|
@@ -685,6 +701,32 @@ test("circuit breaker: a forced flush still calls extract() while the breaker is
|
|
|
685
701
|
}
|
|
686
702
|
});
|
|
687
703
|
|
|
704
|
+
test("circuit breaker: a forced local prefilter skip does not heal an open breaker", async () => {
|
|
705
|
+
const h = await makeHarness({
|
|
706
|
+
extractionRetryScheduleMs: [3_600_000],
|
|
707
|
+
extractionBreakerFailureThreshold: 1,
|
|
708
|
+
extractionBreakerCooldownMs: 3_600_000,
|
|
709
|
+
});
|
|
710
|
+
try {
|
|
711
|
+
const coord = h.newCoordinator();
|
|
712
|
+
h.setRespond(() => failureResult("provider_retryable"));
|
|
713
|
+
await h.run(coord, "fp-1");
|
|
714
|
+
assert.equal(coord.getExtractionResilienceStatus().breaker.state, "open");
|
|
715
|
+
|
|
716
|
+
h.setRespond(() => ({
|
|
717
|
+
...emptySuccessResult(),
|
|
718
|
+
extractionSkippedReason: "mechanical_telemetry",
|
|
719
|
+
}));
|
|
720
|
+
const result = await h.run(coord, "fp-2", { force: true });
|
|
721
|
+
|
|
722
|
+
assert.equal(result.reason, "empty_extraction_result");
|
|
723
|
+
assert.equal(coord.getExtractionResilienceStatus().breaker.state, "open");
|
|
724
|
+
assert.equal(coord.getExtractionResilienceStatus().breaker.consecutiveFailures, 1);
|
|
725
|
+
} finally {
|
|
726
|
+
await h.cleanup();
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
|
|
688
730
|
test("circuit breaker: auth_config failure opens the breaker immediately (no hot loop)", async () => {
|
|
689
731
|
const h = await makeHarness({
|
|
690
732
|
extractionRetryScheduleMs: [3_600_000],
|
|
@@ -1013,7 +1055,7 @@ test("extraction liveness (#2223): a normal live empty success advances lastExtr
|
|
|
1013
1055
|
const result = await coord.runExtraction(liveTurns("nothing-durable-here"), {
|
|
1014
1056
|
skipCharThreshold: true,
|
|
1015
1057
|
skipUserTurnThreshold: true,
|
|
1016
|
-
clearBufferAfterExtraction:
|
|
1058
|
+
clearBufferAfterExtraction: true,
|
|
1017
1059
|
bufferKey: "nothing-durable-here",
|
|
1018
1060
|
});
|
|
1019
1061
|
|
|
@@ -1030,6 +1072,133 @@ test("extraction liveness (#2223): a normal live empty success advances lastExtr
|
|
|
1030
1072
|
}
|
|
1031
1073
|
});
|
|
1032
1074
|
|
|
1075
|
+
test("extraction liveness (#2227): prefilter skips do not advance the watermark", async () => {
|
|
1076
|
+
for (const extractionSkippedReason of [
|
|
1077
|
+
"conversation_only_non_memory",
|
|
1078
|
+
"mechanical_telemetry",
|
|
1079
|
+
] as const) {
|
|
1080
|
+
const h = await makeHarness();
|
|
1081
|
+
try {
|
|
1082
|
+
h.setRespond(() => ({ ...emptySuccessResult(), extractionSkippedReason }));
|
|
1083
|
+
const storage = await h.storageForNs("default");
|
|
1084
|
+
const before = await storage.loadMeta();
|
|
1085
|
+
|
|
1086
|
+
const result = await h.newCoordinator().runExtraction(liveTurns(extractionSkippedReason), {
|
|
1087
|
+
skipCharThreshold: true,
|
|
1088
|
+
skipUserTurnThreshold: true,
|
|
1089
|
+
clearBufferAfterExtraction: true,
|
|
1090
|
+
bufferKey: extractionSkippedReason,
|
|
1091
|
+
});
|
|
1092
|
+
|
|
1093
|
+
assert.equal(result.reason, "empty_extraction_result");
|
|
1094
|
+
const after = await storage.loadMeta();
|
|
1095
|
+
assert.equal(after.extractionCount, before.extractionCount);
|
|
1096
|
+
assert.equal(after.lastExtractionAt, before.lastExtractionAt);
|
|
1097
|
+
} finally {
|
|
1098
|
+
await h.cleanup();
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
test("extraction liveness (#2227): passive-correction failure prevents a live empty-success stamp", async () => {
|
|
1104
|
+
const h = await makeHarness();
|
|
1105
|
+
try {
|
|
1106
|
+
h.setRespond(() => emptySuccessResult());
|
|
1107
|
+
h.setPassiveCapture(() => {
|
|
1108
|
+
throw new Error("passive capture failed");
|
|
1109
|
+
});
|
|
1110
|
+
const storage = await h.storageForNs("default");
|
|
1111
|
+
const before = await storage.loadMeta();
|
|
1112
|
+
|
|
1113
|
+
await assert.rejects(
|
|
1114
|
+
h.newCoordinator().runExtraction(liveTurns("passive-capture-failure"), {
|
|
1115
|
+
skipCharThreshold: true,
|
|
1116
|
+
skipUserTurnThreshold: true,
|
|
1117
|
+
clearBufferAfterExtraction: true,
|
|
1118
|
+
bufferKey: "passive-capture-failure",
|
|
1119
|
+
}),
|
|
1120
|
+
/passive capture failed/,
|
|
1121
|
+
);
|
|
1122
|
+
|
|
1123
|
+
const after = await storage.loadMeta();
|
|
1124
|
+
assert.equal(after.extractionCount, before.extractionCount);
|
|
1125
|
+
assert.equal(after.lastExtractionAt, before.lastExtractionAt);
|
|
1126
|
+
} finally {
|
|
1127
|
+
await h.cleanup();
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
|
|
1131
|
+
test("extraction liveness (#2227): buffer-clear failure prevents a live empty-success stamp", async () => {
|
|
1132
|
+
const h = await makeHarness();
|
|
1133
|
+
try {
|
|
1134
|
+
h.setRespond(() => emptySuccessResult());
|
|
1135
|
+
h.setBufferClear(() => {
|
|
1136
|
+
throw new Error("buffer clear failed");
|
|
1137
|
+
});
|
|
1138
|
+
const storage = await h.storageForNs("default");
|
|
1139
|
+
const before = await storage.loadMeta();
|
|
1140
|
+
|
|
1141
|
+
await assert.rejects(
|
|
1142
|
+
h.newCoordinator().runExtraction(liveTurns("buffer-clear-failure"), {
|
|
1143
|
+
skipCharThreshold: true,
|
|
1144
|
+
skipUserTurnThreshold: true,
|
|
1145
|
+
clearBufferAfterExtraction: true,
|
|
1146
|
+
bufferKey: "buffer-clear-failure",
|
|
1147
|
+
}),
|
|
1148
|
+
/buffer clear failed/,
|
|
1149
|
+
);
|
|
1150
|
+
|
|
1151
|
+
const after = await storage.loadMeta();
|
|
1152
|
+
assert.equal(after.extractionCount, before.extractionCount);
|
|
1153
|
+
assert.equal(after.lastExtractionAt, before.lastExtractionAt);
|
|
1154
|
+
} finally {
|
|
1155
|
+
await h.cleanup();
|
|
1156
|
+
}
|
|
1157
|
+
});
|
|
1158
|
+
|
|
1159
|
+
test("extraction liveness (#2227): a fingerprinted prefilter skip persists dedupe state without stamping liveness", async () => {
|
|
1160
|
+
const h = await makeHarness();
|
|
1161
|
+
try {
|
|
1162
|
+
h.setRespond(() => ({
|
|
1163
|
+
...emptySuccessResult(),
|
|
1164
|
+
extractionSkippedReason: "mechanical_telemetry",
|
|
1165
|
+
}));
|
|
1166
|
+
h.setFingerprintRecorder(async (_storage, fingerprint, meta) => {
|
|
1167
|
+
assert.ok(meta, "empty-success commit supplies preloaded metadata");
|
|
1168
|
+
meta.processedExtractionFingerprints = [
|
|
1169
|
+
...(meta.processedExtractionFingerprints ?? []),
|
|
1170
|
+
{ fingerprint, observedAt: new Date().toISOString() },
|
|
1171
|
+
];
|
|
1172
|
+
});
|
|
1173
|
+
const storage = await h.storageForNs("default");
|
|
1174
|
+
const before = await storage.loadMeta();
|
|
1175
|
+
const baselineFingerprintCount =
|
|
1176
|
+
before.processedExtractionFingerprints?.length ?? 0;
|
|
1177
|
+
|
|
1178
|
+
const result = await h.newCoordinator().runExtraction(
|
|
1179
|
+
makeTurns("fingerprinted-prefilter"),
|
|
1180
|
+
{
|
|
1181
|
+
skipCharThreshold: true,
|
|
1182
|
+
skipUserTurnThreshold: true,
|
|
1183
|
+
clearBufferAfterExtraction: true,
|
|
1184
|
+
bufferKey: "fingerprinted-prefilter",
|
|
1185
|
+
},
|
|
1186
|
+
);
|
|
1187
|
+
|
|
1188
|
+
assert.equal(result.reason, "empty_extraction_result");
|
|
1189
|
+
const after = await storage.loadMeta();
|
|
1190
|
+
assert.equal(after.extractionCount, before.extractionCount);
|
|
1191
|
+
assert.equal(after.lastExtractionAt, before.lastExtractionAt);
|
|
1192
|
+
assert.equal(
|
|
1193
|
+
after.processedExtractionFingerprints?.length,
|
|
1194
|
+
baselineFingerprintCount + 1,
|
|
1195
|
+
);
|
|
1196
|
+
assert.equal(h.recordedProcessedCount(), 1);
|
|
1197
|
+
} finally {
|
|
1198
|
+
await h.cleanup();
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
|
|
1033
1202
|
test("extraction liveness (#2223): a fingerprinted empty success advances the watermark once and records the fingerprint once", async () => {
|
|
1034
1203
|
const h = await makeHarness();
|
|
1035
1204
|
try {
|
|
@@ -979,7 +979,7 @@ export class ExtractionRunCoordinator {
|
|
|
979
979
|
// pre-#1908 clear-buffer behavior applies below.
|
|
980
980
|
log.warn("runExtraction: failed to load meta for retry bookkeeping (non-fatal)", err);
|
|
981
981
|
}
|
|
982
|
-
} else {
|
|
982
|
+
} else if (result.extractionSkippedReason === undefined) {
|
|
983
983
|
// Provider responded without failure → breaker heals; clear any
|
|
984
984
|
// parked backoff for this fingerprint so it proceeds normally.
|
|
985
985
|
this.resetProviderBreakerOnSuccess();
|
|
@@ -1016,19 +1016,20 @@ export class ExtractionRunCoordinator {
|
|
|
1016
1016
|
{ extractionFailure }
|
|
1017
1017
|
);
|
|
1018
1018
|
}
|
|
1019
|
-
|
|
1019
|
+
const emptySuccessCommit = {
|
|
1020
1020
|
storage,
|
|
1021
1021
|
meta,
|
|
1022
1022
|
extractionFingerprint,
|
|
1023
1023
|
shouldPersistProcessedFingerprint,
|
|
1024
1024
|
hasExtractionFailure: Boolean(extractionFailure),
|
|
1025
|
+
extractionSkippedReason: result.extractionSkippedReason,
|
|
1025
1026
|
recordProcessedExtractionFingerprint: this.deps.recordProcessedExtractionFingerprint,
|
|
1026
1027
|
runDeadlineAware,
|
|
1027
|
-
isDeadlineError: (error) => error instanceof ExtractionDeadlineError,
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1028
|
+
isDeadlineError: (error: unknown) => error instanceof ExtractionDeadlineError,
|
|
1029
|
+
};
|
|
1030
|
+
if (shouldPersistProcessedFingerprint) {
|
|
1031
|
+
await commitEmptySuccessExtraction(emptySuccessCommit);
|
|
1032
|
+
}
|
|
1032
1033
|
await runPassiveCapture(normalizedTurns as BufferTurn[], {
|
|
1033
1034
|
sessionKey,
|
|
1034
1035
|
principal,
|
|
@@ -1037,16 +1038,13 @@ export class ExtractionRunCoordinator {
|
|
|
1037
1038
|
isLiveSession: clearBufferAfterExtraction,
|
|
1038
1039
|
});
|
|
1039
1040
|
if (recordedRetryFailure) {
|
|
1040
|
-
// Retain the failed turns so the backoff gate can re-attempt them after
|
|
1041
|
-
// nextEligibleAt. Clearing here would lose the data the retry state
|
|
1042
|
-
// points at (cursor high + codex P1). Trigger/forced paths already
|
|
1043
|
-
// retain via clearBufferAfterExtraction=false; this covers the normal
|
|
1044
|
-
// live-session path. Overflow is bounded by MAX_BUFFER_ENTRY_COUNT
|
|
1045
|
-
// with a loud eviction log.
|
|
1046
1041
|
log.debug("runExtraction: retaining buffer for backoff retry after failure");
|
|
1047
1042
|
} else {
|
|
1048
1043
|
await clearBuffer();
|
|
1049
1044
|
}
|
|
1045
|
+
if (!shouldPersistProcessedFingerprint) {
|
|
1046
|
+
await commitEmptySuccessExtraction(emptySuccessCommit);
|
|
1047
|
+
}
|
|
1050
1048
|
return { status: "skipped", reason: "empty_extraction_result", persistedCount: 0, durableOutputCount: 0 };
|
|
1051
1049
|
}
|
|
1052
1050
|
|
|
@@ -36,12 +36,11 @@ export interface AggregateExtractionWatermarkOptions {
|
|
|
36
36
|
caps?: TokenCapabilities;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
function readFailure(reason: string
|
|
39
|
+
function readFailure(reason: string): ExtractionWatermarkRead {
|
|
40
40
|
return {
|
|
41
41
|
lastExtractionAt: null,
|
|
42
42
|
readFailed: true,
|
|
43
43
|
readError: reason,
|
|
44
|
-
...(rootStats ? { rootStats } : {}),
|
|
45
44
|
};
|
|
46
45
|
}
|
|
47
46
|
|
|
@@ -49,12 +48,101 @@ function errorMessage(error: unknown): string {
|
|
|
49
48
|
return error instanceof Error ? error.message : String(error);
|
|
50
49
|
}
|
|
51
50
|
|
|
51
|
+
const ISO_TIMESTAMP_PATTERN =
|
|
52
|
+
/^([+-]?\d{4,6})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})$/i;
|
|
53
|
+
|
|
54
|
+
function validatedTimestampMs(value: string): number | null {
|
|
55
|
+
const match = ISO_TIMESTAMP_PATTERN.exec(value);
|
|
56
|
+
const parsed = Date.parse(value);
|
|
57
|
+
if (!match || !Number.isFinite(parsed)) return null;
|
|
58
|
+
const [, yearText, monthText, dayText, hourText, minuteText, secondText, fraction, zone] = match;
|
|
59
|
+
const normalizedZone = zone.toUpperCase();
|
|
60
|
+
const offsetMinuteText = normalizedZone.includes(":")
|
|
61
|
+
? normalizedZone.slice(4, 6)
|
|
62
|
+
: normalizedZone.slice(3, 5);
|
|
63
|
+
const year = Number(yearText);
|
|
64
|
+
const month = Number(monthText);
|
|
65
|
+
const day = Number(dayText);
|
|
66
|
+
const hour = Number(hourText);
|
|
67
|
+
const minute = Number(minuteText);
|
|
68
|
+
const second = secondText !== undefined ? Number(secondText) : 0;
|
|
69
|
+
const leapYear = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
70
|
+
const daysInMonth = [31, leapYear ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
71
|
+
if (month < 1 || month > 12 || day < 1 || day > daysInMonth[month - 1]!) return null;
|
|
72
|
+
if (hour === 24) {
|
|
73
|
+
const isEndOfDay = minute === 0 && second === 0 && /^0*$/.test(fraction ?? "");
|
|
74
|
+
return isEndOfDay ? parsed : null;
|
|
75
|
+
}
|
|
76
|
+
const zoneSign = normalizedZone === "Z" || normalizedZone[0] === "+" ? 1 : -1;
|
|
77
|
+
const offsetMinutes =
|
|
78
|
+
normalizedZone === "Z"
|
|
79
|
+
? 0
|
|
80
|
+
: zoneSign * (Number(normalizedZone.slice(1, 3)) * 60 + Number(offsetMinuteText));
|
|
81
|
+
const representedCalendar = new Date(parsed + offsetMinutes * 60_000);
|
|
82
|
+
const millisecond = Number((fraction ?? "").padEnd(3, "0").slice(0, 3));
|
|
83
|
+
const expected = [
|
|
84
|
+
year,
|
|
85
|
+
month,
|
|
86
|
+
day,
|
|
87
|
+
hour,
|
|
88
|
+
minute,
|
|
89
|
+
second,
|
|
90
|
+
millisecond,
|
|
91
|
+
];
|
|
92
|
+
const actual = [
|
|
93
|
+
representedCalendar.getUTCFullYear(),
|
|
94
|
+
representedCalendar.getUTCMonth() + 1,
|
|
95
|
+
representedCalendar.getUTCDate(),
|
|
96
|
+
representedCalendar.getUTCHours(),
|
|
97
|
+
representedCalendar.getUTCMinutes(),
|
|
98
|
+
representedCalendar.getUTCSeconds(),
|
|
99
|
+
representedCalendar.getUTCMilliseconds(),
|
|
100
|
+
];
|
|
101
|
+
return actual.every((part, index) => part === expected[index]) ? parsed : null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function mergeRootStats(
|
|
105
|
+
current: ExtractionRootStats | undefined,
|
|
106
|
+
candidate: ExtractionRootStats | undefined,
|
|
107
|
+
): ExtractionRootStats | undefined {
|
|
108
|
+
if (!current && !candidate) return undefined;
|
|
109
|
+
const currentCount = current?.extractionCount;
|
|
110
|
+
const candidateCount = candidate?.extractionCount;
|
|
111
|
+
const extractionCount =
|
|
112
|
+
currentCount === undefined && candidateCount === undefined
|
|
113
|
+
? undefined
|
|
114
|
+
: (currentCount ?? 0) + (candidateCount ?? 0);
|
|
115
|
+
const currentConsolidation = current?.lastConsolidationAt;
|
|
116
|
+
const candidateConsolidation = candidate?.lastConsolidationAt;
|
|
117
|
+
const hasConsolidation =
|
|
118
|
+
currentConsolidation !== undefined || candidateConsolidation !== undefined;
|
|
119
|
+
return {
|
|
120
|
+
...(extractionCount === undefined ? {} : { extractionCount }),
|
|
121
|
+
...(hasConsolidation
|
|
122
|
+
? {
|
|
123
|
+
lastConsolidationAt: newerWatermark(
|
|
124
|
+
currentConsolidation ?? null,
|
|
125
|
+
candidateConsolidation ?? null,
|
|
126
|
+
),
|
|
127
|
+
}
|
|
128
|
+
: {}),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
52
132
|
function watermarkFromMeta(meta: ExtractionWatermarkMeta, name: string): ExtractionWatermarkRead {
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
133
|
+
if (
|
|
134
|
+
meta.lastExtractionAt !== null &&
|
|
135
|
+
meta.lastExtractionAt !== undefined &&
|
|
136
|
+
validatedTimestampMs(meta.lastExtractionAt) === null
|
|
137
|
+
) {
|
|
138
|
+
return readFailure(`${name} watermark timestamp invalid`);
|
|
139
|
+
}
|
|
140
|
+
if (
|
|
141
|
+
meta.lastConsolidationAt !== null &&
|
|
142
|
+
meta.lastConsolidationAt !== undefined &&
|
|
143
|
+
validatedTimestampMs(meta.lastConsolidationAt) === null
|
|
144
|
+
) {
|
|
145
|
+
return readFailure(`${name} consolidation timestamp invalid`);
|
|
58
146
|
}
|
|
59
147
|
const hasRootStats = meta.extractionCount !== undefined || meta.lastConsolidationAt !== undefined;
|
|
60
148
|
return {
|
|
@@ -107,11 +195,11 @@ function isReadFailure(value: CorpusNamespaceRoot[] | ExtractionWatermarkRead):
|
|
|
107
195
|
|
|
108
196
|
function newerWatermark(current: string | null, candidate: string | null): string | null {
|
|
109
197
|
if (candidate === null) return current;
|
|
110
|
-
const candidateMs =
|
|
111
|
-
if (
|
|
198
|
+
const candidateMs = validatedTimestampMs(candidate);
|
|
199
|
+
if (candidateMs === null) return current;
|
|
112
200
|
if (current === null) return candidate;
|
|
113
|
-
const currentMs =
|
|
114
|
-
return
|
|
201
|
+
const currentMs = validatedTimestampMs(current);
|
|
202
|
+
return currentMs === null || candidateMs > currentMs ? candidate : current;
|
|
115
203
|
}
|
|
116
204
|
|
|
117
205
|
export async function readAggregateExtractionWatermark(
|
|
@@ -155,10 +243,13 @@ export async function readAggregateExtractionWatermark(
|
|
|
155
243
|
(!options.caps || capabilityAllowsNamespace(options.caps, defaultNamespace));
|
|
156
244
|
let rootRead: ExtractionWatermarkRead = { lastExtractionAt: null, readFailed: false };
|
|
157
245
|
if (canAccessRoot) {
|
|
158
|
-
rootRead =
|
|
246
|
+
rootRead = options.rootMeta
|
|
247
|
+
? watermarkFromMeta(options.rootMeta, "root store")
|
|
248
|
+
: await readWatermark(options.rootStorage, "root store");
|
|
159
249
|
if (rootRead.readFailed) return rootRead;
|
|
160
250
|
}
|
|
161
251
|
let lastExtractionAt = rootRead.lastExtractionAt;
|
|
252
|
+
let rootStats = rootRead.rootStats;
|
|
162
253
|
|
|
163
254
|
const reads = await Promise.all(
|
|
164
255
|
targets.map(async (target) => {
|
|
@@ -173,16 +264,14 @@ export async function readAggregateExtractionWatermark(
|
|
|
173
264
|
|
|
174
265
|
for (const read of reads) {
|
|
175
266
|
if (read.readFailed) {
|
|
176
|
-
return readFailure(
|
|
177
|
-
read.readError ?? "namespace watermark unreadable",
|
|
178
|
-
rootRead.rootStats
|
|
179
|
-
);
|
|
267
|
+
return readFailure(read.readError ?? "namespace watermark unreadable");
|
|
180
268
|
}
|
|
181
269
|
lastExtractionAt = newerWatermark(lastExtractionAt, read.lastExtractionAt);
|
|
270
|
+
rootStats = mergeRootStats(rootStats, read.rootStats);
|
|
182
271
|
}
|
|
183
272
|
return {
|
|
184
273
|
lastExtractionAt,
|
|
185
274
|
readFailed: false,
|
|
186
|
-
...(
|
|
275
|
+
...(rootStats ? { rootStats } : {}),
|
|
187
276
|
};
|
|
188
277
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import type { QmdSearchResult } from "../types.js";
|
|
3
|
+
import { isExternalWikiCollectionName } from "../external-wiki-guard.js";
|
|
4
|
+
export { isExternalWikiCollectionName } from "../external-wiki-guard.js";
|
|
3
5
|
import { ALL_CATEGORY_DIRS } from "../utils/category-dir.js";
|
|
4
6
|
import {
|
|
5
7
|
isActivityDigestPath,
|
|
@@ -81,12 +83,24 @@ export function isTopLevelArchivePath(
|
|
|
81
83
|
return /^(?:archive|namespaces[\\/][^\\/]+[\\/]archive)(?:[\\/]|$)/i.test(normalized);
|
|
82
84
|
}
|
|
83
85
|
|
|
86
|
+
function isExternalWikiQmdPath(
|
|
87
|
+
filePath: string,
|
|
88
|
+
source: GenericRecallPathSource,
|
|
89
|
+
): boolean {
|
|
90
|
+
if (source !== "qmd") return false;
|
|
91
|
+
const normalized = normalizeQmdUriPath(filePath, source).replace(/\\/g, "/");
|
|
92
|
+
const slashIndex = normalized.indexOf("/");
|
|
93
|
+
const collection = slashIndex === -1 ? normalized : normalized.slice(0, slashIndex);
|
|
94
|
+
return isExternalWikiCollectionName(collection);
|
|
95
|
+
}
|
|
96
|
+
|
|
84
97
|
export function isGenericRecallExcludedPath(
|
|
85
98
|
filePath: string,
|
|
86
99
|
policy: GenericRecallPathPolicy = {},
|
|
87
100
|
source: GenericRecallPathSource = "filesystem",
|
|
88
101
|
): boolean {
|
|
89
102
|
return (
|
|
103
|
+
isExternalWikiQmdPath(filePath, source) ||
|
|
90
104
|
isArtifactMemoryPath(filePath) ||
|
|
91
105
|
isActivityDigestPath(filePath, policy.memoryDir) ||
|
|
92
106
|
isTopLevelArchivePath(filePath, policy, source) ||
|
|
@@ -197,6 +197,8 @@ export interface RecallInvocationOptions {
|
|
|
197
197
|
topK?: number;
|
|
198
198
|
mode?: RecallPlanMode;
|
|
199
199
|
abortSignal?: AbortSignal;
|
|
200
|
+
/** Server-resolved identity of the connector performing this recall. */
|
|
201
|
+
sourceConnector?: string;
|
|
200
202
|
/**
|
|
201
203
|
* Capture a `RecallXraySnapshot` for this recall (issue #570). When
|
|
202
204
|
* `true`, the orchestrator builds a snapshot from the data it has
|
|
@@ -26,6 +26,7 @@ import type { ConversationIndexBackend } from "../conversation-index/backend.js"
|
|
|
26
26
|
import type { CorrectionService } from "../correction/correction-service.js";
|
|
27
27
|
import { EmbeddingFallback } from "../embedding-fallback.js";
|
|
28
28
|
import { ContentHashIndex, StorageManager } from "../index.js";
|
|
29
|
+
import { assertExternalWikiRootOutsideMemoryDirCanonical } from "../external-wiki-guard.js";
|
|
29
30
|
import { log } from "../logger.js";
|
|
30
31
|
import { migrateFromEngram } from "../migrate/from-engram.js";
|
|
31
32
|
import { NamespaceCatalog } from "../namespaces/catalog.js";
|
|
@@ -118,6 +119,14 @@ export class OrchestratorInitCoordinator {
|
|
|
118
119
|
});
|
|
119
120
|
await this.deps.storage.loadAliases();
|
|
120
121
|
await this.deps.storage.ensureDirectories();
|
|
122
|
+
await Promise.all(
|
|
123
|
+
this.deps.config.externalWikis.map((wiki) =>
|
|
124
|
+
assertExternalWikiRootOutsideMemoryDirCanonical(
|
|
125
|
+
this.deps.config.memoryDir,
|
|
126
|
+
wiki.rootDir,
|
|
127
|
+
),
|
|
128
|
+
),
|
|
129
|
+
);
|
|
121
130
|
if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
|
|
122
131
|
const namespaces = new Set<string>([
|
|
123
132
|
this.deps.config.defaultNamespace,
|
|
@@ -34,6 +34,7 @@ import type { CodingContext, EngramTraceEvent, IdentityInjectionMode, MemoryFile
|
|
|
34
34
|
import type { VerifiedEpisodeResult } from "../verified-recall.js";
|
|
35
35
|
import type { WorkProductLedgerSearchResult } from "../work-product-ledger.js";
|
|
36
36
|
import type { GraphRecallRankedResult, GraphRecallShadowComparison } from "./graph-recall-coordinator.js";
|
|
37
|
+
import type { RecallRerankCoordinator, RecallResultPartitionSink } from "./recall-rerank-coordinator.js";
|
|
37
38
|
import type { RecallSectionAppendOptions, RecallSectionBuckets } from "./recall-section-coordinator.js";
|
|
38
39
|
|
|
39
40
|
export interface RecallInternalDeps {
|
|
@@ -64,6 +65,7 @@ export interface RecallInternalDeps {
|
|
|
64
65
|
onDegradation?: (degradation: SearchDegradation) => void;
|
|
65
66
|
/** Issue #680 — historical recall point in ms-since-epoch. */
|
|
66
67
|
asOfMs?: number;
|
|
68
|
+
requestingConnector?: string;
|
|
67
69
|
/**
|
|
68
70
|
* Optional out-parameter that receives the pre-MMR / pre-truncation
|
|
69
71
|
* pool size captured inside the pipeline (issue #570 PR 1). The
|
|
@@ -73,6 +75,7 @@ export interface RecallInternalDeps {
|
|
|
73
75
|
* Unset by default so existing call sites are unaffected.
|
|
74
76
|
*/
|
|
75
77
|
xrayPoolSizeSink?: { size: number };
|
|
78
|
+
resultPartitionSink?: RecallResultPartitionSink;
|
|
76
79
|
/**
|
|
77
80
|
* Issue #1577 — out-parameter that receives the TrustScore stage's
|
|
78
81
|
* per-path trust map (admitted + quarantined) when the cold path runs
|
|
@@ -126,6 +129,7 @@ export interface RecallInternalDeps {
|
|
|
126
129
|
* string at the input boundary (CLI / HTTP / MCP).
|
|
127
130
|
*/
|
|
128
131
|
asOfMs?: number;
|
|
132
|
+
requestingConnector?: string;
|
|
129
133
|
},
|
|
130
134
|
): Promise<QmdSearchResult[]>;
|
|
131
135
|
boxBuilderFor(storage: StorageManager): BoxBuilder;
|
|
@@ -177,6 +181,7 @@ export interface RecallInternalDeps {
|
|
|
177
181
|
): string[];
|
|
178
182
|
readonly compounding?: CompoundingEngine;
|
|
179
183
|
readonly config: PluginConfig;
|
|
184
|
+
readonly recallRerankCoordinator: Pick<RecallRerankCoordinator, "diversifyRecallResultsWithHeadroom">;
|
|
180
185
|
currentPolicyVersion(): string;
|
|
181
186
|
diversifyAndLimitRecallResults(
|
|
182
187
|
sectionId: string,
|
|
@@ -234,6 +239,7 @@ export interface RecallInternalDeps {
|
|
|
234
239
|
abortSignal?: AbortSignal;
|
|
235
240
|
dropUnresolved?: boolean;
|
|
236
241
|
recallNamespaces?: readonly string[];
|
|
242
|
+
requestingConnector?: string;
|
|
237
243
|
},
|
|
238
244
|
): Promise<{ results: QmdSearchResult[]; memoryByPath: Map<string, MemoryFile> }>;
|
|
239
245
|
formatCausalTrajectoryResults(
|