@oneharness/sdk 0.23.1 → 0.25.1
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/generated/config-report.d.ts +79 -10
- package/dist/generated/contracts.d.ts +25 -3
- package/dist/generated/history-line.d.ts +27 -21
- package/dist/generated/history-show-entries.d.ts +25 -19
- package/dist/generated/history-stream-envelope.d.ts +26 -20
- package/dist/generated/history.d.ts +25 -19
- package/dist/generated/run-stream-envelope.d.ts +25 -3
- package/dist/generated/schemas.json +531 -61
- package/dist/generated/zod.d.ts +5 -2
- package/dist/generated/zod.js +131 -14
- package/package.json +2 -2
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a controlled (`--control`) Codex dispatch's turn runs: the
|
|
3
|
+
* `app_server` key of `[harness.codex]` and `[harness.codex.variant.<name>]`.
|
|
4
|
+
*
|
|
5
|
+
* Resolved variant, then harness, then [`AppServerMode::Shared`] on every
|
|
6
|
+
* platform, apart from `args` exactly as `plugins` is
|
|
7
|
+
* ([`FileConfig::app_server_for`]). Accepted only for `codex`.
|
|
8
|
+
*/
|
|
9
|
+
export type AppServerMode = "shared" | "per-dispatch";
|
|
1
10
|
/**
|
|
2
11
|
* The unified approval mode, from least to most autonomy. A harness may not
|
|
3
12
|
* support every value (see [`crate::domain::harness::HarnessSpec::mode`]); the
|
|
@@ -110,6 +119,20 @@ export interface Field3 {
|
|
|
110
119
|
*/
|
|
111
120
|
export interface HarnessReport {
|
|
112
121
|
allowed_tools: Field2;
|
|
122
|
+
/**
|
|
123
|
+
* The resolved `analytics` (`false` by default), present only for `codex`.
|
|
124
|
+
*/
|
|
125
|
+
analytics?: Field | null | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* The resolved `app_server` (`"shared"` by default), present only for
|
|
128
|
+
* `codex`.
|
|
129
|
+
*/
|
|
130
|
+
app_server?: Field11 | null | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* The resolved `apps` opt-in (`false` by default), present only for
|
|
133
|
+
* `codex`.
|
|
134
|
+
*/
|
|
135
|
+
apps?: Field | null | undefined;
|
|
113
136
|
args: Field2;
|
|
114
137
|
bin: Field3;
|
|
115
138
|
denied_tools: Field2;
|
|
@@ -120,6 +143,11 @@ export interface HarnessReport {
|
|
|
120
143
|
[k: string]: unknown;
|
|
121
144
|
};
|
|
122
145
|
model: Field3;
|
|
146
|
+
/**
|
|
147
|
+
* The resolved `model_catalog_refresh_seconds` (`3600` by default),
|
|
148
|
+
* present only for `codex`.
|
|
149
|
+
*/
|
|
150
|
+
model_catalog_refresh_seconds?: Field5 | null | undefined;
|
|
123
151
|
/**
|
|
124
152
|
* The resolved plugins opt-in (`false` by default), present only for a
|
|
125
153
|
* harness with a plugins feature (`codex`).
|
|
@@ -129,13 +157,53 @@ export interface HarnessReport {
|
|
|
129
157
|
settings: {
|
|
130
158
|
[k: string]: unknown;
|
|
131
159
|
};
|
|
160
|
+
/**
|
|
161
|
+
* The resolved `shared_model_catalog` (`true` by default), present only
|
|
162
|
+
* for `codex`.
|
|
163
|
+
*/
|
|
164
|
+
shared_model_catalog?: Field | null | undefined;
|
|
132
165
|
variant: {
|
|
133
166
|
[k: string]: VariantReport;
|
|
134
167
|
};
|
|
135
168
|
[k: string]: unknown;
|
|
136
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* One resolved field in the `oneharness config` report: the effective value
|
|
172
|
+
* plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
|
|
173
|
+
* are `null` when the field is unset everywhere and has no built-in default.
|
|
174
|
+
*/
|
|
175
|
+
export interface Field11 {
|
|
176
|
+
source: string | null;
|
|
177
|
+
value: AppServerMode | null;
|
|
178
|
+
[k: string]: unknown;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* One resolved field in the `oneharness config` report: the effective value
|
|
182
|
+
* plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
|
|
183
|
+
* are `null` when the field is unset everywhere and has no built-in default.
|
|
184
|
+
*/
|
|
185
|
+
export interface Field5 {
|
|
186
|
+
source: string | null;
|
|
187
|
+
value: number | null;
|
|
188
|
+
[k: string]: unknown;
|
|
189
|
+
}
|
|
137
190
|
export interface VariantReport {
|
|
138
191
|
allowed_tools: Field2;
|
|
192
|
+
/**
|
|
193
|
+
* The `analytics` a launch of this variant resolves to: the variant's own,
|
|
194
|
+
* else its harness's, else `false`. Present only for `codex`.
|
|
195
|
+
*/
|
|
196
|
+
analytics?: Field | null | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* The `app_server` a launch of this variant resolves to: the variant's
|
|
199
|
+
* own, else its harness's, else `"shared"`. Present only for `codex`.
|
|
200
|
+
*/
|
|
201
|
+
app_server?: Field11 | null | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* The apps opt-in a launch of this variant resolves to: the variant's
|
|
204
|
+
* own, else its harness's, else `false`. Present only for `codex`.
|
|
205
|
+
*/
|
|
206
|
+
apps?: Field | null | undefined;
|
|
139
207
|
args: Field2;
|
|
140
208
|
bin: Field3;
|
|
141
209
|
denied_tools: Field2;
|
|
@@ -150,6 +218,12 @@ export interface VariantReport {
|
|
|
150
218
|
[k: string]: unknown;
|
|
151
219
|
};
|
|
152
220
|
model: Field3;
|
|
221
|
+
/**
|
|
222
|
+
* The `model_catalog_refresh_seconds` a launch of this variant resolves
|
|
223
|
+
* to: the variant's own, else its harness's, else `3600`. Present only for
|
|
224
|
+
* `codex`.
|
|
225
|
+
*/
|
|
226
|
+
model_catalog_refresh_seconds?: Field5 | null | undefined;
|
|
153
227
|
/**
|
|
154
228
|
* The plugins opt-in a launch of this variant resolves to: the variant's
|
|
155
229
|
* own, else its harness's, else `false`. Present only for a harness with
|
|
@@ -160,6 +234,11 @@ export interface VariantReport {
|
|
|
160
234
|
settings: {
|
|
161
235
|
[k: string]: unknown;
|
|
162
236
|
};
|
|
237
|
+
/**
|
|
238
|
+
* The `shared_model_catalog` a launch of this variant resolves to: the
|
|
239
|
+
* variant's own, else its harness's, else `true`. Present only for `codex`.
|
|
240
|
+
*/
|
|
241
|
+
shared_model_catalog?: Field | null | undefined;
|
|
163
242
|
unset_env: Field2;
|
|
164
243
|
[k: string]: unknown;
|
|
165
244
|
}
|
|
@@ -285,13 +364,3 @@ export interface Field1 {
|
|
|
285
364
|
value: boolean | null;
|
|
286
365
|
[k: string]: unknown;
|
|
287
366
|
}
|
|
288
|
-
/**
|
|
289
|
-
* One resolved field in the `oneharness config` report: the effective value
|
|
290
|
-
* plus where it came from (a config file path, or [`DEFAULT_SOURCE`]). Both
|
|
291
|
-
* are `null` when the field is unset everywhere and has no built-in default.
|
|
292
|
-
*/
|
|
293
|
-
export interface Field5 {
|
|
294
|
-
source: string | null;
|
|
295
|
-
value: number | null;
|
|
296
|
-
[k: string]: unknown;
|
|
297
|
-
}
|
|
@@ -57,7 +57,7 @@ export type ControlVerb = "interrupt";
|
|
|
57
57
|
* new variant is a report `schema_version` bump like any other enum value, since
|
|
58
58
|
* a consumer matching exhaustively learns of it only from the version.
|
|
59
59
|
*/
|
|
60
|
-
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";
|
|
60
|
+
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" | "app-server-lost";
|
|
61
61
|
export type ToolCallStatus = "completed" | "failed" | "timeout" | "interrupted";
|
|
62
62
|
/**
|
|
63
63
|
* How a normalized tool interval was obtained.
|
|
@@ -68,13 +68,13 @@ export type TimingSource = "provider_measured" | "stdout_observed";
|
|
|
68
68
|
* harness's output. It is the single source for the `failure_kind` contract
|
|
69
69
|
* value: serialized as the snake_case token a consumer reads in the report
|
|
70
70
|
* (`auth`, `rate_limit`, `model_not_found`, `quota`, `session_not_found`,
|
|
71
|
-
* `tool_deferred`, `server_overloaded`), so the wire shape is unchanged — modeling it as an enum
|
|
71
|
+
* `tool_deferred`, `server_overloaded`, `app_server_lost`), so the wire shape is unchanged — modeling it as an enum
|
|
72
72
|
* keeps a misspelled or invalid kind unrepresentable and gives every
|
|
73
73
|
* producer/consumer (classifier, `is_failure`, the fallback fall-through rule,
|
|
74
74
|
* the report, history) one definition to share instead of scattered string
|
|
75
75
|
* literals.
|
|
76
76
|
*/
|
|
77
|
-
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded";
|
|
77
|
+
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | "app_server_lost";
|
|
78
78
|
/**
|
|
79
79
|
* How a harness emits its result, which decides how `text` is extracted.
|
|
80
80
|
*
|
|
@@ -284,6 +284,12 @@ export interface BatchReport {
|
|
|
284
284
|
* backed it, and every request served over the run's lifetime.
|
|
285
285
|
*/
|
|
286
286
|
export interface ControlReport {
|
|
287
|
+
/**
|
|
288
|
+
* The shared Codex app-server the run's turn ran on, when it ran on one
|
|
289
|
+
* (`app_server = "shared"`). Absent for every other mechanism and for a
|
|
290
|
+
* dispatch's own `codex app-server` child.
|
|
291
|
+
*/
|
|
292
|
+
app_server?: AppServerReport | null | undefined;
|
|
287
293
|
/**
|
|
288
294
|
* Every control request served, in order.
|
|
289
295
|
*/
|
|
@@ -298,6 +304,22 @@ export interface ControlReport {
|
|
|
298
304
|
socket: string;
|
|
299
305
|
[k: string]: unknown;
|
|
300
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Which shared Codex app-server a pooled dispatch's turn ran on.
|
|
309
|
+
*/
|
|
310
|
+
export interface AppServerReport {
|
|
311
|
+
/**
|
|
312
|
+
* The pid the pool recorded for the server (its `server.json`): the
|
|
313
|
+
* process it launched, which is the launcher shim when Codex is one.
|
|
314
|
+
*/
|
|
315
|
+
pid: number;
|
|
316
|
+
/**
|
|
317
|
+
* The pool entry the server belongs to — equal for every dispatch that
|
|
318
|
+
* shared it.
|
|
319
|
+
*/
|
|
320
|
+
pool_key: string;
|
|
321
|
+
[k: string]: unknown;
|
|
322
|
+
}
|
|
301
323
|
/**
|
|
302
324
|
* Metadata for a fallback run (harnesses tried in priority order until one
|
|
303
325
|
* runs). Present on [`RunReport::fallback`] only in that mode. The per-harness
|
|
@@ -6,7 +6,7 @@ export type HistoryLine = ({
|
|
|
6
6
|
harness: string;
|
|
7
7
|
harness_id?: string | null | undefined;
|
|
8
8
|
run_id: string;
|
|
9
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
9
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
10
10
|
/**
|
|
11
11
|
* The name of the session this line belongs to — the `name` its run's
|
|
12
12
|
* closing `run` line will carry — so a run still in progress (events but
|
|
@@ -43,7 +43,7 @@ export type HistoryLine = ({
|
|
|
43
43
|
[k: string]: unknown;
|
|
44
44
|
} | ({
|
|
45
45
|
error: string;
|
|
46
|
-
schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
46
|
+
schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
47
47
|
[k: string]: unknown;
|
|
48
48
|
} & ({
|
|
49
49
|
status?: "nonzero" | "timeout" | "cancelled" | "spawn-error" | "skipped" | undefined;
|
|
@@ -55,7 +55,7 @@ export type HistoryLine = ({
|
|
|
55
55
|
work?: null | undefined;
|
|
56
56
|
[k: string]: unknown;
|
|
57
57
|
} | {
|
|
58
|
-
schema_version?: "1.7" | "1.8" | "1.9" | undefined;
|
|
58
|
+
schema_version?: "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
59
59
|
status?: "nonzero" | "timeout" | "cancelled" | undefined;
|
|
60
60
|
work: "done" | "none";
|
|
61
61
|
[k: string]: unknown;
|
|
@@ -64,37 +64,43 @@ export type HistoryLine = ({
|
|
|
64
64
|
[k: string]: unknown;
|
|
65
65
|
} | {
|
|
66
66
|
observed_model: string;
|
|
67
|
-
schema_version?: "1.8" | "1.9" | undefined;
|
|
67
|
+
schema_version?: "1.8" | "1.9" | "1.10" | undefined;
|
|
68
68
|
[k: string]: unknown;
|
|
69
69
|
}) & ({
|
|
70
70
|
status?: "ok" | "nonzero" | "timeout" | "spawn-error" | "skipped" | "planned" | undefined;
|
|
71
71
|
[k: string]: unknown;
|
|
72
72
|
} | {
|
|
73
|
-
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
73
|
+
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
74
74
|
[k: string]: unknown;
|
|
75
75
|
}) & (({
|
|
76
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | null;
|
|
76
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | "app_server_lost" | null;
|
|
77
77
|
[k: string]: unknown;
|
|
78
78
|
} | {
|
|
79
|
-
schema_version?: "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
79
|
+
schema_version?: "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
80
80
|
[k: string]: unknown;
|
|
81
81
|
}) & ({
|
|
82
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "model_mismatch" | "server_overloaded" | null;
|
|
82
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "model_mismatch" | "server_overloaded" | "app_server_lost" | null;
|
|
83
83
|
[k: string]: unknown;
|
|
84
84
|
} | {
|
|
85
|
-
schema_version?: "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
85
|
+
schema_version?: "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
86
86
|
[k: string]: unknown;
|
|
87
87
|
}) & ({
|
|
88
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "server_overloaded" | null;
|
|
88
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "server_overloaded" | "app_server_lost" | null;
|
|
89
89
|
[k: string]: unknown;
|
|
90
90
|
} | {
|
|
91
|
-
schema_version?: "1.8" | "1.9" | undefined;
|
|
91
|
+
schema_version?: "1.8" | "1.9" | "1.10" | undefined;
|
|
92
92
|
[k: string]: unknown;
|
|
93
93
|
}) & ({
|
|
94
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | null;
|
|
94
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "app_server_lost" | null;
|
|
95
95
|
[k: string]: unknown;
|
|
96
96
|
} | {
|
|
97
|
-
schema_version?: "1.9" | undefined;
|
|
97
|
+
schema_version?: "1.9" | "1.10" | undefined;
|
|
98
|
+
[k: string]: unknown;
|
|
99
|
+
}) & ({
|
|
100
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | null;
|
|
101
|
+
[k: string]: unknown;
|
|
102
|
+
} | {
|
|
103
|
+
schema_version?: "1.10" | undefined;
|
|
98
104
|
[k: string]: unknown;
|
|
99
105
|
})) & ({
|
|
100
106
|
duration_ms: number;
|
|
@@ -122,7 +128,7 @@ export type HistoryLine = ({
|
|
|
122
128
|
permission_mode: PermissionMode;
|
|
123
129
|
project: string;
|
|
124
130
|
prompt: string;
|
|
125
|
-
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
131
|
+
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
126
132
|
session: string;
|
|
127
133
|
session_id: string | null;
|
|
128
134
|
started_at: string;
|
|
@@ -167,7 +173,7 @@ export type HistoryLine = ({
|
|
|
167
173
|
permission_mode: PermissionMode;
|
|
168
174
|
project: string;
|
|
169
175
|
prompt: string;
|
|
170
|
-
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
176
|
+
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
171
177
|
session: string;
|
|
172
178
|
session_id: string | null;
|
|
173
179
|
started_at: string;
|
|
@@ -212,7 +218,7 @@ export type HistoryLine = ({
|
|
|
212
218
|
permission_mode: PermissionMode;
|
|
213
219
|
project: string;
|
|
214
220
|
prompt: string;
|
|
215
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
221
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
216
222
|
session: string;
|
|
217
223
|
session_id: string | null;
|
|
218
224
|
started_at?: never | undefined;
|
|
@@ -257,7 +263,7 @@ export type HistoryLine = ({
|
|
|
257
263
|
permission_mode: PermissionMode;
|
|
258
264
|
project: string;
|
|
259
265
|
prompt: string;
|
|
260
|
-
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
266
|
+
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
261
267
|
session: string;
|
|
262
268
|
session_id: string | null;
|
|
263
269
|
started_at?: never | undefined;
|
|
@@ -302,7 +308,7 @@ export type HistoryLine = ({
|
|
|
302
308
|
permission_mode: PermissionMode;
|
|
303
309
|
project: string;
|
|
304
310
|
prompt: string;
|
|
305
|
-
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
311
|
+
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
306
312
|
session: string;
|
|
307
313
|
session_id: string | null;
|
|
308
314
|
started_at: string;
|
|
@@ -347,7 +353,7 @@ export type HistoryLine = ({
|
|
|
347
353
|
permission_mode: PermissionMode;
|
|
348
354
|
project: string;
|
|
349
355
|
prompt: string;
|
|
350
|
-
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
356
|
+
schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
351
357
|
session: string;
|
|
352
358
|
session_id: string | null;
|
|
353
359
|
started_at?: never | undefined;
|
|
@@ -377,13 +383,13 @@ export type TimingSource = "provider_measured" | "stdout_observed";
|
|
|
377
383
|
* harness's output. It is the single source for the `failure_kind` contract
|
|
378
384
|
* value: serialized as the snake_case token a consumer reads in the report
|
|
379
385
|
* (`auth`, `rate_limit`, `model_not_found`, `quota`, `session_not_found`,
|
|
380
|
-
* `tool_deferred`, `server_overloaded`), so the wire shape is unchanged — modeling it as an enum
|
|
386
|
+
* `tool_deferred`, `server_overloaded`, `app_server_lost`), so the wire shape is unchanged — modeling it as an enum
|
|
381
387
|
* keeps a misspelled or invalid kind unrepresentable and gives every
|
|
382
388
|
* producer/consumer (classifier, `is_failure`, the fallback fall-through rule,
|
|
383
389
|
* the report, history) one definition to share instead of scattered string
|
|
384
390
|
* literals.
|
|
385
391
|
*/
|
|
386
|
-
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded";
|
|
392
|
+
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | "app_server_lost";
|
|
387
393
|
/**
|
|
388
394
|
* The unified approval mode, from least to most autonomy. A harness may not
|
|
389
395
|
* support every value (see [`crate::domain::harness::HarnessSpec::mode`]); the
|
|
@@ -7,7 +7,7 @@ export type HistoryShowEntry = (({
|
|
|
7
7
|
[k: string]: unknown;
|
|
8
8
|
} | ({
|
|
9
9
|
error: string;
|
|
10
|
-
schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
10
|
+
schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
11
11
|
[k: string]: unknown;
|
|
12
12
|
} & ({
|
|
13
13
|
status?: "nonzero" | "timeout" | "cancelled" | "spawn-error" | "skipped" | undefined;
|
|
@@ -19,7 +19,7 @@ export type HistoryShowEntry = (({
|
|
|
19
19
|
work?: null | undefined;
|
|
20
20
|
[k: string]: unknown;
|
|
21
21
|
} | {
|
|
22
|
-
schema_version?: "1.7" | "1.8" | "1.9" | undefined;
|
|
22
|
+
schema_version?: "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
23
23
|
status?: "nonzero" | "timeout" | "cancelled" | undefined;
|
|
24
24
|
work: "done" | "none";
|
|
25
25
|
[k: string]: unknown;
|
|
@@ -28,37 +28,43 @@ export type HistoryShowEntry = (({
|
|
|
28
28
|
[k: string]: unknown;
|
|
29
29
|
} | {
|
|
30
30
|
observed_model: string;
|
|
31
|
-
schema_version?: "1.8" | "1.9" | undefined;
|
|
31
|
+
schema_version?: "1.8" | "1.9" | "1.10" | undefined;
|
|
32
32
|
[k: string]: unknown;
|
|
33
33
|
}) & ({
|
|
34
34
|
status?: "ok" | "nonzero" | "timeout" | "spawn-error" | "skipped" | "planned" | undefined;
|
|
35
35
|
[k: string]: unknown;
|
|
36
36
|
} | {
|
|
37
|
-
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
37
|
+
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
38
38
|
[k: string]: unknown;
|
|
39
39
|
}) & (({
|
|
40
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | null;
|
|
40
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | "app_server_lost" | null;
|
|
41
41
|
[k: string]: unknown;
|
|
42
42
|
} | {
|
|
43
|
-
schema_version?: "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
43
|
+
schema_version?: "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
44
44
|
[k: string]: unknown;
|
|
45
45
|
}) & ({
|
|
46
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "model_mismatch" | "server_overloaded" | null;
|
|
46
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "model_mismatch" | "server_overloaded" | "app_server_lost" | null;
|
|
47
47
|
[k: string]: unknown;
|
|
48
48
|
} | {
|
|
49
|
-
schema_version?: "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
49
|
+
schema_version?: "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
50
50
|
[k: string]: unknown;
|
|
51
51
|
}) & ({
|
|
52
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "server_overloaded" | null;
|
|
52
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "server_overloaded" | "app_server_lost" | null;
|
|
53
53
|
[k: string]: unknown;
|
|
54
54
|
} | {
|
|
55
|
-
schema_version?: "1.8" | "1.9" | undefined;
|
|
55
|
+
schema_version?: "1.8" | "1.9" | "1.10" | undefined;
|
|
56
56
|
[k: string]: unknown;
|
|
57
57
|
}) & ({
|
|
58
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | null;
|
|
58
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "app_server_lost" | null;
|
|
59
59
|
[k: string]: unknown;
|
|
60
60
|
} | {
|
|
61
|
-
schema_version?: "1.9" | undefined;
|
|
61
|
+
schema_version?: "1.9" | "1.10" | undefined;
|
|
62
|
+
[k: string]: unknown;
|
|
63
|
+
}) & ({
|
|
64
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | null;
|
|
65
|
+
[k: string]: unknown;
|
|
66
|
+
} | {
|
|
67
|
+
schema_version?: "1.10" | undefined;
|
|
62
68
|
[k: string]: unknown;
|
|
63
69
|
})) & ({
|
|
64
70
|
duration_ms: number;
|
|
@@ -177,7 +183,7 @@ export type HistoryShowEntry = (({
|
|
|
177
183
|
* run's single prompt).
|
|
178
184
|
*/
|
|
179
185
|
prompt: string;
|
|
180
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
186
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
181
187
|
/**
|
|
182
188
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
183
189
|
*/
|
|
@@ -480,7 +486,7 @@ export type HistoryShowEntry = (({
|
|
|
480
486
|
* run's single prompt).
|
|
481
487
|
*/
|
|
482
488
|
prompt: string;
|
|
483
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
489
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
484
490
|
/**
|
|
485
491
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
486
492
|
*/
|
|
@@ -607,7 +613,7 @@ export type HistoryShowEntry = (({
|
|
|
607
613
|
* run's single prompt).
|
|
608
614
|
*/
|
|
609
615
|
prompt: string;
|
|
610
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
616
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
611
617
|
/**
|
|
612
618
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
613
619
|
*/
|
|
@@ -734,7 +740,7 @@ export type HistoryShowEntry = (({
|
|
|
734
740
|
* run's single prompt).
|
|
735
741
|
*/
|
|
736
742
|
prompt: string;
|
|
737
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
743
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
738
744
|
/**
|
|
739
745
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
740
746
|
*/
|
|
@@ -861,7 +867,7 @@ export type HistoryShowEntry = (({
|
|
|
861
867
|
* run's single prompt).
|
|
862
868
|
*/
|
|
863
869
|
prompt: string;
|
|
864
|
-
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
870
|
+
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
865
871
|
/**
|
|
866
872
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
867
873
|
*/
|
|
@@ -1328,13 +1334,13 @@ export type TimingSource = "provider_measured" | "stdout_observed";
|
|
|
1328
1334
|
* harness's output. It is the single source for the `failure_kind` contract
|
|
1329
1335
|
* value: serialized as the snake_case token a consumer reads in the report
|
|
1330
1336
|
* (`auth`, `rate_limit`, `model_not_found`, `quota`, `session_not_found`,
|
|
1331
|
-
* `tool_deferred`, `server_overloaded`), so the wire shape is unchanged — modeling it as an enum
|
|
1337
|
+
* `tool_deferred`, `server_overloaded`, `app_server_lost`), so the wire shape is unchanged — modeling it as an enum
|
|
1332
1338
|
* keeps a misspelled or invalid kind unrepresentable and gives every
|
|
1333
1339
|
* producer/consumer (classifier, `is_failure`, the fallback fall-through rule,
|
|
1334
1340
|
* the report, history) one definition to share instead of scattered string
|
|
1335
1341
|
* literals.
|
|
1336
1342
|
*/
|
|
1337
|
-
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded";
|
|
1343
|
+
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | "app_server_lost";
|
|
1338
1344
|
/**
|
|
1339
1345
|
* The outcome of attempting to run one harness.
|
|
1340
1346
|
*/
|
|
@@ -14,7 +14,7 @@ export type HistoryStreamEnvelope = {
|
|
|
14
14
|
[k: string]: unknown;
|
|
15
15
|
} | ({
|
|
16
16
|
error: string;
|
|
17
|
-
schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
17
|
+
schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
18
18
|
[k: string]: unknown;
|
|
19
19
|
} & ({
|
|
20
20
|
status?: "nonzero" | "timeout" | "cancelled" | "spawn-error" | "skipped" | undefined;
|
|
@@ -26,7 +26,7 @@ export type HistoryStreamEnvelope = {
|
|
|
26
26
|
work?: null | undefined;
|
|
27
27
|
[k: string]: unknown;
|
|
28
28
|
} | {
|
|
29
|
-
schema_version?: "1.7" | "1.8" | "1.9" | undefined;
|
|
29
|
+
schema_version?: "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
30
30
|
status?: "nonzero" | "timeout" | "cancelled" | undefined;
|
|
31
31
|
work: "done" | "none";
|
|
32
32
|
[k: string]: unknown;
|
|
@@ -35,37 +35,43 @@ export type HistoryStreamEnvelope = {
|
|
|
35
35
|
[k: string]: unknown;
|
|
36
36
|
} | {
|
|
37
37
|
observed_model: string;
|
|
38
|
-
schema_version?: "1.8" | "1.9" | undefined;
|
|
38
|
+
schema_version?: "1.8" | "1.9" | "1.10" | undefined;
|
|
39
39
|
[k: string]: unknown;
|
|
40
40
|
}) & ({
|
|
41
41
|
status?: "ok" | "nonzero" | "timeout" | "spawn-error" | "skipped" | "planned" | undefined;
|
|
42
42
|
[k: string]: unknown;
|
|
43
43
|
} | {
|
|
44
|
-
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
44
|
+
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
45
45
|
[k: string]: unknown;
|
|
46
46
|
}) & (({
|
|
47
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | null;
|
|
47
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | "app_server_lost" | null;
|
|
48
48
|
[k: string]: unknown;
|
|
49
49
|
} | {
|
|
50
|
-
schema_version?: "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
50
|
+
schema_version?: "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
51
51
|
[k: string]: unknown;
|
|
52
52
|
}) & ({
|
|
53
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "model_mismatch" | "server_overloaded" | null;
|
|
53
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "model_mismatch" | "server_overloaded" | "app_server_lost" | null;
|
|
54
54
|
[k: string]: unknown;
|
|
55
55
|
} | {
|
|
56
|
-
schema_version?: "1.6" | "1.7" | "1.8" | "1.9" | undefined;
|
|
56
|
+
schema_version?: "1.6" | "1.7" | "1.8" | "1.9" | "1.10" | undefined;
|
|
57
57
|
[k: string]: unknown;
|
|
58
58
|
}) & ({
|
|
59
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "server_overloaded" | null;
|
|
59
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "server_overloaded" | "app_server_lost" | null;
|
|
60
60
|
[k: string]: unknown;
|
|
61
61
|
} | {
|
|
62
|
-
schema_version?: "1.8" | "1.9" | undefined;
|
|
62
|
+
schema_version?: "1.8" | "1.9" | "1.10" | undefined;
|
|
63
63
|
[k: string]: unknown;
|
|
64
64
|
}) & ({
|
|
65
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | null;
|
|
65
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "app_server_lost" | null;
|
|
66
66
|
[k: string]: unknown;
|
|
67
67
|
} | {
|
|
68
|
-
schema_version?: "1.9" | undefined;
|
|
68
|
+
schema_version?: "1.9" | "1.10" | undefined;
|
|
69
|
+
[k: string]: unknown;
|
|
70
|
+
}) & ({
|
|
71
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | null;
|
|
72
|
+
[k: string]: unknown;
|
|
73
|
+
} | {
|
|
74
|
+
schema_version?: "1.10" | undefined;
|
|
69
75
|
[k: string]: unknown;
|
|
70
76
|
})) & HistoryRecord;
|
|
71
77
|
type: "record";
|
|
@@ -192,7 +198,7 @@ export type HistoryRecord = {
|
|
|
192
198
|
* run's single prompt).
|
|
193
199
|
*/
|
|
194
200
|
prompt: string;
|
|
195
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
201
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
196
202
|
/**
|
|
197
203
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
198
204
|
*/
|
|
@@ -495,7 +501,7 @@ export type HistoryRecord = {
|
|
|
495
501
|
* run's single prompt).
|
|
496
502
|
*/
|
|
497
503
|
prompt: string;
|
|
498
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
504
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
499
505
|
/**
|
|
500
506
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
501
507
|
*/
|
|
@@ -622,7 +628,7 @@ export type HistoryRecord = {
|
|
|
622
628
|
* run's single prompt).
|
|
623
629
|
*/
|
|
624
630
|
prompt: string;
|
|
625
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
631
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
626
632
|
/**
|
|
627
633
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
628
634
|
*/
|
|
@@ -749,7 +755,7 @@ export type HistoryRecord = {
|
|
|
749
755
|
* run's single prompt).
|
|
750
756
|
*/
|
|
751
757
|
prompt: string;
|
|
752
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
758
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
753
759
|
/**
|
|
754
760
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
755
761
|
*/
|
|
@@ -876,7 +882,7 @@ export type HistoryRecord = {
|
|
|
876
882
|
* run's single prompt).
|
|
877
883
|
*/
|
|
878
884
|
prompt: string;
|
|
879
|
-
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
885
|
+
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
880
886
|
/**
|
|
881
887
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
882
888
|
*/
|
|
@@ -1343,13 +1349,13 @@ export type TimingSource = "provider_measured" | "stdout_observed";
|
|
|
1343
1349
|
* harness's output. It is the single source for the `failure_kind` contract
|
|
1344
1350
|
* value: serialized as the snake_case token a consumer reads in the report
|
|
1345
1351
|
* (`auth`, `rate_limit`, `model_not_found`, `quota`, `session_not_found`,
|
|
1346
|
-
* `tool_deferred`, `server_overloaded`), so the wire shape is unchanged — modeling it as an enum
|
|
1352
|
+
* `tool_deferred`, `server_overloaded`, `app_server_lost`), so the wire shape is unchanged — modeling it as an enum
|
|
1347
1353
|
* keeps a misspelled or invalid kind unrepresentable and gives every
|
|
1348
1354
|
* producer/consumer (classifier, `is_failure`, the fallback fall-through rule,
|
|
1349
1355
|
* the report, history) one definition to share instead of scattered string
|
|
1350
1356
|
* literals.
|
|
1351
1357
|
*/
|
|
1352
|
-
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded";
|
|
1358
|
+
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | "server_overloaded" | "app_server_lost";
|
|
1353
1359
|
/**
|
|
1354
1360
|
* The outcome of attempting to run one harness.
|
|
1355
1361
|
*/
|
|
@@ -1380,7 +1386,7 @@ export type HistoryEventLine = {
|
|
|
1380
1386
|
harness: string;
|
|
1381
1387
|
harness_id?: string | null | undefined;
|
|
1382
1388
|
run_id: string;
|
|
1383
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
1389
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9" | "1.10";
|
|
1384
1390
|
/**
|
|
1385
1391
|
* The name of the session this line belongs to — the `name` its run's
|
|
1386
1392
|
* closing `run` line will carry — so a run still in progress (events but
|