@oneharness/sdk 0.10.1 → 0.10.3

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.
@@ -136,6 +136,26 @@ export type ExecutionTelemetry = {
136
136
  tool_ms: number;
137
137
  [k: string]: unknown;
138
138
  };
139
+ /**
140
+ * Whether a candidate's normalized result carries **evidence it did the task's
141
+ * work** — the first thing [`startup_failure_reason`] consults.
142
+ *
143
+ * Two independent witnesses, either of which is decisive:
144
+ *
145
+ * - **Tool events.** A recorded tool call is the harness acting on the task.
146
+ * - **Usage accounting.** [`Usage::reports_billed_work`][billed] — the same definition
147
+ * `signals::record_reports_work` classifies a raw harness record with, so the
148
+ * two readings of "billed" are one contract with one implementation.
149
+ *
150
+ * It is also a **published reading**, not only an internal one: a run that
151
+ * failed with nothing to classify carries it as [`RunResult::work`] and in its
152
+ * history record, because there the question "did this candidate do anything?"
153
+ * is the only one left. One type for both, so the value a reader sees is the
154
+ * same value the fall-through verdict consulted.
155
+ *
156
+ * [billed]: crate::domain::signals::Usage::reports_billed_work
157
+ */
158
+ export type RunWork = "done" | "none";
139
159
  /**
140
160
  * One normalized action a harness took, harness-agnostic so a single consumer
141
161
  * assertion works across harnesses. Every field is always serialized (null when
@@ -371,6 +391,24 @@ export interface FallbackReport {
371
391
  * when no candidate could run at all — every one was a startup failure.
372
392
  */
373
393
  ran: string | null;
394
+ /**
395
+ * Whether the candidate named by `ran` stopped the chain **having shown no
396
+ * evidence it did the task's work, and with nothing to say why** — its
397
+ * [`RunResult::work`] read [`RunWork::None`] on a failure no classifier
398
+ * recognized.
399
+ *
400
+ * The chain still stops there, deliberately: re-running a task that may
401
+ * genuinely have failed for free would burn the next identity's quota on
402
+ * the same failure, which is worse than stopping (see
403
+ * [`crate::domain::fallback::startup_failure_reason`]). What this flag adds
404
+ * is the *attribution* — without it a candidate that never got started reads
405
+ * in the report exactly like one that tried the task and failed it, and the
406
+ * remaining candidates look untried for a reason nobody can name.
407
+ *
408
+ * `false` whenever `ran` is `null` (no candidate ran at all — every one is
409
+ * in `fell_through`, each with its reason).
410
+ */
411
+ stopped_without_work: boolean;
374
412
  [k: string]: unknown;
375
413
  }
376
414
  /**
@@ -555,6 +593,22 @@ export interface RunResult {
555
593
  * Named preset, when this result came from a composed harness id.
556
594
  */
557
595
  variant: string | null;
596
+ /**
597
+ * What this run has to show for itself when `failure_kind` has nothing to
598
+ * say: [`RunWork::Done`] if the harness recorded a tool call or billed
599
+ * usage, [`RunWork::None`] if nothing says it got that far. `null` on every
600
+ * other run — a success needs no such reading, and a *classified* failure
601
+ * already names its cause.
602
+ *
603
+ * This is the reading the fallback verdict itself consults
604
+ * ([`crate::domain::fallback::startup_failure_reason`]), published rather
605
+ * than left to be re-derived: an unclassified failure that did nothing is
606
+ * otherwise indistinguishable from one that ran the task and failed it, and
607
+ * the two mean opposite things to whoever reads the run. Publishing it
608
+ * changes no verdict — a candidate reading `none` still stops a chain, and
609
+ * one reading `done` still never falls through it.
610
+ */
611
+ work: RunWork | null;
558
612
  [k: string]: unknown;
559
613
  }
560
614
  /**