agentfootprint 6.30.0 → 6.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/lib/context-bisect/ablation.js +40 -2
- package/dist/esm/lib/context-bisect/ablation.js.map +1 -1
- package/dist/esm/lib/context-bisect/cost.js +61 -0
- package/dist/esm/lib/context-bisect/cost.js.map +1 -0
- package/dist/esm/lib/context-bisect/index.js +10 -1
- package/dist/esm/lib/context-bisect/index.js.map +1 -1
- package/dist/esm/lib/context-bisect/localize.js +43 -4
- package/dist/esm/lib/context-bisect/localize.js.map +1 -1
- package/dist/esm/lib/context-bisect/loop-recall.js +108 -0
- package/dist/esm/lib/context-bisect/loop-recall.js.map +1 -0
- package/dist/esm/lib/context-bisect/trajectory.js +221 -0
- package/dist/esm/lib/context-bisect/trajectory.js.map +1 -0
- package/dist/esm/lib/context-bisect/types.js.map +1 -1
- package/dist/esm/lib/context-bisect/walk-to-root.js +170 -0
- package/dist/esm/lib/context-bisect/walk-to-root.js.map +1 -0
- package/dist/esm/lib/influence-core/contrastive.js +89 -0
- package/dist/esm/lib/influence-core/contrastive.js.map +1 -0
- package/dist/esm/lib/influence-core/index.js +1 -0
- package/dist/esm/lib/influence-core/index.js.map +1 -1
- package/dist/esm/lib/influence-core/signals.js +9 -4
- package/dist/esm/lib/influence-core/signals.js.map +1 -1
- package/dist/esm/observe.js +2 -2
- package/dist/esm/observe.js.map +1 -1
- package/dist/lib/context-bisect/ablation.js +43 -3
- package/dist/lib/context-bisect/ablation.js.map +1 -1
- package/dist/lib/context-bisect/cost.js +66 -0
- package/dist/lib/context-bisect/cost.js.map +1 -0
- package/dist/lib/context-bisect/index.js +23 -1
- package/dist/lib/context-bisect/index.js.map +1 -1
- package/dist/lib/context-bisect/localize.js +43 -4
- package/dist/lib/context-bisect/localize.js.map +1 -1
- package/dist/lib/context-bisect/loop-recall.js +112 -0
- package/dist/lib/context-bisect/loop-recall.js.map +1 -0
- package/dist/lib/context-bisect/trajectory.js +227 -0
- package/dist/lib/context-bisect/trajectory.js.map +1 -0
- package/dist/lib/context-bisect/types.js.map +1 -1
- package/dist/lib/context-bisect/walk-to-root.js +176 -0
- package/dist/lib/context-bisect/walk-to-root.js.map +1 -0
- package/dist/lib/influence-core/contrastive.js +93 -0
- package/dist/lib/influence-core/contrastive.js.map +1 -0
- package/dist/lib/influence-core/index.js +3 -1
- package/dist/lib/influence-core/index.js.map +1 -1
- package/dist/lib/influence-core/signals.js +11 -4
- package/dist/lib/influence-core/signals.js.map +1 -1
- package/dist/observe.js +14 -2
- package/dist/observe.js.map +1 -1
- package/dist/types/lib/context-bisect/ablation.d.ts +6 -1
- package/dist/types/lib/context-bisect/ablation.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/cost.d.ts +38 -0
- package/dist/types/lib/context-bisect/cost.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/index.d.ts +6 -2
- package/dist/types/lib/context-bisect/index.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/localize.d.ts +8 -0
- package/dist/types/lib/context-bisect/localize.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/loop-recall.d.ts +98 -0
- package/dist/types/lib/context-bisect/loop-recall.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/trajectory.d.ts +153 -0
- package/dist/types/lib/context-bisect/trajectory.d.ts.map +1 -0
- package/dist/types/lib/context-bisect/types.d.ts +68 -1
- package/dist/types/lib/context-bisect/types.d.ts.map +1 -1
- package/dist/types/lib/context-bisect/walk-to-root.d.ts +103 -0
- package/dist/types/lib/context-bisect/walk-to-root.d.ts.map +1 -0
- package/dist/types/lib/influence-core/contrastive.d.ts +27 -0
- package/dist/types/lib/influence-core/contrastive.d.ts.map +1 -0
- package/dist/types/lib/influence-core/index.d.ts +1 -0
- package/dist/types/lib/influence-core/index.d.ts.map +1 -1
- package/dist/types/lib/influence-core/signals.d.ts +8 -0
- package/dist/types/lib/influence-core/signals.d.ts.map +1 -1
- package/dist/types/observe.d.ts +2 -2
- package/dist/types/observe.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/observe.js
CHANGED
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
* directly; Tier 3 dashboards are opt-in.
|
|
33
33
|
*/
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
35
|
+
exports.scoreMargin = exports.scoreInfluence = exports.scoreContrastiveInfluence = exports.ratioStrategy = exports.rankingConfidence = exports.persistence = exports.pairwiseSimilarity = exports.marginStrategy = exports.finalAnswerSimilarity = exports.embeddingCache = exports.EmbeddingCache = exports.DEFAULT_SHORTLIST_BAND = exports.DEFAULT_PERSISTENCE_THRESHOLD = exports.DEFAULT_MARGIN_THRESHOLD = exports.DEFAULT_INFLUENCE_WEIGHTS = exports.DEFAULT_CLEAR_WINNER_RATIO = exports.DEFAULT_CLEAR_WINNER_MARGIN = exports.contentHash = exports.compositeScore = exports.averageRelevancy = exports.adaptWeights = exports.typedEmit = exports.agentThinkingTrace = exports.toolLineageRecorder = exports.attachStatus = exports.LoggingDomains = exports.attachLogging = exports.skillRecorder = exports.permissionRecorder = exports.memoryRecorder = exports.evalRecorder = exports.contextEvaluatedRecorder = exports.toolsRecorder = exports.costRecorder = exports.LiveAgentTurnTracker = exports.LiveToolTracker = exports.LiveLLMTracker = exports.LiveStateRecorder = exports.liveStateRecorder = exports.buildStepGraph = exports.attachFlowchart = exports.runStepRecorder = exports.RunStepRecorder = exports.buildRunSteps = exports.BoundaryRecorder = exports.boundaryRecorder = exports.agentRecorder = exports.compositionRecorder = exports.streamRecorder = exports.ContextRecorder = void 0;
|
|
36
|
+
exports.enumInProseRule = exports.differentiationHint = exports.descriptionRule = exports.defaultStructuralRules = exports.DEFAULT_WHEN_CUES = exports.DEFAULT_WATCH_BAND = exports.DEFAULT_OMISSION_CUES = exports.DEFAULT_CONFUSABILITY_THRESHOLD = exports.confusabilityText = exports.coerceCatalog = exports.catalogFromTools = exports.analyzeToolCatalog = exports.toBacktrackTrace = exports.verdictFor = exports.suspectLabel = exports.stepOutputText = exports.runRestorationProbe = exports.runAblationProbe = exports.probeFlipped = exports.localizeContextBug = exports.llmEdgeWeigher = exports.llmCallIdsFromEvents = exports.formatContextBugReport = exports.findDroppedContext = exports.defaultSuspectClassifier = exports.defaultOutcomeComparator = exports.CONTEXT_BISECT_DEFAULTS = exports.findLoopHeads = exports.classifySuspect = exports.DEFAULT_RECENCY_DECAY = exports.buildWriterFrameIndex = exports.walkTrajectory = exports.walkToRoot = exports.shortlistEarlyCulprits = exports.bucketByAnchors = exports.bisectCulprits = exports.assignCostVerdicts = exports.assembleTrajectory = exports.applyAblations = exports.ablationForSuspect = exports.traceDebugAgent = exports.SelfExplainBinding = exports.buildSelfExplainToolProvider = exports.buildSelfExplainSkill = exports.traceToolpack = exports.TOOLPACK_HARD_CAPS = exports.NO_COMPLETED_RUN_MESSAGE = exports.lazyTraceToolpack = exports.callTraceTool = exports.structuralProximity = void 0;
|
|
37
|
+
exports.toolChoiceRecorder = exports.buildChoiceContext = exports.saysWhatNotWhenRule = exports.runToolLintCli = exports.optionalParamRule = exports.MOCK_EMBEDDER_CALIBRATION = exports.formatToolCatalogReport = void 0;
|
|
37
38
|
// Tier 1 — context + stream
|
|
38
39
|
var ContextRecorder_js_1 = require("./recorders/core/ContextRecorder.js");
|
|
39
40
|
Object.defineProperty(exports, "ContextRecorder", { enumerable: true, get: function () { return ContextRecorder_js_1.ContextRecorder; } });
|
|
@@ -117,6 +118,7 @@ Object.defineProperty(exports, "pairwiseSimilarity", { enumerable: true, get: fu
|
|
|
117
118
|
Object.defineProperty(exports, "persistence", { enumerable: true, get: function () { return index_js_1.persistence; } });
|
|
118
119
|
Object.defineProperty(exports, "rankingConfidence", { enumerable: true, get: function () { return index_js_1.rankingConfidence; } });
|
|
119
120
|
Object.defineProperty(exports, "ratioStrategy", { enumerable: true, get: function () { return index_js_1.ratioStrategy; } });
|
|
121
|
+
Object.defineProperty(exports, "scoreContrastiveInfluence", { enumerable: true, get: function () { return index_js_1.scoreContrastiveInfluence; } });
|
|
120
122
|
Object.defineProperty(exports, "scoreInfluence", { enumerable: true, get: function () { return index_js_1.scoreInfluence; } });
|
|
121
123
|
Object.defineProperty(exports, "scoreMargin", { enumerable: true, get: function () { return index_js_1.scoreMargin; } });
|
|
122
124
|
Object.defineProperty(exports, "structuralProximity", { enumerable: true, get: function () { return index_js_1.structuralProximity; } });
|
|
@@ -147,7 +149,17 @@ Object.defineProperty(exports, "traceDebugAgent", { enumerable: true, get: funct
|
|
|
147
149
|
var index_js_4 = require("./lib/context-bisect/index.js");
|
|
148
150
|
Object.defineProperty(exports, "ablationForSuspect", { enumerable: true, get: function () { return index_js_4.ablationForSuspect; } });
|
|
149
151
|
Object.defineProperty(exports, "applyAblations", { enumerable: true, get: function () { return index_js_4.applyAblations; } });
|
|
152
|
+
Object.defineProperty(exports, "assembleTrajectory", { enumerable: true, get: function () { return index_js_4.assembleTrajectory; } });
|
|
153
|
+
Object.defineProperty(exports, "assignCostVerdicts", { enumerable: true, get: function () { return index_js_4.assignCostVerdicts; } });
|
|
150
154
|
Object.defineProperty(exports, "bisectCulprits", { enumerable: true, get: function () { return index_js_4.bisectCulprits; } });
|
|
155
|
+
Object.defineProperty(exports, "bucketByAnchors", { enumerable: true, get: function () { return index_js_4.bucketByAnchors; } });
|
|
156
|
+
Object.defineProperty(exports, "shortlistEarlyCulprits", { enumerable: true, get: function () { return index_js_4.shortlistEarlyCulprits; } });
|
|
157
|
+
Object.defineProperty(exports, "walkToRoot", { enumerable: true, get: function () { return index_js_4.walkToRoot; } });
|
|
158
|
+
Object.defineProperty(exports, "walkTrajectory", { enumerable: true, get: function () { return index_js_4.walkTrajectory; } });
|
|
159
|
+
Object.defineProperty(exports, "buildWriterFrameIndex", { enumerable: true, get: function () { return index_js_4.buildWriterFrameIndex; } });
|
|
160
|
+
Object.defineProperty(exports, "DEFAULT_RECENCY_DECAY", { enumerable: true, get: function () { return index_js_4.DEFAULT_RECENCY_DECAY; } });
|
|
161
|
+
Object.defineProperty(exports, "classifySuspect", { enumerable: true, get: function () { return index_js_4.classifySuspect; } });
|
|
162
|
+
Object.defineProperty(exports, "findLoopHeads", { enumerable: true, get: function () { return index_js_4.findLoopHeads; } });
|
|
151
163
|
Object.defineProperty(exports, "CONTEXT_BISECT_DEFAULTS", { enumerable: true, get: function () { return index_js_4.CONTEXT_BISECT_DEFAULTS; } });
|
|
152
164
|
Object.defineProperty(exports, "defaultOutcomeComparator", { enumerable: true, get: function () { return index_js_4.defaultOutcomeComparator; } });
|
|
153
165
|
Object.defineProperty(exports, "defaultSuspectClassifier", { enumerable: true, get: function () { return index_js_4.defaultSuspectClassifier; } });
|
package/dist/observe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG
|
|
1
|
+
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;AAEH,4BAA4B;AAC5B,0EAAmG;AAA1F,qHAAA,eAAe,OAAA;AACxB,wEAAgG;AAAvF,mHAAA,cAAc,OAAA;AAEvB,+BAA+B;AAC/B,kFAGiD;AAF/C,6HAAA,mBAAmB,OAAA;AAGrB,sEAA6F;AAApF,iHAAA,aAAa,OAAA;AACtB,qFAkBuD;AAjBrD,uHAAA,gBAAgB,OAAA;AAChB,uHAAA,gBAAgB,OAAA;AAiBlB,mFAWsD;AAVpD,mHAAA,aAAa,OAAA;AACb,qHAAA,eAAe,OAAA;AACf,qHAAA,eAAe,OAAA;AASjB,uFAUwD;AATtD,uHAAA,eAAe,OAAA;AACf,sHAAA,cAAc,OAAA;AAShB,uFAUwD;AATtD,yHAAA,iBAAiB,OAAA;AACjB,yHAAA,iBA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AAA,gBAAgB,OAAA;AAChB,+GAAA,mBAAmB,OAAA;AACnB,0GAAA,cAAc,OAAA;AACd,wGAAA,YAAY,OAAA;AACZ,sGAAA,UAAU,OAAA;AAyDZ,sEAAsE;AACtE,uEAAuE;AACvE,mEAAmE;AACnE,0DAQuC;AAPrC,4GAAA,gBAAgB,OAAA;AAQlB,wEAAwE;AACxE,8EAA8E;AAC9E,qEAAqE;AACrE,wEAAwE;AACxE,uEAAuE;AACvE,gEAAgE;AAChE,gDAAgD;AAChD,qDAgCkC;AA/BhC,8GAAA,kBAAkB,OAAA;AAClB,4GAAA,gBAAgB,OAAA;AAChB,yGAAA,aAAa,OAAA;AACb,6GAAA,iBAAiB,OAAA;AACjB,2HAAA,+BAA+B,OAAA;AAC/B,iHAAA,qBAAqB,OAAA;AACrB,8GAAA,kBAAkB,OAAA;AAClB,6GAAA,iBAAiB,OAAA;AACjB,kHAAA,sBAAsB,OAAA;AACtB,2GAAA,eAAe,OAAA;AACf,+GAAA,mBAAmB,OAAA;AACnB,2GAAA,eAAe,OAAA;AACf,mHAAA,uBAAuB,OAAA;AACvB,qHAAA,yBAAyB,OAAA;AACzB,6GAAA,iBAAiB,OAAA;AACjB,0GAAA,cAAc,OAAA;AACd,+GAAA,mBAAmB,OAAA;AAgBrB,sEAAsE;AACtE,uEAAuE;AACvE,qEAAqE;AACrE,oEAAoE;AACpE,yFASyD;AARvD,2HAAA,kBAAkB,OAAA;AAClB,2HAAA,kBAAkB,OAAA"}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* score elsewhere is a correlational proxy.
|
|
26
26
|
*/
|
|
27
27
|
import type { Embedder } from '../influence-core/index.js';
|
|
28
|
-
import type { AblationRerun, AblationRunStats, AblationSpec, AblationVerdict, OutcomeComparator, SimilarityStats, Suspect } from './types.js';
|
|
28
|
+
import type { AblationRerun, AblationRunStats, AblationSpec, AblationVerdict, CostStats, OutcomeComparator, SimilarityStats, Suspect } from './types.js';
|
|
29
29
|
/**
|
|
30
30
|
* The spec that removes one suspect — or `undefined` for kind `'stage'`
|
|
31
31
|
* (plain pipeline stages have no removable input; re-rank or refactor).
|
|
@@ -72,6 +72,11 @@ export declare function applyAblations<TTool extends NamedTool, TInjection exten
|
|
|
72
72
|
/** Resolve the seeded-rerun count: default on non-finite, floor, clamp to >= 2
|
|
73
73
|
* (no single-run verdicts — D9). Shared by the ablation + restoration probes. */
|
|
74
74
|
export declare function resolveSamples(samples: number | undefined): number;
|
|
75
|
+
/** Median of a numeric sample (mean of the two middles for even length). */
|
|
76
|
+
export declare function median(values: readonly number[]): number;
|
|
77
|
+
/** Build a probe's CostStats from per-seed loop/token samples — undefined when
|
|
78
|
+
* the runner reported no cost (keeps quality-only behavior byte-identical). */
|
|
79
|
+
export declare function costStatsFrom(samples: number, loops: readonly number[], tokens: readonly number[]): CostStats | undefined;
|
|
75
80
|
export declare function similarityStats(values: readonly number[]): SimilarityStats;
|
|
76
81
|
/** The default comparator: embedding similarity below the threshold. */
|
|
77
82
|
export declare function defaultOutcomeComparator(embedder: Embedder, flipThreshold: number): OutcomeComparator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ablation.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/ablation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,
|
|
1
|
+
{"version":3,"file":"ablation.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/ablation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EAEf,SAAS,EACT,i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AAMD;gFACgF;AAChF,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,SAAS,GAAG,SAAS,CAOvB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe,CAU1E;AAED,wEAAwE;AACxE,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,GACpB,iBAAiB,CAQnB;AAED,wDAAwD;AACxD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,SAAS,YAAY,EAAE,GAC7B,OAAO,CAAC,gBAAgB,CAAC,CA8B3B;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,gBAAgB,EACvB,cAAc,EAAE,OAAO;AACvB;;iEAEiE;AACjE,MAAM,GAAE,UAAU,GAAG,WAAwB,GAC5C,eAAe,CAkCjB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cost — the SECOND score of two-score localization (proposal 004).
|
|
3
|
+
*
|
|
4
|
+
* A context bug costs you twice: a wrong ANSWER (the flip `verdict`, the strong
|
|
5
|
+
* causal tier) OR extra COST — loops/tokens — even when a capable model recovers
|
|
6
|
+
* and answers correctly. This module reads the cost score from the SAME ablation
|
|
7
|
+
* reruns (`AblationRunStats.cost`, captured in `runAblationProbe`) and attaches a
|
|
8
|
+
* `CostVerdict` to each suspect, then classifies each on the 2×2.
|
|
9
|
+
*
|
|
10
|
+
* HONEST TIER (the two-lens review): the cost score is a WEAKER, gated tier than
|
|
11
|
+
* the flip. Removing a piece reducing cost shows **necessity for the cost, NOT
|
|
12
|
+
* that the work was "wasted"** (the piece could be load-bearing scaffolding). So:
|
|
13
|
+
* - PLACEBO control — a cost cause must beat the loops-saved of pieces whose
|
|
14
|
+
* removal did NOT flip the answer (benign path variance), leave-one-out;
|
|
15
|
+
* (v1 limitation: the placebo population is the non-flipping suspects, which
|
|
16
|
+
* may themselves include real cost causes — so the band's MAX is CONSERVATIVE
|
|
17
|
+
* and UNDER-detects when several pieces reduce cost by similar amounts. Safe
|
|
18
|
+
* direction for a causal-ish claim. A dedicated neutral-filler placebo is v2.)
|
|
19
|
+
* - STABILITY — every ablated rerun used no MORE loops than baseline
|
|
20
|
+
* (consistent reduction; an integer ±1 delta is brittle — determinism ≠
|
|
21
|
+
* robustness), AND a placebo band existed to clear.
|
|
22
|
+
*/
|
|
23
|
+
import type { AblationRunStats, Suspect, SuspectClass } from './types.js';
|
|
24
|
+
/** Minimum loops saved (over the placebo band) to call a piece a cost cause. */
|
|
25
|
+
export declare const MIN_LOOPS_SAVED = 1;
|
|
26
|
+
/**
|
|
27
|
+
* Attach a `CostVerdict` to each suspect from the ablation reruns + a
|
|
28
|
+
* leave-one-out placebo control. Suspects without cost data are returned
|
|
29
|
+
* unchanged (quality-only). See the module honesty note.
|
|
30
|
+
*/
|
|
31
|
+
export declare function assignCostVerdicts(suspects: readonly Suspect[], baseline: AblationRunStats): Suspect[];
|
|
32
|
+
/**
|
|
33
|
+
* Derive the 2×2 class from the flip verdict (quality) and the cost verdict.
|
|
34
|
+
* The no-bug cell is `'no-detected-effect'` — never "innocent" (a piece can
|
|
35
|
+
* matter in ways neither axis sees: overdetermination, same-loops-different-path).
|
|
36
|
+
*/
|
|
37
|
+
export declare function classifySuspect(suspect: Suspect): SuspectClass;
|
|
38
|
+
//# sourceMappingURL=cost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/cost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAe,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEvF,gFAAgF;AAChF,eAAO,MAAM,eAAe,IAAI,CAAC;AAqBjC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,QAAQ,EAAE,gBAAgB,GACzB,OAAO,EAAE,CA2BX;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAO9D"}
|
|
@@ -19,7 +19,11 @@ export { findDroppedContext, type ContextUnit, type DroppedUnit, type MissingCon
|
|
|
19
19
|
export { runRestorationProbe, type RestorationProbeConfig, type RestorationRerun, type RestorationRunner, } from './restoration.js';
|
|
20
20
|
export { defaultSuspectClassifier, formatContextBugReport, llmCallIdsFromEvents, localizeContextBug, suspectLabel, type ClassifyContext, type LocalizeContextBugOptions, type SuspectClassifier, type SuspectSeed, } from './localize.js';
|
|
21
21
|
export { toBacktrackTrace, type BacktrackCustodyHop, type BacktrackHop, type BacktrackSuspectCard, type BacktrackTrace, type BacktrackTrail, type ToBacktrackTraceOptions, } from './toBacktrackTrace.js';
|
|
22
|
-
export { ablationForSuspect, applyAblations, defaultOutcomeComparator, probeFlipped, runAblationProbe, verdictFor, type AblationTargets, type ProbeConfig, } from './ablation.js';
|
|
22
|
+
export { ablationForSuspect, applyAblations, costStatsFrom, defaultOutcomeComparator, median, probeFlipped, runAblationProbe, verdictFor, type AblationTargets, type ProbeConfig, } from './ablation.js';
|
|
23
|
+
export { assignCostVerdicts, classifySuspect, MIN_LOOPS_SAVED } from './cost.js';
|
|
24
|
+
export { shortlistEarlyCulprits, DEFAULT_RECENCY_DECAY, type LoopCandidate, type LoopRecallShortlist, type ShortlistEarlyCulpritsOptions, } from './loop-recall.js';
|
|
25
|
+
export { walkToRoot, walkTrajectory, buildWriterFrameIndex, type RootCauseHop, type RootCauseNote, type RootCausePath, type WalkToRootOptions, } from './walk-to-root.js';
|
|
26
|
+
export { assembleTrajectory, bucketByAnchors, findLoopHeads, type AnchorBucket, type AssembleTrajectoryOptions, type ContextSource, type LoopFrame, type SyntheticQuestionNode, type Trajectory, } from './trajectory.js';
|
|
23
27
|
export { bisectCulprits, type BisectCulpritsOptions, type BisectionProbe, type BisectionResult, } from './bisect.js';
|
|
24
|
-
export { CONTEXT_BISECT_DEFAULTS, type AblationRerun, type AblationRunner, type AblationRunStats, type AblationSpec, type AblationVerdict, type AblationVerdictKind, type CapturedEventLike, type ContextBugArtifacts, type ContextBugReport, type EdgePathStep, type HonestyFlag, type HonestyFlagKind, type OutcomeComparator, type QualityTriggerLookup, type RestoredCandidate, type SimilarityStats, type SliceStats, type Suspect, type SuspectDetail, type SuspectKind, } from './types.js';
|
|
28
|
+
export { CONTEXT_BISECT_DEFAULTS, type AblationRerun, type AblationRunner, type AblationRunStats, type AblationSpec, type AblationVerdict, type AblationVerdictKind, type CapturedEventLike, type ContextBugArtifacts, type ContextBugReport, type CostRange, type CostStats, type CostVerdict, type EdgePathStep, type HonestyFlag, type HonestyFlagKind, type OutcomeComparator, type QualityTriggerLookup, type RestoredCandidate, type RunCost, type SimilarityStats, type SliceStats, type Suspect, type SuspectClass, type SuspectDetail, type SuspectKind, } from './types.js';
|
|
25
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,gBAAgB,EAChB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,cAAc,EACd,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,wBAAwB,EACxB,sBAAsB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jB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC"}
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import type { CausalNode } from 'footprintjs/trace';
|
|
32
32
|
import { type Embedder } from '../influence-core/index.js';
|
|
33
|
+
import type { LoopRecallShortlist } from './loop-recall.js';
|
|
33
34
|
import { type ContextUnit } from './missingContext.js';
|
|
34
35
|
import { type RestorationRerun } from './restoration.js';
|
|
35
36
|
import type { AblationRerun, ContextBugArtifacts, ContextBugReport, Suspect, SuspectDetail, SuspectKind } from './types.js';
|
|
@@ -112,6 +113,13 @@ export interface LocalizeContextBugOptions {
|
|
|
112
113
|
readonly maxSuspects?: number;
|
|
113
114
|
/** Override / extend the suspect classifier. */
|
|
114
115
|
readonly classify?: SuspectClassifier;
|
|
116
|
+
/**
|
|
117
|
+
* L3 narrowing (proposal 006): a per-loop recall shortlist from `shortlistEarlyCulprits`.
|
|
118
|
+
* When supplied, suspects are REORDERED (never filtered) so high-recall candidates float to the
|
|
119
|
+
* top and survive the `maxSuspects` slice → ablation targets them first. Joined on the suspect
|
|
120
|
+
* identity (`detail.injectionId`/`detail.toolName`). Default off (back-compat).
|
|
121
|
+
*/
|
|
122
|
+
readonly shortlist?: LoopRecallShortlist;
|
|
115
123
|
}
|
|
116
124
|
/**
|
|
117
125
|
* Localize a contextual bug: trigger → causal slice → influence-weighted
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localize.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/localize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAkB,KAAK,QAAQ,EAAsB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"localize.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/localize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAkB,KAAK,QAAQ,EAAsB,MAAM,4BAA4B,CAAC;AAI/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EACV,aAAa,EAEb,mBAAmB,EACnB,gBAAgB,EAKhB,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,YAAY,CAAC;AAKpB;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAAE,GAC/F,MAAM,EAAE,CAWV;AAID,kEAAkE;AAClE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;CACjC;AAED,iDAAiD;AACjD,MAAM,WAAW,eA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IAC9B,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;CAC1C;AAsBD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,gBAAgB,CAAC,CAuQ3B;AA0JD,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAGrD;AAID;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAoHvE"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* loop-recall — L3: the per-loop RECALL shortlist (proposal 006, the validated subset of 003).
|
|
3
|
+
*
|
|
4
|
+
* A per-loop influence scorer that RESCUES early-entered culprits into the top-k shortlist so
|
|
5
|
+
* ablation has the right candidates to convict — a **recall booster that narrows before ablation,
|
|
6
|
+
* NOT a #1 ranker** (H2 measured the #1-ranker as a loss; recall as a win: top-3 10/10 vs 9/10).
|
|
7
|
+
*
|
|
8
|
+
* Home: `context-bisect` (NOT influence-core — it consumes the `Trajectory` + `defaultSuspectClassifier`,
|
|
9
|
+
* and influence-core is a leaf; context-bisect already depends on influence-core). Sibling to the
|
|
10
|
+
* `contrastive` opt-in scorer pattern: a separate scorer, not a mutation of `scoreInfluence`.
|
|
11
|
+
*
|
|
12
|
+
* Mechanism (per loop, in order):
|
|
13
|
+
* 1. Reuse `defaultSuspectClassifier` on the frame's contextSources → the SAME suspect identity
|
|
14
|
+
* the localizer emits (injectionId / toolName) — so a candidate joins 1:1 with a `Suspect`.
|
|
15
|
+
* 2. Score each suspect's content vs the loop's OWN output (`intermediateText`, the per-loop
|
|
16
|
+
* anchor — NOT the final answer) via `scoreInfluence`. This per-loop signal is the win over
|
|
17
|
+
* plain final-answer influence: it catches a source in the loop it actually fed.
|
|
18
|
+
* 3. Recency-weighted SUM: `score(s) = Σ_N recencyDecay^(lastLoop − N) · perLoop_N(s)`. Recent
|
|
19
|
+
* loops weigh more; rank descending for recall, return top-k.
|
|
20
|
+
*
|
|
21
|
+
* MECHANISM NOTE (the gate earned this): proposal 006 first proposed a FORWARD eligibility sum.
|
|
22
|
+
* The recall@k gate measured it against the H2 prototype and it FAILED (forward up-weights early
|
|
23
|
+
* loops → top-3 4/10). The H2 winner was a BACKWARD recency-weighted sum (top-3 10/10) — so that is
|
|
24
|
+
* what ships. Measure-before-promote in action.
|
|
25
|
+
*
|
|
26
|
+
* HONESTY (must-read — folded in from review):
|
|
27
|
+
* - **Correlational only.** Every `recallScore` is an embedding-geometry PROXY, never "because".
|
|
28
|
+
* The causal claim stays in ablation (`localizeContextBug`).
|
|
29
|
+
* - **FA-dominated, not four-signal.** Per-loop sources carry `ancestorTexts: []`, so `adaptWeights`
|
|
30
|
+
* zeroes AVG+PERSIST (DEPTH constant) — the per-loop score is in practice cosine-to-the-loop-output.
|
|
31
|
+
* - **Gate-validated mechanism.** The shipped recency sum reproduces H2 (top-3 10/10 vs plain 9/10)
|
|
32
|
+
* at the default recencyDecay; the gate FAILS promotion otherwise.
|
|
33
|
+
* - **Thin, single-setup.** The recall win is 10/10 vs 9/10 (n=10, one fixture, one embedder/model).
|
|
34
|
+
*/
|
|
35
|
+
import type { Embedder, InfluenceWeights } from '../influence-core/index.js';
|
|
36
|
+
import { type SuspectClassifier } from './localize.js';
|
|
37
|
+
import type { Trajectory } from './trajectory.js';
|
|
38
|
+
import type { HonestyFlag, SuspectKind } from './types.js';
|
|
39
|
+
/**
|
|
40
|
+
* Default recency decay for the per-loop aggregation. A loop N's per-suspect score is weighted by
|
|
41
|
+
* `recencyDecay^(lastLoop − N)` — recent loops weigh more. H2 swept `{0.5, 0.7, 0.9, 1.0}`; the
|
|
42
|
+
* recall@k gate (running THIS shipped scorer) confirmed `0.5` and `0.7` reproduce top-3 10/10 vs
|
|
43
|
+
* plain 9/10, while `≥0.9` does not — so the validated band is `[0.5, 0.7]` and the default is the
|
|
44
|
+
* lowest measured winner, `0.5`. (We do NOT ship an unmeasured value.) `1` = uniform; `0` = last-loop-only.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEFAULT_RECENCY_DECAY = 0.5;
|
|
47
|
+
/** One recall-shortlist candidate — joins 1:1 with a localizer `Suspect` via `suspectId`. */
|
|
48
|
+
export interface LoopCandidate {
|
|
49
|
+
/** The suspect identity the default classifier emits — `injectionId` / `toolName`. The join key. */
|
|
50
|
+
readonly suspectId: string;
|
|
51
|
+
/** Suspect kind (injection / memory / tool) — from the classifier. */
|
|
52
|
+
readonly kind: SuspectKind;
|
|
53
|
+
/** Normalized eligibility in [0, 1] (= eligibility / max across candidates) — the display/threshold headline. */
|
|
54
|
+
readonly recallScore: number;
|
|
55
|
+
/** RAW forward-eligibility sum (pre-normalization) — the actual computed proxy magnitude. */
|
|
56
|
+
readonly eligibility: number;
|
|
57
|
+
/** First loop index this suspect fed — why recall rescues early-entered culprits. */
|
|
58
|
+
readonly enteredLoop: number;
|
|
59
|
+
/** Per-loop track: the clamped per-loop score in each loop the suspect appeared. */
|
|
60
|
+
readonly perLoop: readonly {
|
|
61
|
+
readonly loopIndex: number;
|
|
62
|
+
readonly recallScore: number;
|
|
63
|
+
}[];
|
|
64
|
+
/** True if a loop it fed read untracked sources, or the trajectory was frame-truncated. */
|
|
65
|
+
readonly incomplete: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** The recall shortlist — ranked recall-first; `candidates` is already top-`k`. */
|
|
68
|
+
export interface LoopRecallShortlist {
|
|
69
|
+
readonly candidates: readonly LoopCandidate[];
|
|
70
|
+
readonly k: number;
|
|
71
|
+
readonly recencyDecay: number;
|
|
72
|
+
/** Standing caveats passed through from the trajectory (literal — review must-fix #4). */
|
|
73
|
+
readonly honestyFlags: readonly HonestyFlag[];
|
|
74
|
+
}
|
|
75
|
+
export interface ShortlistEarlyCulpritsOptions {
|
|
76
|
+
/** Embedder; wrap in an `EmbeddingCache` (scoring is O(frames × suspects)). */
|
|
77
|
+
readonly embedder: Embedder;
|
|
78
|
+
/** Recency decay; default {@link DEFAULT_RECENCY_DECAY}. Loop N weighted `recencyDecay^(lastLoop−N)`
|
|
79
|
+
* (1 = uniform, 0 = last-loop-only). Validated band `[0.5, 0.7]`. */
|
|
80
|
+
readonly recencyDecay?: number;
|
|
81
|
+
/** Shortlist size. Default 5. recall@k is the headline metric. */
|
|
82
|
+
readonly k?: number;
|
|
83
|
+
/** Override the suspect classifier (default `defaultSuspectClassifier`). */
|
|
84
|
+
readonly classifier?: SuspectClassifier;
|
|
85
|
+
/** Composite weights forwarded to `scoreInfluence`. */
|
|
86
|
+
readonly weights?: InfluenceWeights;
|
|
87
|
+
readonly signal?: AbortSignal;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Score a recorded agent run into a per-loop RECALL shortlist (L3). Works on BOTH flat and grouped
|
|
91
|
+
* trajectories (it reads each frame's contextSources + intermediateText regardless of shape).
|
|
92
|
+
*
|
|
93
|
+
* Returns the top-`k` candidates ranked recall-first, each joinable 1:1 with a localizer `Suspect`
|
|
94
|
+
* via `suspectId`. Feed it to `localizeContextBug({ shortlist })` to REORDER suspects before the
|
|
95
|
+
* ablation budget is spent — narrow (recall), then convict (causal).
|
|
96
|
+
*/
|
|
97
|
+
export declare function shortlistEarlyCulprits(trajectory: Trajectory, opts: ShortlistEarlyCulpritsOptions): Promise<LoopRecallShortlist>;
|
|
98
|
+
//# sourceMappingURL=loop-recall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop-recall.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/loop-recall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAiB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE5F,OAAO,EAAkD,KAAK,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AC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IACxC,uDAAuD;IACvD,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAiCD;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,mBAAmB,CAAC,CAkE9B"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* trajectory — the per-loop trajectory assembler (proposal 005).
|
|
3
|
+
*
|
|
4
|
+
* Slices a recorded ReAct run's commit log into ordered LoopFrames — one per
|
|
5
|
+
* iteration — so the two-score localizer (L2), the recall scorer (L3), and the
|
|
6
|
+
* backtracking debugger (L4) read the same per-loop substrate instead of one
|
|
7
|
+
* flattened bag. PURE + read-only (NOT a recorder, Convention 1): the loop-level
|
|
8
|
+
* peer of `causalChain` / `commitValueAt` / `stepOutputText`.
|
|
9
|
+
*
|
|
10
|
+
* Pieces:
|
|
11
|
+
* - `bucketByAnchors` — the domain-agnostic HEAD-range partition (pure, total);
|
|
12
|
+
* - `findLoopHeads` — the flat-chart loop-head detector (one head per injection-engine entry);
|
|
13
|
+
* - `assembleTrajectory` — the agent-flavored projection (call-llm pointer + intermediate
|
|
14
|
+
* text + live contextSources via findLastWriter/commitValueAt).
|
|
15
|
+
*
|
|
16
|
+
* Handles BOTH chart shapes:
|
|
17
|
+
* - FLAT (`buildAgentChart`, default `reactMode: 'dynamic'`): `call-llm` is a parent-level
|
|
18
|
+
* stage; frames are bucketed over the RUN commit log by injection-engine loop heads.
|
|
19
|
+
* - GROUPED (`buildDynamicAgentChart`, `reactMode: 'dynamic-grouped'`): the LLM turn runs in
|
|
20
|
+
* an `sf-llm-call` subflow whose inner commits live in `subflowResults['sf-llm-call#k']`,
|
|
21
|
+
* retained PER-ITERATION by footprintjs subflow-commit-visibility (≥ d458898). Each loop is
|
|
22
|
+
* projected PER-SCOPE over its own inner commit log — no cross-scope merge, so the slice
|
|
23
|
+
* primitives run correctly over the isolated log. Such frames carry `subflowScope`.
|
|
24
|
+
*/
|
|
25
|
+
import type { CommitBundle } from 'footprintjs/advanced';
|
|
26
|
+
import type { UntrackedSource } from 'footprintjs/trace';
|
|
27
|
+
import type { EvidenceInput } from '../influence-core/index.js';
|
|
28
|
+
import { type ContextBugArtifacts, type HonestyFlag } from './types.js';
|
|
29
|
+
/** One source the loop's `call-llm` read, traced back to its live writer for THAT loop. */
|
|
30
|
+
export interface ContextSource {
|
|
31
|
+
/** The state key call-llm#k read (e.g. 'systemPromptInjections'). */
|
|
32
|
+
readonly key: string;
|
|
33
|
+
/** runtimeStageId of the live writer (findLastWriter); undefined when never committed before. */
|
|
34
|
+
readonly writerId: string | undefined;
|
|
35
|
+
/** The writer's commitLog ARRAY position — NOT the optional CommitBundle.idx. */
|
|
36
|
+
readonly writerArrayIdx: number | undefined;
|
|
37
|
+
/** Materialized live value (commitValueAt); undefined under the pre-run-initial blind spot. */
|
|
38
|
+
readonly value: unknown;
|
|
39
|
+
/** The bridge handed to scorers: { id, text, ancestorTexts }. */
|
|
40
|
+
readonly evidence: EvidenceInput;
|
|
41
|
+
}
|
|
42
|
+
/** One ReAct iteration — bounded by the loop HEAD, pointing at the call-llm inside it. */
|
|
43
|
+
export interface LoopFrame {
|
|
44
|
+
/** Anchor ordinal 0,1,2… DERIVED from the commit log (NOT TraversalContext.loopIteration). */
|
|
45
|
+
readonly loopIndex: number;
|
|
46
|
+
/** The call-llm#k runtimeStageId — the LLM-step pointer WITHIN the frame. */
|
|
47
|
+
readonly llmCallId: string | undefined;
|
|
48
|
+
/** call-llm#k's commitLog array index — the EXCLUSIVE beforeIdx for findLastWriter. */
|
|
49
|
+
readonly llmCallArrayIdx: number | undefined;
|
|
50
|
+
/** The loop-HEAD commit's array index — the body's lower bound. */
|
|
51
|
+
readonly headArrayIdx: number;
|
|
52
|
+
/** Every runtimeStageId in [head[k], head[k+1]) — the full multi-stage body of round k, in commit order. */
|
|
53
|
+
readonly bodyIds: readonly string[];
|
|
54
|
+
/** stepOutputText over the call-llm commit (assistant content + tool-call intents). */
|
|
55
|
+
readonly intermediateText: string | undefined;
|
|
56
|
+
/** One per key call-llm#k read. */
|
|
57
|
+
readonly contextSources: readonly ContextSource[];
|
|
58
|
+
/**
|
|
59
|
+
* GROUPED chart only: the `sf-llm-call` mount runtimeStageId this frame was projected from.
|
|
60
|
+
* When set, ALL array indices on this frame (`headArrayIdx`, `llmCallArrayIdx`,
|
|
61
|
+
* `bodyIds`, each `contextSource.writerArrayIdx`) are relative to that subflow's OWN inner
|
|
62
|
+
* commit log (`subflowResults[subflowScope].treeContext.history`), NOT the run commit log.
|
|
63
|
+
* Absent for FLAT-chart frames (indices are run-commit-log relative).
|
|
64
|
+
*/
|
|
65
|
+
readonly subflowScope?: string;
|
|
66
|
+
/** Pass-through of the call-llm bundle's untrackedSources ('args'|'env'|'silent'). */
|
|
67
|
+
readonly incompleteSources?: ReadonlyArray<UntrackedSource>;
|
|
68
|
+
/** True when incompleteSources is non-empty — "this step read untracked; slice may be
|
|
69
|
+
* incomplete here". NOT a model-internalized claim (that is undetectable — see Trajectory). */
|
|
70
|
+
readonly untrackedReadsPresent: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** The run input, re-injected as a synthetic node — a PROXY (args is untracked), never a recorded edge. */
|
|
73
|
+
export interface SyntheticQuestionNode {
|
|
74
|
+
readonly text: string;
|
|
75
|
+
readonly incompleteSources: readonly ['args'];
|
|
76
|
+
readonly injected: true;
|
|
77
|
+
}
|
|
78
|
+
export interface Trajectory {
|
|
79
|
+
readonly frames: readonly LoopFrame[];
|
|
80
|
+
/** Commits BEFORE the first head (seed, memory-read) — run setup, not a loop body. */
|
|
81
|
+
readonly prelude: readonly string[];
|
|
82
|
+
/** Only populated when the contrastive path is wired (proposal 005 L2 note). */
|
|
83
|
+
readonly question?: SyntheticQuestionNode;
|
|
84
|
+
/** Degrade-never-throw. STANDING caveat on EVERY trajectory: contextSources show only
|
|
85
|
+
* sources re-committed to tracked state; context the model retained internally (carried
|
|
86
|
+
* in its own reasoning, never re-committed) leaves no read→write edge and is NOT here. */
|
|
87
|
+
readonly honestyFlags: readonly HonestyFlag[];
|
|
88
|
+
/** Set only when maxFrames cut the run. */
|
|
89
|
+
readonly truncated?: {
|
|
90
|
+
readonly byFrames: boolean;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/** One frame's raw partition: the head's array index + the runtimeStageIds in its half-open range. */
|
|
94
|
+
export interface AnchorBucket {
|
|
95
|
+
readonly headArrayIdx: number;
|
|
96
|
+
readonly bodyIds: readonly string[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Partition a commit log by a list of HEAD runtimeStageIds (taken as data — no agent
|
|
100
|
+
* knowledge). Each frame is the half-open range `[head[k], head[k+1])`; commits before
|
|
101
|
+
* the first head are the `prelude`. TOTAL: every commit lands in exactly one frame OR
|
|
102
|
+
* the prelude. Heads not found in the log are ignored; ordering follows the log, not the
|
|
103
|
+
* input list (an out-of-order or duplicate head list cannot reorder/duplicate commits).
|
|
104
|
+
*
|
|
105
|
+
* A head is anchored at the FIRST commit bearing its runtimeStageId — a single stage
|
|
106
|
+
* execution can flush MORE THAN ONE commit bundle under one runtimeStageId (parallel
|
|
107
|
+
* fork merges, multi-flush stages), and those repeats stay INSIDE the frame they open
|
|
108
|
+
* rather than each spawning a spurious one-commit frame.
|
|
109
|
+
*/
|
|
110
|
+
export declare function bucketByAnchors(commitLog: readonly CommitBundle[], headRuntimeStageIds: readonly string[]): {
|
|
111
|
+
frames: AnchorBucket[];
|
|
112
|
+
prelude: string[];
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* The flat-chart loop heads: the FIRST commit of each injection-engine ENTRY (one per
|
|
116
|
+
* ReAct iteration, since the loop is branch-sourced back to the injection engine). A head
|
|
117
|
+
* is a commit that is in the injection engine while the previous commit was not — so a
|
|
118
|
+
* multi-commit injection-engine body yields exactly one head per loop.
|
|
119
|
+
*
|
|
120
|
+
* Returns the runtimeStageIds to feed `bucketByAnchors`. Empty when the run never enters
|
|
121
|
+
* the injection engine (e.g. the grouped chart, where the loop lives in sf-llm-call —
|
|
122
|
+
* the caller degrades with an honesty flag).
|
|
123
|
+
*/
|
|
124
|
+
export declare function findLoopHeads(commitLog: readonly CommitBundle[]): string[];
|
|
125
|
+
export interface AssembleTrajectoryOptions {
|
|
126
|
+
/** Chars of each source value / intermediate text embedded. Default 2000. */
|
|
127
|
+
readonly maxTextChars?: number;
|
|
128
|
+
/** Keep only the first N frames (honesty-flagged via `truncated`). */
|
|
129
|
+
readonly maxFrames?: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Slice a recorded agent run into a {@link Trajectory} — one {@link LoopFrame} per ReAct
|
|
133
|
+
* iteration, each carrying its `call-llm` pointer, the call's output text, and the live
|
|
134
|
+
* {@link ContextSource}s that fed it (traced via `findLastWriter` + `commitValueAt` from the
|
|
135
|
+
* SAME commit log — zero new capture).
|
|
136
|
+
*
|
|
137
|
+
* Takes the SAME `ContextBugArtifacts` bag the localizer takes — adopter call is just
|
|
138
|
+
* `assembleTrajectory(artifacts)`.
|
|
139
|
+
*
|
|
140
|
+
* Handles BOTH chart shapes:
|
|
141
|
+
* - FLAT (`reactMode: 'dynamic'`, default): `call-llm` is a parent-level stage; frames are
|
|
142
|
+
* bucketed over the run commit log by the `sf-injection-engine` loop heads.
|
|
143
|
+
* - GROUPED (`reactMode: 'dynamic-grouped'`): the LLM turn runs in an `sf-llm-call` subflow;
|
|
144
|
+
* each loop is projected PER-SCOPE over its own inner commit log (retained per-iteration by
|
|
145
|
+
* footprintjs subflow-commit-visibility). Such frames carry `subflowScope` and their array
|
|
146
|
+
* indices are inner-log-relative.
|
|
147
|
+
*
|
|
148
|
+
* Standing caveat on every result: contextSources show only sources re-committed to tracked
|
|
149
|
+
* state; context the model retained internally (carried in its own reasoning, never
|
|
150
|
+
* re-committed) leaves no read→write edge and is NOT represented.
|
|
151
|
+
*/
|
|
152
|
+
export declare function assembleTrajectory(artifacts: ContextBugArtifacts, opts?: AssembleTrajectoryOptions): Trajectory;
|
|
153
|
+
//# sourceMappingURL=trajectory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/trajectory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AAExE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAA2B,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAIjG,2FAA2F;AAC3F,MAAM,WAAW,aAAa;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,iGAAiG;IACjG,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,iFAAiF;IACjF,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,+FAA+F;IAC/F,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;CAClC;AAED,0FAA0F;AAC1F,MAAM,WAAW,SAAS;IACxB,8FAA8F;IAC9F,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,uFAAuF;IACvF,QAAQ,CAAC,eAAe,EAA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EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,SAAS,YAAY,EAAE,EAClC,mBAAmB,EAAE,SAAS,MAAM,EAAE,GACrC;IAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAoB/C;AAaD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,EAAE,CAS1E;AAID,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AA6ID;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,mBAAmB,EAC9B,IAAI,GAAE,yBAA8B,GACnC,UAAU,CAyBZ"}
|
|
@@ -134,6 +134,22 @@ export interface SimilarityStats {
|
|
|
134
134
|
/** Population standard deviation across the N seeded reruns. */
|
|
135
135
|
readonly stdev: number;
|
|
136
136
|
}
|
|
137
|
+
/** Min/median/max of a cost metric across a probe's seeded reruns. */
|
|
138
|
+
export interface CostRange {
|
|
139
|
+
readonly median: number;
|
|
140
|
+
readonly min: number;
|
|
141
|
+
readonly max: number;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Per-probe COST (loops/tokens) across its seeded reruns — the second readout
|
|
145
|
+
* (proposal 004). Present on `AblationRunStats` ONLY when the runner reported
|
|
146
|
+
* `RunCost`. Absent otherwise (quality-only, byte-identical to before).
|
|
147
|
+
*/
|
|
148
|
+
export interface CostStats {
|
|
149
|
+
readonly samples: number;
|
|
150
|
+
readonly loops?: CostRange;
|
|
151
|
+
readonly tokens?: CostRange;
|
|
152
|
+
}
|
|
137
153
|
/** Evidence from N seeded ablation reruns of one probe. */
|
|
138
154
|
export interface AblationRunStats {
|
|
139
155
|
/** Seeded reruns performed (the consumer's runner was called N times). */
|
|
@@ -142,6 +158,9 @@ export interface AblationRunStats {
|
|
|
142
158
|
readonly flips: number;
|
|
143
159
|
/** Embedding similarity of each ablated output to the original. */
|
|
144
160
|
readonly similarity: SimilarityStats;
|
|
161
|
+
/** COST readout across the same reruns — present only when the runner
|
|
162
|
+
* reported `RunCost` (proposal 004). */
|
|
163
|
+
readonly cost?: CostStats;
|
|
145
164
|
}
|
|
146
165
|
export type AblationVerdictKind = 'confirmed' | 'not-confirmed' | 'inconclusive';
|
|
147
166
|
/**
|
|
@@ -222,7 +241,35 @@ export interface Suspect {
|
|
|
222
241
|
readonly verdict?: AblationVerdict;
|
|
223
242
|
/** The rerun evidence behind `verdict`. */
|
|
224
243
|
readonly runs?: AblationRunStats;
|
|
244
|
+
/** The COST readout (proposal 004) — present only when the runner reported
|
|
245
|
+
* `RunCost`. A WEAKER tier than `verdict`: it shows removal reduced cost
|
|
246
|
+
* beyond a placebo band, NOT that the work was "wasted". */
|
|
247
|
+
readonly cost?: CostVerdict;
|
|
225
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* The COST verdict for a suspect — a context bug's second cost (proposal 004).
|
|
251
|
+
* A WEAKER, gated tier than the flip `verdict`: it shows removing the suspect
|
|
252
|
+
* REDUCED cost (loops/tokens) beyond a length-matched placebo band with a stable
|
|
253
|
+
* sign — **necessity for the cost, NOT proof the work was "wasted".**
|
|
254
|
+
*/
|
|
255
|
+
export interface CostVerdict {
|
|
256
|
+
/** Removing the suspect reduced cost beyond the placebo band, stably. */
|
|
257
|
+
readonly reducedCostOnRemoval: boolean;
|
|
258
|
+
/** Loops saved by removal (baseline median − suspect median). */
|
|
259
|
+
readonly loopsSaved: number;
|
|
260
|
+
/** Tokens saved by removal. */
|
|
261
|
+
readonly tokensSaved: number;
|
|
262
|
+
/** Sign stable across seeds AND a placebo band existed to clear. When false,
|
|
263
|
+
* `reducedCostOnRemoval` is not trustworthy (treat as no cost evidence). */
|
|
264
|
+
readonly stable: boolean;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* The 2×2 class a suspect falls in, derived by `classifySuspect` from its flip
|
|
268
|
+
* `verdict` (quality) and its `cost` verdict. The no-bug cell is
|
|
269
|
+
* `'no-detected-effect'` — never "innocent": a piece can matter in ways neither
|
|
270
|
+
* axis sees (overdetermination, same-loops-different-path).
|
|
271
|
+
*/
|
|
272
|
+
export type SuspectClass = 'content-bug' | 'cost-cause' | 'both' | 'no-detected-effect';
|
|
226
273
|
/**
|
|
227
274
|
* What to remove for one counterfactual rerun. The library BUILDS specs
|
|
228
275
|
* (one per suspect kind) and provides `applyAblations` to apply them to
|
|
@@ -278,9 +325,29 @@ export type AblationSpec =
|
|
|
278
325
|
* - Build a FRESH agent/provider per call — scripted mock providers are
|
|
279
326
|
* stateful (replies consume in order).
|
|
280
327
|
*/
|
|
328
|
+
/**
|
|
329
|
+
* The COST of one re-run — the second readout the two-score localizer reads
|
|
330
|
+
* from the SAME ablation (proposal 004). Both optional; cost scoring is opt-in
|
|
331
|
+
* by a runner that reports them. `loops` = agent loop iterations the run took;
|
|
332
|
+
* `tokens` = total tokens it consumed.
|
|
333
|
+
*/
|
|
334
|
+
export interface RunCost {
|
|
335
|
+
readonly loops?: number;
|
|
336
|
+
readonly tokens?: number;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Consumer-supplied counterfactual runner (above). Returns the run's output
|
|
340
|
+
* text — OR, to ALSO unlock the cost score (proposal 004), `{ output, cost }`
|
|
341
|
+
* from the SAME re-run (one ablation, two readouts). Backward-compatible:
|
|
342
|
+
* `runAblationProbe` normalizes both shapes, so a bare-string runner keeps
|
|
343
|
+
* quality-only behavior unchanged.
|
|
344
|
+
*/
|
|
281
345
|
export type AblationRunner = (specs: readonly AblationSpec[], run: {
|
|
282
346
|
readonly seed: number;
|
|
283
|
-
}) => Promise<string
|
|
347
|
+
}) => Promise<string | {
|
|
348
|
+
readonly output: string;
|
|
349
|
+
readonly cost?: RunCost;
|
|
350
|
+
}>;
|
|
284
351
|
/**
|
|
285
352
|
* Did the ablated output mean something DIFFERENT from the original?
|
|
286
353
|
* Default: embedding similarity below `flipThreshold`. Override with a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/context-bisect/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAI7E;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;CACpD;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,IAAI;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,SAAS,CAAC;CAClG;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,iB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