@remnic/core 9.45.3 → 9.45.4
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 -76
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +14 -10
- package/dist/access-authorization-probe.js +85 -77
- package/dist/access-boundary.d.ts +15 -11
- package/dist/access-boundary.js +84 -76
- package/dist/access-citation-namespace.js +2 -2
- package/dist/access-cli.js +193 -181
- 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 -76
- 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 -76
- package/dist/access-http.d.ts +15 -10
- package/dist/access-http.js +105 -92
- package/dist/access-identity-continuity-surface.d.ts +9 -8
- package/dist/access-identity-continuity-surface.js +84 -76
- package/dist/access-lcm-surface.d.ts +14 -10
- package/dist/access-lcm-surface.js +84 -76
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +14 -10
- package/dist/access-mcp.js +95 -83
- 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 -76
- 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 -76
- 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 -78
- package/dist/access-operations.d.ts +15 -11
- package/dist/access-operations.js +91 -80
- package/dist/access-recall-concurrency.d.ts +16 -26
- package/dist/access-recall-concurrency.js +86 -77
- package/dist/access-recall-response.d.ts +18 -14
- package/dist/access-recall-response.js +84 -76
- package/dist/access-recall-surface.d.ts +29 -24
- package/dist/access-recall-surface.js +84 -76
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-CiJRsgAB.d.ts → access-service-CsU-ljFD.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 -76
- 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 +7 -7
- package/dist/adapters/registry.js +3 -3
- 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 +23 -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 +27 -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-VUPTKTDV.js → chunk-2MRHJNWL.js} +3 -3
- package/dist/{chunk-JBPKEARU.js → chunk-2QSZNTDO.js} +7 -7
- package/dist/{chunk-5IVLTFOV.js → chunk-44N6ESJ4.js} +2 -2
- 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-U7GW7NE7.js → chunk-5CEECY6P.js} +10 -10
- package/dist/{chunk-4UH4BTGK.js → chunk-5SNZSWWR.js} +82 -82
- package/dist/{chunk-6CZPDBJS.js → chunk-5U7ID3EZ.js} +3 -3
- package/dist/{chunk-GF22HWS2.js → chunk-6NNNURLK.js} +7 -7
- package/dist/chunk-773TRRGT.js +36 -0
- package/dist/chunk-773TRRGT.js.map +1 -0
- package/dist/chunk-7CITSYSH.js +242 -0
- package/dist/chunk-7CITSYSH.js.map +1 -0
- package/dist/{chunk-227UFSEQ.js → chunk-7RZJWZ46.js} +5 -5
- package/dist/{chunk-E5UK4VPE.js → chunk-7SHJHPTY.js} +5 -5
- package/dist/{chunk-UVIKWC7M.js → chunk-7YERSTN7.js} +17 -17
- package/dist/{chunk-DLVPUX7U.js → chunk-7YKVM5H3.js} +8 -6
- package/dist/chunk-7YKVM5H3.js.map +1 -0
- 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-S2NCTZGJ.js → chunk-AJQ57VV3.js} +15 -15
- package/dist/chunk-AJQ57VV3.js.map +1 -0
- package/dist/{chunk-CUM2BBPN.js → chunk-AUMWZSE7.js} +19 -10
- package/dist/chunk-AUMWZSE7.js.map +1 -0
- package/dist/{chunk-XYTOI63Z.js → chunk-BGHFOD5A.js} +19 -11
- package/dist/chunk-BGHFOD5A.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-E53DSZEN.js → chunk-C26TE27X.js} +3 -3
- package/dist/{chunk-LZ4LDKHZ.js → chunk-CLB32OHM.js} +6 -6
- package/dist/{chunk-Q6IP2ARR.js → chunk-CSOYVTRX.js} +2 -2
- package/dist/{chunk-XOQSEF7X.js → chunk-CVILPI77.js} +6 -6
- package/dist/chunk-D3I2MCN7.js +29 -0
- package/dist/chunk-D3I2MCN7.js.map +1 -0
- package/dist/{chunk-A5OJCXZL.js → chunk-DSUAAZZX.js} +15 -4
- package/dist/chunk-DSUAAZZX.js.map +1 -0
- package/dist/{chunk-HREE4JHI.js → chunk-DYVMXPCF.js} +486 -287
- package/dist/chunk-DYVMXPCF.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-PDLBLTOK.js → chunk-EITZHSX6.js} +9 -9
- package/dist/{chunk-D3J5SLQK.js → chunk-EJHEWCGQ.js} +81 -20
- package/dist/chunk-EJHEWCGQ.js.map +1 -0
- package/dist/{chunk-WUNIWKY4.js → chunk-ELIL2A37.js} +6 -6
- package/dist/{chunk-E6PNLPGJ.js → chunk-FZP32336.js} +806 -470
- package/dist/chunk-FZP32336.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-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-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-PKNLM44P.js → chunk-JH6BPLOP.js} +9 -9
- 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-AV5ZEH4M.js → chunk-KVJRXN2E.js} +2 -2
- package/dist/{chunk-JVLCVFQ4.js → chunk-KXEFRMCF.js} +3 -3
- package/dist/{chunk-WFTIGIIS.js → chunk-L6CQ7WIW.js} +5 -5
- 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-AS7YMSL6.js → chunk-M23RF3LJ.js} +4 -4
- package/dist/{chunk-UYLMNVY6.js → chunk-MDISBSYA.js} +16 -9
- package/dist/chunk-MDISBSYA.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-OQ5PRDDS.js → chunk-NTOIP2E6.js} +6 -6
- package/dist/{chunk-HLPD7B7P.js → chunk-NUEQKLNB.js} +2 -2
- 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-33PLLLL7.js → chunk-P7NGM24P.js} +6 -6
- package/dist/{chunk-7TWUCYER.js → chunk-PNRA7FAD.js} +7 -7
- package/dist/{chunk-5I4M26Q7.js → chunk-QBSFOKY6.js} +4 -4
- package/dist/{chunk-QJAQNXWI.js → chunk-QCECHYZL.js} +76 -79
- package/dist/chunk-QCECHYZL.js.map +1 -0
- package/dist/{chunk-P4DRWEYC.js → chunk-QVSBTCVP.js} +2 -2
- package/dist/{chunk-AAIUERNB.js → chunk-R5RFK3CB.js} +6 -6
- package/dist/{chunk-WDISJRMG.js → chunk-RMMVQQA6.js} +2 -2
- 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-OAEQLRCY.js → chunk-TN76AKO3.js} +5 -5
- package/dist/{chunk-QN25OCUF.js → chunk-TQ4GD737.js} +5 -5
- 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-DNWXFTLD.js → chunk-TYISDI6B.js} +2 -2
- package/dist/{chunk-4LMA77JH.js → chunk-U2VLVBBH.js} +3 -3
- package/dist/{chunk-5ZE7QHTK.js → chunk-ULVR5KG7.js} +5 -5
- package/dist/{chunk-NVRYW264.js → chunk-UQWIKLQK.js} +18 -15
- package/dist/chunk-UQWIKLQK.js.map +1 -0
- 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-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-3Y224NYC.js → chunk-VYISFWVX.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-WGP57SR3.js +68 -0
- package/dist/chunk-WGP57SR3.js.map +1 -0
- package/dist/{chunk-ECK75GDJ.js → chunk-WQIHRA5F.js} +43 -24
- package/dist/chunk-WQIHRA5F.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-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-VWAXN2BN.js → chunk-XSFHWBQO.js} +93 -31
- package/dist/chunk-XSFHWBQO.js.map +1 -0
- package/dist/{chunk-DL7ZD3JH.js → chunk-XTAUXTDO.js} +14 -9
- package/dist/chunk-XTAUXTDO.js.map +1 -0
- package/dist/{chunk-JE7EK33X.js → chunk-Y7HRYCNW.js} +2 -2
- package/dist/{chunk-E6EE5B67.js → chunk-YK6BDDHP.js} +4 -4
- package/dist/{chunk-ES36HTSC.js → chunk-YLHM5BQQ.js} +3 -3
- package/dist/{chunk-RN7DY3FC.js → chunk-YMAQDHQM.js} +31 -12
- package/dist/chunk-YMAQDHQM.js.map +1 -0
- 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-IKKWIPYN.js → chunk-YYQAKIDJ.js} +37 -1
- package/dist/chunk-YYQAKIDJ.js.map +1 -0
- package/dist/{chunk-BJKPPZ6Z.js → chunk-ZFGZ6PZ2.js} +2 -2
- package/dist/{chunk-CJ2ZR7UA.js → chunk-ZI32MKDW.js} +267 -214
- package/dist/chunk-ZI32MKDW.js.map +1 -0
- package/dist/{chunk-64UDOIMI.js → chunk-ZLQ37WJX.js} +2 -2
- package/dist/chunk-ZMAYKGPN.js +351 -0
- package/dist/chunk-ZMAYKGPN.js.map +1 -0
- package/dist/{cli-BUGN3d6_.d.ts → cli-BBHDtG36.d.ts} +5 -5
- package/dist/cli.d.ts +16 -12
- package/dist/cli.js +138 -124
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +24 -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 +23 -22
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +26 -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 +27 -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 +42 -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 +24 -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 +186 -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 +96 -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 +43 -0
- package/dist/external-wiki.js +16 -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 +45 -43
- package/dist/fallback-llm.d.ts +2 -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 +362 -350
- package/dist/index.js +291 -259
- package/dist/intent.d.ts +2 -1
- package/dist/lcm/engine.d.ts +2 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +2 -1
- package/dist/lcm/index.js +8 -8
- 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 +24 -23
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +24 -23
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +26 -25
- package/dist/{maintenance-LbuS2rUA.d.ts → maintenance-D2mveyCd.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-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 +40 -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 +23 -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 +45 -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 +59 -55
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +36 -33
- package/dist/{orchestrator-rHiWt32X.d.ts → orchestrator-DJYlwiUv.d.ts} +14 -7
- package/dist/orchestrator.d.ts +9 -8
- package/dist/orchestrator.js +201 -189
- 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 +5 -5
- 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 +32 -32
- 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 +22 -22
- 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 +25 -24
- package/dist/semantic-rule-promotion.js +23 -22
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +24 -23
- package/dist/{service-DJG3KCQ4.d.ts → service-BeDxSqE-.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 +2 -1
- 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 +42 -40
- package/dist/{storage-F9FVh-w9.d.ts → storage-DfjxusTE.d.ts} +24 -12
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +25 -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-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 +12 -12
- 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 +24 -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 +79 -0
- package/src/access-http.test.ts +310 -3
- package/src/access-http.ts +85 -21
- 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 +138 -3
- 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 +86 -59
- 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 +92 -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 +301 -0
- package/src/external-wiki-search.ts +362 -0
- package/src/external-wiki.test.ts +240 -0
- package/src/external-wiki.ts +453 -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 +8 -0
- package/src/mcp-read-only-tools.ts +1 -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-deletion-revisions.test.ts +91 -0
- package/src/storage-fact-hash-index-defer.test.ts +446 -163
- package/src/storage.ts +534 -245
- 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-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-VUPTKTDV.js.map → chunk-2MRHJNWL.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-2QSZNTDO.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-U7GW7NE7.js.map → chunk-5CEECY6P.js.map} +0 -0
- /package/dist/{chunk-4UH4BTGK.js.map → chunk-5SNZSWWR.js.map} +0 -0
- /package/dist/{chunk-6CZPDBJS.js.map → chunk-5U7ID3EZ.js.map} +0 -0
- /package/dist/{chunk-GF22HWS2.js.map → chunk-6NNNURLK.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-7RZJWZ46.js.map} +0 -0
- /package/dist/{chunk-E5UK4VPE.js.map → chunk-7SHJHPTY.js.map} +0 -0
- /package/dist/{chunk-UVIKWC7M.js.map → chunk-7YERSTN7.js.map} +0 -0
- /package/dist/{chunk-S5SLVSVY.js.map → chunk-BQIFZ2MP.js.map} +0 -0
- /package/dist/{chunk-E53DSZEN.js.map → chunk-C26TE27X.js.map} +0 -0
- /package/dist/{chunk-LZ4LDKHZ.js.map → chunk-CLB32OHM.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-PDLBLTOK.js.map → chunk-EITZHSX6.js.map} +0 -0
- /package/dist/{chunk-WUNIWKY4.js.map → chunk-ELIL2A37.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-PKNLM44P.js.map → chunk-JH6BPLOP.js.map} +0 -0
- /package/dist/{chunk-KXB4VXHY.js.map → chunk-JIYDRBVZ.js.map} +0 -0
- /package/dist/{chunk-AV5ZEH4M.js.map → chunk-KVJRXN2E.js.map} +0 -0
- /package/dist/{chunk-JVLCVFQ4.js.map → chunk-KXEFRMCF.js.map} +0 -0
- /package/dist/{chunk-WFTIGIIS.js.map → chunk-L6CQ7WIW.js.map} +0 -0
- /package/dist/{chunk-EJUEXZHX.js.map → chunk-LLJMAULE.js.map} +0 -0
- /package/dist/{chunk-AS7YMSL6.js.map → chunk-M23RF3LJ.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-OQ5PRDDS.js.map → chunk-NTOIP2E6.js.map} +0 -0
- /package/dist/{chunk-HLPD7B7P.js.map → chunk-NUEQKLNB.js.map} +0 -0
- /package/dist/{chunk-33PLLLL7.js.map → chunk-P7NGM24P.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-P4DRWEYC.js.map → chunk-QVSBTCVP.js.map} +0 -0
- /package/dist/{chunk-AAIUERNB.js.map → chunk-R5RFK3CB.js.map} +0 -0
- /package/dist/{chunk-WDISJRMG.js.map → chunk-RMMVQQA6.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-OAEQLRCY.js.map → chunk-TN76AKO3.js.map} +0 -0
- /package/dist/{chunk-QN25OCUF.js.map → chunk-TQ4GD737.js.map} +0 -0
- /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
- /package/dist/{chunk-DNWXFTLD.js.map → chunk-TYISDI6B.js.map} +0 -0
- /package/dist/{chunk-4LMA77JH.js.map → chunk-U2VLVBBH.js.map} +0 -0
- /package/dist/{chunk-5ZE7QHTK.js.map → chunk-ULVR5KG7.js.map} +0 -0
- /package/dist/{chunk-4B77XSG5.js.map → chunk-UV72DEZD.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-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-BLAKS3CP.js.map → chunk-XL3TATMJ.js.map} +0 -0
- /package/dist/{chunk-W4XJFLAL.js.map → chunk-XPRJSHNI.js.map} +0 -0
- /package/dist/{chunk-JE7EK33X.js.map → chunk-Y7HRYCNW.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-BJKPPZ6Z.js.map → chunk-ZFGZ6PZ2.js.map} +0 -0
- /package/dist/{chunk-64UDOIMI.js.map → chunk-ZLQ37WJX.js.map} +0 -0
|
@@ -130,6 +130,7 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
|
|
|
130
130
|
{ tool: "compression_guidelines_optimize", operation: "compression_guidelines_optimize" },
|
|
131
131
|
{ tool: "compression_guidelines_activate", operation: "compression_guidelines_activate" },
|
|
132
132
|
{ tool: "memory_search", operation: "memory_search" },
|
|
133
|
+
{ tool: "external_wiki_search", operation: "external_wiki_search" },
|
|
133
134
|
{ tool: "memory_profile", operation: "memory_profile" },
|
|
134
135
|
{ tool: "memory_entities_list", operation: "memory_entities_list" },
|
|
135
136
|
{ tool: "memory_questions", operation: "memory_questions" },
|
|
@@ -175,10 +176,12 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
|
|
|
175
176
|
export const HTTP_ROUTES: readonly HttpRouteEntry[] = [
|
|
176
177
|
{ method: "GET", pathname: "/engram/v1/adapters", operation: "adapters_status" },
|
|
177
178
|
{ method: "POST", pathname: "/engram/v1/recall", operation: "recall" },
|
|
179
|
+
{ method: "POST", pathname: "/engram/v1/external-wikis/search", operation: "external_wiki_search" },
|
|
178
180
|
{ method: "POST", pathname: "/engram/v1/coding-context", operation: "set_coding_context" },
|
|
179
181
|
{ method: "POST", pathname: "/engram/v1/capsules/export", operation: "capsule_export" },
|
|
180
182
|
{ method: "POST", pathname: "/engram/v1/capsules/import", operation: "capsule_import" },
|
|
181
183
|
{ method: "GET", pathname: "/engram/v1/offline-sync/snapshot", operation: "offline_sync_snapshot" },
|
|
184
|
+
{ method: "GET", pathname: "/engram/v1/offline-sync/capabilities", operation: "offline_sync_snapshot" },
|
|
182
185
|
{ method: "POST", pathname: "/engram/v1/offline-sync/snapshot", operation: "offline_sync_snapshot" },
|
|
183
186
|
{ method: "POST", pathname: "/engram/v1/offline-sync/files", operation: "offline_sync_files" },
|
|
184
187
|
{ method: "POST", pathname: "/engram/v1/offline-sync/file-content", operation: "offline_sync_file_content" },
|
|
@@ -252,6 +255,7 @@ export const HTTP_ROUTES: readonly HttpRouteEntry[] = [
|
|
|
252
255
|
// The operation registration makes them visible to the boundary; the
|
|
253
256
|
// streaming lifecycle is owned by the HTTP transport (handleGraphEventsSSE).
|
|
254
257
|
{ method: "GET", pathname: "/engram/v1/offline-sync/snapshot-stream", operation: "offline_sync_snapshot_stream" },
|
|
258
|
+
{ method: "GET", pathname: "/engram/v1/offline-sync/manifest-stream", operation: "offline_sync_snapshot_stream" },
|
|
255
259
|
{ method: "GET", pathname: "/engram/v1/graph/events", operation: "graph_events" },
|
|
256
260
|
{ method: "POST", pathname: "/engram/v1/chat/message", operation: "chat_message" },
|
|
257
261
|
{ method: "GET", pathname: "/engram/v1/chat/events/:id", operation: "chat_events" },
|
|
@@ -783,6 +783,7 @@ export interface PromotionStorageProvider {
|
|
|
783
783
|
*/
|
|
784
784
|
lineage: string[];
|
|
785
785
|
sourceConnector?: string;
|
|
786
|
+
toolScoped?: true;
|
|
786
787
|
}
|
|
787
788
|
): Promise<string>;
|
|
788
789
|
}
|
|
@@ -920,6 +921,7 @@ export async function promoteMemory(options: PromoteMemoryOptions): Promise<Memo
|
|
|
920
921
|
validAt: sourceMemory.frontmatter.valid_at,
|
|
921
922
|
lineage: [options.sourceMemoryId],
|
|
922
923
|
...(sourceMemory.frontmatter.sourceConnector ? { sourceConnector: sourceMemory.frontmatter.sourceConnector } : {}),
|
|
924
|
+
...(sourceMemory.frontmatter.toolScoped ? { toolScoped: true as const } : {}),
|
|
923
925
|
});
|
|
924
926
|
target.promoted = true;
|
|
925
927
|
target.promotedMemoryId = promotedId;
|
|
@@ -7,8 +7,9 @@ import test from "node:test";
|
|
|
7
7
|
|
|
8
8
|
import { runBinaryLifecyclePipeline } from "./pipeline.js";
|
|
9
9
|
import { manifestPath, writeManifest } from "./manifest.js";
|
|
10
|
-
import type { BinaryLifecycleConfig } from "./types.js";
|
|
10
|
+
import type { BinaryLifecycleConfig, PipelineResult } from "./types.js";
|
|
11
11
|
import type { BinaryStorageBackend } from "./backend.js";
|
|
12
|
+
import { withEntityCanonicalMutationLock } from "../storage/entity-canonical-id-lock.js";
|
|
12
13
|
|
|
13
14
|
const baseConfig: BinaryLifecycleConfig = {
|
|
14
15
|
enabled: true,
|
|
@@ -666,6 +667,110 @@ test("binary lifecycle fails closed without overwriting an invalid manifest", as
|
|
|
666
667
|
}
|
|
667
668
|
});
|
|
668
669
|
|
|
670
|
+
test("binary lifecycle entity redirects wait for the canonical mutation lock", async () => {
|
|
671
|
+
const targetDir = await mkdtemp(path.join(os.tmpdir(), "remnic-binary-entity-lock-"));
|
|
672
|
+
const controlDir = await mkdtemp(path.join(os.tmpdir(), "remnic-binary-control-"));
|
|
673
|
+
const entityPath = path.join(targetDir, "entities", "binary-lock-target.md");
|
|
674
|
+
const originalEntity = "entity before redirect\n\n\n";
|
|
675
|
+
const redirectedEntity = "entity before redirect\n\n\n";
|
|
676
|
+
let targetPromise: Promise<PipelineResult> | undefined;
|
|
677
|
+
|
|
678
|
+
try {
|
|
679
|
+
await Promise.all([
|
|
680
|
+
mkdir(path.dirname(entityPath), { recursive: true }),
|
|
681
|
+
mkdir(path.join(targetDir, "state"), { recursive: true }),
|
|
682
|
+
]);
|
|
683
|
+
await Promise.all([
|
|
684
|
+
writeFile(path.join(targetDir, "image.png"), "image", "utf8"),
|
|
685
|
+
writeFile(entityPath, originalEntity, "utf8"),
|
|
686
|
+
writeFile(path.join(controlDir, "image.png"), "image", "utf8"),
|
|
687
|
+
writeFile(path.join(controlDir, "note.md"), "\n", "utf8"),
|
|
688
|
+
]);
|
|
689
|
+
const manifest = {
|
|
690
|
+
version: 1 as const,
|
|
691
|
+
assets: [
|
|
692
|
+
{
|
|
693
|
+
originalPath: "image.png",
|
|
694
|
+
mirroredPath: "remote/image.png",
|
|
695
|
+
contentHash: sha256("image"),
|
|
696
|
+
sizeBytes: "image".length,
|
|
697
|
+
mimeType: "image/png",
|
|
698
|
+
mirroredAt: "2026-01-01T00:00:00.000Z",
|
|
699
|
+
status: "mirrored" as const,
|
|
700
|
+
},
|
|
701
|
+
],
|
|
702
|
+
};
|
|
703
|
+
await Promise.all([
|
|
704
|
+
writeManifest(targetDir, manifest),
|
|
705
|
+
writeManifest(controlDir, manifest),
|
|
706
|
+
]);
|
|
707
|
+
|
|
708
|
+
const redirectPrepared = Promise.withResolvers<void>();
|
|
709
|
+
const continueRedirect = Promise.withResolvers<void>();
|
|
710
|
+
let targetFinished = false;
|
|
711
|
+
|
|
712
|
+
await withEntityCanonicalMutationLock(path.join(targetDir, "state"), async () => {
|
|
713
|
+
targetPromise = runBinaryLifecyclePipeline(
|
|
714
|
+
targetDir,
|
|
715
|
+
baseConfig,
|
|
716
|
+
nestedRemoteBackend,
|
|
717
|
+
noopLogger,
|
|
718
|
+
{
|
|
719
|
+
readMarkdownFile: async (filePath) => {
|
|
720
|
+
const content = await readFile(filePath, "utf8");
|
|
721
|
+
if (filePath === entityPath) {
|
|
722
|
+
redirectPrepared.resolve();
|
|
723
|
+
await continueRedirect.promise;
|
|
724
|
+
}
|
|
725
|
+
return content;
|
|
726
|
+
},
|
|
727
|
+
},
|
|
728
|
+
);
|
|
729
|
+
void targetPromise.then(
|
|
730
|
+
() => {
|
|
731
|
+
targetFinished = true;
|
|
732
|
+
},
|
|
733
|
+
() => undefined,
|
|
734
|
+
);
|
|
735
|
+
|
|
736
|
+
await redirectPrepared.promise;
|
|
737
|
+
continueRedirect.resolve();
|
|
738
|
+
const controlResult = await runBinaryLifecyclePipeline(
|
|
739
|
+
controlDir,
|
|
740
|
+
baseConfig,
|
|
741
|
+
nestedRemoteBackend,
|
|
742
|
+
noopLogger,
|
|
743
|
+
);
|
|
744
|
+
assert.equal(controlResult.redirected, 1);
|
|
745
|
+
assert.equal(
|
|
746
|
+
await readFile(path.join(controlDir, "note.md"), "utf8"),
|
|
747
|
+
"\n",
|
|
748
|
+
);
|
|
749
|
+
assert.equal(
|
|
750
|
+
targetFinished,
|
|
751
|
+
false,
|
|
752
|
+
"the target redirect must not finish while its entity mutation lock is held",
|
|
753
|
+
);
|
|
754
|
+
assert.equal(
|
|
755
|
+
await readFile(entityPath, "utf8"),
|
|
756
|
+
originalEntity,
|
|
757
|
+
"the entity redirect write must not enter while the canonical mutation lock is held",
|
|
758
|
+
);
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
assert.ok(targetPromise);
|
|
762
|
+
const targetResult = await targetPromise;
|
|
763
|
+
assert.equal(targetResult.redirected, 1);
|
|
764
|
+
assert.equal(await readFile(entityPath, "utf8"), redirectedEntity);
|
|
765
|
+
} finally {
|
|
766
|
+
await targetPromise?.catch(() => undefined);
|
|
767
|
+
await Promise.all([
|
|
768
|
+
rm(targetDir, { recursive: true, force: true }),
|
|
769
|
+
rm(controlDir, { recursive: true, force: true }),
|
|
770
|
+
]);
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
|
|
669
774
|
const noopLogger = {
|
|
670
775
|
info: () => {},
|
|
671
776
|
warn: () => {},
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
repairContentAfterJournalMove,
|
|
28
28
|
requestEntityCanonicalIdReconcile,
|
|
29
29
|
} from "../storage/entity-canonical-id-references.js";
|
|
30
|
+
import { withRawEntityPageMutation } from "../storage/entity-canonical-id-lock.js";
|
|
30
31
|
|
|
31
32
|
// Write-boundary journal cache for redirect rewrites (issue #2213).
|
|
32
33
|
const historicalIdCache = new HistoricalEntityCanonicalIdCache();
|
|
@@ -338,6 +339,7 @@ async function stageRedirect(
|
|
|
338
339
|
// keep their bytes (plus the redirect) untouched, and entities/ pages
|
|
339
340
|
// get the bounded reconcile marker instead — their migrated surface
|
|
340
341
|
// is relationship targets, not an entityRef frontmatter field.
|
|
342
|
+
await withRawEntityPageMutation(memoryDir, update.mdPath, async () => {
|
|
341
343
|
const stateDir = path.join(memoryDir, "state");
|
|
342
344
|
const kind = classifyEntityRefWritePath(memoryDir, update.mdPath);
|
|
343
345
|
if (kind === "memory") {
|
|
@@ -371,6 +373,7 @@ async function stageRedirect(
|
|
|
371
373
|
await requestEntityCanonicalIdReconcile(stateDir);
|
|
372
374
|
}
|
|
373
375
|
}
|
|
376
|
+
});
|
|
374
377
|
// The redirect rewrote an on-disk memory file out-of-band (not through a
|
|
375
378
|
// StorageManager mutation). Bump the corpus sentinel per write so a warm
|
|
376
379
|
// hot-memories cache rescans — mid-batch too, never serving pre-redirect
|
|
@@ -331,6 +331,53 @@ test("resolveGitContext: custom invoker throwing on a later call → returns nul
|
|
|
331
331
|
assert.equal(ctx, null);
|
|
332
332
|
});
|
|
333
333
|
|
|
334
|
+
test("#2206 resolveGitContext forwards caller cancellation to an active git probe", async () => {
|
|
335
|
+
const abortController = new AbortController();
|
|
336
|
+
let forwardedSignal: AbortSignal | undefined;
|
|
337
|
+
const pendingProbe = Promise.withResolvers<{ stdout: string; exitCode: number }>();
|
|
338
|
+
const invoker: GitInvoker = (_cwd, _args, options) => {
|
|
339
|
+
forwardedSignal = options?.abortSignal;
|
|
340
|
+
options?.abortSignal?.addEventListener(
|
|
341
|
+
"abort",
|
|
342
|
+
() => pendingProbe.reject(options.abortSignal?.reason),
|
|
343
|
+
{ once: true },
|
|
344
|
+
);
|
|
345
|
+
return pendingProbe.promise;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
const resolving = resolveGitContext("/work/repo", {
|
|
349
|
+
invoker,
|
|
350
|
+
abortSignal: abortController.signal,
|
|
351
|
+
});
|
|
352
|
+
await Promise.resolve();
|
|
353
|
+
abortController.abort(new Error("caller cancelled"));
|
|
354
|
+
|
|
355
|
+
await assert.rejects(resolving, /caller cancelled/);
|
|
356
|
+
assert.equal(forwardedSignal, abortController.signal);
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
test("#2206 resolveGitContext gives each probe only the remaining deadline budget", async () => {
|
|
360
|
+
const timeouts: number[] = [];
|
|
361
|
+
let now = 1_000;
|
|
362
|
+
const invoker: GitInvoker = (cwd, args, options) => {
|
|
363
|
+
timeouts.push(options?.timeoutMs ?? -1);
|
|
364
|
+
now += 100;
|
|
365
|
+
const command = args.join(" ");
|
|
366
|
+
if (command === "rev-parse --show-toplevel") return { stdout: cwd, exitCode: 0 };
|
|
367
|
+
if (command === "rev-parse --abbrev-ref HEAD") return { stdout: "main", exitCode: 0 };
|
|
368
|
+
return { stdout: "", exitCode: 1 };
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
const context = await resolveGitContext("/work/repo", {
|
|
372
|
+
invoker,
|
|
373
|
+
deadlineMs: 1_400,
|
|
374
|
+
now: () => now,
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
assert.ok(context);
|
|
378
|
+
assert.deepEqual(timeouts, [400, 300, 200, 100]);
|
|
379
|
+
});
|
|
380
|
+
|
|
334
381
|
// ──────────────────────────────────────────────────────────────────────────
|
|
335
382
|
// resolveGitContext — happy path (origin, branch, default branch)
|
|
336
383
|
// ──────────────────────────────────────────────────────────────────────────
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import path from "node:path";
|
|
25
25
|
|
|
26
|
+
import { abortError } from "../abort-error.js";
|
|
27
|
+
import { launchProcess, launchProcessSync } from "../runtime/child-process.js";
|
|
26
28
|
import { expandTildePath } from "../utils/path.js";
|
|
27
|
-
import { launchProcessSync } from "../runtime/child-process.js";
|
|
28
29
|
|
|
29
30
|
// Re-export so existing callers / tests that imported `expandTildePath` from
|
|
30
31
|
// this module keep working. CLAUDE.md #17 requires consistent `~` expansion
|
|
@@ -64,19 +65,30 @@ export interface GitContext {
|
|
|
64
65
|
defaultBranch: string | null;
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
export interface GitInvokeOptions {
|
|
69
|
+
abortSignal?: AbortSignal;
|
|
70
|
+
timeoutMs?: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface GitInvokeResult {
|
|
74
|
+
stdout: string;
|
|
75
|
+
exitCode: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
67
78
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* spawning a real git process.
|
|
79
|
+
* Run `git <args>` with `cwd` as the working directory. Implementations
|
|
80
|
+
* should return non-zero exit codes rather than throwing for command failure.
|
|
71
81
|
*/
|
|
72
82
|
export interface GitInvoker {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
(
|
|
84
|
+
cwd: string,
|
|
85
|
+
args: string[],
|
|
86
|
+
options?: GitInvokeOptions,
|
|
87
|
+
): GitInvokeResult | Promise<GitInvokeResult>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface SyncGitInvoker {
|
|
91
|
+
(cwd: string, args: string[]): GitInvokeResult;
|
|
80
92
|
}
|
|
81
93
|
|
|
82
94
|
// ──────────────────────────────────────────────────────────────────────────
|
|
@@ -85,7 +97,7 @@ export interface GitInvoker {
|
|
|
85
97
|
|
|
86
98
|
const DEFAULT_GIT_TIMEOUT_MS = 2_000;
|
|
87
99
|
|
|
88
|
-
export function
|
|
100
|
+
export function defaultGitInvokerSync(): SyncGitInvoker {
|
|
89
101
|
return (cwd: string, args: string[]) => {
|
|
90
102
|
const result = launchProcessSync("git", args, {
|
|
91
103
|
cwd,
|
|
@@ -93,10 +105,7 @@ export function defaultGitInvoker(): GitInvoker {
|
|
|
93
105
|
timeout: DEFAULT_GIT_TIMEOUT_MS,
|
|
94
106
|
shell: false,
|
|
95
107
|
});
|
|
96
|
-
if (result.error) {
|
|
97
|
-
// Spawn failure (git not on PATH, timeout, etc.). Surface as non-zero.
|
|
98
|
-
return { stdout: "", exitCode: 127 };
|
|
99
|
-
}
|
|
108
|
+
if (result.error) return { stdout: "", exitCode: 127 };
|
|
100
109
|
return {
|
|
101
110
|
stdout: typeof result.stdout === "string" ? result.stdout : "",
|
|
102
111
|
exitCode: typeof result.status === "number" ? result.status : 1,
|
|
@@ -104,6 +113,73 @@ export function defaultGitInvoker(): GitInvoker {
|
|
|
104
113
|
};
|
|
105
114
|
}
|
|
106
115
|
|
|
116
|
+
export function defaultGitInvoker(): GitInvoker {
|
|
117
|
+
return (cwd, args, options = {}) => {
|
|
118
|
+
if (options.abortSignal?.aborted) {
|
|
119
|
+
throw options.abortSignal.reason instanceof Error
|
|
120
|
+
? options.abortSignal.reason
|
|
121
|
+
: abortError("git context resolution aborted");
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const child = launchProcess("git", args, {
|
|
125
|
+
cwd,
|
|
126
|
+
encoding: "utf-8",
|
|
127
|
+
shell: false,
|
|
128
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
129
|
+
});
|
|
130
|
+
const { promise, resolve, reject } = Promise.withResolvers<GitInvokeResult>();
|
|
131
|
+
let stdout = "";
|
|
132
|
+
let settled = false;
|
|
133
|
+
let timer: NodeJS.Timeout | undefined;
|
|
134
|
+
|
|
135
|
+
const cleanup = (): void => {
|
|
136
|
+
clearTimeout(timer);
|
|
137
|
+
options.abortSignal?.removeEventListener("abort", onAbort);
|
|
138
|
+
};
|
|
139
|
+
const finish = (result: GitInvokeResult): void => {
|
|
140
|
+
if (settled) return;
|
|
141
|
+
settled = true;
|
|
142
|
+
cleanup();
|
|
143
|
+
resolve(result);
|
|
144
|
+
};
|
|
145
|
+
const fail = (error: Error): void => {
|
|
146
|
+
if (settled) return;
|
|
147
|
+
settled = true;
|
|
148
|
+
cleanup();
|
|
149
|
+
reject(error);
|
|
150
|
+
};
|
|
151
|
+
const onAbort = (): void => {
|
|
152
|
+
child.kill("SIGTERM");
|
|
153
|
+
fail(
|
|
154
|
+
options.abortSignal?.reason instanceof Error
|
|
155
|
+
? options.abortSignal.reason
|
|
156
|
+
: abortError("git context resolution aborted"),
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
child.stdout?.setEncoding("utf-8");
|
|
161
|
+
child.stdout?.on("data", (chunk: string | Buffer) => {
|
|
162
|
+
stdout += chunk.toString();
|
|
163
|
+
});
|
|
164
|
+
child.once("error", () => finish({ stdout: "", exitCode: 127 }));
|
|
165
|
+
child.once("close", (exitCode: number | null) => {
|
|
166
|
+
finish({ stdout, exitCode: typeof exitCode === "number" ? exitCode : 1 });
|
|
167
|
+
});
|
|
168
|
+
options.abortSignal?.addEventListener("abort", onAbort, { once: true });
|
|
169
|
+
|
|
170
|
+
const timeoutMs = Math.max(
|
|
171
|
+
1,
|
|
172
|
+
Math.min(DEFAULT_GIT_TIMEOUT_MS, options.timeoutMs ?? DEFAULT_GIT_TIMEOUT_MS),
|
|
173
|
+
);
|
|
174
|
+
timer = setTimeout(() => {
|
|
175
|
+
child.kill("SIGTERM");
|
|
176
|
+
finish({ stdout: "", exitCode: 124 });
|
|
177
|
+
}, timeoutMs);
|
|
178
|
+
if (options.abortSignal?.aborted) onAbort();
|
|
179
|
+
return promise;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
107
183
|
// ──────────────────────────────────────────────────────────────────────────
|
|
108
184
|
// Stable hashing
|
|
109
185
|
// ──────────────────────────────────────────────────────────────────────────
|
|
@@ -239,17 +315,21 @@ export function normalizeOriginUrl(rawUrl: string): string {
|
|
|
239
315
|
export interface ResolveGitContextOptions {
|
|
240
316
|
/** Inject a git invoker (tests). Defaults to spawning real `git`. */
|
|
241
317
|
invoker?: GitInvoker;
|
|
318
|
+
abortSignal?: AbortSignal;
|
|
319
|
+
/** Absolute epoch deadline shared with the extraction lifecycle. */
|
|
320
|
+
deadlineMs?: number;
|
|
321
|
+
/** Injectable clock for deadline tests. */
|
|
322
|
+
now?: () => number;
|
|
242
323
|
}
|
|
243
324
|
|
|
244
325
|
/**
|
|
245
326
|
* Detect the git project + branch for `cwd`.
|
|
246
327
|
*
|
|
247
|
-
* Returns `null` when
|
|
248
|
-
*
|
|
249
|
-
* - `cwd` is not inside a git worktree
|
|
250
|
-
* - `git` is not available on PATH
|
|
328
|
+
* Returns `null` when `cwd` is invalid, outside a worktree, or git is
|
|
329
|
+
* unavailable. Unexpected command failures also resolve to `null`.
|
|
251
330
|
*
|
|
252
|
-
*
|
|
331
|
+
* Caller cancellation and an exhausted deadline reject so lifecycle callers
|
|
332
|
+
* can stop promptly instead of treating an interrupted probe as "not a repo".
|
|
253
333
|
*/
|
|
254
334
|
export async function resolveGitContext(
|
|
255
335
|
cwd: string,
|
|
@@ -272,9 +352,24 @@ export async function resolveGitContext(
|
|
|
272
352
|
if (!path.isAbsolute(expanded)) return null;
|
|
273
353
|
|
|
274
354
|
const invoker = options.invoker ?? defaultGitInvoker();
|
|
355
|
+
const now = options.now ?? Date.now;
|
|
356
|
+
const invoke = async (probeCwd: string, args: string[]): Promise<GitInvokeResult> => {
|
|
357
|
+
if (options.abortSignal?.aborted) {
|
|
358
|
+
throw options.abortSignal.reason instanceof Error
|
|
359
|
+
? options.abortSignal.reason
|
|
360
|
+
: abortError("git context resolution aborted");
|
|
361
|
+
}
|
|
362
|
+
const remainingMs =
|
|
363
|
+
options.deadlineMs === undefined ? DEFAULT_GIT_TIMEOUT_MS : options.deadlineMs - now();
|
|
364
|
+
if (remainingMs <= 0) throw abortError("git context resolution deadline exceeded");
|
|
365
|
+
return invoker(probeCwd, args, {
|
|
366
|
+
abortSignal: options.abortSignal,
|
|
367
|
+
timeoutMs: Math.min(DEFAULT_GIT_TIMEOUT_MS, remainingMs),
|
|
368
|
+
});
|
|
369
|
+
};
|
|
275
370
|
|
|
276
371
|
// 1. Locate the repo root.
|
|
277
|
-
const topLevel =
|
|
372
|
+
const topLevel = await invoke(expanded, ["rev-parse", "--show-toplevel"]);
|
|
278
373
|
if (topLevel.exitCode !== 0) return null;
|
|
279
374
|
const rootPath = topLevel.stdout.trim();
|
|
280
375
|
if (!rootPath) return null;
|
|
@@ -284,13 +379,13 @@ export async function resolveGitContext(
|
|
|
284
379
|
// HEAD ref is unborn and `--abbrev-ref HEAD` fails, but
|
|
285
380
|
// `symbolic-ref HEAD` still returns the target branch. Fall back
|
|
286
381
|
// so newly-initialized repos get a sensible branch name.
|
|
287
|
-
const branchResult =
|
|
382
|
+
const branchResult = await invoke(rootPath, ["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
288
383
|
let branch: string | null = null;
|
|
289
384
|
if (branchResult.exitCode === 0) {
|
|
290
385
|
const raw = branchResult.stdout.trim();
|
|
291
386
|
branch = raw && raw !== "HEAD" ? raw : null;
|
|
292
387
|
} else {
|
|
293
|
-
const unbornRef =
|
|
388
|
+
const unbornRef = await invoke(rootPath, ["symbolic-ref", "--quiet", "HEAD"]);
|
|
294
389
|
if (unbornRef.exitCode === 0) {
|
|
295
390
|
const raw = unbornRef.stdout.trim();
|
|
296
391
|
const prefix = "refs/heads/";
|
|
@@ -302,7 +397,7 @@ export async function resolveGitContext(
|
|
|
302
397
|
}
|
|
303
398
|
|
|
304
399
|
// 3. Origin URL — optional. Used to derive a stable `projectId`.
|
|
305
|
-
const originResult =
|
|
400
|
+
const originResult = await invoke(rootPath, ["remote", "get-url", "origin"]);
|
|
306
401
|
let projectId: string;
|
|
307
402
|
if (originResult.exitCode === 0) {
|
|
308
403
|
const normalized = normalizeOriginUrl(originResult.stdout);
|
|
@@ -312,7 +407,7 @@ export async function resolveGitContext(
|
|
|
312
407
|
}
|
|
313
408
|
|
|
314
409
|
// 4. Default branch — best effort.
|
|
315
|
-
const headRef =
|
|
410
|
+
const headRef = await invoke(rootPath, ["symbolic-ref", "--quiet", "refs/remotes/origin/HEAD"]);
|
|
316
411
|
let defaultBranch: string | null = null;
|
|
317
412
|
if (headRef.exitCode === 0) {
|
|
318
413
|
const raw = headRef.stdout.trim();
|
|
@@ -330,7 +425,14 @@ export async function resolveGitContext(
|
|
|
330
425
|
defaultBranch,
|
|
331
426
|
};
|
|
332
427
|
} catch {
|
|
333
|
-
|
|
428
|
+
if (options.abortSignal?.aborted) {
|
|
429
|
+
throw options.abortSignal.reason instanceof Error
|
|
430
|
+
? options.abortSignal.reason
|
|
431
|
+
: abortError("git context resolution aborted");
|
|
432
|
+
}
|
|
433
|
+
if (options.deadlineMs !== undefined && (options.now ?? Date.now)() >= options.deadlineMs) {
|
|
434
|
+
throw abortError("git context resolution deadline exceeded");
|
|
435
|
+
}
|
|
334
436
|
return null;
|
|
335
437
|
}
|
|
336
438
|
}
|
package/src/config.test.ts
CHANGED
|
@@ -533,6 +533,30 @@ test("parseConfig initGateTimeoutMs defaults to OpenClaw cold-start budget", ()
|
|
|
533
533
|
assert.equal(result.initGateTimeoutMs, 30_000);
|
|
534
534
|
});
|
|
535
535
|
|
|
536
|
+
test("parseConfig keeps external wiki merge out of default recall", () => {
|
|
537
|
+
assert.equal(parseConfig({}).wikiMergeIntoRecall, false);
|
|
538
|
+
assert.equal(parseConfig({ wikiMergeIntoRecall: false }).wikiMergeIntoRecall, false);
|
|
539
|
+
assert.throws(
|
|
540
|
+
() => parseConfig({ wikiMergeIntoRecall: true }),
|
|
541
|
+
/wikiMergeIntoRecall=true is not supported/,
|
|
542
|
+
);
|
|
543
|
+
assert.throws(
|
|
544
|
+
() => parseConfig({ wikiMergeIntoRecall: "maybe" }),
|
|
545
|
+
/wikiMergeIntoRecall must be a boolean-like value/,
|
|
546
|
+
);
|
|
547
|
+
});
|
|
548
|
+
|
|
549
|
+
test("parseConfig rejects external wiki collections as default memory collections", () => {
|
|
550
|
+
assert.throws(
|
|
551
|
+
() => parseConfig({ qmdCollection: "external-wiki-reading" }),
|
|
552
|
+
/qmdCollection must be a memory collection/,
|
|
553
|
+
);
|
|
554
|
+
assert.throws(
|
|
555
|
+
() => parseConfig({ qmdColdCollection: "external-wiki-archive" }),
|
|
556
|
+
/qmdColdCollection must be a memory collection/,
|
|
557
|
+
);
|
|
558
|
+
});
|
|
559
|
+
|
|
536
560
|
test("parseConfig qmdSearchStrategy defaults to hybrid and validates the enum", () => {
|
|
537
561
|
// Default must equal the historical lex+vec+hyde behavior. Issue #1335.
|
|
538
562
|
assert.equal(parseConfig({}).qmdSearchStrategy, "hybrid");
|
package/src/config.ts
CHANGED
|
@@ -27,6 +27,7 @@ import type {
|
|
|
27
27
|
TrustWeights,
|
|
28
28
|
} from "./types.js";
|
|
29
29
|
import { parseConvergeConfig } from "./converge-config.js";
|
|
30
|
+
import { parseExternalWikiRecallGuard } from "./external-wiki-guard.js";
|
|
30
31
|
import { log } from "./logger.js";
|
|
31
32
|
import { cloneDefaultSessionObserverBands } from "./session-observer-bands.js";
|
|
32
33
|
import { readEnvVar, resolveHomeDir } from "./runtime/env.js";
|
|
@@ -62,6 +63,7 @@ import { parseCodingKnowledgeConfig } from "./coding/coding-knowledge-config.js"
|
|
|
62
63
|
import { parseChatConfig } from "./chat/chat-config.js";
|
|
63
64
|
import { parseCorrectionIntentConfig, parseFaithfulnessGateConfig } from "./faithfulness-config.js";
|
|
64
65
|
import { parseOfflineSyncExcludes } from "./offline-sync.js";
|
|
66
|
+
import { parseExternalWikiRoots } from "./external-wiki-config.js";
|
|
65
67
|
import {
|
|
66
68
|
parseScopeProfiles,
|
|
67
69
|
parseScopeTeams,
|
|
@@ -1558,6 +1560,9 @@ export function parseConfig(
|
|
|
1558
1560
|
"maintenance.namespaceLockStaleMs",
|
|
1559
1561
|
);
|
|
1560
1562
|
|
|
1563
|
+
const { wikiMergeIntoRecall, qmdCollection, qmdColdCollection } =
|
|
1564
|
+
parseExternalWikiRecallGuard(cfg);
|
|
1565
|
+
|
|
1561
1566
|
return {
|
|
1562
1567
|
openaiApiKey: apiKey,
|
|
1563
1568
|
openaiBaseUrl: baseUrl,
|
|
@@ -1608,13 +1613,8 @@ export function parseConfig(
|
|
|
1608
1613
|
typeof cfg.maxMemoryTokens === "number" ? cfg.maxMemoryTokens : 2000,
|
|
1609
1614
|
memoryOsPreset,
|
|
1610
1615
|
qmdEnabled: cfg.qmdEnabled !== false,
|
|
1611
|
-
qmdCollection
|
|
1612
|
-
|
|
1613
|
-
? cfg.qmdCollection
|
|
1614
|
-
// TODO(#403): Keep legacy collection name for backwards compat so existing
|
|
1615
|
-
// installs don't lose their QMD vector store data on upgrade. New installs
|
|
1616
|
-
// can override via qmdCollection config. Consider migrating in a future PR.
|
|
1617
|
-
: "openclaw-engram",
|
|
1616
|
+
qmdCollection,
|
|
1617
|
+
wikiMergeIntoRecall,
|
|
1618
1618
|
qmdMaxResults:
|
|
1619
1619
|
typeof cfg.qmdMaxResults === "number" ? cfg.qmdMaxResults : 8,
|
|
1620
1620
|
qmdEmbeddingBacklogThreshold: (() => {
|
|
@@ -1627,11 +1627,7 @@ export function parseConfig(
|
|
|
1627
1627
|
return Number.isFinite(n) && Number.isInteger(n) && n >= 0 ? n : 1000;
|
|
1628
1628
|
})(),
|
|
1629
1629
|
qmdColdTierEnabled: cfg.qmdColdTierEnabled === true,
|
|
1630
|
-
qmdColdCollection
|
|
1631
|
-
typeof cfg.qmdColdCollection === "string" && cfg.qmdColdCollection.length > 0
|
|
1632
|
-
? cfg.qmdColdCollection
|
|
1633
|
-
// TODO(#403): Keep legacy collection name for backwards compat.
|
|
1634
|
-
: "openclaw-engram-cold",
|
|
1630
|
+
qmdColdCollection,
|
|
1635
1631
|
qmdColdMaxResults:
|
|
1636
1632
|
typeof cfg.qmdColdMaxResults === "number" ? cfg.qmdColdMaxResults : 8,
|
|
1637
1633
|
// Issue #678 PR 2/4: gate hot/cold tier migration (a deep-sleep activity)
|
|
@@ -1705,6 +1701,7 @@ export function parseConfig(
|
|
|
1705
1701
|
? cfg.qmdPath
|
|
1706
1702
|
: undefined,
|
|
1707
1703
|
memoryDir,
|
|
1704
|
+
externalWikis: parseExternalWikiRoots(cfg.externalWikis, memoryDir),
|
|
1708
1705
|
debug: cfg.debug === true,
|
|
1709
1706
|
identityEnabled: cfg.identityEnabled !== false,
|
|
1710
1707
|
identityContinuityEnabled,
|