@claudexor/schema 3.0.4 → 3.1.1

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.
Files changed (146) hide show
  1. package/dist/agent-capabilities.d.ts +45 -8
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +14 -0
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +384 -18
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +20 -1
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/budget.d.ts +84 -9
  10. package/dist/budget.d.ts.map +1 -1
  11. package/dist/budget.js +46 -0
  12. package/dist/budget.js.map +1 -1
  13. package/dist/config.d.ts +97 -65
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +12 -1
  16. package/dist/config.js.map +1 -1
  17. package/dist/control-operation-responses.d.ts +311 -89
  18. package/dist/control-operation-responses.d.ts.map +1 -1
  19. package/dist/control-operation-responses.js +33 -3
  20. package/dist/control-operation-responses.js.map +1 -1
  21. package/dist/control-run-detail.d.ts +613 -163
  22. package/dist/control-run-detail.d.ts.map +1 -1
  23. package/dist/control-run-detail.js +28 -2
  24. package/dist/control-run-detail.js.map +1 -1
  25. package/dist/control-run-retry.d.ts +1 -1
  26. package/dist/control-run-scope.d.ts +1 -1
  27. package/dist/control-thread-apply.d.ts +10 -0
  28. package/dist/control-thread-apply.d.ts.map +1 -1
  29. package/dist/control.d.ts +791 -232
  30. package/dist/control.d.ts.map +1 -1
  31. package/dist/control.js +76 -2
  32. package/dist/control.js.map +1 -1
  33. package/dist/decision.d.ts +205 -9
  34. package/dist/decision.d.ts.map +1 -1
  35. package/dist/decision.js +69 -1
  36. package/dist/decision.js.map +1 -1
  37. package/dist/deep-scan.d.ts +27 -0
  38. package/dist/deep-scan.d.ts.map +1 -0
  39. package/dist/deep-scan.js +27 -0
  40. package/dist/deep-scan.js.map +1 -0
  41. package/dist/delivery.d.ts +13 -0
  42. package/dist/delivery.d.ts.map +1 -1
  43. package/dist/delivery.js +15 -0
  44. package/dist/delivery.js.map +1 -1
  45. package/dist/effort.d.ts +132 -0
  46. package/dist/effort.d.ts.map +1 -0
  47. package/dist/effort.js +167 -0
  48. package/dist/effort.js.map +1 -0
  49. package/dist/events.d.ts +59 -4
  50. package/dist/events.d.ts.map +1 -1
  51. package/dist/events.js +91 -0
  52. package/dist/events.js.map +1 -1
  53. package/dist/gate.d.ts +2 -2
  54. package/dist/harness.d.ts +209 -28
  55. package/dist/harness.d.ts.map +1 -1
  56. package/dist/harness.js +107 -14
  57. package/dist/harness.js.map +1 -1
  58. package/dist/index.d.ts +4 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +4 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/operation.d.ts +193 -10
  63. package/dist/operation.d.ts.map +1 -1
  64. package/dist/operation.js +45 -0
  65. package/dist/operation.js.map +1 -1
  66. package/dist/output-schema-dialect.d.ts +22 -0
  67. package/dist/output-schema-dialect.d.ts.map +1 -0
  68. package/dist/output-schema-dialect.js +37 -0
  69. package/dist/output-schema-dialect.js.map +1 -0
  70. package/dist/output-schema.d.ts +26 -2
  71. package/dist/output-schema.d.ts.map +1 -1
  72. package/dist/output-schema.js +313 -16
  73. package/dist/output-schema.js.map +1 -1
  74. package/dist/plan.d.ts +2 -2
  75. package/dist/problem.d.ts +3 -3
  76. package/dist/project.d.ts +47 -12
  77. package/dist/project.d.ts.map +1 -1
  78. package/dist/project.js +32 -0
  79. package/dist/project.js.map +1 -1
  80. package/dist/readiness.d.ts +62 -7
  81. package/dist/readiness.d.ts.map +1 -1
  82. package/dist/recovery.d.ts +14 -14
  83. package/dist/review.d.ts +7 -7
  84. package/dist/route.d.ts +2 -2
  85. package/dist/setup.d.ts +288 -94
  86. package/dist/setup.d.ts.map +1 -1
  87. package/dist/setup.js +90 -6
  88. package/dist/setup.js.map +1 -1
  89. package/dist/status-projection.d.ts +79 -4
  90. package/dist/status-projection.d.ts.map +1 -1
  91. package/dist/status-projection.js +161 -4
  92. package/dist/status-projection.js.map +1 -1
  93. package/dist/task.d.ts +70 -53
  94. package/dist/task.d.ts.map +1 -1
  95. package/dist/task.js +18 -8
  96. package/dist/task.js.map +1 -1
  97. package/dist/telemetry.d.ts +795 -32
  98. package/dist/telemetry.d.ts.map +1 -1
  99. package/dist/telemetry.js +177 -4
  100. package/dist/telemetry.js.map +1 -1
  101. package/dist/tool-ref.d.ts +14 -0
  102. package/dist/tool-ref.d.ts.map +1 -1
  103. package/dist/tool-ref.js +15 -0
  104. package/dist/tool-ref.js.map +1 -1
  105. package/dist/work-report.d.ts +131 -0
  106. package/dist/work-report.d.ts.map +1 -0
  107. package/dist/work-report.js +124 -0
  108. package/dist/work-report.js.map +1 -0
  109. package/dist/workspace.d.ts +2 -2
  110. package/generated/AgentCapabilityCatalog.schema.json +39 -8
  111. package/generated/ControlApplyCheckResponse.schema.json +5 -0
  112. package/generated/ControlDeliveryResponse.schema.json +14 -0
  113. package/generated/ControlHarnessListResponse.schema.json +64 -9
  114. package/generated/ControlHarnessSettingsPatch.schema.json +4 -8
  115. package/generated/ControlOperationCatalog.schema.json +74 -0
  116. package/generated/ControlOperationDescriptor.schema.json +74 -0
  117. package/generated/ControlOperationParameter.schema.json +75 -0
  118. package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
  119. package/generated/ControlRunAgainDraft.schema.json +14 -7
  120. package/generated/ControlRunDetail.schema.json +406 -16
  121. package/generated/ControlRunListResponse.schema.json +232 -10
  122. package/generated/ControlRunStartRequest.schema.json +14 -7
  123. package/generated/ControlRunSummary.schema.json +218 -9
  124. package/generated/ControlSettingsSnapshot.schema.json +4 -8
  125. package/generated/ControlSettingsUpdateRequest.schema.json +4 -8
  126. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  127. package/generated/ControlSetupJobEvent.schema.json +28 -0
  128. package/generated/ControlSetupJobSnapshot.schema.json +28 -0
  129. package/generated/ControlThreadApplyResponse.schema.json +14 -0
  130. package/generated/ControlThreadDetail.schema.json +94 -1
  131. package/generated/ControlThreadTurnRequest.schema.json +14 -7
  132. package/generated/DecisionRecord.schema.json +178 -2
  133. package/generated/GlobalConfig.schema.json +4 -8
  134. package/generated/HarnessEvent.schema.json +79 -1
  135. package/generated/HarnessManifest.schema.json +64 -9
  136. package/generated/HarnessStatusDto.schema.json +64 -9
  137. package/generated/McpRunHandleResult.schema.json +286 -1
  138. package/generated/McpRunToolResult.schema.json +171 -1
  139. package/generated/ProjectConfig.schema.json +26 -0
  140. package/generated/RoutePoolDegradedPayload.schema.json +79 -0
  141. package/generated/RunEvent.schema.json +8 -1
  142. package/generated/RunFailure.schema.json +23 -1
  143. package/generated/RunTelemetry.schema.json +376 -1
  144. package/generated/StructuredOutputConformance.schema.json +83 -0
  145. package/generated/TaskContract.schema.json +13 -1
  146. package/package.json +2 -2
@@ -59,6 +59,7 @@
59
59
  "auth",
60
60
  "harness_unavailable",
61
61
  "harness_error",
62
+ "config_error",
62
63
  "budget",
63
64
  "policy",
64
65
  "cancelled",
@@ -66,7 +67,28 @@
66
67
  "unknown"
67
68
  ],
68
69
  "default": "unknown",
69
- "description": "Typed failure category (validation, project, auth, harness, budget, policy, cancelled, internal, unknown)."
70
+ "description": "Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness."
71
+ },
72
+ "code": {
73
+ "anyOf": [
74
+ {
75
+ "type": "string",
76
+ "enum": [
77
+ "finite_zero",
78
+ "hard_cap",
79
+ "estimate_headroom",
80
+ "unknown_paid_in_flight",
81
+ "budget_overshoot",
82
+ "cost_unverifiable"
83
+ ],
84
+ "description": "Machine-readable failure sub-code within a RunFailure category (today the typed budget-denial reasons produced by the budget ledger)."
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ],
90
+ "description": "Machine-readable failure sub-code within the category (today the typed budget-denial reason from the ledger); null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage.",
91
+ "default": null
70
92
  },
71
93
  "harnessId": {
72
94
  "type": [
@@ -258,13 +280,9 @@
258
280
  },
259
281
  "effort": {
260
282
  "type": "string",
261
- "enum": [
262
- "low",
263
- "medium",
264
- "high",
265
- "xhigh",
266
- "max"
267
- ],
283
+ "minLength": 1,
284
+ "maxLength": 32,
285
+ "pattern": "^[a-z0-9]+(?:[_-][a-z0-9]+)*$",
268
286
  "description": "Per-reviewer effort hint, passed to that harness only."
269
287
  }
270
288
  },
@@ -882,7 +900,11 @@
882
900
  "stuck_no_progress",
883
901
  "wall_clock_exceeded",
884
902
  "user_cancelled",
885
- "crash_interrupted"
903
+ "crash_interrupted",
904
+ "input_required",
905
+ "work_incomplete",
906
+ "context_capacity_exhausted",
907
+ "work_report_contract"
886
908
  ],
887
909
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success."
888
910
  },
@@ -892,6 +914,82 @@
892
914
  ],
893
915
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success.",
894
916
  "default": null
917
+ },
918
+ "work_state": {
919
+ "type": "object",
920
+ "properties": {
921
+ "state": {
922
+ "type": "string",
923
+ "enum": [
924
+ "completed",
925
+ "needs_input",
926
+ "incomplete",
927
+ "unverified"
928
+ ],
929
+ "description": "Folded work state: the WorkReport state, or unverified when no report was obtainable (transport unsupported / lane gated)."
930
+ },
931
+ "source": {
932
+ "type": "string",
933
+ "enum": [
934
+ "constrained",
935
+ "validated",
936
+ "absent"
937
+ ],
938
+ "description": "Provenance of a WorkReport: constrained (native schema transport), validated (whole-answer JSON), or absent (no transport could carry one — a disclosed absence, not a failure)."
939
+ },
940
+ "required_inputs": {
941
+ "type": "array",
942
+ "items": {
943
+ "type": "object",
944
+ "properties": {
945
+ "kind": {
946
+ "type": "string",
947
+ "enum": [
948
+ "file",
949
+ "context",
950
+ "credential",
951
+ "permission",
952
+ "decision",
953
+ "external_dependency"
954
+ ],
955
+ "description": "Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency."
956
+ },
957
+ "locator": {
958
+ "anyOf": [
959
+ {
960
+ "type": "string",
961
+ "maxLength": 512
962
+ },
963
+ {
964
+ "type": "null"
965
+ }
966
+ ],
967
+ "default": null,
968
+ "description": "Concrete pointer to the missing thing (path/url/name); null when unnameable."
969
+ },
970
+ "description": {
971
+ "type": "string",
972
+ "maxLength": 1024,
973
+ "description": "Human-readable description of what is needed and why."
974
+ }
975
+ },
976
+ "required": [
977
+ "kind",
978
+ "description"
979
+ ],
980
+ "additionalProperties": false,
981
+ "description": "One blocking input a needs_input/incomplete WorkReport lists."
982
+ },
983
+ "maxItems": 16,
984
+ "description": "Carried through from a needs_input/incomplete WorkReport for honest disclosure."
985
+ }
986
+ },
987
+ "required": [
988
+ "state",
989
+ "source"
990
+ ],
991
+ "additionalProperties": false,
992
+ "description": "D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport."
895
993
  }
896
994
  },
897
995
  "required": [
@@ -957,6 +1055,117 @@
957
1055
  "description": "Route evidence from telemetry; null when no telemetry exists (legacy runs).",
958
1056
  "default": null
959
1057
  },
1058
+ "routingRationale": {
1059
+ "anyOf": [
1060
+ {
1061
+ "type": "object",
1062
+ "properties": {
1063
+ "goal": {
1064
+ "$ref": "#/definitions/ControlRunListResponse/properties/runs/items/properties/routingGoal"
1065
+ },
1066
+ "paid_fallback": {
1067
+ "type": "string",
1068
+ "enum": [
1069
+ "never",
1070
+ "when_unavailable",
1071
+ "allowed_within_cap"
1072
+ ],
1073
+ "description": "When a route with incremental paid spend may be used."
1074
+ },
1075
+ "order": {
1076
+ "type": "array",
1077
+ "items": {
1078
+ "type": "string",
1079
+ "minLength": 1,
1080
+ "description": "Non-empty identifier string."
1081
+ },
1082
+ "default": [],
1083
+ "description": "Final ranked order, harness ids."
1084
+ },
1085
+ "dropped": {
1086
+ "type": "array",
1087
+ "items": {
1088
+ "$ref": "#/definitions/ControlRunListResponse/properties/runs/items/properties/routingRationale/anyOf/0/properties/order/items"
1089
+ },
1090
+ "default": [],
1091
+ "description": "Ids removed by paid_fallback or cooldown before ranking."
1092
+ },
1093
+ "reason": {
1094
+ "type": "string",
1095
+ "enum": [
1096
+ "subscription_entitlement_first",
1097
+ "lowest_incremental_cash",
1098
+ "quality_tier",
1099
+ "expiring_quota_slack",
1100
+ "all_incremental_cash_unknown",
1101
+ "declared_order"
1102
+ ],
1103
+ "description": "Typed decisive reason the pool ranked the way it did (QA-034)."
1104
+ },
1105
+ "entries": {
1106
+ "type": "array",
1107
+ "items": {
1108
+ "type": "object",
1109
+ "properties": {
1110
+ "harness_id": {
1111
+ "type": "string",
1112
+ "minLength": 1,
1113
+ "description": "Candidate harness id."
1114
+ },
1115
+ "billing_knowledge": {
1116
+ "type": "string",
1117
+ "enum": [
1118
+ "proven_zero",
1119
+ "subscription_entitlement",
1120
+ "metered",
1121
+ "unknown"
1122
+ ],
1123
+ "description": "Effective billing knowledge used to rank it."
1124
+ },
1125
+ "incremental_cost_usd": {
1126
+ "anyOf": [
1127
+ {
1128
+ "type": "number",
1129
+ "minimum": 0
1130
+ },
1131
+ {
1132
+ "type": "null"
1133
+ }
1134
+ ],
1135
+ "default": null,
1136
+ "description": "Known incremental cash cost, when any; null when unknown."
1137
+ },
1138
+ "eligible": {
1139
+ "type": "boolean",
1140
+ "description": "Whether the candidate survived paid_fallback/cooldown filtering."
1141
+ }
1142
+ },
1143
+ "required": [
1144
+ "harness_id",
1145
+ "billing_knowledge",
1146
+ "eligible"
1147
+ ],
1148
+ "additionalProperties": false,
1149
+ "description": "Per-candidate billing/cost tuple in the routing rationale (QA-034)."
1150
+ },
1151
+ "default": []
1152
+ }
1153
+ },
1154
+ "required": [
1155
+ "goal",
1156
+ "paid_fallback",
1157
+ "reason"
1158
+ ],
1159
+ "additionalProperties": false,
1160
+ "description": "Typed routing rationale recorded once at pool ordering (QA-034)."
1161
+ },
1162
+ {
1163
+ "type": "null"
1164
+ }
1165
+ ],
1166
+ "description": "Typed routing rationale (QA-034) projected from telemetry; null when no ranking was computed or on legacy runs.",
1167
+ "default": null
1168
+ },
960
1169
  "tests": {
961
1170
  "type": "array",
962
1171
  "items": {
@@ -1019,10 +1228,23 @@
1019
1228
  "description": "Run summary row served by GET /runs and embedded in run detail: state, routing, budget, policies, and honest outcome."
1020
1229
  },
1021
1230
  "default": []
1231
+ },
1232
+ "nextCursor": {
1233
+ "type": [
1234
+ "string",
1235
+ "null"
1236
+ ],
1237
+ "default": null,
1238
+ "description": "Opaque keyset cursor for the next (older) page under the current filter; null on the final page. Pass verbatim as the `cursor` query param."
1239
+ },
1240
+ "hasMore": {
1241
+ "type": "boolean",
1242
+ "default": false,
1243
+ "description": "True when more matching runs exist beyond this page."
1022
1244
  }
1023
1245
  },
1024
1246
  "additionalProperties": false,
1025
- "description": "All durable run summaries visible to the daemon."
1247
+ "description": "A bounded, newest-first, keyset-paginated page of durable run summaries visible to the daemon (QA-052)."
1026
1248
  }
1027
1249
  },
1028
1250
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -150,15 +150,22 @@
150
150
  },
151
151
  "effort": {
152
152
  "type": "string",
153
- "enum": [
154
- "low",
155
- "medium",
156
- "high",
157
- "xhigh",
158
- "max"
159
- ],
153
+ "minLength": 1,
154
+ "maxLength": 32,
155
+ "pattern": "^[a-z0-9]+(?:[_-][a-z0-9]+)*$",
160
156
  "description": "Requested reasoning effort."
161
157
  },
158
+ "efforts": {
159
+ "type": "object",
160
+ "additionalProperties": {
161
+ "$ref": "#/definitions/ControlRunStartRequest/properties/effort"
162
+ },
163
+ "propertyNames": {
164
+ "minLength": 1,
165
+ "pattern": "\\S"
166
+ },
167
+ "description": "Harness-scoped effort map (harness id to effort); an entry here wins over the scalar effort and the per-harness settings default."
168
+ },
162
169
  "reviewerModels": {
163
170
  "type": "object",
164
171
  "additionalProperties": {
@@ -54,6 +54,7 @@
54
54
  "auth",
55
55
  "harness_unavailable",
56
56
  "harness_error",
57
+ "config_error",
57
58
  "budget",
58
59
  "policy",
59
60
  "cancelled",
@@ -61,7 +62,28 @@
61
62
  "unknown"
62
63
  ],
63
64
  "default": "unknown",
64
- "description": "Typed failure category (validation, project, auth, harness, budget, policy, cancelled, internal, unknown)."
65
+ "description": "Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness."
66
+ },
67
+ "code": {
68
+ "anyOf": [
69
+ {
70
+ "type": "string",
71
+ "enum": [
72
+ "finite_zero",
73
+ "hard_cap",
74
+ "estimate_headroom",
75
+ "unknown_paid_in_flight",
76
+ "budget_overshoot",
77
+ "cost_unverifiable"
78
+ ],
79
+ "description": "Machine-readable failure sub-code within a RunFailure category (today the typed budget-denial reasons produced by the budget ledger)."
80
+ },
81
+ {
82
+ "type": "null"
83
+ }
84
+ ],
85
+ "description": "Machine-readable failure sub-code within the category (today the typed budget-denial reason from the ledger); null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage.",
86
+ "default": null
65
87
  },
66
88
  "harnessId": {
67
89
  "type": [
@@ -253,13 +275,9 @@
253
275
  },
254
276
  "effort": {
255
277
  "type": "string",
256
- "enum": [
257
- "low",
258
- "medium",
259
- "high",
260
- "xhigh",
261
- "max"
262
- ],
278
+ "minLength": 1,
279
+ "maxLength": 32,
280
+ "pattern": "^[a-z0-9]+(?:[_-][a-z0-9]+)*$",
263
281
  "description": "Per-reviewer effort hint, passed to that harness only."
264
282
  }
265
283
  },
@@ -877,7 +895,11 @@
877
895
  "stuck_no_progress",
878
896
  "wall_clock_exceeded",
879
897
  "user_cancelled",
880
- "crash_interrupted"
898
+ "crash_interrupted",
899
+ "input_required",
900
+ "work_incomplete",
901
+ "context_capacity_exhausted",
902
+ "work_report_contract"
881
903
  ],
882
904
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success."
883
905
  },
@@ -887,6 +909,82 @@
887
909
  ],
888
910
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success.",
889
911
  "default": null
912
+ },
913
+ "work_state": {
914
+ "type": "object",
915
+ "properties": {
916
+ "state": {
917
+ "type": "string",
918
+ "enum": [
919
+ "completed",
920
+ "needs_input",
921
+ "incomplete",
922
+ "unverified"
923
+ ],
924
+ "description": "Folded work state: the WorkReport state, or unverified when no report was obtainable (transport unsupported / lane gated)."
925
+ },
926
+ "source": {
927
+ "type": "string",
928
+ "enum": [
929
+ "constrained",
930
+ "validated",
931
+ "absent"
932
+ ],
933
+ "description": "Provenance of a WorkReport: constrained (native schema transport), validated (whole-answer JSON), or absent (no transport could carry one — a disclosed absence, not a failure)."
934
+ },
935
+ "required_inputs": {
936
+ "type": "array",
937
+ "items": {
938
+ "type": "object",
939
+ "properties": {
940
+ "kind": {
941
+ "type": "string",
942
+ "enum": [
943
+ "file",
944
+ "context",
945
+ "credential",
946
+ "permission",
947
+ "decision",
948
+ "external_dependency"
949
+ ],
950
+ "description": "Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency."
951
+ },
952
+ "locator": {
953
+ "anyOf": [
954
+ {
955
+ "type": "string",
956
+ "maxLength": 512
957
+ },
958
+ {
959
+ "type": "null"
960
+ }
961
+ ],
962
+ "default": null,
963
+ "description": "Concrete pointer to the missing thing (path/url/name); null when unnameable."
964
+ },
965
+ "description": {
966
+ "type": "string",
967
+ "maxLength": 1024,
968
+ "description": "Human-readable description of what is needed and why."
969
+ }
970
+ },
971
+ "required": [
972
+ "kind",
973
+ "description"
974
+ ],
975
+ "additionalProperties": false,
976
+ "description": "One blocking input a needs_input/incomplete WorkReport lists."
977
+ },
978
+ "maxItems": 16,
979
+ "description": "Carried through from a needs_input/incomplete WorkReport for honest disclosure."
980
+ }
981
+ },
982
+ "required": [
983
+ "state",
984
+ "source"
985
+ ],
986
+ "additionalProperties": false,
987
+ "description": "D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport."
890
988
  }
891
989
  },
892
990
  "required": [
@@ -952,6 +1050,117 @@
952
1050
  "description": "Route evidence from telemetry; null when no telemetry exists (legacy runs).",
953
1051
  "default": null
954
1052
  },
1053
+ "routingRationale": {
1054
+ "anyOf": [
1055
+ {
1056
+ "type": "object",
1057
+ "properties": {
1058
+ "goal": {
1059
+ "$ref": "#/definitions/ControlRunSummary/properties/routingGoal"
1060
+ },
1061
+ "paid_fallback": {
1062
+ "type": "string",
1063
+ "enum": [
1064
+ "never",
1065
+ "when_unavailable",
1066
+ "allowed_within_cap"
1067
+ ],
1068
+ "description": "When a route with incremental paid spend may be used."
1069
+ },
1070
+ "order": {
1071
+ "type": "array",
1072
+ "items": {
1073
+ "type": "string",
1074
+ "minLength": 1,
1075
+ "description": "Non-empty identifier string."
1076
+ },
1077
+ "default": [],
1078
+ "description": "Final ranked order, harness ids."
1079
+ },
1080
+ "dropped": {
1081
+ "type": "array",
1082
+ "items": {
1083
+ "$ref": "#/definitions/ControlRunSummary/properties/routingRationale/anyOf/0/properties/order/items"
1084
+ },
1085
+ "default": [],
1086
+ "description": "Ids removed by paid_fallback or cooldown before ranking."
1087
+ },
1088
+ "reason": {
1089
+ "type": "string",
1090
+ "enum": [
1091
+ "subscription_entitlement_first",
1092
+ "lowest_incremental_cash",
1093
+ "quality_tier",
1094
+ "expiring_quota_slack",
1095
+ "all_incremental_cash_unknown",
1096
+ "declared_order"
1097
+ ],
1098
+ "description": "Typed decisive reason the pool ranked the way it did (QA-034)."
1099
+ },
1100
+ "entries": {
1101
+ "type": "array",
1102
+ "items": {
1103
+ "type": "object",
1104
+ "properties": {
1105
+ "harness_id": {
1106
+ "type": "string",
1107
+ "minLength": 1,
1108
+ "description": "Candidate harness id."
1109
+ },
1110
+ "billing_knowledge": {
1111
+ "type": "string",
1112
+ "enum": [
1113
+ "proven_zero",
1114
+ "subscription_entitlement",
1115
+ "metered",
1116
+ "unknown"
1117
+ ],
1118
+ "description": "Effective billing knowledge used to rank it."
1119
+ },
1120
+ "incremental_cost_usd": {
1121
+ "anyOf": [
1122
+ {
1123
+ "type": "number",
1124
+ "minimum": 0
1125
+ },
1126
+ {
1127
+ "type": "null"
1128
+ }
1129
+ ],
1130
+ "default": null,
1131
+ "description": "Known incremental cash cost, when any; null when unknown."
1132
+ },
1133
+ "eligible": {
1134
+ "type": "boolean",
1135
+ "description": "Whether the candidate survived paid_fallback/cooldown filtering."
1136
+ }
1137
+ },
1138
+ "required": [
1139
+ "harness_id",
1140
+ "billing_knowledge",
1141
+ "eligible"
1142
+ ],
1143
+ "additionalProperties": false,
1144
+ "description": "Per-candidate billing/cost tuple in the routing rationale (QA-034)."
1145
+ },
1146
+ "default": []
1147
+ }
1148
+ },
1149
+ "required": [
1150
+ "goal",
1151
+ "paid_fallback",
1152
+ "reason"
1153
+ ],
1154
+ "additionalProperties": false,
1155
+ "description": "Typed routing rationale recorded once at pool ordering (QA-034)."
1156
+ },
1157
+ {
1158
+ "type": "null"
1159
+ }
1160
+ ],
1161
+ "description": "Typed routing rationale (QA-034) projected from telemetry; null when no ranking was computed or on legacy runs.",
1162
+ "default": null
1163
+ },
955
1164
  "tests": {
956
1165
  "type": "array",
957
1166
  "items": {
@@ -96,14 +96,10 @@
96
96
  },
97
97
  "effort": {
98
98
  "type": "string",
99
- "enum": [
100
- "low",
101
- "medium",
102
- "high",
103
- "xhigh",
104
- "max"
105
- ],
106
- "description": "Cross-harness reasoning-effort level, weakest to strongest; adapters declare the subset they support and a shared normalizer clamps requests onto the nearest supported level."
99
+ "minLength": 1,
100
+ "maxLength": 32,
101
+ "pattern": "^[a-z0-9]+(?:[_-][a-z0-9]+)*$",
102
+ "description": "Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, and refuses levels the advertised ladder has never seen."
107
103
  }
108
104
  },
109
105
  "required": [
@@ -42,14 +42,10 @@
42
42
  },
43
43
  "effort": {
44
44
  "type": "string",
45
- "enum": [
46
- "low",
47
- "medium",
48
- "high",
49
- "xhigh",
50
- "max"
51
- ],
52
- "description": "Cross-harness reasoning-effort level, weakest to strongest; adapters declare the subset they support and a shared normalizer clamps requests onto the nearest supported level."
45
+ "minLength": 1,
46
+ "maxLength": 32,
47
+ "pattern": "^[a-z0-9]+(?:[_-][a-z0-9]+)*$",
48
+ "description": "Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, and refuses levels the advertised ladder has never seen."
53
49
  }
54
50
  },
55
51
  "required": [
@@ -31,9 +31,10 @@
31
31
  "type": "string",
32
32
  "enum": [
33
33
  "device_auth",
34
+ "browser_callback",
34
35
  "browser_redirect"
35
36
  ],
36
- "description": "Codex-only: device_auth (default; complete it in an isolated browser window) or browser_redirect (explicit opt-in localhost callback)."
37
+ "description": "Codex-only: device_auth (default; app-server device-code, isolated browser window), browser_callback (app-server browser-callback opt-in), or browser_redirect (legacy Terminal localhost callback / fallback)."
37
38
  }
38
39
  },
39
40
  "required": [