@agenticprimitives/evaluation 0.0.0-alpha.3 → 0.0.0-alpha.5

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.
Files changed (74) hide show
  1. package/README.md +2 -0
  2. package/dist/act.d.ts +97 -0
  3. package/dist/act.d.ts.map +1 -0
  4. package/dist/act.js +115 -0
  5. package/dist/act.js.map +1 -0
  6. package/dist/canonical.d.ts +2 -0
  7. package/dist/canonical.d.ts.map +1 -0
  8. package/dist/canonical.js +4 -0
  9. package/dist/canonical.js.map +1 -0
  10. package/dist/capture.d.ts +90 -0
  11. package/dist/capture.d.ts.map +1 -0
  12. package/dist/capture.js +195 -0
  13. package/dist/capture.js.map +1 -0
  14. package/dist/compare-runner.d.ts +204 -0
  15. package/dist/compare-runner.d.ts.map +1 -0
  16. package/dist/compare-runner.js +313 -0
  17. package/dist/compare-runner.js.map +1 -0
  18. package/dist/conformal.d.ts +113 -0
  19. package/dist/conformal.d.ts.map +1 -0
  20. package/dist/conformal.js +113 -0
  21. package/dist/conformal.js.map +1 -0
  22. package/dist/eval-file.d.ts +104 -0
  23. package/dist/eval-file.d.ts.map +1 -0
  24. package/dist/eval-file.js +92 -0
  25. package/dist/eval-file.js.map +1 -0
  26. package/dist/experiment.d.ts +218 -0
  27. package/dist/experiment.d.ts.map +1 -0
  28. package/dist/experiment.js +196 -0
  29. package/dist/experiment.js.map +1 -0
  30. package/dist/index.d.ts +28 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +26 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/ledger.d.ts +128 -0
  35. package/dist/ledger.d.ts.map +1 -0
  36. package/dist/ledger.js +146 -0
  37. package/dist/ledger.js.map +1 -0
  38. package/dist/live-gates.d.ts +3 -0
  39. package/dist/live-gates.d.ts.map +1 -1
  40. package/dist/live-gates.js +3 -1
  41. package/dist/live-gates.js.map +1 -1
  42. package/dist/measure.d.ts +63 -0
  43. package/dist/measure.d.ts.map +1 -0
  44. package/dist/measure.js +95 -0
  45. package/dist/measure.js.map +1 -0
  46. package/dist/replay.d.ts +50 -0
  47. package/dist/replay.d.ts.map +1 -0
  48. package/dist/replay.js +61 -0
  49. package/dist/replay.js.map +1 -0
  50. package/dist/report.d.ts +189 -0
  51. package/dist/report.d.ts.map +1 -0
  52. package/dist/report.js +282 -0
  53. package/dist/report.js.map +1 -0
  54. package/dist/rollup.d.ts +64 -0
  55. package/dist/rollup.d.ts.map +1 -0
  56. package/dist/rollup.js +53 -0
  57. package/dist/rollup.js.map +1 -0
  58. package/dist/selection-gates.d.ts +283 -0
  59. package/dist/selection-gates.d.ts.map +1 -0
  60. package/dist/selection-gates.js +331 -0
  61. package/dist/selection-gates.js.map +1 -0
  62. package/dist/selection-score.d.ts +285 -0
  63. package/dist/selection-score.d.ts.map +1 -0
  64. package/dist/selection-score.js +392 -0
  65. package/dist/selection-score.js.map +1 -0
  66. package/dist/selection.d.ts +83 -0
  67. package/dist/selection.d.ts.map +1 -0
  68. package/dist/selection.js +86 -0
  69. package/dist/selection.js.map +1 -0
  70. package/dist/stats.d.ts +62 -0
  71. package/dist/stats.d.ts.map +1 -0
  72. package/dist/stats.js +279 -0
  73. package/dist/stats.js.map +1 -0
  74. package/package.json +16 -1
@@ -0,0 +1,64 @@
1
+ import type { MeasurementV1 } from './measure.js';
2
+ /** What one run contributes: where it slices, and its run-level measurements. Names and numbers only. */
3
+ export interface RunRollupFactsV1 {
4
+ runRef: string;
5
+ agent: string;
6
+ /** ISO — when the run ended (its UTC day is the slice). */
7
+ endedAt: string;
8
+ variantDigest?: string;
9
+ /** Canonical ids of the SKILL.md contracts that governed its steps (or its playbook's id when no step names one). */
10
+ skillContracts?: readonly string[];
11
+ /** Notations of the harness capabilities that engaged on it. */
12
+ capabilities?: readonly string[];
13
+ measurements: readonly MeasurementV1[];
14
+ }
15
+ export type RollupSliceV1 = {
16
+ kind: 'all';
17
+ } | {
18
+ kind: 'skill';
19
+ id: string;
20
+ } | {
21
+ kind: 'capability';
22
+ id: string;
23
+ };
24
+ export interface RollupRowV1 {
25
+ agent: string;
26
+ day: string;
27
+ variant: string;
28
+ slice: RollupSliceV1;
29
+ metric: string;
30
+ /** How many runs contributed, and the sum / min / max of their values. */
31
+ n: number;
32
+ sum: number;
33
+ min: number;
34
+ max: number;
35
+ }
36
+ export interface RollupQueryV1 {
37
+ agent?: string;
38
+ fromDay?: string;
39
+ toDay?: string;
40
+ variant?: string;
41
+ slice?: RollupSliceV1['kind'];
42
+ metric?: string;
43
+ }
44
+ /** The port. A binding may be a DO table, D1, KV or memory — the numbers are the fold's, whatever holds them. */
45
+ export interface RollupPort {
46
+ readonly binding: string;
47
+ add(facts: RunRollupFactsV1): Promise<void>;
48
+ rows(query?: RollupQueryV1): Promise<RollupRowV1[]>;
49
+ clear(): Promise<void>;
50
+ }
51
+ /** One run's contributions — a row per (slice × run-level metric). A run counted twice is still counted once: rows
52
+ * are keyed by run too, below, so re-adding a run replaces its contribution rather than doubling it. */
53
+ export declare function contributionsOf(f: RunRollupFactsV1): RollupRowV1[];
54
+ /** Fold contributions into rows. Pure; the result is sorted by key so equal inputs compare equal. */
55
+ export declare function foldRollup(contributions: Iterable<RollupRowV1>): RollupRowV1[];
56
+ /** The reference binding: in memory, keyed by run so re-adding a run is idempotent. */
57
+ export declare function memoryRollup(): RollupPort;
58
+ /** C6 — rebuild a rollup from the records and say whether it gives the numbers the live one holds. */
59
+ export declare function rollupRebuildsEqual(live: RollupPort, records: readonly RunRollupFactsV1[]): Promise<{
60
+ equal: boolean;
61
+ live: number;
62
+ rebuilt: number;
63
+ }>;
64
+ //# sourceMappingURL=rollup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,yGAAyG;AACzG,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EA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I,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACpD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAKD;yGACyG;AACzG,wBAAgB,eAAe,CAAC,CAAC,EAAE,gBAAgB,GAAG,WAAW,EAAE,CAUlE;AAED,qGAAqG;AACrG,wBAAgB,UAAU,CAAC,aAAa,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,WAAW,EAAE,CAS9E;AAMD,uFAAuF;AACvF,wBAAgB,YAAY,IAAI,UAAU,CAQzC;AAED,sGAAsG;AACtG,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAI5J"}
package/dist/rollup.js ADDED
@@ -0,0 +1,53 @@
1
+ const sliceKey = (s) => (s.kind === 'all' ? 'all' : `${s.kind}:${s.id}`);
2
+ const keyOf = (r) => [r.agent, r.day, r.variant, sliceKey(r.slice), r.metric].join('|');
3
+ /** One run's contributions — a row per (slice × run-level metric). A run counted twice is still counted once: rows
4
+ * are keyed by run too, below, so re-adding a run replaces its contribution rather than doubling it. */
5
+ export function contributionsOf(f) {
6
+ const day = f.endedAt.slice(0, 10);
7
+ const variant = f.variantDigest ?? 'unknown';
8
+ const slices = [{ kind: 'all' }, ...[...new Set(f.skillContracts ?? [])].sort().map((id) => ({ kind: 'skill', id })), ...[...new Set(f.capabilities ?? [])].sort().map((id) => ({ kind: 'capability', id }))];
9
+ const out = [];
10
+ for (const m of f.measurements) {
11
+ if (m.stepRef)
12
+ continue;
13
+ for (const slice of slices)
14
+ out.push({ agent: f.agent.toLowerCase(), day, variant, slice, metric: m.metric, n: 1, sum: m.value, min: m.value, max: m.value });
15
+ }
16
+ return out;
17
+ }
18
+ /** Fold contributions into rows. Pure; the result is sorted by key so equal inputs compare equal. */
19
+ export function foldRollup(contributions) {
20
+ const acc = new Map();
21
+ for (const c of contributions) {
22
+ const k = keyOf(c);
23
+ const r = acc.get(k);
24
+ if (!r)
25
+ acc.set(k, { ...c });
26
+ else {
27
+ r.n += c.n;
28
+ r.sum += c.sum;
29
+ r.min = Math.min(r.min, c.min);
30
+ r.max = Math.max(r.max, c.max);
31
+ }
32
+ }
33
+ return [...acc.entries()].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)).map(([, r]) => r);
34
+ }
35
+ const matches = (r, q = {}) => (!q.agent || r.agent === q.agent.toLowerCase()) && (!q.fromDay || r.day >= q.fromDay) && (!q.toDay || r.day <= q.toDay)
36
+ && (!q.variant || r.variant === q.variant) && (!q.slice || r.slice.kind === q.slice) && (!q.metric || r.metric === q.metric);
37
+ /** The reference binding: in memory, keyed by run so re-adding a run is idempotent. */
38
+ export function memoryRollup() {
39
+ const byRun = new Map();
40
+ return {
41
+ binding: 'memory',
42
+ async add(f) { byRun.set(`${f.agent.toLowerCase()}|${f.runRef}`, contributionsOf(f)); },
43
+ async rows(q) { return foldRollup([...byRun.values()].flat()).filter((r) => matches(r, q)); },
44
+ async clear() { byRun.clear(); },
45
+ };
46
+ }
47
+ /** C6 — rebuild a rollup from the records and say whether it gives the numbers the live one holds. */
48
+ export async function rollupRebuildsEqual(live, records) {
49
+ const rebuilt = foldRollup(records.flatMap(contributionsOf));
50
+ const now = await live.rows();
51
+ return { equal: JSON.stringify(now) === JSON.stringify(rebuilt), live: now.length, rebuilt: rebuilt.length };
52
+ }
53
+ //# sourceMappingURL=rollup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rollup.js","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAqDA,MAAM,QAAQ,GAAG,CAAC,CAAgB,EAAU,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,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AAC,IAAI,OAAO,UAAU,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7F,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACjC,CAAC;AACJ,CAAC;AAED,sGAAsG;AACtG,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,IAAgB,EAAE,OAAoC;IAC9F,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IAC9B,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;AAC/G,CAAC"}
@@ -0,0 +1,283 @@
1
+ import type { ExperimentRecordV1 } from './experiment.js';
2
+ import type { SelectionCriterionV1 } from './selection.js';
3
+ /** What the runner keeps from a run's `plannerTrace.selection` — ids, class IRIs and numbers; never words. */
4
+ export interface RunSelectionFactsV1 {
5
+ approach: string;
6
+ chose: string | null;
7
+ hold?: string;
8
+ /** Ontology arm (or the composed arm's narrowing): the grounded classes, the survivors, excluded skills, how reached. */
9
+ grounded?: string[];
10
+ survivors?: string[];
11
+ excluded?: string[];
12
+ via?: string;
13
+ /** spec 416 propose+judgment: the proposed skills (in proposal order) and how each was proposed. `excluded` holds the vetoed. */
14
+ proposed?: string[];
15
+ proposedVia?: Record<string, string>;
16
+ /** The proposal's parameters as recorded — re-derivation runs under the rule the run ran under. */
17
+ proposalParams?: Record<string, unknown>;
18
+ /** Judgment arm (or the composed arm's judge): the slate it was offered and its distribution (`none` included). */
19
+ offered?: string[];
20
+ distribution?: Record<string, number>;
21
+ /** Spec 417 — the outcome arm: the chain of skills in run order (the outcome's last), the consumed classes named
22
+ * missing, and P(the request supplies it) per consumed class. Any other arm's chain is its one choice. */
23
+ chain?: string[];
24
+ missing?: string[];
25
+ supplied?: Record<string, number>;
26
+ }
27
+ /** Reduce a planner trace's `selection` to the facts the gates need. */
28
+ export declare function runSelectionFactsOf(sel: unknown): RunSelectionFactsV1 | undefined;
29
+ /** Gold for an outcome request: the skills to run, in order ([] = none of them), and — optionally — the consumed classes
30
+ * the right plan names missing (to be asked for). */
31
+ export interface OutcomeGoldV1 {
32
+ plan: string[];
33
+ missing?: string[];
34
+ }
35
+ export interface OutcomePlanScoreV1 {
36
+ variant: string;
37
+ n: number;
38
+ /** The run's chain equals the gold plan, in order. */
39
+ exact: number;
40
+ /** Runs with a step the gold plan does not have (a needless step — context should have removed it). */
41
+ needless: number;
42
+ /** Runs missing a step the gold plan has (the chain stopped short). */
43
+ short: number;
44
+ /** Of the runs whose gold names missing classes: those whose plan named every one. */
45
+ asked: {
46
+ of: number;
47
+ right: number;
48
+ };
49
+ /** Where the gold plan is one step vs longer — whether the chain helps or hurts each. */
50
+ bySteps: Record<string, {
51
+ n: number;
52
+ exact: number;
53
+ }>;
54
+ /** Spec 418 — the STEPS SCORE (graphrag-eval style): mean of 1 − edit distance / max(len(gold), len(run)) over ok runs —
55
+ * partial credit for a chain one step off, 1 for exact, 0 for a wholly different plan; an empty gold scores 1 only for an empty run. */
56
+ stepsScore: number;
57
+ }
58
+ /** Levenshtein distance over skill ids. */
59
+ export declare function planEditDistance(a: readonly string[], b: readonly string[]): number;
60
+ export declare const stepsScoreOf: (run: readonly string[], gold: readonly string[]) => number;
61
+ /** Score each variant's chains against the gold plans. Failed runs count against `n` (never silently dropped). */
62
+ export declare function outcomePlanScoresOf(runs: ReadonlyArray<{
63
+ intentId: string;
64
+ variant: string;
65
+ status: string;
66
+ selection?: RunSelectionFactsV1;
67
+ }>, gold: Record<string, OutcomeGoldV1>): OutcomePlanScoreV1[];
68
+ /** Structurally orchestration's `decideFromGrounding`. */
69
+ export type DecideFromGrounding = (grounded: readonly string[], candidates: ReadonlyArray<{
70
+ id: string;
71
+ covers: ReadonlyArray<{
72
+ iri: string;
73
+ label: string;
74
+ }>;
75
+ excludes?: ReadonlyArray<{
76
+ iri: string;
77
+ label: string;
78
+ }>;
79
+ }>, lexicon?: ReadonlyArray<{
80
+ iri: string;
81
+ label: string;
82
+ terms: readonly string[];
83
+ clusters: readonly string[];
84
+ }>) => {
85
+ chose: string | null;
86
+ survivors: string[];
87
+ excluded: Record<string, string[]>;
88
+ via?: string;
89
+ };
90
+ /** Structurally orchestration's `proposeFromGrounding` (spec 416 W1). */
91
+ export type ProposeFromGrounding = (grounded: readonly string[], candidates: ReadonlyArray<{
92
+ id: string;
93
+ covers: ReadonlyArray<{
94
+ iri: string;
95
+ label: string;
96
+ }>;
97
+ excludes?: ReadonlyArray<{
98
+ iri: string;
99
+ label: string;
100
+ }>;
101
+ }>, lexicon?: ReadonlyArray<{
102
+ iri: string;
103
+ label: string;
104
+ terms: readonly string[];
105
+ clusters: readonly string[];
106
+ }>, params?: Record<string, unknown>) => {
107
+ candidates: string[];
108
+ via: Record<string, string>;
109
+ removed: Record<string, string[]>;
110
+ };
111
+ export interface RboxDisagreementV1 {
112
+ intentId: string;
113
+ variant: string;
114
+ repeat: number;
115
+ field: 'chose' | 'survivors' | 'excluded' | 'via' | 'proposed';
116
+ recorded: unknown;
117
+ derived: unknown;
118
+ }
119
+ export interface RboxReportV1 {
120
+ gate: 'rbox-agreement';
121
+ status: 'PASS' | 'FAIL' | 'INCOMPLETE';
122
+ checked: number;
123
+ agreed: number;
124
+ disagreements: RboxDisagreementV1[];
125
+ reason: string;
126
+ }
127
+ export declare function rboxAgreementOf(input: {
128
+ experiment: Pick<ExperimentRecordV1, 'runs'>;
129
+ /** The compiled playbook the runs ran under. */
130
+ definition: {
131
+ tools: ReadonlyArray<{
132
+ id: string;
133
+ execution?: string;
134
+ covers?: ReadonlyArray<{
135
+ iri: string;
136
+ label: string;
137
+ }>;
138
+ excludes?: ReadonlyArray<{
139
+ iri: string;
140
+ label: string;
141
+ }>;
142
+ }>;
143
+ domainLexicon?: ReadonlyArray<{
144
+ iri: string;
145
+ label: string;
146
+ terms: readonly string[];
147
+ clusters: readonly string[];
148
+ }>;
149
+ };
150
+ decide: DecideFromGrounding;
151
+ /** Re-derives a `propose+judgment` run's proposal; without it those runs are not checked (and not counted). */
152
+ propose?: ProposeFromGrounding;
153
+ }): RboxReportV1;
154
+ /** The abstaining outcomes of a selection judge: none of the skills, ask the person, needs several skills. */
155
+ export declare const ABSTENTION_OUTCOMES: readonly string[];
156
+ /** Map a judge's distribution onto canonical skill ids + `none`, summing the abstentions into `none`. */
157
+ export declare function foldAbstentions(dist: Record<string, number>, toolToSkill?: Record<string, string>): Record<string, number>;
158
+ export interface CalibrationBinV1 {
159
+ lo: number;
160
+ hi: number;
161
+ n: number;
162
+ confidence: number | null;
163
+ accuracy: number | null;
164
+ }
165
+ export interface CalibrationReportV1 {
166
+ gate: 'judgment-calibration';
167
+ status: 'PASS' | 'FAIL' | 'INCOMPLETE';
168
+ n: number;
169
+ accuracy: number | null;
170
+ meanConfidence: number | null;
171
+ brier: number | null;
172
+ ece: number | null;
173
+ bins: CalibrationBinV1[];
174
+ overconfident: Array<{
175
+ intentId: string;
176
+ variant: string;
177
+ predicted: string;
178
+ p: number;
179
+ gold: string;
180
+ }>;
181
+ thresholds: CalibrationThresholdsV1;
182
+ reason: string;
183
+ }
184
+ export interface CalibrationThresholdsV1 {
185
+ minRuns: number;
186
+ eceMax: number;
187
+ brierMax: number;
188
+ }
189
+ export declare const DEFAULT_CALIBRATION_THRESHOLDS: CalibrationThresholdsV1;
190
+ /** `toolToSkill` maps a distribution key (a tool id) to the canonical skill id the criterion names. */
191
+ export declare function judgmentCalibrationOf(input: {
192
+ experiment: Pick<ExperimentRecordV1, 'runs'>;
193
+ criterion: Pick<SelectionCriterionV1, 'cases'>;
194
+ toolToSkill: Record<string, string>;
195
+ thresholds?: Partial<CalibrationThresholdsV1>;
196
+ }): CalibrationReportV1;
197
+ export interface ConsistencyThresholdsV1 {
198
+ minGroups: number;
199
+ agreementMin: number;
200
+ spreadMax: number;
201
+ }
202
+ export declare const DEFAULT_CONSISTENCY_THRESHOLDS: ConsistencyThresholdsV1;
203
+ export interface ConsistencyReportV1 {
204
+ gate: 'judgment-consistency';
205
+ status: 'PASS' | 'FAIL' | 'INCOMPLETE';
206
+ groups: number;
207
+ agreement: number | null;
208
+ spread: number | null;
209
+ unstable: Array<{
210
+ intentId: string;
211
+ variant: string;
212
+ tops: string[];
213
+ }>;
214
+ thresholds: ConsistencyThresholdsV1;
215
+ reason: string;
216
+ }
217
+ export declare function judgmentConsistencyOf(input: {
218
+ experiment: Pick<ExperimentRecordV1, 'runs'>;
219
+ thresholds?: Partial<ConsistencyThresholdsV1>;
220
+ }): ConsistencyReportV1;
221
+ export interface CandidateRecallThresholdsV1 {
222
+ minRuns: number;
223
+ recallMin: number;
224
+ }
225
+ export declare const DEFAULT_CANDIDATE_RECALL_THRESHOLDS: CandidateRecallThresholdsV1;
226
+ export interface CandidateRecallReportV1 {
227
+ gate: 'candidate-recall';
228
+ status: 'PASS' | 'FAIL' | 'INCOMPLETE';
229
+ n: number;
230
+ recall: number | null;
231
+ meanProposed: number | null;
232
+ /** How the gold skill was proposed, when it was (direct · neighbourhood · catalog). */
233
+ byVia: Record<string, number>;
234
+ missed: Array<{
235
+ intentId: string;
236
+ variant: string;
237
+ gold: string;
238
+ }>;
239
+ thresholds: CandidateRecallThresholdsV1;
240
+ reason: string;
241
+ }
242
+ export declare function candidateRecallOf(input: {
243
+ experiment: Pick<ExperimentRecordV1, 'runs'>;
244
+ criterion: Pick<SelectionCriterionV1, 'cases'>;
245
+ toolToSkill: Record<string, string>;
246
+ thresholds?: Partial<CandidateRecallThresholdsV1>;
247
+ }): CandidateRecallReportV1;
248
+ export type BehaviourOutcomeV1 = 'asked' | 'planned' | 'crossed' | 'declined' | 'guessed';
249
+ export interface BehaviourThresholdsV1 {
250
+ minCases: number;
251
+ rightMin: number;
252
+ overAskMax: number;
253
+ }
254
+ export declare const DEFAULT_BEHAVIOUR_THRESHOLDS: BehaviourThresholdsV1;
255
+ export interface BehaviourReportV1 {
256
+ gate: 'selection-behaviour';
257
+ status: 'PASS' | 'FAIL' | 'INCOMPLETE';
258
+ n: number;
259
+ right: number | null;
260
+ counts: Record<BehaviourOutcomeV1, number>;
261
+ byBehaviour: Record<'clarify' | 'several', {
262
+ n: number;
263
+ right: number;
264
+ }>;
265
+ positives: number;
266
+ overAsked: number;
267
+ overAskRate: number | null;
268
+ wrong: Array<{
269
+ intentId: string;
270
+ variant: string;
271
+ behaviour: string;
272
+ outcome: BehaviourOutcomeV1;
273
+ chose: string | null;
274
+ }>;
275
+ thresholds: BehaviourThresholdsV1;
276
+ reason: string;
277
+ }
278
+ export declare function selectionBehaviourOf(input: {
279
+ experiment: Pick<ExperimentRecordV1, 'runs'>;
280
+ criterion: Pick<SelectionCriterionV1, 'cases'>;
281
+ thresholds?: Partial<BehaviourThresholdsV1>;
282
+ }): BehaviourReportV1;
283
+ //# sourceMappingURL=selection-gates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-gates.d.ts","sourceRoot":"","sources":["../src/selection-gates.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,8GAA8G;AAC9G,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yHAAyH;IACzH,QA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