@remnic/core 9.69.41 → 9.69.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.d.ts +16 -13
- package/dist/access-admin-ops-surface.js +48 -40
- package/dist/access-authorization-probe.d.ts +16 -13
- package/dist/access-authorization-probe.js +49 -41
- package/dist/access-boundary.d.ts +16 -13
- package/dist/access-boundary.js +48 -40
- package/dist/access-cli.js +115 -105
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +2 -1
- package/dist/access-extraction-force-flush.d.ts +16 -13
- package/dist/access-extraction-force-flush.js +48 -40
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-briefing.d.ts +16 -13
- package/dist/access-http-briefing.js +49 -41
- package/dist/access-http-lcm-compaction.d.ts +16 -13
- package/dist/access-http-lifecycle-flush.d.ts +16 -13
- package/dist/access-http-offline-stream.d.ts +16 -13
- package/dist/access-http-query.d.ts +3 -2
- package/dist/access-http-query.js +50 -42
- package/dist/access-http.d.ts +17 -14
- package/dist/access-http.js +70 -60
- package/dist/access-identity-continuity-surface.d.ts +12 -11
- package/dist/access-identity-continuity-surface.js +48 -40
- package/dist/access-lcm-surface.d.ts +16 -13
- package/dist/access-lcm-surface.js +48 -40
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp-shared-context-tools.d.ts +16 -13
- package/dist/access-mcp.d.ts +16 -13
- package/dist/access-mcp.js +60 -51
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-DWsMc9Dh.d.ts → access-namespace-preflight-CE-RrXKu.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +4 -3
- package/dist/access-namespace-preflight.js +48 -40
- package/dist/access-observe-transcript.d.ts +12 -11
- package/dist/access-observe-write-category.d.ts +18 -1
- package/dist/access-observe-write-category.js +21 -4
- package/dist/access-observe-write-surface.d.ts +16 -13
- package/dist/access-observe-write-surface.js +48 -40
- package/dist/access-offline-manifest.d.ts +12 -11
- package/dist/access-offline-manifest.js +6 -6
- package/dist/access-operations-batch.js +50 -43
- package/dist/access-operations.d.ts +17 -14
- package/dist/access-operations.js +56 -48
- package/dist/access-recall-concurrency.d.ts +16 -13
- package/dist/access-recall-concurrency.js +48 -40
- package/dist/access-recall-response.d.ts +16 -13
- package/dist/access-recall-response.js +48 -40
- package/dist/access-recall-surface.d.ts +16 -13
- package/dist/access-recall-surface.js +48 -40
- package/dist/access-schema.d.ts +5 -1
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-Cisy5YDq.d.ts → access-service-DxTTTg9O.d.ts} +15 -11
- package/dist/access-service-helpers.d.ts +16 -13
- package/dist/access-service.d.ts +16 -13
- package/dist/access-service.js +48 -40
- package/dist/access-surface-catalog.d.ts +16 -13
- package/dist/access-surface-catalog.js +54 -42
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +5 -4
- 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 +9 -7
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +2 -1
- package/dist/ambient-provenance.d.ts +2 -1
- package/dist/artifact-search.d.ts +2 -1
- package/dist/{auto-sync-7PGUFY7U.js → auto-sync-QZD4RD6H.js} +9 -5
- package/dist/{auto-sync-7PGUFY7U.js.map → auto-sync-QZD4RD6H.js.map} +1 -1
- package/dist/background-generation.d.ts +2 -1
- package/dist/behavior-learner.d.ts +2 -1
- package/dist/behavior-signals.d.ts +2 -1
- package/dist/bootstrap.d.ts +12 -11
- package/dist/briefing-window.d.ts +3 -2
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +13 -13
- 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 +7 -7
- 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-crypto-YO5QJ6L3.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/{catalog-wcX1QhtQ.d.ts → catalog-Ya3DDn_T.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +2 -1
- package/dist/causal-consolidation.d.ts +2 -1
- package/dist/causal-consolidation.js +14 -14
- package/dist/causal-trajectory-graph.d.ts +2 -1
- package/dist/{chunk-QVSRE355.js → chunk-2AV75BJW.js} +29 -1
- package/dist/chunk-2AV75BJW.js.map +1 -0
- package/dist/{chunk-563X6JJX.js → chunk-2HDLDBJW.js} +2 -2
- package/dist/{chunk-BXLOS5AJ.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-WBQ4ONQJ.js → chunk-2PIC6CEN.js} +2 -2
- package/dist/chunk-2WFOVXVJ.js +95 -0
- package/dist/chunk-2WFOVXVJ.js.map +1 -0
- package/dist/{chunk-54QPOE45.js → chunk-2YIUUXNK.js} +2 -2
- package/dist/{chunk-XRS65T4O.js → chunk-324HBGS4.js} +6 -6
- package/dist/chunk-324HBGS4.js.map +1 -0
- package/dist/{chunk-AKABVXFS.js → chunk-3254BYQV.js} +1 -1
- package/dist/{chunk-XCPNH2MG.js → chunk-3KJTSCSX.js} +5 -5
- package/dist/{chunk-I33QYUAF.js → chunk-3YQ7VLP3.js} +2 -2
- package/dist/{chunk-JMWUPUE6.js → chunk-46FVFU7S.js} +2 -2
- package/dist/{chunk-PFKIOYJH.js → chunk-4WMGRLTV.js} +7 -7
- package/dist/{chunk-KLUC2GSG.js → chunk-5AJZ7EUW.js} +5 -5
- package/dist/chunk-5KVT6G5U.js +31 -0
- package/dist/chunk-5KVT6G5U.js.map +1 -0
- package/dist/{chunk-WN2OXGGH.js → chunk-66YUOI53.js} +1 -1
- package/dist/chunk-66YUOI53.js.map +1 -0
- package/dist/{chunk-Z7NBT6AK.js → chunk-6EGIQEKC.js} +2 -2
- package/dist/{chunk-6MQMYXSQ.js → chunk-7F47R4H4.js} +2 -2
- package/dist/{chunk-YFXAWGMR.js → chunk-7L54ARML.js} +2 -2
- package/dist/{chunk-2EYZ32LH.js → chunk-7RGX7BMF.js} +24 -2
- package/dist/{chunk-2EYZ32LH.js.map → chunk-7RGX7BMF.js.map} +1 -1
- package/dist/{chunk-LVFI5LG7.js → chunk-A7GQBJP5.js} +7 -7
- package/dist/{chunk-EMSYMYXO.js → chunk-AKB44K3D.js} +8 -8
- package/dist/chunk-AS2NOPDM.js +30 -0
- package/dist/chunk-AS2NOPDM.js.map +1 -0
- package/dist/{chunk-3BLHPQHT.js → chunk-BPXJINHW.js} +5 -5
- package/dist/{chunk-D6PY63OM.js → chunk-BZDK5EOD.js} +2 -2
- package/dist/{chunk-2J3V5QEO.js → chunk-C3QXITIP.js} +4 -4
- package/dist/{chunk-PLJ2MQFT.js → chunk-C3YEB7CR.js} +7 -7
- package/dist/{chunk-DM5CU5J7.js → chunk-CRK6F6N3.js} +3 -2
- package/dist/chunk-CRK6F6N3.js.map +1 -0
- package/dist/{chunk-2ZG2LLZT.js → chunk-D7UUB33A.js} +2 -2
- package/dist/{chunk-E3I3NDUP.js → chunk-DABSYX7V.js} +7 -7
- package/dist/{chunk-KJLLPG26.js → chunk-DDGQDNQW.js} +2 -2
- package/dist/{chunk-K5D2XVNN.js → chunk-F2FJTOV6.js} +2 -2
- package/dist/{chunk-EAARGPWI.js → chunk-F3TURDFG.js} +3 -1
- package/dist/chunk-F3TURDFG.js.map +1 -0
- package/dist/{chunk-7ZLC4DTZ.js → chunk-F6PTJLEM.js} +1 -1
- package/dist/chunk-F6PTJLEM.js.map +1 -0
- package/dist/{chunk-P66QH6R6.js → chunk-GKKLI23D.js} +2 -2
- package/dist/{chunk-ICN37XHG.js → chunk-GMU7MAHS.js} +19 -19
- package/dist/{chunk-RQQO3ORQ.js → chunk-GR76OKET.js} +13 -4
- package/dist/{chunk-RQQO3ORQ.js.map → chunk-GR76OKET.js.map} +1 -1
- package/dist/{chunk-PQ42DJNG.js → chunk-H2N6SLTR.js} +2 -2
- package/dist/{chunk-ND7MAIJC.js → chunk-HKQAI6XI.js} +2 -2
- package/dist/{chunk-C3G6MW4W.js → chunk-IB7FDRRC.js} +2 -2
- package/dist/{chunk-WFMQN7JE.js → chunk-IWHNT35B.js} +3 -3
- package/dist/{chunk-W7UV2ZCA.js → chunk-JDL5BYYF.js} +3 -3
- package/dist/{chunk-N6XTC56E.js → chunk-JWBDHA4F.js} +15 -11
- package/dist/chunk-JWBDHA4F.js.map +1 -0
- package/dist/{chunk-5EQT62HH.js → chunk-KDLOKVX7.js} +2 -2
- package/dist/chunk-KIW3OOZE.js +39 -0
- package/dist/chunk-KIW3OOZE.js.map +1 -0
- package/dist/{chunk-GMH5QPUU.js → chunk-KOM36ILJ.js} +19 -15
- package/dist/chunk-KOM36ILJ.js.map +1 -0
- package/dist/{chunk-V62YYBBY.js → chunk-KORQWGUA.js} +2 -2
- package/dist/{chunk-VDX2J7OX.js → chunk-KQAFEZQX.js} +2 -2
- package/dist/{chunk-WZIO3TW6.js → chunk-KY75VZKG.js} +2 -2
- package/dist/{chunk-4IGOLIWM.js → chunk-L63M2PE4.js} +2 -2
- package/dist/{chunk-PGGPRF6J.js → chunk-LD22AAJI.js} +2 -2
- package/dist/{chunk-NYWCFC3K.js → chunk-LT4H7SL5.js} +113 -59
- package/dist/chunk-LT4H7SL5.js.map +1 -0
- package/dist/{chunk-A4OIJYCV.js → chunk-LUAQHDUI.js} +2 -2
- package/dist/chunk-LVTT5AUG.js +79 -0
- package/dist/chunk-LVTT5AUG.js.map +1 -0
- package/dist/{chunk-S4MJTIPG.js → chunk-LXMZM7LM.js} +330 -78
- package/dist/chunk-LXMZM7LM.js.map +1 -0
- package/dist/{chunk-DIXZQTGY.js → chunk-M6FKXOYV.js} +2 -2
- package/dist/{chunk-Z535ADTC.js → chunk-M7H56FOQ.js} +2 -2
- package/dist/{chunk-JSD7Q7LD.js → chunk-MOL7JK4F.js} +2 -2
- package/dist/{chunk-I46BYY7U.js → chunk-NHFXGNGC.js} +92 -71
- package/dist/chunk-NHFXGNGC.js.map +1 -0
- package/dist/{chunk-ZX6NNFSY.js → chunk-OGAKUA7I.js} +2 -2
- package/dist/{chunk-KZJM7R4F.js → chunk-PF7LQ22G.js} +6 -6
- package/dist/{chunk-UZGHKD3T.js → chunk-PPDZSJXB.js} +2 -2
- package/dist/{chunk-AUSRUOMQ.js → chunk-PW4HTWXL.js} +2 -2
- package/dist/{chunk-LE2KZ72G.js → chunk-QCTXQ2HW.js} +2 -2
- package/dist/{chunk-I3H5LFOI.js → chunk-QNJQCLI6.js} +4 -4
- package/dist/{chunk-46RII65S.js → chunk-QUBPZQED.js} +2 -2
- package/dist/chunk-QZ4U67KO.js +98 -0
- package/dist/chunk-QZ4U67KO.js.map +1 -0
- package/dist/{chunk-E4LMQTST.js → chunk-R3H2AXO2.js} +2 -2
- package/dist/{chunk-XVDZFTN5.js → chunk-RFIJH2OE.js} +5 -5
- package/dist/{chunk-BTPCP535.js → chunk-RJ7Z7YXK.js} +5 -5
- package/dist/{chunk-TBXAY2SS.js → chunk-SGHGCFVV.js} +5 -5
- package/dist/{chunk-AIVRD66I.js → chunk-T3F2HWIG.js} +2 -2
- package/dist/chunk-TE6S7KDF.js +47 -0
- package/dist/chunk-TE6S7KDF.js.map +1 -0
- package/dist/{chunk-WPGA4RYI.js → chunk-UCLWIMVW.js} +2 -2
- package/dist/{chunk-6P4REYKL.js → chunk-UDAUULK2.js} +28 -2
- package/dist/{chunk-6P4REYKL.js.map → chunk-UDAUULK2.js.map} +1 -1
- package/dist/{chunk-V2EXYQEQ.js → chunk-VHANUT45.js} +7 -7
- package/dist/{chunk-AFJHNHAM.js → chunk-VJXMFBVR.js} +2 -2
- package/dist/{chunk-FGFC2EFR.js → chunk-VKDXYEA6.js} +3 -3
- package/dist/{chunk-Q62GA5U2.js → chunk-VW5TGNJN.js} +2 -2
- package/dist/{chunk-Q62GA5U2.js.map → chunk-VW5TGNJN.js.map} +1 -1
- package/dist/chunk-VYDGHJIN.js +17 -0
- package/dist/chunk-VYDGHJIN.js.map +1 -0
- package/dist/{chunk-GWNSKQDA.js → chunk-W44T2KHG.js} +3 -3
- package/dist/{chunk-H3TKENU4.js → chunk-WIKO4SCR.js} +5 -5
- package/dist/{chunk-DQEMWVMT.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-MCMS4VUK.js → chunk-XIJHRQ4A.js} +14 -8
- package/dist/chunk-XIJHRQ4A.js.map +1 -0
- package/dist/{chunk-2HQPE2NM.js → chunk-XOCGC3FJ.js} +2 -2
- package/dist/chunk-YE4JBZO5.js +44 -0
- package/dist/chunk-YE4JBZO5.js.map +1 -0
- package/dist/{chunk-V2TOGJPM.js → chunk-YPB3Y57U.js} +14 -13
- package/dist/chunk-YPB3Y57U.js.map +1 -0
- package/dist/{chunk-ZZEIL3MI.js → chunk-YTV6J4T6.js} +2 -2
- package/dist/{chunk-ZZEIL3MI.js.map → chunk-YTV6J4T6.js.map} +1 -1
- package/dist/{chunk-IYIPXAIJ.js → chunk-ZBSP4BSN.js} +2 -2
- package/dist/{chunk-VVX5PZFS.js → chunk-ZHXSOMYH.js} +2 -2
- package/dist/{cli-CUlMlS2N.d.ts → cli-BfCl5kWD.d.ts} +5 -5
- package/dist/cli.d.ts +18 -15
- package/dist/cli.js +94 -84
- package/dist/coding/export-okf-codegraph.d.ts +2 -1
- package/dist/coding/export-okf-codegraph.js +13 -13
- package/dist/coding/pre-action-gate.d.ts +2 -1
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +13 -13
- 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 +9 -7
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +13 -13
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +14 -14
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/contradiction/index.d.ts +5 -4
- package/dist/contradiction/index.js +3 -3
- package/dist/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +3 -2
- package/dist/convergence-refresh.js +16 -16
- package/dist/conversation-index/backend.d.ts +2 -1
- 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 +16 -16
- package/dist/cross-lingual-recall.d.ts +2 -1
- package/dist/day-summary.d.ts +2 -1
- package/dist/deep-recall-config.d.ts +11 -1
- package/dist/deep-recall-config.js +6 -3
- package/dist/deep-recall-http-glue.d.ts +16 -13
- package/dist/deep-recall-http-glue.js +5 -5
- package/dist/deep-recall-mcp-tools.d.ts +16 -13
- package/dist/deep-recall-policy-llm.d.ts +3 -2
- package/dist/deep-recall-seeds.d.ts +2 -1
- package/dist/delinearize.d.ts +2 -1
- package/dist/dependency-propagation-config.d.ts +2 -1
- package/dist/{dependency-propagation-delivery-BDDjImQn.d.ts → dependency-propagation-delivery-CggS9BFT.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +2 -1
- package/dist/direct-answer.d.ts +2 -1
- package/dist/embedding-fallback.d.ts +2 -1
- package/dist/enrichment/index.d.ts +2 -1
- package/dist/entity-origin-fields.d.ts +2 -1
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +13 -13
- package/dist/entity-schema.d.ts +2 -1
- package/dist/episodic-context.d.ts +2 -1
- package/dist/eval-trajectory-contracts.d.ts +2 -1
- package/dist/eval-trajectory-store.d.ts +2 -1
- package/dist/eval-trajectory.d.ts +2 -1
- package/dist/explicit-capture.d.ts +12 -11
- package/dist/explicit-capture.js +3 -3
- package/dist/external-wiki-access.d.ts +16 -13
- package/dist/external-wiki-access.js +49 -41
- package/dist/external-wiki-collection-registration.d.ts +2 -1
- package/dist/external-wiki-collection.d.ts +2 -1
- package/dist/external-wiki-mcp-tools.d.ts +16 -13
- package/dist/extraction-error-classification.d.ts +2 -1
- package/dist/extraction-faithfulness.d.ts +3 -2
- package/dist/extraction-judge-telemetry.d.ts +3 -2
- package/dist/extraction-judge-training.d.ts +3 -2
- package/dist/extraction-judge.d.ts +3 -2
- package/dist/extraction-liveness.d.ts +2 -1
- package/dist/extraction-normalization.d.ts +2 -1
- package/dist/extraction-prompt.d.ts +2 -1
- package/dist/extraction-source-grounding-rules.d.ts +2 -1
- package/dist/extraction-source-grounding.d.ts +2 -1
- package/dist/extraction-span-config.d.ts +2 -1
- package/dist/extraction-span-materialize.d.ts +2 -1
- package/dist/extraction.d.ts +3 -2
- package/dist/extraction.js +21 -21
- package/dist/fallback-llm-codex-subscription.d.ts +2 -1
- package/dist/fallback-llm.d.ts +2 -1
- package/dist/{generic-recall-paths-CpDzNO_I.d.ts → generic-recall-paths-CoXPSnCw.d.ts} +1 -1
- package/dist/graph-append-error.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-jsonl.d.ts +2 -1
- package/dist/graph-path-reconstruction.d.ts +2 -1
- package/dist/graph-path-scoring.d.ts +2 -1
- package/dist/graph-snapshot.d.ts +2 -1
- package/dist/graph.d.ts +2 -1
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +2 -1
- package/dist/importers/index.d.ts +2 -1
- package/dist/importers/test-utils.d.ts +2 -1
- package/dist/in-flight-reads.d.ts +2 -1
- package/dist/{index-CtmmCJoo.d.ts → index-fdw_oK5a.d.ts} +3 -3
- package/dist/index.d.ts +28 -25
- package/dist/index.js +183 -162
- 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 +11 -11
- 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-DpXIvm6F.d.ts → local-llm-3-jtw52a.d.ts} +1 -1
- package/dist/local-llm-helpers.d.ts +3 -2
- package/dist/local-llm.d.ts +3 -2
- package/dist/local-model-endpoint.d.ts +2 -1
- package/dist/location/index.d.ts +7 -209
- package/dist/location/index.js +68 -62
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +13 -13
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +14 -14
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +15 -15
- package/dist/{maintenance-CNgoLsoM.d.ts → maintenance-DgeeH0a1.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +18 -15
- 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-controller.d.ts +2 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
- package/dist/memory-projection-store.d.ts +2 -1
- package/dist/memory-provenance.d.ts +2 -1
- package/dist/memory-snapshot.d.ts +2 -1
- package/dist/memory-subject-cli.d.ts +16 -13
- package/dist/memory-subject.d.ts +16 -13
- 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 +14 -14
- package/dist/namespaces/principal.d.ts +2 -1
- package/dist/namespaces/search.d.ts +2 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +4 -3
- package/dist/namespaces/storage.js +13 -13
- 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 +5 -5
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +17 -17
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +29 -28
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +26 -26
- package/dist/{orchestrator-DT7ybIFz.d.ts → orchestrator-VXWKdatm.d.ts} +12 -10
- package/dist/orchestrator.d.ts +12 -11
- package/dist/orchestrator.js +115 -105
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-CgBEmHcz.d.ts → pipeline-CwXZBKR5.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +2 -1
- package/dist/proactive-contention.d.ts +3 -2
- package/dist/provenance.d.ts +2 -1
- package/dist/{public-http-C8P8fyiO.d.ts → public-http-B55s59aR.d.ts} +1 -1
- package/dist/{qmd-BkY8KpCh.d.ts → qmd-DOLTPIQg.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +3 -2
- package/dist/qmd-recall-cache.d.ts +2 -1
- package/dist/qmd.d.ts +3 -2
- 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-navigate-access.d.ts +2 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-budget.js +3 -13
- package/dist/recall-navigate-budget.js.map +1 -1
- package/dist/recall-navigate-disclosure.d.ts +2 -1
- package/dist/recall-navigate-disclosure.js +4 -23
- package/dist/recall-navigate-disclosure.js.map +1 -1
- package/dist/recall-navigate-traverse.js +4 -37
- package/dist/recall-navigate-traverse.js.map +1 -1
- package/dist/recall-navigate-window.js +4 -26
- package/dist/recall-navigate-window.js.map +1 -1
- package/dist/recall-navigate.d.ts +2 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation-config.d.ts +34 -0
- package/dist/recall-navigation-config.js +16 -0
- package/dist/recall-navigation-config.js.map +1 -0
- package/dist/recall-navigation-http-glue.d.ts +171 -0
- package/dist/recall-navigation-http-glue.js +9 -0
- package/dist/recall-navigation-http-glue.js.map +1 -0
- package/dist/recall-navigation-mcp-tools.d.ts +162 -0
- package/dist/recall-navigation-mcp-tools.js +8 -0
- package/dist/recall-navigation-mcp-tools.js.map +1 -0
- package/dist/recall-navigation-operations.d.ts +2 -0
- package/dist/recall-navigation-operations.js +245 -0
- package/dist/recall-navigation-operations.js.map +1 -0
- package/dist/recall-navigation-renderer.d.ts +36 -0
- package/dist/recall-navigation-renderer.js +8 -0
- package/dist/recall-navigation-renderer.js.map +1 -0
- package/dist/recall-navigation.d.ts +121 -0
- package/dist/recall-navigation.js +249 -0
- package/dist/recall-navigation.js.map +1 -0
- package/dist/recall-planner-llm.d.ts +2 -1
- package/dist/recall-state-view-admission.d.ts +3 -2
- package/dist/recall-state-view-admission.js +4 -4
- package/dist/recall-state-view-anchors.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 +3 -2
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +2 -1
- package/dist/reconcile/manifest.d.ts +2 -1
- package/dist/reconcile/plan.d.ts +2 -1
- 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-peers-config.d.ts +2 -1
- package/dist/resolution-LXFQQ4AE.js +3 -3
- package/dist/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +10 -8
- package/dist/retrieval-agents.d.ts +3 -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 +2 -2
- package/dist/{scope-profiles-BBPjZ9jb.d.ts → scope-profiles-C564-hrv.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +2 -1
- package/dist/search/factory.d.ts +2 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +2 -1
- package/dist/search/index.js +7 -7
- package/dist/search/lancedb-backend.d.ts +2 -1
- package/dist/search/meilisearch-backend.d.ts +2 -1
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/orama-backend.d.ts +2 -1
- package/dist/search/port.d.ts +2 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/{semantic-consolidation-BPFFVO84.d.ts → semantic-consolidation-g6x-ShY8.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +14 -14
- package/dist/semantic-rule-promotion.js +13 -13
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +13 -13
- package/dist/{service-jKcr6Jvr.d.ts → service-CaCOk0rd.d.ts} +13 -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/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +20 -20
- package/dist/standup/build.js +14 -14
- package/dist/{storage-C-0Ah5OY.d.ts → storage-C9nsZX5Q.d.ts} +1 -1
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +12 -12
- package/dist/subject-config.d.ts +2 -1
- package/dist/subject-config.js +2 -2
- package/dist/summarizer.d.ts +2 -1
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/support-passport/index.d.ts +19 -16
- package/dist/support-passport/index.js +51 -43
- package/dist/tagging-BA4RFdH3.d.ts +240 -0
- 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/topics.d.ts +2 -1
- package/dist/transcript.d.ts +2 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/export-okf.d.ts +2 -1
- package/dist/transfer/export-okf.js +13 -13
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/{types-cK5LydjL.d.ts → types-Sps-lg5I.d.ts} +3 -2
- 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 +13 -13
- package/dist/who-knows-cli.d.ts +16 -13
- package/dist/who-knows-cli.js +14 -14
- package/dist/who-knows.d.ts +16 -13
- package/dist/who-knows.js +13 -13
- package/dist/write-envelope.d.ts +2 -1
- package/package.json +2 -2
- package/src/access-boundary.ts +2 -0
- package/src/access-http.test.ts +1 -0
- package/src/access-http.ts +3 -3
- package/src/access-mcp-output-schemas.ts +30 -0
- package/src/access-mcp.ts +6 -9
- package/src/access-observe-write-category.ts +1 -0
- package/src/access-observe-write-surface.ts +3 -3
- package/src/access-operations-batch.ts +2 -2
- package/src/access-operations.ts +2 -0
- package/src/access-schema.ts +1 -0
- package/src/access-service.ts +17 -28
- package/src/access-surface-catalog.test.ts +30 -2
- package/src/access-surface-catalog.ts +4 -0
- package/src/cli/recall-navigation-commands.ts +85 -0
- package/src/cli.ts +2 -2
- package/src/config.ts +4 -0
- package/src/deep-recall-config.ts +32 -0
- package/src/index.ts +1 -2
- package/src/location/phase5-wiring.test.ts +408 -0
- package/src/location/tagging.ts +58 -0
- package/src/mcp-read-only-tools.ts +2 -0
- package/src/orchestration/orchestrator-helpers.ts +2 -0
- package/src/orchestration/recall-internal.ts +4 -4
- package/src/orchestration/workspace-ops.ts +14 -0
- package/src/recall-navigation-config.test.ts +56 -0
- package/src/recall-navigation-config.ts +107 -0
- package/src/recall-navigation-http-glue.ts +141 -0
- package/src/recall-navigation-mcp-tools.ts +60 -0
- package/src/recall-navigation-operations.ts +111 -0
- package/src/recall-navigation-renderer.ts +49 -0
- package/src/recall-navigation-surface.test.ts +474 -0
- package/src/recall-navigation.test.ts +405 -0
- package/src/recall-navigation.ts +429 -0
- package/src/recall-xray.ts +1 -1
- package/src/types.ts +2 -0
- package/src/wearables/pipeline.ts +19 -0
- package/src/wearables/service.ts +8 -0
- package/dist/chunk-7ZLC4DTZ.js.map +0 -1
- package/dist/chunk-DM5CU5J7.js.map +0 -1
- package/dist/chunk-EAARGPWI.js.map +0 -1
- package/dist/chunk-GMH5QPUU.js.map +0 -1
- package/dist/chunk-I46BYY7U.js.map +0 -1
- package/dist/chunk-MCMS4VUK.js.map +0 -1
- package/dist/chunk-N6XTC56E.js.map +0 -1
- package/dist/chunk-NYWCFC3K.js.map +0 -1
- package/dist/chunk-QVSRE355.js.map +0 -1
- package/dist/chunk-S4MJTIPG.js.map +0 -1
- package/dist/chunk-V2TOGJPM.js.map +0 -1
- package/dist/chunk-WN2OXGGH.js.map +0 -1
- package/dist/chunk-XRS65T4O.js.map +0 -1
- /package/dist/{capsule-crypto-YO5QJ6L3.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-563X6JJX.js.map → chunk-2HDLDBJW.js.map} +0 -0
- /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-WBQ4ONQJ.js.map → chunk-2PIC6CEN.js.map} +0 -0
- /package/dist/{chunk-54QPOE45.js.map → chunk-2YIUUXNK.js.map} +0 -0
- /package/dist/{chunk-AKABVXFS.js.map → chunk-3254BYQV.js.map} +0 -0
- /package/dist/{chunk-XCPNH2MG.js.map → chunk-3KJTSCSX.js.map} +0 -0
- /package/dist/{chunk-I33QYUAF.js.map → chunk-3YQ7VLP3.js.map} +0 -0
- /package/dist/{chunk-JMWUPUE6.js.map → chunk-46FVFU7S.js.map} +0 -0
- /package/dist/{chunk-PFKIOYJH.js.map → chunk-4WMGRLTV.js.map} +0 -0
- /package/dist/{chunk-KLUC2GSG.js.map → chunk-5AJZ7EUW.js.map} +0 -0
- /package/dist/{chunk-Z7NBT6AK.js.map → chunk-6EGIQEKC.js.map} +0 -0
- /package/dist/{chunk-6MQMYXSQ.js.map → chunk-7F47R4H4.js.map} +0 -0
- /package/dist/{chunk-YFXAWGMR.js.map → chunk-7L54ARML.js.map} +0 -0
- /package/dist/{chunk-LVFI5LG7.js.map → chunk-A7GQBJP5.js.map} +0 -0
- /package/dist/{chunk-EMSYMYXO.js.map → chunk-AKB44K3D.js.map} +0 -0
- /package/dist/{chunk-3BLHPQHT.js.map → chunk-BPXJINHW.js.map} +0 -0
- /package/dist/{chunk-D6PY63OM.js.map → chunk-BZDK5EOD.js.map} +0 -0
- /package/dist/{chunk-2J3V5QEO.js.map → chunk-C3QXITIP.js.map} +0 -0
- /package/dist/{chunk-PLJ2MQFT.js.map → chunk-C3YEB7CR.js.map} +0 -0
- /package/dist/{chunk-2ZG2LLZT.js.map → chunk-D7UUB33A.js.map} +0 -0
- /package/dist/{chunk-E3I3NDUP.js.map → chunk-DABSYX7V.js.map} +0 -0
- /package/dist/{chunk-KJLLPG26.js.map → chunk-DDGQDNQW.js.map} +0 -0
- /package/dist/{chunk-K5D2XVNN.js.map → chunk-F2FJTOV6.js.map} +0 -0
- /package/dist/{chunk-P66QH6R6.js.map → chunk-GKKLI23D.js.map} +0 -0
- /package/dist/{chunk-ICN37XHG.js.map → chunk-GMU7MAHS.js.map} +0 -0
- /package/dist/{chunk-PQ42DJNG.js.map → chunk-H2N6SLTR.js.map} +0 -0
- /package/dist/{chunk-ND7MAIJC.js.map → chunk-HKQAI6XI.js.map} +0 -0
- /package/dist/{chunk-C3G6MW4W.js.map → chunk-IB7FDRRC.js.map} +0 -0
- /package/dist/{chunk-WFMQN7JE.js.map → chunk-IWHNT35B.js.map} +0 -0
- /package/dist/{chunk-W7UV2ZCA.js.map → chunk-JDL5BYYF.js.map} +0 -0
- /package/dist/{chunk-5EQT62HH.js.map → chunk-KDLOKVX7.js.map} +0 -0
- /package/dist/{chunk-V62YYBBY.js.map → chunk-KORQWGUA.js.map} +0 -0
- /package/dist/{chunk-VDX2J7OX.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-WZIO3TW6.js.map → chunk-KY75VZKG.js.map} +0 -0
- /package/dist/{chunk-4IGOLIWM.js.map → chunk-L63M2PE4.js.map} +0 -0
- /package/dist/{chunk-PGGPRF6J.js.map → chunk-LD22AAJI.js.map} +0 -0
- /package/dist/{chunk-A4OIJYCV.js.map → chunk-LUAQHDUI.js.map} +0 -0
- /package/dist/{chunk-DIXZQTGY.js.map → chunk-M6FKXOYV.js.map} +0 -0
- /package/dist/{chunk-Z535ADTC.js.map → chunk-M7H56FOQ.js.map} +0 -0
- /package/dist/{chunk-JSD7Q7LD.js.map → chunk-MOL7JK4F.js.map} +0 -0
- /package/dist/{chunk-ZX6NNFSY.js.map → chunk-OGAKUA7I.js.map} +0 -0
- /package/dist/{chunk-KZJM7R4F.js.map → chunk-PF7LQ22G.js.map} +0 -0
- /package/dist/{chunk-UZGHKD3T.js.map → chunk-PPDZSJXB.js.map} +0 -0
- /package/dist/{chunk-AUSRUOMQ.js.map → chunk-PW4HTWXL.js.map} +0 -0
- /package/dist/{chunk-LE2KZ72G.js.map → chunk-QCTXQ2HW.js.map} +0 -0
- /package/dist/{chunk-I3H5LFOI.js.map → chunk-QNJQCLI6.js.map} +0 -0
- /package/dist/{chunk-46RII65S.js.map → chunk-QUBPZQED.js.map} +0 -0
- /package/dist/{chunk-E4LMQTST.js.map → chunk-R3H2AXO2.js.map} +0 -0
- /package/dist/{chunk-XVDZFTN5.js.map → chunk-RFIJH2OE.js.map} +0 -0
- /package/dist/{chunk-BTPCP535.js.map → chunk-RJ7Z7YXK.js.map} +0 -0
- /package/dist/{chunk-TBXAY2SS.js.map → chunk-SGHGCFVV.js.map} +0 -0
- /package/dist/{chunk-AIVRD66I.js.map → chunk-T3F2HWIG.js.map} +0 -0
- /package/dist/{chunk-WPGA4RYI.js.map → chunk-UCLWIMVW.js.map} +0 -0
- /package/dist/{chunk-V2EXYQEQ.js.map → chunk-VHANUT45.js.map} +0 -0
- /package/dist/{chunk-AFJHNHAM.js.map → chunk-VJXMFBVR.js.map} +0 -0
- /package/dist/{chunk-FGFC2EFR.js.map → chunk-VKDXYEA6.js.map} +0 -0
- /package/dist/{chunk-GWNSKQDA.js.map → chunk-W44T2KHG.js.map} +0 -0
- /package/dist/{chunk-H3TKENU4.js.map → chunk-WIKO4SCR.js.map} +0 -0
- /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-2HQPE2NM.js.map → chunk-XOCGC3FJ.js.map} +0 -0
- /package/dist/{chunk-IYIPXAIJ.js.map → chunk-ZBSP4BSN.js.map} +0 -0
- /package/dist/{chunk-VVX5PZFS.js.map → chunk-ZHXSOMYH.js.map} +0 -0
|
@@ -43,6 +43,7 @@ import { buildProcedureRecallSection, mergeProcedureInjections } from "../proced
|
|
|
43
43
|
import { canRecallToolScopedMemory } from "../tool-scoped-memory.js";
|
|
44
44
|
import { buildQmdRecallCacheKey, getCachedQmdRecall, setCachedQmdRecall } from "../qmd-recall-cache.js";
|
|
45
45
|
import { MEMORY_ID_PATTERN } from "../recall-handles.js";
|
|
46
|
+
import { shouldRecordRecallAuthorityHistory } from "../recall-navigation-config.js";
|
|
46
47
|
import {
|
|
47
48
|
boundRecallContextComposition, composeRecallContext, contextBudgetForFooter,
|
|
48
49
|
formatCuriosityFooter, renderAuthorityBoundContent, selectCuriosityQuestion,
|
|
@@ -5256,10 +5257,9 @@ export class RecallInternalCoordinator {
|
|
|
5256
5257
|
}),
|
|
5257
5258
|
"last recall record",
|
|
5258
5259
|
);
|
|
5259
|
-
//
|
|
5260
|
-
//
|
|
5261
|
-
|
|
5262
|
-
if (this.deps.config.recallMemoryHandles && recalledMemoryIds.length > 0) {
|
|
5260
|
+
// Record admitted ids when handles render OR navigation needs authority.
|
|
5261
|
+
// Handles-off + navigation-on is the shipped default; skip only when both are off.
|
|
5262
|
+
if (shouldRecordRecallAuthorityHistory(this.deps.config) && recalledMemoryIds.length > 0) {
|
|
5263
5263
|
// Only handle-eligible ids aid resolution; filter out non-memory .md
|
|
5264
5264
|
// basenames (entity reconstructions) so the resolver never records a
|
|
5265
5265
|
// citation target that cannot be loaded.
|
|
@@ -28,6 +28,8 @@ import { LocalLlmClient } from "../local-llm.js";
|
|
|
28
28
|
import { log } from "../logger.js";
|
|
29
29
|
import type { NamespaceMaintenanceFanoutRunnerContext } from "../maintenance/namespace-maintenance-fanout.js";
|
|
30
30
|
import type { NamespaceMaintenanceSummary } from "../maintenance/namespace-planner.js";
|
|
31
|
+
import { localDayKey } from "../location/intervals.js";
|
|
32
|
+
import { renderDayLocationContext } from "../location/tagging.js";
|
|
31
33
|
import { type PatternReinforcementResult, runPatternReinforcement } from "../maintenance/pattern-reinforcement.js";
|
|
32
34
|
import { evaluateMemoryActionPolicy } from "../memory-action-policy.js";
|
|
33
35
|
import { NamespaceStorageRouter } from "../namespaces/storage.js";
|
|
@@ -454,6 +456,17 @@ export class WorkspaceOpsCoordinator {
|
|
|
454
456
|
}
|
|
455
457
|
}
|
|
456
458
|
|
|
459
|
+
if (options.includeLocation === true && this.deps.config.location) {
|
|
460
|
+
const section = await renderDayLocationContext(
|
|
461
|
+
storage.dir,
|
|
462
|
+
localDayKey(now.toISOString(), this.deps.config.location.timezone),
|
|
463
|
+
this.deps.config.location,
|
|
464
|
+
);
|
|
465
|
+
if (section) {
|
|
466
|
+
formatted += `\n\n${section}`;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
457
470
|
log.info(
|
|
458
471
|
`gatherTodayFacts: collected ${facts.length} facts, ${hourlySummaries.length} hourly summaries for ${targetLocalDate} (${timeZone}, ${formatted.length} chars)`,
|
|
459
472
|
);
|
|
@@ -636,6 +649,7 @@ export class WorkspaceOpsCoordinator {
|
|
|
636
649
|
service = new WearablesService({
|
|
637
650
|
config: this.deps.config.wearables,
|
|
638
651
|
getStorage: async () => await this.deps.getStorageForNamespace(namespace),
|
|
652
|
+
locationConfig: this.deps.config.location,
|
|
639
653
|
extract: (turns) => this.deps.extraction.extract(turns),
|
|
640
654
|
// Smart memoryMode runs candidates through the SAME extraction
|
|
641
655
|
// judge (cache + defer counters included) the live extraction
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall-navigation config parse (issue #1956 / PR #2937).
|
|
3
|
+
*
|
|
4
|
+
* Unknown keys fail closed. Default parse keeps navigation on and display
|
|
5
|
+
* handles off, and that pair still records authority history.
|
|
6
|
+
*/
|
|
7
|
+
import assert from "node:assert/strict";
|
|
8
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
9
|
+
import { tmpdir } from "node:os";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import test from "node:test";
|
|
12
|
+
|
|
13
|
+
import { parseConfig } from "./config.js";
|
|
14
|
+
import {
|
|
15
|
+
parseRecallNavigationConfig,
|
|
16
|
+
RECALL_NAVIGATION_CONFIG_DEFAULTS,
|
|
17
|
+
shouldRecordRecallAuthorityHistory,
|
|
18
|
+
} from "./recall-navigation-config.js";
|
|
19
|
+
|
|
20
|
+
test("parseRecallNavigationConfig rejects unknown keys instead of ignoring them", () => {
|
|
21
|
+
assert.throws(
|
|
22
|
+
() => parseRecallNavigationConfig({ windowSnapshot: 5 }),
|
|
23
|
+
/recallNavigation contains unknown key "windowSnapshot"/,
|
|
24
|
+
);
|
|
25
|
+
assert.throws(
|
|
26
|
+
() => parseConfig({ recallNavigation: { maxNeighbour: 4 } }),
|
|
27
|
+
/unknown key "maxNeighbour"/,
|
|
28
|
+
);
|
|
29
|
+
assert.deepEqual(parseRecallNavigationConfig({}), RECALL_NAVIGATION_CONFIG_DEFAULTS);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test("default config records authority history with handles off and navigation on", async () => {
|
|
33
|
+
const memoryDir = await mkdtemp(path.join(tmpdir(), "remnic-nav-defaults-"));
|
|
34
|
+
try {
|
|
35
|
+
const config = parseConfig({ memoryDir });
|
|
36
|
+
assert.equal(config.recallMemoryHandles, false);
|
|
37
|
+
assert.equal(config.recallNavigation.enabled, true);
|
|
38
|
+
assert.equal(shouldRecordRecallAuthorityHistory(config), true);
|
|
39
|
+
assert.equal(
|
|
40
|
+
shouldRecordRecallAuthorityHistory({
|
|
41
|
+
recallMemoryHandles: false,
|
|
42
|
+
recallNavigation: { enabled: false },
|
|
43
|
+
}),
|
|
44
|
+
false,
|
|
45
|
+
);
|
|
46
|
+
assert.equal(
|
|
47
|
+
shouldRecordRecallAuthorityHistory({
|
|
48
|
+
recallMemoryHandles: true,
|
|
49
|
+
recallNavigation: { enabled: false },
|
|
50
|
+
}),
|
|
51
|
+
true,
|
|
52
|
+
);
|
|
53
|
+
} finally {
|
|
54
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
55
|
+
}
|
|
56
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall-navigation config (issue #1956) — the `recallNavigation` block.
|
|
3
|
+
*
|
|
4
|
+
* Parsed the same way `deepRecall` is: shape-validated, string-coercion
|
|
5
|
+
* safe (§24), no silent clamping of documented values (§33). Navigation is
|
|
6
|
+
* a read-only surface over already-served recall results, so it defaults
|
|
7
|
+
* ON; the `conservative` preset pins `enabled: false`.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { coerceBool, coerceNumber } from "./connectors/coerce.js";
|
|
11
|
+
|
|
12
|
+
export interface RecallNavigationConfig {
|
|
13
|
+
/** Master switch. Default true (read-only, additive surface). */
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* How many of the session's most recent recall snapshots an expandable
|
|
17
|
+
* or traversable id may come from. Default 3.
|
|
18
|
+
*/
|
|
19
|
+
windowSnapshots: number;
|
|
20
|
+
/** Ceiling for a traverse/entity-neighbor limit override. Default 10. */
|
|
21
|
+
maxNeighbors: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface RecallNavigationSettings {
|
|
25
|
+
recallNavigation: RecallNavigationConfig;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const DEFAULT_NAVIGATION_WINDOW_SNAPSHOTS = 3;
|
|
29
|
+
|
|
30
|
+
export const RECALL_NAVIGATION_CONFIG_DEFAULTS: RecallNavigationConfig = {
|
|
31
|
+
enabled: true,
|
|
32
|
+
windowSnapshots: DEFAULT_NAVIGATION_WINDOW_SNAPSHOTS,
|
|
33
|
+
maxNeighbors: 10,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** Record served ids when display handles or navigation authority needs them. */
|
|
37
|
+
export function shouldRecordRecallAuthorityHistory(config: {
|
|
38
|
+
recallMemoryHandles?: boolean;
|
|
39
|
+
recallNavigation?: { enabled?: boolean };
|
|
40
|
+
}): boolean {
|
|
41
|
+
return config.recallMemoryHandles === true || config.recallNavigation?.enabled === true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function parseFlag(src: Record<string, unknown>, key: string, fallback: boolean): boolean {
|
|
45
|
+
const value = src[key];
|
|
46
|
+
if (value === undefined || value === null) return fallback;
|
|
47
|
+
const coerced = coerceBool(value);
|
|
48
|
+
if (coerced === undefined) {
|
|
49
|
+
throw new Error(
|
|
50
|
+
`recallNavigation.${key} must be a boolean (or "true"/"false"/"1"/"0"); got ${JSON.stringify(value)}`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return coerced;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function parseBoundedInt(
|
|
57
|
+
src: Record<string, unknown>,
|
|
58
|
+
key: string,
|
|
59
|
+
fallback: number,
|
|
60
|
+
min: number,
|
|
61
|
+
max: number,
|
|
62
|
+
): number {
|
|
63
|
+
const value = src[key];
|
|
64
|
+
if (value === undefined || value === null) return fallback;
|
|
65
|
+
const coerced = coerceNumber(value);
|
|
66
|
+
if (coerced === undefined || !Number.isFinite(coerced) || !Number.isInteger(coerced)) {
|
|
67
|
+
throw new Error(
|
|
68
|
+
`recallNavigation.${key} must be an integer between ${min} and ${max}; got ${JSON.stringify(value)}`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
if (coerced < min || coerced > max) {
|
|
72
|
+
throw new Error(
|
|
73
|
+
`recallNavigation.${key} must be an integer between ${min} and ${max}; got ${JSON.stringify(value)}`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
return coerced;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function parseRecallNavigationConfig(raw: unknown): RecallNavigationConfig {
|
|
80
|
+
if (raw === undefined || raw === null) return { ...RECALL_NAVIGATION_CONFIG_DEFAULTS };
|
|
81
|
+
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
82
|
+
throw new Error(`recallNavigation must be an object; got ${JSON.stringify(raw)}`);
|
|
83
|
+
}
|
|
84
|
+
const src = raw as Record<string, unknown>;
|
|
85
|
+
const { enabled: _enabled, windowSnapshots: _windowSnapshots, maxNeighbors: _maxNeighbors, ...unknown } = src;
|
|
86
|
+
const unknownKey = Object.keys(unknown)[0];
|
|
87
|
+
if (unknownKey !== undefined) {
|
|
88
|
+
throw new Error(`recallNavigation contains unknown key ${JSON.stringify(unknownKey)}`);
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
enabled: parseFlag(src, "enabled", RECALL_NAVIGATION_CONFIG_DEFAULTS.enabled),
|
|
92
|
+
windowSnapshots: parseBoundedInt(
|
|
93
|
+
src,
|
|
94
|
+
"windowSnapshots",
|
|
95
|
+
RECALL_NAVIGATION_CONFIG_DEFAULTS.windowSnapshots,
|
|
96
|
+
1,
|
|
97
|
+
50,
|
|
98
|
+
),
|
|
99
|
+
maxNeighbors: parseBoundedInt(
|
|
100
|
+
src,
|
|
101
|
+
"maxNeighbors",
|
|
102
|
+
RECALL_NAVIGATION_CONFIG_DEFAULTS.maxNeighbors,
|
|
103
|
+
1,
|
|
104
|
+
50,
|
|
105
|
+
),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall-navigation HTTP glue (issue #1956) — route body lives here so
|
|
3
|
+
* access-http.ts stays at its structural ceiling (same seam as
|
|
4
|
+
* deep-recall-http-glue.ts).
|
|
5
|
+
*
|
|
6
|
+
* Input errors map to 400; everything else rethrows to the global 500
|
|
7
|
+
* handler. Config gating (`recallNavigation.enabled`) lives in the service
|
|
8
|
+
* and returns a typed `error: "disabled"` refusal — this module only
|
|
9
|
+
* translates transport shape. Namespace/sessionKey resolution flows through
|
|
10
|
+
* the caller-supplied `scopeFor` gate so a body-supplied namespace passes
|
|
11
|
+
* the SAME effective-namespace allow-list as the query string (issue #1850
|
|
12
|
+
* finding 2), and `authenticatedPrincipal` reaches the service so
|
|
13
|
+
* authorization derives from the presenting principal, never the
|
|
14
|
+
* client-supplied sessionKey.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
18
|
+
|
|
19
|
+
import { EngramAccessInputError } from "./access-errors.js";
|
|
20
|
+
import type { EngramAccessService } from "./access-service.js";
|
|
21
|
+
import type { NavigationAction } from "./recall-navigation.js";
|
|
22
|
+
|
|
23
|
+
type RespondJson = (res: ServerResponse, status: number, payload: unknown) => void;
|
|
24
|
+
type ReadJsonBody = (req: IncomingMessage) => Promise<unknown>;
|
|
25
|
+
|
|
26
|
+
type ScopeFor = (
|
|
27
|
+
bodyNamespace?: string,
|
|
28
|
+
bodySessionKey?: string,
|
|
29
|
+
) => { namespace?: string; sessionKey?: string; authenticatedPrincipal?: string };
|
|
30
|
+
|
|
31
|
+
const VALID_RELATIONS = [
|
|
32
|
+
"supports",
|
|
33
|
+
"contradicts",
|
|
34
|
+
"elaborates",
|
|
35
|
+
"causes",
|
|
36
|
+
"caused_by",
|
|
37
|
+
"supersedes",
|
|
38
|
+
"follows",
|
|
39
|
+
"references",
|
|
40
|
+
"related",
|
|
41
|
+
] as const;
|
|
42
|
+
|
|
43
|
+
function optStr(value: unknown): string | undefined {
|
|
44
|
+
return typeof value === "string" ? value : undefined;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function optInt(value: unknown): number | undefined {
|
|
48
|
+
if (value === undefined || value === null || value === "") return undefined;
|
|
49
|
+
const parsed = typeof value === "string" ? Number(value) : value;
|
|
50
|
+
if (typeof parsed !== "number" || !Number.isInteger(parsed) || parsed < 1) {
|
|
51
|
+
throw new EngramAccessInputError("limit must be a positive integer");
|
|
52
|
+
}
|
|
53
|
+
return parsed;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function respondNavigation(
|
|
57
|
+
req: IncomingMessage,
|
|
58
|
+
res: ServerResponse,
|
|
59
|
+
respondJson: RespondJson,
|
|
60
|
+
readJsonBody: ReadJsonBody,
|
|
61
|
+
service: EngramAccessService,
|
|
62
|
+
scopeFor: ScopeFor,
|
|
63
|
+
action: Extract<NavigationAction, "expand" | "traverse">,
|
|
64
|
+
): Promise<void> {
|
|
65
|
+
const body = (await readJsonBody(req)) as Record<string, unknown>;
|
|
66
|
+
const memoryId = optStr(body.memoryId);
|
|
67
|
+
if (memoryId === undefined || memoryId.trim().length === 0) {
|
|
68
|
+
respondJson(res, 400, { error: "invalid_request", detail: "memoryId is required" });
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const sessionKey = optStr(body.sessionKey);
|
|
72
|
+
if (sessionKey === undefined || sessionKey.trim().length === 0) {
|
|
73
|
+
respondJson(res, 400, { error: "invalid_request", detail: "sessionKey is required" });
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
let disclosure: "chunk" | "section" | "raw" | undefined;
|
|
77
|
+
let relation: string | undefined;
|
|
78
|
+
if (action === "expand") {
|
|
79
|
+
const raw = optStr(body.disclosure);
|
|
80
|
+
if (raw !== undefined && raw !== "chunk" && raw !== "section" && raw !== "raw") {
|
|
81
|
+
respondJson(res, 400, { error: "invalid_request", detail: "disclosure must be one of chunk, section, raw" });
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
disclosure = raw;
|
|
85
|
+
} else {
|
|
86
|
+
relation = optStr(body.relation);
|
|
87
|
+
if (relation !== undefined && !(VALID_RELATIONS as readonly string[]).includes(relation)) {
|
|
88
|
+
respondJson(
|
|
89
|
+
res,
|
|
90
|
+
400,
|
|
91
|
+
{ error: "invalid_request", detail: `relation must be one of ${VALID_RELATIONS.join(", ")}` },
|
|
92
|
+
);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
let limit: number | undefined;
|
|
97
|
+
try {
|
|
98
|
+
limit = optInt(body.limit);
|
|
99
|
+
} catch (err) {
|
|
100
|
+
respondJson(res, 400, { error: "invalid_request", detail: err instanceof Error ? err.message : String(err) });
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const scope = scopeFor(optStr(body.namespace), sessionKey);
|
|
104
|
+
const result = await service.recallNavigate({
|
|
105
|
+
action,
|
|
106
|
+
memoryId,
|
|
107
|
+
sessionKey: scope.sessionKey ?? sessionKey,
|
|
108
|
+
...(disclosure !== undefined ? { disclosure } : {}),
|
|
109
|
+
...(relation !== undefined ? { relation } : {}),
|
|
110
|
+
...(limit !== undefined ? { limit } : {}),
|
|
111
|
+
namespace: scope.namespace,
|
|
112
|
+
authenticatedPrincipal: scope.authenticatedPrincipal,
|
|
113
|
+
});
|
|
114
|
+
const { rendered: _rendered, ...payload } = result;
|
|
115
|
+
respondJson(res, 200, payload);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export async function maybeRespondRecallNavigation(
|
|
119
|
+
req: IncomingMessage,
|
|
120
|
+
res: ServerResponse,
|
|
121
|
+
pathname: string,
|
|
122
|
+
method: string | undefined,
|
|
123
|
+
enforceTokenOp: (op: "memory_expand" | "memory_traverse") => void,
|
|
124
|
+
respondJson: RespondJson,
|
|
125
|
+
readJsonBody: ReadJsonBody,
|
|
126
|
+
service: EngramAccessService,
|
|
127
|
+
scopeFor: ScopeFor,
|
|
128
|
+
): Promise<boolean> {
|
|
129
|
+
if (method === "POST" && (pathname === "/engram/v1/memory/expand" || pathname === "/remnic/v1/memory/expand")) {
|
|
130
|
+
enforceTokenOp("memory_expand");
|
|
131
|
+
await respondNavigation(req, res, respondJson, readJsonBody, service, scopeFor, "expand");
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
if (method === "POST" && (pathname === "/engram/v1/memory/traverse" || pathname === "/remnic/v1/memory/traverse")) {
|
|
135
|
+
enforceTokenOp("memory_traverse");
|
|
136
|
+
await respondNavigation(req, res, respondJson, readJsonBody, service, scopeFor, "traverse");
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall-navigation MCP tool definitions (issue #1956) — extracted from
|
|
3
|
+
* access-mcp.ts so the surface file stays at its structural ceiling (same
|
|
4
|
+
* seam as deep-recall-mcp-tools.ts). Spread back into `this.tools`
|
|
5
|
+
* (`...RECALL_NAVIGATION_MCP_TOOLS`); the migrated-operation mapping lives
|
|
6
|
+
* in access-mcp.ts's MCP_MIGRATED_OPERATIONS. The `remnic.` canonical alias
|
|
7
|
+
* is minted by withToolAliases at tools/list time.
|
|
8
|
+
*
|
|
9
|
+
* Gating: spread is conditional on `service.recallNavigationEnabled !== false`
|
|
10
|
+
* — the flag defaults TRUE, so the check treats an absent property (older
|
|
11
|
+
* service shape / test stub) as enabled and removes the tools from listing
|
|
12
|
+
* ONLY on an explicit false. Disabled config therefore yields tools absent
|
|
13
|
+
* from tools/list, not present-but-erroring.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { McpTool } from "./access-mcp.js";
|
|
17
|
+
|
|
18
|
+
export const RECALL_NAVIGATION_MCP_TOOLS: McpTool[] = [
|
|
19
|
+
{
|
|
20
|
+
name: "engram.memory_expand",
|
|
21
|
+
description:
|
|
22
|
+
"Re-render one memory a recall already served to this session at a deeper disclosure level (section or raw). Cheap follow-up — no fresh search. The id must come from this session's recent recall results.",
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
memoryId: { type: "string", description: "Memory id (or [m:xxxx] handle) served by a recent recall. Required." },
|
|
27
|
+
sessionKey: { type: "string", description: "Session key whose recent recalls authorize the id. Required." },
|
|
28
|
+
disclosure: {
|
|
29
|
+
type: "string",
|
|
30
|
+
enum: ["section", "raw"],
|
|
31
|
+
description: "Target depth; must be deeper than the chunk preview already served. Default raw.",
|
|
32
|
+
},
|
|
33
|
+
namespace: { type: "string", description: "Caller namespace to scope this operation to." },
|
|
34
|
+
},
|
|
35
|
+
required: ["memoryId", "sessionKey"],
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "engram.memory_traverse",
|
|
41
|
+
description:
|
|
42
|
+
"Follow typed links (supports/contradicts/elaborates/causes/caused_by/supersedes/follows/references/related) from a memory a recall already served to this session. Neighbors return as chunk-level summaries, optionally filtered by relation.",
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {
|
|
46
|
+
memoryId: { type: "string", description: "Memory id (or [m:xxxx] handle) served by a recent recall. Required." },
|
|
47
|
+
sessionKey: { type: "string", description: "Session key whose recent recalls authorize the id. Required." },
|
|
48
|
+
relation: {
|
|
49
|
+
type: "string",
|
|
50
|
+
enum: ["supports", "contradicts", "elaborates", "causes", "caused_by", "supersedes", "follows", "references", "related"],
|
|
51
|
+
description: "Optional relation filter; omitted means every known relation.",
|
|
52
|
+
},
|
|
53
|
+
limit: { type: "integer", minimum: 1, description: "Optional cap on returned neighbors (ceiling: recallNavigation.maxNeighbors)." },
|
|
54
|
+
namespace: { type: "string", description: "Caller namespace to scope this operation to." },
|
|
55
|
+
},
|
|
56
|
+
required: ["memoryId", "sessionKey"],
|
|
57
|
+
additionalProperties: false,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
];
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall-navigation boundary operations (issue #1956).
|
|
3
|
+
*
|
|
4
|
+
* `memory_expand` / `memory_traverse` route MCP, HTTP, and CLI dispatch
|
|
5
|
+
* through the shared validation + error-mapping layer (access-boundary.ts)
|
|
6
|
+
* to the single `EngramAccessService.recallNavigate` implementation.
|
|
7
|
+
* Sibling module so access-operations-batch.ts stays at its ceiling seam
|
|
8
|
+
* (same layout as deep-recall's extraction).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
|
|
13
|
+
import { defineOperation } from "./access-boundary.js";
|
|
14
|
+
import { EngramAccessInputError } from "./access-errors.js";
|
|
15
|
+
|
|
16
|
+
function stripNulls(data: unknown): unknown {
|
|
17
|
+
if (data !== null && typeof data === "object" && !Array.isArray(data)) {
|
|
18
|
+
const obj = data as Record<string, unknown>;
|
|
19
|
+
const cleaned: Record<string, unknown> = {};
|
|
20
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
21
|
+
if (value !== null) cleaned[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return cleaned;
|
|
24
|
+
}
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function strictSchema<T extends z.ZodRawShape>(shape: T): z.ZodType<Record<string, unknown>> {
|
|
29
|
+
return z.preprocess(stripNulls, z.object(shape).passthrough()) as unknown as z.ZodType<Record<string, unknown>>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const str = z.string().optional();
|
|
33
|
+
|
|
34
|
+
function optStr(value: unknown): string | undefined {
|
|
35
|
+
return typeof value === "string" ? value : undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function optInt(value: unknown): number | undefined {
|
|
39
|
+
if (typeof value === "number") return value;
|
|
40
|
+
if (typeof value === "string" && Number.isFinite(Number(value))) return Number(value);
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function reqStr(value: unknown, field: string): string {
|
|
45
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
46
|
+
throw new EngramAccessInputError(`${field} is required`);
|
|
47
|
+
}
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const baseShape = {
|
|
52
|
+
memoryId: z.string(),
|
|
53
|
+
sessionKey: z.string(),
|
|
54
|
+
namespace: str,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
defineOperation({
|
|
58
|
+
name: "memory_expand",
|
|
59
|
+
description: "Re-render one already-served recall result at a deeper disclosure level (chunk → section → raw).",
|
|
60
|
+
schema: strictSchema({ ...baseShape, disclosure: z.enum(["chunk", "section", "raw"]).optional() }),
|
|
61
|
+
handler: async (input, ctx) => {
|
|
62
|
+
const disclosure = optStr(input.disclosure);
|
|
63
|
+
return {
|
|
64
|
+
result: await ctx.service.recallNavigate({
|
|
65
|
+
action: "expand",
|
|
66
|
+
memoryId: reqStr(input.memoryId, "memoryId"),
|
|
67
|
+
sessionKey: reqStr(input.sessionKey, "sessionKey"),
|
|
68
|
+
...(disclosure === "chunk" || disclosure === "section" || disclosure === "raw" ? { disclosure } : {}),
|
|
69
|
+
namespace: optStr(input.namespace),
|
|
70
|
+
authenticatedPrincipal: ctx.authenticatedPrincipal,
|
|
71
|
+
}),
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
defineOperation({
|
|
77
|
+
name: "memory_traverse",
|
|
78
|
+
description:
|
|
79
|
+
"Follow typed frontmatter links from an already-served recall result; neighbors return as chunk-level summaries.",
|
|
80
|
+
schema: strictSchema({
|
|
81
|
+
...baseShape,
|
|
82
|
+
relation: z
|
|
83
|
+
.enum([
|
|
84
|
+
"supports",
|
|
85
|
+
"contradicts",
|
|
86
|
+
"elaborates",
|
|
87
|
+
"causes",
|
|
88
|
+
"caused_by",
|
|
89
|
+
"supersedes",
|
|
90
|
+
"follows",
|
|
91
|
+
"references",
|
|
92
|
+
"related",
|
|
93
|
+
])
|
|
94
|
+
.optional(),
|
|
95
|
+
limit: z.union([z.number(), z.string()]).optional(),
|
|
96
|
+
}),
|
|
97
|
+
handler: async (input, ctx) => {
|
|
98
|
+
const relation = optStr(input.relation);
|
|
99
|
+
return {
|
|
100
|
+
result: await ctx.service.recallNavigate({
|
|
101
|
+
action: "traverse",
|
|
102
|
+
memoryId: reqStr(input.memoryId, "memoryId"),
|
|
103
|
+
sessionKey: reqStr(input.sessionKey, "sessionKey"),
|
|
104
|
+
...(relation !== undefined ? { relation } : {}),
|
|
105
|
+
limit: optInt(input.limit),
|
|
106
|
+
namespace: optStr(input.namespace),
|
|
107
|
+
authenticatedPrincipal: ctx.authenticatedPrincipal,
|
|
108
|
+
}),
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared markdown renderer for recall navigation (issue #1956).
|
|
3
|
+
*
|
|
4
|
+
* Rule 22: CLI text output, MCP `rendered`, and HTTP human output all
|
|
5
|
+
* render through this one module — never forked per surface.
|
|
6
|
+
* Deterministic: items in result order, budget and disclosure spend last.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { RecallNavigationResult } from "./recall-navigation.js";
|
|
10
|
+
|
|
11
|
+
type NavigationRenderInput = RecallNavigationResult extends infer Result
|
|
12
|
+
? Result extends { rendered: string }
|
|
13
|
+
? Omit<Result, "rendered">
|
|
14
|
+
: never
|
|
15
|
+
: never;
|
|
16
|
+
|
|
17
|
+
export function renderNavigationResult(result: NavigationRenderInput): string {
|
|
18
|
+
if (!result.ok) {
|
|
19
|
+
return ["# Memory navigation", "", `- error: ${result.error}`, `- ${result.message}`, ""].join("\n");
|
|
20
|
+
}
|
|
21
|
+
const lines = ["# Memory navigation", ""];
|
|
22
|
+
lines.push(`- action: ${result.action}`);
|
|
23
|
+
lines.push(`- memory: ${result.memoryId}`);
|
|
24
|
+
lines.push(`- namespace: ${result.namespace}`);
|
|
25
|
+
if (result.items.length === 0) {
|
|
26
|
+
lines.push("- neighbors: (none)");
|
|
27
|
+
} else {
|
|
28
|
+
lines.push("");
|
|
29
|
+
for (const [index, item] of result.items.entries()) {
|
|
30
|
+
const via = item.linkType !== undefined ? ` via ${item.linkType}` : "";
|
|
31
|
+
lines.push(`${index + 1}. **${item.memoryId}** (${item.disclosure}${via})`);
|
|
32
|
+
if (item.content !== undefined) {
|
|
33
|
+
lines.push(item.content);
|
|
34
|
+
} else {
|
|
35
|
+
lines.push(` ${item.preview.replace(/\s+/g, " ").trim()}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
lines.push("");
|
|
40
|
+
lines.push(
|
|
41
|
+
`- budget: ${result.budget.used}/${result.budget.chars} chars${result.truncated ? " (truncated)" : ""}`,
|
|
42
|
+
);
|
|
43
|
+
const spend = result.disclosureSpend;
|
|
44
|
+
lines.push(
|
|
45
|
+
`- disclosure spend: chunk=${spend.chunk.estimatedTokens}t, section=${spend.section.estimatedTokens}t, raw=${spend.raw.estimatedTokens}t`,
|
|
46
|
+
);
|
|
47
|
+
lines.push("");
|
|
48
|
+
return lines.join("\n");
|
|
49
|
+
}
|