@claudexor/schema 3.0.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/LICENSE +1 -1
  2. package/dist/agent-capabilities.d.ts +37 -0
  3. package/dist/agent-capabilities.d.ts.map +1 -1
  4. package/dist/agent-capabilities.js +14 -0
  5. package/dist/agent-capabilities.js.map +1 -1
  6. package/dist/apply-eligibility.d.ts +384 -18
  7. package/dist/apply-eligibility.d.ts.map +1 -1
  8. package/dist/apply-eligibility.js +20 -1
  9. package/dist/apply-eligibility.js.map +1 -1
  10. package/dist/budget.d.ts +75 -0
  11. package/dist/budget.d.ts.map +1 -1
  12. package/dist/budget.js +46 -0
  13. package/dist/budget.js.map +1 -1
  14. package/dist/config.d.ts +41 -41
  15. package/dist/control-operation-responses.d.ts +287 -65
  16. package/dist/control-operation-responses.d.ts.map +1 -1
  17. package/dist/control-operation-responses.js +33 -3
  18. package/dist/control-operation-responses.js.map +1 -1
  19. package/dist/control-run-detail.d.ts +600 -150
  20. package/dist/control-run-detail.d.ts.map +1 -1
  21. package/dist/control-run-detail.js +28 -2
  22. package/dist/control-run-detail.js.map +1 -1
  23. package/dist/control-run-retry.d.ts +1 -1
  24. package/dist/control-run-scope.d.ts +1 -1
  25. package/dist/control-thread-apply.d.ts +10 -0
  26. package/dist/control-thread-apply.d.ts.map +1 -1
  27. package/dist/control.d.ts +664 -156
  28. package/dist/control.d.ts.map +1 -1
  29. package/dist/control.js +76 -2
  30. package/dist/control.js.map +1 -1
  31. package/dist/decision.d.ts +205 -9
  32. package/dist/decision.d.ts.map +1 -1
  33. package/dist/decision.js +69 -1
  34. package/dist/decision.js.map +1 -1
  35. package/dist/deep-scan.d.ts +27 -0
  36. package/dist/deep-scan.d.ts.map +1 -0
  37. package/dist/deep-scan.js +27 -0
  38. package/dist/deep-scan.js.map +1 -0
  39. package/dist/delivery.d.ts +13 -0
  40. package/dist/delivery.d.ts.map +1 -1
  41. package/dist/delivery.js +15 -0
  42. package/dist/delivery.js.map +1 -1
  43. package/dist/events.d.ts +59 -4
  44. package/dist/events.d.ts.map +1 -1
  45. package/dist/events.js +85 -0
  46. package/dist/events.js.map +1 -1
  47. package/dist/harness.d.ts +111 -3
  48. package/dist/harness.d.ts.map +1 -1
  49. package/dist/harness.js +77 -1
  50. package/dist/harness.js.map +1 -1
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +3 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/operation.d.ts +193 -10
  56. package/dist/operation.d.ts.map +1 -1
  57. package/dist/operation.js +45 -0
  58. package/dist/operation.js.map +1 -1
  59. package/dist/output-schema-dialect.d.ts +22 -0
  60. package/dist/output-schema-dialect.d.ts.map +1 -0
  61. package/dist/output-schema-dialect.js +37 -0
  62. package/dist/output-schema-dialect.js.map +1 -0
  63. package/dist/output-schema.d.ts +26 -2
  64. package/dist/output-schema.d.ts.map +1 -1
  65. package/dist/output-schema.js +313 -16
  66. package/dist/output-schema.js.map +1 -1
  67. package/dist/plan.d.ts +2 -2
  68. package/dist/problem.d.ts +3 -3
  69. package/dist/project.d.ts +47 -12
  70. package/dist/project.d.ts.map +1 -1
  71. package/dist/project.js +32 -0
  72. package/dist/project.js.map +1 -1
  73. package/dist/readiness.d.ts +14 -0
  74. package/dist/readiness.d.ts.map +1 -1
  75. package/dist/recovery.d.ts +14 -14
  76. package/dist/review.d.ts +7 -7
  77. package/dist/route.d.ts +2 -2
  78. package/dist/setup.d.ts +288 -94
  79. package/dist/setup.d.ts.map +1 -1
  80. package/dist/setup.js +90 -6
  81. package/dist/setup.js.map +1 -1
  82. package/dist/status-projection.d.ts +79 -4
  83. package/dist/status-projection.d.ts.map +1 -1
  84. package/dist/status-projection.js +161 -4
  85. package/dist/status-projection.js.map +1 -1
  86. package/dist/task.d.ts +14 -0
  87. package/dist/task.d.ts.map +1 -1
  88. package/dist/task.js +9 -0
  89. package/dist/task.js.map +1 -1
  90. package/dist/telemetry.d.ts +779 -16
  91. package/dist/telemetry.d.ts.map +1 -1
  92. package/dist/telemetry.js +177 -4
  93. package/dist/telemetry.js.map +1 -1
  94. package/dist/tool-ref.d.ts +14 -0
  95. package/dist/tool-ref.d.ts.map +1 -1
  96. package/dist/tool-ref.js +15 -0
  97. package/dist/tool-ref.js.map +1 -1
  98. package/dist/work-report.d.ts +131 -0
  99. package/dist/work-report.d.ts.map +1 -0
  100. package/dist/work-report.js +124 -0
  101. package/dist/work-report.js.map +1 -0
  102. package/dist/workspace.d.ts +2 -2
  103. package/generated/AgentCapabilityCatalog.schema.json +35 -0
  104. package/generated/ControlApplyCheckResponse.schema.json +5 -0
  105. package/generated/ControlDeliveryResponse.schema.json +14 -0
  106. package/generated/ControlHarnessListResponse.schema.json +19 -0
  107. package/generated/ControlOperationCatalog.schema.json +74 -0
  108. package/generated/ControlOperationDescriptor.schema.json +74 -0
  109. package/generated/ControlOperationParameter.schema.json +75 -0
  110. package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
  111. package/generated/ControlRunAgainDraft.schema.json +11 -0
  112. package/generated/ControlRunDetail.schema.json +403 -9
  113. package/generated/ControlRunListResponse.schema.json +229 -3
  114. package/generated/ControlRunStartRequest.schema.json +11 -0
  115. package/generated/ControlRunSummary.schema.json +215 -2
  116. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  117. package/generated/ControlSetupJobEvent.schema.json +28 -0
  118. package/generated/ControlSetupJobSnapshot.schema.json +28 -0
  119. package/generated/ControlThreadApplyResponse.schema.json +14 -0
  120. package/generated/ControlThreadDetail.schema.json +94 -1
  121. package/generated/ControlThreadTurnRequest.schema.json +11 -0
  122. package/generated/DecisionRecord.schema.json +178 -2
  123. package/generated/HarnessEvent.schema.json +79 -1
  124. package/generated/HarnessManifest.schema.json +19 -0
  125. package/generated/HarnessStatusDto.schema.json +19 -0
  126. package/generated/McpRunHandleResult.schema.json +286 -1
  127. package/generated/McpRunToolResult.schema.json +171 -1
  128. package/generated/RoutePoolDegradedPayload.schema.json +79 -0
  129. package/generated/RunEvent.schema.json +7 -1
  130. package/generated/RunFailure.schema.json +23 -1
  131. package/generated/RunTelemetry.schema.json +376 -1
  132. package/generated/StructuredOutputConformance.schema.json +83 -0
  133. package/generated/TaskContract.schema.json +16 -0
  134. 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": [
@@ -882,7 +904,11 @@
882
904
  "stuck_no_progress",
883
905
  "wall_clock_exceeded",
884
906
  "user_cancelled",
885
- "crash_interrupted"
907
+ "crash_interrupted",
908
+ "input_required",
909
+ "work_incomplete",
910
+ "context_capacity_exhausted",
911
+ "work_report_contract"
886
912
  ],
887
913
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success."
888
914
  },
@@ -892,6 +918,82 @@
892
918
  ],
893
919
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success.",
894
920
  "default": null
921
+ },
922
+ "work_state": {
923
+ "type": "object",
924
+ "properties": {
925
+ "state": {
926
+ "type": "string",
927
+ "enum": [
928
+ "completed",
929
+ "needs_input",
930
+ "incomplete",
931
+ "unverified"
932
+ ],
933
+ "description": "Folded work state: the WorkReport state, or unverified when no report was obtainable (transport unsupported / lane gated)."
934
+ },
935
+ "source": {
936
+ "type": "string",
937
+ "enum": [
938
+ "constrained",
939
+ "validated",
940
+ "absent"
941
+ ],
942
+ "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)."
943
+ },
944
+ "required_inputs": {
945
+ "type": "array",
946
+ "items": {
947
+ "type": "object",
948
+ "properties": {
949
+ "kind": {
950
+ "type": "string",
951
+ "enum": [
952
+ "file",
953
+ "context",
954
+ "credential",
955
+ "permission",
956
+ "decision",
957
+ "external_dependency"
958
+ ],
959
+ "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."
960
+ },
961
+ "locator": {
962
+ "anyOf": [
963
+ {
964
+ "type": "string",
965
+ "maxLength": 512
966
+ },
967
+ {
968
+ "type": "null"
969
+ }
970
+ ],
971
+ "default": null,
972
+ "description": "Concrete pointer to the missing thing (path/url/name); null when unnameable."
973
+ },
974
+ "description": {
975
+ "type": "string",
976
+ "maxLength": 1024,
977
+ "description": "Human-readable description of what is needed and why."
978
+ }
979
+ },
980
+ "required": [
981
+ "kind",
982
+ "description"
983
+ ],
984
+ "additionalProperties": false,
985
+ "description": "One blocking input a needs_input/incomplete WorkReport lists."
986
+ },
987
+ "maxItems": 16,
988
+ "description": "Carried through from a needs_input/incomplete WorkReport for honest disclosure."
989
+ }
990
+ },
991
+ "required": [
992
+ "state",
993
+ "source"
994
+ ],
995
+ "additionalProperties": false,
996
+ "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
997
  }
896
998
  },
897
999
  "required": [
@@ -957,6 +1059,117 @@
957
1059
  "description": "Route evidence from telemetry; null when no telemetry exists (legacy runs).",
958
1060
  "default": null
959
1061
  },
1062
+ "routingRationale": {
1063
+ "anyOf": [
1064
+ {
1065
+ "type": "object",
1066
+ "properties": {
1067
+ "goal": {
1068
+ "$ref": "#/definitions/ControlRunListResponse/properties/runs/items/properties/routingGoal"
1069
+ },
1070
+ "paid_fallback": {
1071
+ "type": "string",
1072
+ "enum": [
1073
+ "never",
1074
+ "when_unavailable",
1075
+ "allowed_within_cap"
1076
+ ],
1077
+ "description": "When a route with incremental paid spend may be used."
1078
+ },
1079
+ "order": {
1080
+ "type": "array",
1081
+ "items": {
1082
+ "type": "string",
1083
+ "minLength": 1,
1084
+ "description": "Non-empty identifier string."
1085
+ },
1086
+ "default": [],
1087
+ "description": "Final ranked order, harness ids."
1088
+ },
1089
+ "dropped": {
1090
+ "type": "array",
1091
+ "items": {
1092
+ "$ref": "#/definitions/ControlRunListResponse/properties/runs/items/properties/routingRationale/anyOf/0/properties/order/items"
1093
+ },
1094
+ "default": [],
1095
+ "description": "Ids removed by paid_fallback or cooldown before ranking."
1096
+ },
1097
+ "reason": {
1098
+ "type": "string",
1099
+ "enum": [
1100
+ "subscription_entitlement_first",
1101
+ "lowest_incremental_cash",
1102
+ "quality_tier",
1103
+ "expiring_quota_slack",
1104
+ "all_incremental_cash_unknown",
1105
+ "declared_order"
1106
+ ],
1107
+ "description": "Typed decisive reason the pool ranked the way it did (QA-034)."
1108
+ },
1109
+ "entries": {
1110
+ "type": "array",
1111
+ "items": {
1112
+ "type": "object",
1113
+ "properties": {
1114
+ "harness_id": {
1115
+ "type": "string",
1116
+ "minLength": 1,
1117
+ "description": "Candidate harness id."
1118
+ },
1119
+ "billing_knowledge": {
1120
+ "type": "string",
1121
+ "enum": [
1122
+ "proven_zero",
1123
+ "subscription_entitlement",
1124
+ "metered",
1125
+ "unknown"
1126
+ ],
1127
+ "description": "Effective billing knowledge used to rank it."
1128
+ },
1129
+ "incremental_cost_usd": {
1130
+ "anyOf": [
1131
+ {
1132
+ "type": "number",
1133
+ "minimum": 0
1134
+ },
1135
+ {
1136
+ "type": "null"
1137
+ }
1138
+ ],
1139
+ "default": null,
1140
+ "description": "Known incremental cash cost, when any; null when unknown."
1141
+ },
1142
+ "eligible": {
1143
+ "type": "boolean",
1144
+ "description": "Whether the candidate survived paid_fallback/cooldown filtering."
1145
+ }
1146
+ },
1147
+ "required": [
1148
+ "harness_id",
1149
+ "billing_knowledge",
1150
+ "eligible"
1151
+ ],
1152
+ "additionalProperties": false,
1153
+ "description": "Per-candidate billing/cost tuple in the routing rationale (QA-034)."
1154
+ },
1155
+ "default": []
1156
+ }
1157
+ },
1158
+ "required": [
1159
+ "goal",
1160
+ "paid_fallback",
1161
+ "reason"
1162
+ ],
1163
+ "additionalProperties": false,
1164
+ "description": "Typed routing rationale recorded once at pool ordering (QA-034)."
1165
+ },
1166
+ {
1167
+ "type": "null"
1168
+ }
1169
+ ],
1170
+ "description": "Typed routing rationale (QA-034) projected from telemetry; null when no ranking was computed or on legacy runs.",
1171
+ "default": null
1172
+ },
960
1173
  "tests": {
961
1174
  "type": "array",
962
1175
  "items": {
@@ -1019,10 +1232,23 @@
1019
1232
  "description": "Run summary row served by GET /runs and embedded in run detail: state, routing, budget, policies, and honest outcome."
1020
1233
  },
1021
1234
  "default": []
1235
+ },
1236
+ "nextCursor": {
1237
+ "type": [
1238
+ "string",
1239
+ "null"
1240
+ ],
1241
+ "default": null,
1242
+ "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."
1243
+ },
1244
+ "hasMore": {
1245
+ "type": "boolean",
1246
+ "default": false,
1247
+ "description": "True when more matching runs exist beyond this page."
1022
1248
  }
1023
1249
  },
1024
1250
  "additionalProperties": false,
1025
- "description": "All durable run summaries visible to the daemon."
1251
+ "description": "A bounded, newest-first, keyset-paginated page of durable run summaries visible to the daemon (QA-052)."
1026
1252
  }
1027
1253
  },
1028
1254
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -159,6 +159,17 @@
159
159
  ],
160
160
  "description": "Requested reasoning effort."
161
161
  },
162
+ "efforts": {
163
+ "type": "object",
164
+ "additionalProperties": {
165
+ "$ref": "#/definitions/ControlRunStartRequest/properties/effort"
166
+ },
167
+ "propertyNames": {
168
+ "minLength": 1,
169
+ "pattern": "\\S"
170
+ },
171
+ "description": "Harness-scoped effort map (harness id to effort); an entry here wins over the scalar effort and the per-harness settings default."
172
+ },
162
173
  "reviewerModels": {
163
174
  "type": "object",
164
175
  "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": [
@@ -877,7 +899,11 @@
877
899
  "stuck_no_progress",
878
900
  "wall_clock_exceeded",
879
901
  "user_cancelled",
880
- "crash_interrupted"
902
+ "crash_interrupted",
903
+ "input_required",
904
+ "work_incomplete",
905
+ "context_capacity_exhausted",
906
+ "work_report_contract"
881
907
  ],
882
908
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success."
883
909
  },
@@ -887,6 +913,82 @@
887
913
  ],
888
914
  "description": "Typed reason qualifying a non-clean terminal; null on a clean success.",
889
915
  "default": null
916
+ },
917
+ "work_state": {
918
+ "type": "object",
919
+ "properties": {
920
+ "state": {
921
+ "type": "string",
922
+ "enum": [
923
+ "completed",
924
+ "needs_input",
925
+ "incomplete",
926
+ "unverified"
927
+ ],
928
+ "description": "Folded work state: the WorkReport state, or unverified when no report was obtainable (transport unsupported / lane gated)."
929
+ },
930
+ "source": {
931
+ "type": "string",
932
+ "enum": [
933
+ "constrained",
934
+ "validated",
935
+ "absent"
936
+ ],
937
+ "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)."
938
+ },
939
+ "required_inputs": {
940
+ "type": "array",
941
+ "items": {
942
+ "type": "object",
943
+ "properties": {
944
+ "kind": {
945
+ "type": "string",
946
+ "enum": [
947
+ "file",
948
+ "context",
949
+ "credential",
950
+ "permission",
951
+ "decision",
952
+ "external_dependency"
953
+ ],
954
+ "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."
955
+ },
956
+ "locator": {
957
+ "anyOf": [
958
+ {
959
+ "type": "string",
960
+ "maxLength": 512
961
+ },
962
+ {
963
+ "type": "null"
964
+ }
965
+ ],
966
+ "default": null,
967
+ "description": "Concrete pointer to the missing thing (path/url/name); null when unnameable."
968
+ },
969
+ "description": {
970
+ "type": "string",
971
+ "maxLength": 1024,
972
+ "description": "Human-readable description of what is needed and why."
973
+ }
974
+ },
975
+ "required": [
976
+ "kind",
977
+ "description"
978
+ ],
979
+ "additionalProperties": false,
980
+ "description": "One blocking input a needs_input/incomplete WorkReport lists."
981
+ },
982
+ "maxItems": 16,
983
+ "description": "Carried through from a needs_input/incomplete WorkReport for honest disclosure."
984
+ }
985
+ },
986
+ "required": [
987
+ "state",
988
+ "source"
989
+ ],
990
+ "additionalProperties": false,
991
+ "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
992
  }
891
993
  },
892
994
  "required": [
@@ -952,6 +1054,117 @@
952
1054
  "description": "Route evidence from telemetry; null when no telemetry exists (legacy runs).",
953
1055
  "default": null
954
1056
  },
1057
+ "routingRationale": {
1058
+ "anyOf": [
1059
+ {
1060
+ "type": "object",
1061
+ "properties": {
1062
+ "goal": {
1063
+ "$ref": "#/definitions/ControlRunSummary/properties/routingGoal"
1064
+ },
1065
+ "paid_fallback": {
1066
+ "type": "string",
1067
+ "enum": [
1068
+ "never",
1069
+ "when_unavailable",
1070
+ "allowed_within_cap"
1071
+ ],
1072
+ "description": "When a route with incremental paid spend may be used."
1073
+ },
1074
+ "order": {
1075
+ "type": "array",
1076
+ "items": {
1077
+ "type": "string",
1078
+ "minLength": 1,
1079
+ "description": "Non-empty identifier string."
1080
+ },
1081
+ "default": [],
1082
+ "description": "Final ranked order, harness ids."
1083
+ },
1084
+ "dropped": {
1085
+ "type": "array",
1086
+ "items": {
1087
+ "$ref": "#/definitions/ControlRunSummary/properties/routingRationale/anyOf/0/properties/order/items"
1088
+ },
1089
+ "default": [],
1090
+ "description": "Ids removed by paid_fallback or cooldown before ranking."
1091
+ },
1092
+ "reason": {
1093
+ "type": "string",
1094
+ "enum": [
1095
+ "subscription_entitlement_first",
1096
+ "lowest_incremental_cash",
1097
+ "quality_tier",
1098
+ "expiring_quota_slack",
1099
+ "all_incremental_cash_unknown",
1100
+ "declared_order"
1101
+ ],
1102
+ "description": "Typed decisive reason the pool ranked the way it did (QA-034)."
1103
+ },
1104
+ "entries": {
1105
+ "type": "array",
1106
+ "items": {
1107
+ "type": "object",
1108
+ "properties": {
1109
+ "harness_id": {
1110
+ "type": "string",
1111
+ "minLength": 1,
1112
+ "description": "Candidate harness id."
1113
+ },
1114
+ "billing_knowledge": {
1115
+ "type": "string",
1116
+ "enum": [
1117
+ "proven_zero",
1118
+ "subscription_entitlement",
1119
+ "metered",
1120
+ "unknown"
1121
+ ],
1122
+ "description": "Effective billing knowledge used to rank it."
1123
+ },
1124
+ "incremental_cost_usd": {
1125
+ "anyOf": [
1126
+ {
1127
+ "type": "number",
1128
+ "minimum": 0
1129
+ },
1130
+ {
1131
+ "type": "null"
1132
+ }
1133
+ ],
1134
+ "default": null,
1135
+ "description": "Known incremental cash cost, when any; null when unknown."
1136
+ },
1137
+ "eligible": {
1138
+ "type": "boolean",
1139
+ "description": "Whether the candidate survived paid_fallback/cooldown filtering."
1140
+ }
1141
+ },
1142
+ "required": [
1143
+ "harness_id",
1144
+ "billing_knowledge",
1145
+ "eligible"
1146
+ ],
1147
+ "additionalProperties": false,
1148
+ "description": "Per-candidate billing/cost tuple in the routing rationale (QA-034)."
1149
+ },
1150
+ "default": []
1151
+ }
1152
+ },
1153
+ "required": [
1154
+ "goal",
1155
+ "paid_fallback",
1156
+ "reason"
1157
+ ],
1158
+ "additionalProperties": false,
1159
+ "description": "Typed routing rationale recorded once at pool ordering (QA-034)."
1160
+ },
1161
+ {
1162
+ "type": "null"
1163
+ }
1164
+ ],
1165
+ "description": "Typed routing rationale (QA-034) projected from telemetry; null when no ranking was computed or on legacy runs.",
1166
+ "default": null
1167
+ },
955
1168
  "tests": {
956
1169
  "type": "array",
957
1170
  "items": {
@@ -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": [
@@ -902,6 +902,34 @@
902
902
  ],
903
903
  "additionalProperties": false,
904
904
  "description": "Full authoritative setup-job snapshot at this cursor."
905
+ },
906
+ "deviceCode": {
907
+ "type": "object",
908
+ "properties": {
909
+ "flow": {
910
+ "type": "string",
911
+ "enum": [
912
+ "chatgptDeviceCode",
913
+ "chatgpt"
914
+ ]
915
+ },
916
+ "verificationUrl": {
917
+ "type": "string",
918
+ "format": "uri",
919
+ "description": "Where the operator completes the sign-in."
920
+ },
921
+ "userCode": {
922
+ "type": "string",
923
+ "description": "Transient one-time code (empty for the browser-callback flow); never journaled."
924
+ }
925
+ },
926
+ "required": [
927
+ "flow",
928
+ "verificationUrl",
929
+ "userCode"
930
+ ],
931
+ "additionalProperties": false,
932
+ "description": "Transient device-code disclosure overlaid at read time from the runner sidecar; never part of the journaled job."
905
933
  }
906
934
  },
907
935
  "required": [
@@ -864,6 +864,34 @@
864
864
  "minimum": -9007199254740991,
865
865
  "maximum": 9007199254740991,
866
866
  "description": "Global partition sequence fenced by the snapshot."
867
+ },
868
+ "deviceCode": {
869
+ "type": "object",
870
+ "properties": {
871
+ "flow": {
872
+ "type": "string",
873
+ "enum": [
874
+ "chatgptDeviceCode",
875
+ "chatgpt"
876
+ ]
877
+ },
878
+ "verificationUrl": {
879
+ "type": "string",
880
+ "format": "uri",
881
+ "description": "Where the operator completes the sign-in."
882
+ },
883
+ "userCode": {
884
+ "type": "string",
885
+ "description": "Transient one-time code (empty for the browser-callback flow); never journaled."
886
+ }
887
+ },
888
+ "required": [
889
+ "flow",
890
+ "verificationUrl",
891
+ "userCode"
892
+ ],
893
+ "additionalProperties": false,
894
+ "description": "Transient device-code disclosure overlaid at read time from the runner sidecar; never part of the journaled job."
867
895
  }
868
896
  },
869
897
  "required": [
@@ -69,6 +69,20 @@
69
69
  "refused": {
70
70
  "type": "boolean"
71
71
  },
72
+ "alreadyApplied": {
73
+ "type": "boolean",
74
+ "default": false,
75
+ "description": "True when delivery was an idempotent already-applied no-op (no files changed)."
76
+ },
77
+ "deliveryStatus": {
78
+ "type": "string",
79
+ "enum": [
80
+ "applied",
81
+ "already_applied",
82
+ "refused"
83
+ ],
84
+ "description": "Coarse typed delivery disposition (applied / already_applied / refused)."
85
+ },
72
86
  "finalVerify": {
73
87
  "type": "object",
74
88
  "properties": {