@remnic/core 1.1.0 → 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/access-audit.d.ts +56 -0
- package/dist/access-audit.js +9 -0
- package/dist/access-cli.js +62 -45
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +16 -9
- package/dist/access-http.js +25 -17
- package/dist/access-mcp.d.ts +16 -9
- package/dist/access-mcp.js +29 -7
- package/dist/access-schema.d.ts +124 -33
- package/dist/access-schema.js +5 -1
- package/dist/{access-service-HmO1Trrx.d.ts → access-service-Br8ZydTK.d.ts} +158 -63
- package/dist/access-service.d.ts +13 -6
- 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 +7 -6
- 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-44ICJRF3.js → chunk-3GXCSUXR.js} +4 -4
- package/dist/{chunk-ITRLGI2T.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-OIT5QGG4.js → chunk-6AUUAZEX.js} +72 -2
- package/dist/chunk-6AUUAZEX.js.map +1 -0
- package/dist/{chunk-ZVBB3T7V.js → chunk-7I7FKFZH.js} +24 -22
- 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-3QHL5ABG.js → chunk-B5WXLVDY.js} +187 -6
- package/dist/chunk-B5WXLVDY.js.map +1 -0
- package/dist/{chunk-SYUK3VLY.js → chunk-BGJGXLZ7.js} +111 -2
- package/dist/{chunk-SYUK3VLY.js.map → chunk-BGJGXLZ7.js.map} +1 -1
- package/dist/{chunk-MBJHSA7F.js → chunk-BK2EFTE2.js} +258 -13
- 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-6UJ47TVX.js → chunk-CUPFXL3J.js} +2 -2
- package/dist/chunk-DF3RVK3X.js +119 -0
- package/dist/chunk-DF3RVK3X.js.map +1 -0
- package/dist/{chunk-37UIFYWO.js → chunk-DFTTJYSO.js} +108 -9
- 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-GV6NLQ4X.js → chunk-F5VP6YCB.js} +374 -16
- 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-7WQ6SLIE.js → chunk-FVA6TGI3.js} +2 -2
- package/dist/chunk-GDFS42HT.js +206 -0
- package/dist/chunk-GDFS42HT.js.map +1 -0
- package/dist/{chunk-MVTHXUBX.js → chunk-GKFXUTJ2.js} +479 -20
- package/dist/chunk-GKFXUTJ2.js.map +1 -0
- package/dist/{chunk-NQEVYWX6.js → chunk-HK3FGIEW.js} +209 -5
- package/dist/chunk-HK3FGIEW.js.map +1 -0
- package/dist/chunk-IISBCCWR.js +52 -0
- package/dist/chunk-IISBCCWR.js.map +1 -0
- package/dist/{chunk-WBSAYXVI.js → chunk-INXV5JBT.js} +198 -42
- 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-J4IYOZZ5.js → chunk-JXS5PDQ7.js} +3 -1
- package/dist/chunk-JXS5PDQ7.js.map +1 -0
- package/dist/{chunk-6LX5ORAS.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-3WHVNEN7.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-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-DHHP2Z4X.js → chunk-RGLL5SPU.js} +2 -2
- package/dist/{chunk-3SV6CQHO.js → chunk-S3EEFKNY.js} +101 -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-JIU55F3X.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-47UU5PU2.js → chunk-VBVG2M5G.js} +18 -3
- package/dist/chunk-VBVG2M5G.js.map +1 -0
- package/dist/{chunk-7ECD5ATE.js → chunk-VDX363PS.js} +2 -2
- package/dist/{chunk-DEPL3635.js → chunk-VYM3VWOF.js} +1432 -188
- 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-4LACOVZX.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-BLKTA7MM.js → chunk-YNQKWQT4.js} +50 -17
- 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-N42IWANG.js → chunk-ZEM3OK2K.js} +2 -2
- package/dist/chunk-ZZTOURJI.js +91 -0
- package/dist/chunk-ZZTOURJI.js.map +1 -0
- package/dist/{cli-BneVIEvh.d.ts → cli-BkeRaYfk.d.ts} +2 -2
- package/dist/cli.d.ts +13 -6
- package/dist/cli.js +40 -29
- 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-scan-GR33PONM.js → contradiction-scan-E3GJTI4F.js} +43 -7
- 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.js +5 -70
- package/dist/direct-answer-wiring.js.map +1 -1
- package/dist/{engine-5TIQBYZR.js → engine-F3GOXGE5.js} +8 -7
- package/dist/engine-F3GOXGE5.js.map +1 -0
- package/dist/entity-retrieval.d.ts +1 -0
- package/dist/entity-retrieval.js +7 -6
- 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 +6 -5
- 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/importance.js +1 -1
- package/dist/index.d.ts +585 -20
- package/dist/index.js +503 -312
- package/dist/index.js.map +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 +23 -14
- package/dist/{orchestrator-DRYA6_lW.d.ts → orchestrator-CmJ-NTdJ.d.ts} +233 -8
- package/dist/orchestrator.d.ts +6 -3
- package/dist/orchestrator.js +49 -39
- 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 +1 -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 +12 -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/resume-bundles.js +5 -5
- 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 +287 -31
- 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 +21 -7
- package/dist/semantic-rule-promotion.js +7 -6
- package/dist/semantic-rule-verifier.js +7 -6
- package/dist/storage.d.ts +82 -1
- package/dist/storage.js +6 -5
- package/dist/summarizer.js +3 -3
- package/dist/temporal-supersession.d.ts +1 -0
- package/dist/tier-migration.d.ts +2 -1
- package/dist/types.d.ts +276 -2
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +7 -6
- package/package.json +1 -1
- package/dist/chunk-37UIFYWO.js.map +0 -1
- package/dist/chunk-3QHL5ABG.js.map +0 -1
- package/dist/chunk-3SV6CQHO.js.map +0 -1
- package/dist/chunk-3WHVNEN7.js.map +0 -1
- package/dist/chunk-47UU5PU2.js.map +0 -1
- package/dist/chunk-6ZH4TU6I.js.map +0 -1
- package/dist/chunk-BLKTA7MM.js.map +0 -1
- package/dist/chunk-DEPL3635.js.map +0 -1
- package/dist/chunk-GV6NLQ4X.js.map +0 -1
- package/dist/chunk-J4IYOZZ5.js.map +0 -1
- package/dist/chunk-LAYN4LDC.js +0 -267
- package/dist/chunk-LAYN4LDC.js.map +0 -1
- package/dist/chunk-MBJHSA7F.js.map +0 -1
- package/dist/chunk-MTLYEMJB.js.map +0 -1
- package/dist/chunk-MVTHXUBX.js.map +0 -1
- package/dist/chunk-NQEVYWX6.js.map +0 -1
- package/dist/chunk-OIT5QGG4.js.map +0 -1
- package/dist/chunk-PAORGQRI.js.map +0 -1
- package/dist/chunk-QDYXG4CS.js.map +0 -1
- package/dist/chunk-QNJMBKFK.js.map +0 -1
- package/dist/chunk-UEYA6UC7.js.map +0 -1
- package/dist/chunk-UVJFDP7P.js +0 -202
- package/dist/chunk-UVJFDP7P.js.map +0 -1
- package/dist/chunk-WBSAYXVI.js.map +0 -1
- package/dist/chunk-ZVBB3T7V.js.map +0 -1
- package/dist/contradiction-scan-GR33PONM.js.map +0 -1
- /package/dist/{engine-5TIQBYZR.js.map → access-audit.js.map} +0 -0
- /package/dist/{chunk-44ICJRF3.js.map → chunk-3GXCSUXR.js.map} +0 -0
- /package/dist/{chunk-ITRLGI2T.js.map → chunk-3OGMS3PE.js.map} +0 -0
- /package/dist/{chunk-6UJ47TVX.js.map → chunk-CUPFXL3J.js.map} +0 -0
- /package/dist/{chunk-7WQ6SLIE.js.map → chunk-FVA6TGI3.js.map} +0 -0
- /package/dist/{chunk-6LX5ORAS.js.map → chunk-KUB6JU6H.js.map} +0 -0
- /package/dist/{chunk-4NRAJUDS.js.map → chunk-RBBWYEFJ.js.map} +0 -0
- /package/dist/{chunk-DHHP2Z4X.js.map → chunk-RGLL5SPU.js.map} +0 -0
- /package/dist/{chunk-JIU55F3X.js.map → chunk-SPI27QT6.js.map} +0 -0
- /package/dist/{chunk-7ECD5ATE.js.map → chunk-VDX363PS.js.map} +0 -0
- /package/dist/{chunk-4LACOVZX.js.map → chunk-WVVA7F5A.js.map} +0 -0
- /package/dist/{chunk-3QFQGRHO.js.map → chunk-XMHBH5H6.js.map} +0 -0
- /package/dist/{chunk-N42IWANG.js.map → chunk-ZEM3OK2K.js.map} +0 -0
package/dist/access-service.d.ts
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
+
import './storage.js';
|
|
2
|
+
import './recall-xray.js';
|
|
3
|
+
import './recall-explain-renderer.js';
|
|
1
4
|
import './types.js';
|
|
5
|
+
import './recall-audit-anomaly.js';
|
|
2
6
|
import './explicit-capture.js';
|
|
7
|
+
import './cross-namespace-budget.js';
|
|
3
8
|
import './memory-projection-store-DeSXPh1j.js';
|
|
9
|
+
export { g as ENGRAM_ACCESS_WRITE_SCHEMA_VERSION, h as EngramAccessBriefingRequest, i as EngramAccessBriefingResponse, j as EngramAccessDaySummaryRequest, k as EngramAccessEntityListResponse, l as EngramAccessEntityResponse, m as EngramAccessEntitySummary, n as EngramAccessHealthResponse, a as EngramAccessInputError, o as EngramAccessLcmSearchRequest, p as EngramAccessLcmSearchResponse, q as EngramAccessLcmStatusResponse, r as EngramAccessMaintenanceResponse, s as EngramAccessMemoryBrowseRequest, t as EngramAccessMemoryBrowseResponse, u as EngramAccessMemoryRecord, v as EngramAccessMemoryResponse, w as EngramAccessMemoryStoreRequest, x as EngramAccessMemorySummary, y as EngramAccessObserveRequest, z as EngramAccessObserveResponse, A as EngramAccessQualityResponse, B as EngramAccessRecallExplainRequest, C as EngramAccessRecallExplainResponse, D as EngramAccessRecallRequest, F as EngramAccessRecallResponse, G as EngramAccessReviewDispositionRequest, H as EngramAccessReviewDispositionResponse, I as EngramAccessReviewQueueResponse, E as EngramAccessService, J as EngramAccessSetCodingContextRequest, K as EngramAccessSuggestionSubmitRequest, L as EngramAccessTimelineResponse, M as EngramAccessTrustZoneBrowseRequest, N as EngramAccessTrustZoneBrowseResponse, O as EngramAccessTrustZoneDemoSeedRequest, Q as EngramAccessTrustZoneDemoSeedResponse, R as EngramAccessTrustZonePromoteRequest, S as EngramAccessTrustZonePromoteResponse, T as EngramAccessTrustZoneRecordSummary, U as EngramAccessTrustZoneStatusResponse, V as EngramAccessWriteEnvelope, W as EngramAccessWriteResponse } from './access-service-Br8ZydTK.js';
|
|
4
10
|
import './recall-state.js';
|
|
5
|
-
import './orchestrator-
|
|
6
|
-
import './storage.js';
|
|
11
|
+
import './orchestrator-CmJ-NTdJ.js';
|
|
7
12
|
import './trust-zones.js';
|
|
8
13
|
import './local-llm.js';
|
|
9
14
|
import './fallback-llm.js';
|
|
10
|
-
|
|
11
|
-
import './buffer.js';
|
|
15
|
+
import './memory-worth-outcomes.js';
|
|
12
16
|
import './page-versioning.js';
|
|
17
|
+
import './consolidation-operator.js';
|
|
13
18
|
import 'better-sqlite3';
|
|
14
|
-
import './
|
|
19
|
+
import './recall-audit.js';
|
|
20
|
+
import './buffer.js';
|
|
21
|
+
import './port-BADbLZU5.js';
|
|
15
22
|
import './transcript.js';
|
|
16
23
|
import './session-integrity.js';
|
|
17
24
|
import './summarizer.js';
|
|
@@ -20,7 +27,7 @@ import './relevance.js';
|
|
|
20
27
|
import './negative.js';
|
|
21
28
|
import './session-observer-state.js';
|
|
22
29
|
import './embedding-fallback.js';
|
|
23
|
-
import './semantic-consolidation-
|
|
30
|
+
import './semantic-consolidation-CxJU6MJk.js';
|
|
24
31
|
import './codex-materialize-CQlLTzke.js';
|
|
25
32
|
import './logger.js';
|
|
26
33
|
import 'zod';
|
package/dist/access-service.js
CHANGED
|
@@ -2,34 +2,42 @@ import {
|
|
|
2
2
|
ENGRAM_ACCESS_WRITE_SCHEMA_VERSION,
|
|
3
3
|
EngramAccessInputError,
|
|
4
4
|
EngramAccessService
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-GKFXUTJ2.js";
|
|
6
|
+
import "./chunk-ZAIM4TUE.js";
|
|
7
|
+
import "./chunk-SOBJ6NEY.js";
|
|
8
|
+
import "./chunk-3OGMS3PE.js";
|
|
7
9
|
import "./chunk-EQINRHYR.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-QNJMBKFK.js";
|
|
10
|
+
import "./chunk-EIR5VLIH.js";
|
|
10
11
|
import "./chunk-EEQLFRUM.js";
|
|
11
12
|
import "./chunk-QDW3E4RD.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-3FPTCC3Z.js";
|
|
14
|
+
import "./chunk-2LGMW3DJ.js";
|
|
15
|
+
import "./chunk-GDFS42HT.js";
|
|
16
|
+
import "./chunk-RBBWYEFJ.js";
|
|
13
17
|
import "./chunk-DT5TVLJE.js";
|
|
14
18
|
import "./chunk-N5AKDXAI.js";
|
|
15
19
|
import "./chunk-TBBDFYXW.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-4LACOVZX.js";
|
|
20
|
-
import "./chunk-GV6NLQ4X.js";
|
|
21
|
-
import "./chunk-3WHVNEN7.js";
|
|
20
|
+
import "./chunk-WVVA7F5A.js";
|
|
21
|
+
import "./chunk-F5VP6YCB.js";
|
|
22
|
+
import "./chunk-LTCGGW2D.js";
|
|
22
23
|
import "./chunk-4KAN3GZ3.js";
|
|
23
|
-
import "./chunk-6ZH4TU6I.js";
|
|
24
|
-
import "./chunk-SCU65EZI.js";
|
|
25
|
-
import "./chunk-BOUYNNYD.js";
|
|
26
24
|
import "./chunk-6PFRXT4K.js";
|
|
27
25
|
import "./chunk-TP4FZJIZ.js";
|
|
26
|
+
import "./chunk-SCU65EZI.js";
|
|
27
|
+
import "./chunk-BOUYNNYD.js";
|
|
28
28
|
import "./chunk-DM2T26WE.js";
|
|
29
29
|
import "./chunk-QSVPYQPG.js";
|
|
30
30
|
import "./chunk-M62O4P4T.js";
|
|
31
31
|
import "./chunk-4DJQYKMN.js";
|
|
32
|
+
import "./chunk-X6GF3FX2.js";
|
|
33
|
+
import "./chunk-FAAFWE4G.js";
|
|
32
34
|
import "./chunk-2ODBA7MQ.js";
|
|
35
|
+
import "./chunk-DGXUHMOV.js";
|
|
36
|
+
import "./chunk-LPSF4OQH.js";
|
|
37
|
+
import "./chunk-TVVEYCNW.js";
|
|
38
|
+
import "./chunk-RFYAYKTD.js";
|
|
39
|
+
import "./chunk-LBLXEFWK.js";
|
|
40
|
+
import "./chunk-XKECPATV.js";
|
|
33
41
|
export {
|
|
34
42
|
ENGRAM_ACCESS_WRITE_SCHEMA_VERSION,
|
|
35
43
|
EngramAccessInputError,
|
package/dist/bootstrap.d.ts
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { PluginConfig } from './types.js';
|
|
2
|
-
import { O as Orchestrator } from './orchestrator-
|
|
2
|
+
import { O as Orchestrator } from './orchestrator-CmJ-NTdJ.js';
|
|
3
3
|
import './buffer.js';
|
|
4
4
|
import './storage.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
|
-
import './port-
|
|
9
|
+
import './port-BADbLZU5.js';
|
|
9
10
|
import './transcript.js';
|
|
10
11
|
import './session-integrity.js';
|
|
11
12
|
import './summarizer.js';
|
|
12
13
|
import './model-registry.js';
|
|
13
14
|
import './local-llm.js';
|
|
15
|
+
import './fallback-llm.js';
|
|
14
16
|
import './relevance.js';
|
|
15
17
|
import './negative.js';
|
|
16
18
|
import './recall-state.js';
|
|
19
|
+
import './recall-xray.js';
|
|
17
20
|
import './session-observer-state.js';
|
|
18
21
|
import './embedding-fallback.js';
|
|
19
|
-
import './semantic-consolidation-
|
|
22
|
+
import './semantic-consolidation-CxJU6MJk.js';
|
|
20
23
|
import './codex-materialize-CQlLTzke.js';
|
|
21
24
|
import './logger.js';
|
|
22
25
|
import 'zod';
|
package/dist/briefing.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
2
|
import { BriefingSections, BriefingFollowup, BriefingFocus, CalendarSource, CalendarEvent, MemoryFile, BriefingActiveThread, BriefingResult, EntityFile, BriefingRecentEntity } from './types.js';
|
|
3
3
|
import './page-versioning.js';
|
|
4
|
+
import './consolidation-operator.js';
|
|
4
5
|
import './memory-projection-store-DeSXPh1j.js';
|
|
5
6
|
import 'better-sqlite3';
|
|
6
7
|
|
package/dist/briefing.js
CHANGED
|
@@ -16,19 +16,20 @@ import {
|
|
|
16
16
|
renderBriefingMarkdown,
|
|
17
17
|
resolveBriefingSaveDir,
|
|
18
18
|
validateBriefingFormat
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-WVVA7F5A.js";
|
|
20
|
+
import "./chunk-F5VP6YCB.js";
|
|
21
|
+
import "./chunk-LTCGGW2D.js";
|
|
22
22
|
import "./chunk-4KAN3GZ3.js";
|
|
23
|
-
import "./chunk-6ZH4TU6I.js";
|
|
24
|
-
import "./chunk-SCU65EZI.js";
|
|
25
|
-
import "./chunk-BOUYNNYD.js";
|
|
26
23
|
import "./chunk-6PFRXT4K.js";
|
|
27
24
|
import "./chunk-TP4FZJIZ.js";
|
|
25
|
+
import "./chunk-SCU65EZI.js";
|
|
26
|
+
import "./chunk-BOUYNNYD.js";
|
|
28
27
|
import "./chunk-DM2T26WE.js";
|
|
29
28
|
import "./chunk-QSVPYQPG.js";
|
|
30
29
|
import "./chunk-M62O4P4T.js";
|
|
31
30
|
import "./chunk-4DJQYKMN.js";
|
|
31
|
+
import "./chunk-X6GF3FX2.js";
|
|
32
|
+
import "./chunk-FAAFWE4G.js";
|
|
32
33
|
import "./chunk-2ODBA7MQ.js";
|
|
33
34
|
export {
|
|
34
35
|
BRIEFING_FOLLOWUP_DEFAULT_MODEL,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { BufferSurpriseEvent } from './types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Buffer-surprise telemetry report (issue #563 PR 3).
|
|
5
|
+
*
|
|
6
|
+
* Reads the append-only `state/buffer-surprise-ledger.jsonl` file written
|
|
7
|
+
* by `SmartBuffer` and summarizes the recent distribution of surprise
|
|
8
|
+
* scores for the Doctor surface. This module is intentionally standalone
|
|
9
|
+
* and pure — the only I/O is reading the ledger via the injected
|
|
10
|
+
* `readEvents` callback, so it can be exercised directly in tests
|
|
11
|
+
* without touching the filesystem.
|
|
12
|
+
*
|
|
13
|
+
* # Output shape
|
|
14
|
+
*
|
|
15
|
+
* `BufferSurpriseDistribution` has fields sized for a one-screen Doctor
|
|
16
|
+
* display:
|
|
17
|
+
*
|
|
18
|
+
* - `count` — rows considered in the summary window.
|
|
19
|
+
* - `triggeredCount` — rows whose `triggeredFlush === true`.
|
|
20
|
+
* - `triggeredRate` — `triggeredCount / count`, or `0` when empty.
|
|
21
|
+
* - `mean` — arithmetic mean of `surpriseScore`.
|
|
22
|
+
* - `median` — middle value (50th percentile).
|
|
23
|
+
* - `p90` — 90th percentile (tail of novelty).
|
|
24
|
+
* - `min`, `max` — window extremes.
|
|
25
|
+
* - `currentThreshold` — threshold from the MOST RECENT row, or `null`.
|
|
26
|
+
*
|
|
27
|
+
* All percentile math uses the nearest-rank method (no interpolation) so
|
|
28
|
+
* the report is stable across small windows.
|
|
29
|
+
*
|
|
30
|
+
* # Why a pure function + injected reader?
|
|
31
|
+
*
|
|
32
|
+
* The Doctor surface is exercised both at runtime (through the CLI and
|
|
33
|
+
* gateway tools) and in tests. A pure distribution helper fed from an
|
|
34
|
+
* arbitrary `readEvents` callback keeps the report logic trivially
|
|
35
|
+
* testable without spinning up a real `StorageManager`.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
interface BufferSurpriseDistribution {
|
|
39
|
+
count: number;
|
|
40
|
+
triggeredCount: number;
|
|
41
|
+
triggeredRate: number;
|
|
42
|
+
mean: number;
|
|
43
|
+
median: number;
|
|
44
|
+
p90: number;
|
|
45
|
+
min: number;
|
|
46
|
+
max: number;
|
|
47
|
+
currentThreshold: number | null;
|
|
48
|
+
}
|
|
49
|
+
interface BufferSurpriseReportOptions {
|
|
50
|
+
/**
|
|
51
|
+
* Maximum number of recent rows to include. Defaults to `200` — large
|
|
52
|
+
* enough to see a distribution, small enough to read in one sitting.
|
|
53
|
+
*/
|
|
54
|
+
limit?: number;
|
|
55
|
+
/** Lower-bound ISO timestamp; rows at or before this are excluded. */
|
|
56
|
+
since?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Reader callback shape. The helper does not want to know whether the
|
|
60
|
+
* rows come from a file, a queue, or an in-memory buffer.
|
|
61
|
+
*/
|
|
62
|
+
type BufferSurpriseReader = (options: BufferSurpriseReportOptions) => Promise<readonly BufferSurpriseEvent[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Summarize the recent buffer-surprise distribution. Returns the empty
|
|
65
|
+
* distribution shape when the ledger has no applicable rows — callers can
|
|
66
|
+
* detect this via `count === 0` and render "no data yet".
|
|
67
|
+
*/
|
|
68
|
+
declare function reportBufferSurpriseDistribution(readEvents: BufferSurpriseReader, options?: BufferSurpriseReportOptions): Promise<BufferSurpriseDistribution>;
|
|
69
|
+
|
|
70
|
+
export { type BufferSurpriseDistribution, type BufferSurpriseReader, type BufferSurpriseReportOptions, reportBufferSurpriseDistribution };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surprise helper — D-MEM-style novelty score for a turn against recent memories.
|
|
3
|
+
*
|
|
4
|
+
* Used (eventually, in a follow-up PR) by the smart buffer as an additive flush
|
|
5
|
+
* trigger: a turn that is semantically far from everything already in memory is
|
|
6
|
+
* "surprising" and worth extracting immediately, even if turn-count and signal
|
|
7
|
+
* heuristics would otherwise keep buffering.
|
|
8
|
+
*
|
|
9
|
+
* This module intentionally contains ONLY the pure scoring function. Wiring
|
|
10
|
+
* into the buffer, configuration flags, telemetry, and benchmark work live in
|
|
11
|
+
* later PRs (see issue #563). Keeping the helper in a sibling file instead of
|
|
12
|
+
* inside `buffer.ts` keeps the buffer module focused and makes the eventual
|
|
13
|
+
* integration a small, reviewable change.
|
|
14
|
+
*
|
|
15
|
+
* # Formula
|
|
16
|
+
*
|
|
17
|
+
* Given an input `turn` and a list of `recentMemories`:
|
|
18
|
+
*
|
|
19
|
+
* 1. Embed the turn and every candidate memory via the caller-provided
|
|
20
|
+
* `embedFn`.
|
|
21
|
+
* 2. For each candidate, compute cosine similarity `cos(turn, candidate)` in
|
|
22
|
+
* `[0, 1]` (negative cosines are clamped to 0 — "opposite directions"
|
|
23
|
+
* is treated as maximally diverse, consistent with `recall-mmr.ts`).
|
|
24
|
+
* 3. Keep the top-`k` *highest* similarities (the turn's nearest neighbors).
|
|
25
|
+
* 4. Average those top-`k` similarities → `nearestSim ∈ [0, 1]`.
|
|
26
|
+
* 5. Return `1 − nearestSim` as the surprise score.
|
|
27
|
+
*
|
|
28
|
+
* Intuition: a turn that is close to at least one recent memory has a high
|
|
29
|
+
* `nearestSim` and therefore a *low* surprise (near 0 = redundant). A turn
|
|
30
|
+
* that is far from all of its k nearest neighbors has a low `nearestSim` and
|
|
31
|
+
* therefore a *high* surprise (near 1 = novel).
|
|
32
|
+
*
|
|
33
|
+
* Using the top-k average instead of a single nearest neighbor makes the
|
|
34
|
+
* score less sensitive to one outlier duplicate (e.g. an exact restatement of
|
|
35
|
+
* a stale fact). `k=1` reduces to pure nearest-neighbor distance.
|
|
36
|
+
*
|
|
37
|
+
* # Edge cases
|
|
38
|
+
*
|
|
39
|
+
* - `recentMemories` empty → returns `1.0` (maximally surprising). There is
|
|
40
|
+
* nothing to compare against, so the turn cannot be redundant.
|
|
41
|
+
* - `k` default is `5`. It is clamped to `[1, recentMemories.length]` so that
|
|
42
|
+
* small corpora still produce a meaningful score (e.g. 3 memories with
|
|
43
|
+
* `k=5` behaves the same as `k=3`).
|
|
44
|
+
* - Zero-norm embeddings (all zeros) contribute similarity `0` (they cannot
|
|
45
|
+
* be "close" to anything), which is treated as maximally surprising for
|
|
46
|
+
* that pair. The rest of the corpus is scored normally.
|
|
47
|
+
* - Embedding-length mismatches between the turn and a candidate are treated
|
|
48
|
+
* as similarity `0` for that pair. We do not silently truncate to the
|
|
49
|
+
* shorter vector because that would hide a real configuration bug.
|
|
50
|
+
* - `embedFn` rejection is allowed to propagate. The caller decides whether
|
|
51
|
+
* to catch, fall back, or fail the flush decision — this helper has no
|
|
52
|
+
* opinion beyond the pure score.
|
|
53
|
+
*
|
|
54
|
+
* # Purity
|
|
55
|
+
*
|
|
56
|
+
* No I/O, no hidden globals. Given the same inputs and the same `embedFn`,
|
|
57
|
+
* the output is deterministic.
|
|
58
|
+
*/
|
|
59
|
+
/** Minimal shape of a recent memory passed to `computeSurprise`. */
|
|
60
|
+
interface RecentMemoryLike {
|
|
61
|
+
/** Stable identifier. Only used for debug/logging; not part of the score. */
|
|
62
|
+
readonly id: string;
|
|
63
|
+
/** Text to embed and compare against the incoming turn. */
|
|
64
|
+
readonly content: string;
|
|
65
|
+
}
|
|
66
|
+
/** Options accepted by `computeSurprise`. */
|
|
67
|
+
interface ComputeSurpriseOptions {
|
|
68
|
+
/**
|
|
69
|
+
* Embedding function. Called once for the turn and once per candidate
|
|
70
|
+
* memory. Callers may wrap a provider client, a local model, or a
|
|
71
|
+
* deterministic hash for tests.
|
|
72
|
+
*/
|
|
73
|
+
readonly embedFn: (text: string) => Promise<readonly number[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Number of nearest neighbors to average over. Defaults to 5. Clamped to
|
|
76
|
+
* `[1, recentMemories.length]`.
|
|
77
|
+
*/
|
|
78
|
+
readonly k?: number;
|
|
79
|
+
}
|
|
80
|
+
/** Default k (top nearest neighbors to average). */
|
|
81
|
+
declare const DEFAULT_SURPRISE_K = 5;
|
|
82
|
+
/**
|
|
83
|
+
* Compute a surprise score in `[0, 1]` for `turn` against `recentMemories`.
|
|
84
|
+
*
|
|
85
|
+
* See the module-level docstring for the exact formula, edge cases, and
|
|
86
|
+
* purity guarantees.
|
|
87
|
+
*
|
|
88
|
+
* @param turn The incoming turn text (caller is responsible for
|
|
89
|
+
* stringifying structured turn content — this helper
|
|
90
|
+
* only needs the text to embed).
|
|
91
|
+
* @param recentMemories Candidate memories to compare against.
|
|
92
|
+
* @param options `embedFn` (required) and optional `k` (defaults to 5).
|
|
93
|
+
* @returns A scalar in `[0, 1]`. `1.0` = maximally surprising / novel;
|
|
94
|
+
* `0.0` = redundant with at least one recent memory.
|
|
95
|
+
*/
|
|
96
|
+
declare function computeSurprise(turn: string, recentMemories: readonly RecentMemoryLike[], options: ComputeSurpriseOptions): Promise<number>;
|
|
97
|
+
|
|
98
|
+
export { type ComputeSurpriseOptions, DEFAULT_SURPRISE_K, type RecentMemoryLike, computeSurprise };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/buffer.d.ts
CHANGED
|
@@ -1,16 +1,55 @@
|
|
|
1
1
|
import { StorageManager } from './storage.js';
|
|
2
2
|
import { PluginConfig, BufferTurn } from './types.js';
|
|
3
3
|
import './page-versioning.js';
|
|
4
|
+
import './consolidation-operator.js';
|
|
4
5
|
import './memory-projection-store-DeSXPh1j.js';
|
|
5
6
|
import 'better-sqlite3';
|
|
6
7
|
|
|
7
8
|
type TriggerDecision = "extract_now" | "extract_batch" | "keep_buffering";
|
|
9
|
+
/**
|
|
10
|
+
* Optional surprise probe injected into `SmartBuffer`.
|
|
11
|
+
*
|
|
12
|
+
* Computes a D-MEM-style novelty score in `[0, 1]` for an incoming turn.
|
|
13
|
+
* The buffer treats the probe as purely additive: if it is not provided, if
|
|
14
|
+
* the feature flag is off, or if the probe throws/times out, the buffer
|
|
15
|
+
* falls back to the existing signal/turn-count/time triggers unchanged.
|
|
16
|
+
*
|
|
17
|
+
* Callers are responsible for sampling recent memories and passing them
|
|
18
|
+
* through the embedding pipeline — the buffer does not want to know about
|
|
19
|
+
* storage, embeddings, or QMD.
|
|
20
|
+
*
|
|
21
|
+
* @param bufferKey Identifier for the active buffer (session/thread).
|
|
22
|
+
* @param turn The incoming turn whose novelty is being scored.
|
|
23
|
+
* @param recentTurns Turns already buffered for this key (most recent first
|
|
24
|
+
* is NOT guaranteed — treat as unordered corpus).
|
|
25
|
+
* @returns A surprise score in `[0, 1]`, or `null` if no score could be
|
|
26
|
+
* produced (e.g. empty corpus, probe declined to embed).
|
|
27
|
+
*/
|
|
28
|
+
interface BufferSurpriseProbe {
|
|
29
|
+
scoreTurn(bufferKey: string, turn: BufferTurn, recentTurns: readonly BufferTurn[]): Promise<number | null>;
|
|
30
|
+
}
|
|
8
31
|
declare class SmartBuffer {
|
|
9
32
|
private readonly config;
|
|
10
33
|
private readonly storage;
|
|
11
34
|
private state;
|
|
12
35
|
private loaded;
|
|
13
|
-
|
|
36
|
+
private readonly surpriseProbe;
|
|
37
|
+
/**
|
|
38
|
+
* Serialized write chain for `BUFFER_SURPRISE` telemetry events.
|
|
39
|
+
*
|
|
40
|
+
* The telemetry path is fire-and-forget (`addTurn` does not await the
|
|
41
|
+
* ledger append), but multiple concurrent appends would still settle
|
|
42
|
+
* out of order under variable filesystem latency. The report path
|
|
43
|
+
* assumes chronological ordering — it slices the tail of the ledger
|
|
44
|
+
* and treats the most recent entry as the current threshold in force.
|
|
45
|
+
* Chaining ensures each append only runs after the previous settles,
|
|
46
|
+
* preserving wall-clock order.
|
|
47
|
+
*
|
|
48
|
+
* We include a `.catch` on every link so a rejected append does not
|
|
49
|
+
* poison the chain (CLAUDE.md rule #40).
|
|
50
|
+
*/
|
|
51
|
+
private surpriseTelemetryWriteChain;
|
|
52
|
+
constructor(config: PluginConfig, storage: StorageManager, surpriseProbe?: BufferSurpriseProbe | null);
|
|
14
53
|
private entryFor;
|
|
15
54
|
private peekEntry;
|
|
16
55
|
private normalizeState;
|
|
@@ -25,12 +64,71 @@ declare class SmartBuffer {
|
|
|
25
64
|
resetToEmpty(): void;
|
|
26
65
|
save(): Promise<void>;
|
|
27
66
|
addTurn(bufferKey: string, turn: BufferTurn): Promise<TriggerDecision>;
|
|
67
|
+
/**
|
|
68
|
+
* Enqueue a telemetry append on the serialized write chain.
|
|
69
|
+
*
|
|
70
|
+
* The chain is a classic `writeChain = writeChain.then(fn).catch(...)`
|
|
71
|
+
* — each link waits for the previous to settle before its append
|
|
72
|
+
* starts, so out-of-order chronology cannot happen even under
|
|
73
|
+
* variable filesystem latency. We always attach `.catch` so one
|
|
74
|
+
* rejection does not poison the chain for the rest of the session
|
|
75
|
+
* (CLAUDE.md rule #40). The error is logged through
|
|
76
|
+
* `emitSurpriseEventSafe` itself, which swallows its own rejections.
|
|
77
|
+
*
|
|
78
|
+
* Public surface is deliberately narrow — only `addTurn` should call
|
|
79
|
+
* this, so the surprise telemetry path stays centralized.
|
|
80
|
+
*/
|
|
81
|
+
private queueSurpriseTelemetryWrite;
|
|
82
|
+
/**
|
|
83
|
+
* Append a single `BUFFER_SURPRISE` telemetry row (issue #563 PR 3).
|
|
84
|
+
*
|
|
85
|
+
* Deliberately swallows write errors: the buffer must never fail to
|
|
86
|
+
* record a turn because the observation ledger is read-only, out of
|
|
87
|
+
* disk, or otherwise unhappy. The log line at debug lets operators
|
|
88
|
+
* confirm the path fired without polluting the error channel.
|
|
89
|
+
*/
|
|
90
|
+
private emitSurpriseEventSafe;
|
|
91
|
+
/**
|
|
92
|
+
* Invoke the injected surprise probe defensively. Any error (probe throws,
|
|
93
|
+
* embedder unavailable, timeout) is swallowed and logged at debug: the
|
|
94
|
+
* surprise path must never crash the happy-path trigger evaluation. A
|
|
95
|
+
* `null` return indicates "no score available, fall through to existing
|
|
96
|
+
* triggers".
|
|
97
|
+
*/
|
|
98
|
+
private computeSurpriseSafe;
|
|
28
99
|
private evaluate;
|
|
29
100
|
getTurns(bufferKey?: string): BufferTurn[];
|
|
101
|
+
/**
|
|
102
|
+
* Retain a subset of the current turns across `clearAfterExtraction` so a
|
|
103
|
+
* future extraction pass sees the context behind a deferred candidate
|
|
104
|
+
* (issue #562, PR 2). Callers pass the turns that were seen during the
|
|
105
|
+
* current extraction; the buffer keeps the tail (latest `max` turns) as
|
|
106
|
+
* the retention window. Passing an empty array or `max <= 0` clears the
|
|
107
|
+
* retention slot instead.
|
|
108
|
+
*/
|
|
109
|
+
retainDeferredTurns(bufferKey: string, turns: BufferTurn[], max?: number): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Return the current retention window (issue #562, PR 2). Primarily for
|
|
112
|
+
* tests and diagnostics.
|
|
113
|
+
*/
|
|
114
|
+
getRetainedDeferredTurns(bufferKey?: string): BufferTurn[];
|
|
30
115
|
findBufferKeyForSession(sessionKey: string): Promise<string | null>;
|
|
31
116
|
findBufferKeysForSession(sessionKey: string): Promise<string[]>;
|
|
32
117
|
clearAfterExtraction(bufferKey?: string): Promise<void>;
|
|
33
118
|
getExtractionCount(bufferKey?: string): number;
|
|
119
|
+
/**
|
|
120
|
+
* Await any pending `BUFFER_SURPRISE` telemetry writes.
|
|
121
|
+
*
|
|
122
|
+
* The telemetry path is fire-and-forget from the hot path's point of
|
|
123
|
+
* view, but tests and before-exit hooks sometimes need to make sure
|
|
124
|
+
* the ledger has been flushed before they assert on its contents or
|
|
125
|
+
* close the process. This method resolves once the current chain
|
|
126
|
+
* head has settled; new writes scheduled after this call return a
|
|
127
|
+
* separate, later settlement.
|
|
128
|
+
*
|
|
129
|
+
* Never throws — the chain already catches its own rejections.
|
|
130
|
+
*/
|
|
131
|
+
flushSurpriseTelemetry(): Promise<void>;
|
|
34
132
|
}
|
|
35
133
|
|
|
36
|
-
export { SmartBuffer, type TriggerDecision };
|
|
134
|
+
export { type BufferSurpriseProbe, SmartBuffer, type TriggerDecision };
|
package/dist/buffer.js
CHANGED
package/dist/calibration.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FallbackLlmClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3GXCSUXR.js";
|
|
4
4
|
import "./chunk-XZ2TIKGC.js";
|
|
5
|
-
import "./chunk-Y27UJK6V.js";
|
|
6
5
|
import "./chunk-ODWDQNRE.js";
|
|
6
|
+
import "./chunk-Y27UJK6V.js";
|
|
7
7
|
import "./chunk-UZB5KHKX.js";
|
|
8
8
|
import "./chunk-MARWOCVP.js";
|
|
9
|
-
import {
|
|
10
|
-
listJsonFiles
|
|
11
|
-
} from "./chunk-LPSF4OQH.js";
|
|
12
9
|
import {
|
|
13
10
|
log
|
|
14
11
|
} from "./chunk-2ODBA7MQ.js";
|
|
12
|
+
import {
|
|
13
|
+
listJsonFiles
|
|
14
|
+
} from "./chunk-LPSF4OQH.js";
|
|
15
15
|
|
|
16
16
|
// src/calibration.ts
|
|
17
17
|
import { createHash } from "crypto";
|
package/dist/causal-behavior.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readChainIndex,
|
|
3
3
|
resolveChainsDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XMHBH5H6.js";
|
|
5
5
|
import "./chunk-URB2WSKZ.js";
|
|
6
6
|
import {
|
|
7
7
|
normalizeRecallTokens
|
|
8
8
|
} from "./chunk-DT5TVLJE.js";
|
|
9
|
+
import {
|
|
10
|
+
log
|
|
11
|
+
} from "./chunk-2ODBA7MQ.js";
|
|
9
12
|
import {
|
|
10
13
|
isRecord
|
|
11
14
|
} from "./chunk-DGXUHMOV.js";
|
|
@@ -13,9 +16,6 @@ import {
|
|
|
13
16
|
listJsonFiles,
|
|
14
17
|
readJsonFile
|
|
15
18
|
} from "./chunk-LPSF4OQH.js";
|
|
16
|
-
import {
|
|
17
|
-
log
|
|
18
|
-
} from "./chunk-2ODBA7MQ.js";
|
|
19
19
|
|
|
20
20
|
// src/causal-behavior.ts
|
|
21
21
|
import path from "path";
|
package/dist/causal-chain.js
CHANGED
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
stitchCausalChain,
|
|
7
7
|
validateCausalEdge,
|
|
8
8
|
writeChainIndex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XMHBH5H6.js";
|
|
10
10
|
import "./chunk-URB2WSKZ.js";
|
|
11
11
|
import "./chunk-DT5TVLJE.js";
|
|
12
|
+
import "./chunk-2ODBA7MQ.js";
|
|
12
13
|
import "./chunk-DGXUHMOV.js";
|
|
13
14
|
import "./chunk-LPSF4OQH.js";
|
|
14
|
-
import "./chunk-2ODBA7MQ.js";
|
|
15
15
|
export {
|
|
16
16
|
makeEdgeId,
|
|
17
17
|
readChainIndex,
|
|
@@ -1,44 +1,45 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readChainIndex,
|
|
3
3
|
resolveChainsDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XMHBH5H6.js";
|
|
5
5
|
import {
|
|
6
6
|
buildExtensionsBlockForConsolidation,
|
|
7
7
|
runPostConsolidationMaterialize
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BGJGXLZ7.js";
|
|
9
9
|
import "./chunk-EJI5XIBB.js";
|
|
10
10
|
import {
|
|
11
11
|
FallbackLlmClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3GXCSUXR.js";
|
|
13
13
|
import "./chunk-XZ2TIKGC.js";
|
|
14
|
-
import "./chunk-Y27UJK6V.js";
|
|
15
14
|
import "./chunk-ODWDQNRE.js";
|
|
15
|
+
import "./chunk-Y27UJK6V.js";
|
|
16
16
|
import "./chunk-UZB5KHKX.js";
|
|
17
17
|
import "./chunk-URB2WSKZ.js";
|
|
18
18
|
import "./chunk-MARWOCVP.js";
|
|
19
19
|
import "./chunk-DT5TVLJE.js";
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
} from "./chunk-DGXUHMOV.js";
|
|
23
|
-
import {
|
|
24
|
-
listJsonFiles,
|
|
25
|
-
readJsonFile
|
|
26
|
-
} from "./chunk-LPSF4OQH.js";
|
|
27
|
-
import "./chunk-GV6NLQ4X.js";
|
|
28
|
-
import "./chunk-3WHVNEN7.js";
|
|
20
|
+
import "./chunk-F5VP6YCB.js";
|
|
21
|
+
import "./chunk-LTCGGW2D.js";
|
|
29
22
|
import "./chunk-4KAN3GZ3.js";
|
|
30
|
-
import "./chunk-6ZH4TU6I.js";
|
|
31
|
-
import "./chunk-SCU65EZI.js";
|
|
32
|
-
import "./chunk-BOUYNNYD.js";
|
|
33
23
|
import "./chunk-6PFRXT4K.js";
|
|
34
24
|
import "./chunk-TP4FZJIZ.js";
|
|
25
|
+
import "./chunk-SCU65EZI.js";
|
|
26
|
+
import "./chunk-BOUYNNYD.js";
|
|
35
27
|
import "./chunk-DM2T26WE.js";
|
|
36
28
|
import "./chunk-QSVPYQPG.js";
|
|
37
29
|
import "./chunk-M62O4P4T.js";
|
|
38
30
|
import "./chunk-4DJQYKMN.js";
|
|
31
|
+
import "./chunk-X6GF3FX2.js";
|
|
32
|
+
import "./chunk-FAAFWE4G.js";
|
|
39
33
|
import {
|
|
40
34
|
log
|
|
41
35
|
} from "./chunk-2ODBA7MQ.js";
|
|
36
|
+
import {
|
|
37
|
+
isRecord
|
|
38
|
+
} from "./chunk-DGXUHMOV.js";
|
|
39
|
+
import {
|
|
40
|
+
listJsonFiles,
|
|
41
|
+
readJsonFile
|
|
42
|
+
} from "./chunk-LPSF4OQH.js";
|
|
42
43
|
|
|
43
44
|
// src/causal-consolidation.ts
|
|
44
45
|
import { createHash } from "crypto";
|