@oneharness/sdk 0.5.9 → 0.5.11
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/contracts.d.ts +8 -0
- package/dist/generated/history-line.d.ts +58 -5
- package/dist/generated/history-records.d.ts +429 -12
- package/dist/generated/history-stream-envelope.d.ts +445 -20
- package/dist/generated/history.d.ts +429 -12
- package/dist/generated/run-stream-envelope.d.ts +8 -0
- package/dist/generated/schemas.json +4954 -2238
- package/dist/generated/zod.d.ts +2 -1
- package/dist/generated/zod.js +347 -37
- package/package.json +2 -2
|
@@ -69,6 +69,7 @@ export type HistoryRecord = {
|
|
|
69
69
|
* every record so a reader can resolve a session by name from any line.
|
|
70
70
|
*/
|
|
71
71
|
name: string;
|
|
72
|
+
observed_tool_ms?: never | undefined;
|
|
72
73
|
/**
|
|
73
74
|
* The normalized approval mode requested for the run.
|
|
74
75
|
*/
|
|
@@ -83,7 +84,7 @@ export type HistoryRecord = {
|
|
|
83
84
|
* run's single prompt).
|
|
84
85
|
*/
|
|
85
86
|
prompt: string;
|
|
86
|
-
schema_version: "1.
|
|
87
|
+
schema_version: "1.2";
|
|
87
88
|
/**
|
|
88
89
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
89
90
|
*/
|
|
@@ -117,7 +118,7 @@ export type HistoryRecord = {
|
|
|
117
118
|
* Best-effort normalized tool-call events; `null` when the harness exposes
|
|
118
119
|
* no machine-readable trace.
|
|
119
120
|
*/
|
|
120
|
-
events: ((ActionEvent & {
|
|
121
|
+
events: (((ActionEvent & {
|
|
121
122
|
duration_ms: number;
|
|
122
123
|
finished_at: string;
|
|
123
124
|
kind: "tool_call";
|
|
@@ -148,7 +149,10 @@ export type HistoryRecord = {
|
|
|
148
149
|
}) | (ActionEvent & {
|
|
149
150
|
kind?: "tool_result" | undefined;
|
|
150
151
|
[k: string]: unknown;
|
|
151
|
-
}))
|
|
152
|
+
})) & {
|
|
153
|
+
timing_source?: never | undefined;
|
|
154
|
+
[k: string]: unknown;
|
|
155
|
+
})[] | null;
|
|
152
156
|
exit_code: number | null;
|
|
153
157
|
/**
|
|
154
158
|
* Best-effort classified failure reason (see [`FailureKind`]); `null` when
|
|
@@ -177,6 +181,7 @@ export type HistoryRecord = {
|
|
|
177
181
|
* every record so a reader can resolve a session by name from any line.
|
|
178
182
|
*/
|
|
179
183
|
name: string;
|
|
184
|
+
observed_tool_ms?: never | undefined;
|
|
180
185
|
/**
|
|
181
186
|
* The normalized approval mode requested for the run.
|
|
182
187
|
*/
|
|
@@ -191,7 +196,7 @@ export type HistoryRecord = {
|
|
|
191
196
|
* run's single prompt).
|
|
192
197
|
*/
|
|
193
198
|
prompt: string;
|
|
194
|
-
schema_version: "1.
|
|
199
|
+
schema_version: "1.1";
|
|
195
200
|
/**
|
|
196
201
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
197
202
|
*/
|
|
@@ -219,6 +224,118 @@ export type HistoryRecord = {
|
|
|
219
224
|
usage: Usage1;
|
|
220
225
|
variant?: string | null | undefined;
|
|
221
226
|
[k: string]: unknown;
|
|
227
|
+
} | {
|
|
228
|
+
duration_ms: number;
|
|
229
|
+
/**
|
|
230
|
+
* Best-effort normalized tool-call events; `null` when the harness exposes
|
|
231
|
+
* no machine-readable trace.
|
|
232
|
+
*/
|
|
233
|
+
events: (((ActionEvent & {
|
|
234
|
+
duration_ms: number;
|
|
235
|
+
finished_at: string;
|
|
236
|
+
kind: "tool_call";
|
|
237
|
+
started_at: string;
|
|
238
|
+
status: "completed";
|
|
239
|
+
tool_call_id: string;
|
|
240
|
+
[k: string]: unknown;
|
|
241
|
+
}) | (ActionEvent & {
|
|
242
|
+
duration_ms: number;
|
|
243
|
+
finished_at: string;
|
|
244
|
+
kind: "tool_call";
|
|
245
|
+
started_at: string;
|
|
246
|
+
status: "failed";
|
|
247
|
+
tool_call_id: string;
|
|
248
|
+
[k: string]: unknown;
|
|
249
|
+
}) | (ActionEvent & {
|
|
250
|
+
kind: "tool_call";
|
|
251
|
+
started_at: string;
|
|
252
|
+
status: "timeout";
|
|
253
|
+
tool_call_id: string;
|
|
254
|
+
[k: string]: unknown;
|
|
255
|
+
}) | (ActionEvent & {
|
|
256
|
+
kind: "tool_call";
|
|
257
|
+
started_at: string;
|
|
258
|
+
status: "interrupted";
|
|
259
|
+
tool_call_id: string;
|
|
260
|
+
[k: string]: unknown;
|
|
261
|
+
}) | (ActionEvent & {
|
|
262
|
+
kind?: "tool_result" | undefined;
|
|
263
|
+
[k: string]: unknown;
|
|
264
|
+
})) & {
|
|
265
|
+
timing_source?: never | undefined;
|
|
266
|
+
[k: string]: unknown;
|
|
267
|
+
})[] | null;
|
|
268
|
+
exit_code: number | null;
|
|
269
|
+
/**
|
|
270
|
+
* Best-effort classified failure reason (see [`FailureKind`]); `null` when
|
|
271
|
+
* unclassified.
|
|
272
|
+
*/
|
|
273
|
+
failure_kind: FailureKind | null;
|
|
274
|
+
finished_at: string | null;
|
|
275
|
+
/**
|
|
276
|
+
* Canonical harness id (e.g. `claude-code`).
|
|
277
|
+
*/
|
|
278
|
+
harness: string;
|
|
279
|
+
harness_id?: string | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* Globally unique, time-ordered record id. This is also the cursor accepted
|
|
282
|
+
* by `history watch --after` and the exact id accepted by history lookup.
|
|
283
|
+
*/
|
|
284
|
+
history_id: string;
|
|
285
|
+
labels?: HistoryLabels2 | undefined;
|
|
286
|
+
/**
|
|
287
|
+
* The effective top-level model for the run, if any.
|
|
288
|
+
*/
|
|
289
|
+
model: string | null;
|
|
290
|
+
model_ms: number;
|
|
291
|
+
/**
|
|
292
|
+
* The human-meaningful session name (see [`session_name`]); repeated on
|
|
293
|
+
* every record so a reader can resolve a session by name from any line.
|
|
294
|
+
*/
|
|
295
|
+
name: string;
|
|
296
|
+
observed_tool_ms?: never | undefined;
|
|
297
|
+
/**
|
|
298
|
+
* The normalized approval mode requested for the run.
|
|
299
|
+
*/
|
|
300
|
+
permission_mode: "read-only" | "plan" | "default" | "edit" | "auto" | "bypass";
|
|
301
|
+
/**
|
|
302
|
+
* The project directory the run operated in (the real path, not the
|
|
303
|
+
* on-disk slug), so the list view can show where a session ran.
|
|
304
|
+
*/
|
|
305
|
+
project: string;
|
|
306
|
+
/**
|
|
307
|
+
* The prompt this harness run received (its own, on a batch run; else the
|
|
308
|
+
* run's single prompt).
|
|
309
|
+
*/
|
|
310
|
+
prompt: string;
|
|
311
|
+
schema_version: "1.0";
|
|
312
|
+
/**
|
|
313
|
+
* The oneharness session id this run belongs to (the history file's stem).
|
|
314
|
+
*/
|
|
315
|
+
session: string;
|
|
316
|
+
/**
|
|
317
|
+
* The harness's own continuation id, when it exposed one; `null` otherwise.
|
|
318
|
+
*/
|
|
319
|
+
session_id: string | null;
|
|
320
|
+
started_at: string;
|
|
321
|
+
status: Status;
|
|
322
|
+
/**
|
|
323
|
+
* Best-effort final assistant text; `null` when extraction was impossible.
|
|
324
|
+
*/
|
|
325
|
+
text: string | null;
|
|
326
|
+
/**
|
|
327
|
+
* How `text` was extracted; `null` when absent.
|
|
328
|
+
*/
|
|
329
|
+
text_source: string | null;
|
|
330
|
+
time_to_first_token_ms?: number | null | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* RFC3339 UTC instant the record was written (append time).
|
|
333
|
+
*/
|
|
334
|
+
timestamp: string;
|
|
335
|
+
tool_ms: number;
|
|
336
|
+
usage: Usage2;
|
|
337
|
+
variant?: string | null | undefined;
|
|
338
|
+
[k: string]: unknown;
|
|
222
339
|
} | {
|
|
223
340
|
duration_ms: number | null;
|
|
224
341
|
/**
|
|
@@ -255,7 +372,7 @@ export type HistoryRecord = {
|
|
|
255
372
|
* by `history watch --after` and the exact id accepted by history lookup.
|
|
256
373
|
*/
|
|
257
374
|
history_id: string;
|
|
258
|
-
labels?:
|
|
375
|
+
labels?: HistoryLabels3 | undefined;
|
|
259
376
|
/**
|
|
260
377
|
* The effective top-level model for the run, if any.
|
|
261
378
|
*/
|
|
@@ -266,6 +383,178 @@ export type HistoryRecord = {
|
|
|
266
383
|
* every record so a reader can resolve a session by name from any line.
|
|
267
384
|
*/
|
|
268
385
|
name: string;
|
|
386
|
+
observed_tool_ms?: never | undefined;
|
|
387
|
+
/**
|
|
388
|
+
* The normalized approval mode requested for the run.
|
|
389
|
+
*/
|
|
390
|
+
permission_mode: "read-only" | "plan" | "default" | "edit" | "auto" | "bypass";
|
|
391
|
+
/**
|
|
392
|
+
* The project directory the run operated in (the real path, not the
|
|
393
|
+
* on-disk slug), so the list view can show where a session ran.
|
|
394
|
+
*/
|
|
395
|
+
project: string;
|
|
396
|
+
/**
|
|
397
|
+
* The prompt this harness run received (its own, on a batch run; else the
|
|
398
|
+
* run's single prompt).
|
|
399
|
+
*/
|
|
400
|
+
prompt: string;
|
|
401
|
+
schema_version: "1.2";
|
|
402
|
+
/**
|
|
403
|
+
* The oneharness session id this run belongs to (the history file's stem).
|
|
404
|
+
*/
|
|
405
|
+
session: string;
|
|
406
|
+
/**
|
|
407
|
+
* The harness's own continuation id, when it exposed one; `null` otherwise.
|
|
408
|
+
*/
|
|
409
|
+
session_id: string | null;
|
|
410
|
+
started_at?: never | undefined;
|
|
411
|
+
status: Status;
|
|
412
|
+
/**
|
|
413
|
+
* Best-effort final assistant text; `null` when extraction was impossible.
|
|
414
|
+
*/
|
|
415
|
+
text: string | null;
|
|
416
|
+
/**
|
|
417
|
+
* How `text` was extracted; `null` when absent.
|
|
418
|
+
*/
|
|
419
|
+
text_source: string | null;
|
|
420
|
+
time_to_first_token_ms?: never | undefined;
|
|
421
|
+
/**
|
|
422
|
+
* RFC3339 UTC instant the record was written (append time).
|
|
423
|
+
*/
|
|
424
|
+
timestamp: string;
|
|
425
|
+
tool_ms?: never | undefined;
|
|
426
|
+
usage: Usage3;
|
|
427
|
+
variant?: string | null | undefined;
|
|
428
|
+
[k: string]: unknown;
|
|
429
|
+
} | {
|
|
430
|
+
duration_ms: number;
|
|
431
|
+
/**
|
|
432
|
+
* Best-effort normalized tool-call events; `null` when the harness exposes
|
|
433
|
+
* no machine-readable trace.
|
|
434
|
+
*/
|
|
435
|
+
events: ActionEvent[] | null;
|
|
436
|
+
exit_code: number | null;
|
|
437
|
+
/**
|
|
438
|
+
* Best-effort classified failure reason (see [`FailureKind`]); `null` when
|
|
439
|
+
* unclassified.
|
|
440
|
+
*/
|
|
441
|
+
failure_kind: FailureKind | null;
|
|
442
|
+
finished_at: null;
|
|
443
|
+
/**
|
|
444
|
+
* Canonical harness id (e.g. `claude-code`).
|
|
445
|
+
*/
|
|
446
|
+
harness: string;
|
|
447
|
+
harness_id: string;
|
|
448
|
+
/**
|
|
449
|
+
* Globally unique, time-ordered record id. This is also the cursor accepted
|
|
450
|
+
* by `history watch --after` and the exact id accepted by history lookup.
|
|
451
|
+
*/
|
|
452
|
+
history_id: string;
|
|
453
|
+
labels?: HistoryLabels4 | undefined;
|
|
454
|
+
/**
|
|
455
|
+
* The effective top-level model for the run, if any.
|
|
456
|
+
*/
|
|
457
|
+
model: string | null;
|
|
458
|
+
model_ms?: never | undefined;
|
|
459
|
+
/**
|
|
460
|
+
* The human-meaningful session name (see [`session_name`]); repeated on
|
|
461
|
+
* every record so a reader can resolve a session by name from any line.
|
|
462
|
+
*/
|
|
463
|
+
name: string;
|
|
464
|
+
observed_tool_ms: number;
|
|
465
|
+
/**
|
|
466
|
+
* The normalized approval mode requested for the run.
|
|
467
|
+
*/
|
|
468
|
+
permission_mode: "read-only" | "plan" | "default" | "edit" | "auto" | "bypass";
|
|
469
|
+
/**
|
|
470
|
+
* The project directory the run operated in (the real path, not the
|
|
471
|
+
* on-disk slug), so the list view can show where a session ran.
|
|
472
|
+
*/
|
|
473
|
+
project: string;
|
|
474
|
+
/**
|
|
475
|
+
* The prompt this harness run received (its own, on a batch run; else the
|
|
476
|
+
* run's single prompt).
|
|
477
|
+
*/
|
|
478
|
+
prompt: string;
|
|
479
|
+
schema_version: "1.2";
|
|
480
|
+
/**
|
|
481
|
+
* The oneharness session id this run belongs to (the history file's stem).
|
|
482
|
+
*/
|
|
483
|
+
session: string;
|
|
484
|
+
/**
|
|
485
|
+
* The harness's own continuation id, when it exposed one; `null` otherwise.
|
|
486
|
+
*/
|
|
487
|
+
session_id: string | null;
|
|
488
|
+
started_at?: never | undefined;
|
|
489
|
+
status: Status;
|
|
490
|
+
/**
|
|
491
|
+
* Best-effort final assistant text; `null` when extraction was impossible.
|
|
492
|
+
*/
|
|
493
|
+
text: string | null;
|
|
494
|
+
/**
|
|
495
|
+
* How `text` was extracted; `null` when absent.
|
|
496
|
+
*/
|
|
497
|
+
text_source: string | null;
|
|
498
|
+
time_to_first_token_ms?: never | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* RFC3339 UTC instant the record was written (append time).
|
|
501
|
+
*/
|
|
502
|
+
timestamp: string;
|
|
503
|
+
tool_ms?: never | undefined;
|
|
504
|
+
usage: Usage4;
|
|
505
|
+
variant?: string | null | undefined;
|
|
506
|
+
[k: string]: unknown;
|
|
507
|
+
} | {
|
|
508
|
+
duration_ms: number | null;
|
|
509
|
+
/**
|
|
510
|
+
* Best-effort normalized tool-call events; `null` when the harness exposes
|
|
511
|
+
* no machine-readable trace.
|
|
512
|
+
*/
|
|
513
|
+
events: ({
|
|
514
|
+
duration_ms?: null | undefined;
|
|
515
|
+
finished_at?: null | undefined;
|
|
516
|
+
index: number;
|
|
517
|
+
input: unknown;
|
|
518
|
+
kind: string;
|
|
519
|
+
name: string | null;
|
|
520
|
+
output: string | null;
|
|
521
|
+
started_at?: null | undefined;
|
|
522
|
+
status?: null | undefined;
|
|
523
|
+
tool_call_id?: string | null | undefined;
|
|
524
|
+
[k: string]: unknown;
|
|
525
|
+
} & {
|
|
526
|
+
timing_source?: never | undefined;
|
|
527
|
+
[k: string]: unknown;
|
|
528
|
+
})[] | null;
|
|
529
|
+
exit_code: number | null;
|
|
530
|
+
/**
|
|
531
|
+
* Best-effort classified failure reason (see [`FailureKind`]); `null` when
|
|
532
|
+
* unclassified.
|
|
533
|
+
*/
|
|
534
|
+
failure_kind: FailureKind | null;
|
|
535
|
+
finished_at: null;
|
|
536
|
+
/**
|
|
537
|
+
* Canonical harness id (e.g. `claude-code`).
|
|
538
|
+
*/
|
|
539
|
+
harness: string;
|
|
540
|
+
harness_id?: string | undefined;
|
|
541
|
+
/**
|
|
542
|
+
* Globally unique, time-ordered record id. This is also the cursor accepted
|
|
543
|
+
* by `history watch --after` and the exact id accepted by history lookup.
|
|
544
|
+
*/
|
|
545
|
+
history_id: string;
|
|
546
|
+
labels?: HistoryLabels5 | undefined;
|
|
547
|
+
/**
|
|
548
|
+
* The effective top-level model for the run, if any.
|
|
549
|
+
*/
|
|
550
|
+
model: string | null;
|
|
551
|
+
model_ms?: never | undefined;
|
|
552
|
+
/**
|
|
553
|
+
* The human-meaningful session name (see [`session_name`]); repeated on
|
|
554
|
+
* every record so a reader can resolve a session by name from any line.
|
|
555
|
+
*/
|
|
556
|
+
name: string;
|
|
557
|
+
observed_tool_ms?: never | undefined;
|
|
269
558
|
/**
|
|
270
559
|
* The normalized approval mode requested for the run.
|
|
271
560
|
*/
|
|
@@ -305,7 +594,7 @@ export type HistoryRecord = {
|
|
|
305
594
|
*/
|
|
306
595
|
timestamp: string;
|
|
307
596
|
tool_ms?: never | undefined;
|
|
308
|
-
usage:
|
|
597
|
+
usage: Usage5;
|
|
309
598
|
variant?: string | null | undefined;
|
|
310
599
|
[k: string]: unknown;
|
|
311
600
|
} | {
|
|
@@ -314,7 +603,7 @@ export type HistoryRecord = {
|
|
|
314
603
|
* Best-effort normalized tool-call events; `null` when the harness exposes
|
|
315
604
|
* no machine-readable trace.
|
|
316
605
|
*/
|
|
317
|
-
events: {
|
|
606
|
+
events: ({
|
|
318
607
|
duration_ms?: null | undefined;
|
|
319
608
|
finished_at?: null | undefined;
|
|
320
609
|
index: number;
|
|
@@ -326,7 +615,10 @@ export type HistoryRecord = {
|
|
|
326
615
|
status?: null | undefined;
|
|
327
616
|
tool_call_id?: string | null | undefined;
|
|
328
617
|
[k: string]: unknown;
|
|
329
|
-
}
|
|
618
|
+
} & {
|
|
619
|
+
timing_source?: never | undefined;
|
|
620
|
+
[k: string]: unknown;
|
|
621
|
+
})[] | null;
|
|
330
622
|
exit_code: number | null;
|
|
331
623
|
/**
|
|
332
624
|
* Best-effort classified failure reason (see [`FailureKind`]); `null` when
|
|
@@ -344,7 +636,7 @@ export type HistoryRecord = {
|
|
|
344
636
|
* by `history watch --after` and the exact id accepted by history lookup.
|
|
345
637
|
*/
|
|
346
638
|
history_id: string;
|
|
347
|
-
labels?:
|
|
639
|
+
labels?: HistoryLabels6 | undefined;
|
|
348
640
|
/**
|
|
349
641
|
* The effective top-level model for the run, if any.
|
|
350
642
|
*/
|
|
@@ -355,6 +647,7 @@ export type HistoryRecord = {
|
|
|
355
647
|
* every record so a reader can resolve a session by name from any line.
|
|
356
648
|
*/
|
|
357
649
|
name: string;
|
|
650
|
+
observed_tool_ms?: never | undefined;
|
|
358
651
|
/**
|
|
359
652
|
* The normalized approval mode requested for the run.
|
|
360
653
|
*/
|
|
@@ -394,7 +687,7 @@ export type HistoryRecord = {
|
|
|
394
687
|
*/
|
|
395
688
|
timestamp: string;
|
|
396
689
|
tool_ms?: never | undefined;
|
|
397
|
-
usage:
|
|
690
|
+
usage: Usage6;
|
|
398
691
|
variant?: string | null | undefined;
|
|
399
692
|
[k: string]: unknown;
|
|
400
693
|
} | {
|
|
@@ -424,7 +717,7 @@ export type HistoryRecord = {
|
|
|
424
717
|
* by `history watch --after` and the exact id accepted by history lookup.
|
|
425
718
|
*/
|
|
426
719
|
history_id: string;
|
|
427
|
-
labels?:
|
|
720
|
+
labels?: HistoryLabels7 | undefined;
|
|
428
721
|
/**
|
|
429
722
|
* The effective top-level model for the run, if any.
|
|
430
723
|
*/
|
|
@@ -435,6 +728,11 @@ export type HistoryRecord = {
|
|
|
435
728
|
* every record so a reader can resolve a session by name from any line.
|
|
436
729
|
*/
|
|
437
730
|
name: string;
|
|
731
|
+
/**
|
|
732
|
+
* Union of tool intervals observed at the stdout pipe. Unlike `tool_ms`,
|
|
733
|
+
* this is not provider-measured and has no model-latency counterpart.
|
|
734
|
+
*/
|
|
735
|
+
observed_tool_ms?: number | null | undefined;
|
|
438
736
|
/**
|
|
439
737
|
* The normalized approval mode requested for the run.
|
|
440
738
|
*/
|
|
@@ -480,11 +778,15 @@ export type HistoryRecord = {
|
|
|
480
778
|
*/
|
|
481
779
|
timestamp: string;
|
|
482
780
|
tool_ms?: number | null | undefined;
|
|
483
|
-
usage:
|
|
781
|
+
usage: Usage7;
|
|
484
782
|
variant?: string | null | undefined;
|
|
485
783
|
[k: string]: unknown;
|
|
486
784
|
};
|
|
487
785
|
export type ToolCallStatus = "completed" | "failed" | "timeout" | "interrupted";
|
|
786
|
+
/**
|
|
787
|
+
* How a normalized tool interval was obtained.
|
|
788
|
+
*/
|
|
789
|
+
export type TimingSource = "provider_measured" | "stdout_observed";
|
|
488
790
|
/**
|
|
489
791
|
* The normalized, closed set of failure reasons oneharness can classify from a
|
|
490
792
|
* harness's output. It is the single source for the `failure_kind` contract
|
|
@@ -546,6 +848,10 @@ export interface ActionEvent {
|
|
|
546
848
|
* Terminal tool state, populated on history tool-call events.
|
|
547
849
|
*/
|
|
548
850
|
status: ToolCallStatus | null;
|
|
851
|
+
/**
|
|
852
|
+
* Provenance for the tool interval. Omitted when timing is unavailable.
|
|
853
|
+
*/
|
|
854
|
+
timing_source?: TimingSource | null | undefined;
|
|
549
855
|
/**
|
|
550
856
|
* Stable call identity within the session. Present on tool calls and their
|
|
551
857
|
* matching results when the provider exposes an identity; history fills a
|
|
@@ -739,3 +1045,114 @@ export interface Usage4 {
|
|
|
739
1045
|
output_tokens: number | null;
|
|
740
1046
|
[k: string]: unknown;
|
|
741
1047
|
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Caller-supplied metadata used to select related task-graph records.
|
|
1050
|
+
* Omitted on the wire when empty for additive compatibility.
|
|
1051
|
+
*/
|
|
1052
|
+
export interface HistoryLabels5 {
|
|
1053
|
+
[k: string]: string;
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Best-effort token/cost accounting (every field `null` when unreported).
|
|
1057
|
+
*/
|
|
1058
|
+
export interface Usage5 {
|
|
1059
|
+
/**
|
|
1060
|
+
* Prompt tokens served from the provider's prompt cache (a cheap read of a
|
|
1061
|
+
* previously-written prefix), when the harness reports them. `None` when the
|
|
1062
|
+
* harness does not surface cache counts — never `0` as a guess.
|
|
1063
|
+
*/
|
|
1064
|
+
cache_read_tokens: number | null;
|
|
1065
|
+
/**
|
|
1066
|
+
* Prompt tokens written to the provider's prompt cache (a.k.a. cache
|
|
1067
|
+
* creation), when the harness reports them. `None` when not surfaced.
|
|
1068
|
+
*/
|
|
1069
|
+
cache_write_tokens: number | null;
|
|
1070
|
+
/**
|
|
1071
|
+
* Total cost in USD, when the harness reports it (often absent on
|
|
1072
|
+
* subscription auth, where there is no per-call dollar figure).
|
|
1073
|
+
*/
|
|
1074
|
+
cost_usd: number | null;
|
|
1075
|
+
/**
|
|
1076
|
+
* Prompt/input tokens billed, when the harness reports them.
|
|
1077
|
+
*/
|
|
1078
|
+
input_tokens: number | null;
|
|
1079
|
+
/**
|
|
1080
|
+
* Completion/output tokens billed, when the harness reports them.
|
|
1081
|
+
*/
|
|
1082
|
+
output_tokens: number | null;
|
|
1083
|
+
[k: string]: unknown;
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Caller-supplied metadata used to select related task-graph records.
|
|
1087
|
+
* Omitted on the wire when empty for additive compatibility.
|
|
1088
|
+
*/
|
|
1089
|
+
export interface HistoryLabels6 {
|
|
1090
|
+
[k: string]: string;
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Best-effort token/cost accounting (every field `null` when unreported).
|
|
1094
|
+
*/
|
|
1095
|
+
export interface Usage6 {
|
|
1096
|
+
/**
|
|
1097
|
+
* Prompt tokens served from the provider's prompt cache (a cheap read of a
|
|
1098
|
+
* previously-written prefix), when the harness reports them. `None` when the
|
|
1099
|
+
* harness does not surface cache counts — never `0` as a guess.
|
|
1100
|
+
*/
|
|
1101
|
+
cache_read_tokens: number | null;
|
|
1102
|
+
/**
|
|
1103
|
+
* Prompt tokens written to the provider's prompt cache (a.k.a. cache
|
|
1104
|
+
* creation), when the harness reports them. `None` when not surfaced.
|
|
1105
|
+
*/
|
|
1106
|
+
cache_write_tokens: number | null;
|
|
1107
|
+
/**
|
|
1108
|
+
* Total cost in USD, when the harness reports it (often absent on
|
|
1109
|
+
* subscription auth, where there is no per-call dollar figure).
|
|
1110
|
+
*/
|
|
1111
|
+
cost_usd: number | null;
|
|
1112
|
+
/**
|
|
1113
|
+
* Prompt/input tokens billed, when the harness reports them.
|
|
1114
|
+
*/
|
|
1115
|
+
input_tokens: number | null;
|
|
1116
|
+
/**
|
|
1117
|
+
* Completion/output tokens billed, when the harness reports them.
|
|
1118
|
+
*/
|
|
1119
|
+
output_tokens: number | null;
|
|
1120
|
+
[k: string]: unknown;
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* Caller-supplied metadata used to select related task-graph records.
|
|
1124
|
+
* Omitted on the wire when empty for additive compatibility.
|
|
1125
|
+
*/
|
|
1126
|
+
export interface HistoryLabels7 {
|
|
1127
|
+
[k: string]: string;
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Best-effort token/cost accounting (every field `null` when unreported).
|
|
1131
|
+
*/
|
|
1132
|
+
export interface Usage7 {
|
|
1133
|
+
/**
|
|
1134
|
+
* Prompt tokens served from the provider's prompt cache (a cheap read of a
|
|
1135
|
+
* previously-written prefix), when the harness reports them. `None` when the
|
|
1136
|
+
* harness does not surface cache counts — never `0` as a guess.
|
|
1137
|
+
*/
|
|
1138
|
+
cache_read_tokens: number | null;
|
|
1139
|
+
/**
|
|
1140
|
+
* Prompt tokens written to the provider's prompt cache (a.k.a. cache
|
|
1141
|
+
* creation), when the harness reports them. `None` when not surfaced.
|
|
1142
|
+
*/
|
|
1143
|
+
cache_write_tokens: number | null;
|
|
1144
|
+
/**
|
|
1145
|
+
* Total cost in USD, when the harness reports it (often absent on
|
|
1146
|
+
* subscription auth, where there is no per-call dollar figure).
|
|
1147
|
+
*/
|
|
1148
|
+
cost_usd: number | null;
|
|
1149
|
+
/**
|
|
1150
|
+
* Prompt/input tokens billed, when the harness reports them.
|
|
1151
|
+
*/
|
|
1152
|
+
input_tokens: number | null;
|
|
1153
|
+
/**
|
|
1154
|
+
* Completion/output tokens billed, when the harness reports them.
|
|
1155
|
+
*/
|
|
1156
|
+
output_tokens: number | null;
|
|
1157
|
+
[k: string]: unknown;
|
|
1158
|
+
}
|