@oneharness/sdk 0.6.6 → 0.6.7

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.
@@ -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";
9
+ schema_version: "1.2" | "1.3";
10
10
  type: "event";
11
11
  variant?: string | null | undefined;
12
12
  [k: string]: unknown;
@@ -22,8 +22,26 @@ export type HistoryLine = ({
22
22
  type: "event";
23
23
  variant?: string | null | undefined;
24
24
  [k: string]: unknown;
25
- }) | ({
25
+ }) | (({
26
+ error?: null | undefined;
27
+ [k: string]: unknown;
28
+ } | ({
29
+ error: string;
30
+ schema_version?: "1.3" | undefined;
31
+ [k: string]: unknown;
32
+ } & ({
33
+ status?: "nonzero" | "timeout" | "spawn-error" | "skipped" | undefined;
34
+ [k: string]: unknown;
35
+ } | {
36
+ failure_kind: "tool_deferred";
37
+ [k: string]: unknown;
38
+ }))) & ({
26
39
  duration_ms: number;
40
+ /**
41
+ * Normalized failure text for a run that did not succeed (see
42
+ * [`HistoryRecord::error`]). Omitted on the wire when absent.
43
+ */
44
+ error?: string | null | undefined;
27
45
  exit_code: number | null;
28
46
  failure_kind: FailureKind | null;
29
47
  finished_at: string;
@@ -38,7 +56,7 @@ export type HistoryLine = ({
38
56
  permission_mode: PermissionMode;
39
57
  project: string;
40
58
  prompt: string;
41
- schema_version: "1.0" | "1.1" | "1.2";
59
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3";
42
60
  session: string;
43
61
  session_id: string | null;
44
62
  started_at: string;
@@ -54,6 +72,11 @@ export type HistoryLine = ({
54
72
  [k: string]: unknown;
55
73
  } | {
56
74
  duration_ms: number;
75
+ /**
76
+ * Normalized failure text for a run that did not succeed (see
77
+ * [`HistoryRecord::error`]). Omitted on the wire when absent.
78
+ */
79
+ error?: string | null | undefined;
57
80
  exit_code: number | null;
58
81
  failure_kind: FailureKind | null;
59
82
  finished_at: string | null;
@@ -68,7 +91,7 @@ export type HistoryLine = ({
68
91
  permission_mode: PermissionMode;
69
92
  project: string;
70
93
  prompt: string;
71
- schema_version: "1.0" | "1.1" | "1.2";
94
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3";
72
95
  session: string;
73
96
  session_id: string | null;
74
97
  started_at: string;
@@ -84,6 +107,11 @@ export type HistoryLine = ({
84
107
  [k: string]: unknown;
85
108
  } | {
86
109
  duration_ms: number;
110
+ /**
111
+ * Normalized failure text for a run that did not succeed (see
112
+ * [`HistoryRecord::error`]). Omitted on the wire when absent.
113
+ */
114
+ error?: string | null | undefined;
87
115
  exit_code: number | null;
88
116
  failure_kind: FailureKind | null;
89
117
  finished_at: null;
@@ -98,7 +126,7 @@ export type HistoryLine = ({
98
126
  permission_mode: PermissionMode;
99
127
  project: string;
100
128
  prompt: string;
101
- schema_version: "1.2";
129
+ schema_version: "1.2" | "1.3";
102
130
  session: string;
103
131
  session_id: string | null;
104
132
  started_at?: never | undefined;
@@ -114,6 +142,11 @@ export type HistoryLine = ({
114
142
  [k: string]: unknown;
115
143
  } | {
116
144
  duration_ms: number | null;
145
+ /**
146
+ * Normalized failure text for a run that did not succeed (see
147
+ * [`HistoryRecord::error`]). Omitted on the wire when absent.
148
+ */
149
+ error?: string | null | undefined;
117
150
  exit_code: number | null;
118
151
  failure_kind: FailureKind | null;
119
152
  finished_at: null;
@@ -128,11 +161,81 @@ export type HistoryLine = ({
128
161
  permission_mode: PermissionMode;
129
162
  project: string;
130
163
  prompt: string;
131
- schema_version: "1.0" | "1.1" | "1.2";
164
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3";
132
165
  session: string;
133
166
  session_id: string | null;
134
167
  started_at?: never | undefined;
135
- status: Status;
168
+ status: "nonzero" | "timeout" | "spawn-error" | "skipped";
169
+ text: string | null;
170
+ text_source: string | null;
171
+ time_to_first_token_ms?: never | undefined;
172
+ timestamp: string;
173
+ tool_ms?: never | undefined;
174
+ type: "run";
175
+ usage: Usage;
176
+ variant?: string | null | undefined;
177
+ [k: string]: unknown;
178
+ } | {
179
+ duration_ms: number;
180
+ /**
181
+ * Normalized failure text for a run that did not succeed (see
182
+ * [`HistoryRecord::error`]). Omitted on the wire when absent.
183
+ */
184
+ error?: string | null | undefined;
185
+ exit_code: number | null;
186
+ failure_kind: FailureKind | null;
187
+ finished_at: null;
188
+ harness: string;
189
+ harness_id?: string | null | undefined;
190
+ history_id: string;
191
+ labels?: HistoryLabels | undefined;
192
+ model: string | null;
193
+ model_ms?: never | undefined;
194
+ name: string;
195
+ observed_tool_ms?: never | undefined;
196
+ permission_mode: PermissionMode;
197
+ project: string;
198
+ prompt: string;
199
+ schema_version: "1.3";
200
+ session: string;
201
+ session_id: string | null;
202
+ started_at: string;
203
+ status: "nonzero" | "timeout" | "spawn-error" | "skipped";
204
+ text: string | null;
205
+ text_source: string | null;
206
+ time_to_first_token_ms?: number | null | undefined;
207
+ timestamp: string;
208
+ tool_ms?: never | undefined;
209
+ type: "run";
210
+ usage: Usage;
211
+ variant?: string | null | undefined;
212
+ [k: string]: unknown;
213
+ } | {
214
+ duration_ms: number | null;
215
+ /**
216
+ * Normalized failure text for a run that did not succeed (see
217
+ * [`HistoryRecord::error`]). Omitted on the wire when absent.
218
+ */
219
+ error?: string | null | undefined;
220
+ exit_code: number | null;
221
+ failure_kind: FailureKind | null;
222
+ finished_at: null;
223
+ harness: string;
224
+ harness_id?: string | null | undefined;
225
+ history_id: string;
226
+ labels?: HistoryLabels | undefined;
227
+ model: string | null;
228
+ model_ms?: never | undefined;
229
+ name: string;
230
+ observed_tool_ms?: never | undefined;
231
+ permission_mode: PermissionMode;
232
+ project: string;
233
+ prompt: string;
234
+ schema_version: "1.0" | "1.1" | "1.2" | "1.3";
235
+ session: string;
236
+ session_id: string | null;
237
+ started_at?: never | undefined;
238
+ status: "ok" | "planned";
136
239
  text: string | null;
137
240
  text_source: string | null;
138
241
  time_to_first_token_ms?: never | undefined;
@@ -142,7 +245,7 @@ export type HistoryLine = ({
142
245
  usage: Usage;
143
246
  variant?: string | null | undefined;
144
247
  [k: string]: unknown;
145
- });
248
+ }));
146
249
  export type ToolCallStatus = "completed" | "failed" | "timeout" | "interrupted";
147
250
  /**
148
251
  * How a normalized tool interval was obtained.