@oneharness/sdk 0.4.0 → 0.4.2
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 +20 -0
- package/dist/generated/history-records.d.ts +198 -21
- package/dist/generated/history-stream-envelope.d.ts +197 -20
- package/dist/generated/history.d.ts +197 -20
- package/dist/generated/run-stream-envelope.d.ts +20 -0
- package/dist/generated/schemas.json +1949 -461
- package/dist/generated/zod.d.ts +2 -1
- package/dist/generated/zod.js +166 -31
- package/package.json +2 -2
|
@@ -157,6 +157,21 @@
|
|
|
157
157
|
"description": "One normalized action a harness took, harness-agnostic so a single consumer\nassertion works across harnesses. Every field is always serialized (null when\nabsent) so the shape is stable, mirroring the `usage` contract.",
|
|
158
158
|
"type": "object",
|
|
159
159
|
"properties": {
|
|
160
|
+
"duration_ms": {
|
|
161
|
+
"description": "Monotonic elapsed tool time. `None` means no terminal boundary was seen.",
|
|
162
|
+
"type": [
|
|
163
|
+
"integer",
|
|
164
|
+
"null"
|
|
165
|
+
],
|
|
166
|
+
"format": "uint128",
|
|
167
|
+
"minimum": 0
|
|
168
|
+
},
|
|
169
|
+
"finished_at": {
|
|
170
|
+
"type": [
|
|
171
|
+
"string",
|
|
172
|
+
"null"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
160
175
|
"index": {
|
|
161
176
|
"description": "Position of this event within the run, so \"≤ N tool calls\" and \"did X\nbefore Y\" are expressible from a stable ordering (also array order).",
|
|
162
177
|
"type": "integer",
|
|
@@ -183,6 +198,31 @@
|
|
|
183
198
|
"string",
|
|
184
199
|
"null"
|
|
185
200
|
]
|
|
201
|
+
},
|
|
202
|
+
"started_at": {
|
|
203
|
+
"description": "UTC interval bounds for tool execution, populated on history records.",
|
|
204
|
+
"type": [
|
|
205
|
+
"string",
|
|
206
|
+
"null"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"status": {
|
|
210
|
+
"description": "Terminal tool state, populated on history tool-call events.",
|
|
211
|
+
"anyOf": [
|
|
212
|
+
{
|
|
213
|
+
"$ref": "#/$defs/ToolCallStatus"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "null"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"tool_call_id": {
|
|
221
|
+
"description": "Stable call identity within the session. Present on tool calls and their\nmatching results when the provider exposes an identity; history fills a\ndeterministic run-local identity for providers that do not.",
|
|
222
|
+
"type": [
|
|
223
|
+
"string",
|
|
224
|
+
"null"
|
|
225
|
+
]
|
|
186
226
|
}
|
|
187
227
|
},
|
|
188
228
|
"required": [
|
|
@@ -190,7 +230,12 @@
|
|
|
190
230
|
"name",
|
|
191
231
|
"input",
|
|
192
232
|
"output",
|
|
193
|
-
"index"
|
|
233
|
+
"index",
|
|
234
|
+
"tool_call_id",
|
|
235
|
+
"started_at",
|
|
236
|
+
"finished_at",
|
|
237
|
+
"duration_ms",
|
|
238
|
+
"status"
|
|
194
239
|
]
|
|
195
240
|
},
|
|
196
241
|
"BatchReport": {
|
|
@@ -642,6 +687,15 @@
|
|
|
642
687
|
}
|
|
643
688
|
]
|
|
644
689
|
},
|
|
690
|
+
"ToolCallStatus": {
|
|
691
|
+
"type": "string",
|
|
692
|
+
"enum": [
|
|
693
|
+
"completed",
|
|
694
|
+
"failed",
|
|
695
|
+
"timeout",
|
|
696
|
+
"interrupted"
|
|
697
|
+
]
|
|
698
|
+
},
|
|
645
699
|
"Usage": {
|
|
646
700
|
"description": "Normalized token/cost accounting. Every field is best-effort and independently\nnullable: a harness may report tokens but not dollar cost (cost is commonly\nabsent on subscription auth), or report nothing at all (plain-text harnesses).",
|
|
647
701
|
"type": "object",
|
|
@@ -746,6 +800,21 @@
|
|
|
746
800
|
"description": "One normalized action a harness took, harness-agnostic so a single consumer\nassertion works across harnesses. Every field is always serialized (null when\nabsent) so the shape is stable, mirroring the `usage` contract.",
|
|
747
801
|
"type": "object",
|
|
748
802
|
"properties": {
|
|
803
|
+
"duration_ms": {
|
|
804
|
+
"description": "Monotonic elapsed tool time. `None` means no terminal boundary was seen.",
|
|
805
|
+
"type": [
|
|
806
|
+
"integer",
|
|
807
|
+
"null"
|
|
808
|
+
],
|
|
809
|
+
"format": "uint128",
|
|
810
|
+
"minimum": 0
|
|
811
|
+
},
|
|
812
|
+
"finished_at": {
|
|
813
|
+
"type": [
|
|
814
|
+
"string",
|
|
815
|
+
"null"
|
|
816
|
+
]
|
|
817
|
+
},
|
|
749
818
|
"index": {
|
|
750
819
|
"description": "Position of this event within the run, so \"≤ N tool calls\" and \"did X\nbefore Y\" are expressible from a stable ordering (also array order).",
|
|
751
820
|
"type": "integer",
|
|
@@ -772,6 +841,31 @@
|
|
|
772
841
|
"string",
|
|
773
842
|
"null"
|
|
774
843
|
]
|
|
844
|
+
},
|
|
845
|
+
"started_at": {
|
|
846
|
+
"description": "UTC interval bounds for tool execution, populated on history records.",
|
|
847
|
+
"type": [
|
|
848
|
+
"string",
|
|
849
|
+
"null"
|
|
850
|
+
]
|
|
851
|
+
},
|
|
852
|
+
"status": {
|
|
853
|
+
"description": "Terminal tool state, populated on history tool-call events.",
|
|
854
|
+
"anyOf": [
|
|
855
|
+
{
|
|
856
|
+
"$ref": "#/$defs/ToolCallStatus"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"type": "null"
|
|
860
|
+
}
|
|
861
|
+
]
|
|
862
|
+
},
|
|
863
|
+
"tool_call_id": {
|
|
864
|
+
"description": "Stable call identity within the session. Present on tool calls and their\nmatching results when the provider exposes an identity; history fills a\ndeterministic run-local identity for providers that do not.",
|
|
865
|
+
"type": [
|
|
866
|
+
"string",
|
|
867
|
+
"null"
|
|
868
|
+
]
|
|
775
869
|
}
|
|
776
870
|
},
|
|
777
871
|
"required": [
|
|
@@ -779,7 +873,12 @@
|
|
|
779
873
|
"name",
|
|
780
874
|
"input",
|
|
781
875
|
"output",
|
|
782
|
-
"index"
|
|
876
|
+
"index",
|
|
877
|
+
"tool_call_id",
|
|
878
|
+
"started_at",
|
|
879
|
+
"finished_at",
|
|
880
|
+
"duration_ms",
|
|
881
|
+
"status"
|
|
783
882
|
]
|
|
784
883
|
},
|
|
785
884
|
"BatchReport": {
|
|
@@ -1383,6 +1482,15 @@
|
|
|
1383
1482
|
}
|
|
1384
1483
|
]
|
|
1385
1484
|
},
|
|
1485
|
+
"ToolCallStatus": {
|
|
1486
|
+
"type": "string",
|
|
1487
|
+
"enum": [
|
|
1488
|
+
"completed",
|
|
1489
|
+
"failed",
|
|
1490
|
+
"timeout",
|
|
1491
|
+
"interrupted"
|
|
1492
|
+
]
|
|
1493
|
+
},
|
|
1386
1494
|
"Usage": {
|
|
1387
1495
|
"description": "Normalized token/cost accounting. Every field is best-effort and independently\nnullable: a harness may report tokens but not dollar cost (cost is commonly\nabsent on subscription auth), or report nothing at all (plain-text harnesses).",
|
|
1388
1496
|
"type": "object",
|
|
@@ -1723,222 +1831,673 @@
|
|
|
1723
1831
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1724
1832
|
"title": "HistoryRecord",
|
|
1725
1833
|
"description": "One harness run, normalized and frozen for the history log. Serialized as one\nJSONL line per harness run, appended as the run finalizes. Carries only the\nnormalized cross-harness signals — no raw stdout/stderr.",
|
|
1726
|
-
"
|
|
1727
|
-
|
|
1728
|
-
"duration_ms": {
|
|
1729
|
-
"type": [
|
|
1730
|
-
"integer",
|
|
1731
|
-
"null"
|
|
1732
|
-
],
|
|
1733
|
-
"format": "uint128",
|
|
1734
|
-
"minimum": 0
|
|
1735
|
-
},
|
|
1736
|
-
"events": {
|
|
1737
|
-
"description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
|
|
1738
|
-
"type": [
|
|
1739
|
-
"array",
|
|
1740
|
-
"null"
|
|
1741
|
-
],
|
|
1742
|
-
"items": {
|
|
1743
|
-
"$ref": "#/$defs/ActionEvent"
|
|
1744
|
-
}
|
|
1745
|
-
},
|
|
1746
|
-
"exit_code": {
|
|
1747
|
-
"type": [
|
|
1748
|
-
"integer",
|
|
1749
|
-
"null"
|
|
1750
|
-
],
|
|
1751
|
-
"format": "int32"
|
|
1752
|
-
},
|
|
1753
|
-
"failure_kind": {
|
|
1754
|
-
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
1755
|
-
"anyOf": [
|
|
1756
|
-
{
|
|
1757
|
-
"$ref": "#/$defs/FailureKind"
|
|
1758
|
-
},
|
|
1759
|
-
{
|
|
1760
|
-
"type": "null"
|
|
1761
|
-
}
|
|
1762
|
-
]
|
|
1763
|
-
},
|
|
1764
|
-
"harness": {
|
|
1765
|
-
"description": "Canonical harness id (e.g. `claude-code`).",
|
|
1766
|
-
"type": "string"
|
|
1767
|
-
},
|
|
1768
|
-
"history_id": {
|
|
1769
|
-
"description": "Globally unique, time-ordered record id. This is also the cursor accepted\nby `history watch --after` and the exact id accepted by history lookup.",
|
|
1770
|
-
"type": "string",
|
|
1771
|
-
"maxLength": 36,
|
|
1772
|
-
"minLength": 36,
|
|
1773
|
-
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
1774
|
-
},
|
|
1775
|
-
"labels": {
|
|
1776
|
-
"description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
|
|
1777
|
-
"$ref": "#/$defs/HistoryLabels"
|
|
1778
|
-
},
|
|
1779
|
-
"model": {
|
|
1780
|
-
"description": "The effective top-level model for the run, if any.",
|
|
1781
|
-
"type": [
|
|
1782
|
-
"string",
|
|
1783
|
-
"null"
|
|
1784
|
-
]
|
|
1785
|
-
},
|
|
1786
|
-
"name": {
|
|
1787
|
-
"description": "The human-meaningful session name (see [`session_name`]); repeated on\nevery record so a reader can resolve a session by name from any line.",
|
|
1788
|
-
"type": "string"
|
|
1789
|
-
},
|
|
1790
|
-
"permission_mode": {
|
|
1791
|
-
"description": "The normalized approval mode requested for the run.",
|
|
1792
|
-
"$ref": "#/$defs/PermissionMode"
|
|
1793
|
-
},
|
|
1794
|
-
"project": {
|
|
1795
|
-
"description": "The project directory the run operated in (the real path, not the\non-disk slug), so the list view can show where a session ran.",
|
|
1796
|
-
"type": "string"
|
|
1797
|
-
},
|
|
1798
|
-
"prompt": {
|
|
1799
|
-
"description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
|
|
1800
|
-
"type": "string"
|
|
1801
|
-
},
|
|
1802
|
-
"schema_version": {
|
|
1803
|
-
"type": "string"
|
|
1804
|
-
},
|
|
1805
|
-
"session": {
|
|
1806
|
-
"description": "The oneharness session id this run belongs to (the history file's stem).",
|
|
1807
|
-
"type": "string"
|
|
1808
|
-
},
|
|
1809
|
-
"session_id": {
|
|
1810
|
-
"description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
|
|
1811
|
-
"type": [
|
|
1812
|
-
"string",
|
|
1813
|
-
"null"
|
|
1814
|
-
]
|
|
1815
|
-
},
|
|
1816
|
-
"status": {
|
|
1817
|
-
"$ref": "#/$defs/Status"
|
|
1818
|
-
},
|
|
1819
|
-
"text": {
|
|
1820
|
-
"description": "Best-effort final assistant text; `null` when extraction was impossible.",
|
|
1821
|
-
"type": [
|
|
1822
|
-
"string",
|
|
1823
|
-
"null"
|
|
1824
|
-
]
|
|
1825
|
-
},
|
|
1826
|
-
"text_source": {
|
|
1827
|
-
"description": "How `text` was extracted; `null` when absent.",
|
|
1828
|
-
"type": [
|
|
1829
|
-
"string",
|
|
1830
|
-
"null"
|
|
1831
|
-
]
|
|
1832
|
-
},
|
|
1833
|
-
"timestamp": {
|
|
1834
|
-
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
1835
|
-
"type": "string"
|
|
1836
|
-
},
|
|
1837
|
-
"usage": {
|
|
1838
|
-
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
1839
|
-
"$ref": "#/$defs/Usage"
|
|
1840
|
-
}
|
|
1841
|
-
},
|
|
1842
|
-
"required": [
|
|
1843
|
-
"schema_version",
|
|
1844
|
-
"history_id",
|
|
1845
|
-
"session",
|
|
1846
|
-
"name",
|
|
1847
|
-
"project",
|
|
1848
|
-
"timestamp",
|
|
1849
|
-
"harness",
|
|
1850
|
-
"model",
|
|
1851
|
-
"prompt",
|
|
1852
|
-
"permission_mode",
|
|
1853
|
-
"status",
|
|
1854
|
-
"exit_code",
|
|
1855
|
-
"duration_ms",
|
|
1856
|
-
"text",
|
|
1857
|
-
"text_source",
|
|
1858
|
-
"usage",
|
|
1859
|
-
"session_id",
|
|
1860
|
-
"events",
|
|
1861
|
-
"failure_kind"
|
|
1862
|
-
],
|
|
1863
|
-
"$defs": {
|
|
1864
|
-
"ActionEvent": {
|
|
1865
|
-
"description": "One normalized action a harness took, harness-agnostic so a single consumer\nassertion works across harnesses. Every field is always serialized (null when\nabsent) so the shape is stable, mirroring the `usage` contract.",
|
|
1834
|
+
"oneOf": [
|
|
1835
|
+
{
|
|
1866
1836
|
"type": "object",
|
|
1867
1837
|
"properties": {
|
|
1868
|
-
"
|
|
1869
|
-
"description": "Position of this event within the run, so \"≤ N tool calls\" and \"did X\nbefore Y\" are expressible from a stable ordering (also array order).",
|
|
1838
|
+
"duration_ms": {
|
|
1870
1839
|
"type": "integer",
|
|
1871
|
-
"format": "uint",
|
|
1872
1840
|
"minimum": 0
|
|
1873
1841
|
},
|
|
1874
|
-
"
|
|
1875
|
-
"description": "
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1842
|
+
"events": {
|
|
1843
|
+
"description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
|
|
1844
|
+
"type": [
|
|
1845
|
+
"array",
|
|
1846
|
+
"null"
|
|
1847
|
+
],
|
|
1848
|
+
"items": {
|
|
1849
|
+
"oneOf": [
|
|
1850
|
+
{
|
|
1851
|
+
"allOf": [
|
|
1852
|
+
{
|
|
1853
|
+
"$ref": "#/$defs/ActionEvent"
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"type": "object",
|
|
1857
|
+
"properties": {
|
|
1858
|
+
"duration_ms": {
|
|
1859
|
+
"type": "integer",
|
|
1860
|
+
"minimum": 0
|
|
1861
|
+
},
|
|
1862
|
+
"finished_at": {
|
|
1863
|
+
"type": "string"
|
|
1864
|
+
},
|
|
1865
|
+
"kind": {
|
|
1866
|
+
"type": "string",
|
|
1867
|
+
"const": "tool_call"
|
|
1868
|
+
},
|
|
1869
|
+
"started_at": {
|
|
1870
|
+
"type": "string"
|
|
1871
|
+
},
|
|
1872
|
+
"status": {
|
|
1873
|
+
"type": "string",
|
|
1874
|
+
"const": "completed"
|
|
1875
|
+
},
|
|
1876
|
+
"tool_call_id": {
|
|
1877
|
+
"type": "string",
|
|
1878
|
+
"minLength": 1
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
"required": [
|
|
1882
|
+
"kind",
|
|
1883
|
+
"tool_call_id",
|
|
1884
|
+
"started_at",
|
|
1885
|
+
"status",
|
|
1886
|
+
"finished_at",
|
|
1887
|
+
"duration_ms"
|
|
1888
|
+
]
|
|
1889
|
+
}
|
|
1890
|
+
]
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
"allOf": [
|
|
1894
|
+
{
|
|
1895
|
+
"$ref": "#/$defs/ActionEvent"
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
"type": "object",
|
|
1899
|
+
"properties": {
|
|
1900
|
+
"duration_ms": {
|
|
1901
|
+
"type": "integer",
|
|
1902
|
+
"minimum": 0
|
|
1903
|
+
},
|
|
1904
|
+
"finished_at": {
|
|
1905
|
+
"type": "string"
|
|
1906
|
+
},
|
|
1907
|
+
"kind": {
|
|
1908
|
+
"type": "string",
|
|
1909
|
+
"const": "tool_call"
|
|
1910
|
+
},
|
|
1911
|
+
"started_at": {
|
|
1912
|
+
"type": "string"
|
|
1913
|
+
},
|
|
1914
|
+
"status": {
|
|
1915
|
+
"type": "string",
|
|
1916
|
+
"const": "failed"
|
|
1917
|
+
},
|
|
1918
|
+
"tool_call_id": {
|
|
1919
|
+
"type": "string",
|
|
1920
|
+
"minLength": 1
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
"required": [
|
|
1924
|
+
"kind",
|
|
1925
|
+
"tool_call_id",
|
|
1926
|
+
"started_at",
|
|
1927
|
+
"status",
|
|
1928
|
+
"finished_at",
|
|
1929
|
+
"duration_ms"
|
|
1930
|
+
]
|
|
1931
|
+
}
|
|
1932
|
+
]
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
"allOf": [
|
|
1936
|
+
{
|
|
1937
|
+
"$ref": "#/$defs/ActionEvent"
|
|
1938
|
+
},
|
|
1939
|
+
{
|
|
1940
|
+
"type": "object",
|
|
1941
|
+
"properties": {
|
|
1942
|
+
"kind": {
|
|
1943
|
+
"type": "string",
|
|
1944
|
+
"const": "tool_call"
|
|
1945
|
+
},
|
|
1946
|
+
"started_at": {
|
|
1947
|
+
"type": "string"
|
|
1948
|
+
},
|
|
1949
|
+
"status": {
|
|
1950
|
+
"type": "string",
|
|
1951
|
+
"const": "timeout"
|
|
1952
|
+
},
|
|
1953
|
+
"tool_call_id": {
|
|
1954
|
+
"type": "string",
|
|
1955
|
+
"minLength": 1
|
|
1956
|
+
}
|
|
1957
|
+
},
|
|
1958
|
+
"required": [
|
|
1959
|
+
"kind",
|
|
1960
|
+
"tool_call_id",
|
|
1961
|
+
"started_at",
|
|
1962
|
+
"status"
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
]
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
"allOf": [
|
|
1969
|
+
{
|
|
1970
|
+
"$ref": "#/$defs/ActionEvent"
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
"type": "object",
|
|
1974
|
+
"properties": {
|
|
1975
|
+
"kind": {
|
|
1976
|
+
"type": "string",
|
|
1977
|
+
"const": "tool_call"
|
|
1978
|
+
},
|
|
1979
|
+
"started_at": {
|
|
1980
|
+
"type": "string"
|
|
1981
|
+
},
|
|
1982
|
+
"status": {
|
|
1983
|
+
"type": "string",
|
|
1984
|
+
"const": "interrupted"
|
|
1985
|
+
},
|
|
1986
|
+
"tool_call_id": {
|
|
1987
|
+
"type": "string",
|
|
1988
|
+
"minLength": 1
|
|
1989
|
+
}
|
|
1990
|
+
},
|
|
1991
|
+
"required": [
|
|
1992
|
+
"kind",
|
|
1993
|
+
"tool_call_id",
|
|
1994
|
+
"started_at",
|
|
1995
|
+
"status"
|
|
1996
|
+
]
|
|
1997
|
+
}
|
|
1998
|
+
]
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
"allOf": [
|
|
2002
|
+
{
|
|
2003
|
+
"$ref": "#/$defs/ActionEvent"
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"type": "object",
|
|
2007
|
+
"properties": {
|
|
2008
|
+
"kind": {
|
|
2009
|
+
"type": "string",
|
|
2010
|
+
"const": "tool_result"
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
]
|
|
2015
|
+
}
|
|
2016
|
+
]
|
|
2017
|
+
}
|
|
1880
2018
|
},
|
|
1881
|
-
"
|
|
1882
|
-
"description": "Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` for a\n`tool_result`, or when the harness did not name the tool.",
|
|
2019
|
+
"exit_code": {
|
|
1883
2020
|
"type": [
|
|
1884
|
-
"
|
|
2021
|
+
"integer",
|
|
1885
2022
|
"null"
|
|
2023
|
+
],
|
|
2024
|
+
"format": "int32"
|
|
2025
|
+
},
|
|
2026
|
+
"failure_kind": {
|
|
2027
|
+
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
2028
|
+
"anyOf": [
|
|
2029
|
+
{
|
|
2030
|
+
"$ref": "#/$defs/FailureKind"
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
"type": "null"
|
|
2034
|
+
}
|
|
1886
2035
|
]
|
|
1887
2036
|
},
|
|
1888
|
-
"
|
|
1889
|
-
"description": "The result/observation text, when the trace exposes it; `null` otherwise.",
|
|
2037
|
+
"finished_at": {
|
|
1890
2038
|
"type": [
|
|
1891
2039
|
"string",
|
|
1892
2040
|
"null"
|
|
1893
2041
|
]
|
|
1894
|
-
}
|
|
1895
|
-
},
|
|
1896
|
-
"required": [
|
|
1897
|
-
"kind",
|
|
1898
|
-
"name",
|
|
1899
|
-
"input",
|
|
1900
|
-
"output",
|
|
1901
|
-
"index"
|
|
1902
|
-
]
|
|
1903
|
-
},
|
|
1904
|
-
"FailureKind": {
|
|
1905
|
-
"description": "The normalized, closed set of failure reasons oneharness can classify from a\nharness's output. It is the single source for the `failure_kind` contract\nvalue: serialized as the snake_case token a consumer reads in the report\n(`auth`, `rate_limit`, `model_not_found`, `quota`, `tool_deferred`), so the\nwire shape is unchanged — modeling it as an enum keeps a misspelled or\ninvalid kind unrepresentable and gives every producer/consumer (classifier,\n`is_failure`, the fallback fall-through rule, the report, history) one\ndefinition to share instead of scattered string literals.",
|
|
1906
|
-
"oneOf": [
|
|
1907
|
-
{
|
|
1908
|
-
"description": "Authentication / authorization rejected the request (401/403, missing or\ninvalid credentials).",
|
|
1909
|
-
"type": "string",
|
|
1910
|
-
"const": "auth"
|
|
1911
2042
|
},
|
|
1912
|
-
{
|
|
1913
|
-
"description": "
|
|
1914
|
-
"type": "string"
|
|
1915
|
-
"const": "rate_limit"
|
|
2043
|
+
"harness": {
|
|
2044
|
+
"description": "Canonical harness id (e.g. `claude-code`).",
|
|
2045
|
+
"type": "string"
|
|
1916
2046
|
},
|
|
1917
|
-
{
|
|
1918
|
-
"description": "
|
|
2047
|
+
"history_id": {
|
|
2048
|
+
"description": "Globally unique, time-ordered record id. This is also the cursor accepted\nby `history watch --after` and the exact id accepted by history lookup.",
|
|
1919
2049
|
"type": "string",
|
|
1920
|
-
"
|
|
2050
|
+
"maxLength": 36,
|
|
2051
|
+
"minLength": 36,
|
|
2052
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
1921
2053
|
},
|
|
1922
|
-
{
|
|
1923
|
-
"description": "
|
|
1924
|
-
"
|
|
1925
|
-
"const": "quota"
|
|
2054
|
+
"labels": {
|
|
2055
|
+
"description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
|
|
2056
|
+
"$ref": "#/$defs/HistoryLabels"
|
|
1926
2057
|
},
|
|
1927
|
-
{
|
|
1928
|
-
"description": "The
|
|
1929
|
-
"type":
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
"
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
2058
|
+
"model": {
|
|
2059
|
+
"description": "The effective top-level model for the run, if any.",
|
|
2060
|
+
"type": [
|
|
2061
|
+
"string",
|
|
2062
|
+
"null"
|
|
2063
|
+
]
|
|
2064
|
+
},
|
|
2065
|
+
"model_ms": {
|
|
2066
|
+
"type": "integer",
|
|
2067
|
+
"minimum": 0
|
|
2068
|
+
},
|
|
2069
|
+
"name": {
|
|
2070
|
+
"description": "The human-meaningful session name (see [`session_name`]); repeated on\nevery record so a reader can resolve a session by name from any line.",
|
|
2071
|
+
"type": "string"
|
|
2072
|
+
},
|
|
2073
|
+
"permission_mode": {
|
|
2074
|
+
"description": "The normalized approval mode requested for the run.",
|
|
2075
|
+
"$ref": "#/$defs/PermissionMode"
|
|
2076
|
+
},
|
|
2077
|
+
"project": {
|
|
2078
|
+
"description": "The project directory the run operated in (the real path, not the\non-disk slug), so the list view can show where a session ran.",
|
|
2079
|
+
"type": "string"
|
|
2080
|
+
},
|
|
2081
|
+
"prompt": {
|
|
2082
|
+
"description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
|
|
2083
|
+
"type": "string"
|
|
2084
|
+
},
|
|
2085
|
+
"schema_version": {
|
|
2086
|
+
"type": "string",
|
|
2087
|
+
"const": "0.3"
|
|
2088
|
+
},
|
|
2089
|
+
"session": {
|
|
2090
|
+
"description": "The oneharness session id this run belongs to (the history file's stem).",
|
|
2091
|
+
"type": "string"
|
|
2092
|
+
},
|
|
2093
|
+
"session_id": {
|
|
2094
|
+
"description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
|
|
2095
|
+
"type": [
|
|
2096
|
+
"string",
|
|
2097
|
+
"null"
|
|
2098
|
+
]
|
|
2099
|
+
},
|
|
2100
|
+
"started_at": {
|
|
2101
|
+
"type": "string",
|
|
2102
|
+
"minLength": 1
|
|
2103
|
+
},
|
|
2104
|
+
"status": {
|
|
2105
|
+
"$ref": "#/$defs/Status"
|
|
2106
|
+
},
|
|
2107
|
+
"text": {
|
|
2108
|
+
"description": "Best-effort final assistant text; `null` when extraction was impossible.",
|
|
2109
|
+
"type": [
|
|
2110
|
+
"string",
|
|
2111
|
+
"null"
|
|
2112
|
+
]
|
|
2113
|
+
},
|
|
2114
|
+
"text_source": {
|
|
2115
|
+
"description": "How `text` was extracted; `null` when absent.",
|
|
2116
|
+
"type": [
|
|
2117
|
+
"string",
|
|
2118
|
+
"null"
|
|
2119
|
+
]
|
|
2120
|
+
},
|
|
2121
|
+
"time_to_first_token_ms": {
|
|
2122
|
+
"type": [
|
|
2123
|
+
"integer",
|
|
2124
|
+
"null"
|
|
2125
|
+
],
|
|
2126
|
+
"format": "uint128",
|
|
2127
|
+
"minimum": 0
|
|
2128
|
+
},
|
|
2129
|
+
"timestamp": {
|
|
2130
|
+
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
2131
|
+
"type": "string"
|
|
2132
|
+
},
|
|
2133
|
+
"tool_ms": {
|
|
2134
|
+
"type": "integer",
|
|
2135
|
+
"minimum": 0
|
|
2136
|
+
},
|
|
2137
|
+
"usage": {
|
|
2138
|
+
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
2139
|
+
"$ref": "#/$defs/Usage"
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
"required": [
|
|
2143
|
+
"schema_version",
|
|
2144
|
+
"history_id",
|
|
2145
|
+
"session",
|
|
2146
|
+
"name",
|
|
2147
|
+
"project",
|
|
2148
|
+
"timestamp",
|
|
2149
|
+
"harness",
|
|
2150
|
+
"model",
|
|
2151
|
+
"prompt",
|
|
2152
|
+
"permission_mode",
|
|
2153
|
+
"status",
|
|
2154
|
+
"exit_code",
|
|
2155
|
+
"duration_ms",
|
|
2156
|
+
"finished_at",
|
|
2157
|
+
"text",
|
|
2158
|
+
"text_source",
|
|
2159
|
+
"usage",
|
|
2160
|
+
"session_id",
|
|
2161
|
+
"events",
|
|
2162
|
+
"failure_kind",
|
|
2163
|
+
"started_at",
|
|
2164
|
+
"model_ms",
|
|
2165
|
+
"tool_ms"
|
|
2166
|
+
]
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
"type": "object",
|
|
2170
|
+
"properties": {
|
|
2171
|
+
"duration_ms": {
|
|
2172
|
+
"type": [
|
|
2173
|
+
"integer",
|
|
2174
|
+
"null"
|
|
2175
|
+
],
|
|
2176
|
+
"format": "uint128",
|
|
2177
|
+
"minimum": 0
|
|
2178
|
+
},
|
|
2179
|
+
"events": {
|
|
2180
|
+
"type": [
|
|
2181
|
+
"array",
|
|
2182
|
+
"null"
|
|
2183
|
+
],
|
|
2184
|
+
"items": {
|
|
2185
|
+
"type": "object",
|
|
2186
|
+
"properties": {
|
|
2187
|
+
"index": {
|
|
2188
|
+
"type": "integer",
|
|
2189
|
+
"minimum": 0
|
|
2190
|
+
},
|
|
2191
|
+
"input": true,
|
|
2192
|
+
"kind": {
|
|
2193
|
+
"type": "string"
|
|
2194
|
+
},
|
|
2195
|
+
"name": {
|
|
2196
|
+
"type": [
|
|
2197
|
+
"string",
|
|
2198
|
+
"null"
|
|
2199
|
+
]
|
|
2200
|
+
},
|
|
2201
|
+
"output": {
|
|
2202
|
+
"type": [
|
|
2203
|
+
"string",
|
|
2204
|
+
"null"
|
|
2205
|
+
]
|
|
2206
|
+
}
|
|
2207
|
+
},
|
|
2208
|
+
"required": [
|
|
2209
|
+
"kind",
|
|
2210
|
+
"name",
|
|
2211
|
+
"input",
|
|
2212
|
+
"output",
|
|
2213
|
+
"index"
|
|
2214
|
+
]
|
|
2215
|
+
}
|
|
2216
|
+
},
|
|
2217
|
+
"exit_code": {
|
|
2218
|
+
"type": [
|
|
2219
|
+
"integer",
|
|
2220
|
+
"null"
|
|
2221
|
+
],
|
|
2222
|
+
"format": "int32"
|
|
2223
|
+
},
|
|
2224
|
+
"failure_kind": {
|
|
2225
|
+
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
2226
|
+
"anyOf": [
|
|
2227
|
+
{
|
|
2228
|
+
"$ref": "#/$defs/FailureKind"
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
"type": "null"
|
|
2232
|
+
}
|
|
2233
|
+
]
|
|
2234
|
+
},
|
|
2235
|
+
"finished_at": {
|
|
2236
|
+
"type": [
|
|
2237
|
+
"string",
|
|
2238
|
+
"null"
|
|
2239
|
+
]
|
|
2240
|
+
},
|
|
2241
|
+
"harness": {
|
|
2242
|
+
"description": "Canonical harness id (e.g. `claude-code`).",
|
|
2243
|
+
"type": "string"
|
|
2244
|
+
},
|
|
2245
|
+
"history_id": {
|
|
2246
|
+
"description": "Globally unique, time-ordered record id. This is also the cursor accepted\nby `history watch --after` and the exact id accepted by history lookup.",
|
|
2247
|
+
"type": "string",
|
|
2248
|
+
"maxLength": 36,
|
|
2249
|
+
"minLength": 36,
|
|
2250
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
2251
|
+
},
|
|
2252
|
+
"labels": {
|
|
2253
|
+
"description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
|
|
2254
|
+
"$ref": "#/$defs/HistoryLabels"
|
|
2255
|
+
},
|
|
2256
|
+
"model": {
|
|
2257
|
+
"description": "The effective top-level model for the run, if any.",
|
|
2258
|
+
"type": [
|
|
2259
|
+
"string",
|
|
2260
|
+
"null"
|
|
2261
|
+
]
|
|
2262
|
+
},
|
|
2263
|
+
"model_ms": {
|
|
2264
|
+
"type": [
|
|
2265
|
+
"integer",
|
|
2266
|
+
"null"
|
|
2267
|
+
],
|
|
2268
|
+
"format": "uint128",
|
|
2269
|
+
"minimum": 0
|
|
2270
|
+
},
|
|
2271
|
+
"name": {
|
|
2272
|
+
"description": "The human-meaningful session name (see [`session_name`]); repeated on\nevery record so a reader can resolve a session by name from any line.",
|
|
2273
|
+
"type": "string"
|
|
2274
|
+
},
|
|
2275
|
+
"permission_mode": {
|
|
2276
|
+
"description": "The normalized approval mode requested for the run.",
|
|
2277
|
+
"$ref": "#/$defs/PermissionMode"
|
|
2278
|
+
},
|
|
2279
|
+
"project": {
|
|
2280
|
+
"description": "The project directory the run operated in (the real path, not the\non-disk slug), so the list view can show where a session ran.",
|
|
2281
|
+
"type": "string"
|
|
2282
|
+
},
|
|
2283
|
+
"prompt": {
|
|
2284
|
+
"description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
|
|
2285
|
+
"type": "string"
|
|
2286
|
+
},
|
|
2287
|
+
"schema_version": {
|
|
2288
|
+
"type": "string",
|
|
2289
|
+
"enum": [
|
|
2290
|
+
"0.1",
|
|
2291
|
+
"0.2"
|
|
2292
|
+
]
|
|
2293
|
+
},
|
|
2294
|
+
"session": {
|
|
2295
|
+
"description": "The oneharness session id this run belongs to (the history file's stem).",
|
|
2296
|
+
"type": "string"
|
|
2297
|
+
},
|
|
2298
|
+
"session_id": {
|
|
2299
|
+
"description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
|
|
2300
|
+
"type": [
|
|
2301
|
+
"string",
|
|
2302
|
+
"null"
|
|
2303
|
+
]
|
|
2304
|
+
},
|
|
2305
|
+
"started_at": {
|
|
2306
|
+
"description": "UTC invocation bounds and monotonic time attribution. The provider/tool\nsplit is conservative when a transcript has tool calls but lacks native\nboundaries: the observed invocation interval is attributed to the union\nof those calls, never double-counted.",
|
|
2307
|
+
"type": [
|
|
2308
|
+
"string",
|
|
2309
|
+
"null"
|
|
2310
|
+
]
|
|
2311
|
+
},
|
|
2312
|
+
"status": {
|
|
2313
|
+
"$ref": "#/$defs/Status"
|
|
2314
|
+
},
|
|
2315
|
+
"text": {
|
|
2316
|
+
"description": "Best-effort final assistant text; `null` when extraction was impossible.",
|
|
2317
|
+
"type": [
|
|
2318
|
+
"string",
|
|
2319
|
+
"null"
|
|
2320
|
+
]
|
|
2321
|
+
},
|
|
2322
|
+
"text_source": {
|
|
2323
|
+
"description": "How `text` was extracted; `null` when absent.",
|
|
2324
|
+
"type": [
|
|
2325
|
+
"string",
|
|
2326
|
+
"null"
|
|
2327
|
+
]
|
|
2328
|
+
},
|
|
2329
|
+
"time_to_first_token_ms": {
|
|
2330
|
+
"type": [
|
|
2331
|
+
"integer",
|
|
2332
|
+
"null"
|
|
2333
|
+
],
|
|
2334
|
+
"format": "uint128",
|
|
2335
|
+
"minimum": 0
|
|
2336
|
+
},
|
|
2337
|
+
"timestamp": {
|
|
2338
|
+
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
2339
|
+
"type": "string"
|
|
2340
|
+
},
|
|
2341
|
+
"tool_ms": {
|
|
2342
|
+
"type": [
|
|
2343
|
+
"integer",
|
|
2344
|
+
"null"
|
|
2345
|
+
],
|
|
2346
|
+
"format": "uint128",
|
|
2347
|
+
"minimum": 0
|
|
2348
|
+
},
|
|
2349
|
+
"usage": {
|
|
2350
|
+
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
2351
|
+
"$ref": "#/$defs/Usage"
|
|
2352
|
+
}
|
|
2353
|
+
},
|
|
2354
|
+
"required": [
|
|
2355
|
+
"schema_version",
|
|
2356
|
+
"history_id",
|
|
2357
|
+
"session",
|
|
2358
|
+
"name",
|
|
2359
|
+
"project",
|
|
2360
|
+
"timestamp",
|
|
2361
|
+
"harness",
|
|
2362
|
+
"model",
|
|
2363
|
+
"prompt",
|
|
2364
|
+
"permission_mode",
|
|
2365
|
+
"status",
|
|
2366
|
+
"exit_code",
|
|
2367
|
+
"duration_ms",
|
|
2368
|
+
"text",
|
|
2369
|
+
"text_source",
|
|
2370
|
+
"usage",
|
|
2371
|
+
"session_id",
|
|
2372
|
+
"events",
|
|
2373
|
+
"failure_kind"
|
|
2374
|
+
]
|
|
2375
|
+
}
|
|
2376
|
+
],
|
|
2377
|
+
"$defs": {
|
|
2378
|
+
"ActionEvent": {
|
|
2379
|
+
"description": "One normalized action a harness took, harness-agnostic so a single consumer\nassertion works across harnesses. Every field is always serialized (null when\nabsent) so the shape is stable, mirroring the `usage` contract.",
|
|
2380
|
+
"type": "object",
|
|
2381
|
+
"properties": {
|
|
2382
|
+
"duration_ms": {
|
|
2383
|
+
"description": "Monotonic elapsed tool time. `None` means no terminal boundary was seen.",
|
|
2384
|
+
"type": [
|
|
2385
|
+
"integer",
|
|
2386
|
+
"null"
|
|
2387
|
+
],
|
|
2388
|
+
"format": "uint128",
|
|
2389
|
+
"minimum": 0
|
|
2390
|
+
},
|
|
2391
|
+
"finished_at": {
|
|
2392
|
+
"type": [
|
|
2393
|
+
"string",
|
|
2394
|
+
"null"
|
|
2395
|
+
]
|
|
2396
|
+
},
|
|
2397
|
+
"index": {
|
|
2398
|
+
"description": "Position of this event within the run, so \"≤ N tool calls\" and \"did X\nbefore Y\" are expressible from a stable ordering (also array order).",
|
|
2399
|
+
"type": "integer",
|
|
2400
|
+
"format": "uint",
|
|
2401
|
+
"minimum": 0
|
|
2402
|
+
},
|
|
2403
|
+
"input": {
|
|
2404
|
+
"description": "Structured, tool-shaped arguments (the command string, the file path),\nso a consumer asserts on specific args without re-parsing; `null` when the\nevent carries none (e.g. a `tool_result`)."
|
|
2405
|
+
},
|
|
2406
|
+
"kind": {
|
|
2407
|
+
"description": "The kind of event: `tool_call` (the model invoked a tool) or\n`tool_result` (the observation returned to the model). Left open for\nfuture kinds rather than an enum, so a new shape never breaks the field.",
|
|
2408
|
+
"type": "string"
|
|
2409
|
+
},
|
|
2410
|
+
"name": {
|
|
2411
|
+
"description": "Normalized tool name where knowable (e.g. `bash`, `Edit`); `null` for a\n`tool_result`, or when the harness did not name the tool.",
|
|
2412
|
+
"type": [
|
|
2413
|
+
"string",
|
|
2414
|
+
"null"
|
|
2415
|
+
]
|
|
2416
|
+
},
|
|
2417
|
+
"output": {
|
|
2418
|
+
"description": "The result/observation text, when the trace exposes it; `null` otherwise.",
|
|
2419
|
+
"type": [
|
|
2420
|
+
"string",
|
|
2421
|
+
"null"
|
|
2422
|
+
]
|
|
2423
|
+
},
|
|
2424
|
+
"started_at": {
|
|
2425
|
+
"description": "UTC interval bounds for tool execution, populated on history records.",
|
|
2426
|
+
"type": [
|
|
2427
|
+
"string",
|
|
2428
|
+
"null"
|
|
2429
|
+
]
|
|
2430
|
+
},
|
|
2431
|
+
"status": {
|
|
2432
|
+
"description": "Terminal tool state, populated on history tool-call events.",
|
|
2433
|
+
"anyOf": [
|
|
2434
|
+
{
|
|
2435
|
+
"$ref": "#/$defs/ToolCallStatus"
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"type": "null"
|
|
2439
|
+
}
|
|
2440
|
+
]
|
|
2441
|
+
},
|
|
2442
|
+
"tool_call_id": {
|
|
2443
|
+
"description": "Stable call identity within the session. Present on tool calls and their\nmatching results when the provider exposes an identity; history fills a\ndeterministic run-local identity for providers that do not.",
|
|
2444
|
+
"type": [
|
|
2445
|
+
"string",
|
|
2446
|
+
"null"
|
|
2447
|
+
]
|
|
2448
|
+
}
|
|
2449
|
+
},
|
|
2450
|
+
"required": [
|
|
2451
|
+
"kind",
|
|
2452
|
+
"name",
|
|
2453
|
+
"input",
|
|
2454
|
+
"output",
|
|
2455
|
+
"index",
|
|
2456
|
+
"tool_call_id",
|
|
2457
|
+
"started_at",
|
|
2458
|
+
"finished_at",
|
|
2459
|
+
"duration_ms",
|
|
2460
|
+
"status"
|
|
2461
|
+
]
|
|
2462
|
+
},
|
|
2463
|
+
"FailureKind": {
|
|
2464
|
+
"description": "The normalized, closed set of failure reasons oneharness can classify from a\nharness's output. It is the single source for the `failure_kind` contract\nvalue: serialized as the snake_case token a consumer reads in the report\n(`auth`, `rate_limit`, `model_not_found`, `quota`, `tool_deferred`), so the\nwire shape is unchanged — modeling it as an enum keeps a misspelled or\ninvalid kind unrepresentable and gives every producer/consumer (classifier,\n`is_failure`, the fallback fall-through rule, the report, history) one\ndefinition to share instead of scattered string literals.",
|
|
2465
|
+
"oneOf": [
|
|
2466
|
+
{
|
|
2467
|
+
"description": "Authentication / authorization rejected the request (401/403, missing or\ninvalid credentials).",
|
|
2468
|
+
"type": "string",
|
|
2469
|
+
"const": "auth"
|
|
2470
|
+
},
|
|
2471
|
+
{
|
|
2472
|
+
"description": "Rate limited (429, too many requests) — a transient condition of an\notherwise working, authenticated harness.",
|
|
2473
|
+
"type": "string",
|
|
2474
|
+
"const": "rate_limit"
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
"description": "The requested model was not found / is invalid — a configuration mistake.",
|
|
2478
|
+
"type": "string",
|
|
2479
|
+
"const": "model_not_found"
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
"description": "Out of quota / credits, or a billing problem — a provisioning failure.",
|
|
2483
|
+
"type": "string",
|
|
2484
|
+
"const": "quota"
|
|
2485
|
+
},
|
|
2486
|
+
{
|
|
2487
|
+
"description": "The harness deferred a builtin tool call instead of executing it, so a\nclean-exit run did no useful work (Claude Code bridge deployments; issue\n#1114). The only kind that can appear on a `status: ok` run.",
|
|
2488
|
+
"type": "string",
|
|
2489
|
+
"const": "tool_deferred"
|
|
2490
|
+
}
|
|
2491
|
+
]
|
|
2492
|
+
},
|
|
2493
|
+
"HistoryLabels": {
|
|
2494
|
+
"type": "object",
|
|
2495
|
+
"additionalProperties": {
|
|
2496
|
+
"type": "string",
|
|
2497
|
+
"maxLength": 256,
|
|
2498
|
+
"minLength": 1,
|
|
2499
|
+
"not": {
|
|
2500
|
+
"pattern": "[\\u0000-\\u001f\\u007f-\\u009f]"
|
|
1942
2501
|
}
|
|
1943
2502
|
},
|
|
1944
2503
|
"propertyNames": {
|
|
@@ -2020,6 +2579,15 @@
|
|
|
2020
2579
|
}
|
|
2021
2580
|
]
|
|
2022
2581
|
},
|
|
2582
|
+
"ToolCallStatus": {
|
|
2583
|
+
"type": "string",
|
|
2584
|
+
"enum": [
|
|
2585
|
+
"completed",
|
|
2586
|
+
"failed",
|
|
2587
|
+
"timeout",
|
|
2588
|
+
"interrupted"
|
|
2589
|
+
]
|
|
2590
|
+
},
|
|
2023
2591
|
"Usage": {
|
|
2024
2592
|
"description": "Normalized token/cost accounting. Every field is best-effort and independently\nnullable: a harness may report tokens but not dollar cost (cost is commonly\nabsent on subscription auth), or report nothing at all (plain-text harnesses).",
|
|
2025
2593
|
"type": "object",
|
|
@@ -2107,6 +2675,21 @@
|
|
|
2107
2675
|
"description": "One normalized action a harness took, harness-agnostic so a single consumer\nassertion works across harnesses. Every field is always serialized (null when\nabsent) so the shape is stable, mirroring the `usage` contract.",
|
|
2108
2676
|
"type": "object",
|
|
2109
2677
|
"properties": {
|
|
2678
|
+
"duration_ms": {
|
|
2679
|
+
"description": "Monotonic elapsed tool time. `None` means no terminal boundary was seen.",
|
|
2680
|
+
"type": [
|
|
2681
|
+
"integer",
|
|
2682
|
+
"null"
|
|
2683
|
+
],
|
|
2684
|
+
"format": "uint128",
|
|
2685
|
+
"minimum": 0
|
|
2686
|
+
},
|
|
2687
|
+
"finished_at": {
|
|
2688
|
+
"type": [
|
|
2689
|
+
"string",
|
|
2690
|
+
"null"
|
|
2691
|
+
]
|
|
2692
|
+
},
|
|
2110
2693
|
"index": {
|
|
2111
2694
|
"description": "Position of this event within the run, so \"≤ N tool calls\" and \"did X\nbefore Y\" are expressible from a stable ordering (also array order).",
|
|
2112
2695
|
"type": "integer",
|
|
@@ -2133,6 +2716,31 @@
|
|
|
2133
2716
|
"string",
|
|
2134
2717
|
"null"
|
|
2135
2718
|
]
|
|
2719
|
+
},
|
|
2720
|
+
"started_at": {
|
|
2721
|
+
"description": "UTC interval bounds for tool execution, populated on history records.",
|
|
2722
|
+
"type": [
|
|
2723
|
+
"string",
|
|
2724
|
+
"null"
|
|
2725
|
+
]
|
|
2726
|
+
},
|
|
2727
|
+
"status": {
|
|
2728
|
+
"description": "Terminal tool state, populated on history tool-call events.",
|
|
2729
|
+
"anyOf": [
|
|
2730
|
+
{
|
|
2731
|
+
"$ref": "#/$defs/ToolCallStatus"
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
"type": "null"
|
|
2735
|
+
}
|
|
2736
|
+
]
|
|
2737
|
+
},
|
|
2738
|
+
"tool_call_id": {
|
|
2739
|
+
"description": "Stable call identity within the session. Present on tool calls and their\nmatching results when the provider exposes an identity; history fills a\ndeterministic run-local identity for providers that do not.",
|
|
2740
|
+
"type": [
|
|
2741
|
+
"string",
|
|
2742
|
+
"null"
|
|
2743
|
+
]
|
|
2136
2744
|
}
|
|
2137
2745
|
},
|
|
2138
2746
|
"required": [
|
|
@@ -2140,7 +2748,12 @@
|
|
|
2140
2748
|
"name",
|
|
2141
2749
|
"input",
|
|
2142
2750
|
"output",
|
|
2143
|
-
"index"
|
|
2751
|
+
"index",
|
|
2752
|
+
"tool_call_id",
|
|
2753
|
+
"started_at",
|
|
2754
|
+
"finished_at",
|
|
2755
|
+
"duration_ms",
|
|
2756
|
+
"status"
|
|
2144
2757
|
]
|
|
2145
2758
|
},
|
|
2146
2759
|
"FailureKind": {
|
|
@@ -2194,142 +2807,548 @@
|
|
|
2194
2807
|
},
|
|
2195
2808
|
"HistoryRecord": {
|
|
2196
2809
|
"description": "One harness run, normalized and frozen for the history log. Serialized as one\nJSONL line per harness run, appended as the run finalizes. Carries only the\nnormalized cross-harness signals — no raw stdout/stderr.",
|
|
2197
|
-
"
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
"
|
|
2201
|
-
"
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
"format": "uint128",
|
|
2205
|
-
"minimum": 0
|
|
2206
|
-
},
|
|
2207
|
-
"events": {
|
|
2208
|
-
"description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
|
|
2209
|
-
"type": [
|
|
2210
|
-
"array",
|
|
2211
|
-
"null"
|
|
2212
|
-
],
|
|
2213
|
-
"items": {
|
|
2214
|
-
"$ref": "#/$defs/ActionEvent"
|
|
2215
|
-
}
|
|
2216
|
-
},
|
|
2217
|
-
"exit_code": {
|
|
2218
|
-
"type": [
|
|
2219
|
-
"integer",
|
|
2220
|
-
"null"
|
|
2221
|
-
],
|
|
2222
|
-
"format": "int32"
|
|
2223
|
-
},
|
|
2224
|
-
"failure_kind": {
|
|
2225
|
-
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
2226
|
-
"anyOf": [
|
|
2227
|
-
{
|
|
2228
|
-
"$ref": "#/$defs/FailureKind"
|
|
2810
|
+
"oneOf": [
|
|
2811
|
+
{
|
|
2812
|
+
"type": "object",
|
|
2813
|
+
"properties": {
|
|
2814
|
+
"duration_ms": {
|
|
2815
|
+
"type": "integer",
|
|
2816
|
+
"minimum": 0
|
|
2229
2817
|
},
|
|
2230
|
-
{
|
|
2231
|
-
"
|
|
2818
|
+
"events": {
|
|
2819
|
+
"description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
|
|
2820
|
+
"type": [
|
|
2821
|
+
"array",
|
|
2822
|
+
"null"
|
|
2823
|
+
],
|
|
2824
|
+
"items": {
|
|
2825
|
+
"oneOf": [
|
|
2826
|
+
{
|
|
2827
|
+
"allOf": [
|
|
2828
|
+
{
|
|
2829
|
+
"$ref": "#/$defs/ActionEvent"
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
"type": "object",
|
|
2833
|
+
"properties": {
|
|
2834
|
+
"duration_ms": {
|
|
2835
|
+
"type": "integer",
|
|
2836
|
+
"minimum": 0
|
|
2837
|
+
},
|
|
2838
|
+
"finished_at": {
|
|
2839
|
+
"type": "string"
|
|
2840
|
+
},
|
|
2841
|
+
"kind": {
|
|
2842
|
+
"type": "string",
|
|
2843
|
+
"const": "tool_call"
|
|
2844
|
+
},
|
|
2845
|
+
"started_at": {
|
|
2846
|
+
"type": "string"
|
|
2847
|
+
},
|
|
2848
|
+
"status": {
|
|
2849
|
+
"type": "string",
|
|
2850
|
+
"const": "completed"
|
|
2851
|
+
},
|
|
2852
|
+
"tool_call_id": {
|
|
2853
|
+
"type": "string",
|
|
2854
|
+
"minLength": 1
|
|
2855
|
+
}
|
|
2856
|
+
},
|
|
2857
|
+
"required": [
|
|
2858
|
+
"kind",
|
|
2859
|
+
"tool_call_id",
|
|
2860
|
+
"started_at",
|
|
2861
|
+
"status",
|
|
2862
|
+
"finished_at",
|
|
2863
|
+
"duration_ms"
|
|
2864
|
+
]
|
|
2865
|
+
}
|
|
2866
|
+
]
|
|
2867
|
+
},
|
|
2868
|
+
{
|
|
2869
|
+
"allOf": [
|
|
2870
|
+
{
|
|
2871
|
+
"$ref": "#/$defs/ActionEvent"
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
"type": "object",
|
|
2875
|
+
"properties": {
|
|
2876
|
+
"duration_ms": {
|
|
2877
|
+
"type": "integer",
|
|
2878
|
+
"minimum": 0
|
|
2879
|
+
},
|
|
2880
|
+
"finished_at": {
|
|
2881
|
+
"type": "string"
|
|
2882
|
+
},
|
|
2883
|
+
"kind": {
|
|
2884
|
+
"type": "string",
|
|
2885
|
+
"const": "tool_call"
|
|
2886
|
+
},
|
|
2887
|
+
"started_at": {
|
|
2888
|
+
"type": "string"
|
|
2889
|
+
},
|
|
2890
|
+
"status": {
|
|
2891
|
+
"type": "string",
|
|
2892
|
+
"const": "failed"
|
|
2893
|
+
},
|
|
2894
|
+
"tool_call_id": {
|
|
2895
|
+
"type": "string",
|
|
2896
|
+
"minLength": 1
|
|
2897
|
+
}
|
|
2898
|
+
},
|
|
2899
|
+
"required": [
|
|
2900
|
+
"kind",
|
|
2901
|
+
"tool_call_id",
|
|
2902
|
+
"started_at",
|
|
2903
|
+
"status",
|
|
2904
|
+
"finished_at",
|
|
2905
|
+
"duration_ms"
|
|
2906
|
+
]
|
|
2907
|
+
}
|
|
2908
|
+
]
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
"allOf": [
|
|
2912
|
+
{
|
|
2913
|
+
"$ref": "#/$defs/ActionEvent"
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
"type": "object",
|
|
2917
|
+
"properties": {
|
|
2918
|
+
"kind": {
|
|
2919
|
+
"type": "string",
|
|
2920
|
+
"const": "tool_call"
|
|
2921
|
+
},
|
|
2922
|
+
"started_at": {
|
|
2923
|
+
"type": "string"
|
|
2924
|
+
},
|
|
2925
|
+
"status": {
|
|
2926
|
+
"type": "string",
|
|
2927
|
+
"const": "timeout"
|
|
2928
|
+
},
|
|
2929
|
+
"tool_call_id": {
|
|
2930
|
+
"type": "string",
|
|
2931
|
+
"minLength": 1
|
|
2932
|
+
}
|
|
2933
|
+
},
|
|
2934
|
+
"required": [
|
|
2935
|
+
"kind",
|
|
2936
|
+
"tool_call_id",
|
|
2937
|
+
"started_at",
|
|
2938
|
+
"status"
|
|
2939
|
+
]
|
|
2940
|
+
}
|
|
2941
|
+
]
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"allOf": [
|
|
2945
|
+
{
|
|
2946
|
+
"$ref": "#/$defs/ActionEvent"
|
|
2947
|
+
},
|
|
2948
|
+
{
|
|
2949
|
+
"type": "object",
|
|
2950
|
+
"properties": {
|
|
2951
|
+
"kind": {
|
|
2952
|
+
"type": "string",
|
|
2953
|
+
"const": "tool_call"
|
|
2954
|
+
},
|
|
2955
|
+
"started_at": {
|
|
2956
|
+
"type": "string"
|
|
2957
|
+
},
|
|
2958
|
+
"status": {
|
|
2959
|
+
"type": "string",
|
|
2960
|
+
"const": "interrupted"
|
|
2961
|
+
},
|
|
2962
|
+
"tool_call_id": {
|
|
2963
|
+
"type": "string",
|
|
2964
|
+
"minLength": 1
|
|
2965
|
+
}
|
|
2966
|
+
},
|
|
2967
|
+
"required": [
|
|
2968
|
+
"kind",
|
|
2969
|
+
"tool_call_id",
|
|
2970
|
+
"started_at",
|
|
2971
|
+
"status"
|
|
2972
|
+
]
|
|
2973
|
+
}
|
|
2974
|
+
]
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
"allOf": [
|
|
2978
|
+
{
|
|
2979
|
+
"$ref": "#/$defs/ActionEvent"
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"type": "object",
|
|
2983
|
+
"properties": {
|
|
2984
|
+
"kind": {
|
|
2985
|
+
"type": "string",
|
|
2986
|
+
"const": "tool_result"
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
]
|
|
2991
|
+
}
|
|
2992
|
+
]
|
|
2993
|
+
}
|
|
2994
|
+
},
|
|
2995
|
+
"exit_code": {
|
|
2996
|
+
"type": [
|
|
2997
|
+
"integer",
|
|
2998
|
+
"null"
|
|
2999
|
+
],
|
|
3000
|
+
"format": "int32"
|
|
3001
|
+
},
|
|
3002
|
+
"failure_kind": {
|
|
3003
|
+
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
3004
|
+
"anyOf": [
|
|
3005
|
+
{
|
|
3006
|
+
"$ref": "#/$defs/FailureKind"
|
|
3007
|
+
},
|
|
3008
|
+
{
|
|
3009
|
+
"type": "null"
|
|
3010
|
+
}
|
|
3011
|
+
]
|
|
3012
|
+
},
|
|
3013
|
+
"finished_at": {
|
|
3014
|
+
"type": [
|
|
3015
|
+
"string",
|
|
3016
|
+
"null"
|
|
3017
|
+
]
|
|
3018
|
+
},
|
|
3019
|
+
"harness": {
|
|
3020
|
+
"description": "Canonical harness id (e.g. `claude-code`).",
|
|
3021
|
+
"type": "string"
|
|
3022
|
+
},
|
|
3023
|
+
"history_id": {
|
|
3024
|
+
"description": "Globally unique, time-ordered record id. This is also the cursor accepted\nby `history watch --after` and the exact id accepted by history lookup.",
|
|
3025
|
+
"type": "string",
|
|
3026
|
+
"maxLength": 36,
|
|
3027
|
+
"minLength": 36,
|
|
3028
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
3029
|
+
},
|
|
3030
|
+
"labels": {
|
|
3031
|
+
"description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
|
|
3032
|
+
"$ref": "#/$defs/HistoryLabels"
|
|
3033
|
+
},
|
|
3034
|
+
"model": {
|
|
3035
|
+
"description": "The effective top-level model for the run, if any.",
|
|
3036
|
+
"type": [
|
|
3037
|
+
"string",
|
|
3038
|
+
"null"
|
|
3039
|
+
]
|
|
3040
|
+
},
|
|
3041
|
+
"model_ms": {
|
|
3042
|
+
"type": "integer",
|
|
3043
|
+
"minimum": 0
|
|
3044
|
+
},
|
|
3045
|
+
"name": {
|
|
3046
|
+
"description": "The human-meaningful session name (see [`session_name`]); repeated on\nevery record so a reader can resolve a session by name from any line.",
|
|
3047
|
+
"type": "string"
|
|
3048
|
+
},
|
|
3049
|
+
"permission_mode": {
|
|
3050
|
+
"description": "The normalized approval mode requested for the run.",
|
|
3051
|
+
"$ref": "#/$defs/PermissionMode"
|
|
3052
|
+
},
|
|
3053
|
+
"project": {
|
|
3054
|
+
"description": "The project directory the run operated in (the real path, not the\non-disk slug), so the list view can show where a session ran.",
|
|
3055
|
+
"type": "string"
|
|
3056
|
+
},
|
|
3057
|
+
"prompt": {
|
|
3058
|
+
"description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
|
|
3059
|
+
"type": "string"
|
|
3060
|
+
},
|
|
3061
|
+
"schema_version": {
|
|
3062
|
+
"type": "string",
|
|
3063
|
+
"const": "0.3"
|
|
3064
|
+
},
|
|
3065
|
+
"session": {
|
|
3066
|
+
"description": "The oneharness session id this run belongs to (the history file's stem).",
|
|
3067
|
+
"type": "string"
|
|
3068
|
+
},
|
|
3069
|
+
"session_id": {
|
|
3070
|
+
"description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
|
|
3071
|
+
"type": [
|
|
3072
|
+
"string",
|
|
3073
|
+
"null"
|
|
3074
|
+
]
|
|
3075
|
+
},
|
|
3076
|
+
"started_at": {
|
|
3077
|
+
"type": "string",
|
|
3078
|
+
"minLength": 1
|
|
3079
|
+
},
|
|
3080
|
+
"status": {
|
|
3081
|
+
"$ref": "#/$defs/Status"
|
|
3082
|
+
},
|
|
3083
|
+
"text": {
|
|
3084
|
+
"description": "Best-effort final assistant text; `null` when extraction was impossible.",
|
|
3085
|
+
"type": [
|
|
3086
|
+
"string",
|
|
3087
|
+
"null"
|
|
3088
|
+
]
|
|
3089
|
+
},
|
|
3090
|
+
"text_source": {
|
|
3091
|
+
"description": "How `text` was extracted; `null` when absent.",
|
|
3092
|
+
"type": [
|
|
3093
|
+
"string",
|
|
3094
|
+
"null"
|
|
3095
|
+
]
|
|
3096
|
+
},
|
|
3097
|
+
"time_to_first_token_ms": {
|
|
3098
|
+
"type": [
|
|
3099
|
+
"integer",
|
|
3100
|
+
"null"
|
|
3101
|
+
],
|
|
3102
|
+
"format": "uint128",
|
|
3103
|
+
"minimum": 0
|
|
3104
|
+
},
|
|
3105
|
+
"timestamp": {
|
|
3106
|
+
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
3107
|
+
"type": "string"
|
|
3108
|
+
},
|
|
3109
|
+
"tool_ms": {
|
|
3110
|
+
"type": "integer",
|
|
3111
|
+
"minimum": 0
|
|
3112
|
+
},
|
|
3113
|
+
"usage": {
|
|
3114
|
+
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
3115
|
+
"$ref": "#/$defs/Usage"
|
|
2232
3116
|
}
|
|
3117
|
+
},
|
|
3118
|
+
"required": [
|
|
3119
|
+
"schema_version",
|
|
3120
|
+
"history_id",
|
|
3121
|
+
"session",
|
|
3122
|
+
"name",
|
|
3123
|
+
"project",
|
|
3124
|
+
"timestamp",
|
|
3125
|
+
"harness",
|
|
3126
|
+
"model",
|
|
3127
|
+
"prompt",
|
|
3128
|
+
"permission_mode",
|
|
3129
|
+
"status",
|
|
3130
|
+
"exit_code",
|
|
3131
|
+
"duration_ms",
|
|
3132
|
+
"finished_at",
|
|
3133
|
+
"text",
|
|
3134
|
+
"text_source",
|
|
3135
|
+
"usage",
|
|
3136
|
+
"session_id",
|
|
3137
|
+
"events",
|
|
3138
|
+
"failure_kind",
|
|
3139
|
+
"started_at",
|
|
3140
|
+
"model_ms",
|
|
3141
|
+
"tool_ms"
|
|
2233
3142
|
]
|
|
2234
3143
|
},
|
|
2235
|
-
|
|
2236
|
-
"
|
|
2237
|
-
"
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
"
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
3144
|
+
{
|
|
3145
|
+
"type": "object",
|
|
3146
|
+
"properties": {
|
|
3147
|
+
"duration_ms": {
|
|
3148
|
+
"type": [
|
|
3149
|
+
"integer",
|
|
3150
|
+
"null"
|
|
3151
|
+
],
|
|
3152
|
+
"format": "uint128",
|
|
3153
|
+
"minimum": 0
|
|
3154
|
+
},
|
|
3155
|
+
"events": {
|
|
3156
|
+
"type": [
|
|
3157
|
+
"array",
|
|
3158
|
+
"null"
|
|
3159
|
+
],
|
|
3160
|
+
"items": {
|
|
3161
|
+
"type": "object",
|
|
3162
|
+
"properties": {
|
|
3163
|
+
"index": {
|
|
3164
|
+
"type": "integer",
|
|
3165
|
+
"minimum": 0
|
|
3166
|
+
},
|
|
3167
|
+
"input": true,
|
|
3168
|
+
"kind": {
|
|
3169
|
+
"type": "string"
|
|
3170
|
+
},
|
|
3171
|
+
"name": {
|
|
3172
|
+
"type": [
|
|
3173
|
+
"string",
|
|
3174
|
+
"null"
|
|
3175
|
+
]
|
|
3176
|
+
},
|
|
3177
|
+
"output": {
|
|
3178
|
+
"type": [
|
|
3179
|
+
"string",
|
|
3180
|
+
"null"
|
|
3181
|
+
]
|
|
3182
|
+
}
|
|
3183
|
+
},
|
|
3184
|
+
"required": [
|
|
3185
|
+
"kind",
|
|
3186
|
+
"name",
|
|
3187
|
+
"input",
|
|
3188
|
+
"output",
|
|
3189
|
+
"index"
|
|
3190
|
+
]
|
|
3191
|
+
}
|
|
3192
|
+
},
|
|
3193
|
+
"exit_code": {
|
|
3194
|
+
"type": [
|
|
3195
|
+
"integer",
|
|
3196
|
+
"null"
|
|
3197
|
+
],
|
|
3198
|
+
"format": "int32"
|
|
3199
|
+
},
|
|
3200
|
+
"failure_kind": {
|
|
3201
|
+
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
3202
|
+
"anyOf": [
|
|
3203
|
+
{
|
|
3204
|
+
"$ref": "#/$defs/FailureKind"
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
"type": "null"
|
|
3208
|
+
}
|
|
3209
|
+
]
|
|
3210
|
+
},
|
|
3211
|
+
"finished_at": {
|
|
3212
|
+
"type": [
|
|
3213
|
+
"string",
|
|
3214
|
+
"null"
|
|
3215
|
+
]
|
|
3216
|
+
},
|
|
3217
|
+
"harness": {
|
|
3218
|
+
"description": "Canonical harness id (e.g. `claude-code`).",
|
|
3219
|
+
"type": "string"
|
|
3220
|
+
},
|
|
3221
|
+
"history_id": {
|
|
3222
|
+
"description": "Globally unique, time-ordered record id. This is also the cursor accepted\nby `history watch --after` and the exact id accepted by history lookup.",
|
|
3223
|
+
"type": "string",
|
|
3224
|
+
"maxLength": 36,
|
|
3225
|
+
"minLength": 36,
|
|
3226
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
3227
|
+
},
|
|
3228
|
+
"labels": {
|
|
3229
|
+
"description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
|
|
3230
|
+
"$ref": "#/$defs/HistoryLabels"
|
|
3231
|
+
},
|
|
3232
|
+
"model": {
|
|
3233
|
+
"description": "The effective top-level model for the run, if any.",
|
|
3234
|
+
"type": [
|
|
3235
|
+
"string",
|
|
3236
|
+
"null"
|
|
3237
|
+
]
|
|
3238
|
+
},
|
|
3239
|
+
"model_ms": {
|
|
3240
|
+
"type": [
|
|
3241
|
+
"integer",
|
|
3242
|
+
"null"
|
|
3243
|
+
],
|
|
3244
|
+
"format": "uint128",
|
|
3245
|
+
"minimum": 0
|
|
3246
|
+
},
|
|
3247
|
+
"name": {
|
|
3248
|
+
"description": "The human-meaningful session name (see [`session_name`]); repeated on\nevery record so a reader can resolve a session by name from any line.",
|
|
3249
|
+
"type": "string"
|
|
3250
|
+
},
|
|
3251
|
+
"permission_mode": {
|
|
3252
|
+
"description": "The normalized approval mode requested for the run.",
|
|
3253
|
+
"$ref": "#/$defs/PermissionMode"
|
|
3254
|
+
},
|
|
3255
|
+
"project": {
|
|
3256
|
+
"description": "The project directory the run operated in (the real path, not the\non-disk slug), so the list view can show where a session ran.",
|
|
3257
|
+
"type": "string"
|
|
3258
|
+
},
|
|
3259
|
+
"prompt": {
|
|
3260
|
+
"description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
|
|
3261
|
+
"type": "string"
|
|
3262
|
+
},
|
|
3263
|
+
"schema_version": {
|
|
3264
|
+
"type": "string",
|
|
3265
|
+
"enum": [
|
|
3266
|
+
"0.1",
|
|
3267
|
+
"0.2"
|
|
3268
|
+
]
|
|
3269
|
+
},
|
|
3270
|
+
"session": {
|
|
3271
|
+
"description": "The oneharness session id this run belongs to (the history file's stem).",
|
|
3272
|
+
"type": "string"
|
|
3273
|
+
},
|
|
3274
|
+
"session_id": {
|
|
3275
|
+
"description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
|
|
3276
|
+
"type": [
|
|
3277
|
+
"string",
|
|
3278
|
+
"null"
|
|
3279
|
+
]
|
|
3280
|
+
},
|
|
3281
|
+
"started_at": {
|
|
3282
|
+
"description": "UTC invocation bounds and monotonic time attribution. The provider/tool\nsplit is conservative when a transcript has tool calls but lacks native\nboundaries: the observed invocation interval is attributed to the union\nof those calls, never double-counted.",
|
|
3283
|
+
"type": [
|
|
3284
|
+
"string",
|
|
3285
|
+
"null"
|
|
3286
|
+
]
|
|
3287
|
+
},
|
|
3288
|
+
"status": {
|
|
3289
|
+
"$ref": "#/$defs/Status"
|
|
3290
|
+
},
|
|
3291
|
+
"text": {
|
|
3292
|
+
"description": "Best-effort final assistant text; `null` when extraction was impossible.",
|
|
3293
|
+
"type": [
|
|
3294
|
+
"string",
|
|
3295
|
+
"null"
|
|
3296
|
+
]
|
|
3297
|
+
},
|
|
3298
|
+
"text_source": {
|
|
3299
|
+
"description": "How `text` was extracted; `null` when absent.",
|
|
3300
|
+
"type": [
|
|
3301
|
+
"string",
|
|
3302
|
+
"null"
|
|
3303
|
+
]
|
|
3304
|
+
},
|
|
3305
|
+
"time_to_first_token_ms": {
|
|
3306
|
+
"type": [
|
|
3307
|
+
"integer",
|
|
3308
|
+
"null"
|
|
3309
|
+
],
|
|
3310
|
+
"format": "uint128",
|
|
3311
|
+
"minimum": 0
|
|
3312
|
+
},
|
|
3313
|
+
"timestamp": {
|
|
3314
|
+
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
3315
|
+
"type": "string"
|
|
3316
|
+
},
|
|
3317
|
+
"tool_ms": {
|
|
3318
|
+
"type": [
|
|
3319
|
+
"integer",
|
|
3320
|
+
"null"
|
|
3321
|
+
],
|
|
3322
|
+
"format": "uint128",
|
|
3323
|
+
"minimum": 0
|
|
3324
|
+
},
|
|
3325
|
+
"usage": {
|
|
3326
|
+
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
3327
|
+
"$ref": "#/$defs/Usage"
|
|
3328
|
+
}
|
|
3329
|
+
},
|
|
3330
|
+
"required": [
|
|
3331
|
+
"schema_version",
|
|
3332
|
+
"history_id",
|
|
3333
|
+
"session",
|
|
3334
|
+
"name",
|
|
3335
|
+
"project",
|
|
3336
|
+
"timestamp",
|
|
3337
|
+
"harness",
|
|
3338
|
+
"model",
|
|
3339
|
+
"prompt",
|
|
3340
|
+
"permission_mode",
|
|
3341
|
+
"status",
|
|
3342
|
+
"exit_code",
|
|
3343
|
+
"duration_ms",
|
|
3344
|
+
"text",
|
|
3345
|
+
"text_source",
|
|
3346
|
+
"usage",
|
|
3347
|
+
"session_id",
|
|
3348
|
+
"events",
|
|
3349
|
+
"failure_kind"
|
|
2302
3350
|
]
|
|
2303
|
-
},
|
|
2304
|
-
"timestamp": {
|
|
2305
|
-
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
2306
|
-
"type": "string"
|
|
2307
|
-
},
|
|
2308
|
-
"usage": {
|
|
2309
|
-
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
2310
|
-
"$ref": "#/$defs/Usage"
|
|
2311
3351
|
}
|
|
2312
|
-
},
|
|
2313
|
-
"required": [
|
|
2314
|
-
"schema_version",
|
|
2315
|
-
"history_id",
|
|
2316
|
-
"session",
|
|
2317
|
-
"name",
|
|
2318
|
-
"project",
|
|
2319
|
-
"timestamp",
|
|
2320
|
-
"harness",
|
|
2321
|
-
"model",
|
|
2322
|
-
"prompt",
|
|
2323
|
-
"permission_mode",
|
|
2324
|
-
"status",
|
|
2325
|
-
"exit_code",
|
|
2326
|
-
"duration_ms",
|
|
2327
|
-
"text",
|
|
2328
|
-
"text_source",
|
|
2329
|
-
"usage",
|
|
2330
|
-
"session_id",
|
|
2331
|
-
"events",
|
|
2332
|
-
"failure_kind"
|
|
2333
3352
|
]
|
|
2334
3353
|
},
|
|
2335
3354
|
"PermissionMode": {
|
|
@@ -2402,6 +3421,15 @@
|
|
|
2402
3421
|
}
|
|
2403
3422
|
]
|
|
2404
3423
|
},
|
|
3424
|
+
"ToolCallStatus": {
|
|
3425
|
+
"type": "string",
|
|
3426
|
+
"enum": [
|
|
3427
|
+
"completed",
|
|
3428
|
+
"failed",
|
|
3429
|
+
"timeout",
|
|
3430
|
+
"interrupted"
|
|
3431
|
+
]
|
|
3432
|
+
},
|
|
2405
3433
|
"Usage": {
|
|
2406
3434
|
"description": "Normalized token/cost accounting. Every field is best-effort and independently\nnullable: a harness may report tokens but not dollar cost (cost is commonly\nabsent on subscription auth), or report nothing at all (plain-text harnesses).",
|
|
2407
3435
|
"type": "object",
|
|
@@ -2473,6 +3501,21 @@
|
|
|
2473
3501
|
"description": "One normalized action a harness took, harness-agnostic so a single consumer\nassertion works across harnesses. Every field is always serialized (null when\nabsent) so the shape is stable, mirroring the `usage` contract.",
|
|
2474
3502
|
"type": "object",
|
|
2475
3503
|
"properties": {
|
|
3504
|
+
"duration_ms": {
|
|
3505
|
+
"description": "Monotonic elapsed tool time. `None` means no terminal boundary was seen.",
|
|
3506
|
+
"type": [
|
|
3507
|
+
"integer",
|
|
3508
|
+
"null"
|
|
3509
|
+
],
|
|
3510
|
+
"format": "uint128",
|
|
3511
|
+
"minimum": 0
|
|
3512
|
+
},
|
|
3513
|
+
"finished_at": {
|
|
3514
|
+
"type": [
|
|
3515
|
+
"string",
|
|
3516
|
+
"null"
|
|
3517
|
+
]
|
|
3518
|
+
},
|
|
2476
3519
|
"index": {
|
|
2477
3520
|
"description": "Position of this event within the run, so \"≤ N tool calls\" and \"did X\nbefore Y\" are expressible from a stable ordering (also array order).",
|
|
2478
3521
|
"type": "integer",
|
|
@@ -2499,6 +3542,31 @@
|
|
|
2499
3542
|
"string",
|
|
2500
3543
|
"null"
|
|
2501
3544
|
]
|
|
3545
|
+
},
|
|
3546
|
+
"started_at": {
|
|
3547
|
+
"description": "UTC interval bounds for tool execution, populated on history records.",
|
|
3548
|
+
"type": [
|
|
3549
|
+
"string",
|
|
3550
|
+
"null"
|
|
3551
|
+
]
|
|
3552
|
+
},
|
|
3553
|
+
"status": {
|
|
3554
|
+
"description": "Terminal tool state, populated on history tool-call events.",
|
|
3555
|
+
"anyOf": [
|
|
3556
|
+
{
|
|
3557
|
+
"$ref": "#/$defs/ToolCallStatus"
|
|
3558
|
+
},
|
|
3559
|
+
{
|
|
3560
|
+
"type": "null"
|
|
3561
|
+
}
|
|
3562
|
+
]
|
|
3563
|
+
},
|
|
3564
|
+
"tool_call_id": {
|
|
3565
|
+
"description": "Stable call identity within the session. Present on tool calls and their\nmatching results when the provider exposes an identity; history fills a\ndeterministic run-local identity for providers that do not.",
|
|
3566
|
+
"type": [
|
|
3567
|
+
"string",
|
|
3568
|
+
"null"
|
|
3569
|
+
]
|
|
2502
3570
|
}
|
|
2503
3571
|
},
|
|
2504
3572
|
"required": [
|
|
@@ -2506,7 +3574,12 @@
|
|
|
2506
3574
|
"name",
|
|
2507
3575
|
"input",
|
|
2508
3576
|
"output",
|
|
2509
|
-
"index"
|
|
3577
|
+
"index",
|
|
3578
|
+
"tool_call_id",
|
|
3579
|
+
"started_at",
|
|
3580
|
+
"finished_at",
|
|
3581
|
+
"duration_ms",
|
|
3582
|
+
"status"
|
|
2510
3583
|
]
|
|
2511
3584
|
},
|
|
2512
3585
|
"FailureKind": {
|
|
@@ -2560,142 +3633,548 @@
|
|
|
2560
3633
|
},
|
|
2561
3634
|
"HistoryRecord": {
|
|
2562
3635
|
"description": "One harness run, normalized and frozen for the history log. Serialized as one\nJSONL line per harness run, appended as the run finalizes. Carries only the\nnormalized cross-harness signals — no raw stdout/stderr.",
|
|
2563
|
-
"
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
"
|
|
2567
|
-
"
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
"format": "uint128",
|
|
2571
|
-
"minimum": 0
|
|
2572
|
-
},
|
|
2573
|
-
"events": {
|
|
2574
|
-
"description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
|
|
2575
|
-
"type": [
|
|
2576
|
-
"array",
|
|
2577
|
-
"null"
|
|
2578
|
-
],
|
|
2579
|
-
"items": {
|
|
2580
|
-
"$ref": "#/$defs/ActionEvent"
|
|
2581
|
-
}
|
|
2582
|
-
},
|
|
2583
|
-
"exit_code": {
|
|
2584
|
-
"type": [
|
|
2585
|
-
"integer",
|
|
2586
|
-
"null"
|
|
2587
|
-
],
|
|
2588
|
-
"format": "int32"
|
|
2589
|
-
},
|
|
2590
|
-
"failure_kind": {
|
|
2591
|
-
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
2592
|
-
"anyOf": [
|
|
2593
|
-
{
|
|
2594
|
-
"$ref": "#/$defs/FailureKind"
|
|
3636
|
+
"oneOf": [
|
|
3637
|
+
{
|
|
3638
|
+
"type": "object",
|
|
3639
|
+
"properties": {
|
|
3640
|
+
"duration_ms": {
|
|
3641
|
+
"type": "integer",
|
|
3642
|
+
"minimum": 0
|
|
2595
3643
|
},
|
|
2596
|
-
{
|
|
2597
|
-
"
|
|
3644
|
+
"events": {
|
|
3645
|
+
"description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
|
|
3646
|
+
"type": [
|
|
3647
|
+
"array",
|
|
3648
|
+
"null"
|
|
3649
|
+
],
|
|
3650
|
+
"items": {
|
|
3651
|
+
"oneOf": [
|
|
3652
|
+
{
|
|
3653
|
+
"allOf": [
|
|
3654
|
+
{
|
|
3655
|
+
"$ref": "#/$defs/ActionEvent"
|
|
3656
|
+
},
|
|
3657
|
+
{
|
|
3658
|
+
"type": "object",
|
|
3659
|
+
"properties": {
|
|
3660
|
+
"duration_ms": {
|
|
3661
|
+
"type": "integer",
|
|
3662
|
+
"minimum": 0
|
|
3663
|
+
},
|
|
3664
|
+
"finished_at": {
|
|
3665
|
+
"type": "string"
|
|
3666
|
+
},
|
|
3667
|
+
"kind": {
|
|
3668
|
+
"type": "string",
|
|
3669
|
+
"const": "tool_call"
|
|
3670
|
+
},
|
|
3671
|
+
"started_at": {
|
|
3672
|
+
"type": "string"
|
|
3673
|
+
},
|
|
3674
|
+
"status": {
|
|
3675
|
+
"type": "string",
|
|
3676
|
+
"const": "completed"
|
|
3677
|
+
},
|
|
3678
|
+
"tool_call_id": {
|
|
3679
|
+
"type": "string",
|
|
3680
|
+
"minLength": 1
|
|
3681
|
+
}
|
|
3682
|
+
},
|
|
3683
|
+
"required": [
|
|
3684
|
+
"kind",
|
|
3685
|
+
"tool_call_id",
|
|
3686
|
+
"started_at",
|
|
3687
|
+
"status",
|
|
3688
|
+
"finished_at",
|
|
3689
|
+
"duration_ms"
|
|
3690
|
+
]
|
|
3691
|
+
}
|
|
3692
|
+
]
|
|
3693
|
+
},
|
|
3694
|
+
{
|
|
3695
|
+
"allOf": [
|
|
3696
|
+
{
|
|
3697
|
+
"$ref": "#/$defs/ActionEvent"
|
|
3698
|
+
},
|
|
3699
|
+
{
|
|
3700
|
+
"type": "object",
|
|
3701
|
+
"properties": {
|
|
3702
|
+
"duration_ms": {
|
|
3703
|
+
"type": "integer",
|
|
3704
|
+
"minimum": 0
|
|
3705
|
+
},
|
|
3706
|
+
"finished_at": {
|
|
3707
|
+
"type": "string"
|
|
3708
|
+
},
|
|
3709
|
+
"kind": {
|
|
3710
|
+
"type": "string",
|
|
3711
|
+
"const": "tool_call"
|
|
3712
|
+
},
|
|
3713
|
+
"started_at": {
|
|
3714
|
+
"type": "string"
|
|
3715
|
+
},
|
|
3716
|
+
"status": {
|
|
3717
|
+
"type": "string",
|
|
3718
|
+
"const": "failed"
|
|
3719
|
+
},
|
|
3720
|
+
"tool_call_id": {
|
|
3721
|
+
"type": "string",
|
|
3722
|
+
"minLength": 1
|
|
3723
|
+
}
|
|
3724
|
+
},
|
|
3725
|
+
"required": [
|
|
3726
|
+
"kind",
|
|
3727
|
+
"tool_call_id",
|
|
3728
|
+
"started_at",
|
|
3729
|
+
"status",
|
|
3730
|
+
"finished_at",
|
|
3731
|
+
"duration_ms"
|
|
3732
|
+
]
|
|
3733
|
+
}
|
|
3734
|
+
]
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
"allOf": [
|
|
3738
|
+
{
|
|
3739
|
+
"$ref": "#/$defs/ActionEvent"
|
|
3740
|
+
},
|
|
3741
|
+
{
|
|
3742
|
+
"type": "object",
|
|
3743
|
+
"properties": {
|
|
3744
|
+
"kind": {
|
|
3745
|
+
"type": "string",
|
|
3746
|
+
"const": "tool_call"
|
|
3747
|
+
},
|
|
3748
|
+
"started_at": {
|
|
3749
|
+
"type": "string"
|
|
3750
|
+
},
|
|
3751
|
+
"status": {
|
|
3752
|
+
"type": "string",
|
|
3753
|
+
"const": "timeout"
|
|
3754
|
+
},
|
|
3755
|
+
"tool_call_id": {
|
|
3756
|
+
"type": "string",
|
|
3757
|
+
"minLength": 1
|
|
3758
|
+
}
|
|
3759
|
+
},
|
|
3760
|
+
"required": [
|
|
3761
|
+
"kind",
|
|
3762
|
+
"tool_call_id",
|
|
3763
|
+
"started_at",
|
|
3764
|
+
"status"
|
|
3765
|
+
]
|
|
3766
|
+
}
|
|
3767
|
+
]
|
|
3768
|
+
},
|
|
3769
|
+
{
|
|
3770
|
+
"allOf": [
|
|
3771
|
+
{
|
|
3772
|
+
"$ref": "#/$defs/ActionEvent"
|
|
3773
|
+
},
|
|
3774
|
+
{
|
|
3775
|
+
"type": "object",
|
|
3776
|
+
"properties": {
|
|
3777
|
+
"kind": {
|
|
3778
|
+
"type": "string",
|
|
3779
|
+
"const": "tool_call"
|
|
3780
|
+
},
|
|
3781
|
+
"started_at": {
|
|
3782
|
+
"type": "string"
|
|
3783
|
+
},
|
|
3784
|
+
"status": {
|
|
3785
|
+
"type": "string",
|
|
3786
|
+
"const": "interrupted"
|
|
3787
|
+
},
|
|
3788
|
+
"tool_call_id": {
|
|
3789
|
+
"type": "string",
|
|
3790
|
+
"minLength": 1
|
|
3791
|
+
}
|
|
3792
|
+
},
|
|
3793
|
+
"required": [
|
|
3794
|
+
"kind",
|
|
3795
|
+
"tool_call_id",
|
|
3796
|
+
"started_at",
|
|
3797
|
+
"status"
|
|
3798
|
+
]
|
|
3799
|
+
}
|
|
3800
|
+
]
|
|
3801
|
+
},
|
|
3802
|
+
{
|
|
3803
|
+
"allOf": [
|
|
3804
|
+
{
|
|
3805
|
+
"$ref": "#/$defs/ActionEvent"
|
|
3806
|
+
},
|
|
3807
|
+
{
|
|
3808
|
+
"type": "object",
|
|
3809
|
+
"properties": {
|
|
3810
|
+
"kind": {
|
|
3811
|
+
"type": "string",
|
|
3812
|
+
"const": "tool_result"
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
]
|
|
3817
|
+
}
|
|
3818
|
+
]
|
|
3819
|
+
}
|
|
3820
|
+
},
|
|
3821
|
+
"exit_code": {
|
|
3822
|
+
"type": [
|
|
3823
|
+
"integer",
|
|
3824
|
+
"null"
|
|
3825
|
+
],
|
|
3826
|
+
"format": "int32"
|
|
3827
|
+
},
|
|
3828
|
+
"failure_kind": {
|
|
3829
|
+
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
3830
|
+
"anyOf": [
|
|
3831
|
+
{
|
|
3832
|
+
"$ref": "#/$defs/FailureKind"
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
"type": "null"
|
|
3836
|
+
}
|
|
3837
|
+
]
|
|
3838
|
+
},
|
|
3839
|
+
"finished_at": {
|
|
3840
|
+
"type": [
|
|
3841
|
+
"string",
|
|
3842
|
+
"null"
|
|
3843
|
+
]
|
|
3844
|
+
},
|
|
3845
|
+
"harness": {
|
|
3846
|
+
"description": "Canonical harness id (e.g. `claude-code`).",
|
|
3847
|
+
"type": "string"
|
|
3848
|
+
},
|
|
3849
|
+
"history_id": {
|
|
3850
|
+
"description": "Globally unique, time-ordered record id. This is also the cursor accepted\nby `history watch --after` and the exact id accepted by history lookup.",
|
|
3851
|
+
"type": "string",
|
|
3852
|
+
"maxLength": 36,
|
|
3853
|
+
"minLength": 36,
|
|
3854
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
3855
|
+
},
|
|
3856
|
+
"labels": {
|
|
3857
|
+
"description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
|
|
3858
|
+
"$ref": "#/$defs/HistoryLabels"
|
|
3859
|
+
},
|
|
3860
|
+
"model": {
|
|
3861
|
+
"description": "The effective top-level model for the run, if any.",
|
|
3862
|
+
"type": [
|
|
3863
|
+
"string",
|
|
3864
|
+
"null"
|
|
3865
|
+
]
|
|
3866
|
+
},
|
|
3867
|
+
"model_ms": {
|
|
3868
|
+
"type": "integer",
|
|
3869
|
+
"minimum": 0
|
|
3870
|
+
},
|
|
3871
|
+
"name": {
|
|
3872
|
+
"description": "The human-meaningful session name (see [`session_name`]); repeated on\nevery record so a reader can resolve a session by name from any line.",
|
|
3873
|
+
"type": "string"
|
|
3874
|
+
},
|
|
3875
|
+
"permission_mode": {
|
|
3876
|
+
"description": "The normalized approval mode requested for the run.",
|
|
3877
|
+
"$ref": "#/$defs/PermissionMode"
|
|
3878
|
+
},
|
|
3879
|
+
"project": {
|
|
3880
|
+
"description": "The project directory the run operated in (the real path, not the\non-disk slug), so the list view can show where a session ran.",
|
|
3881
|
+
"type": "string"
|
|
3882
|
+
},
|
|
3883
|
+
"prompt": {
|
|
3884
|
+
"description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
|
|
3885
|
+
"type": "string"
|
|
3886
|
+
},
|
|
3887
|
+
"schema_version": {
|
|
3888
|
+
"type": "string",
|
|
3889
|
+
"const": "0.3"
|
|
3890
|
+
},
|
|
3891
|
+
"session": {
|
|
3892
|
+
"description": "The oneharness session id this run belongs to (the history file's stem).",
|
|
3893
|
+
"type": "string"
|
|
3894
|
+
},
|
|
3895
|
+
"session_id": {
|
|
3896
|
+
"description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
|
|
3897
|
+
"type": [
|
|
3898
|
+
"string",
|
|
3899
|
+
"null"
|
|
3900
|
+
]
|
|
3901
|
+
},
|
|
3902
|
+
"started_at": {
|
|
3903
|
+
"type": "string",
|
|
3904
|
+
"minLength": 1
|
|
3905
|
+
},
|
|
3906
|
+
"status": {
|
|
3907
|
+
"$ref": "#/$defs/Status"
|
|
3908
|
+
},
|
|
3909
|
+
"text": {
|
|
3910
|
+
"description": "Best-effort final assistant text; `null` when extraction was impossible.",
|
|
3911
|
+
"type": [
|
|
3912
|
+
"string",
|
|
3913
|
+
"null"
|
|
3914
|
+
]
|
|
3915
|
+
},
|
|
3916
|
+
"text_source": {
|
|
3917
|
+
"description": "How `text` was extracted; `null` when absent.",
|
|
3918
|
+
"type": [
|
|
3919
|
+
"string",
|
|
3920
|
+
"null"
|
|
3921
|
+
]
|
|
3922
|
+
},
|
|
3923
|
+
"time_to_first_token_ms": {
|
|
3924
|
+
"type": [
|
|
3925
|
+
"integer",
|
|
3926
|
+
"null"
|
|
3927
|
+
],
|
|
3928
|
+
"format": "uint128",
|
|
3929
|
+
"minimum": 0
|
|
3930
|
+
},
|
|
3931
|
+
"timestamp": {
|
|
3932
|
+
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
3933
|
+
"type": "string"
|
|
3934
|
+
},
|
|
3935
|
+
"tool_ms": {
|
|
3936
|
+
"type": "integer",
|
|
3937
|
+
"minimum": 0
|
|
3938
|
+
},
|
|
3939
|
+
"usage": {
|
|
3940
|
+
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
3941
|
+
"$ref": "#/$defs/Usage"
|
|
2598
3942
|
}
|
|
3943
|
+
},
|
|
3944
|
+
"required": [
|
|
3945
|
+
"schema_version",
|
|
3946
|
+
"history_id",
|
|
3947
|
+
"session",
|
|
3948
|
+
"name",
|
|
3949
|
+
"project",
|
|
3950
|
+
"timestamp",
|
|
3951
|
+
"harness",
|
|
3952
|
+
"model",
|
|
3953
|
+
"prompt",
|
|
3954
|
+
"permission_mode",
|
|
3955
|
+
"status",
|
|
3956
|
+
"exit_code",
|
|
3957
|
+
"duration_ms",
|
|
3958
|
+
"finished_at",
|
|
3959
|
+
"text",
|
|
3960
|
+
"text_source",
|
|
3961
|
+
"usage",
|
|
3962
|
+
"session_id",
|
|
3963
|
+
"events",
|
|
3964
|
+
"failure_kind",
|
|
3965
|
+
"started_at",
|
|
3966
|
+
"model_ms",
|
|
3967
|
+
"tool_ms"
|
|
2599
3968
|
]
|
|
2600
3969
|
},
|
|
2601
|
-
|
|
2602
|
-
"
|
|
2603
|
-
"
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
"
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
3970
|
+
{
|
|
3971
|
+
"type": "object",
|
|
3972
|
+
"properties": {
|
|
3973
|
+
"duration_ms": {
|
|
3974
|
+
"type": [
|
|
3975
|
+
"integer",
|
|
3976
|
+
"null"
|
|
3977
|
+
],
|
|
3978
|
+
"format": "uint128",
|
|
3979
|
+
"minimum": 0
|
|
3980
|
+
},
|
|
3981
|
+
"events": {
|
|
3982
|
+
"type": [
|
|
3983
|
+
"array",
|
|
3984
|
+
"null"
|
|
3985
|
+
],
|
|
3986
|
+
"items": {
|
|
3987
|
+
"type": "object",
|
|
3988
|
+
"properties": {
|
|
3989
|
+
"index": {
|
|
3990
|
+
"type": "integer",
|
|
3991
|
+
"minimum": 0
|
|
3992
|
+
},
|
|
3993
|
+
"input": true,
|
|
3994
|
+
"kind": {
|
|
3995
|
+
"type": "string"
|
|
3996
|
+
},
|
|
3997
|
+
"name": {
|
|
3998
|
+
"type": [
|
|
3999
|
+
"string",
|
|
4000
|
+
"null"
|
|
4001
|
+
]
|
|
4002
|
+
},
|
|
4003
|
+
"output": {
|
|
4004
|
+
"type": [
|
|
4005
|
+
"string",
|
|
4006
|
+
"null"
|
|
4007
|
+
]
|
|
4008
|
+
}
|
|
4009
|
+
},
|
|
4010
|
+
"required": [
|
|
4011
|
+
"kind",
|
|
4012
|
+
"name",
|
|
4013
|
+
"input",
|
|
4014
|
+
"output",
|
|
4015
|
+
"index"
|
|
4016
|
+
]
|
|
4017
|
+
}
|
|
4018
|
+
},
|
|
4019
|
+
"exit_code": {
|
|
4020
|
+
"type": [
|
|
4021
|
+
"integer",
|
|
4022
|
+
"null"
|
|
4023
|
+
],
|
|
4024
|
+
"format": "int32"
|
|
4025
|
+
},
|
|
4026
|
+
"failure_kind": {
|
|
4027
|
+
"description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
|
|
4028
|
+
"anyOf": [
|
|
4029
|
+
{
|
|
4030
|
+
"$ref": "#/$defs/FailureKind"
|
|
4031
|
+
},
|
|
4032
|
+
{
|
|
4033
|
+
"type": "null"
|
|
4034
|
+
}
|
|
4035
|
+
]
|
|
4036
|
+
},
|
|
4037
|
+
"finished_at": {
|
|
4038
|
+
"type": [
|
|
4039
|
+
"string",
|
|
4040
|
+
"null"
|
|
4041
|
+
]
|
|
4042
|
+
},
|
|
4043
|
+
"harness": {
|
|
4044
|
+
"description": "Canonical harness id (e.g. `claude-code`).",
|
|
4045
|
+
"type": "string"
|
|
4046
|
+
},
|
|
4047
|
+
"history_id": {
|
|
4048
|
+
"description": "Globally unique, time-ordered record id. This is also the cursor accepted\nby `history watch --after` and the exact id accepted by history lookup.",
|
|
4049
|
+
"type": "string",
|
|
4050
|
+
"maxLength": 36,
|
|
4051
|
+
"minLength": 36,
|
|
4052
|
+
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
|
|
4053
|
+
},
|
|
4054
|
+
"labels": {
|
|
4055
|
+
"description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
|
|
4056
|
+
"$ref": "#/$defs/HistoryLabels"
|
|
4057
|
+
},
|
|
4058
|
+
"model": {
|
|
4059
|
+
"description": "The effective top-level model for the run, if any.",
|
|
4060
|
+
"type": [
|
|
4061
|
+
"string",
|
|
4062
|
+
"null"
|
|
4063
|
+
]
|
|
4064
|
+
},
|
|
4065
|
+
"model_ms": {
|
|
4066
|
+
"type": [
|
|
4067
|
+
"integer",
|
|
4068
|
+
"null"
|
|
4069
|
+
],
|
|
4070
|
+
"format": "uint128",
|
|
4071
|
+
"minimum": 0
|
|
4072
|
+
},
|
|
4073
|
+
"name": {
|
|
4074
|
+
"description": "The human-meaningful session name (see [`session_name`]); repeated on\nevery record so a reader can resolve a session by name from any line.",
|
|
4075
|
+
"type": "string"
|
|
4076
|
+
},
|
|
4077
|
+
"permission_mode": {
|
|
4078
|
+
"description": "The normalized approval mode requested for the run.",
|
|
4079
|
+
"$ref": "#/$defs/PermissionMode"
|
|
4080
|
+
},
|
|
4081
|
+
"project": {
|
|
4082
|
+
"description": "The project directory the run operated in (the real path, not the\non-disk slug), so the list view can show where a session ran.",
|
|
4083
|
+
"type": "string"
|
|
4084
|
+
},
|
|
4085
|
+
"prompt": {
|
|
4086
|
+
"description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
|
|
4087
|
+
"type": "string"
|
|
4088
|
+
},
|
|
4089
|
+
"schema_version": {
|
|
4090
|
+
"type": "string",
|
|
4091
|
+
"enum": [
|
|
4092
|
+
"0.1",
|
|
4093
|
+
"0.2"
|
|
4094
|
+
]
|
|
4095
|
+
},
|
|
4096
|
+
"session": {
|
|
4097
|
+
"description": "The oneharness session id this run belongs to (the history file's stem).",
|
|
4098
|
+
"type": "string"
|
|
4099
|
+
},
|
|
4100
|
+
"session_id": {
|
|
4101
|
+
"description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
|
|
4102
|
+
"type": [
|
|
4103
|
+
"string",
|
|
4104
|
+
"null"
|
|
4105
|
+
]
|
|
4106
|
+
},
|
|
4107
|
+
"started_at": {
|
|
4108
|
+
"description": "UTC invocation bounds and monotonic time attribution. The provider/tool\nsplit is conservative when a transcript has tool calls but lacks native\nboundaries: the observed invocation interval is attributed to the union\nof those calls, never double-counted.",
|
|
4109
|
+
"type": [
|
|
4110
|
+
"string",
|
|
4111
|
+
"null"
|
|
4112
|
+
]
|
|
4113
|
+
},
|
|
4114
|
+
"status": {
|
|
4115
|
+
"$ref": "#/$defs/Status"
|
|
4116
|
+
},
|
|
4117
|
+
"text": {
|
|
4118
|
+
"description": "Best-effort final assistant text; `null` when extraction was impossible.",
|
|
4119
|
+
"type": [
|
|
4120
|
+
"string",
|
|
4121
|
+
"null"
|
|
4122
|
+
]
|
|
4123
|
+
},
|
|
4124
|
+
"text_source": {
|
|
4125
|
+
"description": "How `text` was extracted; `null` when absent.",
|
|
4126
|
+
"type": [
|
|
4127
|
+
"string",
|
|
4128
|
+
"null"
|
|
4129
|
+
]
|
|
4130
|
+
},
|
|
4131
|
+
"time_to_first_token_ms": {
|
|
4132
|
+
"type": [
|
|
4133
|
+
"integer",
|
|
4134
|
+
"null"
|
|
4135
|
+
],
|
|
4136
|
+
"format": "uint128",
|
|
4137
|
+
"minimum": 0
|
|
4138
|
+
},
|
|
4139
|
+
"timestamp": {
|
|
4140
|
+
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
4141
|
+
"type": "string"
|
|
4142
|
+
},
|
|
4143
|
+
"tool_ms": {
|
|
4144
|
+
"type": [
|
|
4145
|
+
"integer",
|
|
4146
|
+
"null"
|
|
4147
|
+
],
|
|
4148
|
+
"format": "uint128",
|
|
4149
|
+
"minimum": 0
|
|
4150
|
+
},
|
|
4151
|
+
"usage": {
|
|
4152
|
+
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
4153
|
+
"$ref": "#/$defs/Usage"
|
|
4154
|
+
}
|
|
4155
|
+
},
|
|
4156
|
+
"required": [
|
|
4157
|
+
"schema_version",
|
|
4158
|
+
"history_id",
|
|
4159
|
+
"session",
|
|
4160
|
+
"name",
|
|
4161
|
+
"project",
|
|
4162
|
+
"timestamp",
|
|
4163
|
+
"harness",
|
|
4164
|
+
"model",
|
|
4165
|
+
"prompt",
|
|
4166
|
+
"permission_mode",
|
|
4167
|
+
"status",
|
|
4168
|
+
"exit_code",
|
|
4169
|
+
"duration_ms",
|
|
4170
|
+
"text",
|
|
4171
|
+
"text_source",
|
|
4172
|
+
"usage",
|
|
4173
|
+
"session_id",
|
|
4174
|
+
"events",
|
|
4175
|
+
"failure_kind"
|
|
2668
4176
|
]
|
|
2669
|
-
},
|
|
2670
|
-
"timestamp": {
|
|
2671
|
-
"description": "RFC3339 UTC instant the record was written (append time).",
|
|
2672
|
-
"type": "string"
|
|
2673
|
-
},
|
|
2674
|
-
"usage": {
|
|
2675
|
-
"description": "Best-effort token/cost accounting (every field `null` when unreported).",
|
|
2676
|
-
"$ref": "#/$defs/Usage"
|
|
2677
4177
|
}
|
|
2678
|
-
},
|
|
2679
|
-
"required": [
|
|
2680
|
-
"schema_version",
|
|
2681
|
-
"history_id",
|
|
2682
|
-
"session",
|
|
2683
|
-
"name",
|
|
2684
|
-
"project",
|
|
2685
|
-
"timestamp",
|
|
2686
|
-
"harness",
|
|
2687
|
-
"model",
|
|
2688
|
-
"prompt",
|
|
2689
|
-
"permission_mode",
|
|
2690
|
-
"status",
|
|
2691
|
-
"exit_code",
|
|
2692
|
-
"duration_ms",
|
|
2693
|
-
"text",
|
|
2694
|
-
"text_source",
|
|
2695
|
-
"usage",
|
|
2696
|
-
"session_id",
|
|
2697
|
-
"events",
|
|
2698
|
-
"failure_kind"
|
|
2699
4178
|
]
|
|
2700
4179
|
},
|
|
2701
4180
|
"PermissionMode": {
|
|
@@ -2768,6 +4247,15 @@
|
|
|
2768
4247
|
}
|
|
2769
4248
|
]
|
|
2770
4249
|
},
|
|
4250
|
+
"ToolCallStatus": {
|
|
4251
|
+
"type": "string",
|
|
4252
|
+
"enum": [
|
|
4253
|
+
"completed",
|
|
4254
|
+
"failed",
|
|
4255
|
+
"timeout",
|
|
4256
|
+
"interrupted"
|
|
4257
|
+
]
|
|
4258
|
+
},
|
|
2771
4259
|
"Usage": {
|
|
2772
4260
|
"description": "Normalized token/cost accounting. Every field is best-effort and independently\nnullable: a harness may report tokens but not dollar cost (cost is commonly\nabsent on subscription auth), or report nothing at all (plain-text harnesses).",
|
|
2773
4261
|
"type": "object",
|