@remnic/core 1.0.3 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abort-error.d.ts +32 -0
- package/dist/abort-error.js +11 -0
- package/dist/access-audit.d.ts +56 -0
- package/dist/access-audit.js +9 -0
- package/dist/access-audit.js.map +1 -0
- package/dist/access-cli.js +72 -54
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +16 -8
- package/dist/access-http.js +25 -17
- package/dist/access-mcp.d.ts +16 -8
- package/dist/access-mcp.js +28 -6
- package/dist/access-schema.d.ts +130 -39
- package/dist/access-schema.js +5 -1
- package/dist/access-service-Br8ZydTK.d.ts +827 -0
- package/dist/access-service.d.ts +20 -660
- package/dist/access-service.js +22 -14
- package/dist/bootstrap.d.ts +6 -3
- package/dist/briefing.d.ts +1 -0
- package/dist/briefing.js +6 -5
- package/dist/buffer-surprise-report.d.ts +70 -0
- package/dist/buffer-surprise-report.js +7 -0
- package/dist/buffer-surprise-report.js.map +1 -0
- package/dist/buffer-surprise.d.ts +98 -0
- package/dist/buffer-surprise.js +11 -0
- package/dist/buffer-surprise.js.map +1 -0
- package/dist/buffer.d.ts +100 -2
- package/dist/buffer.js +1 -1
- package/dist/calibration.js +5 -5
- package/dist/causal-behavior.js +4 -4
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +17 -16
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +4 -4
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-QNJMBKFK.js → chunk-2LGMW3DJ.js} +3 -2
- package/dist/chunk-2LGMW3DJ.js.map +1 -0
- package/dist/{chunk-QDYXG4CS.js → chunk-3FPTCC3Z.js} +4 -3
- package/dist/chunk-3FPTCC3Z.js.map +1 -0
- package/dist/chunk-3GPTTA4J.js +57 -0
- package/dist/chunk-3GPTTA4J.js.map +1 -0
- package/dist/{chunk-QKAH5B6E.js → chunk-3GXCSUXR.js} +94 -6
- package/dist/chunk-3GXCSUXR.js.map +1 -0
- package/dist/{chunk-POBPGDWI.js → chunk-3OGMS3PE.js} +2 -2
- package/dist/chunk-54V4BZWP.js +139 -0
- package/dist/chunk-54V4BZWP.js.map +1 -0
- package/dist/chunk-5JRF2PZA.js +67 -0
- package/dist/chunk-5JRF2PZA.js.map +1 -0
- package/dist/chunk-64NJRYU2.js +332 -0
- package/dist/chunk-64NJRYU2.js.map +1 -0
- package/dist/chunk-6AUUAZEX.js +150 -0
- package/dist/chunk-6AUUAZEX.js.map +1 -0
- package/dist/{chunk-HITJFT7E.js → chunk-7I7FKFZH.js} +28 -21
- package/dist/chunk-7I7FKFZH.js.map +1 -0
- package/dist/chunk-AJU4PJGY.js +126 -0
- package/dist/chunk-AJU4PJGY.js.map +1 -0
- package/dist/chunk-ASAITVLA.js +64 -0
- package/dist/chunk-ASAITVLA.js.map +1 -0
- package/dist/{chunk-X4WESCKA.js → chunk-B5WXLVDY.js} +187 -6
- package/dist/chunk-B5WXLVDY.js.map +1 -0
- package/dist/{chunk-RCICHSHL.js → chunk-BGJGXLZ7.js} +111 -2
- package/dist/{chunk-RCICHSHL.js.map → chunk-BGJGXLZ7.js.map} +1 -1
- package/dist/{chunk-OJFGVJS6.js → chunk-BK2EFTE2.js} +319 -18
- package/dist/chunk-BK2EFTE2.js.map +1 -0
- package/dist/chunk-C4SQJZAF.js +486 -0
- package/dist/chunk-C4SQJZAF.js.map +1 -0
- package/dist/{chunk-GJQPH5G3.js → chunk-CUPFXL3J.js} +2 -2
- package/dist/chunk-DF3RVK3X.js +119 -0
- package/dist/chunk-DF3RVK3X.js.map +1 -0
- package/dist/{chunk-PMB3WGDL.js → chunk-DFTTJYSO.js} +167 -7
- package/dist/chunk-DFTTJYSO.js.map +1 -0
- package/dist/chunk-DGVM5SFL.js +69 -0
- package/dist/chunk-DGVM5SFL.js.map +1 -0
- package/dist/chunk-EIR5VLIH.js +90 -0
- package/dist/chunk-EIR5VLIH.js.map +1 -0
- package/dist/{chunk-PAORGQRI.js → chunk-EPQJM2GC.js} +37 -23
- package/dist/chunk-EPQJM2GC.js.map +1 -0
- package/dist/{chunk-POMSFKTB.js → chunk-F5VP6YCB.js} +368 -10
- package/dist/chunk-F5VP6YCB.js.map +1 -0
- package/dist/{chunk-6ZH4TU6I.js → chunk-FAAFWE4G.js} +2 -1
- package/dist/chunk-FAAFWE4G.js.map +1 -0
- package/dist/{chunk-74JR4N5J.js → chunk-FVA6TGI3.js} +2 -2
- package/dist/chunk-GDFS42HT.js +206 -0
- package/dist/chunk-GDFS42HT.js.map +1 -0
- package/dist/{chunk-BKQJBXXX.js → chunk-GGD5W7TB.js} +2 -2
- package/dist/chunk-GGD5W7TB.js.map +1 -0
- package/dist/{chunk-V7XCAHIB.js → chunk-GKFXUTJ2.js} +508 -26
- package/dist/chunk-GKFXUTJ2.js.map +1 -0
- package/dist/{chunk-NSB3WSYS.js → chunk-HK3FGIEW.js} +278 -3
- package/dist/chunk-HK3FGIEW.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-IISBCCWR.js +52 -0
- package/dist/chunk-IISBCCWR.js.map +1 -0
- package/dist/{chunk-YFYL2SIJ.js → chunk-INXV5JBT.js} +290 -46
- package/dist/chunk-INXV5JBT.js.map +1 -0
- package/dist/chunk-JBMSGZEQ.js +441 -0
- package/dist/chunk-JBMSGZEQ.js.map +1 -0
- package/dist/{chunk-UPMD5XND.js → chunk-JL2PU6AI.js} +16 -5
- package/dist/chunk-JL2PU6AI.js.map +1 -0
- package/dist/{chunk-J4IYOZZ5.js → chunk-JXS5PDQ7.js} +3 -1
- package/dist/chunk-JXS5PDQ7.js.map +1 -0
- package/dist/{chunk-AYPYCLR7.js → chunk-KUB6JU6H.js} +4 -4
- package/dist/chunk-KVBLZUKV.js +173 -0
- package/dist/chunk-KVBLZUKV.js.map +1 -0
- package/dist/chunk-LBLXEFWK.js +51 -0
- package/dist/chunk-LBLXEFWK.js.map +1 -0
- package/dist/{chunk-U2IQTSBY.js → chunk-LTCGGW2D.js} +1 -1
- package/dist/chunk-LTCGGW2D.js.map +1 -0
- package/dist/{chunk-UEYA6UC7.js → chunk-NZLQTHS5.js} +25 -2
- package/dist/chunk-NZLQTHS5.js.map +1 -0
- package/dist/chunk-PVGDJXVK.js +21 -0
- package/dist/chunk-PVGDJXVK.js.map +1 -0
- package/dist/chunk-PVPWZSSI.js +37 -0
- package/dist/chunk-PVPWZSSI.js.map +1 -0
- package/dist/{chunk-4NRAJUDS.js → chunk-RBBWYEFJ.js} +1 -1
- package/dist/chunk-RFYAYKTD.js +146 -0
- package/dist/chunk-RFYAYKTD.js.map +1 -0
- package/dist/{chunk-JROGC36Y.js → chunk-RGLL5SPU.js} +2 -2
- package/dist/{chunk-2VFW5K5U.js → chunk-S3EEFKNY.js} +103 -65
- package/dist/chunk-S3EEFKNY.js.map +1 -0
- package/dist/chunk-SOBJ6NEY.js +18 -0
- package/dist/chunk-SOBJ6NEY.js.map +1 -0
- package/dist/{chunk-MYQWXITD.js → chunk-SPI27QT6.js} +2 -2
- package/dist/chunk-TVVEYCNW.js +65 -0
- package/dist/chunk-TVVEYCNW.js.map +1 -0
- package/dist/chunk-ULYOGL6R.js +322 -0
- package/dist/chunk-ULYOGL6R.js.map +1 -0
- package/dist/{chunk-S4LX5EBI.js → chunk-VBVG2M5G.js} +64 -10
- package/dist/chunk-VBVG2M5G.js.map +1 -0
- package/dist/{chunk-KWP7T3DP.js → chunk-VDX363PS.js} +2 -2
- package/dist/{chunk-XMGSSBFX.js → chunk-VYM3VWOF.js} +1560 -244
- package/dist/chunk-VYM3VWOF.js.map +1 -0
- package/dist/{chunk-MTLYEMJB.js → chunk-WCLICCGB.js} +18 -3
- package/dist/chunk-WCLICCGB.js.map +1 -0
- package/dist/{chunk-ECKDIK5F.js → chunk-WVVA7F5A.js} +2 -2
- package/dist/chunk-X6GF3FX2.js +26 -0
- package/dist/chunk-X6GF3FX2.js.map +1 -0
- package/dist/{chunk-3QFQGRHO.js → chunk-XMHBH5H6.js} +4 -4
- package/dist/{chunk-KEG4GNGI.js → chunk-XZ2TIKGC.js} +38 -8
- 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-YNB73F22.js +137 -0
- package/dist/chunk-YNB73F22.js.map +1 -0
- package/dist/{chunk-7PA4OZEU.js → chunk-YNQKWQT4.js} +55 -30
- package/dist/chunk-YNQKWQT4.js.map +1 -0
- package/dist/chunk-ZAIM4TUE.js +488 -0
- package/dist/chunk-ZAIM4TUE.js.map +1 -0
- package/dist/{chunk-BTY5RRRF.js → chunk-ZEM3OK2K.js} +5 -5
- package/dist/chunk-ZZTOURJI.js +91 -0
- package/dist/chunk-ZZTOURJI.js.map +1 -0
- package/dist/{cli-DwIBnp2g.d.ts → cli-BkeRaYfk.d.ts} +2 -2
- package/dist/cli.d.ts +13 -5
- package/dist/cli.js +45 -33
- package/dist/config.js +1 -1
- package/dist/consolidation-operator.d.ts +41 -0
- package/dist/consolidation-operator.js +11 -0
- package/dist/consolidation-operator.js.map +1 -0
- package/dist/consolidation-provenance-check.d.ts +68 -0
- package/dist/consolidation-provenance-check.js +9 -0
- package/dist/consolidation-provenance-check.js.map +1 -0
- package/dist/consolidation-undo.d.ts +123 -0
- package/dist/consolidation-undo.js +426 -0
- package/dist/consolidation-undo.js.map +1 -0
- package/dist/contradiction-review-WIUBAR52.js +21 -0
- package/dist/contradiction-review-WIUBAR52.js.map +1 -0
- package/dist/contradiction-scan-E3GJTI4F.js +412 -0
- package/dist/contradiction-scan-E3GJTI4F.js.map +1 -0
- package/dist/cross-namespace-budget.d.ts +133 -0
- package/dist/cross-namespace-budget.js +9 -0
- package/dist/cross-namespace-budget.js.map +1 -0
- package/dist/direct-answer-wiring.d.ts +77 -0
- package/dist/direct-answer-wiring.js +10 -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/{engine-X7X3AAG3.js → engine-F3GOXGE5.js} +7 -6
- package/dist/engine-F3GOXGE5.js.map +1 -0
- package/dist/entity-retrieval.d.ts +1 -0
- package/dist/entity-retrieval.js +6 -5
- package/dist/explicit-capture.d.ts +6 -3
- package/dist/explicit-capture.js +2 -2
- package/dist/extraction-judge-telemetry.d.ts +113 -0
- package/dist/extraction-judge-telemetry.js +14 -0
- package/dist/extraction-judge-telemetry.js.map +1 -0
- package/dist/extraction-judge-training.d.ts +85 -0
- package/dist/extraction-judge-training.js +16 -0
- package/dist/extraction-judge-training.js.map +1 -0
- package/dist/extraction-judge.d.ts +124 -2
- package/dist/extraction-judge.js +11 -1
- package/dist/extraction.js +7 -6
- package/dist/fallback-llm.d.ts +11 -2
- package/dist/fallback-llm.js +2 -2
- package/dist/graph-recall.d.ts +100 -0
- package/dist/graph-recall.js +8 -0
- package/dist/graph-recall.js.map +1 -0
- package/dist/graph-retrieval.d.ts +271 -0
- package/dist/graph-retrieval.js +21 -0
- package/dist/graph-retrieval.js.map +1 -0
- package/dist/harmonic-retrieval.js +2 -1
- package/dist/importance.js +1 -1
- package/dist/index.d.ts +589 -138
- package/dist/index.js +531 -403
- package/dist/index.js.map +1 -1
- package/dist/intent.js +1 -1
- package/dist/local-llm.d.ts +10 -3
- package/dist/local-llm.js +1 -1
- package/dist/memory-worth-bench.d.ts +51 -0
- package/dist/memory-worth-bench.js +131 -0
- package/dist/memory-worth-bench.js.map +1 -0
- package/dist/memory-worth-filter.d.ts +128 -0
- package/dist/memory-worth-filter.js +10 -0
- package/dist/memory-worth-filter.js.map +1 -0
- package/dist/memory-worth-outcomes.d.ts +118 -0
- package/dist/memory-worth-outcomes.js +9 -0
- package/dist/memory-worth-outcomes.js.map +1 -0
- package/dist/memory-worth.d.ts +102 -0
- package/dist/memory-worth.js +7 -0
- package/dist/memory-worth.js.map +1 -0
- package/dist/operator-toolkit.d.ts +40 -1
- package/dist/operator-toolkit.js +24 -14
- package/dist/{orchestrator-B9kwlCep.d.ts → orchestrator-CmJ-NTdJ.d.ts} +254 -10
- package/dist/orchestrator.d.ts +6 -3
- package/dist/orchestrator.js +59 -48
- package/dist/page-versioning.d.ts +12 -1
- package/dist/page-versioning.js +5 -3
- package/dist/{port-C1GZFv8h.d.ts → port-BADbLZU5.d.ts} +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +5 -3
- package/dist/qmd.js +2 -1
- package/dist/reasoning-trace-recall.d.ts +90 -0
- package/dist/reasoning-trace-recall.js +13 -0
- package/dist/reasoning-trace-recall.js.map +1 -0
- package/dist/reasoning-trace-types.d.ts +54 -0
- package/dist/reasoning-trace-types.js +17 -0
- package/dist/reasoning-trace-types.js.map +1 -0
- package/dist/recall-audit-anomaly.d.ts +112 -0
- package/dist/recall-audit-anomaly.js +11 -0
- package/dist/recall-audit-anomaly.js.map +1 -0
- package/dist/recall-audit.js +5 -44
- package/dist/recall-audit.js.map +1 -1
- package/dist/recall-explain-renderer.d.ts +49 -0
- package/dist/recall-explain-renderer.js +18 -0
- package/dist/recall-explain-renderer.js.map +1 -0
- package/dist/recall-state.d.ts +39 -1
- package/dist/recall-state.js +1 -1
- package/dist/recall-xray-cli.d.ts +40 -0
- package/dist/recall-xray-cli.js +11 -0
- package/dist/recall-xray-cli.js.map +1 -0
- package/dist/recall-xray-renderer.d.ts +44 -0
- package/dist/recall-xray-renderer.js +18 -0
- package/dist/recall-xray-renderer.js.map +1 -0
- package/dist/recall-xray.d.ts +179 -0
- package/dist/recall-xray.js +13 -0
- package/dist/recall-xray.js.map +1 -0
- 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 +3 -1
- package/dist/resume-bundles.js +6 -6
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-tiers.d.ts +17 -0
- package/dist/retrieval-tiers.js +9 -0
- package/dist/retrieval-tiers.js.map +1 -0
- package/dist/schemas.d.ts +301 -45
- package/dist/schemas.js +1 -1
- package/dist/{semantic-consolidation-DrvSYRdB.d.ts → semantic-consolidation-CxJU6MJk.d.ts} +62 -1
- package/dist/semantic-consolidation.d.ts +2 -1
- package/dist/semantic-consolidation.js +20 -6
- package/dist/semantic-rule-promotion.js +6 -5
- package/dist/semantic-rule-verifier.js +6 -5
- package/dist/storage.d.ts +82 -1
- package/dist/storage.js +5 -4
- package/dist/summarizer.js +4 -4
- package/dist/temporal-supersession.d.ts +1 -0
- package/dist/tier-migration.d.ts +2 -1
- package/dist/types-DJhqDJUV.d.ts +50 -0
- package/dist/types.d.ts +309 -3
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +6 -5
- package/package.json +1 -1
- package/dist/chunk-2VFW5K5U.js.map +0 -1
- package/dist/chunk-6ZH4TU6I.js.map +0 -1
- package/dist/chunk-7PA4OZEU.js.map +0 -1
- package/dist/chunk-AAI7JARD.js.map +0 -1
- package/dist/chunk-BKQJBXXX.js.map +0 -1
- package/dist/chunk-HITJFT7E.js.map +0 -1
- package/dist/chunk-J4IYOZZ5.js.map +0 -1
- package/dist/chunk-KEG4GNGI.js.map +0 -1
- package/dist/chunk-LAYN4LDC.js +0 -267
- package/dist/chunk-LAYN4LDC.js.map +0 -1
- package/dist/chunk-MTLYEMJB.js.map +0 -1
- package/dist/chunk-NSB3WSYS.js.map +0 -1
- package/dist/chunk-OJFGVJS6.js.map +0 -1
- package/dist/chunk-PAORGQRI.js.map +0 -1
- package/dist/chunk-PMB3WGDL.js.map +0 -1
- package/dist/chunk-POMSFKTB.js.map +0 -1
- package/dist/chunk-QDYXG4CS.js.map +0 -1
- package/dist/chunk-QKAH5B6E.js.map +0 -1
- package/dist/chunk-QNJMBKFK.js.map +0 -1
- package/dist/chunk-S4LX5EBI.js.map +0 -1
- package/dist/chunk-U2IQTSBY.js.map +0 -1
- package/dist/chunk-UEYA6UC7.js.map +0 -1
- package/dist/chunk-UPMD5XND.js.map +0 -1
- package/dist/chunk-UVJFDP7P.js +0 -202
- package/dist/chunk-UVJFDP7P.js.map +0 -1
- package/dist/chunk-V7XCAHIB.js.map +0 -1
- package/dist/chunk-X4WESCKA.js.map +0 -1
- package/dist/chunk-XMGSSBFX.js.map +0 -1
- package/dist/chunk-YFYL2SIJ.js.map +0 -1
- /package/dist/{engine-X7X3AAG3.js.map → abort-error.js.map} +0 -0
- /package/dist/{chunk-POBPGDWI.js.map → chunk-3OGMS3PE.js.map} +0 -0
- /package/dist/{chunk-GJQPH5G3.js.map → chunk-CUPFXL3J.js.map} +0 -0
- /package/dist/{chunk-74JR4N5J.js.map → chunk-FVA6TGI3.js.map} +0 -0
- /package/dist/{chunk-AYPYCLR7.js.map → chunk-KUB6JU6H.js.map} +0 -0
- /package/dist/{chunk-4NRAJUDS.js.map → chunk-RBBWYEFJ.js.map} +0 -0
- /package/dist/{chunk-JROGC36Y.js.map → chunk-RGLL5SPU.js.map} +0 -0
- /package/dist/{chunk-MYQWXITD.js.map → chunk-SPI27QT6.js.map} +0 -0
- /package/dist/{chunk-KWP7T3DP.js.map → chunk-VDX363PS.js.map} +0 -0
- /package/dist/{chunk-ECKDIK5F.js.map → chunk-WVVA7F5A.js.map} +0 -0
- /package/dist/{chunk-3QFQGRHO.js.map → chunk-XMHBH5H6.js.map} +0 -0
- /package/dist/{chunk-BTY5RRRF.js.map → chunk-ZEM3OK2K.js.map} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PluginConfig, MemoryFile } from './types.js';
|
|
2
2
|
import { R as RolloutSummaryInput, M as MaterializeResult } from './codex-materialize-CQlLTzke.js';
|
|
3
3
|
import { LoggerBackend } from './logger.js';
|
|
4
|
+
import { ConsolidationOperator } from './consolidation-operator.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* memory-extension-host/types.ts — Types for third-party memory extension discovery.
|
|
@@ -92,6 +93,66 @@ declare function buildConsolidationPrompt(cluster: ConsolidationCluster): string
|
|
|
92
93
|
* Parse the LLM response to extract the canonical content.
|
|
93
94
|
*/
|
|
94
95
|
declare function parseConsolidationResponse(response: string): string;
|
|
96
|
+
/**
|
|
97
|
+
* Structured result from an operator-aware consolidation LLM call.
|
|
98
|
+
*
|
|
99
|
+
* - `operator` — the consolidation operator the LLM chose for this cluster.
|
|
100
|
+
* Falls back to the heuristic default when the LLM omits or returns an
|
|
101
|
+
* unknown value (the parser never surfaces an invalid operator; see
|
|
102
|
+
* `parseOperatorAwareConsolidationResponse`).
|
|
103
|
+
* - `output` — the canonical content (same format the legacy prompt
|
|
104
|
+
* returns). Callers persist this as the body of the new memory.
|
|
105
|
+
*/
|
|
106
|
+
interface OperatorAwareConsolidationResult {
|
|
107
|
+
operator: ConsolidationOperator;
|
|
108
|
+
output: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Heuristic default operator for a cluster. Used as the fallback when the
|
|
112
|
+
* LLM does not return a parseable operator, and as the "floor" decision in
|
|
113
|
+
* `parseOperatorAwareConsolidationResponse`.
|
|
114
|
+
*
|
|
115
|
+
* Current heuristic (kept deliberately conservative — PR 3 only):
|
|
116
|
+
*
|
|
117
|
+
* - Two or more memories being collapsed into one canonical blob is a
|
|
118
|
+
* MERGE by definition. This is the path the current clustering
|
|
119
|
+
* pipeline exercises.
|
|
120
|
+
* - A cluster of size 1 that still reaches consolidation (future path,
|
|
121
|
+
* e.g. supersession of a single older memory by a newer value) is an
|
|
122
|
+
* UPDATE.
|
|
123
|
+
* - SPLIT is never selected by the heuristic because the current write
|
|
124
|
+
* path emits exactly one canonical memory per cluster. The prompt
|
|
125
|
+
* reserves SPLIT for future cluster shapes where the LLM decides one
|
|
126
|
+
* logical source actually encodes several distinct facts — at which
|
|
127
|
+
* point the orchestrator would need to write multiple outputs.
|
|
128
|
+
*/
|
|
129
|
+
declare function chooseConsolidationOperator(cluster: ConsolidationCluster): ConsolidationOperator;
|
|
130
|
+
/**
|
|
131
|
+
* Build the operator-aware LLM prompt. The LLM is asked to return a
|
|
132
|
+
* JSON object `{ "operator": <split|merge|update>, "output": <content> }`.
|
|
133
|
+
*
|
|
134
|
+
* The prompt is additive: it still asks for a single canonical blob under
|
|
135
|
+
* `output`, so the upstream write path does not change. Future expansions
|
|
136
|
+
* (SPLIT emitting multiple outputs) are explicitly documented as
|
|
137
|
+
* out-of-scope for the parser — `parseOperatorAwareConsolidationResponse`
|
|
138
|
+
* collapses any SPLIT response into a single canonical output for now.
|
|
139
|
+
*/
|
|
140
|
+
declare function buildOperatorAwareConsolidationPrompt(cluster: ConsolidationCluster): string;
|
|
141
|
+
/**
|
|
142
|
+
* Parse an operator-aware consolidation response.
|
|
143
|
+
*
|
|
144
|
+
* Contract:
|
|
145
|
+
* - Accepts strict JSON `{ "operator": "...", "output": "..." }`.
|
|
146
|
+
* - Tolerates a JSON payload wrapped in a fenced code block (```json ...```).
|
|
147
|
+
* - Falls back to the heuristic operator when the JSON is malformed,
|
|
148
|
+
* the `operator` field is missing / unknown, or the raw response is
|
|
149
|
+
* a plain blob with no JSON at all. This keeps PR 3 backwards
|
|
150
|
+
* compatible with older models that ignore the JSON instruction.
|
|
151
|
+
* - Never throws. A missing / empty `output` field falls back to the
|
|
152
|
+
* trimmed raw response so the caller still writes something rather
|
|
153
|
+
* than dropping the cluster.
|
|
154
|
+
*/
|
|
155
|
+
declare function parseOperatorAwareConsolidationResponse(response: string, cluster: ConsolidationCluster): OperatorAwareConsolidationResult;
|
|
95
156
|
/**
|
|
96
157
|
* Discover extensions and build the block to append to a consolidation prompt.
|
|
97
158
|
* Returns "" when extensions are disabled or none are found.
|
|
@@ -116,4 +177,4 @@ declare function materializeAfterSemanticConsolidation(options: {
|
|
|
116
177
|
now?: Date;
|
|
117
178
|
}): Promise<MaterializeResult | null>;
|
|
118
179
|
|
|
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 };
|
|
180
|
+
export { type ConsolidationCluster as C, type DiscoveredExtension as D, type ExtensionSchema as E, type OperatorAwareConsolidationResult as O, REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT as R, type SemanticConsolidationResult as S, buildConsolidationPrompt as a, buildExtensionsBlockForConsolidation as b, buildOperatorAwareConsolidationPrompt as c, discoverMemoryExtensions as d, chooseConsolidationOperator as e, findSimilarClusters as f, parseOperatorAwareConsolidationResponse as g, materializeAfterSemanticConsolidation as m, parseConsolidationResponse as p, resolveExtensionsRoot as r };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './types.js';
|
|
2
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-
|
|
3
|
+
export { C as ConsolidationCluster, O as OperatorAwareConsolidationResult, S as SemanticConsolidationResult, a as buildConsolidationPrompt, b as buildExtensionsBlockForConsolidation, c as buildOperatorAwareConsolidationPrompt, e as chooseConsolidationOperator, f as findSimilarClusters, m as materializeAfterSemanticConsolidation, p as parseConsolidationResponse, g as parseOperatorAwareConsolidationResponse, r as resolveExtensionsRoot } from './semantic-consolidation-CxJU6MJk.js';
|
|
4
|
+
export { CONSOLIDATION_OPERATORS, ConsolidationOperator, isConsolidationOperator, isValidDerivedFromEntry } from './consolidation-operator.js';
|
|
4
5
|
import './logger.js';
|
|
@@ -1,33 +1,47 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildConsolidationPrompt,
|
|
3
3
|
buildExtensionsBlockForConsolidation,
|
|
4
|
+
buildOperatorAwareConsolidationPrompt,
|
|
5
|
+
chooseConsolidationOperator,
|
|
4
6
|
findSimilarClusters,
|
|
5
7
|
materializeAfterSemanticConsolidation,
|
|
6
|
-
parseConsolidationResponse
|
|
7
|
-
|
|
8
|
+
parseConsolidationResponse,
|
|
9
|
+
parseOperatorAwareConsolidationResponse
|
|
10
|
+
} from "./chunk-BGJGXLZ7.js";
|
|
8
11
|
import {
|
|
9
12
|
resolveExtensionsRoot
|
|
10
13
|
} from "./chunk-EJI5XIBB.js";
|
|
11
14
|
import "./chunk-DT5TVLJE.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-F5VP6YCB.js";
|
|
16
|
+
import "./chunk-LTCGGW2D.js";
|
|
14
17
|
import "./chunk-4KAN3GZ3.js";
|
|
15
|
-
import "./chunk-6ZH4TU6I.js";
|
|
16
18
|
import "./chunk-6PFRXT4K.js";
|
|
17
19
|
import "./chunk-TP4FZJIZ.js";
|
|
18
20
|
import "./chunk-SCU65EZI.js";
|
|
19
21
|
import "./chunk-BOUYNNYD.js";
|
|
20
|
-
import "./chunk-QSVPYQPG.js";
|
|
21
22
|
import "./chunk-DM2T26WE.js";
|
|
23
|
+
import "./chunk-QSVPYQPG.js";
|
|
22
24
|
import "./chunk-M62O4P4T.js";
|
|
23
25
|
import "./chunk-4DJQYKMN.js";
|
|
26
|
+
import {
|
|
27
|
+
CONSOLIDATION_OPERATORS,
|
|
28
|
+
isConsolidationOperator,
|
|
29
|
+
isValidDerivedFromEntry
|
|
30
|
+
} from "./chunk-X6GF3FX2.js";
|
|
31
|
+
import "./chunk-FAAFWE4G.js";
|
|
24
32
|
import "./chunk-2ODBA7MQ.js";
|
|
25
33
|
export {
|
|
34
|
+
CONSOLIDATION_OPERATORS,
|
|
26
35
|
buildConsolidationPrompt,
|
|
27
36
|
buildExtensionsBlockForConsolidation,
|
|
37
|
+
buildOperatorAwareConsolidationPrompt,
|
|
38
|
+
chooseConsolidationOperator,
|
|
28
39
|
findSimilarClusters,
|
|
40
|
+
isConsolidationOperator,
|
|
41
|
+
isValidDerivedFromEntry,
|
|
29
42
|
materializeAfterSemanticConsolidation,
|
|
30
43
|
parseConsolidationResponse,
|
|
44
|
+
parseOperatorAwareConsolidationResponse,
|
|
31
45
|
resolveExtensionsRoot
|
|
32
46
|
};
|
|
33
47
|
//# sourceMappingURL=semantic-consolidation.js.map
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
promoteSemanticRuleFromMemory
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-VDX363PS.js";
|
|
4
|
+
import "./chunk-F5VP6YCB.js";
|
|
5
|
+
import "./chunk-LTCGGW2D.js";
|
|
6
6
|
import "./chunk-4KAN3GZ3.js";
|
|
7
|
-
import "./chunk-6ZH4TU6I.js";
|
|
8
7
|
import "./chunk-6PFRXT4K.js";
|
|
9
8
|
import "./chunk-TP4FZJIZ.js";
|
|
10
9
|
import "./chunk-SCU65EZI.js";
|
|
11
10
|
import "./chunk-BOUYNNYD.js";
|
|
12
|
-
import "./chunk-QSVPYQPG.js";
|
|
13
11
|
import "./chunk-DM2T26WE.js";
|
|
12
|
+
import "./chunk-QSVPYQPG.js";
|
|
14
13
|
import "./chunk-M62O4P4T.js";
|
|
15
14
|
import "./chunk-4DJQYKMN.js";
|
|
15
|
+
import "./chunk-X6GF3FX2.js";
|
|
16
|
+
import "./chunk-FAAFWE4G.js";
|
|
16
17
|
import "./chunk-2ODBA7MQ.js";
|
|
17
18
|
export {
|
|
18
19
|
promoteSemanticRuleFromMemory
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchVerifiedSemanticRules
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SPI27QT6.js";
|
|
4
4
|
import "./chunk-DT5TVLJE.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-F5VP6YCB.js";
|
|
6
|
+
import "./chunk-LTCGGW2D.js";
|
|
7
7
|
import "./chunk-4KAN3GZ3.js";
|
|
8
|
-
import "./chunk-6ZH4TU6I.js";
|
|
9
8
|
import "./chunk-6PFRXT4K.js";
|
|
10
9
|
import "./chunk-TP4FZJIZ.js";
|
|
11
10
|
import "./chunk-SCU65EZI.js";
|
|
12
11
|
import "./chunk-BOUYNNYD.js";
|
|
13
|
-
import "./chunk-QSVPYQPG.js";
|
|
14
12
|
import "./chunk-DM2T26WE.js";
|
|
13
|
+
import "./chunk-QSVPYQPG.js";
|
|
15
14
|
import "./chunk-M62O4P4T.js";
|
|
16
15
|
import "./chunk-4DJQYKMN.js";
|
|
16
|
+
import "./chunk-X6GF3FX2.js";
|
|
17
|
+
import "./chunk-FAAFWE4G.js";
|
|
17
18
|
import "./chunk-2ODBA7MQ.js";
|
|
18
19
|
export {
|
|
19
20
|
searchVerifiedSemanticRules
|
package/dist/storage.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VersioningConfig } from './page-versioning.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ConsolidationOperator } from './consolidation-operator.js';
|
|
3
|
+
import { PluginConfig, MemoryCategory, ImportanceScore, MemoryLink, MemoryFrontmatter, MemoryStatus, MemoryFile, EntityStructuredSection, BufferState, MetaState, MemoryActionEvent, MemoryLifecycleEvent, BufferSurpriseEvent, BehaviorSignalEvent, CompressionGuidelineOptimizerState, ContinuityIncidentOpenInput, ContinuityIncidentRecord, ContinuityIncidentCloseInput, ContinuityImprovementLoop, ContinuityLoopUpsertInput, ContinuityLoopReviewInput, FileHygieneConfig, EntityRelationship, EntityActivityEntry, EntityFile, AccessTrackingEntry, MemoryProjectionCurrentState, MemorySummary, TopicScore } from './types.js';
|
|
3
4
|
import { P as ProjectedMemoryBrowseOptions, a as ProjectedMemoryBrowsePage, b as readProjectedGovernanceRecord } from './memory-projection-store-DeSXPh1j.js';
|
|
4
5
|
import 'better-sqlite3';
|
|
5
6
|
|
|
@@ -132,6 +133,21 @@ declare class StorageManager {
|
|
|
132
133
|
* No-op when versioning is disabled or the file does not yet exist.
|
|
133
134
|
*/
|
|
134
135
|
private snapshotBeforeWrite;
|
|
136
|
+
/**
|
|
137
|
+
* Consolidation provenance helper (issue #561 PR 2).
|
|
138
|
+
*
|
|
139
|
+
* Captures the current on-disk content of a source memory as a
|
|
140
|
+
* page-version snapshot so the downstream consolidated write can record a
|
|
141
|
+
* `derived_from` pointer that actually resolves. Returns the
|
|
142
|
+
* `"<relative-path>:<versionId>"` entry expected by the `derived_from`
|
|
143
|
+
* frontmatter field.
|
|
144
|
+
*
|
|
145
|
+
* Returns `null` when versioning is disabled (snapshots would not be
|
|
146
|
+
* created), when the file does not exist (nothing to snapshot), or when
|
|
147
|
+
* the snapshot write itself fails (best-effort — callers skip the entry
|
|
148
|
+
* rather than block the consolidation).
|
|
149
|
+
*/
|
|
150
|
+
snapshotForProvenance(filePath: string): Promise<string | null>;
|
|
135
151
|
constructor(baseDir: string, entitySchemas?: PluginConfig["entitySchemas"]);
|
|
136
152
|
/** The root directory of this storage instance. */
|
|
137
153
|
get dir(): string;
|
|
@@ -146,6 +162,7 @@ declare class StorageManager {
|
|
|
146
162
|
private get factsDir();
|
|
147
163
|
private get correctionsDir();
|
|
148
164
|
private get proceduresDir();
|
|
165
|
+
private get reasoningTracesDir();
|
|
149
166
|
private get entitiesDir();
|
|
150
167
|
private get stateDir();
|
|
151
168
|
private get entitySynthesisQueuePath();
|
|
@@ -169,6 +186,17 @@ declare class StorageManager {
|
|
|
169
186
|
private get compressionGuidelineStatePath();
|
|
170
187
|
private get compressionGuidelineDraftStatePath();
|
|
171
188
|
private get behaviorSignalsPath();
|
|
189
|
+
/**
|
|
190
|
+
* Buffer surprise telemetry ledger (issue #563 PR 3).
|
|
191
|
+
*
|
|
192
|
+
* Append-only JSONL of per-turn `BUFFER_SURPRISE` events emitted by
|
|
193
|
+
* `SmartBuffer` when `bufferSurpriseTriggerEnabled` is on. Each row
|
|
194
|
+
* captures the score, the threshold in force at the time, whether the
|
|
195
|
+
* turn caused an extract_now upgrade, and the buffer size. Kept in
|
|
196
|
+
* `state/` alongside the other append-only ledgers so cleanup and
|
|
197
|
+
* governance sweeps can treat it uniformly.
|
|
198
|
+
*/
|
|
199
|
+
private get bufferSurpriseLedgerPath();
|
|
172
200
|
/**
|
|
173
201
|
* Load user-defined entity aliases from config/aliases.json in the memory store.
|
|
174
202
|
* File format: { "variant": "canonical", "variant2": "canonical", ... }
|
|
@@ -208,6 +236,15 @@ declare class StorageManager {
|
|
|
208
236
|
*/
|
|
209
237
|
contentHashSource?: string;
|
|
210
238
|
status?: MemoryStatus;
|
|
239
|
+
/**
|
|
240
|
+
* Consolidation provenance (issue #561 PR 2). When the caller is a
|
|
241
|
+
* consolidation / supersession / dedup-merge path, these fields wire
|
|
242
|
+
* the page-version snapshots the new memory was derived from and the
|
|
243
|
+
* operator that produced it. Persisted onto frontmatter as
|
|
244
|
+
* `derived_from` + `derived_via`; validated at serialize time.
|
|
245
|
+
*/
|
|
246
|
+
derivedFrom?: string[];
|
|
247
|
+
derivedVia?: ConsolidationOperator;
|
|
211
248
|
}): Promise<string>;
|
|
212
249
|
hasFactContentHash(content: string): Promise<boolean>;
|
|
213
250
|
isFactContentHashAuthoritative(): Promise<boolean>;
|
|
@@ -391,6 +428,50 @@ declare class StorageManager {
|
|
|
391
428
|
saveMeta(state: MetaState): Promise<void>;
|
|
392
429
|
appendMemoryActionEvents(events: MemoryActionEvent[]): Promise<number>;
|
|
393
430
|
appendMemoryLifecycleEvents(events: MemoryLifecycleEvent[]): Promise<number>;
|
|
431
|
+
/**
|
|
432
|
+
* Append a batch of `BUFFER_SURPRISE` telemetry events (issue #563 PR 3).
|
|
433
|
+
*
|
|
434
|
+
* Each event records a single buffer flush decision driven by the
|
|
435
|
+
* surprise gate. The ledger is consumed by
|
|
436
|
+
* `reportBufferSurpriseDistribution` (Doctor report) and by downstream
|
|
437
|
+
* benchmark analysis. This method is fire-and-forget by contract:
|
|
438
|
+
* callers log but do not fail the hot path if the append throws.
|
|
439
|
+
*/
|
|
440
|
+
appendBufferSurpriseEvents(events: BufferSurpriseEvent[]): Promise<number>;
|
|
441
|
+
/**
|
|
442
|
+
* Read the buffer-surprise ledger, most recent rows last.
|
|
443
|
+
*
|
|
444
|
+
* `limit` bounds the number of **valid rows** returned (not the
|
|
445
|
+
* number of raw lines parsed). We parse every row, discard malformed
|
|
446
|
+
* ones, then take the tail — so a partial/truncated trailing line
|
|
447
|
+
* (the common failure mode after an interrupted append) cannot hide
|
|
448
|
+
* otherwise-valid recent data above it.
|
|
449
|
+
*
|
|
450
|
+
* Non-positive / non-integer / non-finite limits return `[]` rather
|
|
451
|
+
* than the entire file, matching the other ledger readers in this
|
|
452
|
+
* class and protecting against `slice(-0.5)` → `slice(-0)` silently
|
|
453
|
+
* devolving into an unbounded parse.
|
|
454
|
+
*
|
|
455
|
+
* # Performance note
|
|
456
|
+
*
|
|
457
|
+
* For very large ledgers (issue #563 follow-up), a tail-first reader
|
|
458
|
+
* would avoid parsing the full file when only a recent window is
|
|
459
|
+
* needed. We keep the full-scan implementation here because:
|
|
460
|
+
*
|
|
461
|
+
* - the ledger is opt-in (flag off by default), so early deployments
|
|
462
|
+
* accumulate rows slowly;
|
|
463
|
+
* - telemetry rows are small (~200 bytes), so even 100k rows parse
|
|
464
|
+
* in well under a second;
|
|
465
|
+
* - the governance archive/cleanup flow can trim the ledger when
|
|
466
|
+
* size becomes a concern, reusing the existing maintenance hooks.
|
|
467
|
+
*
|
|
468
|
+
* Swap to a chunked tail-reader if production logs show this is a
|
|
469
|
+
* hot path — leaving that work for a follow-up keeps this PR scoped
|
|
470
|
+
* to correctness, not optimization.
|
|
471
|
+
*/
|
|
472
|
+
readBufferSurpriseEvents(options?: {
|
|
473
|
+
limit?: number;
|
|
474
|
+
}): Promise<BufferSurpriseEvent[]>;
|
|
394
475
|
appendBehaviorSignals(events: BehaviorSignalEvent[]): Promise<number>;
|
|
395
476
|
appendReextractJobs(events: ReextractJobRequest[]): Promise<number>;
|
|
396
477
|
readReextractJobs(limit?: number): Promise<ReextractJobRequest[]>;
|
package/dist/storage.js
CHANGED
|
@@ -8,18 +8,19 @@ import {
|
|
|
8
8
|
normalizeEntityName,
|
|
9
9
|
parseEntityFile,
|
|
10
10
|
serializeEntityFile
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-F5VP6YCB.js";
|
|
12
|
+
import "./chunk-LTCGGW2D.js";
|
|
13
13
|
import "./chunk-4KAN3GZ3.js";
|
|
14
|
-
import "./chunk-6ZH4TU6I.js";
|
|
15
14
|
import "./chunk-6PFRXT4K.js";
|
|
16
15
|
import "./chunk-TP4FZJIZ.js";
|
|
17
16
|
import "./chunk-SCU65EZI.js";
|
|
18
17
|
import "./chunk-BOUYNNYD.js";
|
|
19
|
-
import "./chunk-QSVPYQPG.js";
|
|
20
18
|
import "./chunk-DM2T26WE.js";
|
|
19
|
+
import "./chunk-QSVPYQPG.js";
|
|
21
20
|
import "./chunk-M62O4P4T.js";
|
|
22
21
|
import "./chunk-4DJQYKMN.js";
|
|
22
|
+
import "./chunk-X6GF3FX2.js";
|
|
23
|
+
import "./chunk-FAAFWE4G.js";
|
|
23
24
|
import "./chunk-2ODBA7MQ.js";
|
|
24
25
|
export {
|
|
25
26
|
ContentHashIndex,
|
package/dist/summarizer.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HourlySummarizer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZEM3OK2K.js";
|
|
4
4
|
import "./chunk-ETOW6ACV.js";
|
|
5
|
-
import "./chunk-UPMD5XND.js";
|
|
6
5
|
import "./chunk-FEMOX5AD.js";
|
|
6
|
+
import "./chunk-JL2PU6AI.js";
|
|
7
7
|
import "./chunk-LK6SGL53.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3GXCSUXR.js";
|
|
9
|
+
import "./chunk-XZ2TIKGC.js";
|
|
10
10
|
import "./chunk-ODWDQNRE.js";
|
|
11
11
|
import "./chunk-Y27UJK6V.js";
|
|
12
12
|
import "./chunk-UZB5KHKX.js";
|
package/dist/tier-migration.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { MemoryFile } from './types.js';
|
|
2
2
|
import { StorageManager } from './storage.js';
|
|
3
3
|
import { MemoryTier } from './tier-routing.js';
|
|
4
|
-
import { S as SearchBackend } from './port-
|
|
4
|
+
import { S as SearchBackend } from './port-BADbLZU5.js';
|
|
5
5
|
import './page-versioning.js';
|
|
6
|
+
import './consolidation-operator.js';
|
|
6
7
|
import './memory-projection-store-DeSXPh1j.js';
|
|
7
8
|
import 'better-sqlite3';
|
|
8
9
|
import './lifecycle.js';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Taxonomy types for the MECE knowledge directory.
|
|
3
|
+
*
|
|
4
|
+
* A taxonomy defines a set of categories that partition the knowledge
|
|
5
|
+
* space so that every memory maps to exactly one category (Mutually
|
|
6
|
+
* Exclusive, Collectively Exhaustive).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A single category in the taxonomy.
|
|
10
|
+
*
|
|
11
|
+
* @property id - Slug: lowercase letters, digits, hyphens; max 32 chars.
|
|
12
|
+
* @property name - Human-readable display name.
|
|
13
|
+
* @property description - What belongs in this category.
|
|
14
|
+
* @property filingRules - Prose rules used by the resolver decision tree.
|
|
15
|
+
* @property parentId - Optional parent category for nesting.
|
|
16
|
+
* @property priority - Tie-breaker: lower number wins when a memory
|
|
17
|
+
* could belong to multiple categories.
|
|
18
|
+
* @property memoryCategories - Which MemoryCategory values map here.
|
|
19
|
+
*/
|
|
20
|
+
interface TaxonomyCategory {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
filingRules: string[];
|
|
25
|
+
parentId?: string;
|
|
26
|
+
priority: number;
|
|
27
|
+
memoryCategories: string[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A versioned taxonomy comprising an ordered list of categories.
|
|
31
|
+
*/
|
|
32
|
+
interface Taxonomy {
|
|
33
|
+
version: number;
|
|
34
|
+
categories: TaxonomyCategory[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The output of the resolver: which category a piece of knowledge
|
|
38
|
+
* belongs to, with confidence and alternatives.
|
|
39
|
+
*/
|
|
40
|
+
interface ResolverDecision {
|
|
41
|
+
categoryId: string;
|
|
42
|
+
confidence: number;
|
|
43
|
+
reason: string;
|
|
44
|
+
alternatives: Array<{
|
|
45
|
+
categoryId: string;
|
|
46
|
+
reason: string;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type { ResolverDecision as R, Taxonomy as T, TaxonomyCategory as a };
|