@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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RECALL_XRAY_FORMATS,
|
|
3
|
+
parseXrayFormat,
|
|
4
|
+
renderXray,
|
|
5
|
+
renderXrayJson,
|
|
6
|
+
renderXrayMarkdown,
|
|
7
|
+
renderXrayText
|
|
8
|
+
} from "./chunk-ZAIM4TUE.js";
|
|
9
|
+
import "./chunk-SOBJ6NEY.js";
|
|
10
|
+
export {
|
|
11
|
+
RECALL_XRAY_FORMATS,
|
|
12
|
+
parseXrayFormat,
|
|
13
|
+
renderXray,
|
|
14
|
+
renderXrayJson,
|
|
15
|
+
renderXrayMarkdown,
|
|
16
|
+
renderXrayText
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=recall-xray-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { RecallTierExplain } from './types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Recall X-ray snapshot schema (issue #570, PR 1).
|
|
5
|
+
*
|
|
6
|
+
* The X-ray surface is the unified, per-result attribution document that
|
|
7
|
+
* merges the tier that served each memory, its score decomposition, any
|
|
8
|
+
* graph path, an audit entry id, and the exact filter/eligibility ladder
|
|
9
|
+
* that either admitted or rejected each candidate. This file defines the
|
|
10
|
+
* schema and an in-memory builder + builder-state helper.
|
|
11
|
+
*
|
|
12
|
+
* Scope for PR 1 (this slice):
|
|
13
|
+
* - Types only + pure builder functions (no IO, no rendering).
|
|
14
|
+
* - Orchestrator plumbing captures a snapshot when the caller passes
|
|
15
|
+
* `xrayCapture: true`. No behavior change when the flag is absent.
|
|
16
|
+
* - NO new public surfaces here — CLI/HTTP/MCP land in later slices.
|
|
17
|
+
*
|
|
18
|
+
* The shared renderer lands in PR 2 at `recall-xray-renderer.ts`. Do not
|
|
19
|
+
* fork formatting logic into other surfaces; extend the renderer.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Which retrieval source produced a given result. This is the X-ray
|
|
24
|
+
* tier ladder called out in issue #570 and is *distinct* from the
|
|
25
|
+
* `RetrievalTier` enum (which describes issue #518's tier-explain
|
|
26
|
+
* block). Keeping the sets separate lets the two observability
|
|
27
|
+
* surfaces evolve without conflating their vocabularies:
|
|
28
|
+
*
|
|
29
|
+
* - `RetrievalTier` — direct-answer eligibility ladder.
|
|
30
|
+
* - `RecallXrayServedBy` — which source materialized each result.
|
|
31
|
+
*/
|
|
32
|
+
type RecallXrayServedBy = "direct-answer" | "hybrid" | "graph" | "recent-scan" | "procedural" | "review-context";
|
|
33
|
+
declare const RECALL_XRAY_SERVED_BY_VALUES: readonly RecallXrayServedBy[];
|
|
34
|
+
declare function isRecallXrayServedBy(value: unknown): value is RecallXrayServedBy;
|
|
35
|
+
/**
|
|
36
|
+
* Score decomposition for a single X-ray result.
|
|
37
|
+
*
|
|
38
|
+
* All fields are optional because different tiers populate different
|
|
39
|
+
* terms: `hybrid` reports vector + bm25 + mmr penalty, `direct-answer`
|
|
40
|
+
* reports importance + tier prior, etc. The only guaranteed field is
|
|
41
|
+
* `final`, which is the post-combination score used for ordering.
|
|
42
|
+
*/
|
|
43
|
+
interface RecallXrayScoreDecomposition {
|
|
44
|
+
vector?: number;
|
|
45
|
+
bm25?: number;
|
|
46
|
+
importance?: number;
|
|
47
|
+
mmrPenalty?: number;
|
|
48
|
+
tierPrior?: number;
|
|
49
|
+
final: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Per-result breakdown inside an X-ray snapshot.
|
|
53
|
+
*/
|
|
54
|
+
interface RecallXrayResult {
|
|
55
|
+
memoryId: string;
|
|
56
|
+
path: string;
|
|
57
|
+
servedBy: RecallXrayServedBy;
|
|
58
|
+
scoreDecomposition: RecallXrayScoreDecomposition;
|
|
59
|
+
graphPath?: string[];
|
|
60
|
+
auditEntryId?: string;
|
|
61
|
+
/** Human-readable list of filters the candidate *passed*. */
|
|
62
|
+
admittedBy: string[];
|
|
63
|
+
/**
|
|
64
|
+
* First filter that *would have* rejected the candidate, or undefined
|
|
65
|
+
* when the candidate was admitted without a rejection trace. When
|
|
66
|
+
* present, `admittedBy` may still contain filters the candidate passed
|
|
67
|
+
* before the rejecting gate; consumers should render both.
|
|
68
|
+
*/
|
|
69
|
+
rejectedBy?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Trace entry for a filter the orchestrator evaluated during recall.
|
|
73
|
+
* Captures the name of the filter, how many candidates it saw, and how
|
|
74
|
+
* many it let through. Used by X-ray consumers to render the filter
|
|
75
|
+
* ladder above the per-result breakdown.
|
|
76
|
+
*/
|
|
77
|
+
interface RecallFilterTrace {
|
|
78
|
+
name: string;
|
|
79
|
+
considered: number;
|
|
80
|
+
admitted: number;
|
|
81
|
+
/** Optional human-readable reason for any rejections. */
|
|
82
|
+
reason?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The unified X-ray snapshot. CLI, HTTP, and MCP surfaces all render
|
|
86
|
+
* this same shape through the shared renderer (CLAUDE.md rule 22).
|
|
87
|
+
*/
|
|
88
|
+
interface RecallXraySnapshot {
|
|
89
|
+
/** Stable v1 tag so downstream consumers can version-gate their parsers. */
|
|
90
|
+
schemaVersion: "1";
|
|
91
|
+
query: string;
|
|
92
|
+
/** UUID minted per capture; unique across snapshots within a process. */
|
|
93
|
+
snapshotId: string;
|
|
94
|
+
/** Epoch milliseconds the snapshot was captured. */
|
|
95
|
+
capturedAt: number;
|
|
96
|
+
/**
|
|
97
|
+
* Tier-explain block from issue #518, carried verbatim when present.
|
|
98
|
+
* `null` means direct-answer tier did not run (disabled, or another
|
|
99
|
+
* tier served the query).
|
|
100
|
+
*/
|
|
101
|
+
tierExplain: RecallTierExplain | null;
|
|
102
|
+
results: RecallXrayResult[];
|
|
103
|
+
filters: RecallFilterTrace[];
|
|
104
|
+
/**
|
|
105
|
+
* Character budget accounting for the final assembled recall payload.
|
|
106
|
+
* `used` is the rendered-context length; `chars` is the cap. Both are
|
|
107
|
+
* non-negative integers in `[0, 2**31)`.
|
|
108
|
+
*/
|
|
109
|
+
budget: {
|
|
110
|
+
chars: number;
|
|
111
|
+
used: number;
|
|
112
|
+
};
|
|
113
|
+
/** Optional session-scope fields carried for downstream filtering. */
|
|
114
|
+
sessionKey?: string;
|
|
115
|
+
namespace?: string;
|
|
116
|
+
traceId?: string;
|
|
117
|
+
}
|
|
118
|
+
interface BuildXraySnapshotInput {
|
|
119
|
+
query: string;
|
|
120
|
+
tierExplain?: RecallTierExplain | null;
|
|
121
|
+
results?: RecallXrayResult[];
|
|
122
|
+
filters?: RecallFilterTrace[];
|
|
123
|
+
budget?: {
|
|
124
|
+
chars?: number;
|
|
125
|
+
used?: number;
|
|
126
|
+
};
|
|
127
|
+
sessionKey?: string;
|
|
128
|
+
namespace?: string;
|
|
129
|
+
traceId?: string;
|
|
130
|
+
/** Optional injected timestamp for deterministic tests. */
|
|
131
|
+
now?: () => number;
|
|
132
|
+
/** Optional injected id generator for deterministic tests. */
|
|
133
|
+
snapshotIdGenerator?: () => string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Build a `RecallXraySnapshot` from explicit input fields. Pure
|
|
137
|
+
* function; safe to call from anywhere. All array/object inputs are
|
|
138
|
+
* shallow-copied so caller mutation after build cannot tear the
|
|
139
|
+
* returned snapshot.
|
|
140
|
+
*/
|
|
141
|
+
declare function buildXraySnapshot(input: BuildXraySnapshotInput): RecallXraySnapshot;
|
|
142
|
+
/**
|
|
143
|
+
* Mutable builder used by the orchestrator to accumulate X-ray fields
|
|
144
|
+
* as recall progresses. Call `build()` to get the finalized
|
|
145
|
+
* immutable-ish snapshot. All inputs are validated at insert time so
|
|
146
|
+
* a malformed entry cannot poison the snapshot later.
|
|
147
|
+
*/
|
|
148
|
+
declare class RecallXrayBuilder {
|
|
149
|
+
private readonly query;
|
|
150
|
+
private readonly sessionKey;
|
|
151
|
+
private namespace;
|
|
152
|
+
private traceId;
|
|
153
|
+
private tierExplain;
|
|
154
|
+
private readonly results;
|
|
155
|
+
private readonly filters;
|
|
156
|
+
private budgetChars;
|
|
157
|
+
private budgetUsed;
|
|
158
|
+
constructor(opts: {
|
|
159
|
+
query: string;
|
|
160
|
+
sessionKey?: string;
|
|
161
|
+
namespace?: string;
|
|
162
|
+
traceId?: string;
|
|
163
|
+
});
|
|
164
|
+
setNamespace(namespace: string | undefined): void;
|
|
165
|
+
setTraceId(traceId: string | undefined): void;
|
|
166
|
+
setTierExplain(tierExplain: RecallTierExplain | null | undefined): void;
|
|
167
|
+
setBudget(budget: {
|
|
168
|
+
chars?: number;
|
|
169
|
+
used?: number;
|
|
170
|
+
}): void;
|
|
171
|
+
recordResult(result: RecallXrayResult): void;
|
|
172
|
+
recordFilter(filter: RecallFilterTrace): void;
|
|
173
|
+
build(opts?: {
|
|
174
|
+
now?: () => number;
|
|
175
|
+
snapshotIdGenerator?: () => string;
|
|
176
|
+
}): RecallXraySnapshot;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { type BuildXraySnapshotInput, RECALL_XRAY_SERVED_BY_VALUES, type RecallFilterTrace, RecallXrayBuilder, type RecallXrayResult, type RecallXrayScoreDecomposition, type RecallXrayServedBy, type RecallXraySnapshot, buildXraySnapshot, isRecallXrayServedBy };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RECALL_XRAY_SERVED_BY_VALUES,
|
|
3
|
+
RecallXrayBuilder,
|
|
4
|
+
buildXraySnapshot,
|
|
5
|
+
isRecallXrayServedBy
|
|
6
|
+
} from "./chunk-KVBLZUKV.js";
|
|
7
|
+
export {
|
|
8
|
+
RECALL_XRAY_SERVED_BY_VALUES,
|
|
9
|
+
RecallXrayBuilder,
|
|
10
|
+
buildXraySnapshot,
|
|
11
|
+
isRecallXrayServedBy
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=recall-xray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/resume-bundles.js
CHANGED
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
recordResumeBundle,
|
|
5
5
|
resolveResumeBundleDir,
|
|
6
6
|
validateResumeBundle
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KUB6JU6H.js";
|
|
8
8
|
import "./chunk-CULXMQJH.js";
|
|
9
9
|
import "./chunk-E6K4NIEU.js";
|
|
10
10
|
import "./chunk-YRMVARQP.js";
|
|
11
11
|
import "./chunk-LOBRX7VD.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-MBJHSA7F.js";
|
|
12
|
+
import "./chunk-BK2EFTE2.js";
|
|
14
13
|
import "./chunk-Z5LAYHGJ.js";
|
|
14
|
+
import "./chunk-FYIYMQ5N.js";
|
|
15
15
|
import "./chunk-MARWOCVP.js";
|
|
16
16
|
import "./chunk-DT5TVLJE.js";
|
|
17
|
-
import "./chunk-DGXUHMOV.js";
|
|
18
|
-
import "./chunk-LPSF4OQH.js";
|
|
19
17
|
import "./chunk-4DJQYKMN.js";
|
|
20
18
|
import "./chunk-2ODBA7MQ.js";
|
|
19
|
+
import "./chunk-DGXUHMOV.js";
|
|
20
|
+
import "./chunk-LPSF4OQH.js";
|
|
21
21
|
export {
|
|
22
22
|
buildResumeBundleFromState,
|
|
23
23
|
getResumeBundleStatus,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RetrievalTier } from './types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Retrieval tier ladder (issue #518).
|
|
5
|
+
*
|
|
6
|
+
* Explicit tier ordering so callers can reason about precedence without
|
|
7
|
+
* inspecting retrieval.ts internals. The tier names are the same strings
|
|
8
|
+
* used in `RecallTierExplain.tier` and in profiling spans.
|
|
9
|
+
*
|
|
10
|
+
* The ladder is codified here as a read-only array; consumers that need
|
|
11
|
+
* "is this a valid tier?" use `RETRIEVAL_TIERS.includes(value)`.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
declare const RETRIEVAL_TIERS: readonly RetrievalTier[];
|
|
15
|
+
declare function isRetrievalTier(value: unknown): value is RetrievalTier;
|
|
16
|
+
|
|
17
|
+
export { RETRIEVAL_TIERS, isRetrievalTier };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|