@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
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { MemoryFile } from './types.js';
|
|
2
|
+
import { TrustZoneName } from './trust-zones.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Direct-answer retrieval tier eligibility (issue #518 slice 2).
|
|
6
|
+
*
|
|
7
|
+
* This module is a pure decision layer. It takes a query, a set of
|
|
8
|
+
* caller-resolved candidates (each already decorated with trust-zone,
|
|
9
|
+
* taxonomy-bucket, and importance information), and the direct-answer
|
|
10
|
+
* config, then returns an eligibility verdict.
|
|
11
|
+
*
|
|
12
|
+
* Keeping the module pure means:
|
|
13
|
+
*
|
|
14
|
+
* - Tests do not need a trust-zones store, taxonomy resolver, or importance
|
|
15
|
+
* scorer on disk.
|
|
16
|
+
* - Slice 3 (retrieval.ts wiring) is responsible for resolving those signals
|
|
17
|
+
* before calling in; the wiring layer decides where candidates come from
|
|
18
|
+
* (entity index, token prefilter, etc.). This module only decides
|
|
19
|
+
* whether the surfaced candidates add up to a confident direct answer.
|
|
20
|
+
*
|
|
21
|
+
* Not wired into retrieval yet — see slice 3.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Caller-supplied candidate.
|
|
26
|
+
*
|
|
27
|
+
* `trustZone`, `taxonomyBucket`, and `importanceScore` are resolved outside
|
|
28
|
+
* this module because each comes from a different subsystem. Passing them
|
|
29
|
+
* as inputs keeps the function deterministic and easy to unit-test.
|
|
30
|
+
*
|
|
31
|
+
* `matchScore` is optional; if omitted, candidates are ranked by
|
|
32
|
+
* token-overlap ratio. Callers that already computed a better ranking
|
|
33
|
+
* score (e.g. BM25, vector similarity) can supply it to drive the
|
|
34
|
+
* ambiguity check.
|
|
35
|
+
*/
|
|
36
|
+
interface DirectAnswerCandidate {
|
|
37
|
+
memory: MemoryFile;
|
|
38
|
+
trustZone: TrustZoneName | null;
|
|
39
|
+
taxonomyBucket: string | null;
|
|
40
|
+
importanceScore: number;
|
|
41
|
+
matchScore?: number;
|
|
42
|
+
}
|
|
43
|
+
interface DirectAnswerConfig {
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
tokenOverlapFloor: number;
|
|
46
|
+
importanceFloor: number;
|
|
47
|
+
ambiguityMargin: number;
|
|
48
|
+
eligibleTaxonomyBuckets: string[];
|
|
49
|
+
}
|
|
50
|
+
interface DirectAnswerInput {
|
|
51
|
+
query: string;
|
|
52
|
+
candidates: DirectAnswerCandidate[];
|
|
53
|
+
config: DirectAnswerConfig;
|
|
54
|
+
/**
|
|
55
|
+
* Optional entity-ref hints resolved from the query upstream. When
|
|
56
|
+
* supplied, a candidate with a set `entityRef` must match one of these
|
|
57
|
+
* (case-insensitive) to remain eligible. Candidates without an
|
|
58
|
+
* `entityRef` are allowed through regardless.
|
|
59
|
+
*/
|
|
60
|
+
queryEntityRefs?: string[];
|
|
61
|
+
}
|
|
62
|
+
type DirectAnswerReason = "disabled" | "empty-query" | "no-candidates" | "no-eligible-candidates" | "below-token-overlap-floor" | "ambiguous" | "eligible";
|
|
63
|
+
interface DirectAnswerResult {
|
|
64
|
+
eligible: boolean;
|
|
65
|
+
reason: DirectAnswerReason;
|
|
66
|
+
/** Winning candidate when eligible. */
|
|
67
|
+
winner?: DirectAnswerCandidate;
|
|
68
|
+
/** Computed token-overlap ratio (0..1) of the winner. */
|
|
69
|
+
tokenOverlap?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Human-readable summary suitable for
|
|
72
|
+
* `RecallTierExplain.tierReason`.
|
|
73
|
+
*/
|
|
74
|
+
narrative: string;
|
|
75
|
+
/**
|
|
76
|
+
* Filter labels that eliminated at least one candidate along the way.
|
|
77
|
+
* Populated regardless of eligibility so the caller can surface the
|
|
78
|
+
* narrowing steps in `RecallTierExplain.filteredBy`.
|
|
79
|
+
*/
|
|
80
|
+
filteredBy: string[];
|
|
81
|
+
}
|
|
82
|
+
/** Filter labels — exported so callers and tests can match them structurally. */
|
|
83
|
+
declare const FILTER_LABELS: {
|
|
84
|
+
readonly nonActiveStatus: "non-active-status";
|
|
85
|
+
readonly notTrustedZone: "not-trusted-zone";
|
|
86
|
+
readonly ineligibleTaxonomyBucket: "ineligible-taxonomy-bucket";
|
|
87
|
+
readonly belowImportanceFloor: "below-importance-floor";
|
|
88
|
+
readonly entityRefMismatch: "entity-ref-mismatch";
|
|
89
|
+
readonly belowTokenOverlapFloor: "below-token-overlap-floor";
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Determine whether a query can be served by the direct-answer tier.
|
|
93
|
+
*
|
|
94
|
+
* Decision ladder, in order:
|
|
95
|
+
*
|
|
96
|
+
* 1. config.enabled === false → "disabled"
|
|
97
|
+
* 2. empty query tokens → "empty-query"
|
|
98
|
+
* 3. empty candidates → "no-candidates"
|
|
99
|
+
* 4. hard filters drop all candidates → "no-eligible-candidates"
|
|
100
|
+
* 5. token-overlap floor drops all → "below-token-overlap-floor"
|
|
101
|
+
* 6. top two candidates within ambiguityMargin → "ambiguous"
|
|
102
|
+
* 7. otherwise → "eligible"
|
|
103
|
+
*/
|
|
104
|
+
declare function isDirectAnswerEligible(input: DirectAnswerInput): DirectAnswerResult;
|
|
105
|
+
|
|
106
|
+
export { type DirectAnswerCandidate, type DirectAnswerConfig, type DirectAnswerInput, type DirectAnswerReason, type DirectAnswerResult, FILTER_LABELS, isDirectAnswerEligible };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,12 +1,106 @@
|
|
|
1
1
|
import { PluginConfig } from './types.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Thrown by `EmbeddingFallback.search()` (via `embed()`) when the embedding
|
|
5
|
+
* backend is effectively unavailable on the lookup path — either because the
|
|
6
|
+
* HTTP fetch exceeded its deadline OR because the endpoint returned a non-2xx
|
|
7
|
+
* status code. Callers that need to distinguish a backend outage from "no
|
|
8
|
+
* candidates" can `instanceof`-check against this class.
|
|
9
|
+
*
|
|
10
|
+
* Round 9 fix (Finding UZqB): previously a timeout returned null from embed(),
|
|
11
|
+
* which caused search() to return [] silently. decideSemanticDedup then
|
|
12
|
+
* classified the result as no_candidates instead of backend_unavailable, so
|
|
13
|
+
* the per-batch batchBackendUnavailable short-circuit never activated and
|
|
14
|
+
* batches of N facts each paid a full timeout roundtrip.
|
|
15
|
+
*
|
|
16
|
+
* Round 10 fix (Findings Ui1J + Ui1L): search() now only re-throws this error
|
|
17
|
+
* when the caller explicitly passes `{ throwOnTimeout: true }`. Without that
|
|
18
|
+
* flag search() catches it and returns [] instead, preserving fail-open
|
|
19
|
+
* semantics for recall-path callers (searchEmbeddingFallback) that have no
|
|
20
|
+
* try/catch. Only the semantic-dedup path (semanticDedupLookup) passes the
|
|
21
|
+
* flag so it can still reach decideSemanticDedup's backend_unavailable branch.
|
|
22
|
+
*
|
|
23
|
+
* Round 11 fix (Finding Ur_J): `embed()` now also throws this error from the
|
|
24
|
+
* lookup path when the HTTP response is non-2xx (e.g. 429, 500, 503). Without
|
|
25
|
+
* this, repeated 5xx outages would each return null → [] → no_candidates and
|
|
26
|
+
* subsequent facts in the same batch would all pay full roundtrips instead of
|
|
27
|
+
* tripping the per-batch backend_unavailable short-circuit.
|
|
28
|
+
*
|
|
29
|
+
* The class name is kept for backward compatibility — `EmbeddingTimeoutError`
|
|
30
|
+
* now signals "lookup backend unavailable" rather than strictly "timed out".
|
|
31
|
+
*/
|
|
32
|
+
declare class EmbeddingTimeoutError extends Error {
|
|
33
|
+
readonly name: "EmbeddingTimeoutError";
|
|
34
|
+
constructor(message: string);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Options for the low-level embed() call.
|
|
38
|
+
*
|
|
39
|
+
* `mode` selects the timeout profile:
|
|
40
|
+
* - "lookup" (default): bounded by the short lookup budget; fails open fast.
|
|
41
|
+
* - "index": bounded by a much longer budget so slow backends can still
|
|
42
|
+
* index newly persisted memories.
|
|
43
|
+
*/
|
|
44
|
+
type EmbedMode = "lookup" | "index";
|
|
3
45
|
declare class EmbeddingFallback {
|
|
4
46
|
private readonly config;
|
|
5
47
|
private readonly indexPath;
|
|
6
48
|
private loaded;
|
|
7
49
|
constructor(config: PluginConfig);
|
|
8
50
|
isAvailable(): Promise<boolean>;
|
|
9
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Embed an array of texts and return their embedding vectors.
|
|
53
|
+
*
|
|
54
|
+
* This is the public batch-embed interface used by semantic chunking
|
|
55
|
+
* (Finding 1, PR #420 post-merge). Texts are grouped into batches of
|
|
56
|
+
* `embeddingBatchSize` (from `semanticChunkingConfig`, default 32) and
|
|
57
|
+
* each batch is dispatched concurrently via `Promise.all()`. This
|
|
58
|
+
* preserves the semantic intent of `embeddingBatchSize` — without batching,
|
|
59
|
+
* every text incurred a sequential HTTP round-trip, making the batch size
|
|
60
|
+
* config ineffective. (PR #439 post-merge Finding 2.)
|
|
61
|
+
*
|
|
62
|
+
* If the provider is unavailable or any single embedding fails, the method
|
|
63
|
+
* throws so the caller can fall back to recursive chunking.
|
|
64
|
+
*/
|
|
65
|
+
embedTexts(texts: string[]): Promise<number[][]>;
|
|
66
|
+
/**
|
|
67
|
+
* Nearest-neighbor search against the embedding index.
|
|
68
|
+
*
|
|
69
|
+
* @param query The query string to embed and search for.
|
|
70
|
+
* @param limit Max number of hits to return.
|
|
71
|
+
* @param options Optional filters.
|
|
72
|
+
* - `pathPrefix` Restrict candidates to entries whose indexed `path`
|
|
73
|
+
* starts with this prefix (relative to `memoryDir`).
|
|
74
|
+
* Used by the semantic dedup guard to scope lookups
|
|
75
|
+
* to the target namespace so a high-similarity hit
|
|
76
|
+
* from a different namespace can't suppress a write
|
|
77
|
+
* in the target namespace. Default: no filter.
|
|
78
|
+
* - `pathExcludePrefixes`
|
|
79
|
+
* Exclude any entry whose indexed `path` starts with
|
|
80
|
+
* any of these prefixes. Used for the default
|
|
81
|
+
* namespace case: when the default namespace lives at
|
|
82
|
+
* `memoryDir` root (legacy layout) we still want to
|
|
83
|
+
* exclude `namespaces/<other>/…` entries.
|
|
84
|
+
*/
|
|
85
|
+
search(query: string, limit: number, options?: {
|
|
86
|
+
pathPrefix?: string;
|
|
87
|
+
pathExcludePrefixes?: readonly string[];
|
|
88
|
+
/**
|
|
89
|
+
* When true, an `EmbeddingTimeoutError` from the embedding backend is
|
|
90
|
+
* re-thrown to the caller. Use this on the semantic-dedup path so
|
|
91
|
+
* `decideSemanticDedup`'s catch block can classify the result as
|
|
92
|
+
* `reason="backend_unavailable"` and activate the per-batch
|
|
93
|
+
* short-circuit.
|
|
94
|
+
*
|
|
95
|
+
* When false (the default), a timeout is caught here and search()
|
|
96
|
+
* returns [] instead — preserving fail-open semantics for the recall
|
|
97
|
+
* path (`searchEmbeddingFallback`) which has no surrounding try/catch.
|
|
98
|
+
* Without this gate a timed-out embedding request on the recall path
|
|
99
|
+
* would propagate as an unhandled rejection and abort recall entirely.
|
|
100
|
+
* (Round 10 fix, Findings Ui1J + Ui1L.)
|
|
101
|
+
*/
|
|
102
|
+
throwOnTimeout?: boolean;
|
|
103
|
+
}): Promise<Array<{
|
|
10
104
|
id: string;
|
|
11
105
|
score: number;
|
|
12
106
|
path: string;
|
|
@@ -19,4 +113,4 @@ declare class EmbeddingFallback {
|
|
|
19
113
|
private saveIndex;
|
|
20
114
|
}
|
|
21
115
|
|
|
22
|
-
export { EmbeddingFallback };
|
|
116
|
+
export { type EmbedMode, EmbeddingFallback, EmbeddingTimeoutError };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
EmbeddingFallback
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
EmbeddingFallback,
|
|
3
|
+
EmbeddingTimeoutError
|
|
4
|
+
} from "./chunk-ALXMCZEU.js";
|
|
5
|
+
import "./chunk-2ODBA7MQ.js";
|
|
5
6
|
export {
|
|
6
|
-
EmbeddingFallback
|
|
7
|
+
EmbeddingFallback,
|
|
8
|
+
EmbeddingTimeoutError
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=embedding-fallback.js.map
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompoundingEngine,
|
|
3
3
|
defaultTierMigrationCycleBudget
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-DHHP2Z4X.js";
|
|
5
|
+
import "./chunk-GV6NLQ4X.js";
|
|
6
|
+
import "./chunk-3WHVNEN7.js";
|
|
7
|
+
import "./chunk-4KAN3GZ3.js";
|
|
8
|
+
import "./chunk-6ZH4TU6I.js";
|
|
9
9
|
import "./chunk-SCU65EZI.js";
|
|
10
10
|
import "./chunk-BOUYNNYD.js";
|
|
11
|
+
import "./chunk-6PFRXT4K.js";
|
|
12
|
+
import "./chunk-TP4FZJIZ.js";
|
|
11
13
|
import "./chunk-DM2T26WE.js";
|
|
12
14
|
import "./chunk-QSVPYQPG.js";
|
|
13
15
|
import "./chunk-M62O4P4T.js";
|
|
14
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-4DJQYKMN.js";
|
|
17
|
+
import "./chunk-2ODBA7MQ.js";
|
|
15
18
|
export {
|
|
16
19
|
CompoundingEngine,
|
|
17
20
|
defaultTierMigrationCycleBudget
|
|
18
21
|
};
|
|
19
|
-
//# sourceMappingURL=engine-
|
|
22
|
+
//# sourceMappingURL=engine-5TIQBYZR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
2
|
import { PluginConfig, TranscriptEntry } from './types.js';
|
|
3
|
-
import './
|
|
3
|
+
import './page-versioning.js';
|
|
4
|
+
import './memory-projection-store-DeSXPh1j.js';
|
|
4
5
|
import 'better-sqlite3';
|
|
5
6
|
|
|
6
7
|
interface BuildEntityRecallSectionOptions {
|
|
@@ -17,7 +18,7 @@ interface BuildEntityRecallSectionOptions {
|
|
|
17
18
|
}
|
|
18
19
|
declare function buildEntityRecallSection(options: BuildEntityRecallSectionOptions): Promise<string | null>;
|
|
19
20
|
declare function readRecentEntityTranscriptEntries(transcriptEntriesPromise: Promise<TranscriptEntry[]>, recentTurns: number): Promise<TranscriptEntry[]>;
|
|
20
|
-
declare const entityIndexVersion =
|
|
21
|
+
declare const entityIndexVersion = 3;
|
|
21
22
|
declare const entityRecentTranscriptLookbackHours = 24;
|
|
22
23
|
|
|
23
24
|
export { type BuildEntityRecallSectionOptions, buildEntityRecallSection, entityIndexVersion, entityRecentTranscriptLookbackHours, readRecentEntityTranscriptEntries };
|
package/dist/entity-retrieval.js
CHANGED
|
@@ -3,18 +3,21 @@ import {
|
|
|
3
3
|
entityIndexVersion,
|
|
4
4
|
entityRecentTranscriptLookbackHours,
|
|
5
5
|
readRecentEntityTranscriptEntries
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-7WQ6SLIE.js";
|
|
7
|
+
import "./chunk-7SEAZFFB.js";
|
|
8
|
+
import "./chunk-GV6NLQ4X.js";
|
|
9
|
+
import "./chunk-3WHVNEN7.js";
|
|
10
|
+
import "./chunk-4KAN3GZ3.js";
|
|
11
|
+
import "./chunk-6ZH4TU6I.js";
|
|
12
12
|
import "./chunk-SCU65EZI.js";
|
|
13
13
|
import "./chunk-BOUYNNYD.js";
|
|
14
|
+
import "./chunk-6PFRXT4K.js";
|
|
15
|
+
import "./chunk-TP4FZJIZ.js";
|
|
14
16
|
import "./chunk-DM2T26WE.js";
|
|
15
17
|
import "./chunk-QSVPYQPG.js";
|
|
16
18
|
import "./chunk-M62O4P4T.js";
|
|
17
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-4DJQYKMN.js";
|
|
20
|
+
import "./chunk-2ODBA7MQ.js";
|
|
18
21
|
export {
|
|
19
22
|
buildEntityRecallSection,
|
|
20
23
|
entityIndexVersion,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EntitySchemaDefinition, EntitySchemaSectionDefinition, EntityStructuredSection } from './types.js';
|
|
2
|
+
|
|
3
|
+
declare function normalizeEntityText(value: string): string;
|
|
4
|
+
declare function normalizeEntitySchemas(raw: unknown): Record<string, EntitySchemaDefinition> | undefined;
|
|
5
|
+
declare function getEntitySchema(entityType: string, entitySchemas?: Record<string, EntitySchemaDefinition>): EntitySchemaDefinition | undefined;
|
|
6
|
+
declare function matchEntitySchemaSection(entityType: string, title: string, entitySchemas?: Record<string, EntitySchemaDefinition>): EntitySchemaSectionDefinition | null;
|
|
7
|
+
declare function normalizeEntityStructuredSection(entityType: string, section: Pick<EntityStructuredSection, "key" | "title">, entitySchemas?: Record<string, EntitySchemaDefinition>): Pick<EntityStructuredSection, "key" | "title">;
|
|
8
|
+
declare function resolveRequestedEntitySectionKeys(query: string, entityType: string, availableSections: EntityStructuredSection[], entitySchemas?: Record<string, EntitySchemaDefinition>): string[];
|
|
9
|
+
declare function sortStructuredSectionsBySchema(entityType: string, sections: EntityStructuredSection[], entitySchemas?: Record<string, EntitySchemaDefinition>): EntityStructuredSection[];
|
|
10
|
+
|
|
11
|
+
export { getEntitySchema, matchEntitySchemaSection, normalizeEntitySchemas, normalizeEntityStructuredSection, normalizeEntityText, resolveRequestedEntitySectionKeys, sortStructuredSectionsBySchema };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getEntitySchema,
|
|
3
|
+
matchEntitySchemaSection,
|
|
4
|
+
normalizeEntitySchemas,
|
|
5
|
+
normalizeEntityStructuredSection,
|
|
6
|
+
normalizeEntityText,
|
|
7
|
+
resolveRequestedEntitySectionKeys,
|
|
8
|
+
sortStructuredSectionsBySchema
|
|
9
|
+
} from "./chunk-4DJQYKMN.js";
|
|
10
|
+
export {
|
|
11
|
+
getEntitySchema,
|
|
12
|
+
matchEntitySchemaSection,
|
|
13
|
+
normalizeEntitySchemas,
|
|
14
|
+
normalizeEntityStructuredSection,
|
|
15
|
+
normalizeEntityText,
|
|
16
|
+
resolveRequestedEntitySectionKeys,
|
|
17
|
+
sortStructuredSectionsBySchema
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=entity-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { O as Orchestrator } from './orchestrator-
|
|
1
|
+
import { O as Orchestrator } from './orchestrator-DRYA6_lW.js';
|
|
2
2
|
import { MemoryCategory, PluginConfig } from './types.js';
|
|
3
3
|
import './buffer.js';
|
|
4
4
|
import './storage.js';
|
|
5
|
-
import './
|
|
5
|
+
import './page-versioning.js';
|
|
6
|
+
import './memory-projection-store-DeSXPh1j.js';
|
|
6
7
|
import 'better-sqlite3';
|
|
7
8
|
import './port-C1GZFv8h.js';
|
|
8
9
|
import './transcript.js';
|
|
@@ -15,7 +16,9 @@ import './negative.js';
|
|
|
15
16
|
import './recall-state.js';
|
|
16
17
|
import './session-observer-state.js';
|
|
17
18
|
import './embedding-fallback.js';
|
|
18
|
-
import './semantic-consolidation.js';
|
|
19
|
+
import './semantic-consolidation-DrvSYRdB.js';
|
|
20
|
+
import './codex-materialize-CQlLTzke.js';
|
|
21
|
+
import './logger.js';
|
|
19
22
|
import 'zod';
|
|
20
23
|
import './policy-runtime.js';
|
|
21
24
|
import './profiling.js';
|
package/dist/explicit-capture.js
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
shouldSkipImplicitExtraction,
|
|
8
8
|
stripInlineExplicitCaptureNotes,
|
|
9
9
|
validateExplicitCaptureInput
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-QDYXG4CS.js";
|
|
11
|
+
import "./chunk-QNJMBKFK.js";
|
|
12
12
|
import "./chunk-M62O4P4T.js";
|
|
13
13
|
export {
|
|
14
14
|
hasInlineExplicitCaptureMarkup,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ImportanceLevel, PluginConfig } from './types.js';
|
|
2
|
+
import { LocalLlmClient } from './local-llm.js';
|
|
3
|
+
import { FallbackLlmClient } from './fallback-llm.js';
|
|
4
|
+
import './model-registry.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Extraction Judge — LLM-as-judge fact-worthiness gate (issue #376).
|
|
8
|
+
*
|
|
9
|
+
* Evaluates extracted facts against a durability rubric before they are
|
|
10
|
+
* persisted. Facts that are unlikely to be useful 30+ days from now or
|
|
11
|
+
* across sessions are rejected (or shadow-logged depending on config).
|
|
12
|
+
*
|
|
13
|
+
* Design constraints:
|
|
14
|
+
* - Corrections and principles are auto-approved (safety bypass).
|
|
15
|
+
* - Critical-importance facts are auto-approved.
|
|
16
|
+
* - Batches respect extractionJudgeBatchSize.
|
|
17
|
+
* - Content-hash caching avoids redundant LLM calls.
|
|
18
|
+
* - Performance budget: <= 1.5s per batch.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface JudgeCandidate {
|
|
22
|
+
text: string;
|
|
23
|
+
category: string;
|
|
24
|
+
confidence: number;
|
|
25
|
+
tags?: string[];
|
|
26
|
+
/** Local importance level, set by caller before judging. */
|
|
27
|
+
importanceLevel?: ImportanceLevel;
|
|
28
|
+
}
|
|
29
|
+
interface JudgeVerdict {
|
|
30
|
+
durable: boolean;
|
|
31
|
+
reason: string;
|
|
32
|
+
}
|
|
33
|
+
interface JudgeBatchResult {
|
|
34
|
+
verdicts: Map<number, JudgeVerdict>;
|
|
35
|
+
/** Number of verdicts served from cache. */
|
|
36
|
+
cached: number;
|
|
37
|
+
/** Number of verdicts produced by an LLM call. */
|
|
38
|
+
judged: number;
|
|
39
|
+
/** Total wall-clock time in milliseconds. */
|
|
40
|
+
elapsed: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Deterministic gate for extracted `procedure` memories: ≥2 steps with non-empty
|
|
44
|
+
* intents and explicit trigger wording in title and/or steps.
|
|
45
|
+
*/
|
|
46
|
+
declare function validateProcedureExtraction(input: {
|
|
47
|
+
content: string;
|
|
48
|
+
procedureSteps?: unknown;
|
|
49
|
+
}): JudgeVerdict;
|
|
50
|
+
/**
|
|
51
|
+
* Evaluate a batch of candidate facts for durability.
|
|
52
|
+
*
|
|
53
|
+
* Auto-approves corrections, principles, and critical-importance facts.
|
|
54
|
+
* Remaining candidates are batched (up to extractionJudgeBatchSize),
|
|
55
|
+
* checked against an in-memory content-hash cache, and sent to the LLM
|
|
56
|
+
* for verdict.
|
|
57
|
+
*/
|
|
58
|
+
declare function judgeFactDurability(candidates: JudgeCandidate[], config: PluginConfig, localLlm: LocalLlmClient | null, fallbackLlm: FallbackLlmClient | null, cache?: Map<string, JudgeVerdict>): Promise<JudgeBatchResult>;
|
|
59
|
+
/** Clear the in-memory default verdict cache. Primarily for tests. */
|
|
60
|
+
declare function clearVerdictCache(): void;
|
|
61
|
+
/** Return the current default verdict cache size. Primarily for tests. */
|
|
62
|
+
declare function verdictCacheSize(): number;
|
|
63
|
+
/** Create a new per-instance verdict cache. Orchestrators should hold one. */
|
|
64
|
+
declare function createVerdictCache(): Map<string, JudgeVerdict>;
|
|
65
|
+
|
|
66
|
+
export { type JudgeBatchResult, type JudgeCandidate, type JudgeVerdict, clearVerdictCache, createVerdictCache, judgeFactDurability, validateProcedureExtraction, verdictCacheSize };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clearVerdictCache,
|
|
3
|
+
createVerdictCache,
|
|
4
|
+
judgeFactDurability,
|
|
5
|
+
validateProcedureExtraction,
|
|
6
|
+
verdictCacheSize
|
|
7
|
+
} from "./chunk-LAYN4LDC.js";
|
|
8
|
+
import "./chunk-UZB5KHKX.js";
|
|
9
|
+
import "./chunk-QDW3E4RD.js";
|
|
10
|
+
import "./chunk-2ODBA7MQ.js";
|
|
11
|
+
export {
|
|
12
|
+
clearVerdictCache,
|
|
13
|
+
createVerdictCache,
|
|
14
|
+
judgeFactDurability,
|
|
15
|
+
validateProcedureExtraction,
|
|
16
|
+
verdictCacheSize
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=extraction-judge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/extraction.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ declare class ExtractionEngine {
|
|
|
37
37
|
private sanitizeExtractionResult;
|
|
38
38
|
private hasExtractionOutputs;
|
|
39
39
|
private normalizeExtractionResultPayload;
|
|
40
|
+
private normalizeEntityUpdate;
|
|
40
41
|
private parseJsonObject;
|
|
41
42
|
private normalizeContradictionVerificationResult;
|
|
42
43
|
private normalizeSuggestedLinksResult;
|
package/dist/extraction.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ExtractionEngine
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3SV6CQHO.js";
|
|
4
|
+
import "./chunk-UEYA6UC7.js";
|
|
5
|
+
import "./chunk-NBNN5GOB.js";
|
|
6
|
+
import "./chunk-FEMOX5AD.js";
|
|
7
|
+
import "./chunk-JL2PU6AI.js";
|
|
8
|
+
import "./chunk-GZCUW5IC.js";
|
|
9
9
|
import "./chunk-VEWZZM3H.js";
|
|
10
10
|
import "./chunk-LK6SGL53.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-EJI5XIBB.js";
|
|
12
|
+
import "./chunk-44ICJRF3.js";
|
|
13
|
+
import "./chunk-XZ2TIKGC.js";
|
|
14
14
|
import "./chunk-Y27UJK6V.js";
|
|
15
|
+
import "./chunk-ODWDQNRE.js";
|
|
15
16
|
import "./chunk-UZB5KHKX.js";
|
|
16
17
|
import "./chunk-MARWOCVP.js";
|
|
17
18
|
import "./chunk-EEQLFRUM.js";
|
|
19
|
+
import "./chunk-QDW3E4RD.js";
|
|
18
20
|
import "./chunk-M62O4P4T.js";
|
|
19
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-2ODBA7MQ.js";
|
|
20
22
|
export {
|
|
21
23
|
ExtractionEngine
|
|
22
24
|
};
|
package/dist/fallback-llm.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ interface FallbackLlmResponse {
|
|
|
16
16
|
totalTokens?: number;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
+
interface FallbackLlmRuntimeContext {
|
|
20
|
+
agentDir?: string;
|
|
21
|
+
workspaceDir?: string;
|
|
22
|
+
}
|
|
19
23
|
/**
|
|
20
24
|
* Generic fallback LLM client that uses the gateway's default AI configuration
|
|
21
25
|
* and walks through the full fallback chain (primary + fallbacks).
|
|
@@ -23,7 +27,8 @@ interface FallbackLlmResponse {
|
|
|
23
27
|
*/
|
|
24
28
|
declare class FallbackLlmClient {
|
|
25
29
|
private gatewayConfig;
|
|
26
|
-
|
|
30
|
+
private runtimeContext;
|
|
31
|
+
constructor(gatewayConfig?: GatewayConfig, runtimeContext?: FallbackLlmRuntimeContext);
|
|
27
32
|
/**
|
|
28
33
|
* Check if fallback is available (gateway config has at least one model).
|
|
29
34
|
*/
|
|
@@ -105,10 +110,14 @@ declare class FallbackLlmClient {
|
|
|
105
110
|
* Call OpenAI-compatible API.
|
|
106
111
|
*/
|
|
107
112
|
private callOpenAI;
|
|
113
|
+
/**
|
|
114
|
+
* Call an OpenAI-compatible Responses API.
|
|
115
|
+
*/
|
|
116
|
+
private callOpenAIResponses;
|
|
108
117
|
/**
|
|
109
118
|
* Call Anthropic Messages API.
|
|
110
119
|
*/
|
|
111
120
|
private callAnthropic;
|
|
112
121
|
}
|
|
113
122
|
|
|
114
|
-
export { FallbackLlmClient, type FallbackLlmOptions, type FallbackLlmResponse };
|
|
123
|
+
export { FallbackLlmClient, type FallbackLlmOptions, type FallbackLlmResponse, type FallbackLlmRuntimeContext };
|
package/dist/fallback-llm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FallbackLlmClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-OOSWAUYB.js";
|
|
3
|
+
} from "./chunk-44ICJRF3.js";
|
|
4
|
+
import "./chunk-XZ2TIKGC.js";
|
|
6
5
|
import "./chunk-Y27UJK6V.js";
|
|
6
|
+
import "./chunk-ODWDQNRE.js";
|
|
7
7
|
import "./chunk-UZB5KHKX.js";
|
|
8
8
|
import "./chunk-MARWOCVP.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-2ODBA7MQ.js";
|
|
10
10
|
export {
|
|
11
11
|
FallbackLlmClient
|
|
12
12
|
};
|
package/dist/graph.js
CHANGED
package/dist/importance.d.ts
CHANGED
|
@@ -21,5 +21,15 @@ declare function rescoreMemoryImportance(memory: MemoryFile): ImportanceScore;
|
|
|
21
21
|
* Get importance level from numeric score.
|
|
22
22
|
*/
|
|
23
23
|
declare function importanceLevel(score: number): ImportanceLevel;
|
|
24
|
+
/**
|
|
25
|
+
* Return true if `candidate` meets or exceeds `threshold`. Used by the
|
|
26
|
+
* extraction write gate in orchestrator.persistExtraction() to drop trivial
|
|
27
|
+
* content before it is written to the memory store.
|
|
28
|
+
*
|
|
29
|
+
* Note: callers should pass the ALREADY-BOOSTED level returned by
|
|
30
|
+
* scoreImportance(), because category boosts (e.g. corrections) are applied
|
|
31
|
+
* inside scoreImportance() before the level is derived.
|
|
32
|
+
*/
|
|
33
|
+
declare function isAboveImportanceThreshold(candidate: ImportanceLevel, threshold: ImportanceLevel): boolean;
|
|
24
34
|
|
|
25
|
-
export { importanceLevel, rescoreMemoryImportance, scoreImportance };
|
|
35
|
+
export { importanceLevel, isAboveImportanceThreshold, rescoreMemoryImportance, scoreImportance };
|
package/dist/importance.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importanceLevel,
|
|
3
|
+
isAboveImportanceThreshold,
|
|
3
4
|
rescoreMemoryImportance,
|
|
4
5
|
scoreImportance
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J4IYOZZ5.js";
|
|
6
7
|
export {
|
|
7
8
|
importanceLevel,
|
|
9
|
+
isAboveImportanceThreshold,
|
|
8
10
|
rescoreMemoryImportance,
|
|
9
11
|
scoreImportance
|
|
10
12
|
};
|