@claudexor/schema 3.1.2 → 3.2.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 (284) hide show
  1. package/dist/agent-capabilities.d.ts +157 -129
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +4 -2
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +462 -273
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +25 -2
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/attachment.d.ts +17 -17
  10. package/dist/attachment.d.ts.map +1 -1
  11. package/dist/attachment.js +1 -1
  12. package/dist/attachment.js.map +1 -1
  13. package/dist/auth.d.ts +475 -475
  14. package/dist/auth.d.ts.map +1 -1
  15. package/dist/auth.js +1 -1
  16. package/dist/auth.js.map +1 -1
  17. package/dist/budget.d.ts +62 -59
  18. package/dist/budget.d.ts.map +1 -1
  19. package/dist/budget.js +6 -1
  20. package/dist/budget.js.map +1 -1
  21. package/dist/config.d.ts +320 -316
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/config.js +26 -19
  24. package/dist/config.js.map +1 -1
  25. package/dist/context.d.ts +38 -38
  26. package/dist/context.d.ts.map +1 -1
  27. package/dist/context.js +1 -1
  28. package/dist/context.js.map +1 -1
  29. package/dist/control-auth-route.d.ts +46 -0
  30. package/dist/control-auth-route.d.ts.map +1 -0
  31. package/dist/control-auth-route.js +24 -0
  32. package/dist/control-auth-route.js.map +1 -0
  33. package/dist/control-gc.d.ts +15 -15
  34. package/dist/control-gc.d.ts.map +1 -1
  35. package/dist/control-gc.js +1 -1
  36. package/dist/control-gc.js.map +1 -1
  37. package/dist/control-harness-list.d.ts +896 -0
  38. package/dist/control-harness-list.d.ts.map +1 -0
  39. package/dist/control-harness-list.js +13 -0
  40. package/dist/control-harness-list.js.map +1 -0
  41. package/dist/control-operation-responses.d.ts +630 -628
  42. package/dist/control-operation-responses.d.ts.map +1 -1
  43. package/dist/control-operation-responses.js +5 -1
  44. package/dist/control-operation-responses.js.map +1 -1
  45. package/dist/control-run-detail.d.ts +2113 -1578
  46. package/dist/control-run-detail.d.ts.map +1 -1
  47. package/dist/control-run-detail.js +7 -1
  48. package/dist/control-run-detail.js.map +1 -1
  49. package/dist/control-run-retry.d.ts +16 -16
  50. package/dist/control-run-retry.d.ts.map +1 -1
  51. package/dist/control-run-retry.js +1 -1
  52. package/dist/control-run-retry.js.map +1 -1
  53. package/dist/control-run-scope.d.ts +2 -2
  54. package/dist/control-run-scope.d.ts.map +1 -1
  55. package/dist/control-run-scope.js +1 -1
  56. package/dist/control-run-scope.js.map +1 -1
  57. package/dist/control-secret.d.ts +7 -7
  58. package/dist/control-secret.d.ts.map +1 -1
  59. package/dist/control-secret.js +1 -1
  60. package/dist/control-secret.js.map +1 -1
  61. package/dist/control-thread-apply.d.ts +65 -65
  62. package/dist/control-thread-apply.d.ts.map +1 -1
  63. package/dist/control-thread-apply.js +1 -1
  64. package/dist/control-thread-apply.js.map +1 -1
  65. package/dist/control-trust.d.ts +23 -23
  66. package/dist/control-trust.d.ts.map +1 -1
  67. package/dist/control-trust.js +1 -1
  68. package/dist/control-trust.js.map +1 -1
  69. package/dist/control.d.ts +1523 -2354
  70. package/dist/control.d.ts.map +1 -1
  71. package/dist/control.js +23 -45
  72. package/dist/control.js.map +1 -1
  73. package/dist/credential-profile-snapshot.d.ts +3203 -0
  74. package/dist/credential-profile-snapshot.d.ts.map +1 -0
  75. package/dist/credential-profile-snapshot.js +28 -0
  76. package/dist/credential-profile-snapshot.js.map +1 -0
  77. package/dist/credential-profile.d.ts +122 -107
  78. package/dist/credential-profile.d.ts.map +1 -1
  79. package/dist/credential-profile.js +12 -6
  80. package/dist/credential-profile.js.map +1 -1
  81. package/dist/decision.d.ts +121 -121
  82. package/dist/decision.d.ts.map +1 -1
  83. package/dist/decision.js +2 -1
  84. package/dist/decision.js.map +1 -1
  85. package/dist/deep-scan.d.ts +5 -5
  86. package/dist/deep-scan.d.ts.map +1 -1
  87. package/dist/deep-scan.js +1 -1
  88. package/dist/deep-scan.js.map +1 -1
  89. package/dist/delegation.d.ts +13 -13
  90. package/dist/delegation.d.ts.map +1 -1
  91. package/dist/delegation.js +1 -1
  92. package/dist/delegation.js.map +1 -1
  93. package/dist/delivery.d.ts +32 -32
  94. package/dist/delivery.d.ts.map +1 -1
  95. package/dist/delivery.js +1 -1
  96. package/dist/delivery.js.map +1 -1
  97. package/dist/effort.d.ts +1 -1
  98. package/dist/effort.d.ts.map +1 -1
  99. package/dist/effort.js +1 -1
  100. package/dist/effort.js.map +1 -1
  101. package/dist/events.d.ts +55 -35
  102. package/dist/events.d.ts.map +1 -1
  103. package/dist/events.js +20 -1
  104. package/dist/events.js.map +1 -1
  105. package/dist/gate.d.ts +7 -7
  106. package/dist/gate.d.ts.map +1 -1
  107. package/dist/gate.js +1 -1
  108. package/dist/gate.js.map +1 -1
  109. package/dist/git-capability.d.ts +23 -0
  110. package/dist/git-capability.d.ts.map +1 -0
  111. package/dist/git-capability.js +15 -0
  112. package/dist/git-capability.js.map +1 -0
  113. package/dist/harness.d.ts +417 -400
  114. package/dist/harness.d.ts.map +1 -1
  115. package/dist/harness.js +11 -25
  116. package/dist/harness.js.map +1 -1
  117. package/dist/index.d.ts +7 -0
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +7 -0
  120. package/dist/index.js.map +1 -1
  121. package/dist/interaction.d.ts +10 -0
  122. package/dist/interaction.d.ts.map +1 -0
  123. package/dist/interaction.js +2 -0
  124. package/dist/interaction.js.map +1 -0
  125. package/dist/operation.d.ts +113 -113
  126. package/dist/operation.d.ts.map +1 -1
  127. package/dist/operation.js +1 -1
  128. package/dist/operation.js.map +1 -1
  129. package/dist/output-schema-dialect.d.ts +1 -1
  130. package/dist/output-schema-dialect.d.ts.map +1 -1
  131. package/dist/output-schema-dialect.js +1 -1
  132. package/dist/output-schema-dialect.js.map +1 -1
  133. package/dist/output-schema.d.ts +2 -2
  134. package/dist/output-schema.js +2 -2
  135. package/dist/plan.d.ts +29 -29
  136. package/dist/plan.d.ts.map +1 -1
  137. package/dist/plan.js +2 -2
  138. package/dist/plan.js.map +1 -1
  139. package/dist/primitives.d.ts +3 -5
  140. package/dist/primitives.d.ts.map +1 -1
  141. package/dist/primitives.js +4 -6
  142. package/dist/primitives.js.map +1 -1
  143. package/dist/problem.d.ts +6 -6
  144. package/dist/problem.d.ts.map +1 -1
  145. package/dist/problem.js +1 -1
  146. package/dist/problem.js.map +1 -1
  147. package/dist/project.d.ts +87 -25
  148. package/dist/project.d.ts.map +1 -1
  149. package/dist/project.js +21 -1
  150. package/dist/project.js.map +1 -1
  151. package/dist/quota.d.ts +72 -48
  152. package/dist/quota.d.ts.map +1 -1
  153. package/dist/quota.js +6 -2
  154. package/dist/quota.js.map +1 -1
  155. package/dist/rate-limit.d.ts +20 -0
  156. package/dist/rate-limit.d.ts.map +1 -0
  157. package/dist/rate-limit.js +24 -0
  158. package/dist/rate-limit.js.map +1 -0
  159. package/dist/raw.d.ts +16 -16
  160. package/dist/raw.d.ts.map +1 -1
  161. package/dist/raw.js +1 -1
  162. package/dist/raw.js.map +1 -1
  163. package/dist/readiness.d.ts +242 -242
  164. package/dist/readiness.d.ts.map +1 -1
  165. package/dist/readiness.js +1 -1
  166. package/dist/readiness.js.map +1 -1
  167. package/dist/recovery.d.ts +106 -106
  168. package/dist/recovery.d.ts.map +1 -1
  169. package/dist/recovery.js +1 -1
  170. package/dist/recovery.js.map +1 -1
  171. package/dist/request-requirements.d.ts +9 -9
  172. package/dist/request-requirements.d.ts.map +1 -1
  173. package/dist/request-requirements.js +1 -1
  174. package/dist/request-requirements.js.map +1 -1
  175. package/dist/review.d.ts +29 -29
  176. package/dist/review.d.ts.map +1 -1
  177. package/dist/review.js +1 -1
  178. package/dist/review.js.map +1 -1
  179. package/dist/route.d.ts +11 -11
  180. package/dist/route.d.ts.map +1 -1
  181. package/dist/route.js +1 -1
  182. package/dist/route.js.map +1 -1
  183. package/dist/run-applicability.d.ts +764 -0
  184. package/dist/run-applicability.d.ts.map +1 -0
  185. package/dist/run-applicability.js +56 -0
  186. package/dist/run-applicability.js.map +1 -0
  187. package/dist/run-facts.d.ts +628 -0
  188. package/dist/run-facts.d.ts.map +1 -0
  189. package/dist/run-facts.js +429 -0
  190. package/dist/run-facts.js.map +1 -0
  191. package/dist/run-strategy.d.ts +40 -0
  192. package/dist/run-strategy.d.ts.map +1 -1
  193. package/dist/run-strategy.js +68 -1
  194. package/dist/run-strategy.js.map +1 -1
  195. package/dist/setup-device-code-envelope.d.ts +67 -0
  196. package/dist/setup-device-code-envelope.d.ts.map +1 -0
  197. package/dist/setup-device-code-envelope.js +25 -0
  198. package/dist/setup-device-code-envelope.js.map +1 -0
  199. package/dist/setup-login-protocol.d.ts +6 -0
  200. package/dist/setup-login-protocol.d.ts.map +1 -0
  201. package/dist/setup-login-protocol.js +12 -0
  202. package/dist/setup-login-protocol.js.map +1 -0
  203. package/dist/setup-transport.d.ts +12 -0
  204. package/dist/setup-transport.d.ts.map +1 -0
  205. package/dist/setup-transport.js +22 -0
  206. package/dist/setup-transport.js.map +1 -0
  207. package/dist/setup.d.ts +12572 -3749
  208. package/dist/setup.d.ts.map +1 -1
  209. package/dist/setup.js +34 -38
  210. package/dist/setup.js.map +1 -1
  211. package/dist/status-projection.d.ts +7 -5
  212. package/dist/status-projection.d.ts.map +1 -1
  213. package/dist/status-projection.js +11 -6
  214. package/dist/status-projection.js.map +1 -1
  215. package/dist/surface-run-controls.d.ts.map +1 -1
  216. package/dist/surface-run-controls.js +10 -1
  217. package/dist/surface-run-controls.js.map +1 -1
  218. package/dist/task.d.ts +303 -303
  219. package/dist/task.d.ts.map +1 -1
  220. package/dist/task.js +1 -1
  221. package/dist/task.js.map +1 -1
  222. package/dist/telemetry.d.ts +1157 -633
  223. package/dist/telemetry.d.ts.map +1 -1
  224. package/dist/telemetry.js +7 -4
  225. package/dist/telemetry.js.map +1 -1
  226. package/dist/thread.d.ts +133 -84
  227. package/dist/thread.d.ts.map +1 -1
  228. package/dist/thread.js +21 -2
  229. package/dist/thread.js.map +1 -1
  230. package/dist/tool-ref.d.ts +7 -7
  231. package/dist/tool-ref.d.ts.map +1 -1
  232. package/dist/tool-ref.js +1 -1
  233. package/dist/tool-ref.js.map +1 -1
  234. package/dist/work-report.d.ts +28 -28
  235. package/dist/work-report.d.ts.map +1 -1
  236. package/dist/work-report.js +3 -3
  237. package/dist/work-report.js.map +1 -1
  238. package/dist/workproduct.d.ts +6 -9
  239. package/dist/workproduct.d.ts.map +1 -1
  240. package/dist/workproduct.js +1 -2
  241. package/dist/workproduct.js.map +1 -1
  242. package/dist/workspace.d.ts +13 -13
  243. package/dist/workspace.d.ts.map +1 -1
  244. package/dist/workspace.js +1 -1
  245. package/dist/workspace.js.map +1 -1
  246. package/generated/AgentCapabilityCatalog.schema.json +43 -2
  247. package/generated/BudgetObservation.schema.json +16 -0
  248. package/generated/ControlCredentialProfilesQueryResponse.schema.json +1346 -0
  249. package/generated/ControlCredentialProfilesResponse.schema.json +10 -2
  250. package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +1325 -0
  251. package/generated/ControlDirectoryEntry.schema.json +36 -0
  252. package/generated/ControlDirectoryListing.schema.json +77 -0
  253. package/generated/ControlHarnessListResponse.schema.json +41 -1
  254. package/generated/ControlQuotaResponse.schema.json +14 -1
  255. package/generated/ControlRunAgainDraft.schema.json +2 -2
  256. package/generated/ControlRunApplicabilityResponse.schema.json +217 -0
  257. package/generated/ControlRunDetail.schema.json +429 -68
  258. package/generated/ControlRunListResponse.schema.json +12 -3
  259. package/generated/ControlRunStartRequest.schema.json +2 -2
  260. package/generated/ControlRunSummary.schema.json +12 -3
  261. package/generated/ControlSettingsSnapshot.schema.json +12 -3
  262. package/generated/ControlSettingsUpdateRequest.schema.json +12 -3
  263. package/generated/ControlSetupJob.schema.json +9 -0
  264. package/generated/ControlSetupJobCreateRequest.schema.json +9 -0
  265. package/generated/ControlSetupJobEvent.schema.json +858 -758
  266. package/generated/ControlSetupJobListResponse.schema.json +9 -0
  267. package/generated/ControlSetupJobSnapshot.schema.json +811 -736
  268. package/generated/ControlThreadDetail.schema.json +32 -2
  269. package/generated/ControlThreadTurnRequest.schema.json +6 -25
  270. package/generated/DecisionRecord.schema.json +2 -1
  271. package/generated/GitCapability.schema.json +46 -0
  272. package/generated/GlobalConfig.schema.json +13 -4
  273. package/generated/HarnessEvent.schema.json +34 -2
  274. package/generated/HarnessManifest.schema.json +1 -1
  275. package/generated/HarnessStatusDto.schema.json +1 -1
  276. package/generated/McpRunHandleResult.schema.json +165 -1
  277. package/generated/McpRunToolResult.schema.json +165 -1
  278. package/generated/OutputReadyPayload.schema.json +44 -0
  279. package/generated/RunFacts.schema.json +569 -0
  280. package/generated/RunTelemetry.schema.json +493 -3
  281. package/generated/TaskContract.schema.json +1 -1
  282. package/generated/ThreadTurn.schema.json +29 -0
  283. package/generated/WorkProduct.schema.json +0 -4
  284. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "zod/v3";
2
2
  /**
3
3
  * ApplyEligibility — the derived "can this run's WorkProduct be applied RIGHT
4
4
  * NOW, and if not, what unblocks it" verdict. ONE producer (the delivery
@@ -13,17 +13,31 @@ export declare const ApplyEligibility: z.ZodObject<{
13
13
  reason: z.ZodNullable<z.ZodString>;
14
14
  requiredAction: z.ZodNullable<z.ZodString>;
15
15
  }, "strip", z.ZodTypeAny, {
16
+ eligible: boolean;
16
17
  state: string | null;
17
18
  reason: string | null;
18
- eligible: boolean;
19
19
  requiredAction: string | null;
20
20
  }, {
21
+ eligible: boolean;
21
22
  state: string | null;
22
23
  reason: string | null;
23
- eligible: boolean;
24
24
  requiredAction: string | null;
25
25
  }>;
26
26
  export type ApplyEligibility = z.infer<typeof ApplyEligibility>;
27
+ export declare const RunDetailProblem: z.ZodObject<{
28
+ code: z.ZodNullable<z.ZodString>;
29
+ message: z.ZodString;
30
+ retryable: z.ZodNullable<z.ZodBoolean>;
31
+ }, "strict", z.ZodTypeAny, {
32
+ code: string | null;
33
+ message: string;
34
+ retryable: boolean | null;
35
+ }, {
36
+ code: string | null;
37
+ message: string;
38
+ retryable: boolean | null;
39
+ }>;
40
+ export type RunDetailProblem = z.infer<typeof RunDetailProblem>;
27
41
  /**
28
42
  * The structured result shape MCP run tools return (structuredContent).
29
43
  * Text content mirrors it for hosts without structured-output support.
@@ -38,7 +52,7 @@ export declare const McpRunToolResult: z.ZodObject<{
38
52
  noChanges: z.ZodDefault<z.ZodBoolean>;
39
53
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
40
54
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
41
- reason: z.ZodDefault<z.ZodNullable<z.ZodEnum<["harness_failed", "no_changes", "review_blocked", "checks_failed", "budget_exhausted", "budget_overshoot", "cost_unverifiable", "not_converged", "stuck_no_progress", "wall_clock_exceeded", "user_cancelled", "crash_interrupted", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
55
+ reason: z.ZodDefault<z.ZodNullable<z.ZodEnum<["harness_failed", "no_changes", "review_blocked", "checks_failed", "budget_exhausted", "budget_overshoot", "cost_unverifiable", "not_converged", "stuck_no_progress", "wall_clock_exceeded", "user_cancelled", "crash_interrupted", "workspace_unavailable", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
42
56
  work_state: z.ZodOptional<z.ZodObject<{
43
57
  state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
44
58
  source: z.ZodEnum<["constrained", "validated", "absent"]>;
@@ -47,76 +61,113 @@ export declare const McpRunToolResult: z.ZodObject<{
47
61
  locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
48
62
  description: z.ZodString;
49
63
  }, "strip", z.ZodTypeAny, {
50
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
51
- description: string;
64
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
52
65
  locator: string | null;
53
- }, {
54
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
55
66
  description: string;
67
+ }, {
68
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
56
69
  locator?: string | null | undefined;
70
+ description: string;
57
71
  }>, "many">>;
58
72
  }, "strip", z.ZodTypeAny, {
59
- source: "constrained" | "validated" | "absent";
60
- state: "completed" | "needs_input" | "incomplete" | "unverified";
73
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
74
+ source: "absent" | "constrained" | "validated";
61
75
  required_inputs?: {
62
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
63
- description: string;
76
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
64
77
  locator: string | null;
78
+ description: string;
65
79
  }[] | undefined;
66
80
  }, {
67
- source: "constrained" | "validated" | "absent";
68
- state: "completed" | "needs_input" | "incomplete" | "unverified";
81
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
82
+ source: "absent" | "constrained" | "validated";
69
83
  required_inputs?: {
70
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
71
- description: string;
84
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
72
85
  locator?: string | null | undefined;
86
+ description: string;
73
87
  }[] | undefined;
74
88
  }>>;
75
89
  }, "strict", z.ZodTypeAny, {
76
- review: "not_run" | "approved" | "blocked";
77
- reason: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null;
78
- checks: "passed" | "failed" | "not_configured";
79
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
90
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
80
91
  noChanges: boolean;
92
+ checks: "failed" | "not_configured" | "passed";
93
+ review: "approved" | "blocked" | "not_run";
94
+ reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
81
95
  work_state?: {
82
- source: "constrained" | "validated" | "absent";
83
- state: "completed" | "needs_input" | "incomplete" | "unverified";
96
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
97
+ source: "absent" | "constrained" | "validated";
84
98
  required_inputs?: {
85
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
86
- description: string;
99
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
87
100
  locator: string | null;
101
+ description: string;
88
102
  }[] | undefined;
89
103
  } | undefined;
90
104
  }, {
91
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
92
- review?: "not_run" | "approved" | "blocked" | undefined;
93
- reason?: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null | undefined;
94
- checks?: "passed" | "failed" | "not_configured" | undefined;
105
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
95
106
  noChanges?: boolean | undefined;
107
+ checks?: "failed" | "not_configured" | "passed" | undefined;
108
+ review?: "approved" | "blocked" | "not_run" | undefined;
109
+ reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
96
110
  work_state?: {
97
- source: "constrained" | "validated" | "absent";
98
- state: "completed" | "needs_input" | "incomplete" | "unverified";
111
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
112
+ source: "absent" | "constrained" | "validated";
99
113
  required_inputs?: {
100
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
101
- description: string;
114
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
102
115
  locator?: string | null | undefined;
116
+ description: string;
103
117
  }[] | undefined;
104
118
  } | undefined;
105
119
  }>>>;
120
+ failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
121
+ phase: z.ZodDefault<z.ZodString>;
122
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
123
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout"]>>>;
124
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
125
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
126
+ safeMessage: z.ZodString;
127
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
128
+ logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
129
+ eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
130
+ runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
131
+ nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ phase: string;
134
+ category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
135
+ code: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null;
136
+ harnessId: string | null;
137
+ attemptId: string | null;
138
+ safeMessage: string;
139
+ rawDetailRef: string | null;
140
+ logRefs: string[];
141
+ eventRefs: string[];
142
+ runDir: string | null;
143
+ nextActions: string[];
144
+ }, {
145
+ phase?: string | undefined;
146
+ category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
147
+ code?: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null | undefined;
148
+ harnessId?: string | null | undefined;
149
+ attemptId?: string | null | undefined;
150
+ safeMessage: string;
151
+ rawDetailRef?: string | null | undefined;
152
+ logRefs?: string[] | undefined;
153
+ eventRefs?: string[] | undefined;
154
+ runDir?: string | null | undefined;
155
+ nextActions?: string[] | undefined;
156
+ }>>>;
106
157
  applyEligibility: z.ZodNullable<z.ZodObject<{
107
158
  eligible: z.ZodBoolean;
108
159
  state: z.ZodNullable<z.ZodString>;
109
160
  reason: z.ZodNullable<z.ZodString>;
110
161
  requiredAction: z.ZodNullable<z.ZodString>;
111
162
  }, "strip", z.ZodTypeAny, {
163
+ eligible: boolean;
112
164
  state: string | null;
113
165
  reason: string | null;
114
- eligible: boolean;
115
166
  requiredAction: string | null;
116
167
  }, {
168
+ eligible: boolean;
117
169
  state: string | null;
118
170
  reason: string | null;
119
- eligible: boolean;
120
171
  requiredAction: string | null;
121
172
  }>>;
122
173
  outcomeBanner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -124,12 +175,28 @@ export declare const McpRunToolResult: z.ZodObject<{
124
175
  state: z.ZodEnum<["ready", "needs_answers", "unverified"]>;
125
176
  questionCount: z.ZodDefault<z.ZodNumber>;
126
177
  }, "strict", z.ZodTypeAny, {
127
- state: "ready" | "unverified" | "needs_answers";
178
+ state: "needs_answers" | "ready" | "unverified";
128
179
  questionCount: number;
129
180
  }, {
130
- state: "ready" | "unverified" | "needs_answers";
181
+ state: "needs_answers" | "ready" | "unverified";
131
182
  questionCount?: number | undefined;
132
183
  }>>>;
184
+ /** Typed disclosure that the post-terminal detail read DEGRADED: the run
185
+ * finished and its result survived, but the detail projections above are
186
+ * absent for this machine-readable reason (e.g. run_facts_invalid). */
187
+ detailProblem: z.ZodDefault<z.ZodNullable<z.ZodObject<{
188
+ code: z.ZodNullable<z.ZodString>;
189
+ message: z.ZodString;
190
+ retryable: z.ZodNullable<z.ZodBoolean>;
191
+ }, "strict", z.ZodTypeAny, {
192
+ code: string | null;
193
+ message: string;
194
+ retryable: boolean | null;
195
+ }, {
196
+ code: string | null;
197
+ message: string;
198
+ retryable: boolean | null;
199
+ }>>>;
133
200
  /** Council membership + merge disclosure (QA-023b) so an MCP host can
134
201
  * machine-verify a `--council` plan was really N/N and who merged, without
135
202
  * reading local artifacts; null for solo/non-plan tools and deferred handles. */
@@ -144,26 +211,26 @@ export declare const McpRunToolResult: z.ZodObject<{
144
211
  status: z.ZodEnum<["drafted", "failed", "merged"]>;
145
212
  error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
146
213
  }, "strict", z.ZodTypeAny, {
147
- status: "failed" | "drafted" | "merged";
148
214
  harnessId: string;
215
+ role: "member" | "primary";
216
+ status: "drafted" | "failed" | "merged";
149
217
  error: string | null;
150
- role: "primary" | "member";
151
218
  }, {
152
- status: "failed" | "drafted" | "merged";
153
219
  harnessId: string;
154
- role: "primary" | "member";
220
+ role: "member" | "primary";
221
+ status: "drafted" | "failed" | "merged";
155
222
  error?: string | null | undefined;
156
223
  }>, "many">>;
157
224
  }, "strict", z.ZodTypeAny, {
158
225
  requested: number;
159
- degraded: boolean;
160
226
  drafted: number;
227
+ degraded: boolean;
161
228
  mergedBy: string | null;
162
229
  members: {
163
- status: "failed" | "drafted" | "merged";
164
230
  harnessId: string;
231
+ role: "member" | "primary";
232
+ status: "drafted" | "failed" | "merged";
165
233
  error: string | null;
166
- role: "primary" | "member";
167
234
  }[];
168
235
  }, {
169
236
  requested: number;
@@ -171,9 +238,9 @@ export declare const McpRunToolResult: z.ZodObject<{
171
238
  degraded?: boolean | undefined;
172
239
  mergedBy?: string | null | undefined;
173
240
  members?: {
174
- status: "failed" | "drafted" | "merged";
175
241
  harnessId: string;
176
- role: "primary" | "member";
242
+ role: "member" | "primary";
243
+ status: "drafted" | "failed" | "merged";
177
244
  error?: string | null | undefined;
178
245
  }[] | undefined;
179
246
  }>>>;
@@ -188,100 +255,148 @@ export declare const McpRunToolResult: z.ZodObject<{
188
255
  }, "strict", z.ZodTypeAny, {
189
256
  requested: boolean;
190
257
  effective: boolean;
191
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
192
- remediation: string | null;
193
258
  used: boolean;
259
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
260
+ remediation: string | null;
194
261
  }, {
195
262
  requested?: boolean | undefined;
196
263
  effective?: boolean | undefined;
197
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
198
- remediation?: string | null | undefined;
199
264
  used?: boolean | undefined;
265
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
266
+ remediation?: string | null | undefined;
200
267
  }>, {
201
268
  requested: boolean;
202
269
  effective: boolean;
203
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
204
- remediation: string | null;
205
270
  used: boolean;
271
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
272
+ remediation: string | null;
206
273
  }, {
207
274
  requested?: boolean | undefined;
208
275
  effective?: boolean | undefined;
209
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
210
- remediation?: string | null | undefined;
211
276
  used?: boolean | undefined;
277
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
278
+ remediation?: string | null | undefined;
212
279
  }>>>;
213
280
  }, "strip", z.ZodTypeAny, {
214
- status: string | null;
215
281
  summary: string;
216
- parentRunId: string | null;
217
- delegatedFromRunId: string | null;
218
- delegation: {
219
- requested: boolean;
220
- effective: boolean;
221
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
222
- remediation: string | null;
223
- used: boolean;
224
- } | null;
225
282
  runId: string | null;
226
283
  runDir: string | null;
227
- council: {
228
- requested: number;
229
- degraded: boolean;
230
- drafted: number;
231
- mergedBy: string | null;
232
- members: {
233
- status: "failed" | "drafted" | "merged";
234
- harnessId: string;
235
- error: string | null;
236
- role: "primary" | "member";
237
- }[];
238
- } | null;
284
+ status: string | null;
239
285
  outcomeFacts: {
240
- review: "not_run" | "approved" | "blocked";
241
- reason: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null;
242
- checks: "passed" | "failed" | "not_configured";
243
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
286
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
244
287
  noChanges: boolean;
288
+ checks: "failed" | "not_configured" | "passed";
289
+ review: "approved" | "blocked" | "not_run";
290
+ reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
245
291
  work_state?: {
246
- source: "constrained" | "validated" | "absent";
247
- state: "completed" | "needs_input" | "incomplete" | "unverified";
292
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
293
+ source: "absent" | "constrained" | "validated";
248
294
  required_inputs?: {
249
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
250
- description: string;
295
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
251
296
  locator: string | null;
297
+ description: string;
252
298
  }[] | undefined;
253
299
  } | undefined;
254
300
  } | null;
301
+ failure: {
302
+ phase: string;
303
+ category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
304
+ code: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null;
305
+ harnessId: string | null;
306
+ attemptId: string | null;
307
+ safeMessage: string;
308
+ rawDetailRef: string | null;
309
+ logRefs: string[];
310
+ eventRefs: string[];
311
+ runDir: string | null;
312
+ nextActions: string[];
313
+ } | null;
255
314
  applyEligibility: {
315
+ eligible: boolean;
256
316
  state: string | null;
257
317
  reason: string | null;
258
- eligible: boolean;
259
318
  requiredAction: string | null;
260
319
  } | null;
261
320
  outcomeBanner: string | null;
262
321
  planReadiness: {
263
- state: "ready" | "unverified" | "needs_answers";
322
+ state: "needs_answers" | "ready" | "unverified";
264
323
  questionCount: number;
265
324
  } | null;
325
+ detailProblem: {
326
+ code: string | null;
327
+ message: string;
328
+ retryable: boolean | null;
329
+ } | null;
330
+ council: {
331
+ requested: number;
332
+ drafted: number;
333
+ degraded: boolean;
334
+ mergedBy: string | null;
335
+ members: {
336
+ harnessId: string;
337
+ role: "member" | "primary";
338
+ status: "drafted" | "failed" | "merged";
339
+ error: string | null;
340
+ }[];
341
+ } | null;
342
+ parentRunId: string | null;
343
+ delegatedFromRunId: string | null;
344
+ delegation: {
345
+ requested: boolean;
346
+ effective: boolean;
347
+ used: boolean;
348
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
349
+ remediation: string | null;
350
+ } | null;
266
351
  }, {
267
- status: string | null;
268
352
  summary: string;
269
353
  runId: string | null;
270
354
  runDir: string | null;
355
+ status: string | null;
356
+ outcomeFacts?: {
357
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
358
+ noChanges?: boolean | undefined;
359
+ checks?: "failed" | "not_configured" | "passed" | undefined;
360
+ review?: "approved" | "blocked" | "not_run" | undefined;
361
+ reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
362
+ work_state?: {
363
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
364
+ source: "absent" | "constrained" | "validated";
365
+ required_inputs?: {
366
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
367
+ locator?: string | null | undefined;
368
+ description: string;
369
+ }[] | undefined;
370
+ } | undefined;
371
+ } | null | undefined;
372
+ failure?: {
373
+ phase?: string | undefined;
374
+ category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
375
+ code?: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null | undefined;
376
+ harnessId?: string | null | undefined;
377
+ attemptId?: string | null | undefined;
378
+ safeMessage: string;
379
+ rawDetailRef?: string | null | undefined;
380
+ logRefs?: string[] | undefined;
381
+ eventRefs?: string[] | undefined;
382
+ runDir?: string | null | undefined;
383
+ nextActions?: string[] | undefined;
384
+ } | null | undefined;
271
385
  applyEligibility: {
386
+ eligible: boolean;
272
387
  state: string | null;
273
388
  reason: string | null;
274
- eligible: boolean;
275
389
  requiredAction: string | null;
276
390
  } | null;
277
- parentRunId?: string | null | undefined;
278
- delegatedFromRunId?: string | null | undefined;
279
- delegation?: {
280
- requested?: boolean | undefined;
281
- effective?: boolean | undefined;
282
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
283
- remediation?: string | null | undefined;
284
- used?: boolean | undefined;
391
+ outcomeBanner?: string | null | undefined;
392
+ planReadiness?: {
393
+ state: "needs_answers" | "ready" | "unverified";
394
+ questionCount?: number | undefined;
395
+ } | null | undefined;
396
+ detailProblem?: {
397
+ code: string | null;
398
+ message: string;
399
+ retryable: boolean | null;
285
400
  } | null | undefined;
286
401
  council?: {
287
402
  requested: number;
@@ -289,32 +404,20 @@ export declare const McpRunToolResult: z.ZodObject<{
289
404
  degraded?: boolean | undefined;
290
405
  mergedBy?: string | null | undefined;
291
406
  members?: {
292
- status: "failed" | "drafted" | "merged";
293
407
  harnessId: string;
294
- role: "primary" | "member";
408
+ role: "member" | "primary";
409
+ status: "drafted" | "failed" | "merged";
295
410
  error?: string | null | undefined;
296
411
  }[] | undefined;
297
412
  } | null | undefined;
298
- outcomeFacts?: {
299
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
300
- review?: "not_run" | "approved" | "blocked" | undefined;
301
- reason?: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null | undefined;
302
- checks?: "passed" | "failed" | "not_configured" | undefined;
303
- noChanges?: boolean | undefined;
304
- work_state?: {
305
- source: "constrained" | "validated" | "absent";
306
- state: "completed" | "needs_input" | "incomplete" | "unverified";
307
- required_inputs?: {
308
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
309
- description: string;
310
- locator?: string | null | undefined;
311
- }[] | undefined;
312
- } | undefined;
313
- } | null | undefined;
314
- outcomeBanner?: string | null | undefined;
315
- planReadiness?: {
316
- state: "ready" | "unverified" | "needs_answers";
317
- questionCount?: number | undefined;
413
+ parentRunId?: string | null | undefined;
414
+ delegatedFromRunId?: string | null | undefined;
415
+ delegation?: {
416
+ requested?: boolean | undefined;
417
+ effective?: boolean | undefined;
418
+ used?: boolean | undefined;
419
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
420
+ remediation?: string | null | undefined;
318
421
  } | null | undefined;
319
422
  }>;
320
423
  export type McpRunToolResult = z.infer<typeof McpRunToolResult>;
@@ -337,7 +440,7 @@ export declare const McpRunHandleResult: z.ZodObject<{
337
440
  noChanges: z.ZodDefault<z.ZodBoolean>;
338
441
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
339
442
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
340
- reason: z.ZodDefault<z.ZodNullable<z.ZodEnum<["harness_failed", "no_changes", "review_blocked", "checks_failed", "budget_exhausted", "budget_overshoot", "cost_unverifiable", "not_converged", "stuck_no_progress", "wall_clock_exceeded", "user_cancelled", "crash_interrupted", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
443
+ reason: z.ZodDefault<z.ZodNullable<z.ZodEnum<["harness_failed", "no_changes", "review_blocked", "checks_failed", "budget_exhausted", "budget_overshoot", "cost_unverifiable", "not_converged", "stuck_no_progress", "wall_clock_exceeded", "user_cancelled", "crash_interrupted", "workspace_unavailable", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
341
444
  work_state: z.ZodOptional<z.ZodObject<{
342
445
  state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
343
446
  source: z.ZodEnum<["constrained", "validated", "absent"]>;
@@ -346,62 +449,99 @@ export declare const McpRunHandleResult: z.ZodObject<{
346
449
  locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
347
450
  description: z.ZodString;
348
451
  }, "strip", z.ZodTypeAny, {
349
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
350
- description: string;
452
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
351
453
  locator: string | null;
352
- }, {
353
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
354
454
  description: string;
455
+ }, {
456
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
355
457
  locator?: string | null | undefined;
458
+ description: string;
356
459
  }>, "many">>;
357
460
  }, "strip", z.ZodTypeAny, {
358
- source: "constrained" | "validated" | "absent";
359
- state: "completed" | "needs_input" | "incomplete" | "unverified";
461
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
462
+ source: "absent" | "constrained" | "validated";
360
463
  required_inputs?: {
361
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
362
- description: string;
464
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
363
465
  locator: string | null;
466
+ description: string;
364
467
  }[] | undefined;
365
468
  }, {
366
- source: "constrained" | "validated" | "absent";
367
- state: "completed" | "needs_input" | "incomplete" | "unverified";
469
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
470
+ source: "absent" | "constrained" | "validated";
368
471
  required_inputs?: {
369
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
370
- description: string;
472
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
371
473
  locator?: string | null | undefined;
474
+ description: string;
372
475
  }[] | undefined;
373
476
  }>>;
374
477
  }, "strict", z.ZodTypeAny, {
375
- review: "not_run" | "approved" | "blocked";
376
- reason: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null;
377
- checks: "passed" | "failed" | "not_configured";
378
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
478
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
379
479
  noChanges: boolean;
480
+ checks: "failed" | "not_configured" | "passed";
481
+ review: "approved" | "blocked" | "not_run";
482
+ reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
380
483
  work_state?: {
381
- source: "constrained" | "validated" | "absent";
382
- state: "completed" | "needs_input" | "incomplete" | "unverified";
484
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
485
+ source: "absent" | "constrained" | "validated";
383
486
  required_inputs?: {
384
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
385
- description: string;
487
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
386
488
  locator: string | null;
489
+ description: string;
387
490
  }[] | undefined;
388
491
  } | undefined;
389
492
  }, {
390
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
391
- review?: "not_run" | "approved" | "blocked" | undefined;
392
- reason?: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null | undefined;
393
- checks?: "passed" | "failed" | "not_configured" | undefined;
493
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
394
494
  noChanges?: boolean | undefined;
495
+ checks?: "failed" | "not_configured" | "passed" | undefined;
496
+ review?: "approved" | "blocked" | "not_run" | undefined;
497
+ reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
395
498
  work_state?: {
396
- source: "constrained" | "validated" | "absent";
397
- state: "completed" | "needs_input" | "incomplete" | "unverified";
499
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
500
+ source: "absent" | "constrained" | "validated";
398
501
  required_inputs?: {
399
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
400
- description: string;
502
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
401
503
  locator?: string | null | undefined;
504
+ description: string;
402
505
  }[] | undefined;
403
506
  } | undefined;
404
507
  }>>>;
508
+ failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
509
+ phase: z.ZodDefault<z.ZodString>;
510
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
511
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout"]>>>;
512
+ harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
513
+ attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
514
+ safeMessage: z.ZodString;
515
+ rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
516
+ logRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
517
+ eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
518
+ runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
519
+ nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ phase: string;
522
+ category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
523
+ code: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null;
524
+ harnessId: string | null;
525
+ attemptId: string | null;
526
+ safeMessage: string;
527
+ rawDetailRef: string | null;
528
+ logRefs: string[];
529
+ eventRefs: string[];
530
+ runDir: string | null;
531
+ nextActions: string[];
532
+ }, {
533
+ phase?: string | undefined;
534
+ category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
535
+ code?: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null | undefined;
536
+ harnessId?: string | null | undefined;
537
+ attemptId?: string | null | undefined;
538
+ safeMessage: string;
539
+ rawDetailRef?: string | null | undefined;
540
+ logRefs?: string[] | undefined;
541
+ eventRefs?: string[] | undefined;
542
+ runDir?: string | null | undefined;
543
+ nextActions?: string[] | undefined;
544
+ }>>>;
405
545
  outcomeBanner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
406
546
  applyEligibility: z.ZodDefault<z.ZodNullable<z.ZodObject<{
407
547
  eligible: z.ZodBoolean;
@@ -409,24 +549,24 @@ export declare const McpRunHandleResult: z.ZodObject<{
409
549
  reason: z.ZodNullable<z.ZodString>;
410
550
  requiredAction: z.ZodNullable<z.ZodString>;
411
551
  }, "strip", z.ZodTypeAny, {
552
+ eligible: boolean;
412
553
  state: string | null;
413
554
  reason: string | null;
414
- eligible: boolean;
415
555
  requiredAction: string | null;
416
556
  }, {
557
+ eligible: boolean;
417
558
  state: string | null;
418
559
  reason: string | null;
419
- eligible: boolean;
420
560
  requiredAction: string | null;
421
561
  }>>>;
422
562
  planReadiness: z.ZodDefault<z.ZodNullable<z.ZodObject<{
423
563
  state: z.ZodEnum<["ready", "needs_answers", "unverified"]>;
424
564
  questionCount: z.ZodDefault<z.ZodNumber>;
425
565
  }, "strict", z.ZodTypeAny, {
426
- state: "ready" | "unverified" | "needs_answers";
566
+ state: "needs_answers" | "ready" | "unverified";
427
567
  questionCount: number;
428
568
  }, {
429
- state: "ready" | "unverified" | "needs_answers";
569
+ state: "needs_answers" | "ready" | "unverified";
430
570
  questionCount?: number | undefined;
431
571
  }>>>;
432
572
  /** Council membership + merge disclosure (QA-023b), projected from the same
@@ -442,26 +582,26 @@ export declare const McpRunHandleResult: z.ZodObject<{
442
582
  status: z.ZodEnum<["drafted", "failed", "merged"]>;
443
583
  error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
444
584
  }, "strict", z.ZodTypeAny, {
445
- status: "failed" | "drafted" | "merged";
446
585
  harnessId: string;
586
+ role: "member" | "primary";
587
+ status: "drafted" | "failed" | "merged";
447
588
  error: string | null;
448
- role: "primary" | "member";
449
589
  }, {
450
- status: "failed" | "drafted" | "merged";
451
590
  harnessId: string;
452
- role: "primary" | "member";
591
+ role: "member" | "primary";
592
+ status: "drafted" | "failed" | "merged";
453
593
  error?: string | null | undefined;
454
594
  }>, "many">>;
455
595
  }, "strict", z.ZodTypeAny, {
456
596
  requested: number;
457
- degraded: boolean;
458
597
  drafted: number;
598
+ degraded: boolean;
459
599
  mergedBy: string | null;
460
600
  members: {
461
- status: "failed" | "drafted" | "merged";
462
601
  harnessId: string;
602
+ role: "member" | "primary";
603
+ status: "drafted" | "failed" | "merged";
463
604
  error: string | null;
464
- role: "primary" | "member";
465
605
  }[];
466
606
  }, {
467
607
  requested: number;
@@ -469,9 +609,9 @@ export declare const McpRunHandleResult: z.ZodObject<{
469
609
  degraded?: boolean | undefined;
470
610
  mergedBy?: string | null | undefined;
471
611
  members?: {
472
- status: "failed" | "drafted" | "merged";
473
612
  harnessId: string;
474
- role: "primary" | "member";
613
+ role: "member" | "primary";
614
+ status: "drafted" | "failed" | "merged";
475
615
  error?: string | null | undefined;
476
616
  }[] | undefined;
477
617
  }>>>;
@@ -504,8 +644,6 @@ export declare const McpRunHandleResult: z.ZodObject<{
504
644
  source: z.ZodDefault<z.ZodEnum<["decision", "events", "settings", "unknown"]>>;
505
645
  evidence: z.ZodDefault<z.ZodEnum<["complete", "incomplete", "unavailable"]>>;
506
646
  }, "strip", z.ZodTypeAny, {
507
- source: "unknown" | "decision" | "events" | "settings";
508
- estimated: boolean;
509
647
  paidBudget: {
510
648
  kind: "unlimited";
511
649
  } | {
@@ -514,12 +652,12 @@ export declare const McpRunHandleResult: z.ZodObject<{
514
652
  };
515
653
  spendUsd: number | null;
516
654
  valuationUsd: number | null;
517
- valuationKnowledge: "exact" | "unknown" | "estimated";
655
+ valuationKnowledge: "estimated" | "exact" | "unknown";
518
656
  remainingUsd: number | null;
519
- evidence: "unavailable" | "incomplete" | "complete";
657
+ estimated: boolean;
658
+ source: "decision" | "events" | "settings" | "unknown";
659
+ evidence: "complete" | "incomplete" | "unavailable";
520
660
  }, {
521
- source?: "unknown" | "decision" | "events" | "settings" | undefined;
522
- estimated?: boolean | undefined;
523
661
  paidBudget?: {
524
662
  kind: "unlimited";
525
663
  } | {
@@ -528,9 +666,11 @@ export declare const McpRunHandleResult: z.ZodObject<{
528
666
  } | undefined;
529
667
  spendUsd?: number | null | undefined;
530
668
  valuationUsd?: number | null | undefined;
531
- valuationKnowledge?: "exact" | "unknown" | "estimated" | undefined;
669
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
532
670
  remainingUsd?: number | null | undefined;
533
- evidence?: "unavailable" | "incomplete" | "complete" | undefined;
671
+ estimated?: boolean | undefined;
672
+ source?: "decision" | "events" | "settings" | "unknown" | undefined;
673
+ evidence?: "complete" | "incomplete" | "unavailable" | undefined;
534
674
  }>>>;
535
675
  parentRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
536
676
  delegatedFromRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -543,168 +683,217 @@ export declare const McpRunHandleResult: z.ZodObject<{
543
683
  }, "strict", z.ZodTypeAny, {
544
684
  requested: boolean;
545
685
  effective: boolean;
546
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
547
- remediation: string | null;
548
686
  used: boolean;
687
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
688
+ remediation: string | null;
549
689
  }, {
550
690
  requested?: boolean | undefined;
551
691
  effective?: boolean | undefined;
552
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
553
- remediation?: string | null | undefined;
554
692
  used?: boolean | undefined;
693
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
694
+ remediation?: string | null | undefined;
555
695
  }>, {
556
696
  requested: boolean;
557
697
  effective: boolean;
558
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
559
- remediation: string | null;
560
698
  used: boolean;
699
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
700
+ remediation: string | null;
561
701
  }, {
562
702
  requested?: boolean | undefined;
563
703
  effective?: boolean | undefined;
564
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
565
- remediation?: string | null | undefined;
566
704
  used?: boolean | undefined;
705
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
706
+ remediation?: string | null | undefined;
707
+ }>>>;
708
+ detailProblem: z.ZodDefault<z.ZodNullable<z.ZodObject<{
709
+ code: z.ZodNullable<z.ZodString>;
710
+ message: z.ZodString;
711
+ retryable: z.ZodNullable<z.ZodBoolean>;
712
+ }, "strict", z.ZodTypeAny, {
713
+ code: string | null;
714
+ message: string;
715
+ retryable: boolean | null;
716
+ }, {
717
+ code: string | null;
718
+ message: string;
719
+ retryable: boolean | null;
567
720
  }>>>;
568
721
  }, "strict", z.ZodTypeAny, {
569
- status: string | null;
570
722
  summary: string;
571
- parentRunId: string | null;
572
- delegatedFromRunId: string | null;
573
- delegation: {
574
- requested: boolean;
575
- effective: boolean;
576
- reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
577
- remediation: string | null;
578
- used: boolean;
579
- } | null;
580
- budget: {
581
- source: "unknown" | "decision" | "events" | "settings";
582
- estimated: boolean;
583
- paidBudget: {
584
- kind: "unlimited";
585
- } | {
586
- kind: "finite";
587
- maxUsd: number;
588
- };
589
- spendUsd: number | null;
590
- valuationUsd: number | null;
591
- valuationKnowledge: "exact" | "unknown" | "estimated";
592
- remainingUsd: number | null;
593
- evidence: "unavailable" | "incomplete" | "complete";
594
- } | null;
595
723
  runId: string | null;
596
724
  runDir: string | null;
597
- council: {
598
- requested: number;
599
- degraded: boolean;
600
- drafted: number;
601
- mergedBy: string | null;
602
- members: {
603
- status: "failed" | "drafted" | "merged";
604
- harnessId: string;
605
- error: string | null;
606
- role: "primary" | "member";
607
- }[];
608
- } | null;
725
+ status: string | null;
726
+ decisionStatus: string | null;
727
+ pendingInteractions: number | null;
609
728
  outcomeFacts: {
610
- review: "not_run" | "approved" | "blocked";
611
- reason: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null;
612
- checks: "passed" | "failed" | "not_configured";
613
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
729
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
614
730
  noChanges: boolean;
731
+ checks: "failed" | "not_configured" | "passed";
732
+ review: "approved" | "blocked" | "not_run";
733
+ reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
615
734
  work_state?: {
616
- source: "constrained" | "validated" | "absent";
617
- state: "completed" | "needs_input" | "incomplete" | "unverified";
735
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
736
+ source: "absent" | "constrained" | "validated";
618
737
  required_inputs?: {
619
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
620
- description: string;
738
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
621
739
  locator: string | null;
740
+ description: string;
622
741
  }[] | undefined;
623
742
  } | undefined;
624
743
  } | null;
744
+ failure: {
745
+ phase: string;
746
+ category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
747
+ code: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null;
748
+ harnessId: string | null;
749
+ attemptId: string | null;
750
+ safeMessage: string;
751
+ rawDetailRef: string | null;
752
+ logRefs: string[];
753
+ eventRefs: string[];
754
+ runDir: string | null;
755
+ nextActions: string[];
756
+ } | null;
757
+ outcomeBanner: string | null;
625
758
  applyEligibility: {
759
+ eligible: boolean;
626
760
  state: string | null;
627
761
  reason: string | null;
628
- eligible: boolean;
629
762
  requiredAction: string | null;
630
763
  } | null;
631
- outcomeBanner: string | null;
632
764
  planReadiness: {
633
- state: "ready" | "unverified" | "needs_answers";
765
+ state: "needs_answers" | "ready" | "unverified";
634
766
  questionCount: number;
635
767
  } | null;
636
- decisionStatus: string | null;
637
- pendingInteractions: number | null;
638
- }, {
639
- summary: string;
640
- status?: string | null | undefined;
641
- parentRunId?: string | null | undefined;
642
- delegatedFromRunId?: string | null | undefined;
643
- delegation?: {
644
- requested?: boolean | undefined;
645
- effective?: boolean | undefined;
646
- reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
647
- remediation?: string | null | undefined;
648
- used?: boolean | undefined;
649
- } | null | undefined;
650
- budget?: {
651
- source?: "unknown" | "decision" | "events" | "settings" | undefined;
652
- estimated?: boolean | undefined;
653
- paidBudget?: {
768
+ council: {
769
+ requested: number;
770
+ drafted: number;
771
+ degraded: boolean;
772
+ mergedBy: string | null;
773
+ members: {
774
+ harnessId: string;
775
+ role: "member" | "primary";
776
+ status: "drafted" | "failed" | "merged";
777
+ error: string | null;
778
+ }[];
779
+ } | null;
780
+ budget: {
781
+ paidBudget: {
654
782
  kind: "unlimited";
655
783
  } | {
656
784
  kind: "finite";
657
785
  maxUsd: number;
658
- } | undefined;
659
- spendUsd?: number | null | undefined;
660
- valuationUsd?: number | null | undefined;
661
- valuationKnowledge?: "exact" | "unknown" | "estimated" | undefined;
662
- remainingUsd?: number | null | undefined;
663
- evidence?: "unavailable" | "incomplete" | "complete" | undefined;
664
- } | null | undefined;
786
+ };
787
+ spendUsd: number | null;
788
+ valuationUsd: number | null;
789
+ valuationKnowledge: "estimated" | "exact" | "unknown";
790
+ remainingUsd: number | null;
791
+ estimated: boolean;
792
+ source: "decision" | "events" | "settings" | "unknown";
793
+ evidence: "complete" | "incomplete" | "unavailable";
794
+ } | null;
795
+ parentRunId: string | null;
796
+ delegatedFromRunId: string | null;
797
+ delegation: {
798
+ requested: boolean;
799
+ effective: boolean;
800
+ used: boolean;
801
+ reason: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used";
802
+ remediation: string | null;
803
+ } | null;
804
+ detailProblem: {
805
+ code: string | null;
806
+ message: string;
807
+ retryable: boolean | null;
808
+ } | null;
809
+ }, {
810
+ summary: string;
665
811
  runId?: string | null | undefined;
666
812
  runDir?: string | null | undefined;
667
- council?: {
668
- requested: number;
669
- drafted: number;
670
- degraded?: boolean | undefined;
671
- mergedBy?: string | null | undefined;
672
- members?: {
673
- status: "failed" | "drafted" | "merged";
674
- harnessId: string;
675
- role: "primary" | "member";
676
- error?: string | null | undefined;
677
- }[] | undefined;
678
- } | null | undefined;
813
+ status?: string | null | undefined;
814
+ decisionStatus?: string | null | undefined;
815
+ pendingInteractions?: number | null | undefined;
679
816
  outcomeFacts?: {
680
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
681
- review?: "not_run" | "approved" | "blocked" | undefined;
682
- reason?: "harness_failed" | "no_changes" | "review_blocked" | "checks_failed" | "budget_exhausted" | "budget_overshoot" | "cost_unverifiable" | "not_converged" | "stuck_no_progress" | "wall_clock_exceeded" | "user_cancelled" | "crash_interrupted" | "input_required" | "work_incomplete" | "context_capacity_exhausted" | "work_report_contract" | null | undefined;
683
- checks?: "passed" | "failed" | "not_configured" | undefined;
817
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
684
818
  noChanges?: boolean | undefined;
819
+ checks?: "failed" | "not_configured" | "passed" | undefined;
820
+ review?: "approved" | "blocked" | "not_run" | undefined;
821
+ reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "input_required" | "no_changes" | "not_converged" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
685
822
  work_state?: {
686
- source: "constrained" | "validated" | "absent";
687
- state: "completed" | "needs_input" | "incomplete" | "unverified";
823
+ state: "completed" | "incomplete" | "needs_input" | "unverified";
824
+ source: "absent" | "constrained" | "validated";
688
825
  required_inputs?: {
689
- kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
690
- description: string;
826
+ kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission";
691
827
  locator?: string | null | undefined;
828
+ description: string;
692
829
  }[] | undefined;
693
830
  } | undefined;
694
831
  } | null | undefined;
832
+ failure?: {
833
+ phase?: string | undefined;
834
+ category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
835
+ code?: "budget_overshoot" | "cost_unverifiable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "unknown_paid_in_flight" | null | undefined;
836
+ harnessId?: string | null | undefined;
837
+ attemptId?: string | null | undefined;
838
+ safeMessage: string;
839
+ rawDetailRef?: string | null | undefined;
840
+ logRefs?: string[] | undefined;
841
+ eventRefs?: string[] | undefined;
842
+ runDir?: string | null | undefined;
843
+ nextActions?: string[] | undefined;
844
+ } | null | undefined;
845
+ outcomeBanner?: string | null | undefined;
695
846
  applyEligibility?: {
847
+ eligible: boolean;
696
848
  state: string | null;
697
849
  reason: string | null;
698
- eligible: boolean;
699
850
  requiredAction: string | null;
700
851
  } | null | undefined;
701
- outcomeBanner?: string | null | undefined;
702
852
  planReadiness?: {
703
- state: "ready" | "unverified" | "needs_answers";
853
+ state: "needs_answers" | "ready" | "unverified";
704
854
  questionCount?: number | undefined;
705
855
  } | null | undefined;
706
- decisionStatus?: string | null | undefined;
707
- pendingInteractions?: number | null | undefined;
856
+ council?: {
857
+ requested: number;
858
+ drafted: number;
859
+ degraded?: boolean | undefined;
860
+ mergedBy?: string | null | undefined;
861
+ members?: {
862
+ harnessId: string;
863
+ role: "member" | "primary";
864
+ status: "drafted" | "failed" | "merged";
865
+ error?: string | null | undefined;
866
+ }[] | undefined;
867
+ } | null | undefined;
868
+ budget?: {
869
+ paidBudget?: {
870
+ kind: "unlimited";
871
+ } | {
872
+ kind: "finite";
873
+ maxUsd: number;
874
+ } | undefined;
875
+ spendUsd?: number | null | undefined;
876
+ valuationUsd?: number | null | undefined;
877
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
878
+ remainingUsd?: number | null | undefined;
879
+ estimated?: boolean | undefined;
880
+ source?: "decision" | "events" | "settings" | "unknown" | undefined;
881
+ evidence?: "complete" | "incomplete" | "unavailable" | undefined;
882
+ } | null | undefined;
883
+ parentRunId?: string | null | undefined;
884
+ delegatedFromRunId?: string | null | undefined;
885
+ delegation?: {
886
+ requested?: boolean | undefined;
887
+ effective?: boolean | undefined;
888
+ used?: boolean | undefined;
889
+ reason?: "access_profile_incompatible" | "injected_unused" | "manifest_unsupported" | "not_requested" | "partially_degraded" | "pending" | "runtime_unavailable" | "startup_failed" | "used" | undefined;
890
+ remediation?: string | null | undefined;
891
+ } | null | undefined;
892
+ detailProblem?: {
893
+ code: string | null;
894
+ message: string;
895
+ retryable: boolean | null;
896
+ } | null | undefined;
708
897
  }>;
709
898
  export type McpRunHandleResult = z.infer<typeof McpRunHandleResult>;
710
899
  //# sourceMappingURL=apply-eligibility.d.ts.map