@remnic/core 9.3.613 → 9.3.614
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-cli.js +58 -57
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +4 -2
- package/dist/access-http.js +22 -22
- package/dist/access-mcp.d.ts +9 -2
- package/dist/access-mcp.js +19 -19
- package/dist/access-schema.d.ts +12 -12
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-D2J9dh_9.d.ts → access-service-DGG_2xPK.d.ts} +1 -1
- package/dist/access-service.d.ts +2 -2
- package/dist/access-service.js +16 -16
- package/dist/active-recall.js +20 -3
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/behavior-learner.js +2 -3
- package/dist/behavior-learner.js.map +1 -1
- package/dist/bootstrap.d.ts +1 -1
- package/dist/briefing.js +3 -3
- package/dist/buffer.d.ts +1 -1
- package/dist/buffer.js +1 -1
- package/dist/calibration.d.ts +5 -2
- package/dist/calibration.js +7 -5
- package/dist/calibration.js.map +1 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/causal-consolidation.d.ts +8 -2
- package/dist/causal-consolidation.js +13 -11
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/{chunk-3BP57I6J.js → chunk-2F6NP3NT.js} +2 -1
- package/dist/{chunk-3BP57I6J.js.map → chunk-2F6NP3NT.js.map} +1 -1
- package/dist/{chunk-AU7Q3LSC.js → chunk-2QSZNTDO.js} +4 -4
- package/dist/{chunk-HSVJGWYS.js → chunk-2ROPI5OE.js} +2 -2
- package/dist/{chunk-C4SQJZAF.js → chunk-2SGJY2UY.js} +6 -3
- package/dist/chunk-2SGJY2UY.js.map +1 -0
- package/dist/{chunk-ZDTVJXIP.js → chunk-3MAONBX3.js} +13 -5
- package/dist/chunk-3MAONBX3.js.map +1 -0
- package/dist/{chunk-G3Z3QEF5.js → chunk-3PY7VHV7.js} +2 -2
- package/dist/chunk-3PY7VHV7.js.map +1 -0
- package/dist/{chunk-CF3ZF2YU.js → chunk-3QSU4NFF.js} +3 -3
- package/dist/{chunk-AJA46VX5.js → chunk-3T74IZB3.js} +11 -2
- package/dist/chunk-3T74IZB3.js.map +1 -0
- package/dist/{chunk-KVEVLBKC.js → chunk-4HFJQCJZ.js} +13 -8
- package/dist/chunk-4HFJQCJZ.js.map +1 -0
- package/dist/{chunk-KGK2QKWL.js → chunk-4R4KTDIE.js} +1 -1
- package/dist/chunk-4R4KTDIE.js.map +1 -0
- package/dist/{chunk-OI27U2HT.js → chunk-5BTCT236.js} +2 -2
- package/dist/{chunk-CO7ZO4TU.js → chunk-5VDJMYTF.js} +2 -2
- package/dist/{chunk-BFBF3XEF.js → chunk-6BDVBBBY.js} +33 -25
- package/dist/{chunk-BFBF3XEF.js.map → chunk-6BDVBBBY.js.map} +1 -1
- package/dist/{chunk-EAZGEEG2.js → chunk-6L46YAEZ.js} +45 -9
- package/dist/chunk-6L46YAEZ.js.map +1 -0
- package/dist/{chunk-YFS5OEKO.js → chunk-7MLB4NCL.js} +2 -2
- package/dist/{chunk-IOTENEVL.js → chunk-7YQFWOF7.js} +57 -50
- package/dist/chunk-7YQFWOF7.js.map +1 -0
- package/dist/{chunk-2QANQKSQ.js → chunk-ADNZVFXG.js} +15 -15
- package/dist/{chunk-LZ3VEOU5.js → chunk-AL4RAJL5.js} +22 -5
- package/dist/chunk-AL4RAJL5.js.map +1 -0
- package/dist/{chunk-557IAFPD.js → chunk-APRRL26Q.js} +2 -2
- package/dist/{chunk-QDDHYAKV.js → chunk-AZDOWD2L.js} +2 -2
- package/dist/{chunk-TH67Q46T.js → chunk-B6FDZPCF.js} +17 -9
- package/dist/chunk-B6FDZPCF.js.map +1 -0
- package/dist/{chunk-MLT75J5S.js → chunk-B6SU7YSE.js} +3 -3
- package/dist/{chunk-FXKPZ3H6.js → chunk-BPSGLMQ4.js} +2 -2
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-NOMEVTUD.js → chunk-C6C7XVKG.js} +5 -4
- package/dist/chunk-C6C7XVKG.js.map +1 -0
- package/dist/{chunk-XKIQZXUB.js → chunk-CI7RKSRE.js} +7 -1
- package/dist/chunk-CI7RKSRE.js.map +1 -0
- package/dist/{chunk-IK34DVAC.js → chunk-CIOMS6DI.js} +2 -2
- package/dist/{chunk-2I5JGH3M.js → chunk-CYEPCZN5.js} +2 -2
- package/dist/{chunk-2I5JGH3M.js.map → chunk-CYEPCZN5.js.map} +1 -1
- package/dist/{chunk-JHMFYY7L.js → chunk-DCGT4FPP.js} +13 -5
- package/dist/chunk-DCGT4FPP.js.map +1 -0
- package/dist/{chunk-7DZRO2DC.js → chunk-DEPRLVLK.js} +2 -2
- package/dist/{chunk-CSKLPDN6.js → chunk-DEVUWMME.js} +52 -19
- package/dist/chunk-DEVUWMME.js.map +1 -0
- package/dist/{chunk-DHGSZ3UD.js → chunk-DGNQRNLL.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/chunk-FAV25DUZ.js +12 -0
- package/dist/chunk-FAV25DUZ.js.map +1 -0
- package/dist/{chunk-ETUPBUHB.js → chunk-GDASG7NC.js} +2 -2
- package/dist/{chunk-L227SKTB.js → chunk-GDB4J2H3.js} +17 -1
- package/dist/chunk-GDB4J2H3.js.map +1 -0
- package/dist/{chunk-IP73YCZP.js → chunk-GLPBYIXN.js} +4 -2
- package/dist/chunk-GLPBYIXN.js.map +1 -0
- package/dist/{chunk-4HP7HIE3.js → chunk-HP5FMB6L.js} +2 -2
- package/dist/{chunk-EVZFIAPG.js → chunk-IBTZEBUD.js} +23 -10
- package/dist/chunk-IBTZEBUD.js.map +1 -0
- package/dist/{chunk-DOX2CG6Y.js → chunk-IEUU7O4F.js} +2 -2
- package/dist/{chunk-JNANKJLN.js → chunk-JOASJWQR.js} +2 -2
- package/dist/chunk-JOASJWQR.js.map +1 -0
- package/dist/{chunk-WSGF57U2.js → chunk-JQDZQ4TB.js} +2 -2
- package/dist/{chunk-HINSGUA7.js → chunk-KBL3JJR6.js} +9 -13
- package/dist/chunk-KBL3JJR6.js.map +1 -0
- package/dist/{chunk-W7L6HXUC.js → chunk-LXOM6IQU.js} +2 -2
- package/dist/{chunk-G6R5UD3Q.js → chunk-MGN7VHWQ.js} +42 -1
- package/dist/{chunk-G6R5UD3Q.js.map → chunk-MGN7VHWQ.js.map} +1 -1
- package/dist/{chunk-DLJ4IR6M.js → chunk-MHQC2WU2.js} +2 -2
- package/dist/chunk-MHQC2WU2.js.map +1 -0
- package/dist/{chunk-6JGNHWCI.js → chunk-OBIRVF36.js} +3 -3
- package/dist/{chunk-CHCA44C3.js → chunk-ODPLEWB6.js} +3 -3
- package/dist/chunk-ODPLEWB6.js.map +1 -0
- package/dist/{chunk-HENLZHIT.js → chunk-OIF36KGD.js} +7 -4
- package/dist/chunk-OIF36KGD.js.map +1 -0
- package/dist/{chunk-GUPISBV2.js → chunk-PP2JH3GP.js} +2 -2
- package/dist/{chunk-OXJBNGBK.js → chunk-PSUB67YB.js} +2 -2
- package/dist/{chunk-UWY7GIVS.js → chunk-PYIFUBRK.js} +45 -13
- package/dist/chunk-PYIFUBRK.js.map +1 -0
- package/dist/{chunk-KIB7SDIJ.js → chunk-Q6YIJGXJ.js} +2 -2
- package/dist/{chunk-PPPZY2EU.js → chunk-QEMCQFDW.js} +2 -2
- package/dist/{chunk-ZT3EGNLR.js → chunk-QPD426WT.js} +2 -2
- package/dist/{chunk-RLV3PQGH.js → chunk-QVO4YOB7.js} +6 -6
- package/dist/{chunk-GMAG2HS4.js → chunk-RG3LBSGH.js} +46 -9
- package/dist/chunk-RG3LBSGH.js.map +1 -0
- package/dist/{chunk-XSWKORGM.js → chunk-S53OYO3F.js} +3 -1
- package/dist/chunk-S53OYO3F.js.map +1 -0
- package/dist/{chunk-YCN4BVDK.js → chunk-SCPFRKIT.js} +4 -2
- package/dist/chunk-SCPFRKIT.js.map +1 -0
- package/dist/{chunk-HJNQQICM.js → chunk-T5XWMMU2.js} +107 -50
- package/dist/chunk-T5XWMMU2.js.map +1 -0
- package/dist/{chunk-NZPF2SYV.js → chunk-T7N6KQGS.js} +138 -5
- package/dist/chunk-T7N6KQGS.js.map +1 -0
- package/dist/{chunk-VJXSUAO7.js → chunk-TNOWU6RP.js} +13 -10
- package/dist/chunk-TNOWU6RP.js.map +1 -0
- package/dist/{chunk-PCI747N2.js → chunk-TZVQQTG4.js} +48 -19
- package/dist/chunk-TZVQQTG4.js.map +1 -0
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-IK7DCC5H.js → chunk-VMGLYN42.js} +2 -2
- package/dist/{chunk-5RPTH6AU.js → chunk-VPGUMLBA.js} +8 -7
- package/dist/chunk-VPGUMLBA.js.map +1 -0
- package/dist/{chunk-KM2A35EO.js → chunk-WB3LYXC5.js} +11 -7
- package/dist/chunk-WB3LYXC5.js.map +1 -0
- package/dist/{chunk-NSKYFGDL.js → chunk-X4QQB7O6.js} +2 -2
- package/dist/{chunk-HPWVAEET.js → chunk-X6IRLNOO.js} +3 -7
- package/dist/chunk-X6IRLNOO.js.map +1 -0
- package/dist/{chunk-46GJIW5M.js → chunk-XAZOWLW4.js} +5 -5
- package/dist/{chunk-46GJIW5M.js.map → chunk-XAZOWLW4.js.map} +1 -1
- package/dist/{chunk-XPSVGJYA.js → chunk-YRMKDTKF.js} +12 -9
- package/dist/chunk-YRMKDTKF.js.map +1 -0
- package/dist/{chunk-6ZZP4EJF.js → chunk-ZJR7VG5L.js} +3 -3
- package/dist/{chunk-6ZZP4EJF.js.map → chunk-ZJR7VG5L.js.map} +1 -1
- package/dist/{cli-OrfKXNU4.d.ts → cli-DWeu7eTY.d.ts} +6 -2
- package/dist/cli.d.ts +3 -3
- package/dist/cli.js +60 -59
- package/dist/compounding/engine.js +3 -3
- package/dist/compounding/preference-consolidator.js +39 -11
- package/dist/compounding/preference-consolidator.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/connectors/codex-materialize-runner.js +3 -3
- package/dist/connectors/index.js +3 -3
- package/dist/consolidation-provenance-check.js +1 -1
- package/dist/contradiction/index.js +4 -4
- package/dist/conversation-index/backend.js +2 -2
- package/dist/conversation-index/indexer.js +1 -1
- package/dist/cross-namespace-budget.js +1 -1
- package/dist/enrichment/index.js +1 -1
- package/dist/entity-retrieval.js +3 -3
- package/dist/evals.js +1 -1
- package/dist/explicit-capture.d.ts +1 -1
- package/dist/extraction-judge.js +8 -1
- package/dist/extraction.js +2 -2
- package/dist/fallback-llm.d.ts +23 -6
- package/dist/fallback-llm.js +5 -3
- package/dist/{first-start-migration-GYJWIH36.js → first-start-migration-FF7YFGRP.js} +6 -6
- package/dist/index.d.ts +3 -3
- package/dist/index.js +94 -93
- package/dist/index.js.map +1 -1
- package/dist/lcm/archive.js +2 -2
- package/dist/lcm/engine.js +5 -5
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/summarizer.js +3 -3
- package/dist/maintenance/memory-governance-cron.d.ts +6 -4
- package/dist/maintenance/memory-governance-cron.js +1 -1
- package/dist/maintenance/memory-governance.js +3 -3
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
- package/dist/maintenance/rebuild-memory-projection.js +4 -4
- package/dist/mcp-memory-inspector-app.d.ts +2 -2
- package/dist/mcp-memory-inspector-app.js +1 -1
- package/dist/migrate/from-engram.js +1 -1
- package/dist/namespaces/migrate.js +16 -15
- package/dist/namespaces/search.js +12 -11
- package/dist/namespaces/storage.js +3 -3
- package/dist/network/webdav.d.ts +2 -0
- package/dist/network/webdav.js +1 -1
- package/dist/objective-state-writers.js +2 -2
- package/dist/operator-toolkit.d.ts +3 -1
- package/dist/operator-toolkit.js +21 -20
- package/dist/{orchestrator-DTRQG75J.d.ts → orchestrator-CqWOjfgl.d.ts} +46 -3
- package/dist/orchestrator.d.ts +1 -1
- package/dist/orchestrator.js +47 -44
- package/dist/patterns-cli.js +1 -1
- package/dist/qmd-recall-cache.d.ts +2 -0
- package/dist/qmd-recall-cache.js +1 -1
- package/dist/qmd.d.ts +37 -2
- package/dist/qmd.js +4 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-planner-llm.d.ts +57 -0
- package/dist/recall-planner-llm.js +167 -0
- package/dist/recall-planner-llm.js.map +1 -0
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.js +2 -2
- package/dist/resume-bundles.js +2 -2
- package/dist/retrieval-agents.js +2 -2
- package/dist/routing/store.js +1 -1
- package/dist/schemas.d.ts +22 -22
- package/dist/search/factory.js +11 -10
- package/dist/search/index.js +11 -10
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +3 -2
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +3 -2
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/noop-backend.js +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +3 -2
- package/dist/search/port.d.ts +6 -1
- package/dist/search/port.js +7 -0
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/search/remote-backend.js +1 -1
- package/dist/semantic-consolidation.js +4 -4
- package/dist/semantic-rule-promotion.js +3 -3
- package/dist/semantic-rule-verifier.js +3 -3
- package/dist/session-observer-state.js +1 -1
- package/dist/storage.js +2 -2
- package/dist/summarizer.js +2 -2
- package/dist/temporal-index.js +1 -1
- package/dist/{tier-stats-SKML2OSF.js → tier-stats-3LYQ3VV5.js} +3 -3
- 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-sqlite.js +1 -1
- package/dist/transfer/types.d.ts +12 -12
- package/dist/types.d.ts +32 -0
- package/dist/types.js +1 -1
- package/dist/utility-learner.js +1 -1
- package/dist/utility-runtime.js +2 -2
- package/dist/verified-recall.js +3 -3
- package/dist/work/board.js +2 -2
- package/dist/work/storage.d.ts +2 -0
- package/dist/work/storage.js +1 -1
- package/package.json +1 -1
- package/src/access-http.ts +3 -0
- package/src/access-mcp.test.ts +51 -0
- package/src/access-mcp.ts +26 -5
- package/src/active-recall.test.ts +40 -0
- package/src/active-recall.ts +19 -2
- package/src/behavior-learner.ts +5 -3
- package/src/buffer-session.test.ts +58 -0
- package/src/buffer-surprise-trigger.test.ts +4 -18
- package/src/buffer.ts +39 -11
- package/src/calibration.ts +10 -4
- package/src/causal-consolidation.test.ts +47 -2
- package/src/causal-consolidation.ts +13 -9
- package/src/cli.ts +19 -4
- package/src/compounding/engine.ts +2 -0
- package/src/compounding/preference-consolidator.test.ts +292 -0
- package/src/compounding/preference-consolidator.ts +55 -19
- package/src/config.test.ts +213 -0
- package/src/config.ts +175 -4
- package/src/connectors/codex-materialize-runner.ts +7 -4
- package/src/consolidation-provenance-check.ts +24 -5
- package/src/conversation-index/indexer.test.ts +22 -0
- package/src/conversation-index/indexer.ts +7 -3
- package/src/cross-namespace-budget.test.ts +44 -21
- package/src/cross-namespace-budget.ts +2 -2
- package/src/enrichment/pipeline.ts +11 -16
- package/src/evals.ts +1 -1
- package/src/extraction-judge-chain.test.ts +55 -0
- package/src/extraction-judge.ts +7 -9
- package/src/extraction.ts +16 -5
- package/src/fallback-llm.test.ts +600 -1
- package/src/fallback-llm.ts +91 -22
- package/src/maintenance/memory-governance-cron.ts +39 -29
- package/src/mcp-memory-inspector-app.ts +54 -12
- package/src/message-parts/index.ts +6 -0
- package/src/message-parts/message-parts.test.ts +30 -0
- package/src/migrate/from-engram.ts +19 -5
- package/src/namespaces/search.test.ts +15 -2
- package/src/namespaces/search.ts +1 -1
- package/src/network/webdav.ts +61 -21
- package/src/operator-toolkit.ts +6 -2
- package/src/orchestrator.ts +173 -20
- package/src/qmd-client.test.ts +85 -0
- package/src/qmd-recall-cache.test.ts +16 -0
- package/src/qmd-recall-cache.ts +7 -0
- package/src/qmd.test.ts +54 -0
- package/src/qmd.ts +119 -19
- package/src/recall-planner-llm.test.ts +224 -0
- package/src/recall-planner-llm.ts +289 -0
- package/src/routing/store.ts +4 -8
- package/src/search/factory.ts +3 -0
- package/src/search/lancedb-backend.ts +15 -3
- package/src/search/meilisearch-backend.ts +70 -7
- package/src/search/noop-backend.ts +5 -1
- package/src/search/orama-backend.ts +15 -3
- package/src/search/port.ts +15 -0
- package/src/search/remote-backend.ts +5 -1
- package/src/session-observer-state.ts +1 -1
- package/src/summarizer.ts +3 -3
- package/src/temporal-index.test.ts +18 -0
- package/src/temporal-index.ts +45 -0
- package/src/training-export/cli-date-validation.test.ts +36 -0
- package/src/training-export/date-parse.ts +21 -2
- package/src/transfer/export-sqlite.ts +3 -0
- package/src/types.ts +35 -0
- package/src/utility-learner.ts +1 -0
- package/src/work/storage.ts +23 -0
- package/dist/chunk-5RPTH6AU.js.map +0 -1
- package/dist/chunk-AJA46VX5.js.map +0 -1
- package/dist/chunk-C4SQJZAF.js.map +0 -1
- package/dist/chunk-CHCA44C3.js.map +0 -1
- package/dist/chunk-CSKLPDN6.js.map +0 -1
- package/dist/chunk-DLJ4IR6M.js.map +0 -1
- package/dist/chunk-EAZGEEG2.js.map +0 -1
- package/dist/chunk-EVZFIAPG.js.map +0 -1
- package/dist/chunk-G3Z3QEF5.js.map +0 -1
- package/dist/chunk-GMAG2HS4.js.map +0 -1
- package/dist/chunk-HENLZHIT.js.map +0 -1
- package/dist/chunk-HINSGUA7.js.map +0 -1
- package/dist/chunk-HJNQQICM.js.map +0 -1
- package/dist/chunk-HPWVAEET.js.map +0 -1
- package/dist/chunk-IOTENEVL.js.map +0 -1
- package/dist/chunk-IP73YCZP.js.map +0 -1
- package/dist/chunk-JHMFYY7L.js.map +0 -1
- package/dist/chunk-JNANKJLN.js.map +0 -1
- package/dist/chunk-KGK2QKWL.js.map +0 -1
- package/dist/chunk-KM2A35EO.js.map +0 -1
- package/dist/chunk-KVEVLBKC.js.map +0 -1
- package/dist/chunk-L227SKTB.js.map +0 -1
- package/dist/chunk-LZ3VEOU5.js.map +0 -1
- package/dist/chunk-NOMEVTUD.js.map +0 -1
- package/dist/chunk-NZPF2SYV.js.map +0 -1
- package/dist/chunk-PCI747N2.js.map +0 -1
- package/dist/chunk-TH67Q46T.js.map +0 -1
- package/dist/chunk-UWY7GIVS.js.map +0 -1
- package/dist/chunk-VJXSUAO7.js.map +0 -1
- package/dist/chunk-XKIQZXUB.js.map +0 -1
- package/dist/chunk-XPSVGJYA.js.map +0 -1
- package/dist/chunk-XSWKORGM.js.map +0 -1
- package/dist/chunk-YCN4BVDK.js.map +0 -1
- package/dist/chunk-ZDTVJXIP.js.map +0 -1
- /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{chunk-AU7Q3LSC.js.map → chunk-2QSZNTDO.js.map} +0 -0
- /package/dist/{chunk-HSVJGWYS.js.map → chunk-2ROPI5OE.js.map} +0 -0
- /package/dist/{chunk-CF3ZF2YU.js.map → chunk-3QSU4NFF.js.map} +0 -0
- /package/dist/{chunk-OI27U2HT.js.map → chunk-5BTCT236.js.map} +0 -0
- /package/dist/{chunk-CO7ZO4TU.js.map → chunk-5VDJMYTF.js.map} +0 -0
- /package/dist/{chunk-YFS5OEKO.js.map → chunk-7MLB4NCL.js.map} +0 -0
- /package/dist/{chunk-2QANQKSQ.js.map → chunk-ADNZVFXG.js.map} +0 -0
- /package/dist/{chunk-557IAFPD.js.map → chunk-APRRL26Q.js.map} +0 -0
- /package/dist/{chunk-QDDHYAKV.js.map → chunk-AZDOWD2L.js.map} +0 -0
- /package/dist/{chunk-MLT75J5S.js.map → chunk-B6SU7YSE.js.map} +0 -0
- /package/dist/{chunk-FXKPZ3H6.js.map → chunk-BPSGLMQ4.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-IK34DVAC.js.map → chunk-CIOMS6DI.js.map} +0 -0
- /package/dist/{chunk-7DZRO2DC.js.map → chunk-DEPRLVLK.js.map} +0 -0
- /package/dist/{chunk-DHGSZ3UD.js.map → chunk-DGNQRNLL.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-ETUPBUHB.js.map → chunk-GDASG7NC.js.map} +0 -0
- /package/dist/{chunk-4HP7HIE3.js.map → chunk-HP5FMB6L.js.map} +0 -0
- /package/dist/{chunk-DOX2CG6Y.js.map → chunk-IEUU7O4F.js.map} +0 -0
- /package/dist/{chunk-WSGF57U2.js.map → chunk-JQDZQ4TB.js.map} +0 -0
- /package/dist/{chunk-W7L6HXUC.js.map → chunk-LXOM6IQU.js.map} +0 -0
- /package/dist/{chunk-6JGNHWCI.js.map → chunk-OBIRVF36.js.map} +0 -0
- /package/dist/{chunk-GUPISBV2.js.map → chunk-PP2JH3GP.js.map} +0 -0
- /package/dist/{chunk-OXJBNGBK.js.map → chunk-PSUB67YB.js.map} +0 -0
- /package/dist/{chunk-KIB7SDIJ.js.map → chunk-Q6YIJGXJ.js.map} +0 -0
- /package/dist/{chunk-PPPZY2EU.js.map → chunk-QEMCQFDW.js.map} +0 -0
- /package/dist/{chunk-ZT3EGNLR.js.map → chunk-QPD426WT.js.map} +0 -0
- /package/dist/{chunk-RLV3PQGH.js.map → chunk-QVO4YOB7.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-IK7DCC5H.js.map → chunk-VMGLYN42.js.map} +0 -0
- /package/dist/{chunk-NSKYFGDL.js.map → chunk-X4QQB7O6.js.map} +0 -0
- /package/dist/{first-start-migration-GYJWIH36.js.map → first-start-migration-FF7YFGRP.js.map} +0 -0
- /package/dist/{tier-stats-SKML2OSF.js.map → tier-stats-3LYQ3VV5.js.map} +0 -0
package/dist/transfer/types.d.ts
CHANGED
|
@@ -313,13 +313,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
|
|
|
313
313
|
peerProfiles: boolean;
|
|
314
314
|
}>;
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
|
+
schemaVersion: string;
|
|
316
317
|
includes: {
|
|
317
318
|
procedural: boolean;
|
|
318
319
|
taxonomy: boolean;
|
|
319
320
|
identityAnchors: boolean;
|
|
320
321
|
peerProfiles: boolean;
|
|
321
322
|
};
|
|
322
|
-
schemaVersion: string;
|
|
323
323
|
id: string;
|
|
324
324
|
description: string;
|
|
325
325
|
version: string;
|
|
@@ -334,13 +334,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
|
|
|
334
334
|
directAnswerEnabled: boolean;
|
|
335
335
|
};
|
|
336
336
|
}, {
|
|
337
|
+
schemaVersion: string;
|
|
337
338
|
includes: {
|
|
338
339
|
procedural: boolean;
|
|
339
340
|
taxonomy: boolean;
|
|
340
341
|
identityAnchors: boolean;
|
|
341
342
|
peerProfiles: boolean;
|
|
342
343
|
};
|
|
343
|
-
schemaVersion: string;
|
|
344
344
|
id: string;
|
|
345
345
|
description: string;
|
|
346
346
|
version: string;
|
|
@@ -464,13 +464,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
464
464
|
peerProfiles: boolean;
|
|
465
465
|
}>;
|
|
466
466
|
}, "strip", z.ZodTypeAny, {
|
|
467
|
+
schemaVersion: string;
|
|
467
468
|
includes: {
|
|
468
469
|
procedural: boolean;
|
|
469
470
|
taxonomy: boolean;
|
|
470
471
|
identityAnchors: boolean;
|
|
471
472
|
peerProfiles: boolean;
|
|
472
473
|
};
|
|
473
|
-
schemaVersion: string;
|
|
474
474
|
id: string;
|
|
475
475
|
description: string;
|
|
476
476
|
version: string;
|
|
@@ -485,13 +485,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
485
485
|
directAnswerEnabled: boolean;
|
|
486
486
|
};
|
|
487
487
|
}, {
|
|
488
|
+
schemaVersion: string;
|
|
488
489
|
includes: {
|
|
489
490
|
procedural: boolean;
|
|
490
491
|
taxonomy: boolean;
|
|
491
492
|
identityAnchors: boolean;
|
|
492
493
|
peerProfiles: boolean;
|
|
493
494
|
};
|
|
494
|
-
schemaVersion: string;
|
|
495
495
|
id: string;
|
|
496
496
|
description: string;
|
|
497
497
|
version: string;
|
|
@@ -518,13 +518,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
518
518
|
pluginVersion: string;
|
|
519
519
|
includesTranscripts: boolean;
|
|
520
520
|
capsule: {
|
|
521
|
+
schemaVersion: string;
|
|
521
522
|
includes: {
|
|
522
523
|
procedural: boolean;
|
|
523
524
|
taxonomy: boolean;
|
|
524
525
|
identityAnchors: boolean;
|
|
525
526
|
peerProfiles: boolean;
|
|
526
527
|
};
|
|
527
|
-
schemaVersion: string;
|
|
528
528
|
id: string;
|
|
529
529
|
description: string;
|
|
530
530
|
version: string;
|
|
@@ -551,13 +551,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
551
551
|
pluginVersion: string;
|
|
552
552
|
includesTranscripts: boolean;
|
|
553
553
|
capsule: {
|
|
554
|
+
schemaVersion: string;
|
|
554
555
|
includes: {
|
|
555
556
|
procedural: boolean;
|
|
556
557
|
taxonomy: boolean;
|
|
557
558
|
identityAnchors: boolean;
|
|
558
559
|
peerProfiles: boolean;
|
|
559
560
|
};
|
|
560
|
-
schemaVersion: string;
|
|
561
561
|
id: string;
|
|
562
562
|
description: string;
|
|
563
563
|
version: string;
|
|
@@ -683,13 +683,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
683
683
|
peerProfiles: boolean;
|
|
684
684
|
}>;
|
|
685
685
|
}, "strip", z.ZodTypeAny, {
|
|
686
|
+
schemaVersion: string;
|
|
686
687
|
includes: {
|
|
687
688
|
procedural: boolean;
|
|
688
689
|
taxonomy: boolean;
|
|
689
690
|
identityAnchors: boolean;
|
|
690
691
|
peerProfiles: boolean;
|
|
691
692
|
};
|
|
692
|
-
schemaVersion: string;
|
|
693
693
|
id: string;
|
|
694
694
|
description: string;
|
|
695
695
|
version: string;
|
|
@@ -704,13 +704,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
704
704
|
directAnswerEnabled: boolean;
|
|
705
705
|
};
|
|
706
706
|
}, {
|
|
707
|
+
schemaVersion: string;
|
|
707
708
|
includes: {
|
|
708
709
|
procedural: boolean;
|
|
709
710
|
taxonomy: boolean;
|
|
710
711
|
identityAnchors: boolean;
|
|
711
712
|
peerProfiles: boolean;
|
|
712
713
|
};
|
|
713
|
-
schemaVersion: string;
|
|
714
714
|
id: string;
|
|
715
715
|
description: string;
|
|
716
716
|
version: string;
|
|
@@ -737,13 +737,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
737
737
|
pluginVersion: string;
|
|
738
738
|
includesTranscripts: boolean;
|
|
739
739
|
capsule: {
|
|
740
|
+
schemaVersion: string;
|
|
740
741
|
includes: {
|
|
741
742
|
procedural: boolean;
|
|
742
743
|
taxonomy: boolean;
|
|
743
744
|
identityAnchors: boolean;
|
|
744
745
|
peerProfiles: boolean;
|
|
745
746
|
};
|
|
746
|
-
schemaVersion: string;
|
|
747
747
|
id: string;
|
|
748
748
|
description: string;
|
|
749
749
|
version: string;
|
|
@@ -770,13 +770,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
770
770
|
pluginVersion: string;
|
|
771
771
|
includesTranscripts: boolean;
|
|
772
772
|
capsule: {
|
|
773
|
+
schemaVersion: string;
|
|
773
774
|
includes: {
|
|
774
775
|
procedural: boolean;
|
|
775
776
|
taxonomy: boolean;
|
|
776
777
|
identityAnchors: boolean;
|
|
777
778
|
peerProfiles: boolean;
|
|
778
779
|
};
|
|
779
|
-
schemaVersion: string;
|
|
780
780
|
id: string;
|
|
781
781
|
description: string;
|
|
782
782
|
version: string;
|
|
@@ -815,13 +815,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
815
815
|
pluginVersion: string;
|
|
816
816
|
includesTranscripts: boolean;
|
|
817
817
|
capsule: {
|
|
818
|
+
schemaVersion: string;
|
|
818
819
|
includes: {
|
|
819
820
|
procedural: boolean;
|
|
820
821
|
taxonomy: boolean;
|
|
821
822
|
identityAnchors: boolean;
|
|
822
823
|
peerProfiles: boolean;
|
|
823
824
|
};
|
|
824
|
-
schemaVersion: string;
|
|
825
825
|
id: string;
|
|
826
826
|
description: string;
|
|
827
827
|
version: string;
|
|
@@ -854,13 +854,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
854
854
|
pluginVersion: string;
|
|
855
855
|
includesTranscripts: boolean;
|
|
856
856
|
capsule: {
|
|
857
|
+
schemaVersion: string;
|
|
857
858
|
includes: {
|
|
858
859
|
procedural: boolean;
|
|
859
860
|
taxonomy: boolean;
|
|
860
861
|
identityAnchors: boolean;
|
|
861
862
|
peerProfiles: boolean;
|
|
862
863
|
};
|
|
863
|
-
schemaVersion: string;
|
|
864
864
|
id: string;
|
|
865
865
|
description: string;
|
|
866
866
|
version: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -564,6 +564,9 @@ interface PluginConfig {
|
|
|
564
564
|
qmdChunkStrategy: "auto" | "regex";
|
|
565
565
|
qmdCandidateLimit?: number;
|
|
566
566
|
qmdQueryRerankEnabled: boolean;
|
|
567
|
+
qmdSearchStrategy: "hybrid" | "lex-vec" | "lex";
|
|
568
|
+
qmdSubprocessStrategy: "query" | "search";
|
|
569
|
+
qmdDaemonTimeoutMs: number;
|
|
567
570
|
qmdIndexName?: string;
|
|
568
571
|
qmdForceCpu: boolean;
|
|
569
572
|
qmdGpuBackend?: "auto" | "metal" | "cuda" | "vulkan" | "false";
|
|
@@ -1217,6 +1220,18 @@ interface PluginConfig {
|
|
|
1217
1220
|
modelSource: "plugin" | "gateway";
|
|
1218
1221
|
gatewayAgentId: string;
|
|
1219
1222
|
fastGatewayAgentId: string;
|
|
1223
|
+
/**
|
|
1224
|
+
* Optional task-specific model chain for Remnic's background LLM work —
|
|
1225
|
+
* extraction, the extraction judge, fact/profile/identity consolidation,
|
|
1226
|
+
* summarization, semantic consolidation, calibration, and causal
|
|
1227
|
+
* consolidation. When set, this chain is resolved through gateway providers
|
|
1228
|
+
* instead of using gatewayAgentId or agents.defaults.model. All task paths
|
|
1229
|
+
* route through the shared `gatewayTaskChainOptions` helper.
|
|
1230
|
+
*
|
|
1231
|
+
* Only takes effect when `modelSource: "gateway"`; ignored (with a startup
|
|
1232
|
+
* warning) under `modelSource: "plugin"`. See issue #1365 / PR #1370.
|
|
1233
|
+
*/
|
|
1234
|
+
taskModelChain?: AgentPersonaModelConfig;
|
|
1220
1235
|
namespacesEnabled: boolean;
|
|
1221
1236
|
defaultNamespace: string;
|
|
1222
1237
|
sharedNamespace: string;
|
|
@@ -1378,6 +1393,15 @@ interface PluginConfig {
|
|
|
1378
1393
|
behaviorLoopMaxDeltaPerCycle: number;
|
|
1379
1394
|
behaviorLoopProtectedParams: string[];
|
|
1380
1395
|
recallPlannerEnabled: boolean;
|
|
1396
|
+
/**
|
|
1397
|
+
* Opt-in gate for LLM-based recall planning (issue #1367 / Option C). When
|
|
1398
|
+
* false (the default) recall mode is decided by the regex heuristic
|
|
1399
|
+
* `planRecallMode()`. When true, the planner consults an LLM (routed through
|
|
1400
|
+
* the gateway/fallback chain — provider-agnostic) and falls back to the
|
|
1401
|
+
* heuristic on timeout/error/unavailable. `recallPlannerShadowMode` runs the
|
|
1402
|
+
* LLM for telemetry only without changing the effective mode.
|
|
1403
|
+
*/
|
|
1404
|
+
recallPlannerLlmEnabled: boolean;
|
|
1381
1405
|
recallPlannerModel: string;
|
|
1382
1406
|
recallPlannerTimeoutMs: number;
|
|
1383
1407
|
recallPlannerUseResponsesApi: boolean;
|
|
@@ -1631,6 +1655,14 @@ interface PluginConfig {
|
|
|
1631
1655
|
binaryLifecycleBackendType: "filesystem" | "s3" | "none";
|
|
1632
1656
|
/** Base path for the filesystem backend. Required when backendType is "filesystem". */
|
|
1633
1657
|
binaryLifecycleBackendPath: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* Advertise legacy `engram_*` / `engram.*` MCP tool aliases alongside the
|
|
1660
|
+
* canonical `remnic_*` names (issue #1427). Default true for backward
|
|
1661
|
+
* compatibility. Set false to halve the advertised MCP `tools/list` surface;
|
|
1662
|
+
* tools stay callable under both names regardless. Also settable via
|
|
1663
|
+
* `REMNIC_EMIT_LEGACY_TOOLS` (falls back to `ENGRAM_EMIT_LEGACY_TOOLS`).
|
|
1664
|
+
*/
|
|
1665
|
+
emitLegacyTools: boolean;
|
|
1634
1666
|
/** Enable oai-mem-citation blocks in recall responses. Default false. */
|
|
1635
1667
|
citationsEnabled: boolean;
|
|
1636
1668
|
/** Auto-enable citations when the Codex adapter is detected. Default true. */
|
package/dist/types.js
CHANGED
package/dist/utility-learner.js
CHANGED
package/dist/utility-runtime.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
applyUtilityPromotionRuntimePolicy,
|
|
3
3
|
applyUtilityRankingRuntimeDelta,
|
|
4
4
|
loadUtilityRuntimeValues
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-LXOM6IQU.js";
|
|
6
|
+
import "./chunk-2F6NP3NT.js";
|
|
7
7
|
import "./chunk-TERNBNJB.js";
|
|
8
8
|
import "./chunk-TBBDFYXW.js";
|
|
9
9
|
import "./chunk-A2IYSXDQ.js";
|
package/dist/verified-recall.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchVerifiedEpisodes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QPD426WT.js";
|
|
4
4
|
import "./chunk-HQ6NIBL6.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-7MLB4NCL.js";
|
|
6
6
|
import "./chunk-5UZXUTVO.js";
|
|
7
7
|
import "./chunk-4H5ZJHEN.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-4R4KTDIE.js";
|
|
9
9
|
import "./chunk-RULE4VG5.js";
|
|
10
10
|
import "./chunk-SCU65EZI.js";
|
|
11
11
|
import "./chunk-KILOTVIF.js";
|
package/dist/work/board.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
exportWorkBoardMarkdown,
|
|
3
3
|
exportWorkBoardSnapshot,
|
|
4
4
|
importWorkBoardSnapshot
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-GDASG7NC.js";
|
|
6
|
+
import "../chunk-GDB4J2H3.js";
|
|
7
7
|
import "../chunk-5UZXUTVO.js";
|
|
8
8
|
import "../chunk-PZ5AY32C.js";
|
|
9
9
|
export {
|
package/dist/work/storage.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare class WorkStorage {
|
|
|
16
16
|
private writeNewProject;
|
|
17
17
|
private writeProjectRecord;
|
|
18
18
|
private enqueueProjectMutation;
|
|
19
|
+
private enqueueTaskMutation;
|
|
19
20
|
private parseTask;
|
|
20
21
|
private parseProject;
|
|
21
22
|
createTask(input: CreateWorkTaskInput, now?: Date): Promise<WorkTask>;
|
|
@@ -24,6 +25,7 @@ declare class WorkStorage {
|
|
|
24
25
|
updateTask(id: string, patch: UpdateWorkTaskInput, now?: Date, options?: {
|
|
25
26
|
skipStatusTransitionValidation?: boolean;
|
|
26
27
|
}): Promise<WorkTask | null>;
|
|
28
|
+
private updateTaskUnlocked;
|
|
27
29
|
transitionTask(id: string, nextStatus: WorkTaskStatus, now?: Date): Promise<WorkTask>;
|
|
28
30
|
deleteTask(id: string): Promise<boolean>;
|
|
29
31
|
createProject(input: CreateWorkProjectInput, now?: Date): Promise<WorkProject>;
|
package/dist/work/storage.js
CHANGED
package/package.json
CHANGED
package/src/access-http.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface EngramAccessHttpServerOptions {
|
|
|
49
49
|
citationsEnabled?: boolean;
|
|
50
50
|
/** Auto-enable citations for Codex adapter connections (issue #379). */
|
|
51
51
|
citationsAutoDetect?: boolean;
|
|
52
|
+
/** Advertise legacy engram.* tool aliases on tools/list (issue #1427). Default true. */
|
|
53
|
+
emitLegacyTools?: boolean;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export interface EngramAccessHttpServerStatus {
|
|
@@ -247,6 +249,7 @@ export class EngramAccessHttpServer {
|
|
|
247
249
|
principal: options.principal,
|
|
248
250
|
citationsEnabled: options.citationsEnabled,
|
|
249
251
|
citationsAutoDetect: options.citationsAutoDetect,
|
|
252
|
+
emitLegacyTools: options.emitLegacyTools,
|
|
250
253
|
});
|
|
251
254
|
}
|
|
252
255
|
|
package/src/access-mcp.test.ts
CHANGED
|
@@ -721,3 +721,54 @@ test("MCP profiling report rejects invalid argument types before dispatch", asyn
|
|
|
721
721
|
assert.equal((badFormat as Record<string, unknown> & { result?: { isError?: boolean } }).result?.isError, true);
|
|
722
722
|
assert.equal((badLimit as Record<string, unknown> & { result?: { isError?: boolean } }).result?.isError, true);
|
|
723
723
|
});
|
|
724
|
+
|
|
725
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
726
|
+
// Issue #1427: opt-out of legacy engram.* tool aliases on tools/list
|
|
727
|
+
// ──────────────────────────────────────────────────────────────────────────
|
|
728
|
+
|
|
729
|
+
function listToolNames(response: unknown): string[] {
|
|
730
|
+
const tools = (response as { result?: { tools?: Array<{ name: string }> } }).result?.tools ?? [];
|
|
731
|
+
return tools.map((t) => t.name);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
const TOOLS_LIST_REQUEST = { jsonrpc: "2.0", id: 1, method: "tools/list", params: {} };
|
|
735
|
+
|
|
736
|
+
test("tools/list advertises both remnic.* and engram.* by default (back-compat)", async () => {
|
|
737
|
+
const server = new EngramMcpServer(makeMockService());
|
|
738
|
+
const names = listToolNames(await server.handleRequest(TOOLS_LIST_REQUEST));
|
|
739
|
+
assert.ok(names.includes("remnic.recall"), "canonical name present");
|
|
740
|
+
assert.ok(names.includes("engram.recall"), "legacy alias present by default");
|
|
741
|
+
const legacyCount = names.filter((n) => n.startsWith("engram.")).length;
|
|
742
|
+
assert.ok(legacyCount > 0, "legacy aliases advertised by default");
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
test("tools/list omits engram.* aliases when emitLegacyTools is false", async () => {
|
|
746
|
+
const server = new EngramMcpServer(makeMockService(), { emitLegacyTools: false });
|
|
747
|
+
const names = listToolNames(await server.handleRequest(TOOLS_LIST_REQUEST));
|
|
748
|
+
assert.ok(names.includes("remnic.recall"), "canonical name still present");
|
|
749
|
+
assert.equal(
|
|
750
|
+
names.filter((n) => n.startsWith("engram.")).length,
|
|
751
|
+
0,
|
|
752
|
+
"no engram.* aliases advertised when opted out",
|
|
753
|
+
);
|
|
754
|
+
// Every advertised tool uses the canonical prefix; the surface is halved.
|
|
755
|
+
assert.ok(names.every((n) => n.startsWith("remnic.")), "all advertised tools are canonical");
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
test("emitLegacyTools=false still allows calling tools under BOTH names (advertising-only opt-out)", async () => {
|
|
759
|
+
const server = new EngramMcpServer(makeMockService(), { emitLegacyTools: false });
|
|
760
|
+
// Canonical call works.
|
|
761
|
+
const canonical = await server.handleRequest(makeToolRequest("remnic.recall", { query: "hello" }));
|
|
762
|
+
assert.notEqual(
|
|
763
|
+
(canonical as { result?: { isError?: boolean } }).result?.isError,
|
|
764
|
+
true,
|
|
765
|
+
"canonical remnic.recall call succeeds",
|
|
766
|
+
);
|
|
767
|
+
// Legacy call still dispatches even though it is no longer advertised.
|
|
768
|
+
const legacy = await server.handleRequest(makeToolRequest("engram.recall", { query: "hello" }));
|
|
769
|
+
assert.notEqual(
|
|
770
|
+
(legacy as { result?: { isError?: boolean } }).result?.isError,
|
|
771
|
+
true,
|
|
772
|
+
"legacy engram.recall call still works (callability preserved)",
|
|
773
|
+
);
|
|
774
|
+
});
|
package/src/access-mcp.ts
CHANGED
|
@@ -81,11 +81,15 @@ function toLegacyToolName(name: string): string {
|
|
|
81
81
|
: name;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
function withToolAliases(tool: McpTool): McpTool[] {
|
|
84
|
+
function withToolAliases(tool: McpTool, emitLegacyTools = true): McpTool[] {
|
|
85
85
|
const canonicalName = toCanonicalToolName(tool.name);
|
|
86
86
|
const canonicalTool = canonicalName === tool.name ? tool : { ...tool, name: canonicalName };
|
|
87
87
|
if (canonicalName === tool.name) return [canonicalTool];
|
|
88
|
-
|
|
88
|
+
// Issue #1427: when legacy aliases are opted out, advertise only the
|
|
89
|
+
// canonical `remnic.*` name and drop the `engram.*` duplicate. Tool *calls*
|
|
90
|
+
// still accept both names (the dispatch canonicalizes), so suppressing the
|
|
91
|
+
// alias only trims `tools/list`, not callability.
|
|
92
|
+
return emitLegacyTools ? [canonicalTool, tool] : [canonicalTool];
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
function resolveChatGptInspectorRecallSessionKey(
|
|
@@ -212,13 +216,25 @@ export class EngramMcpServer {
|
|
|
212
216
|
private readonly citationsEnabled: boolean;
|
|
213
217
|
/** Whether to auto-enable citations for Codex adapter connections. */
|
|
214
218
|
private readonly citationsAutoDetect: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* Whether to advertise legacy `engram.*` tool aliases alongside the canonical
|
|
221
|
+
* `remnic.*` names (issue #1427). Defaults to true for backward compatibility;
|
|
222
|
+
* set false to halve the advertised `tools/list` surface.
|
|
223
|
+
*/
|
|
224
|
+
private readonly emitLegacyTools: boolean;
|
|
215
225
|
|
|
216
226
|
constructor(
|
|
217
227
|
private readonly service: EngramAccessService,
|
|
218
|
-
options: {
|
|
228
|
+
options: {
|
|
229
|
+
principal?: string;
|
|
230
|
+
citationsEnabled?: boolean;
|
|
231
|
+
citationsAutoDetect?: boolean;
|
|
232
|
+
emitLegacyTools?: boolean;
|
|
233
|
+
} = {},
|
|
219
234
|
) {
|
|
220
235
|
this.citationsEnabled = options.citationsEnabled === true;
|
|
221
236
|
this.citationsAutoDetect = options.citationsAutoDetect !== false;
|
|
237
|
+
this.emitLegacyTools = options.emitLegacyTools !== false;
|
|
222
238
|
this.authenticatedPrincipal =
|
|
223
239
|
options.principal?.trim() ||
|
|
224
240
|
readEnvVar("OPENCLAW_ENGRAM_ACCESS_PRINCIPAL")?.trim() ||
|
|
@@ -1703,7 +1719,7 @@ export class EngramMcpServer {
|
|
|
1703
1719
|
additionalProperties: false,
|
|
1704
1720
|
},
|
|
1705
1721
|
},
|
|
1706
|
-
].flatMap((tool) => withToolAliases(tool));
|
|
1722
|
+
].flatMap((tool) => withToolAliases(tool, this.emitLegacyTools));
|
|
1707
1723
|
}
|
|
1708
1724
|
|
|
1709
1725
|
/** Get clientInfo for a specific MCP session. Returns undefined for non-MCP requests. */
|
|
@@ -1985,7 +2001,12 @@ export class EngramMcpServer {
|
|
|
1985
2001
|
}
|
|
1986
2002
|
|
|
1987
2003
|
private toolAcceptsArgument(name: string, key: string): boolean {
|
|
1988
|
-
|
|
2004
|
+
// Match by canonical name so argument validation resolves whether the
|
|
2005
|
+
// caller used the `engram.*` or `remnic.*` name and regardless of whether
|
|
2006
|
+
// legacy aliases are advertised (issue #1427) — a tool stays callable under
|
|
2007
|
+
// both names even when only the canonical alias appears in `tools/list`.
|
|
2008
|
+
const target = toCanonicalToolName(name);
|
|
2009
|
+
const tool = this.tools.find((entry) => toCanonicalToolName(entry.name) === target);
|
|
1989
2010
|
const inputSchema = getObjectProperties(tool?.inputSchema);
|
|
1990
2011
|
const properties = getObjectProperties(inputSchema?.properties);
|
|
1991
2012
|
if (properties && Object.prototype.hasOwnProperty.call(properties, key)) {
|
|
@@ -198,6 +198,46 @@ test("active recall cache hits report cache-hit latency instead of reusing gener
|
|
|
198
198
|
assert.equal(second.latencyMs, 1);
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
+
test("active recall cache hits append a fresh transcript entry", async () => {
|
|
202
|
+
const transcriptDir = await mkdtemp(path.join(os.tmpdir(), "active-recall-cache-transcript-"));
|
|
203
|
+
let generateCalls = 0;
|
|
204
|
+
const engine = createActiveRecallEngine(
|
|
205
|
+
{
|
|
206
|
+
async recall() {
|
|
207
|
+
return "CI worker drain after Redis reconnect storm.";
|
|
208
|
+
},
|
|
209
|
+
async generateSummary() {
|
|
210
|
+
generateCalls += 1;
|
|
211
|
+
return { text: "Redis reconnect storm caused the worker drain." };
|
|
212
|
+
},
|
|
213
|
+
now: (() => {
|
|
214
|
+
let tick = 40_000;
|
|
215
|
+
return () => tick++;
|
|
216
|
+
})(),
|
|
217
|
+
},
|
|
218
|
+
baseConfig({
|
|
219
|
+
cacheTtlMs: 5000,
|
|
220
|
+
persistTranscripts: true,
|
|
221
|
+
transcriptDir,
|
|
222
|
+
}),
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
const first = await engine.run(baseInput());
|
|
226
|
+
const second = await engine.run(baseInput());
|
|
227
|
+
|
|
228
|
+
assert.equal(generateCalls, 1);
|
|
229
|
+
assert.equal(first.cacheHit, false);
|
|
230
|
+
assert.equal(second.cacheHit, true);
|
|
231
|
+
assert.ok(first.transcriptPath, "expected first transcript path");
|
|
232
|
+
assert.ok(second.transcriptPath, "expected cache-hit transcript path");
|
|
233
|
+
|
|
234
|
+
const raw = await readFile(second.transcriptPath ?? "", "utf8");
|
|
235
|
+
const entries = raw.trim().split("\n").map((line) => JSON.parse(line) as { cacheHit: boolean });
|
|
236
|
+
assert.equal(entries.length, 2);
|
|
237
|
+
assert.equal(entries[0].cacheHit, false);
|
|
238
|
+
assert.equal(entries[1].cacheHit, true);
|
|
239
|
+
});
|
|
240
|
+
|
|
201
241
|
test("active recall cache stores an isolated snapshot instead of a mutable caller reference", async () => {
|
|
202
242
|
let generateCalls = 0;
|
|
203
243
|
const engine = createActiveRecallEngine(
|
package/src/active-recall.ts
CHANGED
|
@@ -361,11 +361,26 @@ export function createActiveRecallEngine(
|
|
|
361
361
|
}
|
|
362
362
|
const cached = cache.get(cacheKey);
|
|
363
363
|
if (cacheEnabled && cached) {
|
|
364
|
-
|
|
364
|
+
const result: ActiveRecallResult = {
|
|
365
365
|
...cloneRecallResult(cached.value),
|
|
366
366
|
latencyMs: Math.max(0, now() - currentTime),
|
|
367
367
|
cacheHit: true,
|
|
368
368
|
};
|
|
369
|
+
result.transcriptPath = null;
|
|
370
|
+
if (config.persistTranscripts) {
|
|
371
|
+
try {
|
|
372
|
+
result.transcriptPath = await appendActiveRecallTranscript(
|
|
373
|
+
config.transcriptDir,
|
|
374
|
+
input,
|
|
375
|
+
config,
|
|
376
|
+
result,
|
|
377
|
+
queryBundle,
|
|
378
|
+
);
|
|
379
|
+
} catch {
|
|
380
|
+
result.transcriptPath = null;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return result;
|
|
369
384
|
}
|
|
370
385
|
|
|
371
386
|
const start = currentTime;
|
|
@@ -451,9 +466,11 @@ export function createActiveRecallEngine(
|
|
|
451
466
|
|
|
452
467
|
if (cacheEnabled) {
|
|
453
468
|
const completedAt = now();
|
|
469
|
+
const cachedValue = cloneRecallResult(result);
|
|
470
|
+
cachedValue.transcriptPath = null;
|
|
454
471
|
cache.set(cacheKey, {
|
|
455
472
|
expiresAt: completedAt + config.cacheTtlMs,
|
|
456
|
-
value:
|
|
473
|
+
value: cachedValue,
|
|
457
474
|
});
|
|
458
475
|
enforceCacheLimit(cache);
|
|
459
476
|
}
|
package/src/behavior-learner.ts
CHANGED
|
@@ -68,13 +68,15 @@ function aggregateSignalPressure(signals: BehaviorSignalEvent[]): number {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
function selectRecentSignals(input: BehaviorLearnerInput): BehaviorSignalEvent[] {
|
|
71
|
-
if (input.learningWindowDays <= 0) return [...input.signals];
|
|
72
71
|
const nowMs = (input.now ?? new Date()).getTime();
|
|
73
|
-
const minTs =
|
|
72
|
+
const minTs =
|
|
73
|
+
input.learningWindowDays <= 0
|
|
74
|
+
? Number.NEGATIVE_INFINITY
|
|
75
|
+
: nowMs - input.learningWindowDays * 86_400_000;
|
|
74
76
|
return input.signals.filter((signal) => {
|
|
75
77
|
const ts = Date.parse(signal.timestamp);
|
|
76
78
|
if (!Number.isFinite(ts)) return false;
|
|
77
|
-
return ts >= minTs;
|
|
79
|
+
return ts >= minTs && ts <= nowMs;
|
|
78
80
|
});
|
|
79
81
|
}
|
|
80
82
|
|
|
@@ -2,6 +2,7 @@ import test from "node:test";
|
|
|
2
2
|
import assert from "node:assert/strict";
|
|
3
3
|
import { SmartBuffer } from "./buffer.js";
|
|
4
4
|
import { parseConfig } from "./config.js";
|
|
5
|
+
import type { BufferSurpriseProbe } from "./buffer.js";
|
|
5
6
|
import type { BufferState, BufferTurn } from "./types.js";
|
|
6
7
|
|
|
7
8
|
class FakeStorage {
|
|
@@ -111,6 +112,63 @@ test("SmartBuffer serializes concurrent addTurn mutations", async () => {
|
|
|
111
112
|
);
|
|
112
113
|
});
|
|
113
114
|
|
|
115
|
+
test("SmartBuffer ignores stale surprise promotion after newer turns arrive", async () => {
|
|
116
|
+
const storage = new FakeStorage({
|
|
117
|
+
turns: [],
|
|
118
|
+
lastExtractionAt: null,
|
|
119
|
+
extractionCount: 0,
|
|
120
|
+
});
|
|
121
|
+
let resolveFirstProbe = (_score: number): void => {
|
|
122
|
+
throw new Error("first surprise probe did not start");
|
|
123
|
+
};
|
|
124
|
+
let markFirstProbeStarted = (): void => {
|
|
125
|
+
throw new Error("probe start marker was not initialized");
|
|
126
|
+
};
|
|
127
|
+
const firstProbeStarted = new Promise<void>((resolve) => {
|
|
128
|
+
markFirstProbeStarted = resolve;
|
|
129
|
+
});
|
|
130
|
+
const probe: BufferSurpriseProbe = {
|
|
131
|
+
async scoreTurn(_bufferKey, turn) {
|
|
132
|
+
if (turn.content !== "turn A") return null;
|
|
133
|
+
markFirstProbeStarted();
|
|
134
|
+
return new Promise<number>((probeResolve) => {
|
|
135
|
+
resolveFirstProbe = probeResolve;
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
const buffer = new SmartBuffer(
|
|
140
|
+
parseConfig({
|
|
141
|
+
bufferSurpriseTriggerEnabled: true,
|
|
142
|
+
bufferSurpriseThreshold: 0.35,
|
|
143
|
+
bufferSurpriseProbeTimeoutMs: 10_000,
|
|
144
|
+
triggerMode: "smart",
|
|
145
|
+
}),
|
|
146
|
+
storage as any,
|
|
147
|
+
probe,
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
const firstOutcomePromise = buffer.addTurnWithOutcome(
|
|
151
|
+
"thread-a",
|
|
152
|
+
makeTurn("thread-a", "turn A"),
|
|
153
|
+
);
|
|
154
|
+
await firstProbeStarted;
|
|
155
|
+
|
|
156
|
+
const secondOutcome = await buffer.addTurnWithOutcome(
|
|
157
|
+
"thread-a",
|
|
158
|
+
makeTurn("thread-a", "turn B"),
|
|
159
|
+
);
|
|
160
|
+
assert.deepEqual(secondOutcome, { decision: "keep_buffering" });
|
|
161
|
+
|
|
162
|
+
resolveFirstProbe(1);
|
|
163
|
+
const firstOutcome = await firstOutcomePromise;
|
|
164
|
+
|
|
165
|
+
assert.deepEqual(firstOutcome, { decision: "keep_buffering" });
|
|
166
|
+
assert.deepEqual(
|
|
167
|
+
buffer.getTurns("thread-a").map((turn) => turn.content),
|
|
168
|
+
["turn A", "turn B"],
|
|
169
|
+
);
|
|
170
|
+
});
|
|
171
|
+
|
|
114
172
|
test("SmartBuffer clearAfterExtraction only clears the targeted logical session", async () => {
|
|
115
173
|
const storage = new FakeStorage({
|
|
116
174
|
turns: [],
|