@oneharness/sdk 0.6.6 → 0.6.8

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.
@@ -488,7 +488,7 @@
488
488
  ]
489
489
  },
490
490
  "failure_kind_source": {
491
- "description": "Where `failure_kind` was read (`stderr`/`stdout`); `null` when absent.",
491
+ "description": "Where `failure_kind` was read (`stderr`/`stdout`, or `config:env_from`\nfor a candidate refused before spawning); `null` when absent.",
492
492
  "type": [
493
493
  "string",
494
494
  "null"
@@ -700,7 +700,7 @@
700
700
  "const": "spawn-error"
701
701
  },
702
702
  {
703
- "description": "The binary was not found, so the harness was not run.",
703
+ "description": "The harness was not run. Either the binary was not found (`available:\nfalse`), or it was found but the identity the selection points at is not\nprovisioned — an `env_from` home directory that is not on disk, reported\nas `available: true` with `failure_kind: \"auth\"`.",
704
704
  "type": "string",
705
705
  "const": "skipped"
706
706
  },
@@ -1322,7 +1322,7 @@
1322
1322
  ]
1323
1323
  },
1324
1324
  "failure_kind_source": {
1325
- "description": "Where `failure_kind` was read (`stderr`/`stdout`); `null` when absent.",
1325
+ "description": "Where `failure_kind` was read (`stderr`/`stdout`, or `config:env_from`\nfor a candidate refused before spawning); `null` when absent.",
1326
1326
  "type": [
1327
1327
  "string",
1328
1328
  "null"
@@ -1534,7 +1534,7 @@
1534
1534
  "const": "spawn-error"
1535
1535
  },
1536
1536
  {
1537
- "description": "The binary was not found, so the harness was not run.",
1537
+ "description": "The harness was not run. Either the binary was not found (`available:\nfalse`), or it was found but the identity the selection points at is not\nprovisioned — an `env_from` home directory that is not on disk, reported\nas `available: true` with `failure_kind: \"auth\"`.",
1538
1538
  "type": "string",
1539
1539
  "const": "skipped"
1540
1540
  },
@@ -1943,7 +1943,10 @@
1943
1943
  },
1944
1944
  "schema_version": {
1945
1945
  "type": "string",
1946
- "const": "1.2"
1946
+ "enum": [
1947
+ "1.2",
1948
+ "1.3"
1949
+ ]
1947
1950
  },
1948
1951
  "type": {
1949
1952
  "type": "string",
@@ -2035,6 +2038,68 @@
2035
2038
  {
2036
2039
  "allOf": [
2037
2040
  {
2041
+ "allOf": [
2042
+ {
2043
+ "oneOf": [
2044
+ {
2045
+ "type": "object",
2046
+ "properties": {
2047
+ "error": {
2048
+ "type": "null"
2049
+ }
2050
+ }
2051
+ },
2052
+ {
2053
+ "allOf": [
2054
+ {
2055
+ "type": "object",
2056
+ "properties": {
2057
+ "error": {
2058
+ "type": "string"
2059
+ },
2060
+ "schema_version": {
2061
+ "type": "string",
2062
+ "const": "1.3"
2063
+ }
2064
+ },
2065
+ "required": [
2066
+ "error"
2067
+ ]
2068
+ },
2069
+ {
2070
+ "anyOf": [
2071
+ {
2072
+ "type": "object",
2073
+ "properties": {
2074
+ "status": {
2075
+ "type": "string",
2076
+ "enum": [
2077
+ "nonzero",
2078
+ "timeout",
2079
+ "spawn-error",
2080
+ "skipped"
2081
+ ]
2082
+ }
2083
+ }
2084
+ },
2085
+ {
2086
+ "type": "object",
2087
+ "properties": {
2088
+ "failure_kind": {
2089
+ "const": "tool_deferred"
2090
+ }
2091
+ },
2092
+ "required": [
2093
+ "failure_kind"
2094
+ ]
2095
+ }
2096
+ ]
2097
+ }
2098
+ ]
2099
+ }
2100
+ ]
2101
+ }
2102
+ ],
2038
2103
  "oneOf": [
2039
2104
  {
2040
2105
  "allOf": [
@@ -2046,6 +2111,15 @@
2046
2111
  "type": "integer",
2047
2112
  "minimum": 0
2048
2113
  },
2114
+ "error": {
2115
+ "description": "Normalized failure text for a run that did not succeed (see\n[`HistoryRecord::error`]). Omitted on the wire when absent.",
2116
+ "type": [
2117
+ "string",
2118
+ "null"
2119
+ ],
2120
+ "maxLength": 2048,
2121
+ "minLength": 1
2122
+ },
2049
2123
  "exit_code": {
2050
2124
  "type": [
2051
2125
  "integer",
@@ -2112,7 +2186,8 @@
2112
2186
  "enum": [
2113
2187
  "1.0",
2114
2188
  "1.1",
2115
- "1.2"
2189
+ "1.2",
2190
+ "1.3"
2116
2191
  ]
2117
2192
  },
2118
2193
  "session": {
@@ -2214,6 +2289,15 @@
2214
2289
  "type": "integer",
2215
2290
  "minimum": 0
2216
2291
  },
2292
+ "error": {
2293
+ "description": "Normalized failure text for a run that did not succeed (see\n[`HistoryRecord::error`]). Omitted on the wire when absent.",
2294
+ "type": [
2295
+ "string",
2296
+ "null"
2297
+ ],
2298
+ "maxLength": 2048,
2299
+ "minLength": 1
2300
+ },
2217
2301
  "exit_code": {
2218
2302
  "type": [
2219
2303
  "integer",
@@ -2283,7 +2367,8 @@
2283
2367
  "enum": [
2284
2368
  "1.0",
2285
2369
  "1.1",
2286
- "1.2"
2370
+ "1.2",
2371
+ "1.3"
2287
2372
  ]
2288
2373
  },
2289
2374
  "session": {
@@ -2387,6 +2472,15 @@
2387
2472
  "type": "integer",
2388
2473
  "minimum": 0
2389
2474
  },
2475
+ "error": {
2476
+ "description": "Normalized failure text for a run that did not succeed (see\n[`HistoryRecord::error`]). Omitted on the wire when absent.",
2477
+ "type": [
2478
+ "string",
2479
+ "null"
2480
+ ],
2481
+ "maxLength": 2048,
2482
+ "minLength": 1
2483
+ },
2390
2484
  "exit_code": {
2391
2485
  "type": [
2392
2486
  "integer",
@@ -2450,7 +2544,10 @@
2450
2544
  },
2451
2545
  "schema_version": {
2452
2546
  "type": "string",
2453
- "const": "1.2"
2547
+ "enum": [
2548
+ "1.2",
2549
+ "1.3"
2550
+ ]
2454
2551
  },
2455
2552
  "session": {
2456
2553
  "type": "string"
@@ -2536,6 +2633,15 @@
2536
2633
  "format": "uint128",
2537
2634
  "minimum": 0
2538
2635
  },
2636
+ "error": {
2637
+ "description": "Normalized failure text for a run that did not succeed (see\n[`HistoryRecord::error`]). Omitted on the wire when absent.",
2638
+ "type": [
2639
+ "string",
2640
+ "null"
2641
+ ],
2642
+ "maxLength": 2048,
2643
+ "minLength": 1
2644
+ },
2539
2645
  "exit_code": {
2540
2646
  "type": [
2541
2647
  "integer",
@@ -2599,7 +2705,8 @@
2599
2705
  "enum": [
2600
2706
  "1.0",
2601
2707
  "1.1",
2602
- "1.2"
2708
+ "1.2",
2709
+ "1.3"
2603
2710
  ]
2604
2711
  },
2605
2712
  "session": {
@@ -2613,7 +2720,13 @@
2613
2720
  },
2614
2721
  "started_at": false,
2615
2722
  "status": {
2616
- "$ref": "#/$defs/Status"
2723
+ "type": "string",
2724
+ "enum": [
2725
+ "nonzero",
2726
+ "timeout",
2727
+ "spawn-error",
2728
+ "skipped"
2729
+ ]
2617
2730
  },
2618
2731
  "text": {
2619
2732
  "type": [
@@ -2670,190 +2783,521 @@
2670
2783
  ]
2671
2784
  }
2672
2785
  ]
2673
- }
2674
- ]
2675
- }
2676
- ]
2677
- }
2678
- ],
2679
- "$defs": {
2680
- "ActionEvent": {
2681
- "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.",
2682
- "type": "object",
2683
- "properties": {
2684
- "duration_ms": {
2685
- "description": "Monotonic elapsed tool time. `None` means no terminal boundary was seen.",
2686
- "type": [
2687
- "integer",
2688
- "null"
2689
- ],
2690
- "format": "uint128",
2691
- "minimum": 0
2692
- },
2693
- "finished_at": {
2694
- "type": [
2695
- "string",
2696
- "null"
2697
- ]
2698
- },
2699
- "index": {
2700
- "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).",
2701
- "type": "integer",
2702
- "format": "uint",
2703
- "minimum": 0
2704
- },
2705
- "input": {
2706
- "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`)."
2707
- },
2708
- "kind": {
2709
- "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.",
2710
- "type": "string"
2711
- },
2712
- "name": {
2713
- "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.",
2714
- "type": [
2715
- "string",
2716
- "null"
2717
- ]
2718
- },
2719
- "output": {
2720
- "description": "The result/observation text, when the trace exposes it; `null` otherwise.",
2721
- "type": [
2722
- "string",
2723
- "null"
2724
- ]
2725
- },
2726
- "started_at": {
2727
- "description": "UTC interval bounds for tool execution, populated on history records.",
2728
- "type": [
2729
- "string",
2730
- "null"
2731
- ]
2732
- },
2733
- "status": {
2734
- "description": "Terminal tool state, populated on history tool-call events.",
2735
- "anyOf": [
2736
- {
2737
- "$ref": "#/$defs/ToolCallStatus"
2738
- },
2739
- {
2740
- "type": "null"
2741
- }
2742
- ]
2743
- },
2744
- "timing_source": {
2745
- "description": "Provenance for the tool interval. Omitted when timing is unavailable.",
2746
- "anyOf": [
2747
- {
2748
- "$ref": "#/$defs/TimingSource"
2749
2786
  },
2750
2787
  {
2751
- "type": "null"
2752
- }
2753
- ]
2754
- },
2755
- "tool_call_id": {
2756
- "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.",
2757
- "type": [
2758
- "string",
2759
- "null"
2760
- ]
2761
- }
2762
- },
2763
- "required": [
2764
- "kind",
2765
- "name",
2766
- "input",
2767
- "output",
2768
- "index",
2769
- "tool_call_id",
2770
- "started_at",
2771
- "finished_at",
2772
- "duration_ms",
2773
- "status"
2774
- ]
2775
- },
2776
- "FailureKind": {
2777
- "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.",
2778
- "oneOf": [
2779
- {
2780
- "description": "Authentication / authorization rejected the request (401/403, missing or\ninvalid credentials).",
2781
- "type": "string",
2782
- "const": "auth"
2783
- },
2784
- {
2785
- "description": "Rate limited (429, too many requests) — a transient condition of an\notherwise working, authenticated harness. A `429` that shows no sign of\nhaving done work is `quota` instead, whatever wording it carries.",
2786
- "type": "string",
2787
- "const": "rate_limit"
2788
- },
2789
- {
2790
- "description": "The requested model was not found / is invalid — a configuration mistake.",
2791
- "type": "string",
2792
- "const": "model_not_found"
2793
- },
2794
- {
2795
- "description": "Out of quota / credits, or a billing problem — a provisioning failure.",
2796
- "type": "string",
2797
- "const": "quota"
2798
- },
2799
- {
2800
- "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.",
2801
- "type": "string",
2802
- "const": "tool_deferred"
2803
- }
2804
- ]
2805
- },
2806
- "HistoryLabels": {
2807
- "type": "object",
2808
- "additionalProperties": {
2809
- "type": "string",
2810
- "maxLength": 256,
2811
- "minLength": 1,
2812
- "not": {
2813
- "pattern": "[\\u0000-\\u001f\\u007f-\\u009f]"
2814
- }
2815
- },
2816
- "propertyNames": {
2817
- "type": "string",
2818
- "maxLength": 64,
2819
- "not": {
2820
- "pattern": "[^A-Za-z0-9._-]"
2821
- },
2822
- "pattern": "^[A-Za-z0-9]"
2823
- }
2824
- },
2825
- "PermissionMode": {
2826
- "description": "The unified approval mode, from least to most autonomy. A harness may not\nsupport every value (see [`crate::domain::harness::HarnessSpec::mode`]); the\ncommand layer refuses an unsupported one before spawning, never silently\ndowngrading it.",
2827
- "oneOf": [
2828
- {
2829
- "description": "No mutations — the agent may read but not edit files or run commands —\n*without* the plan workflow: it just does whatever read-only work the task\nallows. Mapped to each harness's strongest per-run no-mutation enforcement\n(Codex's read-only sandbox, Claude's deny rules, Copilot's `--deny-tool`,\nCursor's `ask` mode). The enforced counterpart to [`Self::Plan`].",
2830
- "type": "string",
2831
- "const": "read-only"
2832
- },
2833
- {
2834
- "description": "Read and propose only — like [`Self::ReadOnly`], but additionally engages\nthe harness's *plan* workflow: research the task and write a plan rather\nthan act. Supported only where a native plan mode exists (Claude/Qwen/\nCursor/Copilot, OpenCode's `plan` agent); harnesses with no plan workflow\n(Codex, Goose, Crush) reject it — use [`Self::ReadOnly`] for those.",
2835
- "type": "string",
2836
- "const": "plan"
2837
- },
2838
- {
2839
- "description": "The harness's normal ask flow, mapped to its cleanest *non-interactive*\nvariant so a headless run never blocks waiting for input (Claude's\n`dontAsk` deny-and-continue, Goose's fail-closed `approve`, Copilot's\nauto-deny). Where no such variant exists the harness's [`ModeHeadless`]\nis [`ModeHeadless::Hangs`].",
2840
- "type": "string",
2841
- "const": "default"
2842
- },
2843
- {
2844
- "description": "Auto-approve file edits, still gate shell/commands. (Claude's\n`acceptEdits`, Qwen's `auto-edit`.)",
2845
- "type": "string",
2846
- "const": "edit"
2847
- },
2848
- {
2849
- "description": "Auto-approve operations the harness deems safe (a classifier), gate the\nrisky ones. (Claude's `auto`, Qwen's `auto`, Goose's `smart_approve`.)",
2850
- "type": "string",
2851
- "const": "auto"
2852
- },
2853
- {
2854
- "description": "Approve everything — no prompts, no gating. The headless default, because\nan unattended agent otherwise hangs on the first approval. Every harness\nsupports it. (Claude's `bypassPermissions`, Codex's\n`--dangerously-bypass-approvals-and-sandbox`, Qwen/Crush `--yolo`, …)",
2855
- "type": "string",
2856
- "const": "bypass"
2788
+ "allOf": [
2789
+ {
2790
+ "description": "The terminal summary for one harness run.",
2791
+ "type": "object",
2792
+ "properties": {
2793
+ "duration_ms": {
2794
+ "type": "integer",
2795
+ "minimum": 0
2796
+ },
2797
+ "error": {
2798
+ "description": "Normalized failure text for a run that did not succeed (see\n[`HistoryRecord::error`]). Omitted on the wire when absent.",
2799
+ "type": [
2800
+ "string",
2801
+ "null"
2802
+ ],
2803
+ "maxLength": 2048,
2804
+ "minLength": 1
2805
+ },
2806
+ "exit_code": {
2807
+ "type": [
2808
+ "integer",
2809
+ "null"
2810
+ ],
2811
+ "format": "int32"
2812
+ },
2813
+ "failure_kind": {
2814
+ "anyOf": [
2815
+ {
2816
+ "$ref": "#/$defs/FailureKind"
2817
+ },
2818
+ {
2819
+ "type": "null"
2820
+ }
2821
+ ]
2822
+ },
2823
+ "finished_at": {
2824
+ "type": "null"
2825
+ },
2826
+ "harness": {
2827
+ "type": "string"
2828
+ },
2829
+ "harness_id": {
2830
+ "type": [
2831
+ "string",
2832
+ "null"
2833
+ ]
2834
+ },
2835
+ "history_id": {
2836
+ "type": "string",
2837
+ "maxLength": 36,
2838
+ "minLength": 36,
2839
+ "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}$"
2840
+ },
2841
+ "labels": {
2842
+ "$ref": "#/$defs/HistoryLabels"
2843
+ },
2844
+ "model": {
2845
+ "type": [
2846
+ "string",
2847
+ "null"
2848
+ ]
2849
+ },
2850
+ "model_ms": false,
2851
+ "name": {
2852
+ "type": "string"
2853
+ },
2854
+ "observed_tool_ms": false,
2855
+ "permission_mode": {
2856
+ "$ref": "#/$defs/PermissionMode"
2857
+ },
2858
+ "project": {
2859
+ "type": "string"
2860
+ },
2861
+ "prompt": {
2862
+ "type": "string"
2863
+ },
2864
+ "schema_version": {
2865
+ "type": "string",
2866
+ "enum": [
2867
+ "1.3"
2868
+ ]
2869
+ },
2870
+ "session": {
2871
+ "type": "string"
2872
+ },
2873
+ "session_id": {
2874
+ "type": [
2875
+ "string",
2876
+ "null"
2877
+ ]
2878
+ },
2879
+ "started_at": {
2880
+ "type": "string",
2881
+ "minLength": 1
2882
+ },
2883
+ "status": {
2884
+ "type": "string",
2885
+ "enum": [
2886
+ "nonzero",
2887
+ "timeout",
2888
+ "spawn-error",
2889
+ "skipped"
2890
+ ]
2891
+ },
2892
+ "text": {
2893
+ "type": [
2894
+ "string",
2895
+ "null"
2896
+ ]
2897
+ },
2898
+ "text_source": {
2899
+ "type": [
2900
+ "string",
2901
+ "null"
2902
+ ]
2903
+ },
2904
+ "time_to_first_token_ms": {
2905
+ "type": [
2906
+ "integer",
2907
+ "null"
2908
+ ],
2909
+ "minimum": 0
2910
+ },
2911
+ "timestamp": {
2912
+ "type": "string"
2913
+ },
2914
+ "tool_ms": false,
2915
+ "type": {
2916
+ "type": "string",
2917
+ "const": "run"
2918
+ },
2919
+ "usage": {
2920
+ "$ref": "#/$defs/Usage"
2921
+ },
2922
+ "variant": {
2923
+ "type": [
2924
+ "string",
2925
+ "null"
2926
+ ]
2927
+ }
2928
+ },
2929
+ "required": [
2930
+ "schema_version",
2931
+ "history_id",
2932
+ "session",
2933
+ "name",
2934
+ "project",
2935
+ "timestamp",
2936
+ "harness",
2937
+ "model",
2938
+ "prompt",
2939
+ "permission_mode",
2940
+ "status",
2941
+ "exit_code",
2942
+ "duration_ms",
2943
+ "finished_at",
2944
+ "text",
2945
+ "text_source",
2946
+ "usage",
2947
+ "session_id",
2948
+ "failure_kind",
2949
+ "type",
2950
+ "started_at"
2951
+ ]
2952
+ }
2953
+ ]
2954
+ },
2955
+ {
2956
+ "allOf": [
2957
+ {
2958
+ "description": "The terminal summary for one harness run.",
2959
+ "type": "object",
2960
+ "properties": {
2961
+ "duration_ms": {
2962
+ "type": [
2963
+ "integer",
2964
+ "null"
2965
+ ],
2966
+ "format": "uint128",
2967
+ "minimum": 0
2968
+ },
2969
+ "error": {
2970
+ "description": "Normalized failure text for a run that did not succeed (see\n[`HistoryRecord::error`]). Omitted on the wire when absent.",
2971
+ "type": [
2972
+ "string",
2973
+ "null"
2974
+ ],
2975
+ "maxLength": 2048,
2976
+ "minLength": 1
2977
+ },
2978
+ "exit_code": {
2979
+ "type": [
2980
+ "integer",
2981
+ "null"
2982
+ ],
2983
+ "format": "int32"
2984
+ },
2985
+ "failure_kind": {
2986
+ "anyOf": [
2987
+ {
2988
+ "$ref": "#/$defs/FailureKind"
2989
+ },
2990
+ {
2991
+ "type": "null"
2992
+ }
2993
+ ]
2994
+ },
2995
+ "finished_at": {
2996
+ "type": "null"
2997
+ },
2998
+ "harness": {
2999
+ "type": "string"
3000
+ },
3001
+ "harness_id": {
3002
+ "type": [
3003
+ "string",
3004
+ "null"
3005
+ ]
3006
+ },
3007
+ "history_id": {
3008
+ "type": "string",
3009
+ "maxLength": 36,
3010
+ "minLength": 36,
3011
+ "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}$"
3012
+ },
3013
+ "labels": {
3014
+ "$ref": "#/$defs/HistoryLabels"
3015
+ },
3016
+ "model": {
3017
+ "type": [
3018
+ "string",
3019
+ "null"
3020
+ ]
3021
+ },
3022
+ "model_ms": false,
3023
+ "name": {
3024
+ "type": "string"
3025
+ },
3026
+ "observed_tool_ms": false,
3027
+ "permission_mode": {
3028
+ "$ref": "#/$defs/PermissionMode"
3029
+ },
3030
+ "project": {
3031
+ "type": "string"
3032
+ },
3033
+ "prompt": {
3034
+ "type": "string"
3035
+ },
3036
+ "schema_version": {
3037
+ "type": "string",
3038
+ "enum": [
3039
+ "1.0",
3040
+ "1.1",
3041
+ "1.2",
3042
+ "1.3"
3043
+ ]
3044
+ },
3045
+ "session": {
3046
+ "type": "string"
3047
+ },
3048
+ "session_id": {
3049
+ "type": [
3050
+ "string",
3051
+ "null"
3052
+ ]
3053
+ },
3054
+ "started_at": false,
3055
+ "status": {
3056
+ "type": "string",
3057
+ "enum": [
3058
+ "ok",
3059
+ "planned"
3060
+ ]
3061
+ },
3062
+ "text": {
3063
+ "type": [
3064
+ "string",
3065
+ "null"
3066
+ ]
3067
+ },
3068
+ "text_source": {
3069
+ "type": [
3070
+ "string",
3071
+ "null"
3072
+ ]
3073
+ },
3074
+ "time_to_first_token_ms": false,
3075
+ "timestamp": {
3076
+ "type": "string"
3077
+ },
3078
+ "tool_ms": false,
3079
+ "type": {
3080
+ "type": "string",
3081
+ "const": "run"
3082
+ },
3083
+ "usage": {
3084
+ "$ref": "#/$defs/Usage"
3085
+ },
3086
+ "variant": {
3087
+ "type": [
3088
+ "string",
3089
+ "null"
3090
+ ]
3091
+ }
3092
+ },
3093
+ "required": [
3094
+ "schema_version",
3095
+ "history_id",
3096
+ "session",
3097
+ "name",
3098
+ "project",
3099
+ "timestamp",
3100
+ "harness",
3101
+ "model",
3102
+ "prompt",
3103
+ "permission_mode",
3104
+ "status",
3105
+ "exit_code",
3106
+ "duration_ms",
3107
+ "finished_at",
3108
+ "text",
3109
+ "text_source",
3110
+ "usage",
3111
+ "session_id",
3112
+ "failure_kind",
3113
+ "type"
3114
+ ]
3115
+ }
3116
+ ]
3117
+ }
3118
+ ]
3119
+ }
3120
+ ]
3121
+ }
3122
+ ],
3123
+ "$defs": {
3124
+ "ActionEvent": {
3125
+ "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.",
3126
+ "type": "object",
3127
+ "properties": {
3128
+ "duration_ms": {
3129
+ "description": "Monotonic elapsed tool time. `None` means no terminal boundary was seen.",
3130
+ "type": [
3131
+ "integer",
3132
+ "null"
3133
+ ],
3134
+ "format": "uint128",
3135
+ "minimum": 0
3136
+ },
3137
+ "finished_at": {
3138
+ "type": [
3139
+ "string",
3140
+ "null"
3141
+ ]
3142
+ },
3143
+ "index": {
3144
+ "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).",
3145
+ "type": "integer",
3146
+ "format": "uint",
3147
+ "minimum": 0
3148
+ },
3149
+ "input": {
3150
+ "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`)."
3151
+ },
3152
+ "kind": {
3153
+ "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.",
3154
+ "type": "string"
3155
+ },
3156
+ "name": {
3157
+ "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.",
3158
+ "type": [
3159
+ "string",
3160
+ "null"
3161
+ ]
3162
+ },
3163
+ "output": {
3164
+ "description": "The result/observation text, when the trace exposes it; `null` otherwise.",
3165
+ "type": [
3166
+ "string",
3167
+ "null"
3168
+ ]
3169
+ },
3170
+ "started_at": {
3171
+ "description": "UTC interval bounds for tool execution, populated on history records.",
3172
+ "type": [
3173
+ "string",
3174
+ "null"
3175
+ ]
3176
+ },
3177
+ "status": {
3178
+ "description": "Terminal tool state, populated on history tool-call events.",
3179
+ "anyOf": [
3180
+ {
3181
+ "$ref": "#/$defs/ToolCallStatus"
3182
+ },
3183
+ {
3184
+ "type": "null"
3185
+ }
3186
+ ]
3187
+ },
3188
+ "timing_source": {
3189
+ "description": "Provenance for the tool interval. Omitted when timing is unavailable.",
3190
+ "anyOf": [
3191
+ {
3192
+ "$ref": "#/$defs/TimingSource"
3193
+ },
3194
+ {
3195
+ "type": "null"
3196
+ }
3197
+ ]
3198
+ },
3199
+ "tool_call_id": {
3200
+ "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.",
3201
+ "type": [
3202
+ "string",
3203
+ "null"
3204
+ ]
3205
+ }
3206
+ },
3207
+ "required": [
3208
+ "kind",
3209
+ "name",
3210
+ "input",
3211
+ "output",
3212
+ "index",
3213
+ "tool_call_id",
3214
+ "started_at",
3215
+ "finished_at",
3216
+ "duration_ms",
3217
+ "status"
3218
+ ]
3219
+ },
3220
+ "FailureKind": {
3221
+ "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.",
3222
+ "oneOf": [
3223
+ {
3224
+ "description": "Authentication / authorization rejected the request (401/403, missing or\ninvalid credentials).",
3225
+ "type": "string",
3226
+ "const": "auth"
3227
+ },
3228
+ {
3229
+ "description": "Rate limited (429, too many requests) — a transient condition of an\notherwise working, authenticated harness. A `429` that shows no sign of\nhaving done work is `quota` instead, whatever wording it carries.",
3230
+ "type": "string",
3231
+ "const": "rate_limit"
3232
+ },
3233
+ {
3234
+ "description": "The requested model was not found / is invalid — a configuration mistake.",
3235
+ "type": "string",
3236
+ "const": "model_not_found"
3237
+ },
3238
+ {
3239
+ "description": "Out of quota / credits, or a billing problem — a provisioning failure.",
3240
+ "type": "string",
3241
+ "const": "quota"
3242
+ },
3243
+ {
3244
+ "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.",
3245
+ "type": "string",
3246
+ "const": "tool_deferred"
3247
+ }
3248
+ ]
3249
+ },
3250
+ "HistoryLabels": {
3251
+ "type": "object",
3252
+ "additionalProperties": {
3253
+ "type": "string",
3254
+ "maxLength": 256,
3255
+ "minLength": 1,
3256
+ "not": {
3257
+ "pattern": "[\\u0000-\\u001f\\u007f-\\u009f]"
3258
+ }
3259
+ },
3260
+ "propertyNames": {
3261
+ "type": "string",
3262
+ "maxLength": 64,
3263
+ "not": {
3264
+ "pattern": "[^A-Za-z0-9._-]"
3265
+ },
3266
+ "pattern": "^[A-Za-z0-9]"
3267
+ }
3268
+ },
3269
+ "PermissionMode": {
3270
+ "description": "The unified approval mode, from least to most autonomy. A harness may not\nsupport every value (see [`crate::domain::harness::HarnessSpec::mode`]); the\ncommand layer refuses an unsupported one before spawning, never silently\ndowngrading it.",
3271
+ "oneOf": [
3272
+ {
3273
+ "description": "No mutations — the agent may read but not edit files or run commands —\n*without* the plan workflow: it just does whatever read-only work the task\nallows. Mapped to each harness's strongest per-run no-mutation enforcement\n(Codex's read-only sandbox, Claude's deny rules, Copilot's `--deny-tool`,\nCursor's `ask` mode). The enforced counterpart to [`Self::Plan`].",
3274
+ "type": "string",
3275
+ "const": "read-only"
3276
+ },
3277
+ {
3278
+ "description": "Read and propose only — like [`Self::ReadOnly`], but additionally engages\nthe harness's *plan* workflow: research the task and write a plan rather\nthan act. Supported only where a native plan mode exists (Claude/Qwen/\nCursor/Copilot, OpenCode's `plan` agent); harnesses with no plan workflow\n(Codex, Goose, Crush) reject it — use [`Self::ReadOnly`] for those.",
3279
+ "type": "string",
3280
+ "const": "plan"
3281
+ },
3282
+ {
3283
+ "description": "The harness's normal ask flow, mapped to its cleanest *non-interactive*\nvariant so a headless run never blocks waiting for input (Claude's\n`dontAsk` deny-and-continue, Goose's fail-closed `approve`, Copilot's\nauto-deny). Where no such variant exists the harness's [`ModeHeadless`]\nis [`ModeHeadless::Hangs`].",
3284
+ "type": "string",
3285
+ "const": "default"
3286
+ },
3287
+ {
3288
+ "description": "Auto-approve file edits, still gate shell/commands. (Claude's\n`acceptEdits`, Qwen's `auto-edit`.)",
3289
+ "type": "string",
3290
+ "const": "edit"
3291
+ },
3292
+ {
3293
+ "description": "Auto-approve operations the harness deems safe (a classifier), gate the\nrisky ones. (Claude's `auto`, Qwen's `auto`, Goose's `smart_approve`.)",
3294
+ "type": "string",
3295
+ "const": "auto"
3296
+ },
3297
+ {
3298
+ "description": "Approve everything — no prompts, no gating. The headless default, because\nan unattended agent otherwise hangs on the first approval. Every harness\nsupports it. (Claude's `bypassPermissions`, Codex's\n`--dangerously-bypass-approvals-and-sandbox`, Qwen/Crush `--yolo`, …)",
3299
+ "type": "string",
3300
+ "const": "bypass"
2857
3301
  }
2858
3302
  ]
2859
3303
  },
@@ -2881,7 +3325,7 @@
2881
3325
  "const": "spawn-error"
2882
3326
  },
2883
3327
  {
2884
- "description": "The binary was not found, so the harness was not run.",
3328
+ "description": "The harness was not run. Either the binary was not found (`available:\nfalse`), or it was found but the identity the selection points at is not\nprovisioned — an `env_from` home directory that is not on disk, reported\nas `available: true` with `failure_kind: \"auth\"`.",
2885
3329
  "type": "string",
2886
3330
  "const": "skipped"
2887
3331
  },
@@ -2973,12 +3417,74 @@
2973
3417
  "cost_usd"
2974
3418
  ]
2975
3419
  }
2976
- }
2977
- },
2978
- "history_record": {
2979
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2980
- "title": "HistoryRecord",
2981
- "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.",
3420
+ }
3421
+ },
3422
+ "history_record": {
3423
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3424
+ "title": "HistoryRecord",
3425
+ "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.",
3426
+ "allOf": [
3427
+ {
3428
+ "oneOf": [
3429
+ {
3430
+ "type": "object",
3431
+ "properties": {
3432
+ "error": {
3433
+ "type": "null"
3434
+ }
3435
+ }
3436
+ },
3437
+ {
3438
+ "allOf": [
3439
+ {
3440
+ "type": "object",
3441
+ "properties": {
3442
+ "error": {
3443
+ "type": "string"
3444
+ },
3445
+ "schema_version": {
3446
+ "type": "string",
3447
+ "const": "1.3"
3448
+ }
3449
+ },
3450
+ "required": [
3451
+ "error"
3452
+ ]
3453
+ },
3454
+ {
3455
+ "anyOf": [
3456
+ {
3457
+ "type": "object",
3458
+ "properties": {
3459
+ "status": {
3460
+ "type": "string",
3461
+ "enum": [
3462
+ "nonzero",
3463
+ "timeout",
3464
+ "spawn-error",
3465
+ "skipped"
3466
+ ]
3467
+ }
3468
+ }
3469
+ },
3470
+ {
3471
+ "type": "object",
3472
+ "properties": {
3473
+ "failure_kind": {
3474
+ "const": "tool_deferred"
3475
+ }
3476
+ },
3477
+ "required": [
3478
+ "failure_kind"
3479
+ ]
3480
+ }
3481
+ ]
3482
+ }
3483
+ ]
3484
+ }
3485
+ ]
3486
+ }
3487
+ ],
2982
3488
  "oneOf": [
2983
3489
  {
2984
3490
  "type": "object",
@@ -2987,6 +3493,15 @@
2987
3493
  "type": "integer",
2988
3494
  "minimum": 0
2989
3495
  },
3496
+ "error": {
3497
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
3498
+ "type": [
3499
+ "string",
3500
+ "null"
3501
+ ],
3502
+ "maxLength": 2048,
3503
+ "minLength": 1
3504
+ },
2990
3505
  "events": {
2991
3506
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
2992
3507
  "type": [
@@ -3236,7 +3751,10 @@
3236
3751
  },
3237
3752
  "schema_version": {
3238
3753
  "type": "string",
3239
- "const": "1.2"
3754
+ "enum": [
3755
+ "1.2",
3756
+ "1.3"
3757
+ ]
3240
3758
  },
3241
3759
  "session": {
3242
3760
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -3331,6 +3849,15 @@
3331
3849
  "type": "integer",
3332
3850
  "minimum": 0
3333
3851
  },
3852
+ "error": {
3853
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
3854
+ "type": [
3855
+ "string",
3856
+ "null"
3857
+ ],
3858
+ "maxLength": 2048,
3859
+ "minLength": 1
3860
+ },
3334
3861
  "events": {
3335
3862
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
3336
3863
  "type": [
@@ -3567,10 +4094,243 @@
3567
4094
  "null"
3568
4095
  ]
3569
4096
  },
3570
- "model_ms": {
3571
- "type": "integer",
3572
- "minimum": 0
3573
- },
4097
+ "model_ms": {
4098
+ "type": "integer",
4099
+ "minimum": 0
4100
+ },
4101
+ "name": {
4102
+ "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.",
4103
+ "type": "string"
4104
+ },
4105
+ "observed_tool_ms": false,
4106
+ "permission_mode": {
4107
+ "description": "The normalized approval mode requested for the run.",
4108
+ "$ref": "#/$defs/PermissionMode"
4109
+ },
4110
+ "project": {
4111
+ "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.",
4112
+ "type": "string"
4113
+ },
4114
+ "prompt": {
4115
+ "description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
4116
+ "type": "string"
4117
+ },
4118
+ "schema_version": {
4119
+ "type": "string",
4120
+ "enum": [
4121
+ "1.0",
4122
+ "1.1"
4123
+ ]
4124
+ },
4125
+ "session": {
4126
+ "description": "The oneharness session id this run belongs to (the history file's stem).",
4127
+ "type": "string"
4128
+ },
4129
+ "session_id": {
4130
+ "description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
4131
+ "type": [
4132
+ "string",
4133
+ "null"
4134
+ ]
4135
+ },
4136
+ "started_at": {
4137
+ "type": "string",
4138
+ "minLength": 1
4139
+ },
4140
+ "status": {
4141
+ "$ref": "#/$defs/Status"
4142
+ },
4143
+ "text": {
4144
+ "description": "Best-effort final assistant text; `null` when extraction was impossible.",
4145
+ "type": [
4146
+ "string",
4147
+ "null"
4148
+ ]
4149
+ },
4150
+ "text_source": {
4151
+ "description": "How `text` was extracted; `null` when absent.",
4152
+ "type": [
4153
+ "string",
4154
+ "null"
4155
+ ]
4156
+ },
4157
+ "time_to_first_token_ms": {
4158
+ "type": [
4159
+ "integer",
4160
+ "null"
4161
+ ],
4162
+ "format": "uint128",
4163
+ "minimum": 0
4164
+ },
4165
+ "timestamp": {
4166
+ "description": "RFC3339 UTC instant the record was written (append time).",
4167
+ "type": "string"
4168
+ },
4169
+ "tool_ms": {
4170
+ "type": "integer",
4171
+ "minimum": 0
4172
+ },
4173
+ "usage": {
4174
+ "description": "Best-effort token/cost accounting (every field `null` when unreported).",
4175
+ "$ref": "#/$defs/Usage"
4176
+ },
4177
+ "variant": {
4178
+ "type": [
4179
+ "string",
4180
+ "null"
4181
+ ]
4182
+ }
4183
+ },
4184
+ "required": [
4185
+ "schema_version",
4186
+ "history_id",
4187
+ "session",
4188
+ "name",
4189
+ "project",
4190
+ "timestamp",
4191
+ "harness",
4192
+ "model",
4193
+ "prompt",
4194
+ "permission_mode",
4195
+ "status",
4196
+ "exit_code",
4197
+ "duration_ms",
4198
+ "finished_at",
4199
+ "text",
4200
+ "text_source",
4201
+ "usage",
4202
+ "session_id",
4203
+ "events",
4204
+ "failure_kind",
4205
+ "started_at",
4206
+ "model_ms",
4207
+ "tool_ms"
4208
+ ]
4209
+ },
4210
+ {
4211
+ "type": "object",
4212
+ "properties": {
4213
+ "duration_ms": {
4214
+ "type": [
4215
+ "integer",
4216
+ "null"
4217
+ ],
4218
+ "format": "uint128",
4219
+ "minimum": 0
4220
+ },
4221
+ "error": {
4222
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
4223
+ "type": [
4224
+ "string",
4225
+ "null"
4226
+ ],
4227
+ "maxLength": 2048,
4228
+ "minLength": 1
4229
+ },
4230
+ "events": {
4231
+ "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
4232
+ "type": [
4233
+ "array",
4234
+ "null"
4235
+ ],
4236
+ "items": {
4237
+ "type": "object",
4238
+ "properties": {
4239
+ "duration_ms": {
4240
+ "type": "null"
4241
+ },
4242
+ "finished_at": {
4243
+ "type": "null"
4244
+ },
4245
+ "index": {
4246
+ "type": "integer",
4247
+ "minimum": 0
4248
+ },
4249
+ "input": true,
4250
+ "kind": {
4251
+ "type": "string"
4252
+ },
4253
+ "name": {
4254
+ "type": [
4255
+ "string",
4256
+ "null"
4257
+ ]
4258
+ },
4259
+ "output": {
4260
+ "type": [
4261
+ "string",
4262
+ "null"
4263
+ ]
4264
+ },
4265
+ "started_at": {
4266
+ "type": "null"
4267
+ },
4268
+ "status": {
4269
+ "type": "null"
4270
+ },
4271
+ "tool_call_id": {
4272
+ "type": [
4273
+ "string",
4274
+ "null"
4275
+ ]
4276
+ }
4277
+ },
4278
+ "required": [
4279
+ "kind",
4280
+ "name",
4281
+ "input",
4282
+ "output",
4283
+ "index"
4284
+ ]
4285
+ }
4286
+ },
4287
+ "exit_code": {
4288
+ "type": [
4289
+ "integer",
4290
+ "null"
4291
+ ],
4292
+ "format": "int32"
4293
+ },
4294
+ "failure_kind": {
4295
+ "description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
4296
+ "anyOf": [
4297
+ {
4298
+ "$ref": "#/$defs/FailureKind"
4299
+ },
4300
+ {
4301
+ "type": "null"
4302
+ }
4303
+ ]
4304
+ },
4305
+ "finished_at": {
4306
+ "type": "null"
4307
+ },
4308
+ "harness": {
4309
+ "description": "Canonical harness id (e.g. `claude-code`).",
4310
+ "type": "string"
4311
+ },
4312
+ "harness_id": {
4313
+ "type": "string"
4314
+ },
4315
+ "history_id": {
4316
+ "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.",
4317
+ "type": "string",
4318
+ "maxLength": 36,
4319
+ "minLength": 36,
4320
+ "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}$"
4321
+ },
4322
+ "labels": {
4323
+ "description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
4324
+ "$ref": "#/$defs/HistoryLabels"
4325
+ },
4326
+ "model": {
4327
+ "description": "The effective top-level model for the run, if any.",
4328
+ "type": [
4329
+ "string",
4330
+ "null"
4331
+ ]
4332
+ },
4333
+ "model_ms": false,
3574
4334
  "name": {
3575
4335
  "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.",
3576
4336
  "type": "string"
@@ -3590,7 +4350,10 @@
3590
4350
  },
3591
4351
  "schema_version": {
3592
4352
  "type": "string",
3593
- "const": "1.1"
4353
+ "enum": [
4354
+ "1.2",
4355
+ "1.3"
4356
+ ]
3594
4357
  },
3595
4358
  "session": {
3596
4359
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -3603,12 +4366,13 @@
3603
4366
  "null"
3604
4367
  ]
3605
4368
  },
3606
- "started_at": {
3607
- "type": "string",
3608
- "minLength": 1
3609
- },
4369
+ "started_at": false,
3610
4370
  "status": {
3611
- "$ref": "#/$defs/Status"
4371
+ "type": "string",
4372
+ "enum": [
4373
+ "ok",
4374
+ "planned"
4375
+ ]
3612
4376
  },
3613
4377
  "text": {
3614
4378
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -3624,22 +4388,12 @@
3624
4388
  "null"
3625
4389
  ]
3626
4390
  },
3627
- "time_to_first_token_ms": {
3628
- "type": [
3629
- "integer",
3630
- "null"
3631
- ],
3632
- "format": "uint128",
3633
- "minimum": 0
3634
- },
4391
+ "time_to_first_token_ms": false,
3635
4392
  "timestamp": {
3636
4393
  "description": "RFC3339 UTC instant the record was written (append time).",
3637
4394
  "type": "string"
3638
4395
  },
3639
- "tool_ms": {
3640
- "type": "integer",
3641
- "minimum": 0
3642
- },
4396
+ "tool_ms": false,
3643
4397
  "usage": {
3644
4398
  "description": "Best-effort token/cost accounting (every field `null` when unreported).",
3645
4399
  "$ref": "#/$defs/Usage"
@@ -3672,9 +4426,7 @@
3672
4426
  "session_id",
3673
4427
  "events",
3674
4428
  "failure_kind",
3675
- "started_at",
3676
- "model_ms",
3677
- "tool_ms"
4429
+ "harness_id"
3678
4430
  ]
3679
4431
  },
3680
4432
  {
@@ -3684,6 +4436,15 @@
3684
4436
  "type": "integer",
3685
4437
  "minimum": 0
3686
4438
  },
4439
+ "error": {
4440
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
4441
+ "type": [
4442
+ "string",
4443
+ "null"
4444
+ ],
4445
+ "maxLength": 2048,
4446
+ "minLength": 1
4447
+ },
3687
4448
  "events": {
3688
4449
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
3689
4450
  "type": [
@@ -3691,184 +4452,7 @@
3691
4452
  "null"
3692
4453
  ],
3693
4454
  "items": {
3694
- "allOf": [
3695
- {
3696
- "oneOf": [
3697
- {
3698
- "allOf": [
3699
- {
3700
- "$ref": "#/$defs/ActionEvent"
3701
- },
3702
- {
3703
- "type": "object",
3704
- "properties": {
3705
- "duration_ms": {
3706
- "type": "integer",
3707
- "minimum": 0
3708
- },
3709
- "finished_at": {
3710
- "type": "string"
3711
- },
3712
- "kind": {
3713
- "type": "string",
3714
- "const": "tool_call"
3715
- },
3716
- "started_at": {
3717
- "type": "string"
3718
- },
3719
- "status": {
3720
- "type": "string",
3721
- "const": "completed"
3722
- },
3723
- "tool_call_id": {
3724
- "type": "string",
3725
- "minLength": 1
3726
- }
3727
- },
3728
- "required": [
3729
- "kind",
3730
- "tool_call_id",
3731
- "started_at",
3732
- "status",
3733
- "finished_at",
3734
- "duration_ms"
3735
- ]
3736
- }
3737
- ]
3738
- },
3739
- {
3740
- "allOf": [
3741
- {
3742
- "$ref": "#/$defs/ActionEvent"
3743
- },
3744
- {
3745
- "type": "object",
3746
- "properties": {
3747
- "duration_ms": {
3748
- "type": "integer",
3749
- "minimum": 0
3750
- },
3751
- "finished_at": {
3752
- "type": "string"
3753
- },
3754
- "kind": {
3755
- "type": "string",
3756
- "const": "tool_call"
3757
- },
3758
- "started_at": {
3759
- "type": "string"
3760
- },
3761
- "status": {
3762
- "type": "string",
3763
- "const": "failed"
3764
- },
3765
- "tool_call_id": {
3766
- "type": "string",
3767
- "minLength": 1
3768
- }
3769
- },
3770
- "required": [
3771
- "kind",
3772
- "tool_call_id",
3773
- "started_at",
3774
- "status",
3775
- "finished_at",
3776
- "duration_ms"
3777
- ]
3778
- }
3779
- ]
3780
- },
3781
- {
3782
- "allOf": [
3783
- {
3784
- "$ref": "#/$defs/ActionEvent"
3785
- },
3786
- {
3787
- "type": "object",
3788
- "properties": {
3789
- "kind": {
3790
- "type": "string",
3791
- "const": "tool_call"
3792
- },
3793
- "started_at": {
3794
- "type": "string"
3795
- },
3796
- "status": {
3797
- "type": "string",
3798
- "const": "timeout"
3799
- },
3800
- "tool_call_id": {
3801
- "type": "string",
3802
- "minLength": 1
3803
- }
3804
- },
3805
- "required": [
3806
- "kind",
3807
- "tool_call_id",
3808
- "started_at",
3809
- "status"
3810
- ]
3811
- }
3812
- ]
3813
- },
3814
- {
3815
- "allOf": [
3816
- {
3817
- "$ref": "#/$defs/ActionEvent"
3818
- },
3819
- {
3820
- "type": "object",
3821
- "properties": {
3822
- "kind": {
3823
- "type": "string",
3824
- "const": "tool_call"
3825
- },
3826
- "started_at": {
3827
- "type": "string"
3828
- },
3829
- "status": {
3830
- "type": "string",
3831
- "const": "interrupted"
3832
- },
3833
- "tool_call_id": {
3834
- "type": "string",
3835
- "minLength": 1
3836
- }
3837
- },
3838
- "required": [
3839
- "kind",
3840
- "tool_call_id",
3841
- "started_at",
3842
- "status"
3843
- ]
3844
- }
3845
- ]
3846
- },
3847
- {
3848
- "allOf": [
3849
- {
3850
- "$ref": "#/$defs/ActionEvent"
3851
- },
3852
- {
3853
- "type": "object",
3854
- "properties": {
3855
- "kind": {
3856
- "type": "string",
3857
- "const": "tool_result"
3858
- }
3859
- }
3860
- }
3861
- ]
3862
- }
3863
- ]
3864
- },
3865
- {
3866
- "type": "object",
3867
- "properties": {
3868
- "timing_source": false
3869
- }
3870
- }
3871
- ]
4455
+ "$ref": "#/$defs/ActionEvent"
3872
4456
  }
3873
4457
  },
3874
4458
  "exit_code": {
@@ -3890,10 +4474,7 @@
3890
4474
  ]
3891
4475
  },
3892
4476
  "finished_at": {
3893
- "type": [
3894
- "string",
3895
- "null"
3896
- ]
4477
+ "type": "null"
3897
4478
  },
3898
4479
  "harness": {
3899
4480
  "description": "Canonical harness id (e.g. `claude-code`).",
@@ -3920,15 +4501,15 @@
3920
4501
  "null"
3921
4502
  ]
3922
4503
  },
3923
- "model_ms": {
3924
- "type": "integer",
3925
- "minimum": 0
3926
- },
4504
+ "model_ms": false,
3927
4505
  "name": {
3928
4506
  "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.",
3929
4507
  "type": "string"
3930
4508
  },
3931
- "observed_tool_ms": false,
4509
+ "observed_tool_ms": {
4510
+ "type": "integer",
4511
+ "minimum": 0
4512
+ },
3932
4513
  "permission_mode": {
3933
4514
  "description": "The normalized approval mode requested for the run.",
3934
4515
  "$ref": "#/$defs/PermissionMode"
@@ -3943,7 +4524,10 @@
3943
4524
  },
3944
4525
  "schema_version": {
3945
4526
  "type": "string",
3946
- "const": "1.0"
4527
+ "enum": [
4528
+ "1.2",
4529
+ "1.3"
4530
+ ]
3947
4531
  },
3948
4532
  "session": {
3949
4533
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -3956,10 +4540,7 @@
3956
4540
  "null"
3957
4541
  ]
3958
4542
  },
3959
- "started_at": {
3960
- "type": "string",
3961
- "minLength": 1
3962
- },
4543
+ "started_at": false,
3963
4544
  "status": {
3964
4545
  "$ref": "#/$defs/Status"
3965
4546
  },
@@ -3977,22 +4558,12 @@
3977
4558
  "null"
3978
4559
  ]
3979
4560
  },
3980
- "time_to_first_token_ms": {
3981
- "type": [
3982
- "integer",
3983
- "null"
3984
- ],
3985
- "format": "uint128",
3986
- "minimum": 0
3987
- },
4561
+ "time_to_first_token_ms": false,
3988
4562
  "timestamp": {
3989
4563
  "description": "RFC3339 UTC instant the record was written (append time).",
3990
4564
  "type": "string"
3991
4565
  },
3992
- "tool_ms": {
3993
- "type": "integer",
3994
- "minimum": 0
3995
- },
4566
+ "tool_ms": false,
3996
4567
  "usage": {
3997
4568
  "description": "Best-effort token/cost accounting (every field `null` when unreported).",
3998
4569
  "$ref": "#/$defs/Usage"
@@ -4025,9 +4596,8 @@
4025
4596
  "session_id",
4026
4597
  "events",
4027
4598
  "failure_kind",
4028
- "started_at",
4029
- "model_ms",
4030
- "tool_ms"
4599
+ "harness_id",
4600
+ "observed_tool_ms"
4031
4601
  ]
4032
4602
  },
4033
4603
  {
@@ -4041,6 +4611,15 @@
4041
4611
  "format": "uint128",
4042
4612
  "minimum": 0
4043
4613
  },
4614
+ "error": {
4615
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
4616
+ "type": [
4617
+ "string",
4618
+ "null"
4619
+ ],
4620
+ "maxLength": 2048,
4621
+ "minLength": 1
4622
+ },
4044
4623
  "events": {
4045
4624
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
4046
4625
  "type": [
@@ -4048,54 +4627,7 @@
4048
4627
  "null"
4049
4628
  ],
4050
4629
  "items": {
4051
- "type": "object",
4052
- "properties": {
4053
- "duration_ms": {
4054
- "type": "null"
4055
- },
4056
- "finished_at": {
4057
- "type": "null"
4058
- },
4059
- "index": {
4060
- "type": "integer",
4061
- "minimum": 0
4062
- },
4063
- "input": true,
4064
- "kind": {
4065
- "type": "string"
4066
- },
4067
- "name": {
4068
- "type": [
4069
- "string",
4070
- "null"
4071
- ]
4072
- },
4073
- "output": {
4074
- "type": [
4075
- "string",
4076
- "null"
4077
- ]
4078
- },
4079
- "started_at": {
4080
- "type": "null"
4081
- },
4082
- "status": {
4083
- "type": "null"
4084
- },
4085
- "tool_call_id": {
4086
- "type": [
4087
- "string",
4088
- "null"
4089
- ]
4090
- }
4091
- },
4092
- "required": [
4093
- "kind",
4094
- "name",
4095
- "input",
4096
- "output",
4097
- "index"
4098
- ]
4630
+ "$ref": "#/$defs/ActionEvent"
4099
4631
  }
4100
4632
  },
4101
4633
  "exit_code": {
@@ -4164,7 +4696,10 @@
4164
4696
  },
4165
4697
  "schema_version": {
4166
4698
  "type": "string",
4167
- "const": "1.2"
4699
+ "enum": [
4700
+ "1.2",
4701
+ "1.3"
4702
+ ]
4168
4703
  },
4169
4704
  "session": {
4170
4705
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -4179,7 +4714,13 @@
4179
4714
  },
4180
4715
  "started_at": false,
4181
4716
  "status": {
4182
- "$ref": "#/$defs/Status"
4717
+ "type": "string",
4718
+ "enum": [
4719
+ "nonzero",
4720
+ "timeout",
4721
+ "spawn-error",
4722
+ "skipped"
4723
+ ]
4183
4724
  },
4184
4725
  "text": {
4185
4726
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -4243,6 +4784,15 @@
4243
4784
  "type": "integer",
4244
4785
  "minimum": 0
4245
4786
  },
4787
+ "error": {
4788
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
4789
+ "type": [
4790
+ "string",
4791
+ "null"
4792
+ ],
4793
+ "maxLength": 2048,
4794
+ "minLength": 1
4795
+ },
4246
4796
  "events": {
4247
4797
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
4248
4798
  "type": [
@@ -4304,10 +4854,7 @@
4304
4854
  "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.",
4305
4855
  "type": "string"
4306
4856
  },
4307
- "observed_tool_ms": {
4308
- "type": "integer",
4309
- "minimum": 0
4310
- },
4857
+ "observed_tool_ms": false,
4311
4858
  "permission_mode": {
4312
4859
  "description": "The normalized approval mode requested for the run.",
4313
4860
  "$ref": "#/$defs/PermissionMode"
@@ -4322,7 +4869,9 @@
4322
4869
  },
4323
4870
  "schema_version": {
4324
4871
  "type": "string",
4325
- "const": "1.2"
4872
+ "enum": [
4873
+ "1.3"
4874
+ ]
4326
4875
  },
4327
4876
  "session": {
4328
4877
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -4335,9 +4884,18 @@
4335
4884
  "null"
4336
4885
  ]
4337
4886
  },
4338
- "started_at": false,
4887
+ "started_at": {
4888
+ "type": "string",
4889
+ "minLength": 1
4890
+ },
4339
4891
  "status": {
4340
- "$ref": "#/$defs/Status"
4892
+ "type": "string",
4893
+ "enum": [
4894
+ "nonzero",
4895
+ "timeout",
4896
+ "spawn-error",
4897
+ "skipped"
4898
+ ]
4341
4899
  },
4342
4900
  "text": {
4343
4901
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -4353,7 +4911,13 @@
4353
4911
  "null"
4354
4912
  ]
4355
4913
  },
4356
- "time_to_first_token_ms": false,
4914
+ "time_to_first_token_ms": {
4915
+ "type": [
4916
+ "integer",
4917
+ "null"
4918
+ ],
4919
+ "minimum": 0
4920
+ },
4357
4921
  "timestamp": {
4358
4922
  "description": "RFC3339 UTC instant the record was written (append time).",
4359
4923
  "type": "string"
@@ -4392,7 +4956,7 @@
4392
4956
  "events",
4393
4957
  "failure_kind",
4394
4958
  "harness_id",
4395
- "observed_tool_ms"
4959
+ "started_at"
4396
4960
  ]
4397
4961
  },
4398
4962
  {
@@ -4406,6 +4970,15 @@
4406
4970
  "format": "uint128",
4407
4971
  "minimum": 0
4408
4972
  },
4973
+ "error": {
4974
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
4975
+ "type": [
4976
+ "string",
4977
+ "null"
4978
+ ],
4979
+ "maxLength": 2048,
4980
+ "minLength": 1
4981
+ },
4409
4982
  "events": {
4410
4983
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
4411
4984
  "type": [
@@ -4415,54 +4988,7 @@
4415
4988
  "items": {
4416
4989
  "allOf": [
4417
4990
  {
4418
- "type": "object",
4419
- "properties": {
4420
- "duration_ms": {
4421
- "type": "null"
4422
- },
4423
- "finished_at": {
4424
- "type": "null"
4425
- },
4426
- "index": {
4427
- "type": "integer",
4428
- "minimum": 0
4429
- },
4430
- "input": true,
4431
- "kind": {
4432
- "type": "string"
4433
- },
4434
- "name": {
4435
- "type": [
4436
- "string",
4437
- "null"
4438
- ]
4439
- },
4440
- "output": {
4441
- "type": [
4442
- "string",
4443
- "null"
4444
- ]
4445
- },
4446
- "started_at": {
4447
- "type": "null"
4448
- },
4449
- "status": {
4450
- "type": "null"
4451
- },
4452
- "tool_call_id": {
4453
- "type": [
4454
- "string",
4455
- "null"
4456
- ]
4457
- }
4458
- },
4459
- "required": [
4460
- "kind",
4461
- "name",
4462
- "input",
4463
- "output",
4464
- "index"
4465
- ]
4991
+ "$ref": "#/$defs/ActionEvent"
4466
4992
  },
4467
4993
  {
4468
4994
  "type": "object",
@@ -4539,7 +5065,10 @@
4539
5065
  },
4540
5066
  "schema_version": {
4541
5067
  "type": "string",
4542
- "const": "1.1"
5068
+ "enum": [
5069
+ "1.0",
5070
+ "1.1"
5071
+ ]
4543
5072
  },
4544
5073
  "session": {
4545
5074
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -4554,7 +5083,13 @@
4554
5083
  },
4555
5084
  "started_at": false,
4556
5085
  "status": {
4557
- "$ref": "#/$defs/Status"
5086
+ "type": "string",
5087
+ "enum": [
5088
+ "nonzero",
5089
+ "timeout",
5090
+ "spawn-error",
5091
+ "skipped"
5092
+ ]
4558
5093
  },
4559
5094
  "text": {
4560
5095
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -4621,6 +5156,15 @@
4621
5156
  "format": "uint128",
4622
5157
  "minimum": 0
4623
5158
  },
5159
+ "error": {
5160
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
5161
+ "type": [
5162
+ "string",
5163
+ "null"
5164
+ ],
5165
+ "maxLength": 2048,
5166
+ "minLength": 1
5167
+ },
4624
5168
  "events": {
4625
5169
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
4626
5170
  "type": [
@@ -4754,7 +5298,10 @@
4754
5298
  },
4755
5299
  "schema_version": {
4756
5300
  "type": "string",
4757
- "const": "1.0"
5301
+ "enum": [
5302
+ "1.0",
5303
+ "1.1"
5304
+ ]
4758
5305
  },
4759
5306
  "session": {
4760
5307
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -4769,7 +5316,11 @@
4769
5316
  },
4770
5317
  "started_at": false,
4771
5318
  "status": {
4772
- "$ref": "#/$defs/Status"
5319
+ "type": "string",
5320
+ "enum": [
5321
+ "ok",
5322
+ "planned"
5323
+ ]
4773
5324
  },
4774
5325
  "text": {
4775
5326
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -4836,6 +5387,15 @@
4836
5387
  "format": "uint128",
4837
5388
  "minimum": 0
4838
5389
  },
5390
+ "error": {
5391
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
5392
+ "type": [
5393
+ "string",
5394
+ "null"
5395
+ ],
5396
+ "maxLength": 2048,
5397
+ "minLength": 1
5398
+ },
4839
5399
  "events": {
4840
5400
  "type": [
4841
5401
  "array",
@@ -5258,7 +5818,7 @@
5258
5818
  "const": "spawn-error"
5259
5819
  },
5260
5820
  {
5261
- "description": "The binary was not found, so the harness was not run.",
5821
+ "description": "The harness was not run. Either the binary was not found (`available:\nfalse`), or it was found but the identity the selection points at is not\nprovisioned — an `env_from` home directory that is not on disk, reported\nas `available: true` with `failure_kind: \"auth\"`.",
5262
5822
  "type": "string",
5263
5823
  "const": "skipped"
5264
5824
  },
@@ -5547,7 +6107,10 @@
5547
6107
  },
5548
6108
  "schema_version": {
5549
6109
  "type": "string",
5550
- "const": "1.2"
6110
+ "enum": [
6111
+ "1.2",
6112
+ "1.3"
6113
+ ]
5551
6114
  },
5552
6115
  "variant": {
5553
6116
  "type": [
@@ -5612,39 +6175,101 @@
5612
6175
  "null"
5613
6176
  ]
5614
6177
  }
5615
- },
5616
- "required": [
5617
- "schema_version",
5618
- "run_id",
5619
- "harness",
5620
- "event"
6178
+ },
6179
+ "required": [
6180
+ "schema_version",
6181
+ "run_id",
6182
+ "harness",
6183
+ "event"
6184
+ ]
6185
+ }
6186
+ ]
6187
+ }
6188
+ ]
6189
+ },
6190
+ "HistoryLabels": {
6191
+ "type": "object",
6192
+ "additionalProperties": {
6193
+ "type": "string",
6194
+ "maxLength": 256,
6195
+ "minLength": 1,
6196
+ "not": {
6197
+ "pattern": "[\\u0000-\\u001f\\u007f-\\u009f]"
6198
+ }
6199
+ },
6200
+ "propertyNames": {
6201
+ "type": "string",
6202
+ "maxLength": 64,
6203
+ "not": {
6204
+ "pattern": "[^A-Za-z0-9._-]"
6205
+ },
6206
+ "pattern": "^[A-Za-z0-9]"
6207
+ }
6208
+ },
6209
+ "HistoryRecord": {
6210
+ "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.",
6211
+ "allOf": [
6212
+ {
6213
+ "oneOf": [
6214
+ {
6215
+ "type": "object",
6216
+ "properties": {
6217
+ "error": {
6218
+ "type": "null"
6219
+ }
6220
+ }
6221
+ },
6222
+ {
6223
+ "allOf": [
6224
+ {
6225
+ "type": "object",
6226
+ "properties": {
6227
+ "error": {
6228
+ "type": "string"
6229
+ },
6230
+ "schema_version": {
6231
+ "type": "string",
6232
+ "const": "1.3"
6233
+ }
6234
+ },
6235
+ "required": [
6236
+ "error"
6237
+ ]
6238
+ },
6239
+ {
6240
+ "anyOf": [
6241
+ {
6242
+ "type": "object",
6243
+ "properties": {
6244
+ "status": {
6245
+ "type": "string",
6246
+ "enum": [
6247
+ "nonzero",
6248
+ "timeout",
6249
+ "spawn-error",
6250
+ "skipped"
6251
+ ]
6252
+ }
6253
+ }
6254
+ },
6255
+ {
6256
+ "type": "object",
6257
+ "properties": {
6258
+ "failure_kind": {
6259
+ "const": "tool_deferred"
6260
+ }
6261
+ },
6262
+ "required": [
6263
+ "failure_kind"
6264
+ ]
6265
+ }
6266
+ ]
6267
+ }
5621
6268
  ]
5622
6269
  }
5623
6270
  ]
5624
6271
  }
5625
- ]
5626
- },
5627
- "HistoryLabels": {
5628
- "type": "object",
5629
- "additionalProperties": {
5630
- "type": "string",
5631
- "maxLength": 256,
5632
- "minLength": 1,
5633
- "not": {
5634
- "pattern": "[\\u0000-\\u001f\\u007f-\\u009f]"
5635
- }
5636
- },
5637
- "propertyNames": {
5638
- "type": "string",
5639
- "maxLength": 64,
5640
- "not": {
5641
- "pattern": "[^A-Za-z0-9._-]"
5642
- },
5643
- "pattern": "^[A-Za-z0-9]"
5644
- }
5645
- },
5646
- "HistoryRecord": {
5647
- "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.",
6272
+ ],
5648
6273
  "oneOf": [
5649
6274
  {
5650
6275
  "type": "object",
@@ -5653,6 +6278,15 @@
5653
6278
  "type": "integer",
5654
6279
  "minimum": 0
5655
6280
  },
6281
+ "error": {
6282
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
6283
+ "type": [
6284
+ "string",
6285
+ "null"
6286
+ ],
6287
+ "maxLength": 2048,
6288
+ "minLength": 1
6289
+ },
5656
6290
  "events": {
5657
6291
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
5658
6292
  "type": [
@@ -5902,7 +6536,10 @@
5902
6536
  },
5903
6537
  "schema_version": {
5904
6538
  "type": "string",
5905
- "const": "1.2"
6539
+ "enum": [
6540
+ "1.2",
6541
+ "1.3"
6542
+ ]
5906
6543
  },
5907
6544
  "session": {
5908
6545
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -5997,6 +6634,15 @@
5997
6634
  "type": "integer",
5998
6635
  "minimum": 0
5999
6636
  },
6637
+ "error": {
6638
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
6639
+ "type": [
6640
+ "string",
6641
+ "null"
6642
+ ],
6643
+ "maxLength": 2048,
6644
+ "minLength": 1
6645
+ },
6000
6646
  "events": {
6001
6647
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
6002
6648
  "type": [
@@ -6175,12 +6821,251 @@
6175
6821
  }
6176
6822
  ]
6177
6823
  },
6178
- {
6179
- "type": "object",
6180
- "properties": {
6181
- "timing_source": false
6182
- }
6824
+ {
6825
+ "type": "object",
6826
+ "properties": {
6827
+ "timing_source": false
6828
+ }
6829
+ }
6830
+ ]
6831
+ }
6832
+ },
6833
+ "exit_code": {
6834
+ "type": [
6835
+ "integer",
6836
+ "null"
6837
+ ],
6838
+ "format": "int32"
6839
+ },
6840
+ "failure_kind": {
6841
+ "description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
6842
+ "anyOf": [
6843
+ {
6844
+ "$ref": "#/$defs/FailureKind"
6845
+ },
6846
+ {
6847
+ "type": "null"
6848
+ }
6849
+ ]
6850
+ },
6851
+ "finished_at": {
6852
+ "type": [
6853
+ "string",
6854
+ "null"
6855
+ ]
6856
+ },
6857
+ "harness": {
6858
+ "description": "Canonical harness id (e.g. `claude-code`).",
6859
+ "type": "string"
6860
+ },
6861
+ "harness_id": {
6862
+ "type": "string"
6863
+ },
6864
+ "history_id": {
6865
+ "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.",
6866
+ "type": "string",
6867
+ "maxLength": 36,
6868
+ "minLength": 36,
6869
+ "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}$"
6870
+ },
6871
+ "labels": {
6872
+ "description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
6873
+ "$ref": "#/$defs/HistoryLabels"
6874
+ },
6875
+ "model": {
6876
+ "description": "The effective top-level model for the run, if any.",
6877
+ "type": [
6878
+ "string",
6879
+ "null"
6880
+ ]
6881
+ },
6882
+ "model_ms": {
6883
+ "type": "integer",
6884
+ "minimum": 0
6885
+ },
6886
+ "name": {
6887
+ "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.",
6888
+ "type": "string"
6889
+ },
6890
+ "observed_tool_ms": false,
6891
+ "permission_mode": {
6892
+ "description": "The normalized approval mode requested for the run.",
6893
+ "$ref": "#/$defs/PermissionMode"
6894
+ },
6895
+ "project": {
6896
+ "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.",
6897
+ "type": "string"
6898
+ },
6899
+ "prompt": {
6900
+ "description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
6901
+ "type": "string"
6902
+ },
6903
+ "schema_version": {
6904
+ "type": "string",
6905
+ "enum": [
6906
+ "1.0",
6907
+ "1.1"
6908
+ ]
6909
+ },
6910
+ "session": {
6911
+ "description": "The oneharness session id this run belongs to (the history file's stem).",
6912
+ "type": "string"
6913
+ },
6914
+ "session_id": {
6915
+ "description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
6916
+ "type": [
6917
+ "string",
6918
+ "null"
6919
+ ]
6920
+ },
6921
+ "started_at": {
6922
+ "type": "string",
6923
+ "minLength": 1
6924
+ },
6925
+ "status": {
6926
+ "$ref": "#/$defs/Status"
6927
+ },
6928
+ "text": {
6929
+ "description": "Best-effort final assistant text; `null` when extraction was impossible.",
6930
+ "type": [
6931
+ "string",
6932
+ "null"
6933
+ ]
6934
+ },
6935
+ "text_source": {
6936
+ "description": "How `text` was extracted; `null` when absent.",
6937
+ "type": [
6938
+ "string",
6939
+ "null"
6940
+ ]
6941
+ },
6942
+ "time_to_first_token_ms": {
6943
+ "type": [
6944
+ "integer",
6945
+ "null"
6946
+ ],
6947
+ "format": "uint128",
6948
+ "minimum": 0
6949
+ },
6950
+ "timestamp": {
6951
+ "description": "RFC3339 UTC instant the record was written (append time).",
6952
+ "type": "string"
6953
+ },
6954
+ "tool_ms": {
6955
+ "type": "integer",
6956
+ "minimum": 0
6957
+ },
6958
+ "usage": {
6959
+ "description": "Best-effort token/cost accounting (every field `null` when unreported).",
6960
+ "$ref": "#/$defs/Usage"
6961
+ },
6962
+ "variant": {
6963
+ "type": [
6964
+ "string",
6965
+ "null"
6966
+ ]
6967
+ }
6968
+ },
6969
+ "required": [
6970
+ "schema_version",
6971
+ "history_id",
6972
+ "session",
6973
+ "name",
6974
+ "project",
6975
+ "timestamp",
6976
+ "harness",
6977
+ "model",
6978
+ "prompt",
6979
+ "permission_mode",
6980
+ "status",
6981
+ "exit_code",
6982
+ "duration_ms",
6983
+ "finished_at",
6984
+ "text",
6985
+ "text_source",
6986
+ "usage",
6987
+ "session_id",
6988
+ "events",
6989
+ "failure_kind",
6990
+ "started_at",
6991
+ "model_ms",
6992
+ "tool_ms"
6993
+ ]
6994
+ },
6995
+ {
6996
+ "type": "object",
6997
+ "properties": {
6998
+ "duration_ms": {
6999
+ "type": [
7000
+ "integer",
7001
+ "null"
7002
+ ],
7003
+ "format": "uint128",
7004
+ "minimum": 0
7005
+ },
7006
+ "error": {
7007
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
7008
+ "type": [
7009
+ "string",
7010
+ "null"
7011
+ ],
7012
+ "maxLength": 2048,
7013
+ "minLength": 1
7014
+ },
7015
+ "events": {
7016
+ "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
7017
+ "type": [
7018
+ "array",
7019
+ "null"
7020
+ ],
7021
+ "items": {
7022
+ "type": "object",
7023
+ "properties": {
7024
+ "duration_ms": {
7025
+ "type": "null"
7026
+ },
7027
+ "finished_at": {
7028
+ "type": "null"
7029
+ },
7030
+ "index": {
7031
+ "type": "integer",
7032
+ "minimum": 0
7033
+ },
7034
+ "input": true,
7035
+ "kind": {
7036
+ "type": "string"
7037
+ },
7038
+ "name": {
7039
+ "type": [
7040
+ "string",
7041
+ "null"
7042
+ ]
7043
+ },
7044
+ "output": {
7045
+ "type": [
7046
+ "string",
7047
+ "null"
7048
+ ]
7049
+ },
7050
+ "started_at": {
7051
+ "type": "null"
7052
+ },
7053
+ "status": {
7054
+ "type": "null"
7055
+ },
7056
+ "tool_call_id": {
7057
+ "type": [
7058
+ "string",
7059
+ "null"
7060
+ ]
6183
7061
  }
7062
+ },
7063
+ "required": [
7064
+ "kind",
7065
+ "name",
7066
+ "input",
7067
+ "output",
7068
+ "index"
6184
7069
  ]
6185
7070
  }
6186
7071
  },
@@ -6203,10 +7088,7 @@
6203
7088
  ]
6204
7089
  },
6205
7090
  "finished_at": {
6206
- "type": [
6207
- "string",
6208
- "null"
6209
- ]
7091
+ "type": "null"
6210
7092
  },
6211
7093
  "harness": {
6212
7094
  "description": "Canonical harness id (e.g. `claude-code`).",
@@ -6233,10 +7115,7 @@
6233
7115
  "null"
6234
7116
  ]
6235
7117
  },
6236
- "model_ms": {
6237
- "type": "integer",
6238
- "minimum": 0
6239
- },
7118
+ "model_ms": false,
6240
7119
  "name": {
6241
7120
  "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.",
6242
7121
  "type": "string"
@@ -6256,7 +7135,10 @@
6256
7135
  },
6257
7136
  "schema_version": {
6258
7137
  "type": "string",
6259
- "const": "1.1"
7138
+ "enum": [
7139
+ "1.2",
7140
+ "1.3"
7141
+ ]
6260
7142
  },
6261
7143
  "session": {
6262
7144
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -6269,12 +7151,13 @@
6269
7151
  "null"
6270
7152
  ]
6271
7153
  },
6272
- "started_at": {
6273
- "type": "string",
6274
- "minLength": 1
6275
- },
7154
+ "started_at": false,
6276
7155
  "status": {
6277
- "$ref": "#/$defs/Status"
7156
+ "type": "string",
7157
+ "enum": [
7158
+ "ok",
7159
+ "planned"
7160
+ ]
6278
7161
  },
6279
7162
  "text": {
6280
7163
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -6290,22 +7173,12 @@
6290
7173
  "null"
6291
7174
  ]
6292
7175
  },
6293
- "time_to_first_token_ms": {
6294
- "type": [
6295
- "integer",
6296
- "null"
6297
- ],
6298
- "format": "uint128",
6299
- "minimum": 0
6300
- },
7176
+ "time_to_first_token_ms": false,
6301
7177
  "timestamp": {
6302
7178
  "description": "RFC3339 UTC instant the record was written (append time).",
6303
7179
  "type": "string"
6304
7180
  },
6305
- "tool_ms": {
6306
- "type": "integer",
6307
- "minimum": 0
6308
- },
7181
+ "tool_ms": false,
6309
7182
  "usage": {
6310
7183
  "description": "Best-effort token/cost accounting (every field `null` when unreported).",
6311
7184
  "$ref": "#/$defs/Usage"
@@ -6338,9 +7211,7 @@
6338
7211
  "session_id",
6339
7212
  "events",
6340
7213
  "failure_kind",
6341
- "started_at",
6342
- "model_ms",
6343
- "tool_ms"
7214
+ "harness_id"
6344
7215
  ]
6345
7216
  },
6346
7217
  {
@@ -6350,191 +7221,23 @@
6350
7221
  "type": "integer",
6351
7222
  "minimum": 0
6352
7223
  },
6353
- "events": {
6354
- "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
7224
+ "error": {
7225
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
6355
7226
  "type": [
6356
- "array",
7227
+ "string",
6357
7228
  "null"
6358
- ],
6359
- "items": {
6360
- "allOf": [
6361
- {
6362
- "oneOf": [
6363
- {
6364
- "allOf": [
6365
- {
6366
- "$ref": "#/$defs/ActionEvent"
6367
- },
6368
- {
6369
- "type": "object",
6370
- "properties": {
6371
- "duration_ms": {
6372
- "type": "integer",
6373
- "minimum": 0
6374
- },
6375
- "finished_at": {
6376
- "type": "string"
6377
- },
6378
- "kind": {
6379
- "type": "string",
6380
- "const": "tool_call"
6381
- },
6382
- "started_at": {
6383
- "type": "string"
6384
- },
6385
- "status": {
6386
- "type": "string",
6387
- "const": "completed"
6388
- },
6389
- "tool_call_id": {
6390
- "type": "string",
6391
- "minLength": 1
6392
- }
6393
- },
6394
- "required": [
6395
- "kind",
6396
- "tool_call_id",
6397
- "started_at",
6398
- "status",
6399
- "finished_at",
6400
- "duration_ms"
6401
- ]
6402
- }
6403
- ]
6404
- },
6405
- {
6406
- "allOf": [
6407
- {
6408
- "$ref": "#/$defs/ActionEvent"
6409
- },
6410
- {
6411
- "type": "object",
6412
- "properties": {
6413
- "duration_ms": {
6414
- "type": "integer",
6415
- "minimum": 0
6416
- },
6417
- "finished_at": {
6418
- "type": "string"
6419
- },
6420
- "kind": {
6421
- "type": "string",
6422
- "const": "tool_call"
6423
- },
6424
- "started_at": {
6425
- "type": "string"
6426
- },
6427
- "status": {
6428
- "type": "string",
6429
- "const": "failed"
6430
- },
6431
- "tool_call_id": {
6432
- "type": "string",
6433
- "minLength": 1
6434
- }
6435
- },
6436
- "required": [
6437
- "kind",
6438
- "tool_call_id",
6439
- "started_at",
6440
- "status",
6441
- "finished_at",
6442
- "duration_ms"
6443
- ]
6444
- }
6445
- ]
6446
- },
6447
- {
6448
- "allOf": [
6449
- {
6450
- "$ref": "#/$defs/ActionEvent"
6451
- },
6452
- {
6453
- "type": "object",
6454
- "properties": {
6455
- "kind": {
6456
- "type": "string",
6457
- "const": "tool_call"
6458
- },
6459
- "started_at": {
6460
- "type": "string"
6461
- },
6462
- "status": {
6463
- "type": "string",
6464
- "const": "timeout"
6465
- },
6466
- "tool_call_id": {
6467
- "type": "string",
6468
- "minLength": 1
6469
- }
6470
- },
6471
- "required": [
6472
- "kind",
6473
- "tool_call_id",
6474
- "started_at",
6475
- "status"
6476
- ]
6477
- }
6478
- ]
6479
- },
6480
- {
6481
- "allOf": [
6482
- {
6483
- "$ref": "#/$defs/ActionEvent"
6484
- },
6485
- {
6486
- "type": "object",
6487
- "properties": {
6488
- "kind": {
6489
- "type": "string",
6490
- "const": "tool_call"
6491
- },
6492
- "started_at": {
6493
- "type": "string"
6494
- },
6495
- "status": {
6496
- "type": "string",
6497
- "const": "interrupted"
6498
- },
6499
- "tool_call_id": {
6500
- "type": "string",
6501
- "minLength": 1
6502
- }
6503
- },
6504
- "required": [
6505
- "kind",
6506
- "tool_call_id",
6507
- "started_at",
6508
- "status"
6509
- ]
6510
- }
6511
- ]
6512
- },
6513
- {
6514
- "allOf": [
6515
- {
6516
- "$ref": "#/$defs/ActionEvent"
6517
- },
6518
- {
6519
- "type": "object",
6520
- "properties": {
6521
- "kind": {
6522
- "type": "string",
6523
- "const": "tool_result"
6524
- }
6525
- }
6526
- }
6527
- ]
6528
- }
6529
- ]
6530
- },
6531
- {
6532
- "type": "object",
6533
- "properties": {
6534
- "timing_source": false
6535
- }
6536
- }
6537
- ]
7229
+ ],
7230
+ "maxLength": 2048,
7231
+ "minLength": 1
7232
+ },
7233
+ "events": {
7234
+ "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
7235
+ "type": [
7236
+ "array",
7237
+ "null"
7238
+ ],
7239
+ "items": {
7240
+ "$ref": "#/$defs/ActionEvent"
6538
7241
  }
6539
7242
  },
6540
7243
  "exit_code": {
@@ -6556,10 +7259,7 @@
6556
7259
  ]
6557
7260
  },
6558
7261
  "finished_at": {
6559
- "type": [
6560
- "string",
6561
- "null"
6562
- ]
7262
+ "type": "null"
6563
7263
  },
6564
7264
  "harness": {
6565
7265
  "description": "Canonical harness id (e.g. `claude-code`).",
@@ -6586,15 +7286,15 @@
6586
7286
  "null"
6587
7287
  ]
6588
7288
  },
6589
- "model_ms": {
6590
- "type": "integer",
6591
- "minimum": 0
6592
- },
7289
+ "model_ms": false,
6593
7290
  "name": {
6594
7291
  "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.",
6595
7292
  "type": "string"
6596
7293
  },
6597
- "observed_tool_ms": false,
7294
+ "observed_tool_ms": {
7295
+ "type": "integer",
7296
+ "minimum": 0
7297
+ },
6598
7298
  "permission_mode": {
6599
7299
  "description": "The normalized approval mode requested for the run.",
6600
7300
  "$ref": "#/$defs/PermissionMode"
@@ -6609,7 +7309,10 @@
6609
7309
  },
6610
7310
  "schema_version": {
6611
7311
  "type": "string",
6612
- "const": "1.0"
7312
+ "enum": [
7313
+ "1.2",
7314
+ "1.3"
7315
+ ]
6613
7316
  },
6614
7317
  "session": {
6615
7318
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -6622,10 +7325,7 @@
6622
7325
  "null"
6623
7326
  ]
6624
7327
  },
6625
- "started_at": {
6626
- "type": "string",
6627
- "minLength": 1
6628
- },
7328
+ "started_at": false,
6629
7329
  "status": {
6630
7330
  "$ref": "#/$defs/Status"
6631
7331
  },
@@ -6643,22 +7343,12 @@
6643
7343
  "null"
6644
7344
  ]
6645
7345
  },
6646
- "time_to_first_token_ms": {
6647
- "type": [
6648
- "integer",
6649
- "null"
6650
- ],
6651
- "format": "uint128",
6652
- "minimum": 0
6653
- },
7346
+ "time_to_first_token_ms": false,
6654
7347
  "timestamp": {
6655
7348
  "description": "RFC3339 UTC instant the record was written (append time).",
6656
7349
  "type": "string"
6657
7350
  },
6658
- "tool_ms": {
6659
- "type": "integer",
6660
- "minimum": 0
6661
- },
7351
+ "tool_ms": false,
6662
7352
  "usage": {
6663
7353
  "description": "Best-effort token/cost accounting (every field `null` when unreported).",
6664
7354
  "$ref": "#/$defs/Usage"
@@ -6691,9 +7381,8 @@
6691
7381
  "session_id",
6692
7382
  "events",
6693
7383
  "failure_kind",
6694
- "started_at",
6695
- "model_ms",
6696
- "tool_ms"
7384
+ "harness_id",
7385
+ "observed_tool_ms"
6697
7386
  ]
6698
7387
  },
6699
7388
  {
@@ -6707,6 +7396,15 @@
6707
7396
  "format": "uint128",
6708
7397
  "minimum": 0
6709
7398
  },
7399
+ "error": {
7400
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
7401
+ "type": [
7402
+ "string",
7403
+ "null"
7404
+ ],
7405
+ "maxLength": 2048,
7406
+ "minLength": 1
7407
+ },
6710
7408
  "events": {
6711
7409
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
6712
7410
  "type": [
@@ -6714,54 +7412,7 @@
6714
7412
  "null"
6715
7413
  ],
6716
7414
  "items": {
6717
- "type": "object",
6718
- "properties": {
6719
- "duration_ms": {
6720
- "type": "null"
6721
- },
6722
- "finished_at": {
6723
- "type": "null"
6724
- },
6725
- "index": {
6726
- "type": "integer",
6727
- "minimum": 0
6728
- },
6729
- "input": true,
6730
- "kind": {
6731
- "type": "string"
6732
- },
6733
- "name": {
6734
- "type": [
6735
- "string",
6736
- "null"
6737
- ]
6738
- },
6739
- "output": {
6740
- "type": [
6741
- "string",
6742
- "null"
6743
- ]
6744
- },
6745
- "started_at": {
6746
- "type": "null"
6747
- },
6748
- "status": {
6749
- "type": "null"
6750
- },
6751
- "tool_call_id": {
6752
- "type": [
6753
- "string",
6754
- "null"
6755
- ]
6756
- }
6757
- },
6758
- "required": [
6759
- "kind",
6760
- "name",
6761
- "input",
6762
- "output",
6763
- "index"
6764
- ]
7415
+ "$ref": "#/$defs/ActionEvent"
6765
7416
  }
6766
7417
  },
6767
7418
  "exit_code": {
@@ -6830,7 +7481,10 @@
6830
7481
  },
6831
7482
  "schema_version": {
6832
7483
  "type": "string",
6833
- "const": "1.2"
7484
+ "enum": [
7485
+ "1.2",
7486
+ "1.3"
7487
+ ]
6834
7488
  },
6835
7489
  "session": {
6836
7490
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -6845,7 +7499,13 @@
6845
7499
  },
6846
7500
  "started_at": false,
6847
7501
  "status": {
6848
- "$ref": "#/$defs/Status"
7502
+ "type": "string",
7503
+ "enum": [
7504
+ "nonzero",
7505
+ "timeout",
7506
+ "spawn-error",
7507
+ "skipped"
7508
+ ]
6849
7509
  },
6850
7510
  "text": {
6851
7511
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -6909,6 +7569,15 @@
6909
7569
  "type": "integer",
6910
7570
  "minimum": 0
6911
7571
  },
7572
+ "error": {
7573
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
7574
+ "type": [
7575
+ "string",
7576
+ "null"
7577
+ ],
7578
+ "maxLength": 2048,
7579
+ "minLength": 1
7580
+ },
6912
7581
  "events": {
6913
7582
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
6914
7583
  "type": [
@@ -6970,10 +7639,7 @@
6970
7639
  "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.",
6971
7640
  "type": "string"
6972
7641
  },
6973
- "observed_tool_ms": {
6974
- "type": "integer",
6975
- "minimum": 0
6976
- },
7642
+ "observed_tool_ms": false,
6977
7643
  "permission_mode": {
6978
7644
  "description": "The normalized approval mode requested for the run.",
6979
7645
  "$ref": "#/$defs/PermissionMode"
@@ -6988,7 +7654,9 @@
6988
7654
  },
6989
7655
  "schema_version": {
6990
7656
  "type": "string",
6991
- "const": "1.2"
7657
+ "enum": [
7658
+ "1.3"
7659
+ ]
6992
7660
  },
6993
7661
  "session": {
6994
7662
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -7001,9 +7669,18 @@
7001
7669
  "null"
7002
7670
  ]
7003
7671
  },
7004
- "started_at": false,
7672
+ "started_at": {
7673
+ "type": "string",
7674
+ "minLength": 1
7675
+ },
7005
7676
  "status": {
7006
- "$ref": "#/$defs/Status"
7677
+ "type": "string",
7678
+ "enum": [
7679
+ "nonzero",
7680
+ "timeout",
7681
+ "spawn-error",
7682
+ "skipped"
7683
+ ]
7007
7684
  },
7008
7685
  "text": {
7009
7686
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -7019,7 +7696,13 @@
7019
7696
  "null"
7020
7697
  ]
7021
7698
  },
7022
- "time_to_first_token_ms": false,
7699
+ "time_to_first_token_ms": {
7700
+ "type": [
7701
+ "integer",
7702
+ "null"
7703
+ ],
7704
+ "minimum": 0
7705
+ },
7023
7706
  "timestamp": {
7024
7707
  "description": "RFC3339 UTC instant the record was written (append time).",
7025
7708
  "type": "string"
@@ -7058,7 +7741,7 @@
7058
7741
  "events",
7059
7742
  "failure_kind",
7060
7743
  "harness_id",
7061
- "observed_tool_ms"
7744
+ "started_at"
7062
7745
  ]
7063
7746
  },
7064
7747
  {
@@ -7072,6 +7755,15 @@
7072
7755
  "format": "uint128",
7073
7756
  "minimum": 0
7074
7757
  },
7758
+ "error": {
7759
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
7760
+ "type": [
7761
+ "string",
7762
+ "null"
7763
+ ],
7764
+ "maxLength": 2048,
7765
+ "minLength": 1
7766
+ },
7075
7767
  "events": {
7076
7768
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
7077
7769
  "type": [
@@ -7081,54 +7773,7 @@
7081
7773
  "items": {
7082
7774
  "allOf": [
7083
7775
  {
7084
- "type": "object",
7085
- "properties": {
7086
- "duration_ms": {
7087
- "type": "null"
7088
- },
7089
- "finished_at": {
7090
- "type": "null"
7091
- },
7092
- "index": {
7093
- "type": "integer",
7094
- "minimum": 0
7095
- },
7096
- "input": true,
7097
- "kind": {
7098
- "type": "string"
7099
- },
7100
- "name": {
7101
- "type": [
7102
- "string",
7103
- "null"
7104
- ]
7105
- },
7106
- "output": {
7107
- "type": [
7108
- "string",
7109
- "null"
7110
- ]
7111
- },
7112
- "started_at": {
7113
- "type": "null"
7114
- },
7115
- "status": {
7116
- "type": "null"
7117
- },
7118
- "tool_call_id": {
7119
- "type": [
7120
- "string",
7121
- "null"
7122
- ]
7123
- }
7124
- },
7125
- "required": [
7126
- "kind",
7127
- "name",
7128
- "input",
7129
- "output",
7130
- "index"
7131
- ]
7776
+ "$ref": "#/$defs/ActionEvent"
7132
7777
  },
7133
7778
  {
7134
7779
  "type": "object",
@@ -7205,7 +7850,10 @@
7205
7850
  },
7206
7851
  "schema_version": {
7207
7852
  "type": "string",
7208
- "const": "1.1"
7853
+ "enum": [
7854
+ "1.0",
7855
+ "1.1"
7856
+ ]
7209
7857
  },
7210
7858
  "session": {
7211
7859
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -7220,7 +7868,13 @@
7220
7868
  },
7221
7869
  "started_at": false,
7222
7870
  "status": {
7223
- "$ref": "#/$defs/Status"
7871
+ "type": "string",
7872
+ "enum": [
7873
+ "nonzero",
7874
+ "timeout",
7875
+ "spawn-error",
7876
+ "skipped"
7877
+ ]
7224
7878
  },
7225
7879
  "text": {
7226
7880
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -7287,6 +7941,15 @@
7287
7941
  "format": "uint128",
7288
7942
  "minimum": 0
7289
7943
  },
7944
+ "error": {
7945
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
7946
+ "type": [
7947
+ "string",
7948
+ "null"
7949
+ ],
7950
+ "maxLength": 2048,
7951
+ "minLength": 1
7952
+ },
7290
7953
  "events": {
7291
7954
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
7292
7955
  "type": [
@@ -7420,7 +8083,10 @@
7420
8083
  },
7421
8084
  "schema_version": {
7422
8085
  "type": "string",
7423
- "const": "1.0"
8086
+ "enum": [
8087
+ "1.0",
8088
+ "1.1"
8089
+ ]
7424
8090
  },
7425
8091
  "session": {
7426
8092
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -7435,7 +8101,11 @@
7435
8101
  },
7436
8102
  "started_at": false,
7437
8103
  "status": {
7438
- "$ref": "#/$defs/Status"
8104
+ "type": "string",
8105
+ "enum": [
8106
+ "ok",
8107
+ "planned"
8108
+ ]
7439
8109
  },
7440
8110
  "text": {
7441
8111
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -7502,6 +8172,15 @@
7502
8172
  "format": "uint128",
7503
8173
  "minimum": 0
7504
8174
  },
8175
+ "error": {
8176
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
8177
+ "type": [
8178
+ "string",
8179
+ "null"
8180
+ ],
8181
+ "maxLength": 2048,
8182
+ "minLength": 1
8183
+ },
7505
8184
  "events": {
7506
8185
  "type": [
7507
8186
  "array",
@@ -7779,7 +8458,7 @@
7779
8458
  "const": "spawn-error"
7780
8459
  },
7781
8460
  {
7782
- "description": "The binary was not found, so the harness was not run.",
8461
+ "description": "The harness was not run. Either the binary was not found (`available:\nfalse`), or it was found but the identity the selection points at is not\nprovisioned — an `env_from` home directory that is not on disk, reported\nas `available: true` with `failure_kind: \"auth\"`.",
7783
8462
  "type": "string",
7784
8463
  "const": "skipped"
7785
8464
  },
@@ -8028,6 +8707,68 @@
8028
8707
  },
8029
8708
  "HistoryRecord": {
8030
8709
  "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.",
8710
+ "allOf": [
8711
+ {
8712
+ "oneOf": [
8713
+ {
8714
+ "type": "object",
8715
+ "properties": {
8716
+ "error": {
8717
+ "type": "null"
8718
+ }
8719
+ }
8720
+ },
8721
+ {
8722
+ "allOf": [
8723
+ {
8724
+ "type": "object",
8725
+ "properties": {
8726
+ "error": {
8727
+ "type": "string"
8728
+ },
8729
+ "schema_version": {
8730
+ "type": "string",
8731
+ "const": "1.3"
8732
+ }
8733
+ },
8734
+ "required": [
8735
+ "error"
8736
+ ]
8737
+ },
8738
+ {
8739
+ "anyOf": [
8740
+ {
8741
+ "type": "object",
8742
+ "properties": {
8743
+ "status": {
8744
+ "type": "string",
8745
+ "enum": [
8746
+ "nonzero",
8747
+ "timeout",
8748
+ "spawn-error",
8749
+ "skipped"
8750
+ ]
8751
+ }
8752
+ }
8753
+ },
8754
+ {
8755
+ "type": "object",
8756
+ "properties": {
8757
+ "failure_kind": {
8758
+ "const": "tool_deferred"
8759
+ }
8760
+ },
8761
+ "required": [
8762
+ "failure_kind"
8763
+ ]
8764
+ }
8765
+ ]
8766
+ }
8767
+ ]
8768
+ }
8769
+ ]
8770
+ }
8771
+ ],
8031
8772
  "oneOf": [
8032
8773
  {
8033
8774
  "type": "object",
@@ -8036,6 +8777,15 @@
8036
8777
  "type": "integer",
8037
8778
  "minimum": 0
8038
8779
  },
8780
+ "error": {
8781
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
8782
+ "type": [
8783
+ "string",
8784
+ "null"
8785
+ ],
8786
+ "maxLength": 2048,
8787
+ "minLength": 1
8788
+ },
8039
8789
  "events": {
8040
8790
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
8041
8791
  "type": [
@@ -8285,7 +9035,10 @@
8285
9035
  },
8286
9036
  "schema_version": {
8287
9037
  "type": "string",
8288
- "const": "1.2"
9038
+ "enum": [
9039
+ "1.2",
9040
+ "1.3"
9041
+ ]
8289
9042
  },
8290
9043
  "session": {
8291
9044
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -8380,6 +9133,15 @@
8380
9133
  "type": "integer",
8381
9134
  "minimum": 0
8382
9135
  },
9136
+ "error": {
9137
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
9138
+ "type": [
9139
+ "string",
9140
+ "null"
9141
+ ],
9142
+ "maxLength": 2048,
9143
+ "minLength": 1
9144
+ },
8383
9145
  "events": {
8384
9146
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
8385
9147
  "type": [
@@ -8586,10 +9348,246 @@
8586
9348
  ]
8587
9349
  },
8588
9350
  "finished_at": {
8589
- "type": [
8590
- "string",
8591
- "null"
8592
- ]
9351
+ "type": [
9352
+ "string",
9353
+ "null"
9354
+ ]
9355
+ },
9356
+ "harness": {
9357
+ "description": "Canonical harness id (e.g. `claude-code`).",
9358
+ "type": "string"
9359
+ },
9360
+ "harness_id": {
9361
+ "type": "string"
9362
+ },
9363
+ "history_id": {
9364
+ "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.",
9365
+ "type": "string",
9366
+ "maxLength": 36,
9367
+ "minLength": 36,
9368
+ "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}$"
9369
+ },
9370
+ "labels": {
9371
+ "description": "Caller-supplied metadata used to select related task-graph records.\nOmitted on the wire when empty for additive compatibility.",
9372
+ "$ref": "#/$defs/HistoryLabels"
9373
+ },
9374
+ "model": {
9375
+ "description": "The effective top-level model for the run, if any.",
9376
+ "type": [
9377
+ "string",
9378
+ "null"
9379
+ ]
9380
+ },
9381
+ "model_ms": {
9382
+ "type": "integer",
9383
+ "minimum": 0
9384
+ },
9385
+ "name": {
9386
+ "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.",
9387
+ "type": "string"
9388
+ },
9389
+ "observed_tool_ms": false,
9390
+ "permission_mode": {
9391
+ "description": "The normalized approval mode requested for the run.",
9392
+ "$ref": "#/$defs/PermissionMode"
9393
+ },
9394
+ "project": {
9395
+ "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.",
9396
+ "type": "string"
9397
+ },
9398
+ "prompt": {
9399
+ "description": "The prompt this harness run received (its own, on a batch run; else the\nrun's single prompt).",
9400
+ "type": "string"
9401
+ },
9402
+ "schema_version": {
9403
+ "type": "string",
9404
+ "enum": [
9405
+ "1.0",
9406
+ "1.1"
9407
+ ]
9408
+ },
9409
+ "session": {
9410
+ "description": "The oneharness session id this run belongs to (the history file's stem).",
9411
+ "type": "string"
9412
+ },
9413
+ "session_id": {
9414
+ "description": "The harness's own continuation id, when it exposed one; `null` otherwise.",
9415
+ "type": [
9416
+ "string",
9417
+ "null"
9418
+ ]
9419
+ },
9420
+ "started_at": {
9421
+ "type": "string",
9422
+ "minLength": 1
9423
+ },
9424
+ "status": {
9425
+ "$ref": "#/$defs/Status"
9426
+ },
9427
+ "text": {
9428
+ "description": "Best-effort final assistant text; `null` when extraction was impossible.",
9429
+ "type": [
9430
+ "string",
9431
+ "null"
9432
+ ]
9433
+ },
9434
+ "text_source": {
9435
+ "description": "How `text` was extracted; `null` when absent.",
9436
+ "type": [
9437
+ "string",
9438
+ "null"
9439
+ ]
9440
+ },
9441
+ "time_to_first_token_ms": {
9442
+ "type": [
9443
+ "integer",
9444
+ "null"
9445
+ ],
9446
+ "format": "uint128",
9447
+ "minimum": 0
9448
+ },
9449
+ "timestamp": {
9450
+ "description": "RFC3339 UTC instant the record was written (append time).",
9451
+ "type": "string"
9452
+ },
9453
+ "tool_ms": {
9454
+ "type": "integer",
9455
+ "minimum": 0
9456
+ },
9457
+ "usage": {
9458
+ "description": "Best-effort token/cost accounting (every field `null` when unreported).",
9459
+ "$ref": "#/$defs/Usage"
9460
+ },
9461
+ "variant": {
9462
+ "type": [
9463
+ "string",
9464
+ "null"
9465
+ ]
9466
+ }
9467
+ },
9468
+ "required": [
9469
+ "schema_version",
9470
+ "history_id",
9471
+ "session",
9472
+ "name",
9473
+ "project",
9474
+ "timestamp",
9475
+ "harness",
9476
+ "model",
9477
+ "prompt",
9478
+ "permission_mode",
9479
+ "status",
9480
+ "exit_code",
9481
+ "duration_ms",
9482
+ "finished_at",
9483
+ "text",
9484
+ "text_source",
9485
+ "usage",
9486
+ "session_id",
9487
+ "events",
9488
+ "failure_kind",
9489
+ "started_at",
9490
+ "model_ms",
9491
+ "tool_ms"
9492
+ ]
9493
+ },
9494
+ {
9495
+ "type": "object",
9496
+ "properties": {
9497
+ "duration_ms": {
9498
+ "type": [
9499
+ "integer",
9500
+ "null"
9501
+ ],
9502
+ "format": "uint128",
9503
+ "minimum": 0
9504
+ },
9505
+ "error": {
9506
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
9507
+ "type": [
9508
+ "string",
9509
+ "null"
9510
+ ],
9511
+ "maxLength": 2048,
9512
+ "minLength": 1
9513
+ },
9514
+ "events": {
9515
+ "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
9516
+ "type": [
9517
+ "array",
9518
+ "null"
9519
+ ],
9520
+ "items": {
9521
+ "type": "object",
9522
+ "properties": {
9523
+ "duration_ms": {
9524
+ "type": "null"
9525
+ },
9526
+ "finished_at": {
9527
+ "type": "null"
9528
+ },
9529
+ "index": {
9530
+ "type": "integer",
9531
+ "minimum": 0
9532
+ },
9533
+ "input": true,
9534
+ "kind": {
9535
+ "type": "string"
9536
+ },
9537
+ "name": {
9538
+ "type": [
9539
+ "string",
9540
+ "null"
9541
+ ]
9542
+ },
9543
+ "output": {
9544
+ "type": [
9545
+ "string",
9546
+ "null"
9547
+ ]
9548
+ },
9549
+ "started_at": {
9550
+ "type": "null"
9551
+ },
9552
+ "status": {
9553
+ "type": "null"
9554
+ },
9555
+ "tool_call_id": {
9556
+ "type": [
9557
+ "string",
9558
+ "null"
9559
+ ]
9560
+ }
9561
+ },
9562
+ "required": [
9563
+ "kind",
9564
+ "name",
9565
+ "input",
9566
+ "output",
9567
+ "index"
9568
+ ]
9569
+ }
9570
+ },
9571
+ "exit_code": {
9572
+ "type": [
9573
+ "integer",
9574
+ "null"
9575
+ ],
9576
+ "format": "int32"
9577
+ },
9578
+ "failure_kind": {
9579
+ "description": "Best-effort classified failure reason (see [`FailureKind`]); `null` when\nunclassified.",
9580
+ "anyOf": [
9581
+ {
9582
+ "$ref": "#/$defs/FailureKind"
9583
+ },
9584
+ {
9585
+ "type": "null"
9586
+ }
9587
+ ]
9588
+ },
9589
+ "finished_at": {
9590
+ "type": "null"
8593
9591
  },
8594
9592
  "harness": {
8595
9593
  "description": "Canonical harness id (e.g. `claude-code`).",
@@ -8616,10 +9614,7 @@
8616
9614
  "null"
8617
9615
  ]
8618
9616
  },
8619
- "model_ms": {
8620
- "type": "integer",
8621
- "minimum": 0
8622
- },
9617
+ "model_ms": false,
8623
9618
  "name": {
8624
9619
  "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.",
8625
9620
  "type": "string"
@@ -8639,7 +9634,10 @@
8639
9634
  },
8640
9635
  "schema_version": {
8641
9636
  "type": "string",
8642
- "const": "1.1"
9637
+ "enum": [
9638
+ "1.2",
9639
+ "1.3"
9640
+ ]
8643
9641
  },
8644
9642
  "session": {
8645
9643
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -8652,12 +9650,13 @@
8652
9650
  "null"
8653
9651
  ]
8654
9652
  },
8655
- "started_at": {
8656
- "type": "string",
8657
- "minLength": 1
8658
- },
9653
+ "started_at": false,
8659
9654
  "status": {
8660
- "$ref": "#/$defs/Status"
9655
+ "type": "string",
9656
+ "enum": [
9657
+ "ok",
9658
+ "planned"
9659
+ ]
8661
9660
  },
8662
9661
  "text": {
8663
9662
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -8673,22 +9672,12 @@
8673
9672
  "null"
8674
9673
  ]
8675
9674
  },
8676
- "time_to_first_token_ms": {
8677
- "type": [
8678
- "integer",
8679
- "null"
8680
- ],
8681
- "format": "uint128",
8682
- "minimum": 0
8683
- },
9675
+ "time_to_first_token_ms": false,
8684
9676
  "timestamp": {
8685
9677
  "description": "RFC3339 UTC instant the record was written (append time).",
8686
9678
  "type": "string"
8687
9679
  },
8688
- "tool_ms": {
8689
- "type": "integer",
8690
- "minimum": 0
8691
- },
9680
+ "tool_ms": false,
8692
9681
  "usage": {
8693
9682
  "description": "Best-effort token/cost accounting (every field `null` when unreported).",
8694
9683
  "$ref": "#/$defs/Usage"
@@ -8701,223 +9690,53 @@
8701
9690
  }
8702
9691
  },
8703
9692
  "required": [
8704
- "schema_version",
8705
- "history_id",
8706
- "session",
8707
- "name",
8708
- "project",
8709
- "timestamp",
8710
- "harness",
8711
- "model",
8712
- "prompt",
8713
- "permission_mode",
8714
- "status",
8715
- "exit_code",
8716
- "duration_ms",
8717
- "finished_at",
8718
- "text",
8719
- "text_source",
8720
- "usage",
8721
- "session_id",
8722
- "events",
8723
- "failure_kind",
8724
- "started_at",
8725
- "model_ms",
8726
- "tool_ms"
8727
- ]
8728
- },
8729
- {
8730
- "type": "object",
8731
- "properties": {
8732
- "duration_ms": {
8733
- "type": "integer",
8734
- "minimum": 0
8735
- },
8736
- "events": {
8737
- "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
8738
- "type": [
8739
- "array",
8740
- "null"
8741
- ],
8742
- "items": {
8743
- "allOf": [
8744
- {
8745
- "oneOf": [
8746
- {
8747
- "allOf": [
8748
- {
8749
- "$ref": "#/$defs/ActionEvent"
8750
- },
8751
- {
8752
- "type": "object",
8753
- "properties": {
8754
- "duration_ms": {
8755
- "type": "integer",
8756
- "minimum": 0
8757
- },
8758
- "finished_at": {
8759
- "type": "string"
8760
- },
8761
- "kind": {
8762
- "type": "string",
8763
- "const": "tool_call"
8764
- },
8765
- "started_at": {
8766
- "type": "string"
8767
- },
8768
- "status": {
8769
- "type": "string",
8770
- "const": "completed"
8771
- },
8772
- "tool_call_id": {
8773
- "type": "string",
8774
- "minLength": 1
8775
- }
8776
- },
8777
- "required": [
8778
- "kind",
8779
- "tool_call_id",
8780
- "started_at",
8781
- "status",
8782
- "finished_at",
8783
- "duration_ms"
8784
- ]
8785
- }
8786
- ]
8787
- },
8788
- {
8789
- "allOf": [
8790
- {
8791
- "$ref": "#/$defs/ActionEvent"
8792
- },
8793
- {
8794
- "type": "object",
8795
- "properties": {
8796
- "duration_ms": {
8797
- "type": "integer",
8798
- "minimum": 0
8799
- },
8800
- "finished_at": {
8801
- "type": "string"
8802
- },
8803
- "kind": {
8804
- "type": "string",
8805
- "const": "tool_call"
8806
- },
8807
- "started_at": {
8808
- "type": "string"
8809
- },
8810
- "status": {
8811
- "type": "string",
8812
- "const": "failed"
8813
- },
8814
- "tool_call_id": {
8815
- "type": "string",
8816
- "minLength": 1
8817
- }
8818
- },
8819
- "required": [
8820
- "kind",
8821
- "tool_call_id",
8822
- "started_at",
8823
- "status",
8824
- "finished_at",
8825
- "duration_ms"
8826
- ]
8827
- }
8828
- ]
8829
- },
8830
- {
8831
- "allOf": [
8832
- {
8833
- "$ref": "#/$defs/ActionEvent"
8834
- },
8835
- {
8836
- "type": "object",
8837
- "properties": {
8838
- "kind": {
8839
- "type": "string",
8840
- "const": "tool_call"
8841
- },
8842
- "started_at": {
8843
- "type": "string"
8844
- },
8845
- "status": {
8846
- "type": "string",
8847
- "const": "timeout"
8848
- },
8849
- "tool_call_id": {
8850
- "type": "string",
8851
- "minLength": 1
8852
- }
8853
- },
8854
- "required": [
8855
- "kind",
8856
- "tool_call_id",
8857
- "started_at",
8858
- "status"
8859
- ]
8860
- }
8861
- ]
8862
- },
8863
- {
8864
- "allOf": [
8865
- {
8866
- "$ref": "#/$defs/ActionEvent"
8867
- },
8868
- {
8869
- "type": "object",
8870
- "properties": {
8871
- "kind": {
8872
- "type": "string",
8873
- "const": "tool_call"
8874
- },
8875
- "started_at": {
8876
- "type": "string"
8877
- },
8878
- "status": {
8879
- "type": "string",
8880
- "const": "interrupted"
8881
- },
8882
- "tool_call_id": {
8883
- "type": "string",
8884
- "minLength": 1
8885
- }
8886
- },
8887
- "required": [
8888
- "kind",
8889
- "tool_call_id",
8890
- "started_at",
8891
- "status"
8892
- ]
8893
- }
8894
- ]
8895
- },
8896
- {
8897
- "allOf": [
8898
- {
8899
- "$ref": "#/$defs/ActionEvent"
8900
- },
8901
- {
8902
- "type": "object",
8903
- "properties": {
8904
- "kind": {
8905
- "type": "string",
8906
- "const": "tool_result"
8907
- }
8908
- }
8909
- }
8910
- ]
8911
- }
8912
- ]
8913
- },
8914
- {
8915
- "type": "object",
8916
- "properties": {
8917
- "timing_source": false
8918
- }
8919
- }
8920
- ]
9693
+ "schema_version",
9694
+ "history_id",
9695
+ "session",
9696
+ "name",
9697
+ "project",
9698
+ "timestamp",
9699
+ "harness",
9700
+ "model",
9701
+ "prompt",
9702
+ "permission_mode",
9703
+ "status",
9704
+ "exit_code",
9705
+ "duration_ms",
9706
+ "finished_at",
9707
+ "text",
9708
+ "text_source",
9709
+ "usage",
9710
+ "session_id",
9711
+ "events",
9712
+ "failure_kind",
9713
+ "harness_id"
9714
+ ]
9715
+ },
9716
+ {
9717
+ "type": "object",
9718
+ "properties": {
9719
+ "duration_ms": {
9720
+ "type": "integer",
9721
+ "minimum": 0
9722
+ },
9723
+ "error": {
9724
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
9725
+ "type": [
9726
+ "string",
9727
+ "null"
9728
+ ],
9729
+ "maxLength": 2048,
9730
+ "minLength": 1
9731
+ },
9732
+ "events": {
9733
+ "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
9734
+ "type": [
9735
+ "array",
9736
+ "null"
9737
+ ],
9738
+ "items": {
9739
+ "$ref": "#/$defs/ActionEvent"
8921
9740
  }
8922
9741
  },
8923
9742
  "exit_code": {
@@ -8939,10 +9758,7 @@
8939
9758
  ]
8940
9759
  },
8941
9760
  "finished_at": {
8942
- "type": [
8943
- "string",
8944
- "null"
8945
- ]
9761
+ "type": "null"
8946
9762
  },
8947
9763
  "harness": {
8948
9764
  "description": "Canonical harness id (e.g. `claude-code`).",
@@ -8969,15 +9785,15 @@
8969
9785
  "null"
8970
9786
  ]
8971
9787
  },
8972
- "model_ms": {
8973
- "type": "integer",
8974
- "minimum": 0
8975
- },
9788
+ "model_ms": false,
8976
9789
  "name": {
8977
9790
  "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.",
8978
9791
  "type": "string"
8979
9792
  },
8980
- "observed_tool_ms": false,
9793
+ "observed_tool_ms": {
9794
+ "type": "integer",
9795
+ "minimum": 0
9796
+ },
8981
9797
  "permission_mode": {
8982
9798
  "description": "The normalized approval mode requested for the run.",
8983
9799
  "$ref": "#/$defs/PermissionMode"
@@ -8992,7 +9808,10 @@
8992
9808
  },
8993
9809
  "schema_version": {
8994
9810
  "type": "string",
8995
- "const": "1.0"
9811
+ "enum": [
9812
+ "1.2",
9813
+ "1.3"
9814
+ ]
8996
9815
  },
8997
9816
  "session": {
8998
9817
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -9005,10 +9824,7 @@
9005
9824
  "null"
9006
9825
  ]
9007
9826
  },
9008
- "started_at": {
9009
- "type": "string",
9010
- "minLength": 1
9011
- },
9827
+ "started_at": false,
9012
9828
  "status": {
9013
9829
  "$ref": "#/$defs/Status"
9014
9830
  },
@@ -9026,22 +9842,12 @@
9026
9842
  "null"
9027
9843
  ]
9028
9844
  },
9029
- "time_to_first_token_ms": {
9030
- "type": [
9031
- "integer",
9032
- "null"
9033
- ],
9034
- "format": "uint128",
9035
- "minimum": 0
9036
- },
9845
+ "time_to_first_token_ms": false,
9037
9846
  "timestamp": {
9038
9847
  "description": "RFC3339 UTC instant the record was written (append time).",
9039
9848
  "type": "string"
9040
9849
  },
9041
- "tool_ms": {
9042
- "type": "integer",
9043
- "minimum": 0
9044
- },
9850
+ "tool_ms": false,
9045
9851
  "usage": {
9046
9852
  "description": "Best-effort token/cost accounting (every field `null` when unreported).",
9047
9853
  "$ref": "#/$defs/Usage"
@@ -9074,9 +9880,8 @@
9074
9880
  "session_id",
9075
9881
  "events",
9076
9882
  "failure_kind",
9077
- "started_at",
9078
- "model_ms",
9079
- "tool_ms"
9883
+ "harness_id",
9884
+ "observed_tool_ms"
9080
9885
  ]
9081
9886
  },
9082
9887
  {
@@ -9090,6 +9895,15 @@
9090
9895
  "format": "uint128",
9091
9896
  "minimum": 0
9092
9897
  },
9898
+ "error": {
9899
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
9900
+ "type": [
9901
+ "string",
9902
+ "null"
9903
+ ],
9904
+ "maxLength": 2048,
9905
+ "minLength": 1
9906
+ },
9093
9907
  "events": {
9094
9908
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
9095
9909
  "type": [
@@ -9097,54 +9911,7 @@
9097
9911
  "null"
9098
9912
  ],
9099
9913
  "items": {
9100
- "type": "object",
9101
- "properties": {
9102
- "duration_ms": {
9103
- "type": "null"
9104
- },
9105
- "finished_at": {
9106
- "type": "null"
9107
- },
9108
- "index": {
9109
- "type": "integer",
9110
- "minimum": 0
9111
- },
9112
- "input": true,
9113
- "kind": {
9114
- "type": "string"
9115
- },
9116
- "name": {
9117
- "type": [
9118
- "string",
9119
- "null"
9120
- ]
9121
- },
9122
- "output": {
9123
- "type": [
9124
- "string",
9125
- "null"
9126
- ]
9127
- },
9128
- "started_at": {
9129
- "type": "null"
9130
- },
9131
- "status": {
9132
- "type": "null"
9133
- },
9134
- "tool_call_id": {
9135
- "type": [
9136
- "string",
9137
- "null"
9138
- ]
9139
- }
9140
- },
9141
- "required": [
9142
- "kind",
9143
- "name",
9144
- "input",
9145
- "output",
9146
- "index"
9147
- ]
9914
+ "$ref": "#/$defs/ActionEvent"
9148
9915
  }
9149
9916
  },
9150
9917
  "exit_code": {
@@ -9213,7 +9980,10 @@
9213
9980
  },
9214
9981
  "schema_version": {
9215
9982
  "type": "string",
9216
- "const": "1.2"
9983
+ "enum": [
9984
+ "1.2",
9985
+ "1.3"
9986
+ ]
9217
9987
  },
9218
9988
  "session": {
9219
9989
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -9228,7 +9998,13 @@
9228
9998
  },
9229
9999
  "started_at": false,
9230
10000
  "status": {
9231
- "$ref": "#/$defs/Status"
10001
+ "type": "string",
10002
+ "enum": [
10003
+ "nonzero",
10004
+ "timeout",
10005
+ "spawn-error",
10006
+ "skipped"
10007
+ ]
9232
10008
  },
9233
10009
  "text": {
9234
10010
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -9292,6 +10068,15 @@
9292
10068
  "type": "integer",
9293
10069
  "minimum": 0
9294
10070
  },
10071
+ "error": {
10072
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
10073
+ "type": [
10074
+ "string",
10075
+ "null"
10076
+ ],
10077
+ "maxLength": 2048,
10078
+ "minLength": 1
10079
+ },
9295
10080
  "events": {
9296
10081
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
9297
10082
  "type": [
@@ -9353,10 +10138,7 @@
9353
10138
  "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.",
9354
10139
  "type": "string"
9355
10140
  },
9356
- "observed_tool_ms": {
9357
- "type": "integer",
9358
- "minimum": 0
9359
- },
10141
+ "observed_tool_ms": false,
9360
10142
  "permission_mode": {
9361
10143
  "description": "The normalized approval mode requested for the run.",
9362
10144
  "$ref": "#/$defs/PermissionMode"
@@ -9371,7 +10153,9 @@
9371
10153
  },
9372
10154
  "schema_version": {
9373
10155
  "type": "string",
9374
- "const": "1.2"
10156
+ "enum": [
10157
+ "1.3"
10158
+ ]
9375
10159
  },
9376
10160
  "session": {
9377
10161
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -9384,9 +10168,18 @@
9384
10168
  "null"
9385
10169
  ]
9386
10170
  },
9387
- "started_at": false,
10171
+ "started_at": {
10172
+ "type": "string",
10173
+ "minLength": 1
10174
+ },
9388
10175
  "status": {
9389
- "$ref": "#/$defs/Status"
10176
+ "type": "string",
10177
+ "enum": [
10178
+ "nonzero",
10179
+ "timeout",
10180
+ "spawn-error",
10181
+ "skipped"
10182
+ ]
9390
10183
  },
9391
10184
  "text": {
9392
10185
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -9402,7 +10195,13 @@
9402
10195
  "null"
9403
10196
  ]
9404
10197
  },
9405
- "time_to_first_token_ms": false,
10198
+ "time_to_first_token_ms": {
10199
+ "type": [
10200
+ "integer",
10201
+ "null"
10202
+ ],
10203
+ "minimum": 0
10204
+ },
9406
10205
  "timestamp": {
9407
10206
  "description": "RFC3339 UTC instant the record was written (append time).",
9408
10207
  "type": "string"
@@ -9441,7 +10240,7 @@
9441
10240
  "events",
9442
10241
  "failure_kind",
9443
10242
  "harness_id",
9444
- "observed_tool_ms"
10243
+ "started_at"
9445
10244
  ]
9446
10245
  },
9447
10246
  {
@@ -9455,6 +10254,15 @@
9455
10254
  "format": "uint128",
9456
10255
  "minimum": 0
9457
10256
  },
10257
+ "error": {
10258
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
10259
+ "type": [
10260
+ "string",
10261
+ "null"
10262
+ ],
10263
+ "maxLength": 2048,
10264
+ "minLength": 1
10265
+ },
9458
10266
  "events": {
9459
10267
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
9460
10268
  "type": [
@@ -9464,54 +10272,7 @@
9464
10272
  "items": {
9465
10273
  "allOf": [
9466
10274
  {
9467
- "type": "object",
9468
- "properties": {
9469
- "duration_ms": {
9470
- "type": "null"
9471
- },
9472
- "finished_at": {
9473
- "type": "null"
9474
- },
9475
- "index": {
9476
- "type": "integer",
9477
- "minimum": 0
9478
- },
9479
- "input": true,
9480
- "kind": {
9481
- "type": "string"
9482
- },
9483
- "name": {
9484
- "type": [
9485
- "string",
9486
- "null"
9487
- ]
9488
- },
9489
- "output": {
9490
- "type": [
9491
- "string",
9492
- "null"
9493
- ]
9494
- },
9495
- "started_at": {
9496
- "type": "null"
9497
- },
9498
- "status": {
9499
- "type": "null"
9500
- },
9501
- "tool_call_id": {
9502
- "type": [
9503
- "string",
9504
- "null"
9505
- ]
9506
- }
9507
- },
9508
- "required": [
9509
- "kind",
9510
- "name",
9511
- "input",
9512
- "output",
9513
- "index"
9514
- ]
10275
+ "$ref": "#/$defs/ActionEvent"
9515
10276
  },
9516
10277
  {
9517
10278
  "type": "object",
@@ -9588,7 +10349,10 @@
9588
10349
  },
9589
10350
  "schema_version": {
9590
10351
  "type": "string",
9591
- "const": "1.1"
10352
+ "enum": [
10353
+ "1.0",
10354
+ "1.1"
10355
+ ]
9592
10356
  },
9593
10357
  "session": {
9594
10358
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -9603,7 +10367,13 @@
9603
10367
  },
9604
10368
  "started_at": false,
9605
10369
  "status": {
9606
- "$ref": "#/$defs/Status"
10370
+ "type": "string",
10371
+ "enum": [
10372
+ "nonzero",
10373
+ "timeout",
10374
+ "spawn-error",
10375
+ "skipped"
10376
+ ]
9607
10377
  },
9608
10378
  "text": {
9609
10379
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -9670,6 +10440,15 @@
9670
10440
  "format": "uint128",
9671
10441
  "minimum": 0
9672
10442
  },
10443
+ "error": {
10444
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
10445
+ "type": [
10446
+ "string",
10447
+ "null"
10448
+ ],
10449
+ "maxLength": 2048,
10450
+ "minLength": 1
10451
+ },
9673
10452
  "events": {
9674
10453
  "description": "Best-effort normalized tool-call events; `null` when the harness exposes\nno machine-readable trace.",
9675
10454
  "type": [
@@ -9803,7 +10582,10 @@
9803
10582
  },
9804
10583
  "schema_version": {
9805
10584
  "type": "string",
9806
- "const": "1.0"
10585
+ "enum": [
10586
+ "1.0",
10587
+ "1.1"
10588
+ ]
9807
10589
  },
9808
10590
  "session": {
9809
10591
  "description": "The oneharness session id this run belongs to (the history file's stem).",
@@ -9818,7 +10600,11 @@
9818
10600
  },
9819
10601
  "started_at": false,
9820
10602
  "status": {
9821
- "$ref": "#/$defs/Status"
10603
+ "type": "string",
10604
+ "enum": [
10605
+ "ok",
10606
+ "planned"
10607
+ ]
9822
10608
  },
9823
10609
  "text": {
9824
10610
  "description": "Best-effort final assistant text; `null` when extraction was impossible.",
@@ -9885,6 +10671,15 @@
9885
10671
  "format": "uint128",
9886
10672
  "minimum": 0
9887
10673
  },
10674
+ "error": {
10675
+ "description": "Best-effort normalized failure text for a run that did not succeed: the\nharness's own diagnostic as oneharness captured it on stderr, or\noneharness's own message when it generated one (a spawn failure, a\ntimeout, a binary that is not installed). This is the *only* place a\nrecord quotes the process's own bytes, and it is deliberately narrow —\ntrimmed, bounded to [`ERROR_MAX`] characters, and written only for a run\nthat failed. `failure_kind` says what class of failure it was; this says\nwhat the harness actually reported, which is what an operator reads when\nthe class is unclassified. Never derived from stdout, so it can never\nstand in for provider output the run did not produce. Omitted on the wire\nwhen absent, and gated to [`FIRST_ERROR_SCHEMA_VERSION`].",
10676
+ "type": [
10677
+ "string",
10678
+ "null"
10679
+ ],
10680
+ "maxLength": 2048,
10681
+ "minLength": 1
10682
+ },
9888
10683
  "events": {
9889
10684
  "type": [
9890
10685
  "array",
@@ -10162,7 +10957,7 @@
10162
10957
  "const": "spawn-error"
10163
10958
  },
10164
10959
  {
10165
- "description": "The binary was not found, so the harness was not run.",
10960
+ "description": "The harness was not run. Either the binary was not found (`available:\nfalse`), or it was found but the identity the selection points at is not\nprovisioned — an `env_from` home directory that is not on disk, reported\nas `available: true` with `failure_kind: \"auth\"`.",
10166
10961
  "type": "string",
10167
10962
  "const": "skipped"
10168
10963
  },