margin-meter 0.2.0 → 0.4.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/providers.js CHANGED
@@ -81,6 +81,30 @@ function asInt(value) {
81
81
  return 0;
82
82
  return n;
83
83
  }
84
+ /** First element of an array-shaped value, else undefined (duck-typed). OpenAI and
85
+ * Gemini nest their stop/finish reason under the first choice / candidate. */
86
+ function first(seq) {
87
+ if (Array.isArray(seq))
88
+ return seq.length > 0 ? seq[0] : undefined;
89
+ return undefined;
90
+ }
91
+ /** A provider's stop/finish reason as a clean string, or undefined (MAR-209).
92
+ * Read VERBATIM — never mapped, normalised, or inferred into a billing verdict.
93
+ * A missing, blank, or non-scalar value is undefined (UNKNOWN, first-class),
94
+ * never defaulted to a plausible value like "stop". A provider that reports an
95
+ * enum stringifies here; the value is stored, never interpreted. */
96
+ /** A non-empty string host name as sent (the capture layer slugs it), else undefined. */
97
+ function asHost(value) {
98
+ return typeof value === "string" && value.trim() !== "" ? value.trim() : undefined;
99
+ }
100
+ function asReason(value) {
101
+ if (value === null || value === undefined)
102
+ return undefined;
103
+ if (typeof value === "object")
104
+ return undefined;
105
+ const s = String(value).trim();
106
+ return s.length > 0 ? s : undefined;
107
+ }
84
108
  /** The Gemini `generateContent` result nests usage under `.response`; unwrap it. */
85
109
  function usageMetadata(response) {
86
110
  const direct = get(response, "usageMetadata");
@@ -121,6 +145,61 @@ export function detectProvider(response) {
121
145
  }
122
146
  return undefined;
123
147
  }
148
+ // OpenRouter ROUTER slugs pick a different model per call, so the requested name has no
149
+ // single rate and would price at the server's $1/$3 fallback (MAR-1309). The response's
150
+ // own `model` is the one that served — and billed — the call.
151
+ const OPENROUTER_ROUTERS = new Set(["auto", "auto-beta", "pareto-code"]);
152
+ // FAN-OUT slugs run N panel calls plus an analyst call: no single served model prices
153
+ // them, and the analyst's name would under-state the bill several-fold. They keep their
154
+ // slug and carry OpenRouter's billed `usage.cost` instead.
155
+ const OPENROUTER_FANOUT = new Set(["fusion", "fusion-flash"]);
156
+ /** The route under `openrouter/` (however many prefixes were stacked), else undefined. */
157
+ function openrouterRoute(model) {
158
+ if (!model)
159
+ return undefined;
160
+ let rest = model.trim().toLowerCase();
161
+ if (!rest.startsWith("openrouter/"))
162
+ return undefined;
163
+ while (rest.startsWith("openrouter/"))
164
+ rest = rest.slice("openrouter/".length);
165
+ return rest;
166
+ }
167
+ /** True for `openrouter/fusion` and its siblings (many billed calls per request). */
168
+ export function isFanoutSlug(model) {
169
+ const route = openrouterRoute(model);
170
+ return route !== undefined && OPENROUTER_FANOUT.has(route);
171
+ }
172
+ /** The caller's model, unless it names a router and the response says what served it. */
173
+ function billedModel(requested, response) {
174
+ const served = get(response, "model");
175
+ const route = openrouterRoute(requested);
176
+ if (route !== undefined && OPENROUTER_ROUTERS.has(route) && typeof served === "string" && served.trim()) {
177
+ return served.trim();
178
+ }
179
+ return requested ?? served;
180
+ }
181
+ /** OpenRouter's billed `usage.cost` for a fan-out slug; undefined when absent or not a sane number. */
182
+ function fanoutBilledCost(requested, usage) {
183
+ if (!isFanoutSlug(requested))
184
+ return undefined;
185
+ const cost = saneCost(get(usage, "cost"));
186
+ if (cost === undefined)
187
+ return undefined;
188
+ // BRING-YOUR-OWN-KEY: `usage.cost` is then only OpenRouter's charge and the provider's
189
+ // bill is `cost_details.upstream_inference_cost` (0/absent otherwise). The spend is the
190
+ // sum; a present but garbled upstream figure makes the cost unknown, never half-counted.
191
+ const upstreamRaw = getPath(usage, "cost_details", "upstream_inference_cost");
192
+ if (upstreamRaw === undefined || upstreamRaw === null)
193
+ return cost;
194
+ const upstream = saneCost(upstreamRaw);
195
+ return upstream === undefined ? undefined : cost + upstream;
196
+ }
197
+ /** A finite, non-negative dollar figure, else undefined (never a guessed number). */
198
+ function saneCost(value) {
199
+ if (typeof value !== "number" || !Number.isFinite(value) || value < 0)
200
+ return undefined;
201
+ return value;
202
+ }
124
203
  function extractOpenAI(response, model) {
125
204
  const usage = get(response, "usage");
126
205
  if (usage === undefined || usage === null) {
@@ -150,12 +229,17 @@ function extractOpenAI(response, model) {
150
229
  const reasoning = asInt(getPath(usage, "completion_tokens_details", "reasoning_tokens"));
151
230
  return {
152
231
  provider: OPENAI,
153
- model: model ?? get(response, "model"),
232
+ model: billedModel(model, response),
154
233
  inputTokens: freshInput > 0 ? freshInput : 0,
155
234
  outputTokens: out,
156
235
  cacheReadTokens: cached,
157
236
  cacheCreationTokens: 0,
158
237
  reasoningTokens: Math.min(reasoning, out),
238
+ // finish_reason nests under the first choice ("stop"/"length"/"content_filter"/
239
+ // "tool_calls"). Absent on a streaming final chunk whose choices is empty → undefined.
240
+ stopReason: asReason(get(first(get(response, "choices")), "finish_reason")),
241
+ billedCostUsd: fanoutBilledCost(model, usage),
242
+ servingHost: asHost(get(response, "provider")),
159
243
  };
160
244
  }
161
245
  function extractAnthropic(response, model) {
@@ -183,6 +267,10 @@ function extractAnthropic(response, model) {
183
267
  // Never let a malformed breakdown push the 5-minute remainder negative.
184
268
  cacheCreationTokens: creation5m > 0 ? creation5m : 0,
185
269
  cacheCreation1hTokens: creation1h,
270
+ // Non-streaming carries stop_reason top-level; a STREAMING message_delta carries
271
+ // it under delta.stop_reason — read both so a streamed Fable fallback (MAR-209)
272
+ // is captured either way.
273
+ stopReason: asReason(get(response, "stop_reason") ?? getPath(response, "delta", "stop_reason")),
186
274
  };
187
275
  }
188
276
  function extractGemini(response, model) {
@@ -213,6 +301,11 @@ function extractGemini(response, model) {
213
301
  // thoughts already sit inside outputTokens (billed at the output rate);
214
302
  // carried here only for the reasoning-share detector, never above output.
215
303
  reasoningTokens: Math.min(thoughts, outputTokens),
304
+ // finishReason nests under the first candidate ("STOP"/"MAX_TOKENS"/"SAFETY"/
305
+ // "RECITATION") and may be an enum — stringified verbatim, never interpreted. The
306
+ // generateContent result nests candidates under `.response` (like usageMetadata),
307
+ // so read both; the JS SDK spells the field camelCase.
308
+ stopReason: asReason(get(first(get(response, "candidates") ?? getPath(response, "response", "candidates")), "finishReason")),
216
309
  };
217
310
  }
218
311
  function extractCohere(response, model) {
@@ -236,6 +329,8 @@ function extractCohere(response, model) {
236
329
  outputTokens: asInt(get(units, "output_tokens")),
237
330
  cacheReadTokens: 0,
238
331
  cacheCreationTokens: 0,
332
+ // Cohere v2 reports finish_reason top-level ("COMPLETE"/"MAX_TOKENS"/"ERROR").
333
+ stopReason: asReason(get(response, "finish_reason")),
239
334
  };
240
335
  }
241
336
  function extractBedrock(response, model) {
@@ -257,6 +352,9 @@ function extractBedrock(response, model) {
257
352
  outputTokens: asInt(get(usage, "outputTokens")),
258
353
  cacheReadTokens: asInt(get(usage, "cacheReadInputTokens")),
259
354
  cacheCreationTokens: asInt(get(usage, "cacheWriteInputTokens")),
355
+ // Converse reports stopReason ("end_turn"/"max_tokens"/"content_filtered"/
356
+ // "guardrail_intervened").
357
+ stopReason: asReason(get(response, "stopReason")),
260
358
  };
261
359
  }
262
360
  const EXTRACTORS = {
@@ -333,7 +431,85 @@ export function usageFromStreamChunk(chunk, provider, model) {
333
431
  /* not a readable message_start either */
334
432
  }
335
433
  }
336
- return undefined;
434
+ return usageFromBedrockStreamEvent(chunk, model);
435
+ }
436
+ /**
437
+ * The usage a Bedrock STREAMING event carries, or `undefined` (MAR-1518).
438
+ *
439
+ * Both streaming calls put the counts one level below where `extractBedrock` looks:
440
+ * `converseStream`'s terminal `metadata` event nests the Converse usage block, and
441
+ * `invokeModelWithResponseStream`'s terminal `chunk.bytes` decodes to JSON carrying
442
+ * `amazon-bedrock-invocationMetrics` (no cache breakdown, so those buckets read 0).
443
+ * Ported from the Python SDK's `_usage_from_bedrock_stream_event`.
444
+ */
445
+ function usageFromBedrockStreamEvent(event, model) {
446
+ const meta = get(event, "metadata");
447
+ if (meta !== undefined && meta !== null && get(meta, "usage") !== undefined) {
448
+ try {
449
+ return extractBedrock(meta, model);
450
+ }
451
+ catch {
452
+ return undefined;
453
+ }
454
+ }
455
+ const raw = getPath(event, "chunk", "bytes");
456
+ if (raw === undefined || raw === null)
457
+ return undefined;
458
+ try {
459
+ const text = typeof raw === "string" ? raw : new TextDecoder().decode(raw);
460
+ return bedrockInvokePayloadUsage(JSON.parse(text), model);
461
+ }
462
+ catch {
463
+ return undefined;
464
+ }
465
+ }
466
+ /**
467
+ * The usage a decoded `invokeModelWithResponseStream` payload carries, or `undefined`
468
+ * (MAR-1535 #1).
469
+ *
470
+ * The payload carries `amazon-bedrock-invocationMetrics` (`inputTokenCount`/`outputTokenCount`).
471
+ * For an Anthropic model it ALSO wraps the Messages event the model streamed — `message_start`
472
+ * nests the input and CACHE counts under `message.usage`, and `message_delta` puts the final
473
+ * output tokens at the top level. Reading only the metrics block metered a cache-heavy call as
474
+ * `0` cache tokens, understating its cost; this reads both and max-merges them, and takes the
475
+ * cache buckets from the metrics block too when AWS reports them (`cacheReadInputTokenCount` /
476
+ * `cacheWriteInputTokenCount`).
477
+ */
478
+ function bedrockInvokePayloadUsage(payload, model) {
479
+ let got;
480
+ const metrics = get(payload, "amazon-bedrock-invocationMetrics");
481
+ if (metrics !== undefined && metrics !== null) {
482
+ const inp = get(metrics, "inputTokenCount");
483
+ const out = get(metrics, "outputTokenCount");
484
+ const cr = get(metrics, "cacheReadInputTokenCount");
485
+ const cw = get(metrics, "cacheWriteInputTokenCount");
486
+ if (inp !== undefined || out !== undefined || cr !== undefined || cw !== undefined) {
487
+ got = {
488
+ provider: BEDROCK,
489
+ model,
490
+ inputTokens: asInt(inp),
491
+ outputTokens: asInt(out),
492
+ cacheReadTokens: asInt(cr),
493
+ cacheCreationTokens: asInt(cw),
494
+ };
495
+ }
496
+ }
497
+ const message = get(payload, "message");
498
+ const nested = message !== undefined && message !== null && get(message, "usage") !== undefined;
499
+ const evt = nested ? message : get(payload, "usage") !== undefined ? payload : undefined;
500
+ if (evt !== undefined) {
501
+ let anthropic;
502
+ try {
503
+ anthropic = extractUsage(evt, { provider: ANTHROPIC, model });
504
+ }
505
+ catch {
506
+ anthropic = undefined;
507
+ }
508
+ if (anthropic !== undefined) {
509
+ got = got === undefined ? anthropic : mergeStreamUsage(got, anthropic);
510
+ }
511
+ }
512
+ return got;
337
513
  }
338
514
  /**
339
515
  * Merge two per-chunk usages, taking the MAX of each token bucket.
@@ -354,8 +530,47 @@ export function mergeStreamUsage(a, b) {
354
530
  cacheCreationTokens: Math.max(a.cacheCreationTokens, b.cacheCreationTokens),
355
531
  cacheCreation1hTokens: Math.max(a.cacheCreation1hTokens ?? 0, b.cacheCreation1hTokens ?? 0),
356
532
  reasoningTokens: Math.max(a.reasoningTokens ?? 0, b.reasoningTokens ?? 0),
533
+ // Only a usage-bearing chunk reaches this merge, so it sees only a reason that rode
534
+ // WITH usage (Anthropic's message_delta, Gemini's final chunk, a seller that puts
535
+ // finish_reason on its usage chunk). A reason on a usage-less chunk (OpenAI's finish
536
+ // chunk, Bedrock's messageStop) is read by StreamUsageAccumulator instead (MAR-1516).
537
+ stopReason: a.stopReason ?? b.stopReason,
538
+ // A fan-out stream's billed cost rides its final usage chunk (MAR-1309).
539
+ billedCostUsd: a.billedCostUsd ?? b.billedCostUsd,
540
+ servingHost: a.servingHost ?? b.servingHost,
357
541
  };
358
542
  }
543
+ /**
544
+ * The stop reason one stream chunk carries, if any. Never throws.
545
+ *
546
+ * A stream rarely puts the reason and the usage on the same chunk (MAR-1516). OpenAI's
547
+ * finish chunk has no `usage` and the usage chunk after it has empty `choices`; Bedrock
548
+ * `converseStream` sends `stopReason` in `messageStop` and usage in a separate
549
+ * `metadata` event. A reader that only looks at usage-bearing chunks records every
550
+ * streamed call with no reason, so this reads it from whichever chunk holds it.
551
+ */
552
+ export function streamChunkStopReason(chunk) {
553
+ try {
554
+ let reason = get(first(get(chunk, "choices")), "finish_reason") ?? // OpenAI
555
+ getPath(chunk, "delta", "stop_reason") ?? // Anthropic message_delta
556
+ getPath(chunk, "messageStop", "stopReason"); // Bedrock converseStream
557
+ if (reason === undefined || reason === null) {
558
+ const raw = getPath(chunk, "chunk", "bytes"); // Bedrock invoke stream
559
+ if (raw !== undefined && raw !== null) {
560
+ const text = typeof raw === "string" ? raw : new TextDecoder().decode(raw);
561
+ const payload = JSON.parse(text);
562
+ reason =
563
+ getPath(payload, "delta", "stop_reason") ??
564
+ get(payload, "stop_reason") ??
565
+ get(payload, "completionReason");
566
+ }
567
+ }
568
+ return asReason(reason);
569
+ }
570
+ catch {
571
+ return undefined;
572
+ }
573
+ }
359
574
  /**
360
575
  * Accumulates the metered usage of one STREAMING call across its chunks.
361
576
  *
@@ -370,6 +585,8 @@ export class StreamUsageAccumulator {
370
585
  provider;
371
586
  model;
372
587
  usage = undefined;
588
+ stopReason = undefined;
589
+ host = undefined;
373
590
  // Explicit assignment (not constructor parameter properties) so the source is
374
591
  // erasable TypeScript — `node --experimental-strip-types` runs it with no build.
375
592
  constructor(provider, model) {
@@ -378,6 +595,8 @@ export class StreamUsageAccumulator {
378
595
  }
379
596
  /** Fold one chunk's usage (if any) into the running total. Never throws. */
380
597
  observe(chunk) {
598
+ this.stopReason = streamChunkStopReason(chunk) ?? this.stopReason;
599
+ this.host = this.host ?? asHost(get(chunk, "provider"));
381
600
  let u;
382
601
  try {
383
602
  u = usageFromStreamChunk(chunk, this.provider, this.model);
@@ -391,7 +610,14 @@ export class StreamUsageAccumulator {
391
610
  }
392
611
  /** The accumulated usage, or `undefined` if the stream carried no usage. */
393
612
  finalize() {
394
- return this.usage;
613
+ if (this.usage === undefined)
614
+ return undefined;
615
+ // The usage-bearing chunk's own reason wins; otherwise the one another chunk carried.
616
+ return {
617
+ ...this.usage,
618
+ stopReason: this.usage.stopReason ?? this.stopReason,
619
+ servingHost: this.usage.servingHost ?? this.host,
620
+ };
395
621
  }
396
622
  }
397
623
  //# sourceMappingURL=providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"providers.js","sourceRoot":"","sources":["../src/providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,M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AgB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,4EAA4E;IAC5E,QAAQ;QACN,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAC/C,sFAAsF;QACtF,OAAO;YACL,GAAG,IAAI,CAAC,KAAK;YACb,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU;YACpD,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,IAAI;SACjD,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,232 @@
1
+ /**
2
+ * margin-meter/vitest — turn a vitest/jest JSON result file into outcomes.
3
+ *
4
+ * The TypeScript test-runner adapter, the analog of the Python
5
+ * `margin_meter.pytest_plugin`. A unit-test suite is already an eval harness:
6
+ * each test is a pass/fail verdict graded by code assertions against a
7
+ * known-correct expectation — a *ground-truth*, *code* grade, which is exactly
8
+ * the honest denominator Margin's outcome intake wants
9
+ * (`docs/INTEGRATION_LADDER.md` rung 2, and rung 6's grading provenance). So the
10
+ * whole of rung 2 — "their evals report pass/fail" — is available for the most
11
+ * common JS/TS grading path with no hand-written `POST`.
12
+ *
13
+ * ## One adapter, two frameworks
14
+ *
15
+ * This is a JSON-results CONSUMER, not a runtime reporter, because that reads a
16
+ * file the customer already produces and drags in no test-framework dependency —
17
+ * the same design as the promptfoo/braintrust/langsmith adapters. Both dominant
18
+ * JS test runners emit the SAME jest-compatible JSON, so one adapter covers
19
+ * both:
20
+ *
21
+ * vitest run --reporter=json --outputFile=results.json # vitest
22
+ * jest --json --outputFile=results.json # jest
23
+ *
24
+ * import { MarginMeter, vitest } from "margin-meter";
25
+ * const meter = new MarginMeter(); // MARGIN_INGEST_URL/KEY from env
26
+ * const data = JSON.parse(await readFile("results.json", "utf8"));
27
+ * await vitest.recordResults(meter, data, "my-test-suite");
28
+ *
29
+ * The mapping mirrors the pytest plugin's, on purpose — the SDKs must not drift:
30
+ *
31
+ * - `passed` ← the assertion `status`: `passed` → true, `failed` →
32
+ * false. Any other status (`skipped`/`todo`/`pending`/`disabled`) is NOT a
33
+ * verdict and is SKIPPED — recording a skip as a pass or a fail would
34
+ * fabricate an outcome the suite never produced.
35
+ * - `qualityScore` ← `1.0` / `0.0` (a binary ground-truth grade). Always
36
+ * supplied: the ingest layer discards `quality_method`/`grader_kind` on a
37
+ * scoreless outcome, so the score is what lights the grading provenance.
38
+ * - `qualityMethod`/`graderKind` ← `ground_truth`/`code`, ASSERTED, never
39
+ * inferred — a code assertion IS a ground-truth code grade, exactly as the
40
+ * pytest plugin asserts. (Unlike promptfoo/braintrust, which grade several
41
+ * ways and must derive the signature; a unit test is unambiguously code.)
42
+ * - `link` ← the assertion `fullName`, else its ancestor titles + its
43
+ * title, else the file name + row index — for traceability back to the exact
44
+ * test. Truncated to 512 (a lossy link beats a lost outcome).
45
+ * - a test FILE that crashed on load/collection (a failing file status with no
46
+ * per-test results) records no outcome — there is no honest count of the
47
+ * tests it would have produced — but it WARNS, so a fully broken run is not
48
+ * silently read as a clean one.
49
+ *
50
+ * ## The honest limit — rung 8 is not reachable here, and that is stated, not defaulted
51
+ *
52
+ * The jest/vitest JSON format carries no per-test value field, so a
53
+ * value-per-outcome numerator (rung 8) cannot ride this FILE path. Absent is
54
+ * the honest cost-per-outcome default — never coerced to `0`. The route to
55
+ * rung 8 from a test suite is the RUNTIME path (`@pytest.mark.margin_value` in
56
+ * Python), and it lives in this same module: {@link MarginVitestReporter} runs
57
+ * inside the suite and reads `task.meta.marginValue`. Use the file consumer
58
+ * when you already have a results file; use the reporter when you want value.
59
+ *
60
+ * Two design promises, same as the sibling adapters: it consumes the file the
61
+ * customer already produces (no new harness), and it is fail-safe — a delivery
62
+ * fault on one row warns and is counted, never aborting the batch.
63
+ */
64
+ import type { RecordOutcomeInput } from "./index.ts";
65
+ /** Where a warning goes. Defaults to `process.emitWarning` so a delivery
66
+ * problem is visible without crashing the host; a test injects a collector. */
67
+ export type WarnFn = (message: string) => void;
68
+ /** Map a jest/vitest assertion `status` to a pass/fail verdict, or `undefined`
69
+ * when the status is not a verdict at all (`skipped`/`todo`/`pending`/
70
+ * `disabled`/unknown). A skip is neither a pass nor a fail, so it is dropped
71
+ * rather than fabricated. */
72
+ export declare function verdictFromStatus(status: unknown): boolean | undefined;
73
+ /** A traceable link back to the exact test: the assertion's `fullName` if the
74
+ * runner wrote one, else its ancestor titles joined with its title, else the
75
+ * test file name plus the row index. */
76
+ export declare function linkFromAssertion(assertion: unknown, fileName: unknown, index: number): string;
77
+ /** One assertion result paired with the test file it came from (for the link
78
+ * fallback). {@link extractAssertions} produces these. */
79
+ export interface FlatAssertion {
80
+ assertion: Record<string, unknown>;
81
+ fileName?: string;
82
+ }
83
+ /** Flatten a parsed vitest/jest JSON output to a per-test list. The canonical
84
+ * shape is `{ testResults: [{ name, assertionResults: [...] }] }` (jest's
85
+ * `--json`, vitest's `--reporter=json`); a bare array is treated as an
86
+ * already-flattened list of assertion results, for convenience and testing. */
87
+ export declare function extractAssertions(data: unknown): FlatAssertion[];
88
+ /** Names of test files that failed with no per-test results — a suite that
89
+ * crashed on load/collection. These carry no recordable verdict (there is no
90
+ * honest count of tests a crashed suite "would have" produced), so they are NOT
91
+ * turned into outcomes; {@link recordResults} warns for each so a fully broken
92
+ * run is not silently read as a clean one — the whole point of an honest
93
+ * denominator. */
94
+ export declare function failedEmptySuites(data: unknown): string[];
95
+ /** Fields for {@link outcomeInput}. */
96
+ export interface OutcomeInputArgs {
97
+ workflowId: string;
98
+ passed: boolean;
99
+ link: string;
100
+ isSimulated?: boolean;
101
+ /** Opt-in business value (rung 8). Reachable only from the runtime reporter
102
+ * (`task.meta.marginValue`); the file-consumer path never supplies it, since
103
+ * the jest/vitest JSON carries no value field. Absent stays absent. */
104
+ valueUsd?: number;
105
+ }
106
+ /** Translate one code-graded test verdict into `MarginMeter.recordOutcome`
107
+ * input. The grader signature is asserted (`ground_truth`/`code`) because a
108
+ * unit test is unambiguously a code grade. `valueUsd` rides only when supplied
109
+ * (never defaulted to 0). */
110
+ export declare function outcomeInput(args: OutcomeInputArgs): RecordOutcomeInput;
111
+ /** Options shared by the assertion-level translators. */
112
+ export interface TranslateOptions {
113
+ workflowId: string;
114
+ index?: number;
115
+ isSimulated?: boolean;
116
+ }
117
+ /** Full translation of one flattened assertion, or `undefined` if its status is
118
+ * not a real verdict (a skip/todo/pending is dropped, never fabricated). */
119
+ export declare function assertionToOutcomeInput(item: FlatAssertion, opts: TranslateOptions): RecordOutcomeInput | undefined;
120
+ /** Yield `recordOutcome` inputs for every real verdict in a parsed vitest/jest
121
+ * output (any envelope shape {@link extractAssertions} understands). */
122
+ export declare function iterOutcomes(data: unknown, opts: {
123
+ workflowId: string;
124
+ isSimulated?: boolean;
125
+ }): RecordOutcomeInput[];
126
+ /** The minimal meter surface {@link recordResults} needs — satisfied by
127
+ * `MarginMeter`, kept as a structural type so this module imports no runtime
128
+ * value from `index.ts`. */
129
+ export interface OutcomeSink {
130
+ recordOutcome(input: RecordOutcomeInput): Promise<unknown>;
131
+ flush(): Promise<void>;
132
+ }
133
+ /** How one `recordResults` batch landed. */
134
+ export interface RecordSummary {
135
+ recorded: number;
136
+ errors: number;
137
+ skipped: number;
138
+ }
139
+ /** Emit an outcome per verdict in a parsed vitest/jest output through `meter`.
140
+ * Fail-safe: a delivery fault on one row warns and counts an error; it never
141
+ * aborts the batch. Non-verdict rows (skips/todos/pending) are counted as
142
+ * skipped. */
143
+ export declare function recordResults(meter: OutcomeSink, data: unknown, workflowId: string, opts?: {
144
+ isSimulated?: boolean;
145
+ onWarn?: WarnFn;
146
+ }): Promise<RecordSummary>;
147
+ /** Read an opt-in `marginValue` off a task's `meta` — the value-per-outcome
148
+ * numerator (rung 8). Returns the USD amount, or `undefined` when the key is
149
+ * absent (the normal cost-per-outcome case). Throws on a malformed value
150
+ * (including an explicit `null`, i.e. present-but-malformed) so the caller can
151
+ * warn and drop it while keeping the pass/fail.
152
+ *
153
+ * An explicit `undefined` (`meta.marginValue = undefined`) is treated as absent
154
+ * — setting a meta key to `undefined` is not a value a customer meant to
155
+ * supply. This is the one intentional divergence from the file-adapters'
156
+ * `valueFrom*`, and it only ever drops-silently rather than fabricating. */
157
+ export declare function valueFromTaskMeta(meta: unknown): number | undefined;
158
+ /** A minimal structural view of a vitest task — duck-typed against vitest's
159
+ * documented reporter task tree so this module imports NOTHING from vitest and
160
+ * is not pinned to one of its versions. A suite carries child `tasks`; a test
161
+ * carries a `result.state`. */
162
+ export interface VitestTask {
163
+ type?: string;
164
+ name?: string;
165
+ result?: {
166
+ state?: string;
167
+ };
168
+ meta?: Record<string, unknown>;
169
+ tasks?: unknown[];
170
+ }
171
+ /** Map a vitest task result state to a pass/fail verdict, or `undefined` when it
172
+ * is not a verdict (`skip`/`todo`/`queued`/absent — a skipped or not-yet-run
173
+ * test is neither a pass nor a fail, so it is dropped, never fabricated). */
174
+ export declare function verdictFromState(state: unknown): boolean | undefined;
175
+ /** One leaf test found in the task tree, with the suite path that leads to it. */
176
+ export interface WalkedTest {
177
+ task: Record<string, unknown>;
178
+ path: string[];
179
+ }
180
+ /** Depth-first walk of a vitest task tree, yielding every LEAF test together
181
+ * with its ancestor suite names. A node is a CONTAINER (a suite, or a file
182
+ * whose `tasks` are its top-level tests) exactly when it has a `tasks` array —
183
+ * regardless of whether that array is empty — and is recursed into, never
184
+ * recorded. Everything else is a leaf test.
185
+ *
186
+ * ⛔ The container test is the PRESENCE of `tasks`, not its length. vitest emits
187
+ * a file that CRASHED on collection as a suite node with `tasks: []` AND
188
+ * `result.state: "fail"`; a length check would misread that as a failed leaf
189
+ * test and fabricate a `passed:false` code-graded outcome for a file that ran
190
+ * zero tests — the exact over-claim the file-consumer path refuses. A real test
191
+ * never carries a `tasks` property, so this classification keeps every genuine
192
+ * verdict while dropping the crashed/empty suite. */
193
+ export declare function walkTasks(nodes: unknown, ancestors?: string[]): WalkedTest[];
194
+ /** Yield `recordOutcome` inputs for every real verdict in a vitest `files` tree
195
+ * (the argument vitest passes a reporter's `onFinished`). A test's value rides
196
+ * from `task.meta.marginValue`; a malformed value warns and drops the value,
197
+ * keeping the pass/fail. */
198
+ export declare function iterTaskOutcomes(files: unknown, opts: {
199
+ workflowId: string;
200
+ isSimulated?: boolean;
201
+ onWarn?: WarnFn;
202
+ }): RecordOutcomeInput[];
203
+ /** Options for {@link MarginVitestReporter}. */
204
+ export interface MarginVitestReporterOptions {
205
+ /** The workflow every test in this suite is recorded under. Falls back to
206
+ * `MARGIN_VITEST_WORKFLOW` in the environment; with neither, the reporter is
207
+ * a no-op (and warns once) — installing it never silently records to nowhere. */
208
+ workflowId?: string;
209
+ /** The sink outcomes are emitted through. Injected in tests; in production it
210
+ * is left undefined and a real `MarginMeter` (reading `MARGIN_INGEST_URL`/
211
+ * `MARGIN_INGEST_KEY` from the env) is lazily constructed on first finish. */
212
+ meter?: OutcomeSink;
213
+ isSimulated?: boolean;
214
+ onWarn?: WarnFn;
215
+ }
216
+ /** A vitest reporter that records every test as a code-graded outcome and reads
217
+ * an opt-in per-test value off `task.meta.marginValue` (rung 8). It implements
218
+ * only the `onFinished(files)` hook — the one vitest calls with the completed
219
+ * task tree — and is fail-safe: a delivery or config fault warns, and NOTHING
220
+ * it does throws into the test run. */
221
+ export declare class MarginVitestReporter {
222
+ private readonly opts;
223
+ /** The last batch's summary — handy for a customer's own assertions and for
224
+ * the hermetic tests. */
225
+ summary: RecordSummary;
226
+ constructor(opts?: MarginVitestReporterOptions);
227
+ private resolveWorkflow;
228
+ private resolveMeter;
229
+ /** vitest's end-of-run hook. `files` is the completed task tree. */
230
+ onFinished(files?: unknown): Promise<void>;
231
+ }
232
+ //# sourceMappingURL=vitest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../src/vitest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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