@remnic/core 9.69.42 → 9.69.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.d.ts +16 -14
- package/dist/access-admin-ops-surface.js +33 -25
- package/dist/access-authorization-probe.d.ts +16 -14
- package/dist/access-authorization-probe.js +34 -26
- package/dist/access-boundary.d.ts +16 -14
- package/dist/access-boundary.js +33 -25
- package/dist/access-cli.js +93 -83
- 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 -14
- package/dist/access-extraction-force-flush.js +33 -25
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-briefing.d.ts +16 -14
- package/dist/access-http-briefing.js +34 -26
- package/dist/access-http-lcm-compaction.d.ts +16 -14
- package/dist/access-http-lifecycle-flush.d.ts +16 -14
- package/dist/access-http-offline-stream.d.ts +16 -14
- package/dist/access-http-query.d.ts +3 -2
- package/dist/access-http-query.js +35 -27
- package/dist/access-http.d.ts +17 -15
- package/dist/access-http.js +55 -45
- package/dist/access-identity-continuity-surface.d.ts +12 -11
- package/dist/access-identity-continuity-surface.js +33 -25
- package/dist/access-lcm-surface.d.ts +16 -14
- package/dist/access-lcm-surface.js +33 -25
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp-shared-context-tools.d.ts +16 -14
- package/dist/access-mcp.d.ts +16 -14
- package/dist/access-mcp.js +45 -36
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-ShnAJ9uL.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 +33 -25
- package/dist/access-observe-transcript.d.ts +12 -11
- package/dist/access-observe-write-category.d.ts +5 -3
- package/dist/access-observe-write-category.js +4 -4
- package/dist/access-observe-write-surface.d.ts +16 -14
- package/dist/access-observe-write-surface.js +33 -25
- package/dist/access-offline-manifest.d.ts +12 -11
- package/dist/access-operations-batch.js +35 -28
- package/dist/access-operations.d.ts +17 -15
- package/dist/access-operations.js +41 -33
- package/dist/access-recall-concurrency.d.ts +16 -14
- package/dist/access-recall-concurrency.js +33 -25
- package/dist/access-recall-response.d.ts +16 -14
- package/dist/access-recall-response.js +33 -25
- package/dist/access-recall-surface.d.ts +16 -14
- package/dist/access-recall-surface.js +33 -25
- package/dist/access-schema.d.ts +10 -2
- package/dist/access-schema.js +5 -3
- package/dist/{access-service-DjG_e2cM.d.ts → access-service-Cww3xAAy.d.ts} +13 -10
- package/dist/access-service-helpers.d.ts +16 -14
- package/dist/access-service.d.ts +16 -14
- package/dist/access-service.js +33 -25
- package/dist/access-surface-catalog.d.ts +16 -14
- package/dist/access-surface-catalog.js +39 -27
- 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 +5 -3
- 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/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 +8 -8
- 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/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-BhuXaQHx.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 +9 -9
- 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-WNPRRBOE.js → chunk-2HDLDBJW.js} +2 -2
- package/dist/{chunk-BXLOS5AJ.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/chunk-2WMXZYMS.js +25 -0
- package/dist/chunk-2WMXZYMS.js.map +1 -0
- package/dist/{chunk-FSUFKIFS.js → chunk-2YIUUXNK.js} +2 -2
- package/dist/{chunk-OP722LOG.js → chunk-3254BYQV.js} +1 -1
- package/dist/{chunk-IUTYNDFS.js → chunk-3K64PLY3.js} +293 -43
- package/dist/chunk-3K64PLY3.js.map +1 -0
- package/dist/{chunk-CQ4BTPX6.js → chunk-3YQ7VLP3.js} +2 -2
- package/dist/{chunk-ZFU6QNRN.js → chunk-4WMGRLTV.js} +2 -2
- package/dist/{chunk-U26LB4WA.js → chunk-5AJZ7EUW.js} +2 -2
- 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-R45VFSEV.js → chunk-7F47R4H4.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-AS2NOPDM.js +30 -0
- package/dist/chunk-AS2NOPDM.js.map +1 -0
- package/dist/{chunk-CTETTVDN.js → chunk-BZDK5EOD.js} +2 -2
- package/dist/{chunk-PLJ2MQFT.js → chunk-C3YEB7CR.js} +7 -7
- package/dist/{chunk-XJLTQTAO.js → chunk-D7UUB33A.js} +2 -2
- package/dist/{chunk-DMTSKY4W.js → chunk-DABSYX7V.js} +3 -3
- package/dist/{chunk-3RLWUW7G.js → chunk-DDGQDNQW.js} +2 -2
- package/dist/{chunk-ZGXHTV5Y.js → chunk-EOXCOZ6L.js} +2 -2
- package/dist/{chunk-EAARGPWI.js → chunk-F3TURDFG.js} +3 -1
- package/dist/chunk-F3TURDFG.js.map +1 -0
- package/dist/{chunk-DLPMOSNH.js → chunk-GKKLI23D.js} +2 -2
- package/dist/{chunk-I65KB36L.js → chunk-GMU7MAHS.js} +9 -9
- package/dist/{chunk-JC2OBYYD.js → chunk-HKQAI6XI.js} +2 -2
- package/dist/{chunk-ETE3SGAH.js → chunk-IAGEEVQL.js} +2 -2
- package/dist/{chunk-HO2P3FAX.js → chunk-IOTYIECA.js} +19 -15
- package/dist/chunk-IOTYIECA.js.map +1 -0
- package/dist/{chunk-GIM2AGFL.js → chunk-IWHNT35B.js} +3 -3
- package/dist/{chunk-AHHFBJX7.js → chunk-JDL5BYYF.js} +3 -3
- package/dist/{chunk-K27INAPR.js → chunk-JMBTNVMW.js} +2 -2
- package/dist/{chunk-ZOGKZ2XT.js → chunk-JUOJGZPV.js} +6 -2
- package/dist/chunk-JUOJGZPV.js.map +1 -0
- package/dist/{chunk-L732NBPR.js → chunk-K3IVJ5ML.js} +96 -42
- package/dist/chunk-K3IVJ5ML.js.map +1 -0
- package/dist/{chunk-JMAP6L6Q.js → chunk-KDLOKVX7.js} +2 -2
- package/dist/chunk-KIW3OOZE.js +39 -0
- package/dist/chunk-KIW3OOZE.js.map +1 -0
- package/dist/{chunk-HK44SV6K.js → chunk-KORQWGUA.js} +2 -2
- package/dist/{chunk-VDX2J7OX.js → chunk-KQAFEZQX.js} +2 -2
- package/dist/{chunk-4IGOLIWM.js → chunk-L63M2PE4.js} +2 -2
- package/dist/{chunk-BIANISES.js → chunk-LD22AAJI.js} +2 -2
- package/dist/chunk-LVTT5AUG.js +79 -0
- package/dist/chunk-LVTT5AUG.js.map +1 -0
- package/dist/{chunk-RXYO6NA6.js → chunk-M6FKXOYV.js} +2 -2
- package/dist/{chunk-LCVYO3ON.js → chunk-MOL7JK4F.js} +2 -2
- package/dist/{chunk-VNQRRUNS.js → chunk-O6ZSWHVR.js} +2 -3
- package/dist/chunk-O6ZSWHVR.js.map +1 -0
- package/dist/chunk-OCX7OWOC.js +95 -0
- package/dist/chunk-OCX7OWOC.js.map +1 -0
- package/dist/{chunk-HPMCKAET.js → chunk-OGAKUA7I.js} +2 -2
- package/dist/{chunk-AOGICQMH.js → chunk-PF7LQ22G.js} +3 -3
- package/dist/{chunk-AUSRUOMQ.js → chunk-PW4HTWXL.js} +2 -2
- package/dist/{chunk-ZYRAY5FL.js → chunk-QCTXQ2HW.js} +2 -2
- package/dist/chunk-QZ4U67KO.js +98 -0
- package/dist/chunk-QZ4U67KO.js.map +1 -0
- package/dist/{chunk-G3NTZZWT.js → chunk-R3H2AXO2.js} +2 -2
- package/dist/{chunk-HSJU6JFT.js → chunk-ROXDOKLM.js} +12 -6
- package/dist/chunk-ROXDOKLM.js.map +1 -0
- package/dist/{chunk-OCWFKD5Q.js → chunk-SUS64JER.js} +2 -2
- package/dist/{chunk-RTXHUVOD.js → chunk-SZV2L2IG.js} +10 -10
- 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-KJQ4Y2PY.js → chunk-VDLNQVYW.js} +8 -8
- package/dist/{chunk-N7B6V7SG.js → chunk-VHANUT45.js} +5 -5
- package/dist/{chunk-E4FRR4MA.js → chunk-VJXMFBVR.js} +2 -2
- 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-2UINSKQC.js → chunk-W6YDAIVB.js} +12 -6
- package/dist/chunk-W6YDAIVB.js.map +1 -0
- package/dist/{chunk-GWEZNCGA.js → chunk-WJPR2XUN.js} +2 -2
- package/dist/{chunk-2PDMIPMP.js → chunk-WLHPCAVD.js} +6 -6
- package/dist/chunk-WLHPCAVD.js.map +1 -0
- package/dist/{chunk-KCKXOS4Y.js → chunk-WNMVUWI7.js} +3 -3
- package/dist/{chunk-DQEMWVMT.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-LWF6GOII.js → chunk-XK76RJBN.js} +2 -2
- package/dist/{chunk-AAX22E4K.js → chunk-XLPZN3A5.js} +2 -2
- package/dist/{chunk-VBK6SRNE.js → chunk-XOCGC3FJ.js} +2 -2
- package/dist/{chunk-ADARR5KF.js → chunk-Y77UTH7F.js} +42 -39
- package/dist/chunk-Y77UTH7F.js.map +1 -0
- package/dist/chunk-YE4JBZO5.js +44 -0
- package/dist/chunk-YE4JBZO5.js.map +1 -0
- package/dist/{chunk-AAAFZW3U.js → chunk-ZBSP4BSN.js} +2 -2
- package/dist/{chunk-VVX5PZFS.js → chunk-ZHXSOMYH.js} +2 -2
- package/dist/{chunk-7PSRCGWT.js → chunk-ZVQ5HF77.js} +2 -2
- package/dist/{cli-Cx9s_VRn.d.ts → cli-Cl7bKIWJ.d.ts} +5 -5
- package/dist/cli.d.ts +18 -16
- package/dist/cli.js +77 -67
- package/dist/coding/export-okf-codegraph.d.ts +2 -1
- package/dist/coding/export-okf-codegraph.js +7 -7
- package/dist/coding/pre-action-gate.d.ts +2 -1
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +8 -8
- 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 +5 -3
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +8 -8
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +8 -8
- 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/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +3 -2
- package/dist/convergence-refresh.js +10 -10
- 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 +10 -10
- 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 -14
- package/dist/deep-recall-http-glue.js +5 -5
- package/dist/deep-recall-mcp-tools.d.ts +16 -14
- 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-C2QFQ97b.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 +8 -8
- 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/external-wiki-access.d.ts +16 -14
- package/dist/external-wiki-access.js +34 -26
- 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 -14
- 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 +8 -8
- package/dist/fallback-llm-codex-subscription.d.ts +2 -1
- package/dist/fallback-llm.d.ts +2 -1
- package/dist/{generic-recall-paths-CeKQsQEn.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-Bau-Wl0H.d.ts → index-fdw_oK5a.d.ts} +3 -3
- package/dist/index.d.ts +29 -27
- package/dist/index.js +109 -86
- 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-Bj-m01Ro.d.ts → local-llm-3-jtw52a.d.ts} +1 -1
- package/dist/local-llm-config.js +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 +6 -5
- package/dist/location/index.js +10 -10
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +8 -8
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +8 -8
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +9 -9
- package/dist/{maintenance-Ye-y-c7f.d.ts → maintenance-DgeeH0a1.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +18 -16
- 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 -14
- package/dist/memory-subject.d.ts +16 -14
- 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 +9 -9
- 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 +8 -8
- package/dist/native-knowledge.d.ts +2 -1
- package/dist/offline-sync-impression-drain.d.ts +2 -1
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +11 -11
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +20 -19
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +16 -16
- package/dist/{orchestrator-fFDDYUUV.d.ts → orchestrator-VXWKdatm.d.ts} +10 -10
- package/dist/orchestrator.d.ts +12 -11
- package/dist/orchestrator.js +93 -83
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-D_j5n_Ih.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-CjiSqxUx.d.ts → public-http-DdmM4scJ.d.ts} +1 -1
- package/dist/{qmd-CnxVjKrv.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-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/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +6 -4
- 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/{scope-profiles-BajH5zAT.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-Bu6d3O7R.d.ts → semantic-consolidation-g6x-ShY8.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +9 -9
- package/dist/semantic-rule-promotion.js +8 -8
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +8 -8
- package/dist/{service-ChFwWtLS.d.ts → service-CaCOk0rd.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +2 -1
- package/dist/session-observer-state.d.ts +2 -1
- package/dist/shared-context/manager.d.ts +2 -1
- package/dist/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +8 -8
- package/dist/standup/build.js +8 -8
- package/dist/{storage-BDKQdsmB.d.ts → storage-C9nsZX5Q.d.ts} +1 -1
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +7 -7
- package/dist/subject-config.d.ts +2 -1
- package/dist/summarizer.d.ts +2 -1
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/support-passport/index.d.ts +19 -17
- package/dist/support-passport/index.js +36 -28
- package/dist/{tagging-CwK6um2q.d.ts → tagging-BA4RFdH3.d.ts} +2 -2
- 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 +8 -8
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/{types-B65IoepH.d.ts → types-Sps-lg5I.d.ts} +2 -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 +8 -8
- package/dist/who-knows-cli.d.ts +16 -14
- package/dist/who-knows-cli.js +9 -9
- package/dist/who-knows.d.ts +16 -14
- package/dist/who-knows.js +8 -8
- package/dist/write-envelope.d.ts +2 -1
- package/package.json +2 -2
- package/src/access-boundary.ts +2 -0
- package/src/access-category-alias.test.ts +57 -0
- package/src/access-http.ts +3 -3
- package/src/access-mcp-output-schemas.ts +30 -0
- package/src/access-mcp.ts +3 -3
- package/src/access-observe-write-category.ts +20 -1
- package/src/access-operations.ts +2 -0
- package/src/access-schema.ts +10 -0
- package/src/access-service.ts +13 -23
- 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/local-llm-config.test.ts +21 -0
- package/src/local-llm-config.ts +1 -2
- package/src/mcp-read-only-tools.ts +2 -0
- package/src/orchestration/recall-internal.ts +4 -4
- 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/dist/chunk-2PDMIPMP.js.map +0 -1
- package/dist/chunk-2UINSKQC.js.map +0 -1
- package/dist/chunk-ADARR5KF.js.map +0 -1
- package/dist/chunk-EAARGPWI.js.map +0 -1
- package/dist/chunk-HO2P3FAX.js.map +0 -1
- package/dist/chunk-HSJU6JFT.js.map +0 -1
- package/dist/chunk-IUTYNDFS.js.map +0 -1
- package/dist/chunk-L732NBPR.js.map +0 -1
- package/dist/chunk-QVSRE355.js.map +0 -1
- package/dist/chunk-RSSLDMFX.js +0 -14
- package/dist/chunk-RSSLDMFX.js.map +0 -1
- package/dist/chunk-VNQRRUNS.js.map +0 -1
- package/dist/chunk-WN2OXGGH.js.map +0 -1
- package/dist/chunk-ZOGKZ2XT.js.map +0 -1
- /package/dist/{capsule-crypto-YO5QJ6L3.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-WNPRRBOE.js.map → chunk-2HDLDBJW.js.map} +0 -0
- /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-FSUFKIFS.js.map → chunk-2YIUUXNK.js.map} +0 -0
- /package/dist/{chunk-OP722LOG.js.map → chunk-3254BYQV.js.map} +0 -0
- /package/dist/{chunk-CQ4BTPX6.js.map → chunk-3YQ7VLP3.js.map} +0 -0
- /package/dist/{chunk-ZFU6QNRN.js.map → chunk-4WMGRLTV.js.map} +0 -0
- /package/dist/{chunk-U26LB4WA.js.map → chunk-5AJZ7EUW.js.map} +0 -0
- /package/dist/{chunk-R45VFSEV.js.map → chunk-7F47R4H4.js.map} +0 -0
- /package/dist/{chunk-LVFI5LG7.js.map → chunk-A7GQBJP5.js.map} +0 -0
- /package/dist/{chunk-CTETTVDN.js.map → chunk-BZDK5EOD.js.map} +0 -0
- /package/dist/{chunk-PLJ2MQFT.js.map → chunk-C3YEB7CR.js.map} +0 -0
- /package/dist/{chunk-XJLTQTAO.js.map → chunk-D7UUB33A.js.map} +0 -0
- /package/dist/{chunk-DMTSKY4W.js.map → chunk-DABSYX7V.js.map} +0 -0
- /package/dist/{chunk-3RLWUW7G.js.map → chunk-DDGQDNQW.js.map} +0 -0
- /package/dist/{chunk-ZGXHTV5Y.js.map → chunk-EOXCOZ6L.js.map} +0 -0
- /package/dist/{chunk-DLPMOSNH.js.map → chunk-GKKLI23D.js.map} +0 -0
- /package/dist/{chunk-I65KB36L.js.map → chunk-GMU7MAHS.js.map} +0 -0
- /package/dist/{chunk-JC2OBYYD.js.map → chunk-HKQAI6XI.js.map} +0 -0
- /package/dist/{chunk-ETE3SGAH.js.map → chunk-IAGEEVQL.js.map} +0 -0
- /package/dist/{chunk-GIM2AGFL.js.map → chunk-IWHNT35B.js.map} +0 -0
- /package/dist/{chunk-AHHFBJX7.js.map → chunk-JDL5BYYF.js.map} +0 -0
- /package/dist/{chunk-K27INAPR.js.map → chunk-JMBTNVMW.js.map} +0 -0
- /package/dist/{chunk-JMAP6L6Q.js.map → chunk-KDLOKVX7.js.map} +0 -0
- /package/dist/{chunk-HK44SV6K.js.map → chunk-KORQWGUA.js.map} +0 -0
- /package/dist/{chunk-VDX2J7OX.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-4IGOLIWM.js.map → chunk-L63M2PE4.js.map} +0 -0
- /package/dist/{chunk-BIANISES.js.map → chunk-LD22AAJI.js.map} +0 -0
- /package/dist/{chunk-RXYO6NA6.js.map → chunk-M6FKXOYV.js.map} +0 -0
- /package/dist/{chunk-LCVYO3ON.js.map → chunk-MOL7JK4F.js.map} +0 -0
- /package/dist/{chunk-HPMCKAET.js.map → chunk-OGAKUA7I.js.map} +0 -0
- /package/dist/{chunk-AOGICQMH.js.map → chunk-PF7LQ22G.js.map} +0 -0
- /package/dist/{chunk-AUSRUOMQ.js.map → chunk-PW4HTWXL.js.map} +0 -0
- /package/dist/{chunk-ZYRAY5FL.js.map → chunk-QCTXQ2HW.js.map} +0 -0
- /package/dist/{chunk-G3NTZZWT.js.map → chunk-R3H2AXO2.js.map} +0 -0
- /package/dist/{chunk-OCWFKD5Q.js.map → chunk-SUS64JER.js.map} +0 -0
- /package/dist/{chunk-RTXHUVOD.js.map → chunk-SZV2L2IG.js.map} +0 -0
- /package/dist/{chunk-AIVRD66I.js.map → chunk-T3F2HWIG.js.map} +0 -0
- /package/dist/{chunk-KJQ4Y2PY.js.map → chunk-VDLNQVYW.js.map} +0 -0
- /package/dist/{chunk-N7B6V7SG.js.map → chunk-VHANUT45.js.map} +0 -0
- /package/dist/{chunk-E4FRR4MA.js.map → chunk-VJXMFBVR.js.map} +0 -0
- /package/dist/{chunk-GWNSKQDA.js.map → chunk-W44T2KHG.js.map} +0 -0
- /package/dist/{chunk-GWEZNCGA.js.map → chunk-WJPR2XUN.js.map} +0 -0
- /package/dist/{chunk-KCKXOS4Y.js.map → chunk-WNMVUWI7.js.map} +0 -0
- /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-LWF6GOII.js.map → chunk-XK76RJBN.js.map} +0 -0
- /package/dist/{chunk-AAX22E4K.js.map → chunk-XLPZN3A5.js.map} +0 -0
- /package/dist/{chunk-VBK6SRNE.js.map → chunk-XOCGC3FJ.js.map} +0 -0
- /package/dist/{chunk-AAAFZW3U.js.map → chunk-ZBSP4BSN.js.map} +0 -0
- /package/dist/{chunk-VVX5PZFS.js.map → chunk-ZHXSOMYH.js.map} +0 -0
- /package/dist/{chunk-7PSRCGWT.js.map → chunk-ZVQ5HF77.js.map} +0 -0
package/src/access-service.ts
CHANGED
|
@@ -173,6 +173,9 @@ import {
|
|
|
173
173
|
} from "./admin/admin-surfaces.js";
|
|
174
174
|
import { FileCalendarSource, buildBriefing, parseBriefingFocus, parseBriefingWindow } from "./briefing.js";
|
|
175
175
|
import { type DeepRecallResult, runBudgetedDeepRecall } from "./deep-recall.js";
|
|
176
|
+
import { resolveEffectiveDeepRecallConfig } from "./deep-recall-config.js";
|
|
177
|
+
import { type RecallNavigationRequest, type RecallNavigationResult, runRecallNavigation } from "./recall-navigation.js";
|
|
178
|
+
import { RECALL_NAVIGATION_CONFIG_DEFAULTS } from "./recall-navigation-config.js";
|
|
176
179
|
import { callDeepRecallPolicyLlm } from "./deep-recall-policy-llm.js";
|
|
177
180
|
import { createDeepRecallSeedSearch } from "./deep-recall-seeds.js";
|
|
178
181
|
import { renderDeepRecallResult } from "./deep-recall-renderer.js";
|
|
@@ -1278,6 +1281,7 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
1278
1281
|
private readonly replicaDivergenceMonitor: ReplicaDivergenceMonitor;
|
|
1279
1282
|
private readonly injectedSupportPassportGatewayRoute: SupportPassportModelRoute | null;
|
|
1280
1283
|
readonly reviewDeckEnabled: boolean;
|
|
1284
|
+
readonly recallNavigationEnabled: boolean;
|
|
1281
1285
|
|
|
1282
1286
|
/** AccessObserveWriteSurface (access-service decomposition). Lazy; selfDeps live wiring. */
|
|
1283
1287
|
private _accessObserveWriteSurface: AccessObserveWriteSurface | undefined;
|
|
@@ -1366,6 +1370,9 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
1366
1370
|
this.replicaDivergenceMonitor = new ReplicaDivergenceMonitor({ resolveSecretRef: options.resolveSecretRef });
|
|
1367
1371
|
this.injectedSupportPassportGatewayRoute = options.supportPassportGatewayRoute ?? null;
|
|
1368
1372
|
this.reviewDeckEnabled = options.reviewDeckEnabled === true;
|
|
1373
|
+
// Configs built without parseConfig (test stubs, older host shapes) may
|
|
1374
|
+
// omit the block; the parsed default (enabled: true) is the contract.
|
|
1375
|
+
this.recallNavigationEnabled = (orchestrator.config.recallNavigation ?? RECALL_NAVIGATION_CONFIG_DEFAULTS).enabled;
|
|
1369
1376
|
const accessCaps = resolveAccessSetupCapabilities(orchestrator.config); // #1566 Cluster B
|
|
1370
1377
|
this.budget = new CrossNamespaceBudget({
|
|
1371
1378
|
enabled: accessCaps.recallCrossNamespaceBudget,
|
|
@@ -2743,29 +2750,7 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
2743
2750
|
if (query.length === 0) {
|
|
2744
2751
|
throw new EngramAccessInputError("deepRecall: query is required");
|
|
2745
2752
|
}
|
|
2746
|
-
|
|
2747
|
-
const requestedSteps = request.maxSteps;
|
|
2748
|
-
if (requestedSteps !== undefined) {
|
|
2749
|
-
if (typeof requestedSteps !== "number" || !Number.isInteger(requestedSteps) || requestedSteps < 0) {
|
|
2750
|
-
throw new EngramAccessInputError("deepRecall: maxSteps must be a non-negative integer");
|
|
2751
|
-
}
|
|
2752
|
-
// `deepRecall.maxSteps: 0` is a documented disable value (§33): the
|
|
2753
|
-
// policy loop is off, so ANY positive override is a refusal rather than
|
|
2754
|
-
// a ceiling comparison. The zero case resolves first, so the ceiling
|
|
2755
|
-
// threshold below only runs while the loop is enabled.
|
|
2756
|
-
if (cfg.maxSteps <= 0) {
|
|
2757
|
-
if (requestedSteps > 0) {
|
|
2758
|
-
throw new EngramAccessInputError(
|
|
2759
|
-
"deepRecall: the policy loop is disabled (deepRecall.maxSteps=0); maxSteps must be 0"
|
|
2760
|
-
);
|
|
2761
|
-
}
|
|
2762
|
-
} else if (requestedSteps > cfg.maxSteps) {
|
|
2763
|
-
throw new EngramAccessInputError(
|
|
2764
|
-
`deepRecall: maxSteps ${requestedSteps} exceeds the configured ceiling ${cfg.maxSteps}`
|
|
2765
|
-
);
|
|
2766
|
-
}
|
|
2767
|
-
effective = { ...cfg, maxSteps: requestedSteps };
|
|
2768
|
-
}
|
|
2753
|
+
const effective = resolveEffectiveDeepRecallConfig(cfg, request.maxSteps);
|
|
2769
2754
|
const principal =
|
|
2770
2755
|
request.authenticatedPrincipal?.trim() || resolvePrincipal(request.sessionKey, this.orchestrator.config);
|
|
2771
2756
|
// Read path resolves through the SAME namespace layer as memoryGet (§30):
|
|
@@ -2844,6 +2829,11 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
|
|
|
2844
2829
|
return { ...result, rendered: renderDeepRecallResult(result) };
|
|
2845
2830
|
}
|
|
2846
2831
|
|
|
2832
|
+
async recallNavigate(request: RecallNavigationRequest): Promise<RecallNavigationResult> {
|
|
2833
|
+
const principal = request.authenticatedPrincipal?.trim() || resolvePrincipal(request.sessionKey, this.orchestrator.config);
|
|
2834
|
+
return runRecallNavigation({ config: this.orchestrator.config.recallNavigation ?? RECALL_NAVIGATION_CONFIG_DEFAULTS, recallBudgetChars: this.orchestrator.config.recallBudgetChars, recentServedIds: (sessionKey, depth) => this.orchestrator.handleHistory.recent(sessionKey, depth), resolveReadableNamespace: (ns, p) => this.resolveReadableNamespace(ns, p || undefined), getStorage: (namespace) => this.orchestrator.getStorage(namespace) }, { ...request, authenticatedPrincipal: (principal ?? "").length > 0 ? principal : undefined });
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2847
2837
|
async recallXray(request: {
|
|
2848
2838
|
query: string;
|
|
2849
2839
|
sessionKey?: string;
|
|
@@ -271,8 +271,17 @@ function extractHttpRouteDispatchMap(): Map<string, Set<string>> {
|
|
|
271
271
|
// must not be keyed — validateDispatchCoverage will flag any catalog
|
|
272
272
|
// entry claiming migration through it (no pathname-only fallback).
|
|
273
273
|
currentKey = method ? `${method} ${pathname}` : null;
|
|
274
|
-
if (currentKey
|
|
275
|
-
routeOps.
|
|
274
|
+
if (currentKey) {
|
|
275
|
+
if (!routeOps.has(currentKey)) {
|
|
276
|
+
routeOps.set(currentKey, new Set<string>());
|
|
277
|
+
}
|
|
278
|
+
// One-line route branches (compact style, e.g. the deep-recall
|
|
279
|
+
// route) carry their dispatch marker on the SAME line as the route
|
|
280
|
+
// match — collect it before the loop advances or it is lost.
|
|
281
|
+
const sameLineOp = line.match(/(?:getOperation|enforceTokenOp)\("(\w+)"\)/);
|
|
282
|
+
if (sameLineOp) {
|
|
283
|
+
routeOps.get(currentKey)!.add(sameLineOp[1]!);
|
|
284
|
+
}
|
|
276
285
|
}
|
|
277
286
|
continue;
|
|
278
287
|
}
|
|
@@ -350,6 +359,25 @@ function extractHttpRouteDispatchMap(): Map<string, Set<string>> {
|
|
|
350
359
|
}
|
|
351
360
|
}
|
|
352
361
|
}
|
|
362
|
+
|
|
363
|
+
// Recall-navigation routes (issue #1956): the compact catch-all in
|
|
364
|
+
// access-http.ts delegates to maybeRespondRecallNavigation; the boundary
|
|
365
|
+
// dispatch markers live per-route in recall-navigation-http-glue.ts.
|
|
366
|
+
if (/\bawait\s+maybeRespondRecallNavigation\(/.test(source)) {
|
|
367
|
+
const navigationSource = readFileSync(
|
|
368
|
+
new URL("./recall-navigation-http-glue.ts", import.meta.url),
|
|
369
|
+
"utf-8",
|
|
370
|
+
);
|
|
371
|
+
const navigationRoutes = [
|
|
372
|
+
["POST", "/engram/v1/memory/expand", "memory_expand"],
|
|
373
|
+
["POST", "/engram/v1/memory/traverse", "memory_traverse"],
|
|
374
|
+
] as const;
|
|
375
|
+
for (const [method, pathname, operation] of navigationRoutes) {
|
|
376
|
+
if (navigationSource.includes(`"${pathname}"`) && navigationSource.includes(`enforceTokenOp("${operation}")`)) {
|
|
377
|
+
routeOps.set(`${method} ${pathname}`, new Set([operation]));
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
353
381
|
for (const [sourcePath, routes] of [
|
|
354
382
|
["./support-passport/access-http.ts", SUPPORT_PASSPORT_OWNER_HTTP_ROUTES],
|
|
355
383
|
["./support-passport/public-http.ts", SUPPORT_PASSPORT_PUBLIC_HTTP_ROUTES],
|
|
@@ -72,6 +72,8 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
|
|
|
72
72
|
{ tool: "meetings_get", operation: "meetings_get" },
|
|
73
73
|
{ tool: "meetings_build", operation: "meetings_build" },
|
|
74
74
|
{ tool: "deep_recall", operation: "deep_recall" },
|
|
75
|
+
{ tool: "memory_expand", operation: "memory_expand" },
|
|
76
|
+
{ tool: "memory_traverse", operation: "memory_traverse" },
|
|
75
77
|
{ tool: "standup", operation: "standup" },
|
|
76
78
|
{ tool: "action_confidence", operation: "action_confidence" },
|
|
77
79
|
{ tool: "chatgpt_memory_inspector", operation: "chatgpt_memory_inspector" },
|
|
@@ -237,6 +239,8 @@ export const HTTP_ROUTES: readonly HttpRouteEntry[] = [
|
|
|
237
239
|
{ method: "POST", pathname: "/engram/v1/meetings/build", operation: "meetings_build" },
|
|
238
240
|
{ method: "GET", pathname: "/engram/v1/meetings/:id", operation: "meetings_get" },
|
|
239
241
|
{ method: "POST", pathname: "/engram/v1/recall/deep", operation: "deep_recall" },
|
|
242
|
+
{ method: "POST", pathname: "/engram/v1/memory/expand", operation: "memory_expand" },
|
|
243
|
+
{ method: "POST", pathname: "/engram/v1/memory/traverse", operation: "memory_traverse" },
|
|
240
244
|
{ method: "GET", pathname: "/engram/v1/standup", operation: "standup" },
|
|
241
245
|
{ method: "POST", pathname: "/engram/v1/observe", operation: "observe" },
|
|
242
246
|
{ method: "POST", pathname: "/engram/v1/lcm/search", operation: "lcm_search" },
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall-navigation command group (issue #1956) — extracted from cli.ts so
|
|
3
|
+
* the surface file stays at its structural ceiling (same seam as
|
|
4
|
+
* deep-recall-commands.ts). `remnic navigate expand|traverse <memoryId>`
|
|
5
|
+
* runs through EngramAccessService.recallNavigate — the same single
|
|
6
|
+
* implementation MCP and HTTP call, sharing one renderer.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { Orchestrator } from "../orchestrator.js";
|
|
10
|
+
import type { CliCommand } from "../cli.js";
|
|
11
|
+
import { EngramAccessService } from "../access-service.js";
|
|
12
|
+
|
|
13
|
+
function parseLimit(raw: unknown): number | undefined {
|
|
14
|
+
if (raw === undefined || raw === null) return undefined;
|
|
15
|
+
const value = typeof raw === "string" ? Number(raw) : raw;
|
|
16
|
+
if (typeof value !== "number" || !Number.isFinite(value) || !Number.isInteger(value) || value < 1) {
|
|
17
|
+
throw new Error(`--limit must be a positive integer; got ${JSON.stringify(raw)}`);
|
|
18
|
+
}
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function registerRecallNavigationCommands(cmd: CliCommand, orchestrator: Orchestrator): void {
|
|
23
|
+
const run = async (args: unknown[], action: "expand" | "traverse") => {
|
|
24
|
+
const memoryId = String(args[0] ?? "");
|
|
25
|
+
const options = (args[args.length - 1] ?? {}) as Record<string, unknown>;
|
|
26
|
+
const sessionKey = typeof options.sessionKey === "string" ? options.sessionKey : "";
|
|
27
|
+
if (memoryId.length === 0 || sessionKey.length === 0) {
|
|
28
|
+
console.error("usage: navigate <expand|traverse> <memoryId> --session-key <key> [--namespace <ns>]");
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
let limit: number | undefined;
|
|
33
|
+
try {
|
|
34
|
+
limit = action === "traverse" ? parseLimit(options.limit) : undefined;
|
|
35
|
+
} catch (err) {
|
|
36
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
37
|
+
process.exitCode = 1;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const service = new EngramAccessService(orchestrator);
|
|
41
|
+
try {
|
|
42
|
+
const result = await service.recallNavigate({
|
|
43
|
+
action,
|
|
44
|
+
memoryId,
|
|
45
|
+
sessionKey,
|
|
46
|
+
...(action === "expand" && typeof options.disclosure === "string"
|
|
47
|
+
? { disclosure: options.disclosure as "chunk" | "section" | "raw" }
|
|
48
|
+
: {}),
|
|
49
|
+
...(action === "traverse" && typeof options.relation === "string" ? { relation: options.relation } : {}),
|
|
50
|
+
...(limit !== undefined ? { limit } : {}),
|
|
51
|
+
...(typeof options.namespace === "string" && options.namespace.length > 0
|
|
52
|
+
? { namespace: options.namespace }
|
|
53
|
+
: {}),
|
|
54
|
+
});
|
|
55
|
+
if (options.json === true) {
|
|
56
|
+
console.log(JSON.stringify(result, null, 2));
|
|
57
|
+
} else {
|
|
58
|
+
console.log(result.rendered);
|
|
59
|
+
}
|
|
60
|
+
if (!result.ok) process.exitCode = 1;
|
|
61
|
+
} catch (err) {
|
|
62
|
+
console.error(err instanceof Error ? err.message : String(err));
|
|
63
|
+
process.exitCode = 1;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
cmd
|
|
68
|
+
.command("navigate expand <memoryId>")
|
|
69
|
+
.description("Re-render a served memory at deeper disclosure (issue #1956)")
|
|
70
|
+
.option("--session-key <key>", "Session key whose recent recalls authorize the id (required)")
|
|
71
|
+
.option("--disclosure <level>", "Target depth: section or raw (default raw)")
|
|
72
|
+
.option("--namespace <ns>", "Namespace to scope the read to")
|
|
73
|
+
.option("--json", "JSON output (items + budget + disclosure spend)")
|
|
74
|
+
.action(async (...args: unknown[]) => run(args, "expand"));
|
|
75
|
+
|
|
76
|
+
cmd
|
|
77
|
+
.command("navigate traverse <memoryId>")
|
|
78
|
+
.description("Follow typed links from a served memory; neighbors as chunk summaries (issue #1956)")
|
|
79
|
+
.option("--session-key <key>", "Session key whose recent recalls authorize the id (required)")
|
|
80
|
+
.option("--relation <type>", "Optional relation filter (supports, contradicts, elaborates, ...)")
|
|
81
|
+
.option("--limit <n>", "Optional cap on returned neighbors")
|
|
82
|
+
.option("--namespace <ns>", "Namespace to scope the read to")
|
|
83
|
+
.option("--json", "JSON output (items + budget + disclosure spend)")
|
|
84
|
+
.action(async (...args: unknown[]) => run(args, "traverse"));
|
|
85
|
+
}
|
package/src/cli.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { bumpMemoryCorpusVersionForDir } from "./memory-corpus-version.js";
|
|
|
14
14
|
import { utcDayRange } from "./transcript.js";
|
|
15
15
|
import { padEndDisplay, truncateGraphemeSafe } from "./whitespace.js";
|
|
16
16
|
import { runWearablesCliCommand } from "./wearables/cli.js";
|
|
17
|
-
import { registerMeetingsCommands } from "./cli/meetings-commands.js"; import { registerDeepRecallCommands } from "./cli/deep-recall-commands.js";
|
|
17
|
+
import { registerMeetingsCommands } from "./cli/meetings-commands.js"; import { registerDeepRecallCommands } from "./cli/deep-recall-commands.js"; import { registerRecallNavigationCommands } from "./cli/recall-navigation-commands.js";
|
|
18
18
|
import { registerExportOkfCommand, registerOkfCommands } from "./cli/okf-commands.js";
|
|
19
19
|
import { registerSkillsCommands } from "./cli/skills-commands.js";
|
|
20
20
|
import { registerResearchStatusCommands } from "./cli/research-status-commands.js";
|
|
@@ -6230,7 +6230,7 @@ export function registerCli(
|
|
|
6230
6230
|
|
|
6231
6231
|
registerResearchStatusCommands(cmd, orchestrator);
|
|
6232
6232
|
|
|
6233
|
-
registerCreationLedgerCommands(cmd, orchestrator); registerMeetingsCommands(cmd, orchestrator); registerOkfCommands(cmd, orchestrator); registerDeepRecallCommands(cmd, orchestrator); registerTimelineCommands(cmd, orchestrator);
|
|
6233
|
+
registerCreationLedgerCommands(cmd, orchestrator); registerMeetingsCommands(cmd, orchestrator); registerOkfCommands(cmd, orchestrator); registerDeepRecallCommands(cmd, orchestrator); registerTimelineCommands(cmd, orchestrator); registerRecallNavigationCommands(cmd, orchestrator);
|
|
6234
6234
|
|
|
6235
6235
|
cmd
|
|
6236
6236
|
.command("trust-zone-promote")
|
package/src/config.ts
CHANGED
|
@@ -50,6 +50,7 @@ import { parseActiveContextFields } from "./active-context-config.js";
|
|
|
50
50
|
import { parseSkillProjectionConfig } from "./procedural/skill-projection.js";
|
|
51
51
|
import { parseDriftDetectionConfig } from "./preferences/drift-config.js";
|
|
52
52
|
import { parseDeepRecallConfig } from "./deep-recall-config.js";
|
|
53
|
+
import { parseRecallNavigationConfig } from "./recall-navigation-config.js";
|
|
53
54
|
import { parseContradictionLocalizationConfig, parseContradictionScanConfig } from "./contradiction-config.js";
|
|
54
55
|
import { parseGraphPathScoringConfig } from "./graph-path-scoring-config.js";
|
|
55
56
|
import { parseWritePathDedupConfig } from "./dedup/novelty-gate.js";
|
|
@@ -630,6 +631,7 @@ const MEMORY_OS_PRESETS: Record<MemoryOsPresetName, Record<string, unknown>> = {
|
|
|
630
631
|
// memory on a conservative preset must set `procedural.enabled: true`
|
|
631
632
|
// explicitly.
|
|
632
633
|
procedural: { enabled: false },
|
|
634
|
+
recallNavigation: { enabled: false },
|
|
633
635
|
},
|
|
634
636
|
balanced: {
|
|
635
637
|
maxMemoryTokens: 2000,
|
|
@@ -1820,6 +1822,8 @@ export function parseConfig(
|
|
|
1820
1822
|
driftDetection: parseDriftDetectionConfig(cfg.driftDetection),
|
|
1821
1823
|
// Budgeted deep-recall surface (issue #2332)
|
|
1822
1824
|
deepRecall: parseDeepRecallConfig(cfg.deepRecall),
|
|
1825
|
+
// Session-scoped recall navigation (issue #1956)
|
|
1826
|
+
recallNavigation: parseRecallNavigationConfig(cfg.recallNavigation),
|
|
1823
1827
|
dependencyPropagation: parseDependencyPropagationConfig(cfg),
|
|
1824
1828
|
// Temporal Supersession (issue #375)
|
|
1825
1829
|
temporalSupersessionEnabled: cfg.temporalSupersessionEnabled !== false, // On by default
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { coerceBool, coerceNumber } from "./connectors/coerce.js";
|
|
14
|
+
import { EngramAccessInputError } from "./access-errors.js";
|
|
14
15
|
|
|
15
16
|
export interface DeepRecallConfig {
|
|
16
17
|
/** Master switch for the deep-recall surface. Default false. */
|
|
@@ -113,3 +114,34 @@ export function parseDeepRecallMaxSteps(raw: unknown): number | undefined {
|
|
|
113
114
|
}
|
|
114
115
|
throw new Error(`maxSteps must be a non-negative integer; got ${JSON.stringify(raw)}`);
|
|
115
116
|
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Resolve the effective per-invocation config from a caller-requested
|
|
120
|
+
* `maxSteps` override (§33 semantics, extracted from the access service so
|
|
121
|
+
* the god file stays under its ratchet cap):
|
|
122
|
+
* - undefined request keeps the parsed config untouched;
|
|
123
|
+
* - `deepRecall.maxSteps: 0` is a documented disable value — any positive
|
|
124
|
+
* override is a refusal, not a ceiling comparison;
|
|
125
|
+
* - otherwise the override must not exceed the configured ceiling.
|
|
126
|
+
*/
|
|
127
|
+
export function resolveEffectiveDeepRecallConfig(
|
|
128
|
+
cfg: DeepRecallConfig,
|
|
129
|
+
requestedSteps: number | undefined,
|
|
130
|
+
): DeepRecallConfig {
|
|
131
|
+
if (requestedSteps === undefined) return cfg;
|
|
132
|
+
if (typeof requestedSteps !== "number" || !Number.isInteger(requestedSteps) || requestedSteps < 0) {
|
|
133
|
+
throw new EngramAccessInputError("deepRecall: maxSteps must be a non-negative integer");
|
|
134
|
+
}
|
|
135
|
+
if (cfg.maxSteps <= 0) {
|
|
136
|
+
if (requestedSteps > 0) {
|
|
137
|
+
throw new EngramAccessInputError(
|
|
138
|
+
"deepRecall: the policy loop is disabled (deepRecall.maxSteps=0); maxSteps must be 0"
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
} else if (requestedSteps > cfg.maxSteps) {
|
|
142
|
+
throw new EngramAccessInputError(
|
|
143
|
+
`deepRecall: maxSteps ${requestedSteps} exceeds the configured ceiling ${cfg.maxSteps}`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
return { ...cfg, maxSteps: requestedSteps };
|
|
147
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1451,5 +1451,4 @@ export * from "./maintenance/atomic-file.js";
|
|
|
1451
1451
|
// Privacy-safe action-to-outcome trajectory eval (issue #2345)
|
|
1452
1452
|
export * from "./eval-trajectory.js";
|
|
1453
1453
|
export { MemoryControllerCoordinator, chooseAction, computeEvidenceReportHash, controllerConfigHash, evaluateActiveGates, hashControllerState, verifyEvidenceReport } from "./memory-controller.js";
|
|
1454
|
-
export type { ActiveContextAdapter, ActiveContextMessage, ActiveContextPlan, MemoryControllerActionFamily, MemoryControllerChoice, MemoryControllerConfig, MemoryControllerDeps, MemoryControllerEvent, MemoryControllerEvidence, MemoryControllerEvidenceReport, MemoryControllerExecutors, MemoryControllerMode, MemoryControllerPairedSeedEvidence, MemoryControllerReceipt, MemoryControllerRecorder, MemoryControllerReportReader, MemoryControllerRunResult, MemoryControllerState } from "./memory-controller.js";
|
|
1455
|
-
export * from "./recall-navigate.js";
|
|
1454
|
+
export type { ActiveContextAdapter, ActiveContextMessage, ActiveContextPlan, MemoryControllerActionFamily, MemoryControllerChoice, MemoryControllerConfig, MemoryControllerDeps, MemoryControllerEvent, MemoryControllerEvidence, MemoryControllerEvidenceReport, MemoryControllerExecutors, MemoryControllerMode, MemoryControllerPairedSeedEvidence, MemoryControllerReceipt, MemoryControllerRecorder, MemoryControllerReportReader, MemoryControllerRunResult, MemoryControllerState } from "./memory-controller.js"; export * from "./recall-navigate.js"; export * from "./recall-navigation.js"; export * from "./recall-navigation-config.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
import { parseLocalLlmConfig } from "./local-llm-config.js";
|
|
4
|
+
|
|
5
|
+
test("#2964: parseLocalLlmConfig round-trips a free-form localLlmHeaders key", () => {
|
|
6
|
+
const parsed = parseLocalLlmConfig(
|
|
7
|
+
{
|
|
8
|
+
localLlmHeaders: {
|
|
9
|
+
"X-Remnic-Canary": "alpha-9",
|
|
10
|
+
Authorization: "Bearer x",
|
|
11
|
+
drop: 1,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
undefined,
|
|
15
|
+
(value) => value,
|
|
16
|
+
);
|
|
17
|
+
assert.deepEqual(parsed.localLlmHeaders, {
|
|
18
|
+
"X-Remnic-Canary": "alpha-9",
|
|
19
|
+
Authorization: "Bearer x",
|
|
20
|
+
});
|
|
21
|
+
});
|
package/src/local-llm-config.ts
CHANGED
|
@@ -56,8 +56,7 @@ function parseLocalLlmMaxContext(value: unknown): number | undefined {
|
|
|
56
56
|
function copyStringRecord(value: unknown): Record<string, string> | undefined {
|
|
57
57
|
if (!value || typeof value !== "object" || Array.isArray(value)) return undefined;
|
|
58
58
|
const headers: Record<string, string> = {};
|
|
59
|
-
for (const key of Object.
|
|
60
|
-
const headerValue = Reflect.get(value, key);
|
|
59
|
+
for (const [key, headerValue] of Object.entries(value)) {
|
|
61
60
|
if (typeof headerValue === "string") headers[key] = headerValue;
|
|
62
61
|
}
|
|
63
62
|
return headers;
|
|
@@ -28,6 +28,8 @@ export const MCP_READ_ONLY_TOOL_SUFFIXES: Readonly<Record<string, true>> = {
|
|
|
28
28
|
meetings_list: true,
|
|
29
29
|
meetings_get: true,
|
|
30
30
|
deep_recall: true,
|
|
31
|
+
memory_expand: true,
|
|
32
|
+
memory_traverse: true,
|
|
31
33
|
standup: true,
|
|
32
34
|
action_confidence: true,
|
|
33
35
|
capsule_list: true,
|
|
@@ -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.
|
|
@@ -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
|
+
}
|