@oneharness/sdk 0.17.1 → 0.19.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.
- package/dist/generated/capabilities.d.ts +16 -11
- package/dist/generated/capabilities.js +17 -11
- package/dist/generated/config-options.d.ts +9 -1
- package/dist/generated/contracts.d.ts +11 -5
- package/dist/generated/detect-options.d.ts +9 -1
- package/dist/generated/history-clear-options.d.ts +9 -1
- package/dist/generated/history-line.d.ts +27 -5
- package/dist/generated/history-list-options.d.ts +5 -4
- package/dist/generated/history-list.d.ts +13 -3
- package/dist/generated/history-lookup.d.ts +10 -8
- package/dist/generated/history-migrate-options.d.ts +9 -1
- package/dist/generated/history-records.d.ts +17 -5
- package/dist/generated/history-stream-envelope.d.ts +33 -5
- package/dist/generated/history-watch-options.d.ts +11 -4
- package/dist/generated/history.d.ts +17 -5
- package/dist/generated/options.d.ts +9 -1
- package/dist/generated/run-stream-envelope.d.ts +11 -5
- package/dist/generated/schemas.json +270 -43
- package/dist/generated/sync-options.d.ts +9 -1
- package/dist/generated/usage-options.d.ts +9 -1
- package/dist/generated/zod.js +74 -11
- package/package.json +2 -2
|
@@ -202,7 +202,7 @@ export declare const CAPABILITIES: {
|
|
|
202
202
|
}, {
|
|
203
203
|
readonly option: "config";
|
|
204
204
|
readonly flag: "--config";
|
|
205
|
-
readonly kind: "
|
|
205
|
+
readonly kind: "repeated";
|
|
206
206
|
readonly unless: "noConfig";
|
|
207
207
|
readonly unless_resolution: "refuse";
|
|
208
208
|
}, {
|
|
@@ -447,7 +447,7 @@ export declare const CAPABILITIES: {
|
|
|
447
447
|
}, {
|
|
448
448
|
readonly option: "config";
|
|
449
449
|
readonly flag: "--config";
|
|
450
|
-
readonly kind: "
|
|
450
|
+
readonly kind: "repeated";
|
|
451
451
|
readonly unless: "noConfig";
|
|
452
452
|
readonly unless_resolution: "refuse";
|
|
453
453
|
}, {
|
|
@@ -581,7 +581,7 @@ export declare const CAPABILITIES: {
|
|
|
581
581
|
}, {
|
|
582
582
|
readonly option: "config";
|
|
583
583
|
readonly flag: "--config";
|
|
584
|
-
readonly kind: "
|
|
584
|
+
readonly kind: "repeated";
|
|
585
585
|
readonly unless: "noConfig";
|
|
586
586
|
readonly unless_resolution: "refuse";
|
|
587
587
|
}, {
|
|
@@ -614,7 +614,7 @@ export declare const CAPABILITIES: {
|
|
|
614
614
|
}, {
|
|
615
615
|
readonly option: "config";
|
|
616
616
|
readonly flag: "--config";
|
|
617
|
-
readonly kind: "
|
|
617
|
+
readonly kind: "repeated";
|
|
618
618
|
readonly unless: "noConfig";
|
|
619
619
|
readonly unless_resolution: "refuse";
|
|
620
620
|
}, {
|
|
@@ -662,7 +662,7 @@ export declare const CAPABILITIES: {
|
|
|
662
662
|
}, {
|
|
663
663
|
readonly option: "config";
|
|
664
664
|
readonly flag: "--config";
|
|
665
|
-
readonly kind: "
|
|
665
|
+
readonly kind: "repeated";
|
|
666
666
|
readonly unless: "noConfig";
|
|
667
667
|
readonly unless_resolution: "refuse";
|
|
668
668
|
}, {
|
|
@@ -738,7 +738,7 @@ export declare const CAPABILITIES: {
|
|
|
738
738
|
}, {
|
|
739
739
|
readonly option: "config";
|
|
740
740
|
readonly flag: "--config";
|
|
741
|
-
readonly kind: "
|
|
741
|
+
readonly kind: "repeated";
|
|
742
742
|
readonly unless: "noConfig";
|
|
743
743
|
readonly unless_resolution: "refuse";
|
|
744
744
|
}, {
|
|
@@ -879,7 +879,7 @@ export declare const CAPABILITIES: {
|
|
|
879
879
|
}, {
|
|
880
880
|
readonly option: "config";
|
|
881
881
|
readonly flag: "--config";
|
|
882
|
-
readonly kind: "
|
|
882
|
+
readonly kind: "repeated";
|
|
883
883
|
readonly unless: "noConfig";
|
|
884
884
|
readonly unless_resolution: "refuse";
|
|
885
885
|
}, {
|
|
@@ -923,7 +923,7 @@ export declare const CAPABILITIES: {
|
|
|
923
923
|
}, {
|
|
924
924
|
readonly option: "config";
|
|
925
925
|
readonly flag: "--config";
|
|
926
|
-
readonly kind: "
|
|
926
|
+
readonly kind: "repeated";
|
|
927
927
|
readonly unless: "noConfig";
|
|
928
928
|
readonly unless_resolution: "refuse";
|
|
929
929
|
}, {
|
|
@@ -958,6 +958,11 @@ export declare const CAPABILITIES: {
|
|
|
958
958
|
readonly flag: "--variant";
|
|
959
959
|
readonly kind: "value";
|
|
960
960
|
readonly unless: null;
|
|
961
|
+
}, {
|
|
962
|
+
readonly option: "session";
|
|
963
|
+
readonly flag: "--session";
|
|
964
|
+
readonly kind: "value";
|
|
965
|
+
readonly unless: null;
|
|
961
966
|
}, {
|
|
962
967
|
readonly option: "project";
|
|
963
968
|
readonly flag: "--project";
|
|
@@ -982,7 +987,7 @@ export declare const CAPABILITIES: {
|
|
|
982
987
|
}, {
|
|
983
988
|
readonly option: "config";
|
|
984
989
|
readonly flag: "--config";
|
|
985
|
-
readonly kind: "
|
|
990
|
+
readonly kind: "repeated";
|
|
986
991
|
readonly unless: "noConfig";
|
|
987
992
|
readonly unless_resolution: "refuse";
|
|
988
993
|
}, {
|
|
@@ -1026,7 +1031,7 @@ export declare const CAPABILITIES: {
|
|
|
1026
1031
|
}, {
|
|
1027
1032
|
readonly option: "config";
|
|
1028
1033
|
readonly flag: "--config";
|
|
1029
|
-
readonly kind: "
|
|
1034
|
+
readonly kind: "repeated";
|
|
1030
1035
|
readonly unless: "noConfig";
|
|
1031
1036
|
readonly unless_resolution: "refuse";
|
|
1032
1037
|
}, {
|
|
@@ -1054,7 +1059,7 @@ export declare const CAPABILITIES: {
|
|
|
1054
1059
|
}, {
|
|
1055
1060
|
readonly option: "config";
|
|
1056
1061
|
readonly flag: "--config";
|
|
1057
|
-
readonly kind: "
|
|
1062
|
+
readonly kind: "repeated";
|
|
1058
1063
|
readonly unless: "noConfig";
|
|
1059
1064
|
readonly unless_resolution: "refuse";
|
|
1060
1065
|
}, {
|
|
@@ -194,7 +194,7 @@ export const CAPABILITIES = {
|
|
|
194
194
|
{
|
|
195
195
|
option: "config",
|
|
196
196
|
flag: "--config",
|
|
197
|
-
kind: "
|
|
197
|
+
kind: "repeated",
|
|
198
198
|
unless: "noConfig",
|
|
199
199
|
unless_resolution: "refuse",
|
|
200
200
|
},
|
|
@@ -488,7 +488,7 @@ export const CAPABILITIES = {
|
|
|
488
488
|
{
|
|
489
489
|
option: "config",
|
|
490
490
|
flag: "--config",
|
|
491
|
-
kind: "
|
|
491
|
+
kind: "repeated",
|
|
492
492
|
unless: "noConfig",
|
|
493
493
|
unless_resolution: "refuse",
|
|
494
494
|
},
|
|
@@ -647,7 +647,7 @@ export const CAPABILITIES = {
|
|
|
647
647
|
{
|
|
648
648
|
option: "config",
|
|
649
649
|
flag: "--config",
|
|
650
|
-
kind: "
|
|
650
|
+
kind: "repeated",
|
|
651
651
|
unless: "noConfig",
|
|
652
652
|
unless_resolution: "refuse",
|
|
653
653
|
},
|
|
@@ -685,7 +685,7 @@ export const CAPABILITIES = {
|
|
|
685
685
|
{
|
|
686
686
|
option: "config",
|
|
687
687
|
flag: "--config",
|
|
688
|
-
kind: "
|
|
688
|
+
kind: "repeated",
|
|
689
689
|
unless: "noConfig",
|
|
690
690
|
unless_resolution: "refuse",
|
|
691
691
|
},
|
|
@@ -741,7 +741,7 @@ export const CAPABILITIES = {
|
|
|
741
741
|
{
|
|
742
742
|
option: "config",
|
|
743
743
|
flag: "--config",
|
|
744
|
-
kind: "
|
|
744
|
+
kind: "repeated",
|
|
745
745
|
unless: "noConfig",
|
|
746
746
|
unless_resolution: "refuse",
|
|
747
747
|
},
|
|
@@ -829,7 +829,7 @@ export const CAPABILITIES = {
|
|
|
829
829
|
{
|
|
830
830
|
option: "config",
|
|
831
831
|
flag: "--config",
|
|
832
|
-
kind: "
|
|
832
|
+
kind: "repeated",
|
|
833
833
|
unless: "noConfig",
|
|
834
834
|
unless_resolution: "refuse",
|
|
835
835
|
},
|
|
@@ -992,7 +992,7 @@ export const CAPABILITIES = {
|
|
|
992
992
|
{
|
|
993
993
|
option: "config",
|
|
994
994
|
flag: "--config",
|
|
995
|
-
kind: "
|
|
995
|
+
kind: "repeated",
|
|
996
996
|
unless: "noConfig",
|
|
997
997
|
unless_resolution: "refuse",
|
|
998
998
|
},
|
|
@@ -1043,7 +1043,7 @@ export const CAPABILITIES = {
|
|
|
1043
1043
|
{
|
|
1044
1044
|
option: "config",
|
|
1045
1045
|
flag: "--config",
|
|
1046
|
-
kind: "
|
|
1046
|
+
kind: "repeated",
|
|
1047
1047
|
unless: "noConfig",
|
|
1048
1048
|
unless_resolution: "refuse",
|
|
1049
1049
|
},
|
|
@@ -1084,6 +1084,12 @@ export const CAPABILITIES = {
|
|
|
1084
1084
|
kind: "value",
|
|
1085
1085
|
unless: null,
|
|
1086
1086
|
},
|
|
1087
|
+
{
|
|
1088
|
+
option: "session",
|
|
1089
|
+
flag: "--session",
|
|
1090
|
+
kind: "value",
|
|
1091
|
+
unless: null,
|
|
1092
|
+
},
|
|
1087
1093
|
{
|
|
1088
1094
|
option: "project",
|
|
1089
1095
|
flag: "--project",
|
|
@@ -1112,7 +1118,7 @@ export const CAPABILITIES = {
|
|
|
1112
1118
|
{
|
|
1113
1119
|
option: "config",
|
|
1114
1120
|
flag: "--config",
|
|
1115
|
-
kind: "
|
|
1121
|
+
kind: "repeated",
|
|
1116
1122
|
unless: "noConfig",
|
|
1117
1123
|
unless_resolution: "refuse",
|
|
1118
1124
|
},
|
|
@@ -1163,7 +1169,7 @@ export const CAPABILITIES = {
|
|
|
1163
1169
|
{
|
|
1164
1170
|
option: "config",
|
|
1165
1171
|
flag: "--config",
|
|
1166
|
-
kind: "
|
|
1172
|
+
kind: "repeated",
|
|
1167
1173
|
unless: "noConfig",
|
|
1168
1174
|
unless_resolution: "refuse",
|
|
1169
1175
|
},
|
|
@@ -1195,7 +1201,7 @@ export const CAPABILITIES = {
|
|
|
1195
1201
|
{
|
|
1196
1202
|
option: "config",
|
|
1197
1203
|
flag: "--config",
|
|
1198
|
-
kind: "
|
|
1204
|
+
kind: "repeated",
|
|
1199
1205
|
unless: "noConfig",
|
|
1200
1206
|
unless_resolution: "refuse",
|
|
1201
1207
|
},
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
* Options accepted by the language SDKs' `config()`.
|
|
3
3
|
*/
|
|
4
4
|
export interface ConfigOptions {
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Load configuration from exactly these files, in order, skipping
|
|
7
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
8
|
+
*/
|
|
9
|
+
config?: string[] | undefined;
|
|
6
10
|
cwd?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
13
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
14
|
+
*/
|
|
7
15
|
noConfig?: boolean | undefined;
|
|
8
16
|
}
|
|
@@ -566,8 +566,10 @@ export interface ActionEvent {
|
|
|
566
566
|
duration_ms: number | null;
|
|
567
567
|
finished_at: string | null;
|
|
568
568
|
/**
|
|
569
|
-
* Position of this event within the run, so "
|
|
570
|
-
*
|
|
569
|
+
* Position of this event within the run, so "did X before Y" is
|
|
570
|
+
* expressible from a stable ordering (also array order). It counts every
|
|
571
|
+
* kind, so tool calls interleaved with `message`/`reasoning` events do not
|
|
572
|
+
* carry contiguous indexes; count tool calls by `kind`, not by `index`.
|
|
571
573
|
*/
|
|
572
574
|
index: number;
|
|
573
575
|
/**
|
|
@@ -577,9 +579,13 @@ export interface ActionEvent {
|
|
|
577
579
|
*/
|
|
578
580
|
input: unknown;
|
|
579
581
|
/**
|
|
580
|
-
* The kind of event: `tool_call` (the model invoked a tool)
|
|
581
|
-
* `tool_result` (the observation returned to the model)
|
|
582
|
-
*
|
|
582
|
+
* The kind of event: `tool_call` (the model invoked a tool),
|
|
583
|
+
* `tool_result` (the observation returned to the model), `message` (the
|
|
584
|
+
* agent's own text, in `output`) or `reasoning` (its reasoning text, in
|
|
585
|
+
* `output`). A `message` or `reasoning` event is one finished item, never
|
|
586
|
+
* a token delta. Left open for future kinds rather than an enum, so a new
|
|
587
|
+
* shape never breaks the field — a consumer counting tool calls filters on
|
|
588
|
+
* it (see [`ActionEvent::is_tool_activity`]).
|
|
583
589
|
*/
|
|
584
590
|
kind: string;
|
|
585
591
|
/**
|
|
@@ -6,9 +6,17 @@ export interface DetectOptions {
|
|
|
6
6
|
bins?: {
|
|
7
7
|
[k: string]: string;
|
|
8
8
|
} | undefined;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Load configuration from exactly these files, in order, skipping
|
|
11
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
12
|
+
*/
|
|
13
|
+
config?: string[] | undefined;
|
|
10
14
|
exclude?: string[] | undefined;
|
|
11
15
|
harnesses?: string[] | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
18
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
19
|
+
*/
|
|
12
20
|
noConfig?: boolean | undefined;
|
|
13
21
|
/**
|
|
14
22
|
* Exit non-zero if any probed harness is not installed. The SDKs surface
|
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface HistoryClearOptions {
|
|
5
5
|
allProjects?: boolean | undefined;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Load configuration from exactly these files, in order, skipping
|
|
8
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
9
|
+
*/
|
|
10
|
+
config?: string[] | undefined;
|
|
7
11
|
historyDir?: string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
14
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
15
|
+
*/
|
|
8
16
|
noConfig?: boolean | undefined;
|
|
9
17
|
project?: string | undefined;
|
|
10
18
|
/**
|
|
@@ -7,6 +7,14 @@ export type HistoryLine = ({
|
|
|
7
7
|
harness_id?: string | null | undefined;
|
|
8
8
|
run_id: string;
|
|
9
9
|
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
10
|
+
/**
|
|
11
|
+
* The name of the session this line belongs to — the `name` its run's
|
|
12
|
+
* closing `run` line will carry — so a run still in progress (events but
|
|
13
|
+
* no closing line yet) can be listed and followed by name. Omitted when
|
|
14
|
+
* absent: lines written before it existed carry none, and every reader
|
|
15
|
+
* that predates it ignores it.
|
|
16
|
+
*/
|
|
17
|
+
session_name?: string | null | undefined;
|
|
10
18
|
type: "event";
|
|
11
19
|
variant?: string | null | undefined;
|
|
12
20
|
[k: string]: unknown;
|
|
@@ -19,6 +27,14 @@ export type HistoryLine = ({
|
|
|
19
27
|
harness_id?: string | null | undefined;
|
|
20
28
|
run_id: string;
|
|
21
29
|
schema_version: "1.0" | "1.1";
|
|
30
|
+
/**
|
|
31
|
+
* The name of the session this line belongs to — the `name` its run's
|
|
32
|
+
* closing `run` line will carry — so a run still in progress (events but
|
|
33
|
+
* no closing line yet) can be listed and followed by name. Omitted when
|
|
34
|
+
* absent: lines written before it existed carry none, and every reader
|
|
35
|
+
* that predates it ignores it.
|
|
36
|
+
*/
|
|
37
|
+
session_name?: string | null | undefined;
|
|
22
38
|
type: "event";
|
|
23
39
|
variant?: string | null | undefined;
|
|
24
40
|
[k: string]: unknown;
|
|
@@ -412,8 +428,10 @@ export interface ActionEvent {
|
|
|
412
428
|
duration_ms: number | null;
|
|
413
429
|
finished_at: string | null;
|
|
414
430
|
/**
|
|
415
|
-
* Position of this event within the run, so "
|
|
416
|
-
*
|
|
431
|
+
* Position of this event within the run, so "did X before Y" is
|
|
432
|
+
* expressible from a stable ordering (also array order). It counts every
|
|
433
|
+
* kind, so tool calls interleaved with `message`/`reasoning` events do not
|
|
434
|
+
* carry contiguous indexes; count tool calls by `kind`, not by `index`.
|
|
417
435
|
*/
|
|
418
436
|
index: number;
|
|
419
437
|
/**
|
|
@@ -423,9 +441,13 @@ export interface ActionEvent {
|
|
|
423
441
|
*/
|
|
424
442
|
input: unknown;
|
|
425
443
|
/**
|
|
426
|
-
* The kind of event: `tool_call` (the model invoked a tool)
|
|
427
|
-
* `tool_result` (the observation returned to the model)
|
|
428
|
-
*
|
|
444
|
+
* The kind of event: `tool_call` (the model invoked a tool),
|
|
445
|
+
* `tool_result` (the observation returned to the model), `message` (the
|
|
446
|
+
* agent's own text, in `output`) or `reasoning` (its reasoning text, in
|
|
447
|
+
* `output`). A `message` or `reasoning` event is one finished item, never
|
|
448
|
+
* a token delta. Left open for future kinds rather than an enum, so a new
|
|
449
|
+
* shape never breaks the field — a consumer counting tool calls filters on
|
|
450
|
+
* it (see [`ActionEvent::is_tool_activity`]).
|
|
429
451
|
*/
|
|
430
452
|
kind: string;
|
|
431
453
|
/**
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
export interface HistoryListOptions {
|
|
5
5
|
allProjects?: boolean | undefined;
|
|
6
6
|
/**
|
|
7
|
-
* Load configuration from exactly
|
|
8
|
-
* discovery.
|
|
7
|
+
* Load configuration from exactly these files, in order, skipping
|
|
8
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
9
9
|
*/
|
|
10
|
-
config?: string | undefined;
|
|
10
|
+
config?: string[] | undefined;
|
|
11
11
|
historyDir?: string | undefined;
|
|
12
12
|
/**
|
|
13
|
-
* Ignore every configuration file.
|
|
13
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
14
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
14
15
|
*/
|
|
15
16
|
noConfig?: boolean | undefined;
|
|
16
17
|
project?: string | undefined;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export type HistoryList = HistorySessionSummary[];
|
|
2
2
|
/**
|
|
3
|
-
* A one-line summary of a session, for `oneharness history list
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
3
|
+
* A one-line summary of a session, for `oneharness history list`, read from
|
|
4
|
+
* both its closing `run` records and its event lines. `name`/`project`/
|
|
5
|
+
* `started` come from the first record; a session still in its first turn has
|
|
6
|
+
* none yet, so they fall back to the events' `session_name`, the project
|
|
7
|
+
* directory's slug, and the instant in the session id. `harnesses` is the
|
|
8
|
+
* distinct set across records and events, and `running` says an event's run
|
|
9
|
+
* has no closing record yet.
|
|
6
10
|
*/
|
|
7
11
|
export interface HistorySessionSummary {
|
|
8
12
|
/**
|
|
@@ -30,6 +34,12 @@ export interface HistorySessionSummary {
|
|
|
30
34
|
* How many harness-run records the session holds.
|
|
31
35
|
*/
|
|
32
36
|
record_count: number;
|
|
37
|
+
/**
|
|
38
|
+
* Whether a harness run in this session has written events but not yet
|
|
39
|
+
* its closing record — the run is still going (or ended without one: a
|
|
40
|
+
* killed process leaves the same file). Omitted when false.
|
|
41
|
+
*/
|
|
42
|
+
running?: boolean | undefined;
|
|
33
43
|
/**
|
|
34
44
|
* The RFC3339 UTC start time (first record's timestamp); empty if unknown.
|
|
35
45
|
*/
|
|
@@ -34,10 +34,10 @@ export interface HistoryLookupByLast {
|
|
|
34
34
|
all?: boolean | undefined;
|
|
35
35
|
allProjects?: boolean | undefined;
|
|
36
36
|
/**
|
|
37
|
-
* Load configuration from exactly
|
|
38
|
-
* discovery.
|
|
37
|
+
* Load configuration from exactly these files, in order, skipping
|
|
38
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
39
39
|
*/
|
|
40
|
-
config?: string | undefined;
|
|
40
|
+
config?: string[] | undefined;
|
|
41
41
|
historyDir?: string | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Select the most recent session. Only `true` selects, so this variant
|
|
@@ -45,7 +45,8 @@ export interface HistoryLookupByLast {
|
|
|
45
45
|
*/
|
|
46
46
|
last: true;
|
|
47
47
|
/**
|
|
48
|
-
* Ignore every configuration file.
|
|
48
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
49
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
49
50
|
*/
|
|
50
51
|
noConfig?: boolean | undefined;
|
|
51
52
|
project?: string | undefined;
|
|
@@ -67,10 +68,10 @@ export interface HistoryLookupBySession {
|
|
|
67
68
|
all?: boolean | undefined;
|
|
68
69
|
allProjects?: boolean | undefined;
|
|
69
70
|
/**
|
|
70
|
-
* Load configuration from exactly
|
|
71
|
-
* discovery.
|
|
71
|
+
* Load configuration from exactly these files, in order, skipping
|
|
72
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
72
73
|
*/
|
|
73
|
-
config?: string | undefined;
|
|
74
|
+
config?: string[] | undefined;
|
|
74
75
|
historyDir?: string | undefined;
|
|
75
76
|
/**
|
|
76
77
|
* Whether the most recent session was asked for instead. An ordinary
|
|
@@ -80,7 +81,8 @@ export interface HistoryLookupBySession {
|
|
|
80
81
|
*/
|
|
81
82
|
last?: boolean | undefined;
|
|
82
83
|
/**
|
|
83
|
-
* Ignore every configuration file.
|
|
84
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
85
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
84
86
|
*/
|
|
85
87
|
noConfig?: boolean | undefined;
|
|
86
88
|
project?: string | undefined;
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
* Options accepted by the language SDKs' `historyMigrate()`.
|
|
3
3
|
*/
|
|
4
4
|
export interface HistoryMigrateOptions {
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Load configuration from exactly these files, in order, skipping
|
|
7
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
8
|
+
*/
|
|
9
|
+
config?: string[] | undefined;
|
|
6
10
|
historyDir?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
13
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
14
|
+
*/
|
|
7
15
|
noConfig?: boolean | undefined;
|
|
8
16
|
}
|
|
@@ -49,6 +49,9 @@ export type HistoryRecord = {
|
|
|
49
49
|
}) | (ActionEvent & {
|
|
50
50
|
kind?: "tool_result" | undefined;
|
|
51
51
|
[k: string]: unknown;
|
|
52
|
+
}) | (ActionEvent & {
|
|
53
|
+
kind?: "message" | "reasoning" | undefined;
|
|
54
|
+
[k: string]: unknown;
|
|
52
55
|
}))[] | null;
|
|
53
56
|
exit_code: number | null;
|
|
54
57
|
/**
|
|
@@ -207,6 +210,9 @@ export type HistoryRecord = {
|
|
|
207
210
|
}) | (ActionEvent & {
|
|
208
211
|
kind?: "tool_result" | undefined;
|
|
209
212
|
[k: string]: unknown;
|
|
213
|
+
}) | (ActionEvent & {
|
|
214
|
+
kind?: "message" | "reasoning" | undefined;
|
|
215
|
+
[k: string]: unknown;
|
|
210
216
|
})) & {
|
|
211
217
|
timing_source?: never | undefined;
|
|
212
218
|
[k: string]: unknown;
|
|
@@ -1363,8 +1369,10 @@ export interface ActionEvent {
|
|
|
1363
1369
|
duration_ms: number | null;
|
|
1364
1370
|
finished_at: string | null;
|
|
1365
1371
|
/**
|
|
1366
|
-
* Position of this event within the run, so "
|
|
1367
|
-
*
|
|
1372
|
+
* Position of this event within the run, so "did X before Y" is
|
|
1373
|
+
* expressible from a stable ordering (also array order). It counts every
|
|
1374
|
+
* kind, so tool calls interleaved with `message`/`reasoning` events do not
|
|
1375
|
+
* carry contiguous indexes; count tool calls by `kind`, not by `index`.
|
|
1368
1376
|
*/
|
|
1369
1377
|
index: number;
|
|
1370
1378
|
/**
|
|
@@ -1374,9 +1382,13 @@ export interface ActionEvent {
|
|
|
1374
1382
|
*/
|
|
1375
1383
|
input: unknown;
|
|
1376
1384
|
/**
|
|
1377
|
-
* The kind of event: `tool_call` (the model invoked a tool)
|
|
1378
|
-
* `tool_result` (the observation returned to the model)
|
|
1379
|
-
*
|
|
1385
|
+
* The kind of event: `tool_call` (the model invoked a tool),
|
|
1386
|
+
* `tool_result` (the observation returned to the model), `message` (the
|
|
1387
|
+
* agent's own text, in `output`) or `reasoning` (its reasoning text, in
|
|
1388
|
+
* `output`). A `message` or `reasoning` event is one finished item, never
|
|
1389
|
+
* a token delta. Left open for future kinds rather than an enum, so a new
|
|
1390
|
+
* shape never breaks the field — a consumer counting tool calls filters on
|
|
1391
|
+
* it (see [`ActionEvent::is_tool_activity`]).
|
|
1380
1392
|
*/
|
|
1381
1393
|
kind: string;
|
|
1382
1394
|
/**
|
|
@@ -126,6 +126,9 @@ export type HistoryRecord = {
|
|
|
126
126
|
}) | (ActionEvent & {
|
|
127
127
|
kind?: "tool_result" | undefined;
|
|
128
128
|
[k: string]: unknown;
|
|
129
|
+
}) | (ActionEvent & {
|
|
130
|
+
kind?: "message" | "reasoning" | undefined;
|
|
131
|
+
[k: string]: unknown;
|
|
129
132
|
}))[] | null;
|
|
130
133
|
exit_code: number | null;
|
|
131
134
|
/**
|
|
@@ -284,6 +287,9 @@ export type HistoryRecord = {
|
|
|
284
287
|
}) | (ActionEvent & {
|
|
285
288
|
kind?: "tool_result" | undefined;
|
|
286
289
|
[k: string]: unknown;
|
|
290
|
+
}) | (ActionEvent & {
|
|
291
|
+
kind?: "message" | "reasoning" | undefined;
|
|
292
|
+
[k: string]: unknown;
|
|
287
293
|
})) & {
|
|
288
294
|
timing_source?: never | undefined;
|
|
289
295
|
[k: string]: unknown;
|
|
@@ -1375,6 +1381,14 @@ export type HistoryEventLine = {
|
|
|
1375
1381
|
harness_id?: string | null | undefined;
|
|
1376
1382
|
run_id: string;
|
|
1377
1383
|
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | "1.9";
|
|
1384
|
+
/**
|
|
1385
|
+
* The name of the session this line belongs to — the `name` its run's
|
|
1386
|
+
* closing `run` line will carry — so a run still in progress (events but
|
|
1387
|
+
* no closing line yet) can be listed and followed by name. Omitted when
|
|
1388
|
+
* absent: lines written before it existed carry none, and every reader
|
|
1389
|
+
* that predates it ignores it.
|
|
1390
|
+
*/
|
|
1391
|
+
session_name?: string | null | undefined;
|
|
1378
1392
|
variant?: string | null | undefined;
|
|
1379
1393
|
[k: string]: unknown;
|
|
1380
1394
|
} | {
|
|
@@ -1386,6 +1400,14 @@ export type HistoryEventLine = {
|
|
|
1386
1400
|
harness_id?: string | null | undefined;
|
|
1387
1401
|
run_id: string;
|
|
1388
1402
|
schema_version: "1.0" | "1.1";
|
|
1403
|
+
/**
|
|
1404
|
+
* The name of the session this line belongs to — the `name` its run's
|
|
1405
|
+
* closing `run` line will carry — so a run still in progress (events but
|
|
1406
|
+
* no closing line yet) can be listed and followed by name. Omitted when
|
|
1407
|
+
* absent: lines written before it existed carry none, and every reader
|
|
1408
|
+
* that predates it ignores it.
|
|
1409
|
+
*/
|
|
1410
|
+
session_name?: string | null | undefined;
|
|
1389
1411
|
variant?: string | null | undefined;
|
|
1390
1412
|
[k: string]: unknown;
|
|
1391
1413
|
};
|
|
@@ -1401,8 +1423,10 @@ export interface ActionEvent {
|
|
|
1401
1423
|
duration_ms: number | null;
|
|
1402
1424
|
finished_at: string | null;
|
|
1403
1425
|
/**
|
|
1404
|
-
* Position of this event within the run, so "
|
|
1405
|
-
*
|
|
1426
|
+
* Position of this event within the run, so "did X before Y" is
|
|
1427
|
+
* expressible from a stable ordering (also array order). It counts every
|
|
1428
|
+
* kind, so tool calls interleaved with `message`/`reasoning` events do not
|
|
1429
|
+
* carry contiguous indexes; count tool calls by `kind`, not by `index`.
|
|
1406
1430
|
*/
|
|
1407
1431
|
index: number;
|
|
1408
1432
|
/**
|
|
@@ -1412,9 +1436,13 @@ export interface ActionEvent {
|
|
|
1412
1436
|
*/
|
|
1413
1437
|
input: unknown;
|
|
1414
1438
|
/**
|
|
1415
|
-
* The kind of event: `tool_call` (the model invoked a tool)
|
|
1416
|
-
* `tool_result` (the observation returned to the model)
|
|
1417
|
-
*
|
|
1439
|
+
* The kind of event: `tool_call` (the model invoked a tool),
|
|
1440
|
+
* `tool_result` (the observation returned to the model), `message` (the
|
|
1441
|
+
* agent's own text, in `output`) or `reasoning` (its reasoning text, in
|
|
1442
|
+
* `output`). A `message` or `reasoning` event is one finished item, never
|
|
1443
|
+
* a token delta. Left open for future kinds rather than an enum, so a new
|
|
1444
|
+
* shape never breaks the field — a consumer counting tool calls filters on
|
|
1445
|
+
* it (see [`ActionEvent::is_tool_activity`]).
|
|
1418
1446
|
*/
|
|
1419
1447
|
kind: string;
|
|
1420
1448
|
/**
|
|
@@ -9,18 +9,25 @@ export interface HistoryWatchOptions {
|
|
|
9
9
|
after?: string | undefined;
|
|
10
10
|
allProjects?: boolean | undefined;
|
|
11
11
|
/**
|
|
12
|
-
* Load configuration from exactly
|
|
13
|
-
* discovery.
|
|
12
|
+
* Load configuration from exactly these files, in order, skipping
|
|
13
|
+
* user/project discovery; each later file overrides the earlier ones.
|
|
14
14
|
*/
|
|
15
|
-
config?: string | undefined;
|
|
15
|
+
config?: string[] | undefined;
|
|
16
16
|
events?: boolean | undefined;
|
|
17
17
|
historyDir?: string | undefined;
|
|
18
18
|
labels?: HistoryLabels | undefined;
|
|
19
19
|
/**
|
|
20
|
-
* Ignore every configuration file.
|
|
20
|
+
* Ignore every configuration file and `ONEHARNESS_*` override. `true`
|
|
21
|
+
* beside a non-empty `config` is refused before anything runs.
|
|
21
22
|
*/
|
|
22
23
|
noConfig?: boolean | undefined;
|
|
23
24
|
project?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Follow one session: its id, or its name (the newest session so named
|
|
27
|
+
* whose labels match every label filter, including one still running, or
|
|
28
|
+
* the first to appear).
|
|
29
|
+
*/
|
|
30
|
+
session?: string | null | undefined;
|
|
24
31
|
/**
|
|
25
32
|
* Narrow to one configured harness identity (`claude-code:work`).
|
|
26
33
|
*/
|