@remnic/core 9.45.2 → 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 +18 -14
- 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.d.ts +84 -84
- 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-4L6HUREQ.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 +732 -720
- 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 +6 -2
- 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 +76 -76
- 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 +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 +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 +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 +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/converge-conflict-policy-type.test.ts +15 -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 +29 -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-4L6HUREQ.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-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
package/src/access-http.test.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { mkdtemp, rm } from "node:fs/promises";
|
|
2
|
+
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import test from "node:test";
|
|
6
6
|
import { gzipSync } from "node:zlib";
|
|
7
7
|
|
|
8
8
|
import { EngramAccessHttpServer, type RemnicAdminControls, type RemnicAdminDashboardStatus } from "./access-http.js";
|
|
9
|
-
import { EngramAccessInputError, type EngramAccessService } from "./access-service.js";
|
|
9
|
+
import { EngramAccessInputError, type EngramAccessRecallRequest, type EngramAccessService } from "./access-service.js";
|
|
10
10
|
import { tokenCapabilityStore, type TokenCapabilities } from "./access-token-capabilities.js";
|
|
11
11
|
import { parseConfig } from "./config.js";
|
|
12
12
|
import { readPair, writePair } from "./contradiction/contradiction-review.js";
|
|
@@ -858,6 +858,7 @@ test("HTTP offline snapshot forwards namespace and transfer options", async () =
|
|
|
858
858
|
createdAt: new Date("2026-05-21T00:00:00Z").toISOString(),
|
|
859
859
|
sourceId: "remote:test",
|
|
860
860
|
includeTranscripts: options.includeTranscripts !== false,
|
|
861
|
+
deletions: [{ path: "facts/deleted.md", mtimeMs: 1235 }],
|
|
861
862
|
files: [],
|
|
862
863
|
};
|
|
863
864
|
},
|
|
@@ -876,12 +877,18 @@ test("HTTP offline snapshot forwards namespace and transfer options", async () =
|
|
|
876
877
|
`http://127.0.0.1:${status.port}/remnic/v1/offline-sync/snapshot?namespace=team&include_transcripts=false&content=false`,
|
|
877
878
|
{ headers: { authorization: "Bearer test-token" } },
|
|
878
879
|
);
|
|
879
|
-
const body = await response.json() as {
|
|
880
|
+
const body = await response.json() as {
|
|
881
|
+
namespace?: string;
|
|
882
|
+
includeTranscripts?: boolean;
|
|
883
|
+
files?: unknown[];
|
|
884
|
+
deletions?: unknown[];
|
|
885
|
+
};
|
|
880
886
|
|
|
881
887
|
assert.equal(response.status, 200);
|
|
882
888
|
assert.equal(body.namespace, "team");
|
|
883
889
|
assert.equal(body.includeTranscripts, false);
|
|
884
890
|
assert.deepEqual(body.files, []);
|
|
891
|
+
assert.deepEqual(body.deletions, [{ path: "facts/deleted.md", mtimeMs: 1235 }]);
|
|
885
892
|
assert.deepEqual(calls, [{
|
|
886
893
|
namespace: "team",
|
|
887
894
|
principal: "reader",
|
|
@@ -1016,6 +1023,7 @@ test("HTTP offline snapshot stream emits metadata records as NDJSON", async () =
|
|
|
1016
1023
|
createdAt: new Date("2026-05-21T00:00:00Z").toISOString(),
|
|
1017
1024
|
sourceId: "remote:test",
|
|
1018
1025
|
includeTranscripts: options.includeTranscripts !== false,
|
|
1026
|
+
deletions: [{ path: "facts/deleted.md", mtimeMs: 1235 }],
|
|
1019
1027
|
files: (async function* () {
|
|
1020
1028
|
yield {
|
|
1021
1029
|
path: "facts/a.md",
|
|
@@ -1050,6 +1058,7 @@ test("HTTP offline snapshot stream emits metadata records as NDJSON", async () =
|
|
|
1050
1058
|
assert.equal(response.headers.get("content-type"), "application/x-ndjson; charset=utf-8");
|
|
1051
1059
|
assert.equal(lines[0]?.type, "snapshot");
|
|
1052
1060
|
assert.equal(lines[0]?.namespace, "team");
|
|
1061
|
+
assert.deepEqual(lines[0]?.deletions, [{ path: "facts/deleted.md", mtimeMs: 1235 }]);
|
|
1053
1062
|
assert.equal(lines[1]?.type, "file");
|
|
1054
1063
|
assert.deepEqual((lines[1]?.file as { path?: string }).path, "facts/a.md");
|
|
1055
1064
|
assert.deepEqual(calls, [{
|
|
@@ -1062,6 +1071,120 @@ test("HTTP offline snapshot stream emits metadata records as NDJSON", async () =
|
|
|
1062
1071
|
await server.stop();
|
|
1063
1072
|
}
|
|
1064
1073
|
});
|
|
1074
|
+
test("HTTP offline manifest stream preserves snapshot-stream auth and emits body-free rows", async () => {
|
|
1075
|
+
const calls: Array<Record<string, unknown>> = [];
|
|
1076
|
+
const service = {
|
|
1077
|
+
offlineSyncManifestStream: async (options: Record<string, unknown>) => {
|
|
1078
|
+
calls.push(options);
|
|
1079
|
+
return {
|
|
1080
|
+
namespace: options.namespace ?? "default",
|
|
1081
|
+
format: "remnic-reconcile-manifest",
|
|
1082
|
+
schemaVersion: 1,
|
|
1083
|
+
files: (async function* () {
|
|
1084
|
+
yield {
|
|
1085
|
+
path: "facts/a.md",
|
|
1086
|
+
sha256: "a".repeat(64),
|
|
1087
|
+
bytes: 12,
|
|
1088
|
+
mtimeMs: 1234,
|
|
1089
|
+
memory: {
|
|
1090
|
+
id: "fact-a",
|
|
1091
|
+
status: "active",
|
|
1092
|
+
category: "fact",
|
|
1093
|
+
contentHash: "b".repeat(64),
|
|
1094
|
+
},
|
|
1095
|
+
};
|
|
1096
|
+
})(),
|
|
1097
|
+
};
|
|
1098
|
+
},
|
|
1099
|
+
} as unknown as EngramAccessService;
|
|
1100
|
+
const server = new EngramAccessHttpServer({
|
|
1101
|
+
service,
|
|
1102
|
+
port: 0,
|
|
1103
|
+
principal: "reader",
|
|
1104
|
+
authTokenEntriesGetter: () => [
|
|
1105
|
+
{ token: "wrong-op", capabilities: { version: 1, ops: ["offline_sync_snapshot"] } },
|
|
1106
|
+
{
|
|
1107
|
+
token: "wrong-namespace",
|
|
1108
|
+
capabilities: { version: 1, ops: ["offline_sync_snapshot_stream"], namespaces: ["other"] },
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
token: "reader",
|
|
1112
|
+
capabilities: { version: 1, ops: ["offline_sync_snapshot_stream"], namespaces: ["team"] },
|
|
1113
|
+
},
|
|
1114
|
+
],
|
|
1115
|
+
adminConsoleEnabled: false,
|
|
1116
|
+
});
|
|
1117
|
+
const status = await server.start();
|
|
1118
|
+
const request = (token: string, query = "namespace=team&include_transcripts=false") =>
|
|
1119
|
+
fetch(`http://127.0.0.1:${status.port}/remnic/v1/offline-sync/manifest-stream?${query}`, {
|
|
1120
|
+
headers: { authorization: `Bearer ${token}` },
|
|
1121
|
+
});
|
|
1122
|
+
try {
|
|
1123
|
+
assert.equal((await request("wrong-op")).status, 403);
|
|
1124
|
+
assert.equal((await request("wrong-namespace")).status, 403);
|
|
1125
|
+
assert.equal(calls.length, 0);
|
|
1126
|
+
assert.equal((await request("reader", "namespace=team&include_transcripts=invalid")).status, 400);
|
|
1127
|
+
assert.equal((await request("reader", "namespace=team&content=true")).status, 400);
|
|
1128
|
+
assert.equal(calls.length, 0);
|
|
1129
|
+
|
|
1130
|
+
const response = await request("reader");
|
|
1131
|
+
const text = await response.text();
|
|
1132
|
+
const lines = text.trim().split("\n").map((line) => JSON.parse(line) as Record<string, unknown>);
|
|
1133
|
+
assert.equal(response.status, 200);
|
|
1134
|
+
assert.equal(response.headers.get("content-type"), "application/x-ndjson; charset=utf-8");
|
|
1135
|
+
assert.equal(lines[0]?.type, "manifest");
|
|
1136
|
+
assert.equal(lines[1]?.type, "file");
|
|
1137
|
+
assert.deepEqual(lines[1]?.file, {
|
|
1138
|
+
path: "facts/a.md",
|
|
1139
|
+
sha256: "a".repeat(64),
|
|
1140
|
+
bytes: 12,
|
|
1141
|
+
mtimeMs: 1234,
|
|
1142
|
+
memory: {
|
|
1143
|
+
id: "fact-a",
|
|
1144
|
+
status: "active",
|
|
1145
|
+
category: "fact",
|
|
1146
|
+
contentHash: "b".repeat(64),
|
|
1147
|
+
},
|
|
1148
|
+
});
|
|
1149
|
+
assert.doesNotMatch(text, /contentBase64|rawContent|memory body/);
|
|
1150
|
+
assert.deepEqual({
|
|
1151
|
+
namespace: calls[0]?.namespace,
|
|
1152
|
+
principal: calls[0]?.principal,
|
|
1153
|
+
includeTranscripts: calls[0]?.includeTranscripts,
|
|
1154
|
+
}, {
|
|
1155
|
+
namespace: "team",
|
|
1156
|
+
principal: "reader",
|
|
1157
|
+
includeTranscripts: false,
|
|
1158
|
+
});
|
|
1159
|
+
} finally {
|
|
1160
|
+
await server.stop();
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1163
|
+
|
|
1164
|
+
test("HTTP offline sync capabilities advertise manifest streaming", async () => {
|
|
1165
|
+
const server = new EngramAccessHttpServer({
|
|
1166
|
+
service: {} as EngramAccessService,
|
|
1167
|
+
port: 0,
|
|
1168
|
+
authToken: "test-token",
|
|
1169
|
+
adminConsoleEnabled: false,
|
|
1170
|
+
});
|
|
1171
|
+
const status = await server.start();
|
|
1172
|
+
try {
|
|
1173
|
+
const response = await fetch(
|
|
1174
|
+
`http://127.0.0.1:${status.port}/engram/v1/offline-sync/capabilities`,
|
|
1175
|
+
{ headers: { authorization: "Bearer test-token" } },
|
|
1176
|
+
);
|
|
1177
|
+
assert.equal(response.status, 200);
|
|
1178
|
+
assert.deepEqual(await response.json(), {
|
|
1179
|
+
version: 1,
|
|
1180
|
+
convergenceFinalization: true,
|
|
1181
|
+
manifestStream: true,
|
|
1182
|
+
});
|
|
1183
|
+
} finally {
|
|
1184
|
+
await server.stop();
|
|
1185
|
+
}
|
|
1186
|
+
});
|
|
1187
|
+
|
|
1065
1188
|
|
|
1066
1189
|
test("HTTP offline files forwards namespace and requested paths", async () => {
|
|
1067
1190
|
const calls: Array<{
|
|
@@ -2960,6 +3083,42 @@ test("HTTP chat/message gates the NEW session's namespace — scoped token canno
|
|
|
2960
3083
|
}
|
|
2961
3084
|
});
|
|
2962
3085
|
|
|
3086
|
+
test("HTTP recall forwards the connector from the authorized token entry", async () => {
|
|
3087
|
+
let captured: EngramAccessRecallRequest | undefined;
|
|
3088
|
+
const service = {
|
|
3089
|
+
recall: (request: EngramAccessRecallRequest) => {
|
|
3090
|
+
captured = request;
|
|
3091
|
+
return Promise.resolve({ context: "", count: 0, memoryIds: [], results: [] });
|
|
3092
|
+
},
|
|
3093
|
+
} as unknown as EngramAccessService;
|
|
3094
|
+
const server = new EngramAccessHttpServer({
|
|
3095
|
+
service,
|
|
3096
|
+
port: 0,
|
|
3097
|
+
authTokenEntriesGetter: () => [
|
|
3098
|
+
{ token: "connector-token", connector: "chatgpt" },
|
|
3099
|
+
],
|
|
3100
|
+
adminConsoleEnabled: false,
|
|
3101
|
+
});
|
|
3102
|
+
const status = await server.start();
|
|
3103
|
+
try {
|
|
3104
|
+
const response = await fetch(
|
|
3105
|
+
`http://127.0.0.1:${status.port}/engram/v1/recall`,
|
|
3106
|
+
{
|
|
3107
|
+
method: "POST",
|
|
3108
|
+
headers: {
|
|
3109
|
+
authorization: "Bearer connector-token",
|
|
3110
|
+
"content-type": "application/json",
|
|
3111
|
+
},
|
|
3112
|
+
body: JSON.stringify({ query: "shared namespace query" }),
|
|
3113
|
+
},
|
|
3114
|
+
);
|
|
3115
|
+
assert.equal(response.status, 200);
|
|
3116
|
+
assert.equal(captured?.sourceConnector, "chatgpt");
|
|
3117
|
+
} finally {
|
|
3118
|
+
await server.stop();
|
|
3119
|
+
}
|
|
3120
|
+
});
|
|
3121
|
+
|
|
2963
3122
|
// ---------------------------------------------------------------------------
|
|
2964
3123
|
// PR #1852: token-rotation race — authorized entry must be reused for provenance
|
|
2965
3124
|
// ---------------------------------------------------------------------------
|
|
@@ -3649,6 +3808,34 @@ test("HTTP authorization probe verifies requested operation grants without invok
|
|
|
3649
3808
|
}
|
|
3650
3809
|
});
|
|
3651
3810
|
|
|
3811
|
+
test("HTTP capabilities explicitly advertise receiver convergence finalization", async () => {
|
|
3812
|
+
const service = {} as EngramAccessService;
|
|
3813
|
+
const server = new EngramAccessHttpServer({
|
|
3814
|
+
service,
|
|
3815
|
+
port: 0,
|
|
3816
|
+
authToken: "test-token",
|
|
3817
|
+
adminConsoleEnabled: false,
|
|
3818
|
+
});
|
|
3819
|
+
|
|
3820
|
+
const status = await server.start();
|
|
3821
|
+
try {
|
|
3822
|
+
const route = `http://127.0.0.1:${status.port}/engram/v1/capabilities`;
|
|
3823
|
+
const denied = await fetch(route);
|
|
3824
|
+
assert.equal(denied.status, 401);
|
|
3825
|
+
|
|
3826
|
+
const response = await fetch(route, {
|
|
3827
|
+
headers: { authorization: "Bearer test-token" },
|
|
3828
|
+
});
|
|
3829
|
+
assert.equal(response.status, 200);
|
|
3830
|
+
assert.deepEqual(await response.json(), {
|
|
3831
|
+
lcmCompactionFlushBatch: true,
|
|
3832
|
+
offlineSyncConvergenceComplete: true,
|
|
3833
|
+
});
|
|
3834
|
+
} finally {
|
|
3835
|
+
await server.stop();
|
|
3836
|
+
}
|
|
3837
|
+
});
|
|
3838
|
+
|
|
3652
3839
|
test("HTTP convergence completion forwards one authenticated namespace batch refresh", async () => {
|
|
3653
3840
|
const calls: Array<{ namespaces: string[]; principal?: string; sourceId: string }> = [];
|
|
3654
3841
|
const service = {
|
|
@@ -3701,6 +3888,50 @@ test("HTTP convergence completion forwards one authenticated namespace batch ref
|
|
|
3701
3888
|
}
|
|
3702
3889
|
});
|
|
3703
3890
|
|
|
3891
|
+
test("HTTP convergence completion accepts either receiver mutation grant", async () => {
|
|
3892
|
+
let completions = 0;
|
|
3893
|
+
const service = {
|
|
3894
|
+
offlineSyncFinalizeConvergence: async () => {
|
|
3895
|
+
completions += 1;
|
|
3896
|
+
return { namespaces: ["team"], refreshed: true as const };
|
|
3897
|
+
},
|
|
3898
|
+
} as unknown as EngramAccessService;
|
|
3899
|
+
const server = new EngramAccessHttpServer({
|
|
3900
|
+
service,
|
|
3901
|
+
port: 0,
|
|
3902
|
+
authTokenEntriesGetter: () => [
|
|
3903
|
+
{ token: "file-token", capabilities: { version: 1, ops: ["offline_sync_apply_file_content"] } },
|
|
3904
|
+
{ token: "delete-token", capabilities: { version: 1, ops: ["offline_sync_apply"] } },
|
|
3905
|
+
{ token: "read-token", capabilities: { version: 1, ops: ["offline_sync_snapshot"] } },
|
|
3906
|
+
],
|
|
3907
|
+
adminConsoleEnabled: false,
|
|
3908
|
+
});
|
|
3909
|
+
const status = await server.start();
|
|
3910
|
+
const route = `http://127.0.0.1:${status.port}/remnic/v1/offline-sync/convergence-complete?namespace=team`;
|
|
3911
|
+
const complete = (token: string) => fetch(route, {
|
|
3912
|
+
method: "POST",
|
|
3913
|
+
headers: {
|
|
3914
|
+
authorization: `Bearer ${token}`,
|
|
3915
|
+
"x-remnic-source-id": encodeURIComponent("remnic-converge"),
|
|
3916
|
+
},
|
|
3917
|
+
});
|
|
3918
|
+
|
|
3919
|
+
try {
|
|
3920
|
+
const fileResponse = await complete("file-token");
|
|
3921
|
+
assert.equal(fileResponse.status, 200);
|
|
3922
|
+
await fileResponse.text();
|
|
3923
|
+
const deleteResponse = await complete("delete-token");
|
|
3924
|
+
assert.equal(deleteResponse.status, 200);
|
|
3925
|
+
await deleteResponse.text();
|
|
3926
|
+
const deniedResponse = await complete("read-token");
|
|
3927
|
+
assert.equal(deniedResponse.status, 403);
|
|
3928
|
+
await deniedResponse.text();
|
|
3929
|
+
assert.equal(completions, 2);
|
|
3930
|
+
} finally {
|
|
3931
|
+
await server.stop();
|
|
3932
|
+
}
|
|
3933
|
+
});
|
|
3934
|
+
|
|
3704
3935
|
test("HTTP convergence completion enforces the per-principal write rate limit", async () => {
|
|
3705
3936
|
let completions = 0;
|
|
3706
3937
|
const service = {
|
|
@@ -3784,3 +4015,79 @@ test("HTTP convergence completion denies scoped tokens that omit the namespace",
|
|
|
3784
4015
|
await server.stop();
|
|
3785
4016
|
}
|
|
3786
4017
|
});
|
|
4018
|
+
|
|
4019
|
+
test("HTTP external wiki search aliases return the same cited result", async () => {
|
|
4020
|
+
const rootDir = await mkdtemp(path.join(os.tmpdir(), "remnic-http-external-wiki-"));
|
|
4021
|
+
await mkdir(path.join(rootDir, "wiki"), { recursive: true });
|
|
4022
|
+
await writeFile(
|
|
4023
|
+
path.join(rootDir, "INDEX.md"),
|
|
4024
|
+
"- [[wiki/planning|Planning Systems]] - deterministic planner fan-out\n",
|
|
4025
|
+
"utf8",
|
|
4026
|
+
);
|
|
4027
|
+
await writeFile(
|
|
4028
|
+
path.join(rootDir, "wiki", "planning.md"),
|
|
4029
|
+
"# Planning Systems\n\nDeterministic planner fan-out keeps cited evidence.\n",
|
|
4030
|
+
"utf8",
|
|
4031
|
+
);
|
|
4032
|
+
const service = {
|
|
4033
|
+
configRef: {
|
|
4034
|
+
externalWikis: [{
|
|
4035
|
+
id: "planning",
|
|
4036
|
+
rootDir,
|
|
4037
|
+
enabled: true,
|
|
4038
|
+
pagesDir: "wiki",
|
|
4039
|
+
indexFile: "INDEX.md",
|
|
4040
|
+
indexInQmd: false,
|
|
4041
|
+
includeInDefaultRecall: false,
|
|
4042
|
+
}],
|
|
4043
|
+
},
|
|
4044
|
+
} as unknown as EngramAccessService;
|
|
4045
|
+
const server = new EngramAccessHttpServer({
|
|
4046
|
+
service,
|
|
4047
|
+
port: 0,
|
|
4048
|
+
authToken: "test-token",
|
|
4049
|
+
adminConsoleEnabled: false,
|
|
4050
|
+
});
|
|
4051
|
+
|
|
4052
|
+
const status = await server.start();
|
|
4053
|
+
try {
|
|
4054
|
+
let canonicalBody: unknown;
|
|
4055
|
+
for (const prefix of ["remnic", "engram"]) {
|
|
4056
|
+
const response = await fetch(`http://127.0.0.1:${status.port}/${prefix}/v1/external-wikis/search`, {
|
|
4057
|
+
method: "POST",
|
|
4058
|
+
headers: {
|
|
4059
|
+
authorization: "Bearer test-token",
|
|
4060
|
+
"content-type": "application/json",
|
|
4061
|
+
},
|
|
4062
|
+
body: JSON.stringify({
|
|
4063
|
+
query: "deterministic planner",
|
|
4064
|
+
wikiId: "planning",
|
|
4065
|
+
limit: 2,
|
|
4066
|
+
maxCharsPerHit: 200,
|
|
4067
|
+
}),
|
|
4068
|
+
});
|
|
4069
|
+
assert.equal(response.status, 200);
|
|
4070
|
+
const body: unknown = await response.json();
|
|
4071
|
+
if (canonicalBody === undefined) canonicalBody = body;
|
|
4072
|
+
else assert.deepEqual(body, canonicalBody);
|
|
4073
|
+
}
|
|
4074
|
+
assert.ok(canonicalBody && typeof canonicalBody === "object" && "hits" in canonicalBody);
|
|
4075
|
+
assert.ok(Array.isArray(canonicalBody.hits));
|
|
4076
|
+
const firstHit = canonicalBody.hits[0];
|
|
4077
|
+
assert.ok(firstHit && typeof firstHit === "object" && "path" in firstHit);
|
|
4078
|
+
assert.equal(firstHit.path, "wiki/planning.md");
|
|
4079
|
+
|
|
4080
|
+
const invalid = await fetch(`http://127.0.0.1:${status.port}/remnic/v1/external-wikis/search`, {
|
|
4081
|
+
method: "POST",
|
|
4082
|
+
headers: {
|
|
4083
|
+
authorization: "Bearer test-token",
|
|
4084
|
+
"content-type": "application/json",
|
|
4085
|
+
},
|
|
4086
|
+
body: JSON.stringify({ query: " " }),
|
|
4087
|
+
});
|
|
4088
|
+
assert.equal(invalid.status, 400);
|
|
4089
|
+
} finally {
|
|
4090
|
+
await server.stop();
|
|
4091
|
+
await rm(rootDir, { recursive: true, force: true });
|
|
4092
|
+
}
|
|
4093
|
+
});
|
package/src/access-http.ts
CHANGED
|
@@ -18,6 +18,10 @@ import {
|
|
|
18
18
|
type EngramAccessWriteResponse,
|
|
19
19
|
} from "./access-service.js";
|
|
20
20
|
import { maybeHandleLifecycleFlush, type LifecycleFlushHttpDeps } from "./access-http-lifecycle-flush.js";
|
|
21
|
+
import {
|
|
22
|
+
respondOfflineManifestStream,
|
|
23
|
+
respondOfflineSnapshotStream,
|
|
24
|
+
} from "./access-http-offline-stream.js";
|
|
21
25
|
import { nonEmptyQueryParam, optionalQueryString, positiveIntQueryParam } from "./access-http-query.js";
|
|
22
26
|
import { CorrectionContractError } from "./correction/correction-contract.js";
|
|
23
27
|
import { WearablesInputError } from "./wearables/errors.js"; import { respondMeetingsList, respondMeetingsGet, respondMeetingsBuild } from "./meetings/http-glue.js";
|
|
@@ -42,7 +46,7 @@ import { projectTagProjectId } from "./coding/coding-namespace.js";
|
|
|
42
46
|
import { getOperation, type OperationName } from "./access-boundary.js";
|
|
43
47
|
import { authorizationProbeNamespaces, probeOperationAuthorization } from "./access-authorization-probe.js";
|
|
44
48
|
import { resolveQueryNamespaceWritablePreflight } from "./access-namespace-preflight.js";
|
|
45
|
-
import {
|
|
49
|
+
import { respondAccessCapabilitiesHttp } from "./access-http-lcm-compaction.js";
|
|
46
50
|
import {
|
|
47
51
|
assertOperationAllowed,
|
|
48
52
|
capabilityAllowsOp,
|
|
@@ -898,7 +902,7 @@ export class EngramAccessHttpServer {
|
|
|
898
902
|
});
|
|
899
903
|
return;
|
|
900
904
|
}
|
|
901
|
-
if (req.method === "GET" && pathname === "/engram/v1/capabilities") return
|
|
905
|
+
if (req.method === "GET" && pathname === "/engram/v1/capabilities") return respondAccessCapabilitiesHttp(res);
|
|
902
906
|
if (req.method === "GET" && pathname === "/engram/v1/authorization") {
|
|
903
907
|
res.setHeader("cache-control", "no-store");
|
|
904
908
|
const probe = probeOperationAuthorization(tokenCapabilityStore.getStore(), parsed.searchParams.getAll("op"));
|
|
@@ -910,11 +914,6 @@ export class EngramAccessHttpServer {
|
|
|
910
914
|
}
|
|
911
915
|
|
|
912
916
|
if (req.method === "GET" && pathname === "/engram/v1/adapters") {
|
|
913
|
-
// Issue #1850 round 5 (finding 1): adapter metadata is served after
|
|
914
|
-
// auth but was NOT op-gated, so a deny-all or narrow-ops token reached
|
|
915
|
-
// it. enforceTokenOp fail-closes it under the per-token ops allow-list;
|
|
916
|
-
// no-op for unrestricted/legacy tokens. There is no namespace axis —
|
|
917
|
-
// adapter metadata is not tenant-scoped.
|
|
918
917
|
this.enforceTokenOp("adapters_status"); // boundary dispatch (issue #1850)
|
|
919
918
|
const identity = this.resolveAdapterIdentity(req);
|
|
920
919
|
this.respondJson(res, 200, {
|
|
@@ -958,6 +957,21 @@ export class EngramAccessHttpServer {
|
|
|
958
957
|
}
|
|
959
958
|
return;
|
|
960
959
|
}
|
|
960
|
+
if (
|
|
961
|
+
req.method === "POST" &&
|
|
962
|
+
(pathname === "/engram/v1/external-wikis/search" ||
|
|
963
|
+
pathname === "/remnic/v1/external-wikis/search")
|
|
964
|
+
) {
|
|
965
|
+
this.enforceTokenOp("external_wiki_search");
|
|
966
|
+
const operation = getOperation("external_wiki_search");
|
|
967
|
+
if (!operation) throw new EngramAccessInputError("external_wiki_search operation is not registered");
|
|
968
|
+
const output = await operation.run(await this.readJsonBody(req), { service: this.service });
|
|
969
|
+
if (!output || typeof output !== "object" || !("result" in output)) {
|
|
970
|
+
throw new Error("external_wiki_search returned an invalid operation result");
|
|
971
|
+
}
|
|
972
|
+
this.respondJson(res, 200, output.result);
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
961
975
|
|
|
962
976
|
if (req.method === "POST" && pathname === "/engram/v1/recall") {
|
|
963
977
|
this.enforceTokenOp("recall"); // boundary dispatch (issue #1525)
|
|
@@ -1055,6 +1069,7 @@ export class EngramAccessHttpServer {
|
|
|
1055
1069
|
query: body.query ?? "",
|
|
1056
1070
|
sessionKey: body.sessionKey,
|
|
1057
1071
|
authenticatedPrincipal: this.resolveRequestPrincipal(req),
|
|
1072
|
+
sourceConnector: this.resolveConnector(req),
|
|
1058
1073
|
idempotencyKey: body.idempotencyKey,
|
|
1059
1074
|
namespace: this.resolveNamespace(req, body.namespace),
|
|
1060
1075
|
topK: body.topK,
|
|
@@ -1078,10 +1093,6 @@ export class EngramAccessHttpServer {
|
|
|
1078
1093
|
return;
|
|
1079
1094
|
}
|
|
1080
1095
|
|
|
1081
|
-
// Attach / clear coding-agent context for a session (issue #569 PR 5).
|
|
1082
|
-
// Mirrors `setCodingContext` on the access service. Connectors call this
|
|
1083
|
-
// at session start after resolving a git context for the cwd; `remnic
|
|
1084
|
-
// doctor` (PR 8) surfaces the attached context.
|
|
1085
1096
|
if (req.method === "POST" && pathname === "/engram/v1/coding-context") {
|
|
1086
1097
|
this.enforceTokenOp("set_coding_context"); // boundary dispatch (issue #1525)
|
|
1087
1098
|
const body = await this.readValidatedBody(req, "setCodingContext");
|
|
@@ -1142,6 +1153,20 @@ export class EngramAccessHttpServer {
|
|
|
1142
1153
|
return;
|
|
1143
1154
|
}
|
|
1144
1155
|
|
|
1156
|
+
if (
|
|
1157
|
+
req.method === "GET" &&
|
|
1158
|
+
(pathname === "/engram/v1/offline-sync/capabilities" ||
|
|
1159
|
+
pathname === "/remnic/v1/offline-sync/capabilities")
|
|
1160
|
+
) {
|
|
1161
|
+
this.enforceTokenOp("offline_sync_snapshot");
|
|
1162
|
+
this.respondJson(res, 200, {
|
|
1163
|
+
version: 1,
|
|
1164
|
+
convergenceFinalization: true,
|
|
1165
|
+
manifestStream: true,
|
|
1166
|
+
});
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1145
1170
|
if (
|
|
1146
1171
|
req.method === "GET" &&
|
|
1147
1172
|
(pathname === "/engram/v1/offline-sync/snapshot" || pathname === "/remnic/v1/offline-sync/snapshot")
|
|
@@ -1215,10 +1240,44 @@ export class EngramAccessHttpServer {
|
|
|
1215
1240
|
includeContent: false,
|
|
1216
1241
|
signal: this.createRequestAbortSignal(req, res),
|
|
1217
1242
|
});
|
|
1218
|
-
await
|
|
1243
|
+
await respondOfflineSnapshotStream(res, result, correlationIdStore.getStore());
|
|
1244
|
+
return;
|
|
1245
|
+
}
|
|
1246
|
+
if (
|
|
1247
|
+
req.method === "GET" &&
|
|
1248
|
+
(pathname === "/engram/v1/offline-sync/manifest-stream" ||
|
|
1249
|
+
pathname === "/remnic/v1/offline-sync/manifest-stream")
|
|
1250
|
+
) {
|
|
1251
|
+
this.enforceTokenOp("offline_sync_snapshot_stream");
|
|
1252
|
+
const includeTranscriptsRaw = parsed.searchParams.get("include_transcripts");
|
|
1253
|
+
const includeContentRaw = parsed.searchParams.get("content");
|
|
1254
|
+
if (
|
|
1255
|
+
includeTranscriptsRaw !== null &&
|
|
1256
|
+
includeTranscriptsRaw !== "true" &&
|
|
1257
|
+
includeTranscriptsRaw !== "false"
|
|
1258
|
+
) {
|
|
1259
|
+
throw new EngramAccessInputError(
|
|
1260
|
+
`include_transcripts must be one of: true, false (got: ${includeTranscriptsRaw})`,
|
|
1261
|
+
);
|
|
1262
|
+
}
|
|
1263
|
+
if (includeContentRaw !== null && includeContentRaw !== "false") {
|
|
1264
|
+
throw new EngramAccessInputError("manifest-stream content must be false");
|
|
1265
|
+
}
|
|
1266
|
+
const namespaceParam = parsed.searchParams.get("namespace");
|
|
1267
|
+
const result = await this.service.offlineSyncManifestStream({
|
|
1268
|
+
namespace: this.resolveNamespace(
|
|
1269
|
+
req,
|
|
1270
|
+
namespaceParam && namespaceParam.length > 0 ? namespaceParam : undefined,
|
|
1271
|
+
),
|
|
1272
|
+
principal: this.resolveRequestPrincipal(req),
|
|
1273
|
+
includeTranscripts: includeTranscriptsRaw !== "false",
|
|
1274
|
+
signal: this.createRequestAbortSignal(req, res),
|
|
1275
|
+
});
|
|
1276
|
+
await respondOfflineManifestStream(res, result, correlationIdStore.getStore());
|
|
1219
1277
|
return;
|
|
1220
1278
|
}
|
|
1221
1279
|
|
|
1280
|
+
|
|
1222
1281
|
if (
|
|
1223
1282
|
req.method === "POST" &&
|
|
1224
1283
|
(pathname === "/engram/v1/offline-sync/snapshot" || pathname === "/remnic/v1/offline-sync/snapshot")
|
|
@@ -1323,6 +1382,7 @@ export class EngramAccessHttpServer {
|
|
|
1323
1382
|
return;
|
|
1324
1383
|
}
|
|
1325
1384
|
|
|
1385
|
+
|
|
1326
1386
|
if (
|
|
1327
1387
|
req.method === "POST" &&
|
|
1328
1388
|
(
|
|
@@ -1330,7 +1390,8 @@ export class EngramAccessHttpServer {
|
|
|
1330
1390
|
pathname === "/remnic/v1/offline-sync/convergence-complete"
|
|
1331
1391
|
)
|
|
1332
1392
|
) {
|
|
1333
|
-
|
|
1393
|
+
void getOperation("offline_sync_apply_file_content");
|
|
1394
|
+
this.enforceTokenAnyOf(["offline_sync_apply_file_content", "offline_sync_apply"]);
|
|
1334
1395
|
const namespaceParams = parsed.searchParams.getAll("namespace").filter(Boolean);
|
|
1335
1396
|
const requestedNamespaces: Array<string | undefined> =
|
|
1336
1397
|
namespaceParams.length > 0 ? namespaceParams : [undefined];
|
|
@@ -1386,9 +1447,6 @@ export class EngramAccessHttpServer {
|
|
|
1386
1447
|
return;
|
|
1387
1448
|
}
|
|
1388
1449
|
|
|
1389
|
-
// Tier-explain (issue #518): structured per-result annotation from
|
|
1390
|
-
// the direct-answer retrieval tier. Orthogonal to /recall/explain
|
|
1391
|
-
// above, which returns a graph-path explanation document.
|
|
1392
1450
|
if (req.method === "GET" && pathname === "/engram/v1/recall/tier-explain") {
|
|
1393
1451
|
this.enforceTokenOp("recall_tier_explain"); // boundary dispatch (issue #1525)
|
|
1394
1452
|
const sessionParam = parsed.searchParams.get("session");
|
|
@@ -1486,6 +1544,7 @@ export class EngramAccessHttpServer {
|
|
|
1486
1544
|
namespace,
|
|
1487
1545
|
budget,
|
|
1488
1546
|
authenticatedPrincipal: this.resolveRequestPrincipal(req),
|
|
1547
|
+
sourceConnector: this.resolveConnector(req),
|
|
1489
1548
|
...(disclosure !== undefined ? { disclosure } : {}),
|
|
1490
1549
|
});
|
|
1491
1550
|
} catch (err) {
|
|
@@ -1526,11 +1585,6 @@ export class EngramAccessHttpServer {
|
|
|
1526
1585
|
return;
|
|
1527
1586
|
}
|
|
1528
1587
|
|
|
1529
|
-
// -- Wearables (Limitless / Bee / Omi transcript ingestion). All
|
|
1530
|
-
// behavior + validation lives in WearablesService; these routes
|
|
1531
|
-
// translate transport shape only. Service validation errors map
|
|
1532
|
-
// to 400 via respondWearablesError; backend faults bubble to the
|
|
1533
|
-
// global 500 handler.
|
|
1534
1588
|
if (
|
|
1535
1589
|
req.method === "GET" &&
|
|
1536
1590
|
(pathname === "/engram/v1/wearables/status" || pathname === "/remnic/v1/wearables/status")
|
|
@@ -3417,6 +3471,7 @@ export class EngramAccessHttpServer {
|
|
|
3417
3471
|
createdAt: snapshot.createdAt,
|
|
3418
3472
|
sourceId: snapshot.sourceId,
|
|
3419
3473
|
includeTranscripts: snapshot.includeTranscripts,
|
|
3474
|
+
deletions: snapshot.deletions,
|
|
3420
3475
|
})) return;
|
|
3421
3476
|
for await (const file of snapshot.files) {
|
|
3422
3477
|
if (!await writeLine({ type: "file", file })) return;
|
|
@@ -3856,6 +3911,15 @@ export class EngramAccessHttpServer {
|
|
|
3856
3911
|
void getOperation(op); // preserve the registration side-effect assertion
|
|
3857
3912
|
assertOperationAllowed(tokenCapabilityStore.getStore(), op);
|
|
3858
3913
|
}
|
|
3914
|
+
|
|
3915
|
+
private enforceTokenAnyOf(ops: readonly OperationName[]): void {
|
|
3916
|
+
for (const op of ops) void getOperation(op);
|
|
3917
|
+
const capabilities = tokenCapabilityStore.getStore();
|
|
3918
|
+
if (ops.some((op) => capabilityAllowsOp(capabilities, op))) return;
|
|
3919
|
+
throw new EngramAccessForbiddenError(
|
|
3920
|
+
`token is not permitted to call any required operation: ${ops.join(", ")}`,
|
|
3921
|
+
);
|
|
3922
|
+
}
|
|
3859
3923
|
|
|
3860
3924
|
/**
|
|
3861
3925
|
* Operator/admin routes are unrestricted-only surfaces: a scoped
|
|
@@ -260,6 +260,42 @@ const TOOL_OUTPUT_SCHEMAS: Readonly<Record<string, Record<string, unknown>>> = {
|
|
|
260
260
|
guidelineVersion: { type: ["number", "null"] } as const,
|
|
261
261
|
}),
|
|
262
262
|
memory_search: objectSchema({ query: T_STRING, results: T_ARRAY, count: T_NUMBER }),
|
|
263
|
+
external_wiki_search: objectSchema({
|
|
264
|
+
query: T_STRING,
|
|
265
|
+
hits: {
|
|
266
|
+
type: "array",
|
|
267
|
+
items: {
|
|
268
|
+
type: "object",
|
|
269
|
+
properties: {
|
|
270
|
+
wikiId: T_STRING,
|
|
271
|
+
title: T_STRING,
|
|
272
|
+
path: T_STRING,
|
|
273
|
+
snippet: T_STRING,
|
|
274
|
+
score: T_NUMBER,
|
|
275
|
+
rank: T_NUMBER,
|
|
276
|
+
citations: {
|
|
277
|
+
type: "array",
|
|
278
|
+
items: {
|
|
279
|
+
type: "object",
|
|
280
|
+
properties: {
|
|
281
|
+
path: T_STRING,
|
|
282
|
+
lineStart: T_NUMBER,
|
|
283
|
+
lineEnd: T_NUMBER,
|
|
284
|
+
note: T_STRING,
|
|
285
|
+
},
|
|
286
|
+
required: ["path", "lineStart", "lineEnd", "note"],
|
|
287
|
+
additionalProperties: false,
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
indexBlurb: T_STRING,
|
|
291
|
+
},
|
|
292
|
+
required: ["wikiId", "title", "path", "snippet", "score", "rank", "citations"],
|
|
293
|
+
additionalProperties: false,
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
count: T_NUMBER,
|
|
297
|
+
degradedWikiIds: T_ARRAY,
|
|
298
|
+
}, ["query", "hits", "count", "degradedWikiIds"]),
|
|
263
299
|
memory_profile: objectSchema({ profile: T_STRING }),
|
|
264
300
|
memory_entities_list: objectSchema({ entities: T_ARRAY, count: T_NUMBER }),
|
|
265
301
|
memory_questions: objectSchema({ questions: T_ARRAY, count: T_NUMBER }),
|