@remnic/core 1.0.2 → 1.1.0
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/abort-error.d.ts +32 -0
- package/dist/abort-error.js +11 -0
- package/dist/access-cli.d.ts +13 -3
- package/dist/access-cli.js +96 -80
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +12 -4
- package/dist/access-http.js +25 -18
- package/dist/access-mcp.d.ts +32 -4
- package/dist/access-mcp.js +16 -1
- package/dist/access-schema.d.ts +28 -28
- package/dist/access-schema.js +1 -1
- package/dist/access-service-HmO1Trrx.d.ts +732 -0
- package/dist/access-service.d.ts +15 -601
- package/dist/access-service.js +21 -15
- package/dist/active-memory-bridge.d.ts +66 -0
- package/dist/active-memory-bridge.js +11 -0
- package/dist/active-memory-bridge.js.map +1 -0
- package/dist/active-recall.d.ts +96 -0
- package/dist/active-recall.js +308 -0
- package/dist/active-recall.js.map +1 -0
- package/dist/behavior-learner.js +1 -1
- package/dist/bootstrap.d.ts +6 -3
- package/dist/bootstrap.js +2 -2
- package/dist/boxes.js +2 -2
- package/dist/briefing.d.ts +169 -0
- package/dist/briefing.js +52 -0
- package/dist/briefing.js.map +1 -0
- package/dist/buffer.d.ts +19 -5
- package/dist/buffer.js +2 -2
- package/dist/calibration.js +6 -6
- package/dist/causal-behavior.js +5 -5
- package/dist/causal-chain.js +3 -3
- package/dist/causal-consolidation.d.ts +22 -2
- package/dist/causal-consolidation.js +36 -9
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +6 -6
- package/dist/causal-trajectory-graph.js +1 -1
- package/dist/causal-trajectory.d.ts +14 -1
- package/dist/causal-trajectory.js +5 -1
- package/dist/{chunk-KWBU5S5U.js → chunk-2ODBA7MQ.js} +9 -3
- package/dist/chunk-2ODBA7MQ.js.map +1 -0
- package/dist/{chunk-ZJLY4QSU.js → chunk-37UIFYWO.js} +130 -6
- package/dist/chunk-37UIFYWO.js.map +1 -0
- package/dist/chunk-3PG3H5TD.js +7 -0
- package/dist/chunk-3PG3H5TD.js.map +1 -0
- package/dist/{chunk-NTTLPF7F.js → chunk-3QFQGRHO.js} +5 -5
- package/dist/{chunk-QDOSNLB4.js → chunk-3QHL5ABG.js} +17 -15
- package/dist/chunk-3QHL5ABG.js.map +1 -0
- package/dist/{chunk-6UJQNRIO.js → chunk-3SV6CQHO.js} +92 -33
- package/dist/chunk-3SV6CQHO.js.map +1 -0
- package/dist/{chunk-U4PV25RD.js → chunk-3WHVNEN7.js} +1 -1
- package/dist/chunk-3WHVNEN7.js.map +1 -0
- package/dist/{chunk-XUHI52HK.js → chunk-44ICJRF3.js} +98 -10
- package/dist/chunk-44ICJRF3.js.map +1 -0
- package/dist/{chunk-HG2NKWR2.js → chunk-47UU5PU2.js} +49 -10
- package/dist/chunk-47UU5PU2.js.map +1 -0
- package/dist/chunk-4DJQYKMN.js +187 -0
- package/dist/chunk-4DJQYKMN.js.map +1 -0
- package/dist/chunk-4KAN3GZ3.js +225 -0
- package/dist/chunk-4KAN3GZ3.js.map +1 -0
- package/dist/chunk-4LACOVZX.js +813 -0
- package/dist/chunk-4LACOVZX.js.map +1 -0
- package/dist/{chunk-ORZMT74A.js → chunk-4NRAJUDS.js} +11 -1
- package/dist/chunk-4NRAJUDS.js.map +1 -0
- package/dist/{chunk-B7LOFDVE.js → chunk-4WMCPJWX.js} +8 -3
- package/dist/chunk-4WMCPJWX.js.map +1 -0
- package/dist/{chunk-G3AG3KZN.js → chunk-5IZL4DCV.js} +2 -2
- package/dist/{chunk-BRK4ODMI.js → chunk-5NPGSAVB.js} +2 -2
- package/dist/{chunk-QANCTXQF.js → chunk-6LX5ORAS.js} +3 -3
- package/dist/chunk-6MKAMLQL.js +16 -0
- package/dist/chunk-6MKAMLQL.js.map +1 -0
- package/dist/{chunk-ESSMF2FR.js → chunk-6PFRXT4K.js} +15 -6
- package/dist/chunk-6PFRXT4K.js.map +1 -0
- package/dist/{chunk-UIYZ5T3I.js → chunk-6UJ47TVX.js} +8 -8
- package/dist/chunk-6ZH4TU6I.js +245 -0
- package/dist/chunk-6ZH4TU6I.js.map +1 -0
- package/dist/{chunk-L5RPWGFK.js → chunk-7DHTMOND.js} +2 -2
- package/dist/{chunk-L7WO3MZ4.js → chunk-7ECD5ATE.js} +2 -2
- package/dist/{chunk-Q6FETXJA.js → chunk-7SEAZFFB.js} +2 -2
- package/dist/{chunk-V4YC4LUK.js → chunk-7WQ6SLIE.js} +175 -63
- package/dist/chunk-7WQ6SLIE.js.map +1 -0
- package/dist/chunk-ALXMCZEU.js +332 -0
- package/dist/chunk-ALXMCZEU.js.map +1 -0
- package/dist/{chunk-TVVVQQAK.js → chunk-BLKTA7MM.js} +58 -24
- package/dist/chunk-BLKTA7MM.js.map +1 -0
- package/dist/{chunk-SCHEKPYH.js → chunk-C2EFFULQ.js} +1 -1
- package/dist/{chunk-GJR6D6KC.js → chunk-D654IBA6.js} +2 -2
- package/dist/{chunk-OTFNI3OO.js → chunk-DEPL3635.js} +1828 -401
- package/dist/chunk-DEPL3635.js.map +1 -0
- package/dist/{chunk-UYSKNO6E.js → chunk-DHHP2Z4X.js} +15 -4
- package/dist/chunk-DHHP2Z4X.js.map +1 -0
- package/dist/{chunk-UV2FO7J4.js → chunk-E6K4NIEU.js} +2 -2
- package/dist/{chunk-T4WRIV2C.js → chunk-EABGC2TL.js} +2 -2
- package/dist/chunk-EJI5XIBB.js +232 -0
- package/dist/chunk-EJI5XIBB.js.map +1 -0
- package/dist/{chunk-ONRU4L2N.js → chunk-FEMOX5AD.js} +2 -2
- package/dist/{chunk-IFFFR3MR.js → chunk-FSFEQI74.js} +3 -3
- package/dist/chunk-G4SK7DSQ.js +121 -0
- package/dist/chunk-G4SK7DSQ.js.map +1 -0
- package/dist/{chunk-WWIQTB2Y.js → chunk-GGD5W7TB.js} +9 -2
- package/dist/chunk-GGD5W7TB.js.map +1 -0
- package/dist/{chunk-QWUUMMIK.js → chunk-GV6NLQ4X.js} +1355 -80
- package/dist/chunk-GV6NLQ4X.js.map +1 -0
- package/dist/{chunk-2PO5ZRKV.js → chunk-GZCUW5IC.js} +16 -3
- package/dist/chunk-GZCUW5IC.js.map +1 -0
- package/dist/{chunk-AAI7JARD.js → chunk-HMDCOMYU.js} +8 -11
- package/dist/chunk-HMDCOMYU.js.map +1 -0
- package/dist/chunk-IQT3XTKW.js +121 -0
- package/dist/chunk-IQT3XTKW.js.map +1 -0
- package/dist/{chunk-J3BT33K7.js → chunk-ITRLGI2T.js} +5 -5
- package/dist/{chunk-BDFZXRSO.js → chunk-J4IYOZZ5.js} +15 -2
- package/dist/chunk-J4IYOZZ5.js.map +1 -0
- package/dist/{chunk-J47FNDR7.js → chunk-JIU55F3X.js} +7 -7
- package/dist/{chunk-MDDAA2AO.js → chunk-JL2PU6AI.js} +17 -6
- package/dist/chunk-JL2PU6AI.js.map +1 -0
- package/dist/{chunk-ZKYI7UVO.js → chunk-JR4ZC3G4.js} +2 -2
- package/dist/{chunk-UCYSTFZR.js → chunk-JRNQ3RNA.js} +2 -2
- package/dist/{chunk-GPGBSNKM.js → chunk-K4FLSOR5.js} +2 -2
- package/dist/chunk-KVE7R4CG.js +320 -0
- package/dist/chunk-KVE7R4CG.js.map +1 -0
- package/dist/chunk-LAYN4LDC.js +267 -0
- package/dist/chunk-LAYN4LDC.js.map +1 -0
- package/dist/{chunk-ISY75RLM.js → chunk-MBJHSA7F.js} +344 -7
- package/dist/chunk-MBJHSA7F.js.map +1 -0
- package/dist/{chunk-PGK3VUHN.js → chunk-MTLYEMJB.js} +3 -2
- package/dist/chunk-MTLYEMJB.js.map +1 -0
- package/dist/{chunk-QY2BHY5O.js → chunk-MVTHXUBX.js} +297 -34
- package/dist/chunk-MVTHXUBX.js.map +1 -0
- package/dist/{chunk-LP47L3ZX.js → chunk-N42IWANG.js} +5 -5
- package/dist/{chunk-YNI4S5WT.js → chunk-N53K2EXC.js} +2 -2
- package/dist/{chunk-763GUIOU.js → chunk-NBNN5GOB.js} +2 -2
- package/dist/{chunk-CXWFUJR2.js → chunk-NQEVYWX6.js} +195 -5
- package/dist/chunk-NQEVYWX6.js.map +1 -0
- package/dist/{chunk-KL4CP4SB.js → chunk-O5ETUNBT.js} +17 -5
- package/dist/chunk-O5ETUNBT.js.map +1 -0
- package/dist/{chunk-OOSWAUYB.js → chunk-ODWDQNRE.js} +2 -2
- package/dist/chunk-OIT5QGG4.js +80 -0
- package/dist/chunk-OIT5QGG4.js.map +1 -0
- package/dist/{chunk-HLBYLYRD.js → chunk-PAORGQRI.js} +70 -13
- package/dist/chunk-PAORGQRI.js.map +1 -0
- package/dist/chunk-PVGDJXVK.js +21 -0
- package/dist/chunk-PVGDJXVK.js.map +1 -0
- package/dist/{chunk-OTAVQCSF.js → chunk-PYXS46O7.js} +2 -2
- package/dist/chunk-QDW3E4RD.js +108 -0
- package/dist/chunk-QDW3E4RD.js.map +1 -0
- package/dist/{chunk-YNCQ7E4M.js → chunk-QDYXG4CS.js} +4 -3
- package/dist/chunk-QDYXG4CS.js.map +1 -0
- package/dist/{chunk-HLXVTBF3.js → chunk-QNJMBKFK.js} +3 -2
- package/dist/chunk-QNJMBKFK.js.map +1 -0
- package/dist/{chunk-4A24LIM2.js → chunk-S75M5ZRK.js} +2 -2
- package/dist/chunk-SYUK3VLY.js +789 -0
- package/dist/chunk-SYUK3VLY.js.map +1 -0
- package/dist/{chunk-QCCCQT3O.js → chunk-TBBDFYXW.js} +2 -2
- package/dist/chunk-TBBDFYXW.js.map +1 -0
- package/dist/chunk-U66YHYC7.js +31 -0
- package/dist/chunk-U66YHYC7.js.map +1 -0
- package/dist/{chunk-MWGVGUIS.js → chunk-UEYA6UC7.js} +36 -4
- package/dist/chunk-UEYA6UC7.js.map +1 -0
- package/dist/{chunk-M5KEYE5E.js → chunk-URB2WSKZ.js} +2 -2
- package/dist/chunk-UVJFDP7P.js +202 -0
- package/dist/chunk-UVJFDP7P.js.map +1 -0
- package/dist/chunk-W6SL7OFG.js +180 -0
- package/dist/chunk-W6SL7OFG.js.map +1 -0
- package/dist/chunk-WBSAYXVI.js +7945 -0
- package/dist/chunk-WBSAYXVI.js.map +1 -0
- package/dist/{chunk-M5ZBBBJI.js → chunk-XZ2TIKGC.js} +39 -9
- package/dist/chunk-XZ2TIKGC.js.map +1 -0
- package/dist/chunk-Y4FHOFJ2.js +140 -0
- package/dist/chunk-Y4FHOFJ2.js.map +1 -0
- package/dist/chunk-YDBIWGNI.js +298 -0
- package/dist/chunk-YDBIWGNI.js.map +1 -0
- package/dist/chunk-YNB73F22.js +137 -0
- package/dist/chunk-YNB73F22.js.map +1 -0
- package/dist/{chunk-IZME7KW2.js → chunk-ZVBB3T7V.js} +31 -12
- package/dist/chunk-ZVBB3T7V.js.map +1 -0
- package/dist/chunking.js +1 -1
- package/dist/citations.d.ts +67 -0
- package/dist/citations.js +13 -0
- package/dist/citations.js.map +1 -0
- package/dist/cli-BneVIEvh.d.ts +1240 -0
- package/dist/cli.d.ts +32 -1147
- package/dist/cli.js +150 -7092
- package/dist/cli.js.map +1 -1
- package/dist/codex-materialize-CQlLTzke.d.ts +139 -0
- package/dist/codex-thread-key.d.ts +3 -0
- package/dist/codex-thread-key.js +7 -0
- package/dist/codex-thread-key.js.map +1 -0
- package/dist/config.js +3 -2
- package/dist/connectors/codex/instructions.md +160 -0
- package/dist/connectors/codex/resources/namespace-cheatsheet.md +48 -0
- package/dist/contradiction-review-WIUBAR52.js +21 -0
- package/dist/contradiction-review-WIUBAR52.js.map +1 -0
- package/dist/contradiction-scan-GR33PONM.js +376 -0
- package/dist/contradiction-scan-GR33PONM.js.map +1 -0
- package/dist/day-summary.d.ts +7 -2
- package/dist/day-summary.js +5 -2
- package/dist/direct-answer-wiring.d.ts +77 -0
- package/dist/direct-answer-wiring.js +75 -0
- package/dist/direct-answer-wiring.js.map +1 -0
- package/dist/direct-answer.d.ts +106 -0
- package/dist/direct-answer.js +10 -0
- package/dist/direct-answer.js.map +1 -0
- package/dist/embedding-fallback.d.ts +96 -2
- package/dist/embedding-fallback.js +6 -4
- package/dist/{engine-2A6J4XEX.js → engine-5TIQBYZR.js} +10 -7
- package/dist/engine-5TIQBYZR.js.map +1 -0
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +10 -7
- package/dist/entity-schema.d.ts +11 -0
- package/dist/entity-schema.js +19 -0
- package/dist/entity-schema.js.map +1 -0
- package/dist/explicit-capture.d.ts +6 -3
- package/dist/explicit-capture.js +2 -2
- package/dist/extraction-judge.d.ts +66 -0
- package/dist/extraction-judge.js +18 -0
- package/dist/extraction-judge.js.map +1 -0
- package/dist/extraction.d.ts +1 -0
- package/dist/extraction.js +12 -10
- package/dist/fallback-llm.d.ts +11 -2
- package/dist/fallback-llm.js +4 -4
- package/dist/graph.js +1 -1
- package/dist/harmonic-retrieval.js +2 -1
- package/dist/importance.d.ts +11 -1
- package/dist/importance.js +3 -1
- package/dist/index.d.ts +1027 -9
- package/dist/index.js +3303 -349
- package/dist/index.js.map +1 -1
- package/dist/intent.d.ts +2 -1
- package/dist/intent.js +3 -1
- package/dist/lifecycle.js +1 -1
- package/dist/local-llm.d.ts +10 -3
- package/dist/local-llm.js +2 -2
- package/dist/logger.d.ts +1 -1
- package/dist/logger.js +1 -1
- package/dist/memory-cache.d.ts +2 -2
- package/dist/memory-cache.js +1 -1
- package/dist/{memory-projection-store-NxMkbocT.d.ts → memory-projection-store-DeSXPh1j.d.ts} +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/model-registry.js +2 -2
- package/dist/models-json.js +2 -2
- package/dist/native-knowledge.js +2 -2
- package/dist/negative.js +2 -2
- package/dist/operator-toolkit.js +20 -15
- package/dist/{orchestrator-zTa-Qo-1.d.ts → orchestrator-DRYA6_lW.d.ts} +273 -9
- package/dist/orchestrator.d.ts +6 -3
- package/dist/orchestrator.js +76 -63
- package/dist/page-versioning.d.ts +77 -0
- package/dist/page-versioning.js +15 -0
- package/dist/page-versioning.js.map +1 -0
- package/dist/plugin-id.d.ts +37 -0
- package/dist/plugin-id.js +11 -0
- package/dist/plugin-id.js.map +1 -0
- package/dist/policy-runtime.js +2 -2
- package/dist/profiling.js +2 -2
- package/dist/qmd.d.ts +5 -2
- package/dist/qmd.js +4 -3
- package/dist/recall-audit.d.ts +20 -0
- package/dist/recall-audit.js +50 -0
- package/dist/recall-audit.js.map +1 -0
- package/dist/recall-mmr.d.ts +152 -0
- package/dist/recall-mmr.js +17 -0
- package/dist/recall-mmr.js.map +1 -0
- package/dist/recall-qos.js +2 -2
- package/dist/recall-state.d.ts +28 -1
- package/dist/recall-state.js +2 -2
- package/dist/relevance.js +2 -2
- package/dist/resolution-QBTDHTG7.js +100 -0
- package/dist/resolution-QBTDHTG7.js.map +1 -0
- package/dist/resolve-provider-secret.d.ts +24 -1
- package/dist/resolve-provider-secret.js +4 -2
- package/dist/resume-bundles.js +6 -5
- package/dist/retrieval-agents.js +2 -2
- package/dist/retrieval.js +2 -2
- package/dist/schemas.d.ts +412 -54
- package/dist/schemas.js +3 -1
- package/dist/sdk-compat.d.ts +2 -0
- package/dist/sdk-compat.js +6 -3
- package/dist/sdk-compat.js.map +1 -1
- package/dist/semantic-chunking.d.ts +87 -0
- package/dist/semantic-chunking.js +20 -0
- package/dist/semantic-chunking.js.map +1 -0
- package/dist/semantic-consolidation-DrvSYRdB.d.ts +119 -0
- package/dist/semantic-consolidation.d.ts +4 -42
- package/dist/semantic-consolidation.js +23 -2
- package/dist/semantic-rule-promotion.js +9 -6
- package/dist/semantic-rule-verifier.js +10 -7
- package/dist/session-observer-state.js +2 -2
- package/dist/session-toggles.d.ts +22 -0
- package/dist/session-toggles.js +116 -0
- package/dist/session-toggles.js.map +1 -0
- package/dist/skills-registry.d.ts +47 -0
- package/dist/skills-registry.js +48 -0
- package/dist/skills-registry.js.map +1 -0
- package/dist/source-attribution.d.ts +169 -0
- package/dist/source-attribution.js +27 -0
- package/dist/source-attribution.js.map +1 -0
- package/dist/storage.d.ts +171 -10
- package/dist/storage.js +16 -5
- package/dist/summarizer.js +7 -7
- package/dist/temporal-supersession.d.ts +127 -0
- package/dist/temporal-supersession.js +20 -0
- package/dist/temporal-supersession.js.map +1 -0
- package/dist/threading.js +2 -2
- package/dist/tier-migration.d.ts +2 -1
- package/dist/tier-routing.js +2 -2
- package/dist/tokens.d.ts +21 -1
- package/dist/tokens.js +5 -1
- package/dist/transcript.js +2 -2
- package/dist/types-DJhqDJUV.d.ts +50 -0
- package/dist/types.d.ts +529 -3
- package/dist/types.js +1 -1
- package/dist/utility-learner.js +2 -2
- package/dist/utility-runtime.js +3 -3
- package/dist/verified-recall.js +11 -8
- package/dist/whitespace.d.ts +4 -0
- package/dist/whitespace.js +9 -0
- package/dist/whitespace.js.map +1 -0
- package/package.json +14 -8
- package/dist/chunk-2CJCWDMR.js +0 -87
- package/dist/chunk-2CJCWDMR.js.map +0 -1
- package/dist/chunk-2PO5ZRKV.js.map +0 -1
- package/dist/chunk-6UJQNRIO.js.map +0 -1
- package/dist/chunk-AAI7JARD.js.map +0 -1
- package/dist/chunk-B7LOFDVE.js.map +0 -1
- package/dist/chunk-BDFZXRSO.js.map +0 -1
- package/dist/chunk-CXWFUJR2.js.map +0 -1
- package/dist/chunk-DORBM6OB.js +0 -81
- package/dist/chunk-DORBM6OB.js.map +0 -1
- package/dist/chunk-ESSMF2FR.js.map +0 -1
- package/dist/chunk-HG2NKWR2.js.map +0 -1
- package/dist/chunk-HLBYLYRD.js.map +0 -1
- package/dist/chunk-HLXVTBF3.js.map +0 -1
- package/dist/chunk-ISY75RLM.js.map +0 -1
- package/dist/chunk-IZME7KW2.js.map +0 -1
- package/dist/chunk-KL4CP4SB.js.map +0 -1
- package/dist/chunk-KWBU5S5U.js.map +0 -1
- package/dist/chunk-M5ZBBBJI.js.map +0 -1
- package/dist/chunk-MDDAA2AO.js.map +0 -1
- package/dist/chunk-MWGVGUIS.js.map +0 -1
- package/dist/chunk-ORZMT74A.js.map +0 -1
- package/dist/chunk-OTFNI3OO.js.map +0 -1
- package/dist/chunk-PGK3VUHN.js.map +0 -1
- package/dist/chunk-QCCCQT3O.js.map +0 -1
- package/dist/chunk-QDOSNLB4.js.map +0 -1
- package/dist/chunk-QPKFPHOO.js +0 -178
- package/dist/chunk-QPKFPHOO.js.map +0 -1
- package/dist/chunk-QWUUMMIK.js.map +0 -1
- package/dist/chunk-QY2BHY5O.js.map +0 -1
- package/dist/chunk-TVVVQQAK.js.map +0 -1
- package/dist/chunk-U4PV25RD.js.map +0 -1
- package/dist/chunk-UYSKNO6E.js.map +0 -1
- package/dist/chunk-V4YC4LUK.js.map +0 -1
- package/dist/chunk-WWIQTB2Y.js.map +0 -1
- package/dist/chunk-XUHI52HK.js.map +0 -1
- package/dist/chunk-YNCQ7E4M.js.map +0 -1
- package/dist/chunk-ZJLY4QSU.js.map +0 -1
- /package/dist/{engine-2A6J4XEX.js.map → abort-error.js.map} +0 -0
- /package/dist/{chunk-NTTLPF7F.js.map → chunk-3QFQGRHO.js.map} +0 -0
- /package/dist/{chunk-G3AG3KZN.js.map → chunk-5IZL4DCV.js.map} +0 -0
- /package/dist/{chunk-BRK4ODMI.js.map → chunk-5NPGSAVB.js.map} +0 -0
- /package/dist/{chunk-QANCTXQF.js.map → chunk-6LX5ORAS.js.map} +0 -0
- /package/dist/{chunk-UIYZ5T3I.js.map → chunk-6UJ47TVX.js.map} +0 -0
- /package/dist/{chunk-L5RPWGFK.js.map → chunk-7DHTMOND.js.map} +0 -0
- /package/dist/{chunk-L7WO3MZ4.js.map → chunk-7ECD5ATE.js.map} +0 -0
- /package/dist/{chunk-Q6FETXJA.js.map → chunk-7SEAZFFB.js.map} +0 -0
- /package/dist/{chunk-SCHEKPYH.js.map → chunk-C2EFFULQ.js.map} +0 -0
- /package/dist/{chunk-GJR6D6KC.js.map → chunk-D654IBA6.js.map} +0 -0
- /package/dist/{chunk-UV2FO7J4.js.map → chunk-E6K4NIEU.js.map} +0 -0
- /package/dist/{chunk-T4WRIV2C.js.map → chunk-EABGC2TL.js.map} +0 -0
- /package/dist/{chunk-ONRU4L2N.js.map → chunk-FEMOX5AD.js.map} +0 -0
- /package/dist/{chunk-IFFFR3MR.js.map → chunk-FSFEQI74.js.map} +0 -0
- /package/dist/{chunk-J3BT33K7.js.map → chunk-ITRLGI2T.js.map} +0 -0
- /package/dist/{chunk-J47FNDR7.js.map → chunk-JIU55F3X.js.map} +0 -0
- /package/dist/{chunk-ZKYI7UVO.js.map → chunk-JR4ZC3G4.js.map} +0 -0
- /package/dist/{chunk-UCYSTFZR.js.map → chunk-JRNQ3RNA.js.map} +0 -0
- /package/dist/{chunk-GPGBSNKM.js.map → chunk-K4FLSOR5.js.map} +0 -0
- /package/dist/{chunk-LP47L3ZX.js.map → chunk-N42IWANG.js.map} +0 -0
- /package/dist/{chunk-YNI4S5WT.js.map → chunk-N53K2EXC.js.map} +0 -0
- /package/dist/{chunk-763GUIOU.js.map → chunk-NBNN5GOB.js.map} +0 -0
- /package/dist/{chunk-OOSWAUYB.js.map → chunk-ODWDQNRE.js.map} +0 -0
- /package/dist/{chunk-OTAVQCSF.js.map → chunk-PYXS46O7.js.map} +0 -0
- /package/dist/{chunk-4A24LIM2.js.map → chunk-S75M5ZRK.js.map} +0 -0
- /package/dist/{chunk-M5KEYE5E.js.map → chunk-URB2WSKZ.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,43 @@
|
|
|
1
|
+
export { LEGACY_PLUGIN_ID, PLUGIN_ID, resolveRemnicPluginEntry } from './plugin-id.js';
|
|
1
2
|
export { parseConfig } from './config.js';
|
|
2
|
-
|
|
3
|
-
export {
|
|
3
|
+
import { f as BulkImportSourceAdapter } from './orchestrator-DRYA6_lW.js';
|
|
4
|
+
export { g as BulkImportError, c as BulkImportOptions, d as BulkImportResult, B as BulkImportSource, h as ImportSourceRole, b as ImportTurn, i as ImportTurnValidationIssue, O as Orchestrator, j as defaultWorkspaceDir, k as isImportRole, p as parseIsoTimestamp, s as sanitizeSessionKeyForFilename, v as validateImportTurn } from './orchestrator-DRYA6_lW.js';
|
|
5
|
+
import { StorageManager } from './storage.js';
|
|
4
6
|
export { ExtractionEngine } from './extraction.js';
|
|
7
|
+
export { JudgeBatchResult, JudgeCandidate, JudgeVerdict, clearVerdictCache, createVerdictCache, judgeFactDurability, verdictCacheSize } from './extraction-judge.js';
|
|
8
|
+
export { hasBroadGraphIntent, inferIntentFromText, intentCompatibilityScore, isTaskInitiationIntent, planRecallMode } from './intent.js';
|
|
9
|
+
import { PluginConfig, MemoryFile, MemoryCategory, ImportanceLevel } from './types.js';
|
|
10
|
+
export { BriefingActiveThread, BriefingConfig, BriefingFocus, BriefingFollowup, BriefingOpenCommitment, BriefingRecentEntity, BriefingResult, BriefingSections, BriefingWindow, CalendarEvent, CalendarSource, CodexCompatConfig, ContinuityImprovementLoop, GatewayConfig, MemoryActionEligibilityContext, MemoryActionEligibilitySource, MemoryActionType } from './types.js';
|
|
11
|
+
export { FILTER_LABELS as DIRECT_ANSWER_FILTER_LABELS, DirectAnswerCandidate, DirectAnswerConfig, DirectAnswerInput, DirectAnswerReason, DirectAnswerResult, isDirectAnswerEligible } from './direct-answer.js';
|
|
12
|
+
export { CITATION_UNKNOWN, CitationContext, DEFAULT_CITATION_FORMAT, ParsedCitation, attachCitation, deriveSessionId, formatCitation, hasCitation, parseAllCitations, parseCitation, stripCitation } from './source-attribution.js';
|
|
5
13
|
export { QmdClient } from './qmd.js';
|
|
6
14
|
import { S as SearchBackend, a as SearchQueryOptions, b as SearchExecutionOptions, c as SearchResult } from './port-C1GZFv8h.js';
|
|
7
|
-
import { PluginConfig } from './types.js';
|
|
8
|
-
export { ContinuityImprovementLoop, MemoryActionEligibilityContext, MemoryActionEligibilitySource, MemoryActionType, MemoryCategory, MemoryFile } from './types.js';
|
|
9
15
|
export { buildEntityRecallSection } from './entity-retrieval.js';
|
|
10
16
|
export { TrustZoneName, TrustZoneRecord, TrustZoneRecordKind, TrustZoneSourceClass, isTrustZoneName } from './trust-zones.js';
|
|
11
|
-
export { EngramAccessInputError, EngramAccessService } from './access-service.js';
|
|
17
|
+
export { a as EngramAccessInputError, E as EngramAccessService, S as SemanticDedupDecision, b as SemanticDedupHit, c as SemanticDedupLookup, d as SemanticDedupOptions, e as decideSemanticDedup } from './access-service-HmO1Trrx.js';
|
|
12
18
|
export { EngramAccessHttpServer } from './access-http.js';
|
|
13
19
|
export { EngramMcpServer } from './access-mcp.js';
|
|
14
20
|
export { MemoryStoreRequest, ObserveRequest, RecallRequest, SchemaName, SchemaValidationError, SuggestionSubmitRequest, formatZodError, memoryStoreRequestSchema, observeRequestSchema, recallRequestSchema, suggestionSubmitRequestSchema, validateRequest } from './access-schema.js';
|
|
15
|
-
export { loadDaySummaryPrompt } from './day-summary.js';
|
|
21
|
+
export { buildExtensionsFooterForSummary, loadDaySummaryPrompt } from './day-summary.js';
|
|
22
|
+
export { ActiveMemoryGetOutput, ActiveMemoryMetadata, ActiveMemoryRecallParams, ActiveMemorySearchOutput, ActiveMemorySearchResult, getMemoryForActiveMemory, recallForActiveMemory } from './active-memory-bridge.js';
|
|
23
|
+
export { BRIEFING_FORMAT_ALLOWED, BriefingFollowupGenerator, BriefingFormatValue, BuildBriefingOptions, FileCalendarSource, ParsedBriefingWindow, briefingFilename, buildBriefing, focusMatchesEntity, focusMatchesMemory, parseBriefingFocus, parseBriefingWindow, renderBriefingMarkdown, resolveBriefingSaveDir, validateBriefingFormat } from './briefing.js';
|
|
16
24
|
export { BootstrapEngine } from './bootstrap.js';
|
|
25
|
+
export { CODEX_THREAD_KEY_PREFIX } from './codex-thread-key.js';
|
|
26
|
+
export { PageVersion, VersionHistory, VersionTrigger, VersioningConfig, VersioningLogger, createVersion, diffVersions, getVersion, listVersions, revertToVersion } from './page-versioning.js';
|
|
27
|
+
export { CitationBlock, CitationEntry, CitationMetadata, buildCitationGuidance, formatOaiMemCitation, parseOaiMemCitation, sanitizeNoteForCitation } from './citations.js';
|
|
28
|
+
import { LoggerBackend } from './logger.js';
|
|
17
29
|
export { initLogger, log } from './logger.js';
|
|
30
|
+
import { D as DiscoveredExtension } from './semantic-consolidation-DrvSYRdB.js';
|
|
31
|
+
export { E as ExtensionSchema, R as REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT, b as buildExtensionsBlockForConsolidation, d as discoverMemoryExtensions, r as resolveExtensionsRoot } from './semantic-consolidation-DrvSYRdB.js';
|
|
18
32
|
export { TokenEntry, TokenStore, generateToken, getAllValidTokens, getAllValidTokensCached, listTokens, loadTokenStore, resolveConnectorFromToken, revokeToken, saveTokenStore } from './tokens.js';
|
|
33
|
+
import { R as RolloutSummaryInput, M as MaterializeResult } from './codex-materialize-CQlLTzke.js';
|
|
34
|
+
export { a as MATERIALIZE_VERSION, b as MaterializeOptions, S as SENTINEL_FILE, d as describeMemoriesDir, e as ensureSentinel, m as materializeForNamespace } from './codex-materialize-CQlLTzke.js';
|
|
35
|
+
import { T as Taxonomy, R as ResolverDecision } from './types-DJhqDJUV.js';
|
|
36
|
+
export { a as TaxonomyCategory } from './types-DJhqDJUV.js';
|
|
37
|
+
export { B as BulkImportCliCommandOptions, P as ProcessBatchFn, a as ProcessBatchResult, f as formatBatchTranscript, p as parseStrictCliDate, r as runBulkImportCliCommand, b as runBulkImportPipeline } from './cli-BneVIEvh.js';
|
|
38
|
+
export { FallbackLlmClient, FallbackLlmOptions, FallbackLlmResponse, FallbackLlmRuntimeContext } from './fallback-llm.js';
|
|
19
39
|
import './buffer.js';
|
|
20
|
-
import './memory-projection-store-
|
|
40
|
+
import './memory-projection-store-DeSXPh1j.js';
|
|
21
41
|
import 'better-sqlite3';
|
|
22
42
|
import './transcript.js';
|
|
23
43
|
import './session-integrity.js';
|
|
@@ -29,7 +49,6 @@ import './negative.js';
|
|
|
29
49
|
import './recall-state.js';
|
|
30
50
|
import './session-observer-state.js';
|
|
31
51
|
import './embedding-fallback.js';
|
|
32
|
-
import './semantic-consolidation.js';
|
|
33
52
|
import 'zod';
|
|
34
53
|
import './policy-runtime.js';
|
|
35
54
|
import './profiling.js';
|
|
@@ -37,6 +56,68 @@ import './schemas.js';
|
|
|
37
56
|
import './explicit-capture.js';
|
|
38
57
|
import 'node:http';
|
|
39
58
|
import 'node:stream';
|
|
59
|
+
import './dashboard-runtime.js';
|
|
60
|
+
import './evals.js';
|
|
61
|
+
import './graph.js';
|
|
62
|
+
import './causal-trajectory.js';
|
|
63
|
+
import './objective-state.js';
|
|
64
|
+
import './abstraction-nodes.js';
|
|
65
|
+
import './cue-anchors.js';
|
|
66
|
+
import './harmonic-retrieval.js';
|
|
67
|
+
import './verified-recall.js';
|
|
68
|
+
import './boxes.js';
|
|
69
|
+
import './semantic-rule-verifier.js';
|
|
70
|
+
import './commitment-ledger.js';
|
|
71
|
+
import './work-product-ledger.js';
|
|
72
|
+
import './utility-telemetry.js';
|
|
73
|
+
import './utility-learner.js';
|
|
74
|
+
import './resume-bundles.js';
|
|
75
|
+
import './semantic-rule-promotion.js';
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* memory-extension-host/render-extensions-block.ts — Render discovered extensions
|
|
79
|
+
* into a markdown block for injection into consolidation prompts.
|
|
80
|
+
*
|
|
81
|
+
* Respects the global token budget (REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT) and
|
|
82
|
+
* truncates with a footer listing omitted extensions when over budget.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Render a markdown block containing extension instructions for injection
|
|
87
|
+
* into consolidation prompts.
|
|
88
|
+
*
|
|
89
|
+
* If the list is empty, returns "".
|
|
90
|
+
* Inlines extensions in name order until the token budget is exhausted.
|
|
91
|
+
* If the budget is exceeded, appends a truncation footer listing omitted extensions.
|
|
92
|
+
*/
|
|
93
|
+
declare function renderExtensionsBlock(extensions: DiscoveredExtension[]): string;
|
|
94
|
+
/**
|
|
95
|
+
* Render a compact one-line footer listing active extension names.
|
|
96
|
+
* Used by day-summary and summary-snapshot where full instructions are not needed.
|
|
97
|
+
*/
|
|
98
|
+
declare function renderExtensionsFooter(extensions: DiscoveredExtension[]): string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Register a source adapter. Rejects duplicate names and empty names.
|
|
102
|
+
*/
|
|
103
|
+
declare function registerBulkImportSource(adapter: BulkImportSourceAdapter): void;
|
|
104
|
+
/**
|
|
105
|
+
* Retrieve a registered adapter by name.
|
|
106
|
+
*
|
|
107
|
+
* Names are trimmed on write (see `registerBulkImportSource`), so we
|
|
108
|
+
* also trim on read to avoid the asymmetric-lookup footgun where a
|
|
109
|
+
* whitespace-padded lookup would never find a registered adapter.
|
|
110
|
+
* Non-string or empty-after-trim inputs return undefined.
|
|
111
|
+
*/
|
|
112
|
+
declare function getBulkImportSource(name: string): BulkImportSourceAdapter | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* List all registered adapter names.
|
|
115
|
+
*/
|
|
116
|
+
declare function listBulkImportSources(): string[];
|
|
117
|
+
/**
|
|
118
|
+
* Clear all registered adapters (for testing).
|
|
119
|
+
*/
|
|
120
|
+
declare function clearBulkImportSources(): void;
|
|
40
121
|
|
|
41
122
|
interface MigrationResult {
|
|
42
123
|
status: "fresh-install" | "already-migrated" | "migrated";
|
|
@@ -61,6 +142,38 @@ interface RollbackResult {
|
|
|
61
142
|
declare function rollbackFromEngramMigration(options?: MigrationOptions): Promise<RollbackResult>;
|
|
62
143
|
declare function migrateFromEngram(options?: MigrationOptions): Promise<MigrationResult>;
|
|
63
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Intent-gated recall for active procedure memories (issue #519).
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Build markdown for the recall pipeline when procedural memory is enabled and
|
|
151
|
+
* the prompt looks like task initiation.
|
|
152
|
+
*/
|
|
153
|
+
declare function buildProcedureRecallSection(storage: StorageManager, prompt: string, config: PluginConfig): Promise<string | null>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Procedural memory types (issue #519).
|
|
157
|
+
* Bodies use ordered "## Step N" sections; machine fields live in frontmatter / structuredAttributes.
|
|
158
|
+
*/
|
|
159
|
+
interface ProcedureStep {
|
|
160
|
+
order: number;
|
|
161
|
+
intent: string;
|
|
162
|
+
toolCall?: {
|
|
163
|
+
kind: string;
|
|
164
|
+
signature: string;
|
|
165
|
+
};
|
|
166
|
+
expectedOutcome?: string;
|
|
167
|
+
optional?: boolean;
|
|
168
|
+
}
|
|
169
|
+
/** Serialize steps into markdown body (human-editable). */
|
|
170
|
+
declare function buildProcedureMarkdownBody(steps: ProcedureStep[]): string;
|
|
171
|
+
/**
|
|
172
|
+
* Best-effort parse of "## Step N" blocks into ProcedureStep records.
|
|
173
|
+
* Returns null when no step headers are found.
|
|
174
|
+
*/
|
|
175
|
+
declare function parseProcedureStepsFromBody(content: string): ProcedureStep[] | null;
|
|
176
|
+
|
|
64
177
|
/**
|
|
65
178
|
* Standalone embedding helper for search backend adapters.
|
|
66
179
|
*
|
|
@@ -227,6 +340,180 @@ declare class MeilisearchBackend implements SearchBackend {
|
|
|
227
340
|
private mapHits;
|
|
228
341
|
}
|
|
229
342
|
|
|
343
|
+
declare function resolvePrincipal(sessionKey: string | undefined, config: PluginConfig): string;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Binary file lifecycle management types.
|
|
347
|
+
*
|
|
348
|
+
* Defines the configuration, manifest, and record structures for the
|
|
349
|
+
* three-stage binary lifecycle pipeline: mirror, redirect, clean.
|
|
350
|
+
*/
|
|
351
|
+
interface BinaryLifecycleConfig {
|
|
352
|
+
/** Master toggle. Default: false. */
|
|
353
|
+
enabled: boolean;
|
|
354
|
+
/** Days after mirror before local copy is eligible for cleanup. Default: 7. */
|
|
355
|
+
gracePeriodDays: number;
|
|
356
|
+
/** Files larger than this are skipped during scan. Default: 50 MB. */
|
|
357
|
+
maxBinarySizeBytes: number;
|
|
358
|
+
/** Glob patterns for binary file types to manage. */
|
|
359
|
+
scanPatterns: string[];
|
|
360
|
+
/** Backend configuration for binary storage. */
|
|
361
|
+
backend: BinaryStorageBackendConfig;
|
|
362
|
+
}
|
|
363
|
+
interface BinaryStorageBackendConfig {
|
|
364
|
+
/** Backend type. "filesystem" copies to a local directory. "none" is a no-op (dry-run/testing). */
|
|
365
|
+
type: "filesystem" | "s3" | "none";
|
|
366
|
+
/** Destination directory for the filesystem backend. */
|
|
367
|
+
basePath?: string;
|
|
368
|
+
/** S3 bucket name (future). */
|
|
369
|
+
s3Bucket?: string;
|
|
370
|
+
/** S3 region (future). */
|
|
371
|
+
s3Region?: string;
|
|
372
|
+
/** S3 key prefix (future). */
|
|
373
|
+
s3Prefix?: string;
|
|
374
|
+
}
|
|
375
|
+
type BinaryAssetStatus = "pending" | "mirrored" | "redirected" | "cleaned" | "error";
|
|
376
|
+
interface BinaryAssetRecord {
|
|
377
|
+
/** Relative path from memoryDir to the original file. */
|
|
378
|
+
originalPath: string;
|
|
379
|
+
/** Path (or URL) in the backend storage. */
|
|
380
|
+
mirroredPath: string;
|
|
381
|
+
/** SHA-256 hex digest of file content. */
|
|
382
|
+
contentHash: string;
|
|
383
|
+
/** File size in bytes. */
|
|
384
|
+
sizeBytes: number;
|
|
385
|
+
/** MIME type (e.g. "image/png"). */
|
|
386
|
+
mimeType: string;
|
|
387
|
+
/** ISO 8601 timestamp when the file was mirrored. */
|
|
388
|
+
mirroredAt: string;
|
|
389
|
+
/** ISO 8601 timestamp when markdown references were rewritten. */
|
|
390
|
+
redirectedAt?: string;
|
|
391
|
+
/** ISO 8601 timestamp when the local copy was deleted. */
|
|
392
|
+
cleanedAt?: string;
|
|
393
|
+
/** Current lifecycle status. */
|
|
394
|
+
status: BinaryAssetStatus;
|
|
395
|
+
}
|
|
396
|
+
interface BinaryLifecycleManifest {
|
|
397
|
+
version: 1;
|
|
398
|
+
assets: BinaryAssetRecord[];
|
|
399
|
+
lastScanAt?: string;
|
|
400
|
+
}
|
|
401
|
+
interface PipelineResult {
|
|
402
|
+
scanned: number;
|
|
403
|
+
mirrored: number;
|
|
404
|
+
redirected: number;
|
|
405
|
+
cleaned: number;
|
|
406
|
+
errors: string[];
|
|
407
|
+
dryRun: boolean;
|
|
408
|
+
}
|
|
409
|
+
declare const DEFAULT_SCAN_PATTERNS: string[];
|
|
410
|
+
declare const DEFAULT_MAX_BINARY_SIZE_BYTES: number;
|
|
411
|
+
declare const DEFAULT_GRACE_PERIOD_DAYS = 7;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Binary storage backend interface and implementations.
|
|
415
|
+
*
|
|
416
|
+
* Backends handle the actual persistence of binary files to an external
|
|
417
|
+
* location. The pipeline calls upload/exists/delete through this interface
|
|
418
|
+
* so swapping storage providers requires no pipeline changes.
|
|
419
|
+
*/
|
|
420
|
+
|
|
421
|
+
interface BinaryStorageBackend {
|
|
422
|
+
/** Discriminator for the backend type. */
|
|
423
|
+
readonly type: string;
|
|
424
|
+
/**
|
|
425
|
+
* Upload a local file to the backend.
|
|
426
|
+
* @returns The backend path or URL where the file was stored.
|
|
427
|
+
*/
|
|
428
|
+
upload(localPath: string, remotePath: string): Promise<string>;
|
|
429
|
+
/** Check whether a remote path already exists in the backend. */
|
|
430
|
+
exists(remotePath: string): Promise<boolean>;
|
|
431
|
+
/** Delete a file from the backend. */
|
|
432
|
+
delete(remotePath: string): Promise<void>;
|
|
433
|
+
}
|
|
434
|
+
declare class FilesystemBackend implements BinaryStorageBackend {
|
|
435
|
+
readonly type = "filesystem";
|
|
436
|
+
private readonly basePath;
|
|
437
|
+
constructor(basePath: string);
|
|
438
|
+
upload(localPath: string, remotePath: string): Promise<string>;
|
|
439
|
+
exists(remotePath: string): Promise<boolean>;
|
|
440
|
+
delete(remotePath: string): Promise<void>;
|
|
441
|
+
}
|
|
442
|
+
declare class NoneBackend implements BinaryStorageBackend {
|
|
443
|
+
readonly type = "none";
|
|
444
|
+
upload(_localPath: string, remotePath: string): Promise<string>;
|
|
445
|
+
exists(_remotePath: string): Promise<boolean>;
|
|
446
|
+
delete(_remotePath: string): Promise<void>;
|
|
447
|
+
}
|
|
448
|
+
declare function createBackend(cfg: BinaryStorageBackendConfig): BinaryStorageBackend;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Binary file scanner.
|
|
452
|
+
*
|
|
453
|
+
* Recursively walks the memory directory, matches files against configured
|
|
454
|
+
* glob patterns, skips files already tracked in the manifest, and respects
|
|
455
|
+
* the max-size limit.
|
|
456
|
+
*/
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Test whether a filename matches any of the provided glob patterns.
|
|
460
|
+
* Supports simple `*.ext` patterns (the default scan patterns).
|
|
461
|
+
* For more complex globs a proper library should be used; this covers
|
|
462
|
+
* the 95% case without adding a dependency.
|
|
463
|
+
*/
|
|
464
|
+
declare function matchesPatterns(filename: string, patterns: string[]): boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Scan memoryDir recursively for binary files matching the configured patterns.
|
|
467
|
+
* Returns relative paths (relative to memoryDir) for files not yet tracked.
|
|
468
|
+
*/
|
|
469
|
+
declare function scanForBinaries(memoryDir: string, config: BinaryLifecycleConfig, manifest: BinaryLifecycleManifest): Promise<string[]>;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Binary lifecycle manifest — read/write operations.
|
|
473
|
+
*
|
|
474
|
+
* The manifest lives at `${memoryDir}/.binary-lifecycle/manifest.json`.
|
|
475
|
+
* Writes use the atomic temp-then-rename pattern (CLAUDE.md #54).
|
|
476
|
+
*/
|
|
477
|
+
|
|
478
|
+
declare function manifestDir(memoryDir: string): string;
|
|
479
|
+
declare function manifestPath(memoryDir: string): string;
|
|
480
|
+
/**
|
|
481
|
+
* Read the manifest from disk. Returns a fresh empty manifest if the file
|
|
482
|
+
* does not exist or contains invalid JSON (CLAUDE.md #18).
|
|
483
|
+
*/
|
|
484
|
+
declare function readManifest(memoryDir: string): Promise<BinaryLifecycleManifest>;
|
|
485
|
+
/**
|
|
486
|
+
* Write the manifest atomically: write to a temp file, then rename.
|
|
487
|
+
* CLAUDE.md #54: never delete before write. Write temp first, rename atomically.
|
|
488
|
+
*/
|
|
489
|
+
declare function writeManifest(memoryDir: string, manifest: BinaryLifecycleManifest): Promise<void>;
|
|
490
|
+
declare function emptyManifest(): BinaryLifecycleManifest;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Binary lifecycle pipeline — mirror, redirect, clean.
|
|
494
|
+
*
|
|
495
|
+
* Three-stage pipeline:
|
|
496
|
+
* 1. Mirror: upload binary to backend, record in manifest
|
|
497
|
+
* 2. Redirect: scan markdown for inline refs, replace with redirect path
|
|
498
|
+
* 3. Clean: after grace period, delete local copy
|
|
499
|
+
*/
|
|
500
|
+
|
|
501
|
+
/** Minimal logger interface so we don't depend on the full logger module. */
|
|
502
|
+
interface PipelineLogger {
|
|
503
|
+
info(msg: string): void;
|
|
504
|
+
warn(msg: string): void;
|
|
505
|
+
error(msg: string): void;
|
|
506
|
+
}
|
|
507
|
+
interface PipelineOptions {
|
|
508
|
+
dryRun?: boolean;
|
|
509
|
+
/** Force-clean all files past grace period, ignoring redirect status. */
|
|
510
|
+
forceClean?: boolean;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Run the binary lifecycle pipeline: scan, mirror, redirect, clean.
|
|
514
|
+
*/
|
|
515
|
+
declare function runBinaryLifecyclePipeline(memoryDir: string, config: BinaryLifecycleConfig, backend: BinaryStorageBackend, log: PipelineLogger, opts?: PipelineOptions): Promise<PipelineResult>;
|
|
516
|
+
|
|
230
517
|
/**
|
|
231
518
|
* @remnic/core — Workspace Tree Projection
|
|
232
519
|
*
|
|
@@ -656,12 +943,204 @@ declare function watchForChanges(options: SyncOptions, onChange: (changes: FileC
|
|
|
656
943
|
stop: () => void;
|
|
657
944
|
};
|
|
658
945
|
|
|
946
|
+
/**
|
|
947
|
+
* Coerce the `installExtension` config value from a string (e.g. from CLI
|
|
948
|
+
* `--config installExtension=false`) to a proper boolean.
|
|
949
|
+
*
|
|
950
|
+
* Delegates to the generic `coerceBool` helper. Kept for backward compatibility.
|
|
951
|
+
*/
|
|
952
|
+
declare function coerceInstallExtension(value: unknown): boolean | undefined;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* codex-materialize-runner.ts — Thin I/O bridge for the Codex materializer.
|
|
956
|
+
*
|
|
957
|
+
* The pure rendering logic lives in {@link ./codex-materialize.js}. This file
|
|
958
|
+
* is the place callers (consolidation hooks, CLI, session-end hook) go when
|
|
959
|
+
* they want the whole "load memories from storage → render → write" flow.
|
|
960
|
+
*
|
|
961
|
+
* Kept deliberately small so #378 never has to reach into orchestrator.ts /
|
|
962
|
+
* importance.ts — the two files Wave 1 agents are editing concurrently.
|
|
963
|
+
*/
|
|
964
|
+
|
|
965
|
+
/** Options accepted by the shared post-consolidation materialize helper. */
|
|
966
|
+
interface PostConsolidationMaterializeOptions {
|
|
967
|
+
config: PluginConfig;
|
|
968
|
+
namespace?: string;
|
|
969
|
+
memories?: MemoryFile[];
|
|
970
|
+
memoryDir?: string;
|
|
971
|
+
codexHome?: string;
|
|
972
|
+
rolloutSummaries?: RolloutSummaryInput[];
|
|
973
|
+
now?: Date;
|
|
974
|
+
}
|
|
975
|
+
/** Options accepted by the runner. */
|
|
976
|
+
interface RunMaterializeOptions {
|
|
977
|
+
/** Remnic config — we only read the `codexMaterialize*` fields. */
|
|
978
|
+
config: PluginConfig;
|
|
979
|
+
/** Namespace to materialize. Overrides the config's `codexMaterializeNamespace`. */
|
|
980
|
+
namespace?: string;
|
|
981
|
+
/** Override the memory directory (defaults to `config.memoryDir`). */
|
|
982
|
+
memoryDir?: string;
|
|
983
|
+
/** Override `<codex_home>` (useful for tests). */
|
|
984
|
+
codexHome?: string;
|
|
985
|
+
/** Optional pre-loaded memories (bypasses disk read — used in tests). */
|
|
986
|
+
memories?: MemoryFile[];
|
|
987
|
+
/** Optional rollout summaries supplied by the caller. */
|
|
988
|
+
rolloutSummaries?: RolloutSummaryInput[];
|
|
989
|
+
/** Current time injection for deterministic runs. */
|
|
990
|
+
now?: Date;
|
|
991
|
+
/** Reason string — logged for observability. */
|
|
992
|
+
reason?: "consolidation" | "session_end" | "manual" | "cli";
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Run the Codex materialization end-to-end. Returns `null` when the feature
|
|
996
|
+
* is disabled in config or when the user hasn't opted in via the sentinel.
|
|
997
|
+
* Never throws for "expected" skips; only throws on schema validation or I/O
|
|
998
|
+
* errors that callers actually need to surface.
|
|
999
|
+
*/
|
|
1000
|
+
declare function runCodexMaterialize(options: RunMaterializeOptions): Promise<MaterializeResult | null>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Shared helper for post-consolidation materialize hooks.
|
|
1003
|
+
*
|
|
1004
|
+
* `materializeAfterSemanticConsolidation` and `materializeAfterCausalConsolidation`
|
|
1005
|
+
* used to be two nearly-identical copies of this logic; keeping the actual
|
|
1006
|
+
* body here means any future guard/logging change happens in one place.
|
|
1007
|
+
*
|
|
1008
|
+
* The only per-caller knob is `logPrefix`, which is used to tag the
|
|
1009
|
+
* non-fatal warning emitted when the materializer throws.
|
|
1010
|
+
*/
|
|
1011
|
+
declare function runPostConsolidationMaterialize(logPrefix: string, options: PostConsolidationMaterializeOptions): Promise<MaterializeResult | null>;
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* codex-marketplace.ts — Codex marketplace installation support (#418)
|
|
1015
|
+
*
|
|
1016
|
+
* Provides types and functions for integrating Remnic with the Codex CLI
|
|
1017
|
+
* marketplace system (`codex marketplace add`). This module handles:
|
|
1018
|
+
*
|
|
1019
|
+
* - Generating a `marketplace.json` manifest describing Remnic as an
|
|
1020
|
+
* installable plugin in the Codex marketplace ecosystem.
|
|
1021
|
+
* - Validating marketplace manifest files against the expected schema.
|
|
1022
|
+
* - Writing manifests to disk atomically.
|
|
1023
|
+
* - Installing plugins from marketplace sources (GitHub, git, local, URL).
|
|
1024
|
+
*
|
|
1025
|
+
* Privacy
|
|
1026
|
+
* -------
|
|
1027
|
+
* This module does not persist any user content. It only reads package
|
|
1028
|
+
* metadata (name, version, description) and writes public marketplace
|
|
1029
|
+
* manifest files.
|
|
1030
|
+
*/
|
|
1031
|
+
|
|
1032
|
+
/** Source type for marketplace installation. */
|
|
1033
|
+
type MarketplaceInstallType = "github" | "git" | "local" | "url";
|
|
1034
|
+
/** A single plugin entry within a marketplace manifest. */
|
|
1035
|
+
interface MarketplaceEntry {
|
|
1036
|
+
/** Plugin name (e.g. "remnic"). */
|
|
1037
|
+
name: string;
|
|
1038
|
+
/** Semver version string. */
|
|
1039
|
+
version: string;
|
|
1040
|
+
/** Human-readable description. */
|
|
1041
|
+
description: string;
|
|
1042
|
+
/** Repository identifier (e.g. "joshuaswarren/remnic"). */
|
|
1043
|
+
repository: string;
|
|
1044
|
+
/** How this plugin should be installed. */
|
|
1045
|
+
installType: MarketplaceInstallType;
|
|
1046
|
+
/** Optional direct URL to the plugin manifest. */
|
|
1047
|
+
manifestUrl?: string;
|
|
1048
|
+
/** Optional entry point path within the repository. */
|
|
1049
|
+
entry?: string;
|
|
1050
|
+
/** Optional config schema reference. */
|
|
1051
|
+
configSchema?: string;
|
|
1052
|
+
}
|
|
1053
|
+
/** Top-level marketplace manifest. */
|
|
1054
|
+
interface MarketplaceManifest {
|
|
1055
|
+
/** Schema version. Must be 1. */
|
|
1056
|
+
version: 1;
|
|
1057
|
+
/** Marketplace name. */
|
|
1058
|
+
name: string;
|
|
1059
|
+
/** Human-readable description. */
|
|
1060
|
+
description: string;
|
|
1061
|
+
/** Available plugins. */
|
|
1062
|
+
plugins: MarketplaceEntry[];
|
|
1063
|
+
}
|
|
1064
|
+
/** Configuration for the marketplace subsystem. */
|
|
1065
|
+
interface MarketplaceConfig {
|
|
1066
|
+
/** Whether marketplace features are enabled. Default: true. */
|
|
1067
|
+
enabled: boolean;
|
|
1068
|
+
/** Local path where marketplace data is cached. */
|
|
1069
|
+
registryPath: string;
|
|
1070
|
+
/** Whether to auto-update marketplace data on install. Default: false. */
|
|
1071
|
+
autoUpdate: boolean;
|
|
1072
|
+
}
|
|
1073
|
+
/** Result of a marketplace install operation. */
|
|
1074
|
+
interface MarketplaceInstallResult {
|
|
1075
|
+
/** Whether the install succeeded. */
|
|
1076
|
+
ok: boolean;
|
|
1077
|
+
/** Human-readable message. */
|
|
1078
|
+
message: string;
|
|
1079
|
+
/** Source that was installed from. */
|
|
1080
|
+
source: string;
|
|
1081
|
+
/** Source type. */
|
|
1082
|
+
sourceType: MarketplaceInstallType;
|
|
1083
|
+
/** Plugins that were discovered. */
|
|
1084
|
+
pluginsFound: string[];
|
|
1085
|
+
/** Errors encountered (empty on success). */
|
|
1086
|
+
errors: string[];
|
|
1087
|
+
}
|
|
1088
|
+
/** Logger interface accepted by marketplace functions. */
|
|
1089
|
+
interface MarketplaceLogger {
|
|
1090
|
+
info: (msg: string) => void;
|
|
1091
|
+
warn: (msg: string) => void;
|
|
1092
|
+
debug?: (msg: string) => void;
|
|
1093
|
+
}
|
|
1094
|
+
/** Current marketplace schema version. */
|
|
1095
|
+
declare const MARKETPLACE_SCHEMA_VERSION: 1;
|
|
1096
|
+
/** Default marketplace manifest filename. */
|
|
1097
|
+
declare const MARKETPLACE_MANIFEST_FILENAME = "marketplace.json";
|
|
1098
|
+
/**
|
|
1099
|
+
* Generate a marketplace manifest describing Remnic as an installable plugin.
|
|
1100
|
+
*
|
|
1101
|
+
* Reads version from the workspace root `package.json` at the resolved path,
|
|
1102
|
+
* or falls back to a default version string.
|
|
1103
|
+
*/
|
|
1104
|
+
declare function generateMarketplaceManifest(options?: {
|
|
1105
|
+
packageVersion?: string;
|
|
1106
|
+
}): MarketplaceManifest;
|
|
1107
|
+
/** Validation result with structured errors. */
|
|
1108
|
+
interface MarketplaceValidation {
|
|
1109
|
+
valid: boolean;
|
|
1110
|
+
errors: string[];
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Validate that an unknown value conforms to the MarketplaceManifest schema.
|
|
1114
|
+
*
|
|
1115
|
+
* Returns a typed manifest on success. Throws on invalid input with a
|
|
1116
|
+
* descriptive error message listing all schema violations.
|
|
1117
|
+
*/
|
|
1118
|
+
declare function validateMarketplaceManifest(manifest: unknown): MarketplaceManifest;
|
|
1119
|
+
/**
|
|
1120
|
+
* Non-throwing validation. Returns a structured result with error details.
|
|
1121
|
+
*/
|
|
1122
|
+
declare function checkMarketplaceManifest(manifest: unknown): MarketplaceValidation;
|
|
1123
|
+
/**
|
|
1124
|
+
* Write a marketplace manifest to disk atomically.
|
|
1125
|
+
*
|
|
1126
|
+
* Uses write-to-temp-then-rename to avoid partial writes (CLAUDE.md gotcha #54).
|
|
1127
|
+
*/
|
|
1128
|
+
declare function writeMarketplaceManifest(outputDir: string, manifest: MarketplaceManifest): Promise<void>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Install from a marketplace source.
|
|
1131
|
+
*
|
|
1132
|
+
* Reads the marketplace.json from the given source, validates it, and
|
|
1133
|
+
* returns a result describing what was found.
|
|
1134
|
+
*/
|
|
1135
|
+
declare function installFromMarketplace(source: string, sourceType: MarketplaceInstallType, config: PluginConfig, logger?: MarketplaceLogger): Promise<MarketplaceInstallResult>;
|
|
1136
|
+
|
|
659
1137
|
/**
|
|
660
1138
|
* @remnic/core — Connector Manager
|
|
661
1139
|
*
|
|
662
1140
|
* Metadata-driven registry for host adapters (Codex CLI, Claude Code, Cursor, etc.).
|
|
663
1141
|
* Manages connector lifecycle: install, remove, configure, health.
|
|
664
1142
|
*/
|
|
1143
|
+
|
|
665
1144
|
interface ConnectorManifest {
|
|
666
1145
|
/** Unique connector ID (e.g. "claude-code", "codex-cli") */
|
|
667
1146
|
id: string;
|
|
@@ -685,6 +1164,15 @@ interface ConnectorManifest {
|
|
|
685
1164
|
repository?: string;
|
|
686
1165
|
/** Tags */
|
|
687
1166
|
tags?: string[];
|
|
1167
|
+
/**
|
|
1168
|
+
* Whether this connector requires a bearer token for daemon authentication.
|
|
1169
|
+
* When false (the default), installConnector will NOT generate or persist a
|
|
1170
|
+
* token entry in tokens.json — credentials are never materialized on disk for
|
|
1171
|
+
* connectors that use MCP, embedded, CLI, or SDK transports that don't need
|
|
1172
|
+
* token auth. Set to true only for HTTP connectors that actually authenticate
|
|
1173
|
+
* requests with a bearer token (e.g. hermes, replit, generic-mcp).
|
|
1174
|
+
*/
|
|
1175
|
+
requiresToken?: boolean;
|
|
688
1176
|
}
|
|
689
1177
|
interface ConnectorCapability {
|
|
690
1178
|
/** Can observe conversations */
|
|
@@ -751,6 +1239,10 @@ interface RemoveResult {
|
|
|
751
1239
|
configPath: string;
|
|
752
1240
|
/** Message */
|
|
753
1241
|
message: string;
|
|
1242
|
+
/** Status: "removed" on success, "error" if the removal failed partway, "not_found" if the connector was not installed, "skipped" if removal was aborted (e.g. malformed config). */
|
|
1243
|
+
status: "removed" | "error" | "not_found" | "skipped";
|
|
1244
|
+
/** Machine-readable skip reason (present when status === "skipped"). */
|
|
1245
|
+
reason?: string;
|
|
754
1246
|
}
|
|
755
1247
|
interface DoctorResult {
|
|
756
1248
|
/** Connector ID */
|
|
@@ -768,6 +1260,7 @@ interface DoctorCheck {
|
|
|
768
1260
|
/** Detail */
|
|
769
1261
|
detail: string;
|
|
770
1262
|
}
|
|
1263
|
+
|
|
771
1264
|
declare function loadRegistry(): ConnectorRegistry;
|
|
772
1265
|
declare function saveRegistry(registry: ConnectorRegistry): void;
|
|
773
1266
|
declare function listConnectors(): {
|
|
@@ -920,4 +1413,529 @@ declare function mergeSpaces(sourceSpaceId: string, targetSpaceId: string, optio
|
|
|
920
1413
|
}): MergeResult;
|
|
921
1414
|
declare function getAuditLog(baseDir?: string): AuditEntry[];
|
|
922
1415
|
|
|
923
|
-
|
|
1416
|
+
/**
|
|
1417
|
+
* @remnic/core — Memory Extension Publisher Contract
|
|
1418
|
+
*
|
|
1419
|
+
* Defines the interface that every host-specific publisher must implement.
|
|
1420
|
+
* Each publisher knows how to write Remnic instruction files into the
|
|
1421
|
+
* host's extension directory so the host agent can discover and use
|
|
1422
|
+
* Remnic memories.
|
|
1423
|
+
*/
|
|
1424
|
+
/**
|
|
1425
|
+
* A publisher that can install (and remove) Remnic memory-extension
|
|
1426
|
+
* artefacts into a specific host's extension directory.
|
|
1427
|
+
*/
|
|
1428
|
+
interface MemoryExtensionPublisher {
|
|
1429
|
+
/** Unique host identifier (e.g. "codex", "claude-code", "hermes"). */
|
|
1430
|
+
readonly hostId: string;
|
|
1431
|
+
/**
|
|
1432
|
+
* Resolve the absolute path to the extension root for this host.
|
|
1433
|
+
* @param env Optional environment to read HOME / host-specific vars from.
|
|
1434
|
+
*/
|
|
1435
|
+
resolveExtensionRoot(env?: NodeJS.ProcessEnv): Promise<string>;
|
|
1436
|
+
/** Return true when the host toolchain appears to be installed locally. */
|
|
1437
|
+
isHostAvailable(): Promise<boolean>;
|
|
1438
|
+
/** Render the full instructions markdown that will be written to disk. */
|
|
1439
|
+
renderInstructions(ctx: PublishContext): Promise<string>;
|
|
1440
|
+
/** Write extension artefacts to the host's extension directory. */
|
|
1441
|
+
publish(ctx: PublishContext): Promise<PublishResult>;
|
|
1442
|
+
/** Remove extension artefacts previously written by publish(). */
|
|
1443
|
+
unpublish(): Promise<void>;
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* Context passed to every publisher method that needs configuration,
|
|
1447
|
+
* paths, or logging.
|
|
1448
|
+
*/
|
|
1449
|
+
interface PublishContext {
|
|
1450
|
+
readonly config: {
|
|
1451
|
+
memoryDir: string;
|
|
1452
|
+
daemonPort?: number;
|
|
1453
|
+
namespace?: string;
|
|
1454
|
+
};
|
|
1455
|
+
readonly skillsRoot: string;
|
|
1456
|
+
readonly log: {
|
|
1457
|
+
info: (msg: string) => void;
|
|
1458
|
+
warn: (msg: string) => void;
|
|
1459
|
+
error: (msg: string) => void;
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
/** Result returned by a successful publish() call. */
|
|
1463
|
+
interface PublishResult {
|
|
1464
|
+
readonly hostId: string;
|
|
1465
|
+
readonly extensionRoot: string;
|
|
1466
|
+
readonly filesWritten: string[];
|
|
1467
|
+
readonly skipped: string[];
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
* Declarative capability flags that describe what a given publisher
|
|
1471
|
+
* can produce. Useful for feature-gating UI or doctor output without
|
|
1472
|
+
* instantiating the publisher.
|
|
1473
|
+
*/
|
|
1474
|
+
interface PublisherCapabilities {
|
|
1475
|
+
/** Whether the publisher writes an instructions.md file. */
|
|
1476
|
+
readonly instructionsMd: boolean;
|
|
1477
|
+
/** Whether the publisher populates a skills folder. */
|
|
1478
|
+
readonly skillsFolder: boolean;
|
|
1479
|
+
/** Whether the publisher embeds citation format guidance. */
|
|
1480
|
+
readonly citationFormat: boolean;
|
|
1481
|
+
/** Whether the publisher includes a read-path template for the host. */
|
|
1482
|
+
readonly readPathTemplate: boolean;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* @remnic/core — Shared Instruction Blocks
|
|
1487
|
+
*
|
|
1488
|
+
* Reusable markdown fragments that every host-specific publisher can
|
|
1489
|
+
* compose into its instructions.md file. Keeping them here avoids
|
|
1490
|
+
* per-host copy-paste drift.
|
|
1491
|
+
*/
|
|
1492
|
+
/**
|
|
1493
|
+
* Describes the Remnic memory types a host agent may encounter.
|
|
1494
|
+
*/
|
|
1495
|
+
declare const REMNIC_SEMANTIC_OVERVIEW = "## Remnic Memory Types\n\nRemnic stores memories as plain Markdown files with YAML front-matter.\nEach memory has a **type** that describes its semantic role:\n\n| Type | Description |\n|------|-------------|\n| `fact` | An objective piece of knowledge the user confirmed or that was extracted from a session. |\n| `preference` | A stated or inferred user preference (e.g. coding style, tool choice). |\n| `decision` | An explicit decision or trade-off the user made. |\n| `entity` | A named thing the user cares about (project, service, person, API). |\n| `skill` | A reusable workflow or procedure documented for future sessions. |\n| `correction` | A fix or amendment to a previously stored memory. |\n| `question` | An open question or uncertainty flagged for future resolution. |\n| `observation` | A pattern noticed across sessions (e.g. \"user always runs tests before commits\"). |\n| `summary` | A condensed roll-up of recent sessions or a topic area. |\n\nWhen reading Remnic content, the front-matter `type` field tells you what\nkind of knowledge you are looking at and how much weight to give it.\n";
|
|
1496
|
+
/**
|
|
1497
|
+
* Explains the oai-mem-citation block format hosts should use when
|
|
1498
|
+
* referencing Remnic-sourced content.
|
|
1499
|
+
*/
|
|
1500
|
+
declare const REMNIC_CITATION_FORMAT = "## Citing Remnic Memories\n\nWhen a piece of your output draws on a Remnic file, cite it using the\nmemory citation block format so the user can trace the source:\n\n```\n<oai-mem-citation path=\"<path-relative-to-remnic-memory-base>\" />\n```\n\nThe path must be **relative to the Remnic memory base** (the directory\nnamed `memories/` under `<remnic-home>`), not absolute. Examples:\n\n- `<oai-mem-citation path=\"default/MEMORY.md\" />`\n- `<oai-mem-citation path=\"my-project/skills/deploy/SKILL.md\" />`\n- `<oai-mem-citation path=\"shared/memory_summary.md\" />`\n\nCite each distinct source once near the fact it supports. Do not invent\ncitations for files you have not actually read.\n";
|
|
1501
|
+
/**
|
|
1502
|
+
* Table of MCP tools the Remnic daemon exposes. Hosts that can reach
|
|
1503
|
+
* the MCP server should prefer these over raw file reads.
|
|
1504
|
+
*
|
|
1505
|
+
* Tool names use the canonical `remnic.*` prefix. Legacy `engram.*`
|
|
1506
|
+
* aliases are also accepted by the server for backward compatibility.
|
|
1507
|
+
*/
|
|
1508
|
+
declare const REMNIC_MCP_TOOL_INVENTORY = "## Remnic MCP Tools\n\nWhen the Remnic MCP server is reachable, the following tools are\navailable. Prefer MCP tools over direct file reads when the host\nsupports MCP connections.\n\n| Tool | Purpose |\n|------|---------|\n| `remnic.recall` | Retrieve contextually relevant memories for the current session. |\n| `remnic.recall_explain` | Like recall, but includes an explanation of why each memory was selected. |\n| `remnic.memory_store` | Persist a new memory (fact, preference, decision, etc.). |\n| `remnic.memory_get` | Fetch a specific memory by ID. |\n| `remnic.memory_search` | Full-text + semantic search across all memories. |\n| `remnic.memory_timeline` | Retrieve memories in chronological order within a time range. |\n| `remnic.observe` | Record an observation from the current conversation turn. |\n| `remnic.entity_get` | Look up a named entity and its relationships. |\n| `remnic.memory_entities_list` | List all known entities. |\n| `remnic.memory_profile` | Retrieve the user profile summary. |\n| `remnic.day_summary` | Generate a summary of memories from a specific day. |\n| `remnic.briefing` | Generate a structured briefing for an upcoming session. |\n| `remnic.memory_feedback` | Submit feedback on a recalled memory (useful, outdated, wrong). |\n| `remnic.memory_promote` | Promote a memory to a higher confidence tier. |\n| `remnic.context_checkpoint` | Save a conversation checkpoint for continuity. |\n| `remnic.suggestion_submit` | Submit a suggestion for a new memory to the review queue. |\n| `remnic.review_queue_list` | List pending suggestions in the review queue. |\n| `remnic.work_task` | Create or update a work task. |\n| `remnic.work_project` | Create or update a work project. |\n| `remnic.work_board` | View the work board. |\n\nLegacy `engram.*` prefixed names are accepted as aliases for all tools.\n";
|
|
1509
|
+
/**
|
|
1510
|
+
* Decision rules for when a host agent should use MCP recall vs
|
|
1511
|
+
* reading Remnic files directly from disk.
|
|
1512
|
+
*/
|
|
1513
|
+
declare const REMNIC_RECALL_DECISION_RULES = "## When to Use Recall vs Direct Read\n\n### Use `remnic.recall` (MCP) when:\n\n- The Remnic MCP server is reachable (the host has an active MCP\n connection to the Remnic daemon).\n- You want contextually relevant memories ranked by the recall planner\n (semantic search + reranking + importance scoring).\n- You need memories across multiple namespaces or topics.\n- The conversation benefits from Remnic's intent detection and\n adaptive recall depth.\n\n### Use direct file reads when:\n\n- You are in a sandboxed environment with no network or MCP access\n (e.g. Codex phase-2 consolidation).\n- You need a specific file you already know the path to.\n- The MCP server is unavailable or unhealthy.\n- You are operating on the raw memory files for maintenance or\n migration purposes.\n\n### General guidance:\n\n- Prefer MCP tools when available \u2014 they provide ranked, deduplicated,\n and context-aware results.\n- Fall back to file reads gracefully \u2014 never block on a failed MCP call\n when the data is also on disk.\n- Never write directly to the Remnic memory directory unless you are an\n authorized extraction or consolidation process.\n";
|
|
1514
|
+
|
|
1515
|
+
/**
|
|
1516
|
+
* @remnic/core — Codex Memory Extension Publisher
|
|
1517
|
+
*
|
|
1518
|
+
* Writes Remnic instructions into ~/.codex/memories_extensions/remnic/
|
|
1519
|
+
* so the Codex agent can discover and use Remnic memories during its
|
|
1520
|
+
* consolidation phase.
|
|
1521
|
+
*/
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* Codex-specific publisher that knows the Codex extension layout:
|
|
1525
|
+
* ~/.codex/memories_extensions/remnic/instructions.md
|
|
1526
|
+
*/
|
|
1527
|
+
declare class CodexMemoryExtensionPublisher implements MemoryExtensionPublisher {
|
|
1528
|
+
readonly hostId = "codex";
|
|
1529
|
+
static readonly capabilities: PublisherCapabilities;
|
|
1530
|
+
resolveExtensionRoot(env?: NodeJS.ProcessEnv): Promise<string>;
|
|
1531
|
+
isHostAvailable(): Promise<boolean>;
|
|
1532
|
+
renderInstructions(ctx: PublishContext): Promise<string>;
|
|
1533
|
+
publish(ctx: PublishContext): Promise<PublishResult>;
|
|
1534
|
+
unpublish(): Promise<void>;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* @remnic/core — Claude Code Memory Extension Publisher (stub)
|
|
1539
|
+
*
|
|
1540
|
+
* Placeholder publisher for Claude Code. Claude Code does not yet
|
|
1541
|
+
* support a file-based memory extension directory, so all methods are
|
|
1542
|
+
* no-ops that return safe defaults.
|
|
1543
|
+
*/
|
|
1544
|
+
|
|
1545
|
+
declare class ClaudeCodeMemoryExtensionPublisher implements MemoryExtensionPublisher {
|
|
1546
|
+
readonly hostId = "claude-code";
|
|
1547
|
+
static readonly capabilities: PublisherCapabilities;
|
|
1548
|
+
resolveExtensionRoot(): Promise<string>;
|
|
1549
|
+
isHostAvailable(): Promise<boolean>;
|
|
1550
|
+
renderInstructions(_ctx: PublishContext): Promise<string>;
|
|
1551
|
+
publish(_ctx: PublishContext): Promise<PublishResult>;
|
|
1552
|
+
unpublish(): Promise<void>;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* @remnic/core — Hermes Memory Extension Publisher (stub)
|
|
1557
|
+
*
|
|
1558
|
+
* Placeholder publisher for Hermes. Hermes uses a daemon-based
|
|
1559
|
+
* transport and does not currently consume file-based memory
|
|
1560
|
+
* extensions, so all methods are no-ops.
|
|
1561
|
+
*/
|
|
1562
|
+
|
|
1563
|
+
declare class HermesMemoryExtensionPublisher implements MemoryExtensionPublisher {
|
|
1564
|
+
readonly hostId = "hermes";
|
|
1565
|
+
static readonly capabilities: PublisherCapabilities;
|
|
1566
|
+
resolveExtensionRoot(): Promise<string>;
|
|
1567
|
+
isHostAvailable(): Promise<boolean>;
|
|
1568
|
+
renderInstructions(_ctx: PublishContext): Promise<string>;
|
|
1569
|
+
publish(_ctx: PublishContext): Promise<PublishResult>;
|
|
1570
|
+
unpublish(): Promise<void>;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* @remnic/core — Memory Extension Publisher Registry
|
|
1575
|
+
*
|
|
1576
|
+
* Generic registry that host adapters populate at startup via
|
|
1577
|
+
* `registerPublisher()`. The publisher *classes* live in core so
|
|
1578
|
+
* adapters can import them, but the wiring of host-specific
|
|
1579
|
+
* implementations into the registry happens in the host adapter
|
|
1580
|
+
* layer (e.g. @remnic/cli), not here. This keeps core free of
|
|
1581
|
+
* host-specific knowledge (CLAUDE.md gotcha #31).
|
|
1582
|
+
*
|
|
1583
|
+
* Usage (from a host adapter):
|
|
1584
|
+
* import { registerPublisher, CodexMemoryExtensionPublisher } from "@remnic/core";
|
|
1585
|
+
* registerPublisher("codex", () => new CodexMemoryExtensionPublisher());
|
|
1586
|
+
*/
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* Factory registry keyed by host ID. Each value is a zero-argument
|
|
1590
|
+
* factory that returns a fresh publisher instance.
|
|
1591
|
+
*
|
|
1592
|
+
* Starts empty — host adapters populate it via registerPublisher().
|
|
1593
|
+
*/
|
|
1594
|
+
declare const PUBLISHERS: Record<string, () => MemoryExtensionPublisher>;
|
|
1595
|
+
/**
|
|
1596
|
+
* Register a publisher factory for a given host ID.
|
|
1597
|
+
*
|
|
1598
|
+
* Host adapters call this at startup to wire their host-specific
|
|
1599
|
+
* publisher implementations into the registry. Calling with an
|
|
1600
|
+
* existing hostId replaces the previous factory.
|
|
1601
|
+
*/
|
|
1602
|
+
declare function registerPublisher(hostId: string, factory: () => MemoryExtensionPublisher): void;
|
|
1603
|
+
/**
|
|
1604
|
+
* Resolve a connector ID to its publisher host ID.
|
|
1605
|
+
*
|
|
1606
|
+
* Returns the explicit mapping if one exists, otherwise returns
|
|
1607
|
+
* the connector ID itself (identity mapping covers the common case
|
|
1608
|
+
* where connector ID === host ID).
|
|
1609
|
+
*/
|
|
1610
|
+
declare function hostIdForConnector(connectorId: string): string;
|
|
1611
|
+
/**
|
|
1612
|
+
* Look up a publisher by host ID.
|
|
1613
|
+
* Returns undefined for unknown host IDs rather than throwing.
|
|
1614
|
+
*/
|
|
1615
|
+
declare function publisherFor(hostId: string): MemoryExtensionPublisher | undefined;
|
|
1616
|
+
/**
|
|
1617
|
+
* Look up a publisher by connector ID.
|
|
1618
|
+
*
|
|
1619
|
+
* Resolves the connector ID to its host ID first (e.g. "codex-cli" -> "codex"),
|
|
1620
|
+
* then looks up the publisher. Returns undefined if no publisher exists for
|
|
1621
|
+
* the resolved host ID.
|
|
1622
|
+
*/
|
|
1623
|
+
declare function publisherForConnector(connectorId: string): MemoryExtensionPublisher | undefined;
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* Default MECE taxonomy that maps every existing MemoryCategory value
|
|
1627
|
+
* to exactly one taxonomy category, ordered by priority.
|
|
1628
|
+
*/
|
|
1629
|
+
|
|
1630
|
+
declare const DEFAULT_TAXONOMY: Taxonomy;
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* Resolver decision tree for the MECE taxonomy.
|
|
1634
|
+
*
|
|
1635
|
+
* Given extracted content and its MemoryCategory, determines which
|
|
1636
|
+
* taxonomy category the knowledge should be filed under.
|
|
1637
|
+
*/
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* Resolve a piece of content to a taxonomy category.
|
|
1641
|
+
*
|
|
1642
|
+
* Algorithm:
|
|
1643
|
+
* 1. Find all taxonomy categories whose `memoryCategories` include
|
|
1644
|
+
* the given `memoryCategory`.
|
|
1645
|
+
* 2. If exactly one match, return it with confidence 1.0.
|
|
1646
|
+
* 3. If multiple matches, pick the one with the lowest priority
|
|
1647
|
+
* number (highest precedence). Apply keyword heuristics from
|
|
1648
|
+
* filing rules as a secondary signal.
|
|
1649
|
+
* 4. If no match, fall back to the "facts" category (or first
|
|
1650
|
+
* category if "facts" is absent) with low confidence.
|
|
1651
|
+
* 5. Always populate `alternatives` with other plausible categories.
|
|
1652
|
+
*/
|
|
1653
|
+
declare function resolveCategory(content: string, memoryCategory: MemoryCategory, taxonomy: Taxonomy): ResolverDecision;
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* Generates a markdown decision-tree document (RESOLVER.md) from a
|
|
1657
|
+
* taxonomy definition.
|
|
1658
|
+
*
|
|
1659
|
+
* The document walks a user through filing a new piece of knowledge
|
|
1660
|
+
* by checking each category in priority order (lowest number first).
|
|
1661
|
+
*/
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* Produce a markdown decision tree for the given taxonomy.
|
|
1665
|
+
*
|
|
1666
|
+
* Categories are listed in priority order (lowest number = checked first).
|
|
1667
|
+
* Each step asks whether the knowledge fits the category and, if so,
|
|
1668
|
+
* instructs the reader to file it there.
|
|
1669
|
+
*/
|
|
1670
|
+
declare function generateResolverDocument(taxonomy: Taxonomy): string;
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* Loads and validates a user-customized taxonomy from disk, merging
|
|
1674
|
+
* with the built-in defaults.
|
|
1675
|
+
*
|
|
1676
|
+
* User taxonomies are stored at `<memoryDir>/.taxonomy/taxonomy.json`.
|
|
1677
|
+
*/
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* Validate a taxonomy category slug.
|
|
1681
|
+
* Throws if the slug is invalid.
|
|
1682
|
+
*/
|
|
1683
|
+
declare function validateSlug(slug: string): void;
|
|
1684
|
+
/**
|
|
1685
|
+
* Validate an entire taxonomy for structural correctness.
|
|
1686
|
+
* Throws on the first error found.
|
|
1687
|
+
*/
|
|
1688
|
+
declare function validateTaxonomy(taxonomy: Taxonomy): void;
|
|
1689
|
+
/**
|
|
1690
|
+
* Load a taxonomy from the user's memory directory.
|
|
1691
|
+
*
|
|
1692
|
+
* If `<memoryDir>/.taxonomy/taxonomy.json` exists, loads it, validates
|
|
1693
|
+
* it, and merges with the defaults (user categories override defaults
|
|
1694
|
+
* by ID). If the file does not exist, returns the defaults.
|
|
1695
|
+
*/
|
|
1696
|
+
declare function loadTaxonomy(memoryDir: string): Promise<Taxonomy>;
|
|
1697
|
+
/**
|
|
1698
|
+
* Save a taxonomy to the user's memory directory.
|
|
1699
|
+
*/
|
|
1700
|
+
declare function saveTaxonomy(memoryDir: string, taxonomy: Taxonomy): Promise<void>;
|
|
1701
|
+
/**
|
|
1702
|
+
* Get the taxonomy directory path for a given memory directory.
|
|
1703
|
+
*/
|
|
1704
|
+
declare function getTaxonomyDir(memoryDir: string): string;
|
|
1705
|
+
/**
|
|
1706
|
+
* Get the taxonomy file path for a given memory directory.
|
|
1707
|
+
*/
|
|
1708
|
+
declare function getTaxonomyFilePath(memoryDir: string): string;
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Enrichment pipeline types (issue #365).
|
|
1712
|
+
*
|
|
1713
|
+
* Defines the provider interface, candidate shape, pipeline config,
|
|
1714
|
+
* and result types for the external enrichment subsystem.
|
|
1715
|
+
*/
|
|
1716
|
+
|
|
1717
|
+
type EnrichmentCostTier = "free" | "cheap" | "expensive";
|
|
1718
|
+
interface EnrichmentProviderConfig {
|
|
1719
|
+
id: string;
|
|
1720
|
+
enabled: boolean;
|
|
1721
|
+
costTier: EnrichmentCostTier;
|
|
1722
|
+
rateLimit?: {
|
|
1723
|
+
maxPerMinute: number;
|
|
1724
|
+
maxPerDay: number;
|
|
1725
|
+
};
|
|
1726
|
+
}
|
|
1727
|
+
interface EnrichmentCandidate {
|
|
1728
|
+
text: string;
|
|
1729
|
+
source: string;
|
|
1730
|
+
sourceUrl?: string;
|
|
1731
|
+
confidence: number;
|
|
1732
|
+
category: MemoryCategory;
|
|
1733
|
+
tags?: string[];
|
|
1734
|
+
}
|
|
1735
|
+
interface EnrichmentProvider {
|
|
1736
|
+
readonly id: string;
|
|
1737
|
+
readonly costTier: EnrichmentCostTier;
|
|
1738
|
+
enrich(entity: EntityEnrichmentInput): Promise<EnrichmentCandidate[]>;
|
|
1739
|
+
isAvailable(): Promise<boolean>;
|
|
1740
|
+
}
|
|
1741
|
+
interface EntityEnrichmentInput {
|
|
1742
|
+
name: string;
|
|
1743
|
+
type: string;
|
|
1744
|
+
knownFacts: string[];
|
|
1745
|
+
importanceLevel: ImportanceLevel;
|
|
1746
|
+
}
|
|
1747
|
+
interface EnrichmentResult {
|
|
1748
|
+
entityName: string;
|
|
1749
|
+
provider: string;
|
|
1750
|
+
candidatesFound: number;
|
|
1751
|
+
candidatesAccepted: number;
|
|
1752
|
+
candidatesRejected: number;
|
|
1753
|
+
acceptedCandidates: EnrichmentCandidate[];
|
|
1754
|
+
elapsed: number;
|
|
1755
|
+
}
|
|
1756
|
+
interface EnrichmentPipelineConfig {
|
|
1757
|
+
enabled: boolean;
|
|
1758
|
+
providers: EnrichmentProviderConfig[];
|
|
1759
|
+
importanceThresholds: {
|
|
1760
|
+
critical: string[];
|
|
1761
|
+
high: string[];
|
|
1762
|
+
normal: string[];
|
|
1763
|
+
low: string[];
|
|
1764
|
+
};
|
|
1765
|
+
maxCandidatesPerEntity: number;
|
|
1766
|
+
autoEnrichOnCreate: boolean;
|
|
1767
|
+
scheduleIntervalMs: number;
|
|
1768
|
+
}
|
|
1769
|
+
/**
|
|
1770
|
+
* Build a default (disabled) pipeline config. Every consumer that needs a
|
|
1771
|
+
* config object should call this rather than duplicating the defaults.
|
|
1772
|
+
*/
|
|
1773
|
+
declare function defaultEnrichmentPipelineConfig(): EnrichmentPipelineConfig;
|
|
1774
|
+
|
|
1775
|
+
/**
|
|
1776
|
+
* Enrichment provider registry (issue #365).
|
|
1777
|
+
*
|
|
1778
|
+
* Central registry for enrichment providers. Providers register themselves
|
|
1779
|
+
* at startup; the pipeline queries the registry to determine which providers
|
|
1780
|
+
* to run for a given importance tier.
|
|
1781
|
+
*/
|
|
1782
|
+
|
|
1783
|
+
declare class EnrichmentProviderRegistry {
|
|
1784
|
+
private readonly providers;
|
|
1785
|
+
/** Register a provider. Overwrites any existing provider with the same id. */
|
|
1786
|
+
register(provider: EnrichmentProvider): void;
|
|
1787
|
+
/** Look up a single provider by id. */
|
|
1788
|
+
get(id: string): EnrichmentProvider | undefined;
|
|
1789
|
+
/**
|
|
1790
|
+
* Return all registered providers whose id appears in the config's
|
|
1791
|
+
* `providers` list with `enabled: true`.
|
|
1792
|
+
*/
|
|
1793
|
+
listEnabled(config: EnrichmentPipelineConfig): EnrichmentProvider[];
|
|
1794
|
+
/**
|
|
1795
|
+
* Return providers that should run for a given importance level.
|
|
1796
|
+
* Providers are resolved from `config.importanceThresholds[level]` and
|
|
1797
|
+
* filtered to only those that are both registered and enabled.
|
|
1798
|
+
*/
|
|
1799
|
+
getForImportance(level: ImportanceLevel, config: EnrichmentPipelineConfig): EnrichmentProvider[];
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* Web search enrichment provider stub (issue #365).
|
|
1804
|
+
*
|
|
1805
|
+
* A basic provider backed by web search. Since this is opt-in and we do not
|
|
1806
|
+
* want to hard-code an API key, the provider accepts an optional `searchFn`
|
|
1807
|
+
* injection point. When no search function is configured it returns empty
|
|
1808
|
+
* results, making it safe to register unconditionally.
|
|
1809
|
+
*/
|
|
1810
|
+
|
|
1811
|
+
type WebSearchFn = (query: string) => Promise<string[]>;
|
|
1812
|
+
interface WebSearchProviderOptions {
|
|
1813
|
+
/**
|
|
1814
|
+
* Injected search function. Each returned string is treated as a raw
|
|
1815
|
+
* snippet. When `undefined` the provider returns empty results.
|
|
1816
|
+
*/
|
|
1817
|
+
searchFn?: WebSearchFn;
|
|
1818
|
+
}
|
|
1819
|
+
declare class WebSearchProvider implements EnrichmentProvider {
|
|
1820
|
+
readonly id = "web-search";
|
|
1821
|
+
readonly costTier: EnrichmentCostTier;
|
|
1822
|
+
private readonly searchFn;
|
|
1823
|
+
constructor(options?: WebSearchProviderOptions);
|
|
1824
|
+
isAvailable(): Promise<boolean>;
|
|
1825
|
+
enrich(entity: EntityEnrichmentInput): Promise<EnrichmentCandidate[]>;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* Enrichment pipeline orchestrator (issue #365).
|
|
1830
|
+
*
|
|
1831
|
+
* For each entity, determines the importance tier, resolves the providers
|
|
1832
|
+
* to run, executes them in sequence (respecting rate limits), tags
|
|
1833
|
+
* candidates, and caps at `maxCandidatesPerEntity`.
|
|
1834
|
+
*
|
|
1835
|
+
* Accepted candidates are returned in each `EnrichmentResult` via the
|
|
1836
|
+
* `acceptedCandidates` field so that callers can persist them.
|
|
1837
|
+
*/
|
|
1838
|
+
|
|
1839
|
+
declare function runEnrichmentPipeline(entities: EntityEnrichmentInput[], registry: EnrichmentProviderRegistry, config: EnrichmentPipelineConfig, log: LoggerBackend): Promise<EnrichmentResult[]>;
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* Enrichment audit trail (issue #365).
|
|
1843
|
+
*
|
|
1844
|
+
* Append-only JSONL log for every enrichment candidate that was evaluated.
|
|
1845
|
+
* Each entry records whether the candidate was accepted or rejected, the
|
|
1846
|
+
* provider that produced it, and an optional reason string.
|
|
1847
|
+
*/
|
|
1848
|
+
interface EnrichmentAuditEntry {
|
|
1849
|
+
timestamp: string;
|
|
1850
|
+
entityName: string;
|
|
1851
|
+
provider: string;
|
|
1852
|
+
candidateText: string;
|
|
1853
|
+
sourceUrl?: string;
|
|
1854
|
+
accepted: boolean;
|
|
1855
|
+
reason?: string;
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Append a single audit entry to the JSONL log. Creates the audit directory
|
|
1859
|
+
* and file if they do not exist.
|
|
1860
|
+
*/
|
|
1861
|
+
declare function appendAuditEntry(auditDir: string, entry: EnrichmentAuditEntry): Promise<void>;
|
|
1862
|
+
/**
|
|
1863
|
+
* Read the audit log and return entries, optionally filtered to entries at
|
|
1864
|
+
* or after `since` (ISO 8601 timestamp, half-open interval).
|
|
1865
|
+
*/
|
|
1866
|
+
declare function readAuditLog(auditDir: string, since?: string): Promise<EnrichmentAuditEntry[]>;
|
|
1867
|
+
|
|
1868
|
+
/**
|
|
1869
|
+
* Training-data export types.
|
|
1870
|
+
*
|
|
1871
|
+
* Defines the generic interface that format-specific adapters
|
|
1872
|
+
* (WeClone, Axolotl, MLX, etc.) implement to convert Remnic
|
|
1873
|
+
* memories into fine-tuning datasets.
|
|
1874
|
+
*/
|
|
1875
|
+
interface TrainingExportOptions {
|
|
1876
|
+
memoryDir: string;
|
|
1877
|
+
since?: Date;
|
|
1878
|
+
until?: Date;
|
|
1879
|
+
minConfidence?: number;
|
|
1880
|
+
categories?: string[];
|
|
1881
|
+
includeEntities?: boolean;
|
|
1882
|
+
}
|
|
1883
|
+
interface TrainingExportRecord {
|
|
1884
|
+
instruction: string;
|
|
1885
|
+
input: string;
|
|
1886
|
+
output: string;
|
|
1887
|
+
category?: string;
|
|
1888
|
+
confidence?: number;
|
|
1889
|
+
sourceIds?: string[];
|
|
1890
|
+
}
|
|
1891
|
+
interface TrainingExportAdapter {
|
|
1892
|
+
name: string;
|
|
1893
|
+
formatRecords(records: TrainingExportRecord[]): string;
|
|
1894
|
+
fileExtension: string;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* Training-export adapter registry.
|
|
1899
|
+
*
|
|
1900
|
+
* Maintains a name → adapter map so CLI and programmatic callers
|
|
1901
|
+
* can look up format-specific adapters at runtime.
|
|
1902
|
+
*/
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* Register a training-export adapter.
|
|
1906
|
+
*
|
|
1907
|
+
* Rejects empty names and duplicate registrations with an error
|
|
1908
|
+
* listing valid actions (CLAUDE.md rule #51).
|
|
1909
|
+
*/
|
|
1910
|
+
declare function registerTrainingExportAdapter(adapter: TrainingExportAdapter): void;
|
|
1911
|
+
/**
|
|
1912
|
+
* Retrieve a registered adapter by name, or `undefined` if not found.
|
|
1913
|
+
*/
|
|
1914
|
+
declare function getTrainingExportAdapter(name: string): TrainingExportAdapter | undefined;
|
|
1915
|
+
/**
|
|
1916
|
+
* List the names of all registered adapters.
|
|
1917
|
+
*/
|
|
1918
|
+
declare function listTrainingExportAdapters(): string[];
|
|
1919
|
+
/**
|
|
1920
|
+
* Remove all registered adapters. Intended for test teardown only.
|
|
1921
|
+
*/
|
|
1922
|
+
declare function clearTrainingExportAdapters(): void;
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* Training-data converter.
|
|
1926
|
+
*
|
|
1927
|
+
* Reads memory markdown files from a memoryDir, parses YAML
|
|
1928
|
+
* frontmatter, applies filters, and returns TrainingExportRecord[].
|
|
1929
|
+
*
|
|
1930
|
+
* Instruction is derived from the memory's category/tags.
|
|
1931
|
+
* Output is the memory content body.
|
|
1932
|
+
* The `input` field is empty string (synthesis is left to adapters).
|
|
1933
|
+
*/
|
|
1934
|
+
|
|
1935
|
+
/**
|
|
1936
|
+
* Read memories from `memoryDir`, apply option filters, and return
|
|
1937
|
+
* an array of TrainingExportRecord for downstream adapters.
|
|
1938
|
+
*/
|
|
1939
|
+
declare function convertMemoriesToRecords(options: TrainingExportOptions): Promise<TrainingExportRecord[]>;
|
|
1940
|
+
|
|
1941
|
+
export { type AuditEntry, type BinaryAssetRecord, type BinaryAssetStatus, type BinaryLifecycleConfig, type BinaryLifecycleManifest, type BinaryStorageBackend, type BinaryStorageBackendConfig, BulkImportSourceAdapter, ClaudeCodeMemoryExtensionPublisher, CodexMemoryExtensionPublisher, type ConflictEntry, type ConnectorCapability, type ConnectorInstance, type ConnectorManifest, type ConnectorRegistry, type ContradictionOptions, type ContradictionPair, type ContradictionResult$1 as CurateContradictionResult, type DuplicateResult as CurateDuplicateResult, type CurateOptions, type CurateResult, type CuratedStatement, DEFAULT_GRACE_PERIOD_DAYS, DEFAULT_MAX_BINARY_SIZE_BYTES, DEFAULT_SCAN_PATTERNS, DEFAULT_TAXONOMY, type DedupOptions, type DedupResult, DiscoveredExtension, type DocFile, type DoctorCheck, type DoctorResult, type DuplicatePair, type EnrichmentAuditEntry, type EnrichmentCandidate, type EnrichmentCostTier, type EnrichmentPipelineConfig, type EnrichmentProvider, type EnrichmentProviderConfig, EnrichmentProviderRegistry, type EnrichmentResult, type EntityEnrichmentInput, type FileChange, FilesystemBackend, type GenerateOptions, type GenerateResult, HermesMemoryExtensionPublisher, type IngestionPlan, type InstallOptions, type InstallResult, LanceDbBackend, type LanguageInfo, MARKETPLACE_MANIFEST_FILENAME, MARKETPLACE_SCHEMA_VERSION, type MarketplaceConfig, type MarketplaceEntry, type MarketplaceInstallResult, type MarketplaceInstallType, type MarketplaceLogger, type MarketplaceManifest, type MarketplaceValidation, MaterializeResult, MeilisearchBackend, MemoryCategory, type MemoryEntry, type MemoryExtensionPublisher, MemoryFile, type MergeResult, type MigrationOptions, type MigrationResult, NoneBackend, type OnboardOptions, type OnboardResult, OramaBackend, PUBLISHERS, type PipelineResult, PluginConfig, type PostConsolidationMaterializeOptions, type ProjectShape, type ProvenanceEntry, type PublishContext, type PublishResult, type PublisherCapabilities, REMNIC_CITATION_FORMAT, REMNIC_MCP_TOOL_INVENTORY, REMNIC_RECALL_DECISION_RULES, REMNIC_SEMANTIC_OVERVIEW, type RemoveResult, ResolverDecision, type ReviewAction, type ReviewItem, type ReviewListResult, type ReviewOptions, type ReviewResult, type RollbackResult, RolloutSummaryInput, type RunMaterializeOptions, type Space, type SpaceKind, type SpaceManifest, type SpacePromoteResult, type SpacePullResult, type SpacePushResult, type SpaceShareResult, type SpaceSwitchResult, type StatementProvenance, StorageManager, type SyncOptions, type SyncResult, type SyncState, Taxonomy, type TrainingExportAdapter, type TrainingExportOptions, type TrainingExportRecord, type TreeNode, type WebSearchFn, WebSearchProvider, type WebSearchProviderOptions, appendAuditEntry, buildProcedureMarkdownBody, buildProcedureRecallSection, checkMarketplaceManifest, clearBulkImportSources, clearTrainingExportAdapters, coerceInstallExtension, convertMemoriesToRecords, createBackend, createSpace, curate, defaultEnrichmentPipelineConfig, deleteSpace, doctorConnector, emptyManifest, findContradictions, findDuplicates, generateContextTree, generateMarketplaceManifest, generateResolverDocument, getActiveSpace, getAuditLog, getBulkImportSource, getManifestPath, getSpacesDir, getTaxonomyDir, getTaxonomyFilePath, getTrainingExportAdapter, hostIdForConnector, installConnector, installFromMarketplace, listBulkImportSources, listConnectors, listReviewItems, listSpaces, listTrainingExportAdapters, loadManifest, loadRegistry, loadTaxonomy, manifestDir, manifestPath, matchesPatterns, mergeSpaces, migrateFromEngram, onboard, parseProcedureStepsFromBody, performReview, promoteSpace, publisherFor, publisherForConnector, pullFromSpace, pushToSpace, readAuditLog, readManifest, registerBulkImportSource, registerPublisher, registerTrainingExportAdapter, removeConnector, renderExtensionsBlock, renderExtensionsFooter, resolveCategory, resolvePrincipal, rollbackFromEngramMigration, runBinaryLifecyclePipeline, runCodexMaterialize, runEnrichmentPipeline, runPostConsolidationMaterialize, saveManifest, saveRegistry, saveTaxonomy, scanForBinaries, shareSpace, switchSpace, syncChanges, validateMarketplaceManifest, validateSlug, validateTaxonomy, watchForChanges, writeManifest, writeMarketplaceManifest };
|