@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/schemas.js
CHANGED
|
@@ -17,12 +17,13 @@ import {
|
|
|
17
17
|
MemorySummarySchema,
|
|
18
18
|
ProactiveExtractionResultSchema,
|
|
19
19
|
ProactiveQuestionsResultSchema,
|
|
20
|
+
ProcedureStepExtractSchema,
|
|
20
21
|
ProfileConsolidationResultSchema,
|
|
21
22
|
SuggestedLinksSchema,
|
|
22
23
|
buildProfileConsolidationResultSchema,
|
|
23
24
|
parseMemoryActionEligibilityContext,
|
|
24
25
|
parseMemoryActionType
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UEYA6UC7.js";
|
|
26
27
|
export {
|
|
27
28
|
BehaviorLoopAdjustmentSchema,
|
|
28
29
|
BehaviorLoopPolicyStateSchema,
|
|
@@ -42,6 +43,7 @@ export {
|
|
|
42
43
|
MemorySummarySchema,
|
|
43
44
|
ProactiveExtractionResultSchema,
|
|
44
45
|
ProactiveQuestionsResultSchema,
|
|
46
|
+
ProcedureStepExtractSchema,
|
|
45
47
|
ProfileConsolidationResultSchema,
|
|
46
48
|
SuggestedLinksSchema,
|
|
47
49
|
buildProfileConsolidationResultSchema,
|
package/dist/sdk-compat.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ interface SdkCapabilities {
|
|
|
3
3
|
hasBeforePromptBuild: boolean;
|
|
4
4
|
/** api.registerMemoryPromptSection() exists */
|
|
5
5
|
hasRegisterMemoryPromptSection: boolean;
|
|
6
|
+
/** api.registerMemoryCapability() exists (new SDK >=2026.4.5) */
|
|
7
|
+
hasRegisterMemoryCapability: boolean;
|
|
6
8
|
/** definePluginEntry from openclaw/plugin-sdk/plugin-entry is importable */
|
|
7
9
|
hasDefinePluginEntry: boolean;
|
|
8
10
|
/** api.runtime.* namespace exists */
|
package/dist/sdk-compat.js
CHANGED
|
@@ -5,14 +5,17 @@ import {
|
|
|
5
5
|
// src/sdk-compat.ts
|
|
6
6
|
function detectSdkCapabilities(api) {
|
|
7
7
|
const hasRegisterMemoryPromptSection = typeof api.registerMemoryPromptSection === "function";
|
|
8
|
+
const hasRegisterMemoryCapability = typeof api.registerMemoryCapability === "function";
|
|
8
9
|
const hasRuntimeNamespace = typeof api.runtime === "object" && api.runtime !== null;
|
|
9
10
|
const hasRegistrationMode = typeof api.registrationMode === "string";
|
|
10
|
-
const
|
|
11
|
-
const isNewSdk = hasRegisterMemoryPromptSection || hasRuntimeNamespace || hasRegistrationMode;
|
|
12
|
-
const
|
|
11
|
+
const runtimeVersion = hasRuntimeNamespace && typeof api.runtime?.version === "string" ? api.runtime.version : null;
|
|
12
|
+
const isNewSdk = hasRegisterMemoryPromptSection || hasRegisterMemoryCapability || hasRuntimeNamespace || hasRegistrationMode;
|
|
13
|
+
const sdkVersion = runtimeVersion ?? (isNewSdk ? readEnvVar("OPENCLAW_SERVICE_VERSION") : null) ?? "legacy";
|
|
14
|
+
const hasNewHookSystem = hasRegisterMemoryPromptSection || hasRegisterMemoryCapability || hasRegistrationMode;
|
|
13
15
|
return {
|
|
14
16
|
hasBeforePromptBuild: hasNewHookSystem,
|
|
15
17
|
hasRegisterMemoryPromptSection,
|
|
18
|
+
hasRegisterMemoryCapability,
|
|
16
19
|
hasDefinePluginEntry: isNewSdk,
|
|
17
20
|
// entry point is less risky, keep broad detection
|
|
18
21
|
hasRuntimeNamespace,
|
package/dist/sdk-compat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sdk-compat.ts"],"sourcesContent":["/**\n * Runtime SDK capability detection.\n *\n * Probes the injected api object at registration time to determine which\n * OpenClaw SDK features are available. All hook registrations and entry-point\n * patterns branch on these flags so engram works on both old (≤2026.3.13)\n * and new (≥2026.3.22) runtimes.\n */\nimport { readEnvVar } from \"./runtime/env.js\";\n\nexport interface SdkCapabilities {\n /** api.on(\"before_prompt_build\", ...) is available */\n hasBeforePromptBuild: boolean;\n /** api.registerMemoryPromptSection() exists */\n hasRegisterMemoryPromptSection: boolean;\n /** definePluginEntry from openclaw/plugin-sdk/plugin-entry is importable */\n hasDefinePluginEntry: boolean;\n /** api.runtime.* namespace exists */\n hasRuntimeNamespace: boolean;\n /** api.registrationMode is present */\n hasRegistrationMode: boolean;\n /** Hooks receive typed event/context objects */\n hasTypedHooks: boolean;\n /** Detected SDK version string, or \"legacy\" */\n sdkVersion: string;\n /** api.registrationMode value when present */\n registrationMode: \"full\" | \"setup-only\" | \"setup-runtime\" | undefined;\n}\n\nexport function detectSdkCapabilities(api: Record<string, unknown>): SdkCapabilities {\n const hasRegisterMemoryPromptSection =\n typeof (api as any).registerMemoryPromptSection === \"function\";\n const hasRuntimeNamespace =\n typeof (api as any).runtime === \"object\" && (api as any).runtime !== null;\n const hasRegistrationMode = typeof (api as any).registrationMode === \"string\";\n\n const
|
|
1
|
+
{"version":3,"sources":["../src/sdk-compat.ts"],"sourcesContent":["/**\n * Runtime SDK capability detection.\n *\n * Probes the injected api object at registration time to determine which\n * OpenClaw SDK features are available. All hook registrations and entry-point\n * patterns branch on these flags so engram works on both old (≤2026.3.13)\n * and new (≥2026.3.22) runtimes.\n */\nimport { readEnvVar } from \"./runtime/env.js\";\n\nexport interface SdkCapabilities {\n /** api.on(\"before_prompt_build\", ...) is available */\n hasBeforePromptBuild: boolean;\n /** api.registerMemoryPromptSection() exists */\n hasRegisterMemoryPromptSection: boolean;\n /** api.registerMemoryCapability() exists (new SDK >=2026.4.5) */\n hasRegisterMemoryCapability: boolean;\n /** definePluginEntry from openclaw/plugin-sdk/plugin-entry is importable */\n hasDefinePluginEntry: boolean;\n /** api.runtime.* namespace exists */\n hasRuntimeNamespace: boolean;\n /** api.registrationMode is present */\n hasRegistrationMode: boolean;\n /** Hooks receive typed event/context objects */\n hasTypedHooks: boolean;\n /** Detected SDK version string, or \"legacy\" */\n sdkVersion: string;\n /** api.registrationMode value when present */\n registrationMode: \"full\" | \"setup-only\" | \"setup-runtime\" | undefined;\n}\n\nexport function detectSdkCapabilities(api: Record<string, unknown>): SdkCapabilities {\n const hasRegisterMemoryPromptSection =\n typeof (api as any).registerMemoryPromptSection === \"function\";\n const hasRegisterMemoryCapability =\n typeof (api as any).registerMemoryCapability === \"function\";\n const hasRuntimeNamespace =\n typeof (api as any).runtime === \"object\" && (api as any).runtime !== null;\n const hasRegistrationMode = typeof (api as any).registrationMode === \"string\";\n\n const runtimeVersion =\n hasRuntimeNamespace && typeof (api as any).runtime?.version === \"string\"\n ? (api as any).runtime.version\n : null;\n const isNewSdk =\n hasRegisterMemoryPromptSection || hasRegisterMemoryCapability || hasRuntimeNamespace || hasRegistrationMode;\n const sdkVersion: string =\n runtimeVersion ??\n (isNewSdk ? readEnvVar(\"OPENCLAW_SERVICE_VERSION\") : null) ??\n \"legacy\";\n\n // New SDK is indicated by any of the new API surfaces being present.\n // New hook system requires one of the authoritative new-SDK signals:\n // - registerMemoryPromptSection (pre-capability new SDKs, ≥2026.3.22)\n // - registerMemoryCapability (capability-based SDKs, ≥2026.4.5; the\n // deprecated registerMemoryPromptSection may be absent)\n // - registrationMode (explicit registration lifecycle signal)\n // Just having runtime.version is NOT sufficient — some legacy builds\n // expose it. Omitting registerMemoryCapability here would cause the\n // legacy before_agent_start hook to be registered on new SDKs that only\n // expose registerMemoryCapability, silently breaking memory injection.\n const hasNewHookSystem =\n hasRegisterMemoryPromptSection || hasRegisterMemoryCapability || hasRegistrationMode;\n\n return {\n hasBeforePromptBuild: hasNewHookSystem,\n hasRegisterMemoryPromptSection,\n hasRegisterMemoryCapability,\n hasDefinePluginEntry: isNewSdk, // entry point is less risky, keep broad detection\n hasRuntimeNamespace,\n hasRegistrationMode,\n hasTypedHooks: hasNewHookSystem,\n sdkVersion,\n registrationMode: hasRegistrationMode\n ? ((api as any).registrationMode as SdkCapabilities[\"registrationMode\"])\n : undefined,\n };\n}\n"],"mappings":";;;;;AA+BO,SAAS,sBAAsB,KAA+C;AACnF,QAAM,iCACJ,OAAQ,IAAY,gCAAgC;AACtD,QAAM,8BACJ,OAAQ,IAAY,6BAA6B;AACnD,QAAM,sBACJ,OAAQ,IAAY,YAAY,YAAa,IAAY,YAAY;AACvE,QAAM,sBAAsB,OAAQ,IAAY,qBAAqB;AAErE,QAAM,iBACJ,uBAAuB,OAAQ,IAAY,SAAS,YAAY,WAC3D,IAAY,QAAQ,UACrB;AACN,QAAM,WACJ,kCAAkC,+BAA+B,uBAAuB;AAC1F,QAAM,aACJ,mBACC,WAAW,WAAW,0BAA0B,IAAI,SACrD;AAYF,QAAM,mBACJ,kCAAkC,+BAA+B;AAEnE,SAAO;AAAA,IACL,sBAAsB;AAAA,IACtB;AAAA,IACA;AAAA,IACA,sBAAsB;AAAA;AAAA,IACtB;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA,kBAAkB,sBACZ,IAAY,mBACd;AAAA,EACN;AACF;","names":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Chunk } from './chunking.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Semantic Chunking with Smoothing-Based Topic Boundaries (Issue #368)
|
|
5
|
+
*
|
|
6
|
+
* An optional alternative to the recursive chunker in chunking.ts.
|
|
7
|
+
* Uses sentence embeddings + cosine similarity + smoothing to detect
|
|
8
|
+
* natural topic boundaries, producing more coherent chunks.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
interface SemanticChunkingConfig {
|
|
12
|
+
/** Target tokens per chunk. Default: 200. */
|
|
13
|
+
targetTokens: number;
|
|
14
|
+
/** Minimum tokens for a segment before merging with neighbor. Default: 100. */
|
|
15
|
+
minTokens: number;
|
|
16
|
+
/** Maximum tokens for a segment before recursive splitting. Default: 400. */
|
|
17
|
+
maxTokens: number;
|
|
18
|
+
/** Window size for the moving-average smoothing filter. Default: 3. */
|
|
19
|
+
smoothingWindowSize: number;
|
|
20
|
+
/** How many standard deviations below the mean constitutes a boundary. Default: 1.0. */
|
|
21
|
+
boundaryThresholdStdDevs: number;
|
|
22
|
+
/** Batch size for embedding requests. Default: 32. */
|
|
23
|
+
embeddingBatchSize: number;
|
|
24
|
+
/** Fall back to recursive chunking when embeddings are unavailable. Default: true. */
|
|
25
|
+
fallbackToRecursive: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare const DEFAULT_SEMANTIC_CHUNKING_CONFIG: SemanticChunkingConfig;
|
|
28
|
+
interface SemanticChunk extends Chunk {
|
|
29
|
+
/** Optional topic hint derived from position. */
|
|
30
|
+
topicLabel?: string;
|
|
31
|
+
/** Cosine similarity score at the trailing boundary of this chunk. */
|
|
32
|
+
boundaryScore: number;
|
|
33
|
+
}
|
|
34
|
+
interface SemanticChunkResult {
|
|
35
|
+
/** Whether content was split into multiple chunks. */
|
|
36
|
+
chunked: boolean;
|
|
37
|
+
/** The chunks produced. */
|
|
38
|
+
chunks: SemanticChunk[];
|
|
39
|
+
/** Sentence indices where topic splits occurred. */
|
|
40
|
+
boundaries: number[];
|
|
41
|
+
/** Which algorithm produced the result. */
|
|
42
|
+
method: "semantic" | "recursive-fallback";
|
|
43
|
+
}
|
|
44
|
+
/** Caller-provided function that embeds an array of texts, returning vectors. */
|
|
45
|
+
type EmbedFn = (texts: string[]) => Promise<number[][]>;
|
|
46
|
+
/**
|
|
47
|
+
* Cosine similarity between two vectors.
|
|
48
|
+
* Returns a value in [-1, 1]. Identical direction = 1, orthogonal = 0.
|
|
49
|
+
*
|
|
50
|
+
* NOTE: This duplicates cosineSimilarity in recall-mmr.ts and embedding-fallback.ts.
|
|
51
|
+
* Consider extracting to a shared math utility in a future refactor.
|
|
52
|
+
*/
|
|
53
|
+
declare function cosineSimilarity(a: number[], b: number[]): number;
|
|
54
|
+
/**
|
|
55
|
+
* Arithmetic mean of a numeric series.
|
|
56
|
+
*/
|
|
57
|
+
declare function mean(series: number[]): number;
|
|
58
|
+
/**
|
|
59
|
+
* Population standard deviation of a numeric series.
|
|
60
|
+
*/
|
|
61
|
+
declare function stddev(series: number[]): number;
|
|
62
|
+
/**
|
|
63
|
+
* Simple moving average over a 1D series.
|
|
64
|
+
* The window is centered: for window size W, each output[i] averages
|
|
65
|
+
* series[i - floor(W/2) .. i + floor(W/2)], clamped to bounds.
|
|
66
|
+
*
|
|
67
|
+
* Even window sizes are rounded up to the next odd value so the window
|
|
68
|
+
* is symmetric around the center point (Finding 4, PR #420).
|
|
69
|
+
*/
|
|
70
|
+
declare function movingAverage(series: number[], windowSize: number): number[];
|
|
71
|
+
/**
|
|
72
|
+
* Find indices in the series that are local minima AND below the threshold.
|
|
73
|
+
* A local minimum is a point lower than both its immediate neighbors
|
|
74
|
+
* (or lower-or-equal at series boundaries).
|
|
75
|
+
*/
|
|
76
|
+
declare function findLocalMinima(series: number[], threshold: number): number[];
|
|
77
|
+
/**
|
|
78
|
+
* Semantic chunking with smoothing-based topic boundary detection.
|
|
79
|
+
*
|
|
80
|
+
* @param content - Full text to chunk.
|
|
81
|
+
* @param embedFn - Async function that embeds an array of texts.
|
|
82
|
+
* @param config - Optional partial config overrides.
|
|
83
|
+
* @returns SemanticChunkResult
|
|
84
|
+
*/
|
|
85
|
+
declare function semanticChunkContent(content: string, embedFn: EmbedFn, config?: Partial<SemanticChunkingConfig>): Promise<SemanticChunkResult>;
|
|
86
|
+
|
|
87
|
+
export { DEFAULT_SEMANTIC_CHUNKING_CONFIG, type EmbedFn, type SemanticChunk, type SemanticChunkResult, type SemanticChunkingConfig, cosineSimilarity, findLocalMinima, mean, movingAverage, semanticChunkContent, stddev };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_SEMANTIC_CHUNKING_CONFIG,
|
|
3
|
+
cosineSimilarity,
|
|
4
|
+
findLocalMinima,
|
|
5
|
+
mean,
|
|
6
|
+
movingAverage,
|
|
7
|
+
semanticChunkContent,
|
|
8
|
+
stddev
|
|
9
|
+
} from "./chunk-KVE7R4CG.js";
|
|
10
|
+
import "./chunk-4WMCPJWX.js";
|
|
11
|
+
export {
|
|
12
|
+
DEFAULT_SEMANTIC_CHUNKING_CONFIG,
|
|
13
|
+
cosineSimilarity,
|
|
14
|
+
findLocalMinima,
|
|
15
|
+
mean,
|
|
16
|
+
movingAverage,
|
|
17
|
+
semanticChunkContent,
|
|
18
|
+
stddev
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=semantic-chunking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { PluginConfig, MemoryFile } from './types.js';
|
|
2
|
+
import { R as RolloutSummaryInput, M as MaterializeResult } from './codex-materialize-CQlLTzke.js';
|
|
3
|
+
import { LoggerBackend } from './logger.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* memory-extension-host/types.ts — Types for third-party memory extension discovery.
|
|
7
|
+
*
|
|
8
|
+
* Memory extensions live under ~/.remnic/memory_extensions/<slug>/ and provide
|
|
9
|
+
* instructions.md (required), schema.json (optional), and examples/*.md (optional).
|
|
10
|
+
*/
|
|
11
|
+
interface DiscoveredExtension {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly root: string;
|
|
14
|
+
readonly instructionsPath: string;
|
|
15
|
+
readonly instructions: string;
|
|
16
|
+
readonly schema?: ExtensionSchema;
|
|
17
|
+
readonly examplesPaths: string[];
|
|
18
|
+
}
|
|
19
|
+
interface ExtensionSchema {
|
|
20
|
+
readonly memoryTypes?: Array<"fact" | "preference" | "procedure" | "reference">;
|
|
21
|
+
readonly groupingHints?: string[];
|
|
22
|
+
readonly version?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* memory-extension-host/host-discovery.ts — Discover third-party memory extensions.
|
|
27
|
+
*
|
|
28
|
+
* Scans a root directory (typically ~/.remnic/memory_extensions/) for valid
|
|
29
|
+
* extension subdirectories. Each extension must contain an instructions.md.
|
|
30
|
+
* The discovery process is read-only and NEVER reads or executes files under
|
|
31
|
+
* any extension's scripts/ directory.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/** Total token budget for all discovered extension instructions combined. */
|
|
35
|
+
declare const REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT = 5000;
|
|
36
|
+
/**
|
|
37
|
+
* Discover all valid memory extensions under the given root directory.
|
|
38
|
+
*
|
|
39
|
+
* Returns extensions sorted by name. Skips entries with warnings when:
|
|
40
|
+
* - The slug is invalid (not lowercase alphanumeric + hyphens, or > 64 chars)
|
|
41
|
+
* - instructions.md is missing
|
|
42
|
+
* - schema.json is malformed (extension still returned but schema is undefined)
|
|
43
|
+
*
|
|
44
|
+
* NEVER reads files under any extension's scripts/ directory.
|
|
45
|
+
*/
|
|
46
|
+
declare function discoverMemoryExtensions(root: string, log: Pick<LoggerBackend, "warn" | "debug">): Promise<DiscoveredExtension[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Resolve the memory extensions root directory from config.
|
|
49
|
+
* If memoryExtensionsRoot is empty, derive from memoryDir by going up to
|
|
50
|
+
* the Remnic home dir and appending memory_extensions.
|
|
51
|
+
*
|
|
52
|
+
* Moved here from semantic-consolidation.ts (#428 Finding 3) because this
|
|
53
|
+
* is a generic config-to-path resolver with no consolidation logic.
|
|
54
|
+
*/
|
|
55
|
+
declare function resolveExtensionsRoot(config: PluginConfig): string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* semantic-consolidation.ts — Semantic Consolidation Engine
|
|
59
|
+
*
|
|
60
|
+
* Finds clusters of semantically similar memories using token overlap,
|
|
61
|
+
* synthesizes canonical versions via LLM, and archives the originals.
|
|
62
|
+
* Reduces memory store bloat while preserving all unique information.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
interface ConsolidationCluster {
|
|
66
|
+
category: string;
|
|
67
|
+
memories: MemoryFile[];
|
|
68
|
+
overlapScore: number;
|
|
69
|
+
canonicalContent?: string;
|
|
70
|
+
}
|
|
71
|
+
interface SemanticConsolidationResult {
|
|
72
|
+
clustersFound: number;
|
|
73
|
+
memoriesConsolidated: number;
|
|
74
|
+
memoriesArchived: number;
|
|
75
|
+
errors: number;
|
|
76
|
+
clusters: ConsolidationCluster[];
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Find clusters of semantically similar memories using token overlap.
|
|
80
|
+
*/
|
|
81
|
+
declare function findSimilarClusters(memories: MemoryFile[], config: {
|
|
82
|
+
threshold: number;
|
|
83
|
+
minClusterSize: number;
|
|
84
|
+
excludeCategories: string[];
|
|
85
|
+
maxPerRun: number;
|
|
86
|
+
}): ConsolidationCluster[];
|
|
87
|
+
/**
|
|
88
|
+
* Build the LLM prompt for synthesizing a canonical memory from a cluster.
|
|
89
|
+
*/
|
|
90
|
+
declare function buildConsolidationPrompt(cluster: ConsolidationCluster): string;
|
|
91
|
+
/**
|
|
92
|
+
* Parse the LLM response to extract the canonical content.
|
|
93
|
+
*/
|
|
94
|
+
declare function parseConsolidationResponse(response: string): string;
|
|
95
|
+
/**
|
|
96
|
+
* Discover extensions and build the block to append to a consolidation prompt.
|
|
97
|
+
* Returns "" when extensions are disabled or none are found.
|
|
98
|
+
*/
|
|
99
|
+
declare function buildExtensionsBlockForConsolidation(config: PluginConfig): Promise<string>;
|
|
100
|
+
/**
|
|
101
|
+
* Optional post-consolidation hook — materializes the namespace into Codex's
|
|
102
|
+
* native memory layout when the consolidation run finishes. Kept here (rather
|
|
103
|
+
* than in orchestrator.ts) so #378 doesn't conflict with Wave 1 edits.
|
|
104
|
+
*
|
|
105
|
+
* Safe to call regardless of config state: honors `codexMaterializeMemories`
|
|
106
|
+
* and `codexMaterializeOnConsolidation` and silently becomes a no-op when
|
|
107
|
+
* either is disabled.
|
|
108
|
+
*/
|
|
109
|
+
declare function materializeAfterSemanticConsolidation(options: {
|
|
110
|
+
config: PluginConfig;
|
|
111
|
+
namespace?: string;
|
|
112
|
+
memories?: MemoryFile[];
|
|
113
|
+
memoryDir?: string;
|
|
114
|
+
codexHome?: string;
|
|
115
|
+
rolloutSummaries?: RolloutSummaryInput[];
|
|
116
|
+
now?: Date;
|
|
117
|
+
}): Promise<MaterializeResult | null>;
|
|
118
|
+
|
|
119
|
+
export { type ConsolidationCluster as C, type DiscoveredExtension as D, type ExtensionSchema as E, REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT as R, type SemanticConsolidationResult as S, buildConsolidationPrompt as a, buildExtensionsBlockForConsolidation as b, discoverMemoryExtensions as d, findSimilarClusters as f, materializeAfterSemanticConsolidation as m, parseConsolidationResponse as p, resolveExtensionsRoot as r };
|
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* Finds clusters of semantically similar memories using token overlap,
|
|
7
|
-
* synthesizes canonical versions via LLM, and archives the originals.
|
|
8
|
-
* Reduces memory store bloat while preserving all unique information.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
interface ConsolidationCluster {
|
|
12
|
-
category: string;
|
|
13
|
-
memories: MemoryFile[];
|
|
14
|
-
overlapScore: number;
|
|
15
|
-
canonicalContent?: string;
|
|
16
|
-
}
|
|
17
|
-
interface SemanticConsolidationResult {
|
|
18
|
-
clustersFound: number;
|
|
19
|
-
memoriesConsolidated: number;
|
|
20
|
-
memoriesArchived: number;
|
|
21
|
-
errors: number;
|
|
22
|
-
clusters: ConsolidationCluster[];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Find clusters of semantically similar memories using token overlap.
|
|
26
|
-
*/
|
|
27
|
-
declare function findSimilarClusters(memories: MemoryFile[], config: {
|
|
28
|
-
threshold: number;
|
|
29
|
-
minClusterSize: number;
|
|
30
|
-
excludeCategories: string[];
|
|
31
|
-
maxPerRun: number;
|
|
32
|
-
}): ConsolidationCluster[];
|
|
33
|
-
/**
|
|
34
|
-
* Build the LLM prompt for synthesizing a canonical memory from a cluster.
|
|
35
|
-
*/
|
|
36
|
-
declare function buildConsolidationPrompt(cluster: ConsolidationCluster): string;
|
|
37
|
-
/**
|
|
38
|
-
* Parse the LLM response to extract the canonical content.
|
|
39
|
-
*/
|
|
40
|
-
declare function parseConsolidationResponse(response: string): string;
|
|
41
|
-
|
|
42
|
-
export { type ConsolidationCluster, type SemanticConsolidationResult, buildConsolidationPrompt, findSimilarClusters, parseConsolidationResponse };
|
|
1
|
+
import './types.js';
|
|
2
|
+
import './codex-materialize-CQlLTzke.js';
|
|
3
|
+
export { C as ConsolidationCluster, S as SemanticConsolidationResult, a as buildConsolidationPrompt, b as buildExtensionsBlockForConsolidation, f as findSimilarClusters, m as materializeAfterSemanticConsolidation, p as parseConsolidationResponse, r as resolveExtensionsRoot } from './semantic-consolidation-DrvSYRdB.js';
|
|
4
|
+
import './logger.js';
|
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildConsolidationPrompt,
|
|
3
|
+
buildExtensionsBlockForConsolidation,
|
|
3
4
|
findSimilarClusters,
|
|
5
|
+
materializeAfterSemanticConsolidation,
|
|
4
6
|
parseConsolidationResponse
|
|
5
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SYUK3VLY.js";
|
|
8
|
+
import {
|
|
9
|
+
resolveExtensionsRoot
|
|
10
|
+
} from "./chunk-EJI5XIBB.js";
|
|
6
11
|
import "./chunk-DT5TVLJE.js";
|
|
12
|
+
import "./chunk-GV6NLQ4X.js";
|
|
13
|
+
import "./chunk-3WHVNEN7.js";
|
|
14
|
+
import "./chunk-4KAN3GZ3.js";
|
|
15
|
+
import "./chunk-6ZH4TU6I.js";
|
|
16
|
+
import "./chunk-SCU65EZI.js";
|
|
17
|
+
import "./chunk-BOUYNNYD.js";
|
|
18
|
+
import "./chunk-6PFRXT4K.js";
|
|
19
|
+
import "./chunk-TP4FZJIZ.js";
|
|
20
|
+
import "./chunk-DM2T26WE.js";
|
|
21
|
+
import "./chunk-QSVPYQPG.js";
|
|
22
|
+
import "./chunk-M62O4P4T.js";
|
|
23
|
+
import "./chunk-4DJQYKMN.js";
|
|
24
|
+
import "./chunk-2ODBA7MQ.js";
|
|
7
25
|
export {
|
|
8
26
|
buildConsolidationPrompt,
|
|
27
|
+
buildExtensionsBlockForConsolidation,
|
|
9
28
|
findSimilarClusters,
|
|
10
|
-
|
|
29
|
+
materializeAfterSemanticConsolidation,
|
|
30
|
+
parseConsolidationResponse,
|
|
31
|
+
resolveExtensionsRoot
|
|
11
32
|
};
|
|
12
33
|
//# sourceMappingURL=semantic-consolidation.js.map
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
promoteSemanticRuleFromMemory
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7ECD5ATE.js";
|
|
4
|
+
import "./chunk-GV6NLQ4X.js";
|
|
5
|
+
import "./chunk-3WHVNEN7.js";
|
|
6
|
+
import "./chunk-4KAN3GZ3.js";
|
|
7
|
+
import "./chunk-6ZH4TU6I.js";
|
|
8
8
|
import "./chunk-SCU65EZI.js";
|
|
9
9
|
import "./chunk-BOUYNNYD.js";
|
|
10
|
+
import "./chunk-6PFRXT4K.js";
|
|
11
|
+
import "./chunk-TP4FZJIZ.js";
|
|
10
12
|
import "./chunk-DM2T26WE.js";
|
|
11
13
|
import "./chunk-QSVPYQPG.js";
|
|
12
14
|
import "./chunk-M62O4P4T.js";
|
|
13
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-4DJQYKMN.js";
|
|
16
|
+
import "./chunk-2ODBA7MQ.js";
|
|
14
17
|
export {
|
|
15
18
|
promoteSemanticRuleFromMemory
|
|
16
19
|
};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchVerifiedSemanticRules
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-JIU55F3X.js";
|
|
4
|
+
import "./chunk-DT5TVLJE.js";
|
|
5
|
+
import "./chunk-GV6NLQ4X.js";
|
|
6
|
+
import "./chunk-3WHVNEN7.js";
|
|
7
|
+
import "./chunk-4KAN3GZ3.js";
|
|
8
|
+
import "./chunk-6ZH4TU6I.js";
|
|
8
9
|
import "./chunk-SCU65EZI.js";
|
|
9
10
|
import "./chunk-BOUYNNYD.js";
|
|
11
|
+
import "./chunk-6PFRXT4K.js";
|
|
12
|
+
import "./chunk-TP4FZJIZ.js";
|
|
10
13
|
import "./chunk-DM2T26WE.js";
|
|
11
14
|
import "./chunk-QSVPYQPG.js";
|
|
12
15
|
import "./chunk-M62O4P4T.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-4DJQYKMN.js";
|
|
17
|
+
import "./chunk-2ODBA7MQ.js";
|
|
15
18
|
export {
|
|
16
19
|
searchVerifiedSemanticRules
|
|
17
20
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionObserverState,
|
|
3
3
|
normalizeObserverBands
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JR4ZC3G4.js";
|
|
5
5
|
import "./chunk-Z5LAYHGJ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-2ODBA7MQ.js";
|
|
7
7
|
export {
|
|
8
8
|
SessionObserverState,
|
|
9
9
|
normalizeObserverBands
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface SessionToggleStore {
|
|
2
|
+
isDisabled(sessionKey: string, agentId: string): Promise<boolean>;
|
|
3
|
+
resolve(sessionKey: string, agentId: string): Promise<{
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
source: "primary" | "secondary" | "none";
|
|
6
|
+
updatedAt?: string;
|
|
7
|
+
}>;
|
|
8
|
+
setDisabled(sessionKey: string, agentId: string, disabled: boolean): Promise<void>;
|
|
9
|
+
clear(sessionKey: string, agentId: string): Promise<void>;
|
|
10
|
+
list(): Promise<Array<{
|
|
11
|
+
sessionKey: string;
|
|
12
|
+
agentId: string;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
}>>;
|
|
16
|
+
}
|
|
17
|
+
interface FileToggleStoreOptions {
|
|
18
|
+
secondaryReadOnlyPath?: string;
|
|
19
|
+
}
|
|
20
|
+
declare function createFileToggleStore(filePath: string, options?: FileToggleStoreOptions): SessionToggleStore;
|
|
21
|
+
|
|
22
|
+
export { type SessionToggleStore, createFileToggleStore };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// src/session-toggles.ts
|
|
2
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
3
|
+
import path from "path";
|
|
4
|
+
function encodeToggleKey(sessionKey, agentId) {
|
|
5
|
+
return `${encodeURIComponent(sessionKey)}::${encodeURIComponent(agentId)}`;
|
|
6
|
+
}
|
|
7
|
+
function decodeToggleKey(key) {
|
|
8
|
+
const [encodedSessionKey, encodedAgentId] = key.split("::");
|
|
9
|
+
if (!encodedSessionKey || !encodedAgentId) return null;
|
|
10
|
+
return {
|
|
11
|
+
sessionKey: decodeURIComponent(encodedSessionKey),
|
|
12
|
+
agentId: decodeURIComponent(encodedAgentId)
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
async function safeReadToggleFile(filePath) {
|
|
16
|
+
try {
|
|
17
|
+
const raw = await readFile(filePath, "utf8");
|
|
18
|
+
const parsed = JSON.parse(raw);
|
|
19
|
+
if (!parsed || typeof parsed !== "object" || typeof parsed.entries !== "object") {
|
|
20
|
+
return { version: 1, entries: {} };
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
version: 1,
|
|
24
|
+
entries: Object.fromEntries(
|
|
25
|
+
Object.entries(parsed.entries).filter(
|
|
26
|
+
([, value]) => value && typeof value === "object" && typeof value.disabled === "boolean" && typeof value.updatedAt === "string"
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
};
|
|
30
|
+
} catch {
|
|
31
|
+
return { version: 1, entries: {} };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function createFileToggleStore(filePath, options = {}) {
|
|
35
|
+
let writeChain = Promise.resolve();
|
|
36
|
+
async function queueWrite(operation) {
|
|
37
|
+
const run = writeChain.catch(() => void 0).then(operation);
|
|
38
|
+
writeChain = run.catch(() => void 0);
|
|
39
|
+
await run;
|
|
40
|
+
}
|
|
41
|
+
async function writeToggleFile(next) {
|
|
42
|
+
await mkdir(path.dirname(filePath), { recursive: true });
|
|
43
|
+
await writeFile(filePath, JSON.stringify(next, null, 2), "utf8");
|
|
44
|
+
}
|
|
45
|
+
async function readPrimary() {
|
|
46
|
+
return safeReadToggleFile(filePath);
|
|
47
|
+
}
|
|
48
|
+
async function readSecondary() {
|
|
49
|
+
if (!options.secondaryReadOnlyPath) return { version: 1, entries: {} };
|
|
50
|
+
return safeReadToggleFile(options.secondaryReadOnlyPath);
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
async isDisabled(sessionKey, agentId) {
|
|
54
|
+
const resolved = await this.resolve(sessionKey, agentId);
|
|
55
|
+
return resolved.disabled;
|
|
56
|
+
},
|
|
57
|
+
async resolve(sessionKey, agentId) {
|
|
58
|
+
const key = encodeToggleKey(sessionKey, agentId);
|
|
59
|
+
const primary = await readPrimary();
|
|
60
|
+
if (primary.entries[key]) {
|
|
61
|
+
return {
|
|
62
|
+
disabled: primary.entries[key].disabled,
|
|
63
|
+
source: "primary",
|
|
64
|
+
updatedAt: primary.entries[key].updatedAt
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const secondary = await readSecondary();
|
|
68
|
+
if (secondary.entries[key]) {
|
|
69
|
+
return {
|
|
70
|
+
disabled: secondary.entries[key].disabled,
|
|
71
|
+
source: "secondary",
|
|
72
|
+
updatedAt: secondary.entries[key].updatedAt
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return { disabled: false, source: "none" };
|
|
76
|
+
},
|
|
77
|
+
async setDisabled(sessionKey, agentId, disabled) {
|
|
78
|
+
const key = encodeToggleKey(sessionKey, agentId);
|
|
79
|
+
await queueWrite(async () => {
|
|
80
|
+
const current = await readPrimary();
|
|
81
|
+
current.entries[key] = {
|
|
82
|
+
disabled,
|
|
83
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
84
|
+
};
|
|
85
|
+
await writeToggleFile(current);
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
async clear(sessionKey, agentId) {
|
|
89
|
+
const key = encodeToggleKey(sessionKey, agentId);
|
|
90
|
+
await queueWrite(async () => {
|
|
91
|
+
const current = await readPrimary();
|
|
92
|
+
delete current.entries[key];
|
|
93
|
+
await writeToggleFile(current);
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
async list() {
|
|
97
|
+
const current = await readPrimary();
|
|
98
|
+
return Object.entries(current.entries).map(([key, value]) => {
|
|
99
|
+
const decoded = decodeToggleKey(key);
|
|
100
|
+
if (!decoded) return null;
|
|
101
|
+
return {
|
|
102
|
+
sessionKey: decoded.sessionKey,
|
|
103
|
+
agentId: decoded.agentId,
|
|
104
|
+
disabled: value.disabled,
|
|
105
|
+
updatedAt: value.updatedAt
|
|
106
|
+
};
|
|
107
|
+
}).filter(
|
|
108
|
+
(value) => value !== null
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
createFileToggleStore
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=session-toggles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/session-toggles.ts"],"sourcesContent":["import { mkdir, readFile, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nexport interface SessionToggleStore {\n isDisabled(sessionKey: string, agentId: string): Promise<boolean>;\n resolve(sessionKey: string, agentId: string): Promise<{\n disabled: boolean;\n source: \"primary\" | \"secondary\" | \"none\";\n updatedAt?: string;\n }>;\n setDisabled(sessionKey: string, agentId: string, disabled: boolean): Promise<void>;\n clear(sessionKey: string, agentId: string): Promise<void>;\n list(): Promise<Array<{ sessionKey: string; agentId: string; disabled: boolean; updatedAt: string }>>;\n}\n\ninterface ToggleEntry {\n disabled: boolean;\n updatedAt: string;\n}\n\ninterface ToggleFile {\n version: 1;\n entries: Record<string, ToggleEntry>;\n}\n\ninterface FileToggleStoreOptions {\n secondaryReadOnlyPath?: string;\n}\n\nfunction encodeToggleKey(sessionKey: string, agentId: string): string {\n return `${encodeURIComponent(sessionKey)}::${encodeURIComponent(agentId)}`;\n}\n\nfunction decodeToggleKey(key: string): { sessionKey: string; agentId: string } | null {\n const [encodedSessionKey, encodedAgentId] = key.split(\"::\");\n if (!encodedSessionKey || !encodedAgentId) return null;\n return {\n sessionKey: decodeURIComponent(encodedSessionKey),\n agentId: decodeURIComponent(encodedAgentId),\n };\n}\n\nasync function safeReadToggleFile(filePath: string): Promise<ToggleFile> {\n try {\n const raw = await readFile(filePath, \"utf8\");\n const parsed = JSON.parse(raw) as Partial<ToggleFile>;\n if (!parsed || typeof parsed !== \"object\" || typeof parsed.entries !== \"object\") {\n return { version: 1, entries: {} };\n }\n return {\n version: 1,\n entries: Object.fromEntries(\n Object.entries(parsed.entries).filter(\n ([, value]) =>\n value &&\n typeof value === \"object\" &&\n typeof value.disabled === \"boolean\" &&\n typeof value.updatedAt === \"string\",\n ),\n ) as Record<string, ToggleEntry>,\n };\n } catch {\n return { version: 1, entries: {} };\n }\n}\n\nexport function createFileToggleStore(\n filePath: string,\n options: FileToggleStoreOptions = {},\n): SessionToggleStore {\n let writeChain = Promise.resolve();\n\n async function queueWrite(operation: () => Promise<void>): Promise<void> {\n const run = writeChain.catch(() => undefined).then(operation);\n writeChain = run.catch(() => undefined);\n await run;\n }\n\n async function writeToggleFile(next: ToggleFile): Promise<void> {\n await mkdir(path.dirname(filePath), { recursive: true });\n await writeFile(filePath, JSON.stringify(next, null, 2), \"utf8\");\n }\n\n async function readPrimary(): Promise<ToggleFile> {\n return safeReadToggleFile(filePath);\n }\n\n async function readSecondary(): Promise<ToggleFile> {\n if (!options.secondaryReadOnlyPath) return { version: 1, entries: {} };\n return safeReadToggleFile(options.secondaryReadOnlyPath);\n }\n\n return {\n async isDisabled(sessionKey: string, agentId: string): Promise<boolean> {\n const resolved = await this.resolve(sessionKey, agentId);\n return resolved.disabled;\n },\n\n async resolve(sessionKey: string, agentId: string) {\n const key = encodeToggleKey(sessionKey, agentId);\n const primary = await readPrimary();\n if (primary.entries[key]) {\n return {\n disabled: primary.entries[key].disabled,\n source: \"primary\" as const,\n updatedAt: primary.entries[key].updatedAt,\n };\n }\n const secondary = await readSecondary();\n if (secondary.entries[key]) {\n return {\n disabled: secondary.entries[key].disabled,\n source: \"secondary\" as const,\n updatedAt: secondary.entries[key].updatedAt,\n };\n }\n return { disabled: false, source: \"none\" as const };\n },\n\n async setDisabled(sessionKey: string, agentId: string, disabled: boolean): Promise<void> {\n const key = encodeToggleKey(sessionKey, agentId);\n await queueWrite(async () => {\n const current = await readPrimary();\n current.entries[key] = {\n disabled,\n updatedAt: new Date().toISOString(),\n };\n await writeToggleFile(current);\n });\n },\n\n async clear(sessionKey: string, agentId: string): Promise<void> {\n const key = encodeToggleKey(sessionKey, agentId);\n await queueWrite(async () => {\n const current = await readPrimary();\n delete current.entries[key];\n await writeToggleFile(current);\n });\n },\n\n async list() {\n const current = await readPrimary();\n return Object.entries(current.entries)\n .map(([key, value]) => {\n const decoded = decodeToggleKey(key);\n if (!decoded) return null;\n return {\n sessionKey: decoded.sessionKey,\n agentId: decoded.agentId,\n disabled: value.disabled,\n updatedAt: value.updatedAt,\n };\n })\n .filter((value): value is { sessionKey: string; agentId: string; disabled: boolean; updatedAt: string } =>\n value !== null\n );\n },\n };\n}\n"],"mappings":"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","names":[]}
|