@oneharness/sdk 0.12.2 → 0.13.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.
@@ -79,19 +79,19 @@ export type ControlVerb = "interrupt";
79
79
  * new variant is a report `schema_version` bump like any other enum value, since
80
80
  * a consumer matching exhaustively learns of it only from the version.
81
81
  */
82
- export type FallThroughReason = "not-installed" | "spawn-error" | "auth" | "quota" | "session-not-found" | "untrusted-directory" | "input-too-large" | "model-mismatch" | "model-not-found" | "rate-limit";
82
+ export type FallThroughReason = "not-installed" | "spawn-error" | "auth" | "quota" | "session-not-found" | "untrusted-directory" | "input-too-large" | "model-mismatch" | "model-not-found" | "rate-limit" | "server-overloaded";
83
83
  /**
84
84
  * The normalized, closed set of failure reasons oneharness can classify from a
85
85
  * harness's output. It is the single source for the `failure_kind` contract
86
86
  * value: serialized as the snake_case token a consumer reads in the report
87
87
  * (`auth`, `rate_limit`, `model_not_found`, `quota`, `session_not_found`,
88
- * `tool_deferred`), so the wire shape is unchanged — modeling it as an enum
88
+ * `tool_deferred`, `server_overloaded`), so the wire shape is unchanged — modeling it as an enum
89
89
  * keeps a misspelled or invalid kind unrepresentable and gives every
90
90
  * producer/consumer (classifier, `is_failure`, the fallback fall-through rule,
91
91
  * the report, history) one definition to share instead of scattered string
92
92
  * literals.
93
93
  */
94
- export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch";
94
+ export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded";
95
95
  /**
96
96
  * How a harness emits its result, which decides how `text` is extracted.
97
97
  *
@@ -495,11 +495,11 @@ export interface RunResult {
495
495
  * `status`, which records oneharness's relationship to the process. Two
496
496
  * families: coarse reasons for a non-zero run (`auth`, `rate_limit`,
497
497
  * `model_not_found`, `quota`, `session_not_found`, `untrusted_directory`,
498
- * `input_too_large`, `model_mismatch`), and `tool_deferred` — a run that exited
499
- * *cleanly* but only deferred a builtin tool call instead of executing it
500
- * (Claude Code bridge/managed deployments), so it did no useful work. The
501
- * deferred case is the only `failure_kind` that can appear on a `status: ok`
502
- * run, and it also marks the run as failed for exit-code purposes.
498
+ * `input_too_large`, `model_mismatch`, `server_overloaded`), and
499
+ * `tool_deferred` — a run that only deferred a builtin tool call instead of
500
+ * executing it (Claude Code bridge/managed deployments), so it did no useful
501
+ * work. Both `tool_deferred` and `server_overloaded` can accompany a clean
502
+ * transport exit; either still marks the run as failed for exit-code purposes.
503
503
  * Serialized as its snake_case token (see [`FailureKind`]).
504
504
  */
505
505
  failure_kind: FailureKind | null;