@oneharness/sdk 0.8.0 → 0.10.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.
@@ -1,4 +1,12 @@
1
1
  export type FlagKind = "positional" | "value" | "repeated" | "switch" | "key-value" | "trailing";
2
+ /**
3
+ * What both members of a suppressed pair rendering an argument means.
4
+ *
5
+ * Absent — a manifest older than the annotation — is `refuse`, the safe half:
6
+ * a contradiction reported is recoverable, a contradiction edited out is a call
7
+ * that ran as something the caller never asked for.
8
+ */
9
+ export type UnlessResolution = "refuse" | "prefer";
2
10
  /** One SDK option and the CLI flag it renders to. */
3
11
  export type OptionBinding = {
4
12
  readonly option: string;
@@ -7,6 +15,8 @@ export type OptionBinding = {
7
15
  readonly kind: FlagKind;
8
16
  /** Another option that suppresses this one when it renders an argument. */
9
17
  readonly unless: string | null;
18
+ /** Only present beside an `unless`, which it says how to resolve. */
19
+ readonly unless_resolution?: UnlessResolution;
10
20
  };
11
21
  /** How a verb's stdout reaches a caller. */
12
22
  export type StdoutShape = "json" | "jsonl" | "text";
@@ -66,6 +76,7 @@ export declare const CAPABILITIES: {
66
76
  readonly flag: "--all";
67
77
  readonly kind: "switch";
68
78
  readonly unless: "harnesses";
79
+ readonly unless_resolution: "refuse";
69
80
  }, {
70
81
  readonly option: "exclude";
71
82
  readonly flag: "--exclude";
@@ -86,6 +97,7 @@ export declare const CAPABILITIES: {
86
97
  readonly flag: "--system-file";
87
98
  readonly kind: "value";
88
99
  readonly unless: "system";
100
+ readonly unless_resolution: "refuse";
89
101
  }, {
90
102
  readonly option: "reasoning";
91
103
  readonly flag: "--reasoning";
@@ -181,6 +193,7 @@ export declare const CAPABILITIES: {
181
193
  readonly flag: "--config";
182
194
  readonly kind: "value";
183
195
  readonly unless: "noConfig";
196
+ readonly unless_resolution: "refuse";
184
197
  }, {
185
198
  readonly option: "noConfig";
186
199
  readonly flag: "--no-config";
@@ -221,6 +234,7 @@ export declare const CAPABILITIES: {
221
234
  readonly flag: "--history";
222
235
  readonly kind: "switch";
223
236
  readonly unless: "noHistory";
237
+ readonly unless_resolution: "refuse";
224
238
  }, {
225
239
  readonly option: "noHistory";
226
240
  readonly flag: "--no-history";
@@ -297,6 +311,7 @@ export declare const CAPABILITIES: {
297
311
  readonly flag: "--all";
298
312
  readonly kind: "switch";
299
313
  readonly unless: "harnesses";
314
+ readonly unless_resolution: "refuse";
300
315
  }, {
301
316
  readonly option: "exclude";
302
317
  readonly flag: "--exclude";
@@ -317,6 +332,7 @@ export declare const CAPABILITIES: {
317
332
  readonly flag: "--system-file";
318
333
  readonly kind: "value";
319
334
  readonly unless: "system";
335
+ readonly unless_resolution: "refuse";
320
336
  }, {
321
337
  readonly option: "reasoning";
322
338
  readonly flag: "--reasoning";
@@ -412,6 +428,7 @@ export declare const CAPABILITIES: {
412
428
  readonly flag: "--config";
413
429
  readonly kind: "value";
414
430
  readonly unless: "noConfig";
431
+ readonly unless_resolution: "refuse";
415
432
  }, {
416
433
  readonly option: "noConfig";
417
434
  readonly flag: "--no-config";
@@ -452,6 +469,7 @@ export declare const CAPABILITIES: {
452
469
  readonly flag: "--history";
453
470
  readonly kind: "switch";
454
471
  readonly unless: "noHistory";
472
+ readonly unless_resolution: "refuse";
455
473
  }, {
456
474
  readonly option: "noHistory";
457
475
  readonly flag: "--no-history";
@@ -520,6 +538,7 @@ export declare const CAPABILITIES: {
520
538
  readonly flag: "--all";
521
539
  readonly kind: "switch";
522
540
  readonly unless: "harnesses";
541
+ readonly unless_resolution: "refuse";
523
542
  }, {
524
543
  readonly option: "exclude";
525
544
  readonly flag: "--exclude";
@@ -535,6 +554,7 @@ export declare const CAPABILITIES: {
535
554
  readonly flag: "--config";
536
555
  readonly kind: "value";
537
556
  readonly unless: "noConfig";
557
+ readonly unless_resolution: "refuse";
538
558
  }, {
539
559
  readonly option: "noConfig";
540
560
  readonly flag: "--no-config";
@@ -567,6 +587,7 @@ export declare const CAPABILITIES: {
567
587
  readonly flag: "--config";
568
588
  readonly kind: "value";
569
589
  readonly unless: "noConfig";
590
+ readonly unless_resolution: "refuse";
570
591
  }, {
571
592
  readonly option: "noConfig";
572
593
  readonly flag: "--no-config";
@@ -609,6 +630,7 @@ export declare const CAPABILITIES: {
609
630
  readonly flag: "--config";
610
631
  readonly kind: "value";
611
632
  readonly unless: "noConfig";
633
+ readonly unless_resolution: "refuse";
612
634
  }, {
613
635
  readonly option: "noConfig";
614
636
  readonly flag: "--no-config";
@@ -658,6 +680,7 @@ export declare const CAPABILITIES: {
658
680
  readonly flag: "--all";
659
681
  readonly kind: "switch";
660
682
  readonly unless: "harnesses";
683
+ readonly unless_resolution: "refuse";
661
684
  }, {
662
685
  readonly option: "exclude";
663
686
  readonly flag: "--exclude";
@@ -683,6 +706,7 @@ export declare const CAPABILITIES: {
683
706
  readonly flag: "--config";
684
707
  readonly kind: "value";
685
708
  readonly unless: "noConfig";
709
+ readonly unless_resolution: "refuse";
686
710
  }, {
687
711
  readonly option: "noConfig";
688
712
  readonly flag: "--no-config";
@@ -794,6 +818,7 @@ export declare const CAPABILITIES: {
794
818
  readonly flag: "";
795
819
  readonly kind: "positional";
796
820
  readonly unless: "last";
821
+ readonly unless_resolution: "prefer";
797
822
  }, {
798
823
  readonly option: "last";
799
824
  readonly flag: "--last";
@@ -809,6 +834,7 @@ export declare const CAPABILITIES: {
809
834
  readonly flag: "--project";
810
835
  readonly kind: "value";
811
836
  readonly unless: "allProjects";
837
+ readonly unless_resolution: "refuse";
812
838
  }, {
813
839
  readonly option: "allProjects";
814
840
  readonly flag: "--all-projects";
@@ -824,6 +850,7 @@ export declare const CAPABILITIES: {
824
850
  readonly flag: "--config";
825
851
  readonly kind: "value";
826
852
  readonly unless: "noConfig";
853
+ readonly unless_resolution: "refuse";
827
854
  }, {
828
855
  readonly option: "noConfig";
829
856
  readonly flag: "--no-config";
@@ -854,6 +881,7 @@ export declare const CAPABILITIES: {
854
881
  readonly flag: "--project";
855
882
  readonly kind: "value";
856
883
  readonly unless: "allProjects";
884
+ readonly unless_resolution: "refuse";
857
885
  }, {
858
886
  readonly option: "allProjects";
859
887
  readonly flag: "--all-projects";
@@ -869,6 +897,7 @@ export declare const CAPABILITIES: {
869
897
  readonly flag: "--config";
870
898
  readonly kind: "value";
871
899
  readonly unless: "noConfig";
900
+ readonly unless_resolution: "refuse";
872
901
  }, {
873
902
  readonly option: "noConfig";
874
903
  readonly flag: "--no-config";
@@ -909,6 +938,7 @@ export declare const CAPABILITIES: {
909
938
  readonly flag: "--project";
910
939
  readonly kind: "value";
911
940
  readonly unless: "allProjects";
941
+ readonly unless_resolution: "refuse";
912
942
  }, {
913
943
  readonly option: "allProjects";
914
944
  readonly flag: "--all-projects";
@@ -929,6 +959,7 @@ export declare const CAPABILITIES: {
929
959
  readonly flag: "--config";
930
960
  readonly kind: "value";
931
961
  readonly unless: "noConfig";
962
+ readonly unless_resolution: "refuse";
932
963
  }, {
933
964
  readonly option: "noConfig";
934
965
  readonly flag: "--no-config";
@@ -951,6 +982,7 @@ export declare const CAPABILITIES: {
951
982
  readonly flag: "--project";
952
983
  readonly kind: "value";
953
984
  readonly unless: "allProjects";
985
+ readonly unless_resolution: "refuse";
954
986
  }, {
955
987
  readonly option: "allProjects";
956
988
  readonly flag: "--all-projects";
@@ -971,6 +1003,7 @@ export declare const CAPABILITIES: {
971
1003
  readonly flag: "--config";
972
1004
  readonly kind: "value";
973
1005
  readonly unless: "noConfig";
1006
+ readonly unless_resolution: "refuse";
974
1007
  }, {
975
1008
  readonly option: "noConfig";
976
1009
  readonly flag: "--no-config";
@@ -998,6 +1031,7 @@ export declare const CAPABILITIES: {
998
1031
  readonly flag: "--config";
999
1032
  readonly kind: "value";
1000
1033
  readonly unless: "noConfig";
1034
+ readonly unless_resolution: "refuse";
1001
1035
  }, {
1002
1036
  readonly option: "noConfig";
1003
1037
  readonly flag: "--no-config";
@@ -44,6 +44,7 @@ export const CAPABILITIES = {
44
44
  flag: "--all",
45
45
  kind: "switch",
46
46
  unless: "harnesses",
47
+ unless_resolution: "refuse",
47
48
  },
48
49
  {
49
50
  option: "exclude",
@@ -68,6 +69,7 @@ export const CAPABILITIES = {
68
69
  flag: "--system-file",
69
70
  kind: "value",
70
71
  unless: "system",
72
+ unless_resolution: "refuse",
71
73
  },
72
74
  {
73
75
  option: "reasoning",
@@ -182,6 +184,7 @@ export const CAPABILITIES = {
182
184
  flag: "--config",
183
185
  kind: "value",
184
186
  unless: "noConfig",
187
+ unless_resolution: "refuse",
185
188
  },
186
189
  {
187
190
  option: "noConfig",
@@ -230,6 +233,7 @@ export const CAPABILITIES = {
230
233
  flag: "--history",
231
234
  kind: "switch",
232
235
  unless: "noHistory",
236
+ unless_resolution: "refuse",
233
237
  },
234
238
  {
235
239
  option: "noHistory",
@@ -322,6 +326,7 @@ export const CAPABILITIES = {
322
326
  flag: "--all",
323
327
  kind: "switch",
324
328
  unless: "harnesses",
329
+ unless_resolution: "refuse",
325
330
  },
326
331
  {
327
332
  option: "exclude",
@@ -346,6 +351,7 @@ export const CAPABILITIES = {
346
351
  flag: "--system-file",
347
352
  kind: "value",
348
353
  unless: "system",
354
+ unless_resolution: "refuse",
349
355
  },
350
356
  {
351
357
  option: "reasoning",
@@ -460,6 +466,7 @@ export const CAPABILITIES = {
460
466
  flag: "--config",
461
467
  kind: "value",
462
468
  unless: "noConfig",
469
+ unless_resolution: "refuse",
463
470
  },
464
471
  {
465
472
  option: "noConfig",
@@ -508,6 +515,7 @@ export const CAPABILITIES = {
508
515
  flag: "--history",
509
516
  kind: "switch",
510
517
  unless: "noHistory",
518
+ unless_resolution: "refuse",
511
519
  },
512
520
  {
513
521
  option: "noHistory",
@@ -588,6 +596,7 @@ export const CAPABILITIES = {
588
596
  flag: "--all",
589
597
  kind: "switch",
590
598
  unless: "harnesses",
599
+ unless_resolution: "refuse",
591
600
  },
592
601
  {
593
602
  option: "exclude",
@@ -606,6 +615,7 @@ export const CAPABILITIES = {
606
615
  flag: "--config",
607
616
  kind: "value",
608
617
  unless: "noConfig",
618
+ unless_resolution: "refuse",
609
619
  },
610
620
  {
611
621
  option: "noConfig",
@@ -643,6 +653,7 @@ export const CAPABILITIES = {
643
653
  flag: "--config",
644
654
  kind: "value",
645
655
  unless: "noConfig",
656
+ unless_resolution: "refuse",
646
657
  },
647
658
  {
648
659
  option: "noConfig",
@@ -692,6 +703,7 @@ export const CAPABILITIES = {
692
703
  flag: "--config",
693
704
  kind: "value",
694
705
  unless: "noConfig",
706
+ unless_resolution: "refuse",
695
707
  },
696
708
  {
697
709
  option: "noConfig",
@@ -748,6 +760,7 @@ export const CAPABILITIES = {
748
760
  flag: "--all",
749
761
  kind: "switch",
750
762
  unless: "harnesses",
763
+ unless_resolution: "refuse",
751
764
  },
752
765
  {
753
766
  option: "exclude",
@@ -778,6 +791,7 @@ export const CAPABILITIES = {
778
791
  flag: "--config",
779
792
  kind: "value",
780
793
  unless: "noConfig",
794
+ unless_resolution: "refuse",
781
795
  },
782
796
  {
783
797
  option: "noConfig",
@@ -907,6 +921,7 @@ export const CAPABILITIES = {
907
921
  flag: "",
908
922
  kind: "positional",
909
923
  unless: "last",
924
+ unless_resolution: "prefer",
910
925
  },
911
926
  {
912
927
  option: "last",
@@ -925,6 +940,7 @@ export const CAPABILITIES = {
925
940
  flag: "--project",
926
941
  kind: "value",
927
942
  unless: "allProjects",
943
+ unless_resolution: "refuse",
928
944
  },
929
945
  {
930
946
  option: "allProjects",
@@ -943,6 +959,7 @@ export const CAPABILITIES = {
943
959
  flag: "--config",
944
960
  kind: "value",
945
961
  unless: "noConfig",
962
+ unless_resolution: "refuse",
946
963
  },
947
964
  {
948
965
  option: "noConfig",
@@ -979,6 +996,7 @@ export const CAPABILITIES = {
979
996
  flag: "--project",
980
997
  kind: "value",
981
998
  unless: "allProjects",
999
+ unless_resolution: "refuse",
982
1000
  },
983
1001
  {
984
1002
  option: "allProjects",
@@ -997,6 +1015,7 @@ export const CAPABILITIES = {
997
1015
  flag: "--config",
998
1016
  kind: "value",
999
1017
  unless: "noConfig",
1018
+ unless_resolution: "refuse",
1000
1019
  },
1001
1020
  {
1002
1021
  option: "noConfig",
@@ -1045,6 +1064,7 @@ export const CAPABILITIES = {
1045
1064
  flag: "--project",
1046
1065
  kind: "value",
1047
1066
  unless: "allProjects",
1067
+ unless_resolution: "refuse",
1048
1068
  },
1049
1069
  {
1050
1070
  option: "allProjects",
@@ -1069,6 +1089,7 @@ export const CAPABILITIES = {
1069
1089
  flag: "--config",
1070
1090
  kind: "value",
1071
1091
  unless: "noConfig",
1092
+ unless_resolution: "refuse",
1072
1093
  },
1073
1094
  {
1074
1095
  option: "noConfig",
@@ -1094,6 +1115,7 @@ export const CAPABILITIES = {
1094
1115
  flag: "--project",
1095
1116
  kind: "value",
1096
1117
  unless: "allProjects",
1118
+ unless_resolution: "refuse",
1097
1119
  },
1098
1120
  {
1099
1121
  option: "allProjects",
@@ -1118,6 +1140,7 @@ export const CAPABILITIES = {
1118
1140
  flag: "--config",
1119
1141
  kind: "value",
1120
1142
  unless: "noConfig",
1143
+ unless_resolution: "refuse",
1121
1144
  },
1122
1145
  {
1123
1146
  option: "noConfig",
@@ -1149,6 +1172,7 @@ export const CAPABILITIES = {
1149
1172
  flag: "--config",
1150
1173
  kind: "value",
1151
1174
  unless: "noConfig",
1175
+ unless_resolution: "refuse",
1152
1176
  },
1153
1177
  {
1154
1178
  option: "noConfig",
@@ -47,6 +47,17 @@ export type ControlReason = "unsupported" | "no_active_turn" | "not_running";
47
47
  * frame's `v` is what leaves room for `steer` later.
48
48
  */
49
49
  export type ControlVerb = "interrupt";
50
+ /**
51
+ * Why a candidate fell through — the closed set [`startup_failure_reason`]
52
+ * decides and [`crate::domain::report::FallThrough`] reports.
53
+ *
54
+ * A type rather than a token, because the set is closed and every reader
55
+ * downstream branches on it: a value no classifier produced cannot be built,
56
+ * and the JSON spelling below is the schema's rather than each call site's. A
57
+ * new variant is a report `schema_version` bump like any other enum value, since
58
+ * a consumer matching exhaustively learns of it only from the version.
59
+ */
60
+ export type FallThroughReason = "not-installed" | "spawn-error" | "auth" | "quota" | "session-not-found" | "untrusted-directory" | "input-too-large" | "model-not-found" | "rate-limit";
50
61
  export type ToolCallStatus = "completed" | "failed" | "timeout" | "interrupted";
51
62
  /**
52
63
  * How a normalized tool interval was obtained.
@@ -63,7 +74,7 @@ export type TimingSource = "provider_measured" | "stdout_observed";
63
74
  * the report, history) one definition to share instead of scattered string
64
75
  * literals.
65
76
  */
66
- export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred";
77
+ export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large";
67
78
  /**
68
79
  * How a harness emits its result, which decides how `text` is extracted.
69
80
  *
@@ -276,7 +287,8 @@ export interface FallbackReport {
276
287
  /**
277
288
  * The candidates fallen through because they could not run the task at all,
278
289
  * in priority order, each with why (`not-installed`, `spawn-error`, `auth`,
279
- * `quota`, and — on a model fan-out — `model-not-found` / `rate-limit`; see
290
+ * `quota`, `session-not-found`, `untrusted-directory`, `input-too-large`,
291
+ * and — on a model fan-out — `model-not-found` / `rate-limit`; see
280
292
  * [`crate::domain::fallback::startup_failure_reason`]).
281
293
  */
282
294
  fell_through: FallThrough[];
@@ -291,15 +303,29 @@ export interface FallbackReport {
291
303
  * One candidate a fallback run fell through, with the reason it could not run.
292
304
  */
293
305
  export interface FallThrough {
306
+ /**
307
+ * This candidate's own account of why it could not run: its
308
+ * [`RunResult::error`], copied — one value with one source, not a second
309
+ * rendering of it. `null` when the candidate said nothing beyond its status.
310
+ *
311
+ * So when the provider named the cause in machine-readable terms, what
312
+ * arrives here is the sentence naming the harness with that object **quoted
313
+ * inside it** (`… refused the request before running it:
314
+ * {"input_error_code":"input_too_large",…}`) — the object verbatim, not the
315
+ * object alone. A reader extracts it; nothing paraphrases it on the way.
316
+ *
317
+ * The `reason` above is oneharness's classification and stays a short,
318
+ * closed token; this is the cause underneath it, carried up so a supervisor
319
+ * reading only the fallback block never has to re-parse a fallen-through
320
+ * candidate's raw stdout to learn what the provider already said. Added in
321
+ * report schema `0.8`.
322
+ */
323
+ detail: string | null;
294
324
  /**
295
325
  * Canonical harness id.
296
326
  */
297
327
  harness: string;
298
- /**
299
- * Short reason token (`not-installed` / `spawn-error` / `auth` / `quota` /
300
- * `model-not-found` / `rate-limit`).
301
- */
302
- reason: string;
328
+ reason: FallThroughReason;
303
329
  [k: string]: unknown;
304
330
  }
305
331
  /**
@@ -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";
9
+ schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
10
10
  type: "event";
11
11
  variant?: string | null | undefined;
12
12
  [k: string]: unknown;
@@ -27,7 +27,7 @@ export type HistoryLine = ({
27
27
  [k: string]: unknown;
28
28
  } | ({
29
29
  error: string;
30
- schema_version?: "1.3" | "1.4" | "1.5" | undefined;
30
+ schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | undefined;
31
31
  [k: string]: unknown;
32
32
  } & ({
33
33
  status?: "nonzero" | "timeout" | "cancelled" | "spawn-error" | "skipped" | undefined;
@@ -39,15 +39,21 @@ export type HistoryLine = ({
39
39
  status?: "ok" | "nonzero" | "timeout" | "spawn-error" | "skipped" | "planned" | undefined;
40
40
  [k: string]: unknown;
41
41
  } | {
42
- schema_version?: "1.4" | "1.5" | undefined;
42
+ schema_version?: "1.4" | "1.5" | "1.6" | undefined;
43
43
  [k: string]: unknown;
44
- }) & ({
45
- failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | null | undefined;
44
+ }) & (({
45
+ failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | null;
46
46
  [k: string]: unknown;
47
47
  } | {
48
- schema_version?: "1.5" | undefined;
48
+ schema_version?: "1.5" | "1.6" | undefined;
49
49
  [k: string]: unknown;
50
50
  }) & ({
51
+ failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | null;
52
+ [k: string]: unknown;
53
+ } | {
54
+ schema_version?: "1.6" | undefined;
55
+ [k: string]: unknown;
56
+ })) & ({
51
57
  duration_ms: number;
52
58
  /**
53
59
  * Normalized failure text for a run that did not succeed (see
@@ -68,7 +74,7 @@ export type HistoryLine = ({
68
74
  permission_mode: PermissionMode;
69
75
  project: string;
70
76
  prompt: string;
71
- schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5";
77
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
72
78
  session: string;
73
79
  session_id: string | null;
74
80
  started_at: string;
@@ -103,7 +109,7 @@ export type HistoryLine = ({
103
109
  permission_mode: PermissionMode;
104
110
  project: string;
105
111
  prompt: string;
106
- schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5";
112
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
107
113
  session: string;
108
114
  session_id: string | null;
109
115
  started_at: string;
@@ -138,7 +144,7 @@ export type HistoryLine = ({
138
144
  permission_mode: PermissionMode;
139
145
  project: string;
140
146
  prompt: string;
141
- schema_version: "1.2" | "1.3" | "1.4" | "1.5";
147
+ schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
142
148
  session: string;
143
149
  session_id: string | null;
144
150
  started_at?: never | undefined;
@@ -173,7 +179,7 @@ export type HistoryLine = ({
173
179
  permission_mode: PermissionMode;
174
180
  project: string;
175
181
  prompt: string;
176
- schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5";
182
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
177
183
  session: string;
178
184
  session_id: string | null;
179
185
  started_at?: never | undefined;
@@ -208,7 +214,7 @@ export type HistoryLine = ({
208
214
  permission_mode: PermissionMode;
209
215
  project: string;
210
216
  prompt: string;
211
- schema_version: "1.3" | "1.4" | "1.5";
217
+ schema_version: "1.3" | "1.4" | "1.5" | "1.6";
212
218
  session: string;
213
219
  session_id: string | null;
214
220
  started_at: string;
@@ -243,7 +249,7 @@ export type HistoryLine = ({
243
249
  permission_mode: PermissionMode;
244
250
  project: string;
245
251
  prompt: string;
246
- schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5";
252
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
247
253
  session: string;
248
254
  session_id: string | null;
249
255
  started_at?: never | undefined;
@@ -274,7 +280,7 @@ export type TimingSource = "provider_measured" | "stdout_observed";
274
280
  * the report, history) one definition to share instead of scattered string
275
281
  * literals.
276
282
  */
277
- export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred";
283
+ export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large";
278
284
  /**
279
285
  * The unified approval mode, from least to most autonomy. A harness may not
280
286
  * support every value (see [`crate::domain::harness::HarnessSpec::mode`]); the
@@ -93,7 +93,7 @@ export type HistoryRecord = {
93
93
  * run's single prompt).
94
94
  */
95
95
  prompt: string;
96
- schema_version: "1.2" | "1.3" | "1.4" | "1.5";
96
+ schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
97
97
  /**
98
98
  * The oneharness session id this run belongs to (the history file's stem).
99
99
  */
@@ -323,7 +323,7 @@ export type HistoryRecord = {
323
323
  * run's single prompt).
324
324
  */
325
325
  prompt: string;
326
- schema_version: "1.2" | "1.3" | "1.4" | "1.5";
326
+ schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
327
327
  /**
328
328
  * The oneharness session id this run belongs to (the history file's stem).
329
329
  */
@@ -415,7 +415,7 @@ export type HistoryRecord = {
415
415
  * run's single prompt).
416
416
  */
417
417
  prompt: string;
418
- schema_version: "1.2" | "1.3" | "1.4" | "1.5";
418
+ schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
419
419
  /**
420
420
  * The oneharness session id this run belongs to (the history file's stem).
421
421
  */
@@ -507,7 +507,7 @@ export type HistoryRecord = {
507
507
  * run's single prompt).
508
508
  */
509
509
  prompt: string;
510
- schema_version: "1.2" | "1.3" | "1.4" | "1.5";
510
+ schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6";
511
511
  /**
512
512
  * The oneharness session id this run belongs to (the history file's stem).
513
513
  */
@@ -599,7 +599,7 @@ export type HistoryRecord = {
599
599
  * run's single prompt).
600
600
  */
601
601
  prompt: string;
602
- schema_version: "1.3" | "1.4" | "1.5";
602
+ schema_version: "1.3" | "1.4" | "1.5" | "1.6";
603
603
  /**
604
604
  * The oneharness session id this run belongs to (the history file's stem).
605
605
  */
@@ -951,7 +951,7 @@ export type TimingSource = "provider_measured" | "stdout_observed";
951
951
  * the report, history) one definition to share instead of scattered string
952
952
  * literals.
953
953
  */
954
- export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred";
954
+ export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large";
955
955
  /**
956
956
  * The outcome of attempting to run one harness.
957
957
  */
@@ -961,7 +961,7 @@ export type HistoryRecords = (({
961
961
  [k: string]: unknown;
962
962
  } | ({
963
963
  error: string;
964
- schema_version?: "1.3" | "1.4" | "1.5" | undefined;
964
+ schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | undefined;
965
965
  [k: string]: unknown;
966
966
  } & ({
967
967
  status?: "nonzero" | "timeout" | "cancelled" | "spawn-error" | "skipped" | undefined;
@@ -973,15 +973,21 @@ export type HistoryRecords = (({
973
973
  status?: "ok" | "nonzero" | "timeout" | "spawn-error" | "skipped" | "planned" | undefined;
974
974
  [k: string]: unknown;
975
975
  } | {
976
- schema_version?: "1.4" | "1.5" | undefined;
976
+ schema_version?: "1.4" | "1.5" | "1.6" | undefined;
977
+ [k: string]: unknown;
978
+ }) & (({
979
+ failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | null;
980
+ [k: string]: unknown;
981
+ } | {
982
+ schema_version?: "1.5" | "1.6" | undefined;
977
983
  [k: string]: unknown;
978
984
  }) & ({
979
- failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | null | undefined;
985
+ failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | null;
980
986
  [k: string]: unknown;
981
987
  } | {
982
- schema_version?: "1.5" | undefined;
988
+ schema_version?: "1.6" | undefined;
983
989
  [k: string]: unknown;
984
- }) & HistoryRecord)[];
990
+ })) & HistoryRecord)[];
985
991
  /**
986
992
  * One normalized action a harness took, harness-agnostic so a single consumer
987
993
  * assertion works across harnesses. Every field is always serialized (null when