@oneharness/sdk 0.11.3 → 0.12.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/contracts.d.ts +17 -4
- package/dist/generated/history-line.d.ts +58 -15
- package/dist/generated/history-records.d.ts +206 -22
- package/dist/generated/history-stream-envelope.d.ts +207 -23
- package/dist/generated/history.d.ts +206 -22
- package/dist/generated/run-stream-envelope.d.ts +17 -4
- package/dist/generated/schemas.json +660 -74
- package/dist/generated/zod.js +182 -31
- package/package.json +2 -2
|
@@ -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" | undefined;
|
|
17
|
+
schema_version?: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | undefined;
|
|
18
18
|
[k: string]: unknown;
|
|
19
19
|
} & ({
|
|
20
20
|
status?: "nonzero" | "timeout" | "cancelled" | "spawn-error" | "skipped" | undefined;
|
|
@@ -26,27 +26,40 @@ export type HistoryStreamEnvelope = {
|
|
|
26
26
|
work?: null | undefined;
|
|
27
27
|
[k: string]: unknown;
|
|
28
28
|
} | {
|
|
29
|
-
schema_version?: "1.7" | undefined;
|
|
29
|
+
schema_version?: "1.7" | "1.8" | undefined;
|
|
30
30
|
status?: "nonzero" | "timeout" | "cancelled" | undefined;
|
|
31
31
|
work: "done" | "none";
|
|
32
32
|
[k: string]: unknown;
|
|
33
|
+
}) & ({
|
|
34
|
+
observed_model?: null | undefined;
|
|
35
|
+
[k: string]: unknown;
|
|
36
|
+
} | {
|
|
37
|
+
observed_model: string;
|
|
38
|
+
schema_version?: "1.8" | undefined;
|
|
39
|
+
[k: string]: unknown;
|
|
33
40
|
}) & ({
|
|
34
41
|
status?: "ok" | "nonzero" | "timeout" | "spawn-error" | "skipped" | "planned" | undefined;
|
|
35
42
|
[k: string]: unknown;
|
|
36
43
|
} | {
|
|
37
|
-
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | undefined;
|
|
44
|
+
schema_version?: "1.4" | "1.5" | "1.6" | "1.7" | "1.8" | undefined;
|
|
38
45
|
[k: string]: unknown;
|
|
39
46
|
}) & (({
|
|
40
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | null;
|
|
47
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch" | null;
|
|
48
|
+
[k: string]: unknown;
|
|
49
|
+
} | {
|
|
50
|
+
schema_version?: "1.5" | "1.6" | "1.7" | "1.8" | undefined;
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
}) & ({
|
|
53
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "model_mismatch" | null;
|
|
41
54
|
[k: string]: unknown;
|
|
42
55
|
} | {
|
|
43
|
-
schema_version?: "1.
|
|
56
|
+
schema_version?: "1.6" | "1.7" | "1.8" | undefined;
|
|
44
57
|
[k: string]: unknown;
|
|
45
58
|
}) & ({
|
|
46
|
-
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | null;
|
|
59
|
+
failure_kind?: "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | null;
|
|
47
60
|
[k: string]: unknown;
|
|
48
61
|
} | {
|
|
49
|
-
schema_version?: "1.
|
|
62
|
+
schema_version?: "1.8" | undefined;
|
|
50
63
|
[k: string]: unknown;
|
|
51
64
|
})) & HistoryRecord;
|
|
52
65
|
type: "record";
|
|
@@ -127,7 +140,10 @@ export type HistoryRecord = {
|
|
|
127
140
|
history_id: string;
|
|
128
141
|
labels?: HistoryLabels | undefined;
|
|
129
142
|
/**
|
|
130
|
-
* The
|
|
143
|
+
* The model this run **requested** — the value oneharness put on the
|
|
144
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
145
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
146
|
+
* `observed_model` below is present.
|
|
131
147
|
*/
|
|
132
148
|
model: string | null;
|
|
133
149
|
model_ms: number;
|
|
@@ -136,6 +152,22 @@ export type HistoryRecord = {
|
|
|
136
152
|
* every record so a reader can resolve a session by name from any line.
|
|
137
153
|
*/
|
|
138
154
|
name: string;
|
|
155
|
+
/**
|
|
156
|
+
* The model the harness **itself** reported the conversation would run
|
|
157
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
158
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
159
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
160
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
161
|
+
* every path that reports none.
|
|
162
|
+
*
|
|
163
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
164
|
+
* reported model differed from the requested one was refused before it
|
|
165
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
166
|
+
* ran, and the record can no longer say one model while another was
|
|
167
|
+
* billed. They differ only on such a refused record, and where no model
|
|
168
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
169
|
+
*/
|
|
170
|
+
observed_model?: string | null | undefined;
|
|
139
171
|
observed_tool_ms?: never | undefined;
|
|
140
172
|
/**
|
|
141
173
|
* The normalized approval mode requested for the run.
|
|
@@ -151,7 +183,7 @@ export type HistoryRecord = {
|
|
|
151
183
|
* run's single prompt).
|
|
152
184
|
*/
|
|
153
185
|
prompt: string;
|
|
154
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7";
|
|
186
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8";
|
|
155
187
|
/**
|
|
156
188
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
157
189
|
*/
|
|
@@ -269,7 +301,10 @@ export type HistoryRecord = {
|
|
|
269
301
|
history_id: string;
|
|
270
302
|
labels?: HistoryLabels1 | undefined;
|
|
271
303
|
/**
|
|
272
|
-
* The
|
|
304
|
+
* The model this run **requested** — the value oneharness put on the
|
|
305
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
306
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
307
|
+
* `observed_model` below is present.
|
|
273
308
|
*/
|
|
274
309
|
model: string | null;
|
|
275
310
|
model_ms: number;
|
|
@@ -278,6 +313,22 @@ export type HistoryRecord = {
|
|
|
278
313
|
* every record so a reader can resolve a session by name from any line.
|
|
279
314
|
*/
|
|
280
315
|
name: string;
|
|
316
|
+
/**
|
|
317
|
+
* The model the harness **itself** reported the conversation would run
|
|
318
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
319
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
320
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
321
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
322
|
+
* every path that reports none.
|
|
323
|
+
*
|
|
324
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
325
|
+
* reported model differed from the requested one was refused before it
|
|
326
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
327
|
+
* ran, and the record can no longer say one model while another was
|
|
328
|
+
* billed. They differ only on such a refused record, and where no model
|
|
329
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
330
|
+
*/
|
|
331
|
+
observed_model?: string | null | undefined;
|
|
281
332
|
observed_tool_ms?: never | undefined;
|
|
282
333
|
/**
|
|
283
334
|
* The normalized approval mode requested for the run.
|
|
@@ -389,7 +440,10 @@ export type HistoryRecord = {
|
|
|
389
440
|
history_id: string;
|
|
390
441
|
labels?: HistoryLabels2 | undefined;
|
|
391
442
|
/**
|
|
392
|
-
* The
|
|
443
|
+
* The model this run **requested** — the value oneharness put on the
|
|
444
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
445
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
446
|
+
* `observed_model` below is present.
|
|
393
447
|
*/
|
|
394
448
|
model: string | null;
|
|
395
449
|
model_ms?: never | undefined;
|
|
@@ -398,6 +452,22 @@ export type HistoryRecord = {
|
|
|
398
452
|
* every record so a reader can resolve a session by name from any line.
|
|
399
453
|
*/
|
|
400
454
|
name: string;
|
|
455
|
+
/**
|
|
456
|
+
* The model the harness **itself** reported the conversation would run
|
|
457
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
458
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
459
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
460
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
461
|
+
* every path that reports none.
|
|
462
|
+
*
|
|
463
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
464
|
+
* reported model differed from the requested one was refused before it
|
|
465
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
466
|
+
* ran, and the record can no longer say one model while another was
|
|
467
|
+
* billed. They differ only on such a refused record, and where no model
|
|
468
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
469
|
+
*/
|
|
470
|
+
observed_model?: string | null | undefined;
|
|
401
471
|
observed_tool_ms?: never | undefined;
|
|
402
472
|
/**
|
|
403
473
|
* The normalized approval mode requested for the run.
|
|
@@ -413,7 +483,7 @@ export type HistoryRecord = {
|
|
|
413
483
|
* run's single prompt).
|
|
414
484
|
*/
|
|
415
485
|
prompt: string;
|
|
416
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7";
|
|
486
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8";
|
|
417
487
|
/**
|
|
418
488
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
419
489
|
*/
|
|
@@ -497,7 +567,10 @@ export type HistoryRecord = {
|
|
|
497
567
|
history_id: string;
|
|
498
568
|
labels?: HistoryLabels3 | undefined;
|
|
499
569
|
/**
|
|
500
|
-
* The
|
|
570
|
+
* The model this run **requested** — the value oneharness put on the
|
|
571
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
572
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
573
|
+
* `observed_model` below is present.
|
|
501
574
|
*/
|
|
502
575
|
model: string | null;
|
|
503
576
|
model_ms?: never | undefined;
|
|
@@ -506,6 +579,22 @@ export type HistoryRecord = {
|
|
|
506
579
|
* every record so a reader can resolve a session by name from any line.
|
|
507
580
|
*/
|
|
508
581
|
name: string;
|
|
582
|
+
/**
|
|
583
|
+
* The model the harness **itself** reported the conversation would run
|
|
584
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
585
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
586
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
587
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
588
|
+
* every path that reports none.
|
|
589
|
+
*
|
|
590
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
591
|
+
* reported model differed from the requested one was refused before it
|
|
592
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
593
|
+
* ran, and the record can no longer say one model while another was
|
|
594
|
+
* billed. They differ only on such a refused record, and where no model
|
|
595
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
596
|
+
*/
|
|
597
|
+
observed_model?: string | null | undefined;
|
|
509
598
|
observed_tool_ms: number;
|
|
510
599
|
/**
|
|
511
600
|
* The normalized approval mode requested for the run.
|
|
@@ -521,7 +610,7 @@ export type HistoryRecord = {
|
|
|
521
610
|
* run's single prompt).
|
|
522
611
|
*/
|
|
523
612
|
prompt: string;
|
|
524
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7";
|
|
613
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8";
|
|
525
614
|
/**
|
|
526
615
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
527
616
|
*/
|
|
@@ -605,7 +694,10 @@ export type HistoryRecord = {
|
|
|
605
694
|
history_id: string;
|
|
606
695
|
labels?: HistoryLabels4 | undefined;
|
|
607
696
|
/**
|
|
608
|
-
* The
|
|
697
|
+
* The model this run **requested** — the value oneharness put on the
|
|
698
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
699
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
700
|
+
* `observed_model` below is present.
|
|
609
701
|
*/
|
|
610
702
|
model: string | null;
|
|
611
703
|
model_ms?: never | undefined;
|
|
@@ -614,6 +706,22 @@ export type HistoryRecord = {
|
|
|
614
706
|
* every record so a reader can resolve a session by name from any line.
|
|
615
707
|
*/
|
|
616
708
|
name: string;
|
|
709
|
+
/**
|
|
710
|
+
* The model the harness **itself** reported the conversation would run
|
|
711
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
712
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
713
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
714
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
715
|
+
* every path that reports none.
|
|
716
|
+
*
|
|
717
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
718
|
+
* reported model differed from the requested one was refused before it
|
|
719
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
720
|
+
* ran, and the record can no longer say one model while another was
|
|
721
|
+
* billed. They differ only on such a refused record, and where no model
|
|
722
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
723
|
+
*/
|
|
724
|
+
observed_model?: string | null | undefined;
|
|
617
725
|
observed_tool_ms?: never | undefined;
|
|
618
726
|
/**
|
|
619
727
|
* The normalized approval mode requested for the run.
|
|
@@ -629,7 +737,7 @@ export type HistoryRecord = {
|
|
|
629
737
|
* run's single prompt).
|
|
630
738
|
*/
|
|
631
739
|
prompt: string;
|
|
632
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7";
|
|
740
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8";
|
|
633
741
|
/**
|
|
634
742
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
635
743
|
*/
|
|
@@ -713,7 +821,10 @@ export type HistoryRecord = {
|
|
|
713
821
|
history_id: string;
|
|
714
822
|
labels?: HistoryLabels5 | undefined;
|
|
715
823
|
/**
|
|
716
|
-
* The
|
|
824
|
+
* The model this run **requested** — the value oneharness put on the
|
|
825
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
826
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
827
|
+
* `observed_model` below is present.
|
|
717
828
|
*/
|
|
718
829
|
model: string | null;
|
|
719
830
|
model_ms?: never | undefined;
|
|
@@ -722,6 +833,22 @@ export type HistoryRecord = {
|
|
|
722
833
|
* every record so a reader can resolve a session by name from any line.
|
|
723
834
|
*/
|
|
724
835
|
name: string;
|
|
836
|
+
/**
|
|
837
|
+
* The model the harness **itself** reported the conversation would run
|
|
838
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
839
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
840
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
841
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
842
|
+
* every path that reports none.
|
|
843
|
+
*
|
|
844
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
845
|
+
* reported model differed from the requested one was refused before it
|
|
846
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
847
|
+
* ran, and the record can no longer say one model while another was
|
|
848
|
+
* billed. They differ only on such a refused record, and where no model
|
|
849
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
850
|
+
*/
|
|
851
|
+
observed_model?: string | null | undefined;
|
|
725
852
|
observed_tool_ms?: never | undefined;
|
|
726
853
|
/**
|
|
727
854
|
* The normalized approval mode requested for the run.
|
|
@@ -737,7 +864,7 @@ export type HistoryRecord = {
|
|
|
737
864
|
* run's single prompt).
|
|
738
865
|
*/
|
|
739
866
|
prompt: string;
|
|
740
|
-
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7";
|
|
867
|
+
schema_version: "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8";
|
|
741
868
|
/**
|
|
742
869
|
* The oneharness session id this run belongs to (the history file's stem).
|
|
743
870
|
*/
|
|
@@ -824,7 +951,10 @@ export type HistoryRecord = {
|
|
|
824
951
|
history_id: string;
|
|
825
952
|
labels?: HistoryLabels6 | undefined;
|
|
826
953
|
/**
|
|
827
|
-
* The
|
|
954
|
+
* The model this run **requested** — the value oneharness put on the
|
|
955
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
956
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
957
|
+
* `observed_model` below is present.
|
|
828
958
|
*/
|
|
829
959
|
model: string | null;
|
|
830
960
|
model_ms?: never | undefined;
|
|
@@ -833,6 +963,22 @@ export type HistoryRecord = {
|
|
|
833
963
|
* every record so a reader can resolve a session by name from any line.
|
|
834
964
|
*/
|
|
835
965
|
name: string;
|
|
966
|
+
/**
|
|
967
|
+
* The model the harness **itself** reported the conversation would run
|
|
968
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
969
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
970
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
971
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
972
|
+
* every path that reports none.
|
|
973
|
+
*
|
|
974
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
975
|
+
* reported model differed from the requested one was refused before it
|
|
976
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
977
|
+
* ran, and the record can no longer say one model while another was
|
|
978
|
+
* billed. They differ only on such a refused record, and where no model
|
|
979
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
980
|
+
*/
|
|
981
|
+
observed_model?: string | null | undefined;
|
|
836
982
|
observed_tool_ms?: never | undefined;
|
|
837
983
|
/**
|
|
838
984
|
* The normalized approval mode requested for the run.
|
|
@@ -947,7 +1093,10 @@ export type HistoryRecord = {
|
|
|
947
1093
|
history_id: string;
|
|
948
1094
|
labels?: HistoryLabels7 | undefined;
|
|
949
1095
|
/**
|
|
950
|
-
* The
|
|
1096
|
+
* The model this run **requested** — the value oneharness put on the
|
|
1097
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
1098
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
1099
|
+
* `observed_model` below is present.
|
|
951
1100
|
*/
|
|
952
1101
|
model: string | null;
|
|
953
1102
|
model_ms?: never | undefined;
|
|
@@ -956,6 +1105,22 @@ export type HistoryRecord = {
|
|
|
956
1105
|
* every record so a reader can resolve a session by name from any line.
|
|
957
1106
|
*/
|
|
958
1107
|
name: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* The model the harness **itself** reported the conversation would run
|
|
1110
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
1111
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
1112
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
1113
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
1114
|
+
* every path that reports none.
|
|
1115
|
+
*
|
|
1116
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
1117
|
+
* reported model differed from the requested one was refused before it
|
|
1118
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
1119
|
+
* ran, and the record can no longer say one model while another was
|
|
1120
|
+
* billed. They differ only on such a refused record, and where no model
|
|
1121
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
1122
|
+
*/
|
|
1123
|
+
observed_model?: string | null | undefined;
|
|
959
1124
|
observed_tool_ms?: never | undefined;
|
|
960
1125
|
/**
|
|
961
1126
|
* The normalized approval mode requested for the run.
|
|
@@ -1058,7 +1223,10 @@ export type HistoryRecord = {
|
|
|
1058
1223
|
history_id: string;
|
|
1059
1224
|
labels?: HistoryLabels8 | undefined;
|
|
1060
1225
|
/**
|
|
1061
|
-
* The
|
|
1226
|
+
* The model this run **requested** — the value oneharness put on the
|
|
1227
|
+
* harness's model flag or protocol frame — if any. Copied from
|
|
1228
|
+
* [`RunResult::model`], so it keeps meaning the requested model even where
|
|
1229
|
+
* `observed_model` below is present.
|
|
1062
1230
|
*/
|
|
1063
1231
|
model: string | null;
|
|
1064
1232
|
model_ms?: number | null | undefined;
|
|
@@ -1067,6 +1235,22 @@ export type HistoryRecord = {
|
|
|
1067
1235
|
* every record so a reader can resolve a session by name from any line.
|
|
1068
1236
|
*/
|
|
1069
1237
|
name: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* The model the harness **itself** reported the conversation would run
|
|
1240
|
+
* under, read off its own protocol before any token was spent — for codex
|
|
1241
|
+
* over `app-server`, `result.model` of the `thread/start` /
|
|
1242
|
+
* `thread/resume` response. Copied from [`RunResult::observed_model`]:
|
|
1243
|
+
* never inferred and never copied from `model`, and omitted on the wire on
|
|
1244
|
+
* every path that reports none.
|
|
1245
|
+
*
|
|
1246
|
+
* On a completed app-server turn the two agree, because a turn whose
|
|
1247
|
+
* reported model differed from the requested one was refused before it
|
|
1248
|
+
* ran (`model_mismatch`) — so a completed record's `model` is what codex
|
|
1249
|
+
* ran, and the record can no longer say one model while another was
|
|
1250
|
+
* billed. They differ only on such a refused record, and where no model
|
|
1251
|
+
* was requested at all. Gated to [`FIRST_MODEL_OBSERVATION_SCHEMA_VERSION`].
|
|
1252
|
+
*/
|
|
1253
|
+
observed_model?: string | null | undefined;
|
|
1070
1254
|
/**
|
|
1071
1255
|
* Union of tool intervals observed at the stdout pipe. Unlike `tool_ms`,
|
|
1072
1256
|
* this is not provider-measured and has no model-latency counterpart.
|
|
@@ -1153,7 +1337,7 @@ export type TimingSource = "provider_measured" | "stdout_observed";
|
|
|
1153
1337
|
* the report, history) one definition to share instead of scattered string
|
|
1154
1338
|
* literals.
|
|
1155
1339
|
*/
|
|
1156
|
-
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large";
|
|
1340
|
+
export type FailureKind = "auth" | "rate_limit" | "model_not_found" | "quota" | "session_not_found" | "tool_deferred" | "untrusted_directory" | "input_too_large" | "model_mismatch";
|
|
1157
1341
|
/**
|
|
1158
1342
|
* The outcome of attempting to run one harness.
|
|
1159
1343
|
*/
|
|
@@ -1183,7 +1367,7 @@ export type HistoryEventLine = {
|
|
|
1183
1367
|
harness: string;
|
|
1184
1368
|
harness_id?: string | null | undefined;
|
|
1185
1369
|
run_id: string;
|
|
1186
|
-
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7";
|
|
1370
|
+
schema_version: "1.2" | "1.3" | "1.4" | "1.5" | "1.6" | "1.7" | "1.8";
|
|
1187
1371
|
variant?: string | null | undefined;
|
|
1188
1372
|
[k: string]: unknown;
|
|
1189
1373
|
} | {
|