@claudexor/schema 3.0.4 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/agent-capabilities.d.ts +45 -8
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +14 -0
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +384 -18
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +20 -1
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/budget.d.ts +84 -9
  10. package/dist/budget.d.ts.map +1 -1
  11. package/dist/budget.js +46 -0
  12. package/dist/budget.js.map +1 -1
  13. package/dist/config.d.ts +97 -65
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +12 -1
  16. package/dist/config.js.map +1 -1
  17. package/dist/control-operation-responses.d.ts +311 -89
  18. package/dist/control-operation-responses.d.ts.map +1 -1
  19. package/dist/control-operation-responses.js +33 -3
  20. package/dist/control-operation-responses.js.map +1 -1
  21. package/dist/control-run-detail.d.ts +613 -163
  22. package/dist/control-run-detail.d.ts.map +1 -1
  23. package/dist/control-run-detail.js +28 -2
  24. package/dist/control-run-detail.js.map +1 -1
  25. package/dist/control-run-retry.d.ts +1 -1
  26. package/dist/control-run-scope.d.ts +1 -1
  27. package/dist/control-thread-apply.d.ts +10 -0
  28. package/dist/control-thread-apply.d.ts.map +1 -1
  29. package/dist/control.d.ts +791 -232
  30. package/dist/control.d.ts.map +1 -1
  31. package/dist/control.js +76 -2
  32. package/dist/control.js.map +1 -1
  33. package/dist/decision.d.ts +205 -9
  34. package/dist/decision.d.ts.map +1 -1
  35. package/dist/decision.js +69 -1
  36. package/dist/decision.js.map +1 -1
  37. package/dist/deep-scan.d.ts +27 -0
  38. package/dist/deep-scan.d.ts.map +1 -0
  39. package/dist/deep-scan.js +27 -0
  40. package/dist/deep-scan.js.map +1 -0
  41. package/dist/delivery.d.ts +13 -0
  42. package/dist/delivery.d.ts.map +1 -1
  43. package/dist/delivery.js +15 -0
  44. package/dist/delivery.js.map +1 -1
  45. package/dist/effort.d.ts +132 -0
  46. package/dist/effort.d.ts.map +1 -0
  47. package/dist/effort.js +167 -0
  48. package/dist/effort.js.map +1 -0
  49. package/dist/events.d.ts +59 -4
  50. package/dist/events.d.ts.map +1 -1
  51. package/dist/events.js +91 -0
  52. package/dist/events.js.map +1 -1
  53. package/dist/gate.d.ts +2 -2
  54. package/dist/harness.d.ts +209 -28
  55. package/dist/harness.d.ts.map +1 -1
  56. package/dist/harness.js +107 -14
  57. package/dist/harness.js.map +1 -1
  58. package/dist/index.d.ts +4 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +4 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/operation.d.ts +193 -10
  63. package/dist/operation.d.ts.map +1 -1
  64. package/dist/operation.js +45 -0
  65. package/dist/operation.js.map +1 -1
  66. package/dist/output-schema-dialect.d.ts +22 -0
  67. package/dist/output-schema-dialect.d.ts.map +1 -0
  68. package/dist/output-schema-dialect.js +37 -0
  69. package/dist/output-schema-dialect.js.map +1 -0
  70. package/dist/output-schema.d.ts +26 -2
  71. package/dist/output-schema.d.ts.map +1 -1
  72. package/dist/output-schema.js +313 -16
  73. package/dist/output-schema.js.map +1 -1
  74. package/dist/plan.d.ts +2 -2
  75. package/dist/problem.d.ts +3 -3
  76. package/dist/project.d.ts +47 -12
  77. package/dist/project.d.ts.map +1 -1
  78. package/dist/project.js +32 -0
  79. package/dist/project.js.map +1 -1
  80. package/dist/readiness.d.ts +62 -7
  81. package/dist/readiness.d.ts.map +1 -1
  82. package/dist/recovery.d.ts +14 -14
  83. package/dist/review.d.ts +7 -7
  84. package/dist/route.d.ts +2 -2
  85. package/dist/setup.d.ts +288 -94
  86. package/dist/setup.d.ts.map +1 -1
  87. package/dist/setup.js +90 -6
  88. package/dist/setup.js.map +1 -1
  89. package/dist/status-projection.d.ts +79 -4
  90. package/dist/status-projection.d.ts.map +1 -1
  91. package/dist/status-projection.js +161 -4
  92. package/dist/status-projection.js.map +1 -1
  93. package/dist/task.d.ts +70 -53
  94. package/dist/task.d.ts.map +1 -1
  95. package/dist/task.js +18 -8
  96. package/dist/task.js.map +1 -1
  97. package/dist/telemetry.d.ts +795 -32
  98. package/dist/telemetry.d.ts.map +1 -1
  99. package/dist/telemetry.js +177 -4
  100. package/dist/telemetry.js.map +1 -1
  101. package/dist/tool-ref.d.ts +14 -0
  102. package/dist/tool-ref.d.ts.map +1 -1
  103. package/dist/tool-ref.js +15 -0
  104. package/dist/tool-ref.js.map +1 -1
  105. package/dist/work-report.d.ts +131 -0
  106. package/dist/work-report.d.ts.map +1 -0
  107. package/dist/work-report.js +124 -0
  108. package/dist/work-report.js.map +1 -0
  109. package/dist/workspace.d.ts +2 -2
  110. package/generated/AgentCapabilityCatalog.schema.json +39 -8
  111. package/generated/ControlApplyCheckResponse.schema.json +5 -0
  112. package/generated/ControlDeliveryResponse.schema.json +14 -0
  113. package/generated/ControlHarnessListResponse.schema.json +64 -9
  114. package/generated/ControlHarnessSettingsPatch.schema.json +4 -8
  115. package/generated/ControlOperationCatalog.schema.json +74 -0
  116. package/generated/ControlOperationDescriptor.schema.json +74 -0
  117. package/generated/ControlOperationParameter.schema.json +75 -0
  118. package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
  119. package/generated/ControlRunAgainDraft.schema.json +14 -7
  120. package/generated/ControlRunDetail.schema.json +406 -16
  121. package/generated/ControlRunListResponse.schema.json +232 -10
  122. package/generated/ControlRunStartRequest.schema.json +14 -7
  123. package/generated/ControlRunSummary.schema.json +218 -9
  124. package/generated/ControlSettingsSnapshot.schema.json +4 -8
  125. package/generated/ControlSettingsUpdateRequest.schema.json +4 -8
  126. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  127. package/generated/ControlSetupJobEvent.schema.json +28 -0
  128. package/generated/ControlSetupJobSnapshot.schema.json +28 -0
  129. package/generated/ControlThreadApplyResponse.schema.json +14 -0
  130. package/generated/ControlThreadDetail.schema.json +94 -1
  131. package/generated/ControlThreadTurnRequest.schema.json +14 -7
  132. package/generated/DecisionRecord.schema.json +178 -2
  133. package/generated/GlobalConfig.schema.json +4 -8
  134. package/generated/HarnessEvent.schema.json +79 -1
  135. package/generated/HarnessManifest.schema.json +64 -9
  136. package/generated/HarnessStatusDto.schema.json +64 -9
  137. package/generated/McpRunHandleResult.schema.json +286 -1
  138. package/generated/McpRunToolResult.schema.json +171 -1
  139. package/generated/ProjectConfig.schema.json +26 -0
  140. package/generated/RoutePoolDegradedPayload.schema.json +79 -0
  141. package/generated/RunEvent.schema.json +8 -1
  142. package/generated/RunFailure.schema.json +23 -1
  143. package/generated/RunTelemetry.schema.json +376 -1
  144. package/generated/StructuredOutputConformance.schema.json +83 -0
  145. package/generated/TaskContract.schema.json +13 -1
  146. package/package.json +2 -2
@@ -38,7 +38,8 @@ export declare const ControlRunListResponse: z.ZodObject<{
38
38
  error: z.ZodOptional<z.ZodString>;
39
39
  failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
40
40
  phase: z.ZodDefault<z.ZodString>;
41
- category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
41
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
42
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable"]>>>;
42
43
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
43
44
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
44
45
  safeMessage: z.ZodString;
@@ -48,11 +49,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
48
49
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
50
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
50
51
  }, "strip", z.ZodTypeAny, {
52
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
51
53
  harnessId: string | null;
52
54
  attemptId: string | null;
53
55
  runDir: string | null;
54
56
  phase: string;
55
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
57
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
56
58
  safeMessage: string;
57
59
  rawDetailRef: string | null;
58
60
  logRefs: string[];
@@ -60,11 +62,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
60
62
  nextActions: string[];
61
63
  }, {
62
64
  safeMessage: string;
65
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
63
66
  harnessId?: string | null | undefined;
64
67
  attemptId?: string | null | undefined;
65
68
  runDir?: string | null | undefined;
66
69
  phase?: string | undefined;
67
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
70
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
68
71
  rawDetailRef?: string | null | undefined;
69
72
  logRefs?: string[] | undefined;
70
73
  eventRefs?: string[] | undefined;
@@ -77,13 +80,13 @@ export declare const ControlRunListResponse: z.ZodObject<{
77
80
  context: z.ZodDefault<z.ZodEnum<["off", "auto"]>>;
78
81
  }, "strip", z.ZodTypeAny, {
79
82
  kind: "none" | "project";
80
- root: string | null;
81
83
  context: "off" | "auto";
84
+ root: string | null;
82
85
  projectName: string | null;
83
86
  }, {
84
87
  kind?: "none" | "project" | undefined;
85
- root?: string | null | undefined;
86
88
  context?: "off" | "auto" | undefined;
89
+ root?: string | null | undefined;
87
90
  projectName?: string | null | undefined;
88
91
  }>>;
89
92
  mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "agent"]>>;
@@ -96,15 +99,15 @@ export declare const ControlRunListResponse: z.ZodObject<{
96
99
  reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
100
  harness: z.ZodString;
98
101
  model: z.ZodOptional<z.ZodString>;
99
- effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
102
+ effort: z.ZodOptional<z.ZodString>;
100
103
  }, "strict", z.ZodTypeAny, {
101
104
  harness: string;
102
105
  model?: string | undefined;
103
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
106
+ effort?: string | undefined;
104
107
  }, {
105
108
  harness: string;
106
109
  model?: string | undefined;
107
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
110
+ effort?: string | undefined;
108
111
  }>, "many">>;
109
112
  protectedPathApprovals: z.ZodOptional<z.ZodArray<z.ZodObject<{
110
113
  path: z.ZodString;
@@ -198,24 +201,24 @@ export declare const ControlRunListResponse: z.ZodObject<{
198
201
  rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
199
202
  available: z.ZodDefault<z.ZodBoolean>;
200
203
  }, "strip", z.ZodTypeAny, {
201
- status: "failed" | "none" | "attempted" | "unverified" | "satisfied";
204
+ status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
202
205
  available: boolean;
203
206
  target: string | null;
204
207
  mode: "off" | "auto" | "cached" | "live";
205
- tool: string | null;
206
208
  required: boolean;
209
+ tool: string | null;
207
210
  attempted: boolean;
208
211
  rawDetailRef: string | null;
209
212
  effectiveMode: "off" | "auto" | "cached" | "live";
210
213
  satisfied: boolean;
211
214
  errorSummary: string | null;
212
215
  }, {
213
- status?: "failed" | "none" | "attempted" | "unverified" | "satisfied" | undefined;
216
+ status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
214
217
  available?: boolean | undefined;
215
218
  target?: string | null | undefined;
216
219
  mode?: "off" | "auto" | "cached" | "live" | undefined;
217
- tool?: string | null | undefined;
218
220
  required?: boolean | undefined;
221
+ tool?: string | null | undefined;
219
222
  attempted?: boolean | undefined;
220
223
  rawDetailRef?: string | null | undefined;
221
224
  effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
@@ -306,19 +309,70 @@ export declare const ControlRunListResponse: z.ZodObject<{
306
309
  noChanges: z.ZodDefault<z.ZodBoolean>;
307
310
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
308
311
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
309
- 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"]>>>;
312
+ 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"]>>>;
313
+ work_state: z.ZodOptional<z.ZodObject<{
314
+ state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
315
+ source: z.ZodEnum<["constrained", "validated", "absent"]>;
316
+ required_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
317
+ kind: z.ZodEnum<["file", "context", "credential", "permission", "decision", "external_dependency"]>;
318
+ locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
319
+ description: z.ZodString;
320
+ }, "strip", z.ZodTypeAny, {
321
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
322
+ description: string;
323
+ locator: string | null;
324
+ }, {
325
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
326
+ description: string;
327
+ locator?: string | null | undefined;
328
+ }>, "many">>;
329
+ }, "strip", z.ZodTypeAny, {
330
+ source: "constrained" | "validated" | "absent";
331
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
332
+ required_inputs?: {
333
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
334
+ description: string;
335
+ locator: string | null;
336
+ }[] | undefined;
337
+ }, {
338
+ source: "constrained" | "validated" | "absent";
339
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
340
+ required_inputs?: {
341
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
342
+ description: string;
343
+ locator?: string | null | undefined;
344
+ }[] | undefined;
345
+ }>>;
310
346
  }, "strict", z.ZodTypeAny, {
311
347
  review: "not_run" | "approved" | "blocked";
312
- 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" | null;
348
+ 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;
313
349
  checks: "passed" | "failed" | "not_configured";
314
350
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
315
351
  noChanges: boolean;
352
+ work_state?: {
353
+ source: "constrained" | "validated" | "absent";
354
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
355
+ required_inputs?: {
356
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
357
+ description: string;
358
+ locator: string | null;
359
+ }[] | undefined;
360
+ } | undefined;
316
361
  }, {
317
362
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
318
363
  review?: "not_run" | "approved" | "blocked" | undefined;
319
- 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" | null | undefined;
364
+ 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;
320
365
  checks?: "passed" | "failed" | "not_configured" | undefined;
321
366
  noChanges?: boolean | undefined;
367
+ work_state?: {
368
+ source: "constrained" | "validated" | "absent";
369
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
370
+ required_inputs?: {
371
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
372
+ description: string;
373
+ locator?: string | null | undefined;
374
+ }[] | undefined;
375
+ } | undefined;
322
376
  }>>>;
323
377
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
324
378
  route: z.ZodDefault<z.ZodNullable<z.ZodObject<{
@@ -328,14 +382,61 @@ export declare const ControlRunListResponse: z.ZodObject<{
328
382
  verified: z.ZodDefault<z.ZodBoolean>;
329
383
  }, "strip", z.ZodTypeAny, {
330
384
  harnessId: string | null;
385
+ verified: boolean;
331
386
  requestedModel: string | null;
332
387
  observedModel: string | null;
333
- verified: boolean;
334
388
  }, {
335
389
  harnessId?: string | null | undefined;
390
+ verified?: boolean | undefined;
336
391
  requestedModel?: string | null | undefined;
337
392
  observedModel?: string | null | undefined;
338
- verified?: boolean | undefined;
393
+ }>>>;
394
+ routingRationale: z.ZodDefault<z.ZodNullable<z.ZodObject<{
395
+ goal: z.ZodEnum<["auto", "quality", "economy"]>;
396
+ paid_fallback: z.ZodEnum<["never", "when_unavailable", "allowed_within_cap"]>;
397
+ order: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
398
+ dropped: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
399
+ reason: z.ZodEnum<["subscription_entitlement_first", "lowest_incremental_cash", "quality_tier", "expiring_quota_slack", "all_incremental_cash_unknown", "declared_order"]>;
400
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
401
+ harness_id: z.ZodString;
402
+ billing_knowledge: z.ZodEnum<["proven_zero", "subscription_entitlement", "metered", "unknown"]>;
403
+ incremental_cost_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
404
+ eligible: z.ZodBoolean;
405
+ }, "strip", z.ZodTypeAny, {
406
+ harness_id: string;
407
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
408
+ incremental_cost_usd: number | null;
409
+ eligible: boolean;
410
+ }, {
411
+ harness_id: string;
412
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
413
+ eligible: boolean;
414
+ incremental_cost_usd?: number | null | undefined;
415
+ }>, "many">>;
416
+ }, "strip", z.ZodTypeAny, {
417
+ entries: {
418
+ harness_id: string;
419
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
420
+ incremental_cost_usd: number | null;
421
+ eligible: boolean;
422
+ }[];
423
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
424
+ goal: "auto" | "quality" | "economy";
425
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
426
+ order: string[];
427
+ dropped: string[];
428
+ }, {
429
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
430
+ goal: "auto" | "quality" | "economy";
431
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
432
+ entries?: {
433
+ harness_id: string;
434
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
435
+ eligible: boolean;
436
+ incremental_cost_usd?: number | null | undefined;
437
+ }[] | undefined;
438
+ order?: string[] | undefined;
439
+ dropped?: string[] | undefined;
339
440
  }>>>;
340
441
  tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
341
442
  program: z.ZodString;
@@ -358,27 +459,21 @@ export declare const ControlRunListResponse: z.ZodObject<{
358
459
  finishedAt: z.ZodOptional<z.ZodString>;
359
460
  }, "strip", z.ZodTypeAny, {
360
461
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
361
- runId: string;
362
- outcomeFacts: {
363
- review: "not_run" | "approved" | "blocked";
364
- 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" | null;
365
- checks: "passed" | "failed" | "not_configured";
366
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
367
- noChanges: boolean;
368
- } | null;
369
462
  project: {
370
463
  kind: "none" | "project";
371
- root: string | null;
372
464
  context: "off" | "auto";
465
+ root: string | null;
373
466
  projectName: string | null;
374
467
  };
375
468
  jobId: string;
469
+ runId: string;
376
470
  failure: {
471
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
377
472
  harnessId: string | null;
378
473
  attemptId: string | null;
379
474
  runDir: string | null;
380
475
  phase: string;
381
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
476
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
382
477
  safeMessage: string;
383
478
  rawDetailRef: string | null;
384
479
  logRefs: string[];
@@ -386,12 +481,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
386
481
  nextActions: string[];
387
482
  } | null;
388
483
  webEvidence: {
389
- status: "failed" | "none" | "attempted" | "unverified" | "satisfied";
484
+ status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
390
485
  available: boolean;
391
486
  target: string | null;
392
487
  mode: "off" | "auto" | "cached" | "live";
393
- tool: string | null;
394
488
  required: boolean;
489
+ tool: string | null;
395
490
  attempted: boolean;
396
491
  rawDetailRef: string | null;
397
492
  effectiveMode: "off" | "auto" | "cached" | "live";
@@ -424,12 +519,41 @@ export declare const ControlRunListResponse: z.ZodObject<{
424
519
  preTurnSha: string | null;
425
520
  revertable: boolean;
426
521
  };
522
+ outcomeFacts: {
523
+ review: "not_run" | "approved" | "blocked";
524
+ 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;
525
+ checks: "passed" | "failed" | "not_configured";
526
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
527
+ noChanges: boolean;
528
+ work_state?: {
529
+ source: "constrained" | "validated" | "absent";
530
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
531
+ required_inputs?: {
532
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
533
+ description: string;
534
+ locator: string | null;
535
+ }[] | undefined;
536
+ } | undefined;
537
+ } | null;
427
538
  waitingOnUser: boolean;
428
539
  route: {
429
540
  harnessId: string | null;
541
+ verified: boolean;
430
542
  requestedModel: string | null;
431
543
  observedModel: string | null;
432
- verified: boolean;
544
+ } | null;
545
+ routingRationale: {
546
+ entries: {
547
+ harness_id: string;
548
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
549
+ incremental_cost_usd: number | null;
550
+ eligible: boolean;
551
+ }[];
552
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
553
+ goal: "auto" | "quality" | "economy";
554
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
555
+ order: string[];
556
+ dropped: string[];
433
557
  } | null;
434
558
  startedAt?: string | undefined;
435
559
  error?: string | undefined;
@@ -438,7 +562,6 @@ export declare const ControlRunListResponse: z.ZodObject<{
438
562
  prompt?: string | undefined;
439
563
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
440
564
  harnesses?: string[] | undefined;
441
- runDir?: string | undefined;
442
565
  model?: string | undefined;
443
566
  tests?: {
444
567
  args: string[];
@@ -447,6 +570,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
447
570
  cwd?: string | undefined;
448
571
  }[] | undefined;
449
572
  taskId?: string | undefined;
573
+ runDir?: string | undefined;
450
574
  primaryHarness?: string | undefined;
451
575
  routingGoal?: "auto" | "quality" | "economy" | undefined;
452
576
  n?: number | undefined;
@@ -464,7 +588,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
464
588
  reviewerPanel?: {
465
589
  harness: string;
466
590
  model?: string | undefined;
467
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
591
+ effort?: string | undefined;
468
592
  }[] | undefined;
469
593
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
470
594
  spendUsd?: number | null | undefined;
@@ -493,8 +617,8 @@ export declare const ControlRunListResponse: z.ZodObject<{
493
617
  finishedAt?: string | undefined;
494
618
  }, {
495
619
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
496
- runId: string;
497
620
  jobId: string;
621
+ runId: string;
498
622
  startedAt?: string | undefined;
499
623
  error?: string | undefined;
500
624
  createdAt?: string | undefined;
@@ -502,14 +626,6 @@ export declare const ControlRunListResponse: z.ZodObject<{
502
626
  prompt?: string | undefined;
503
627
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
504
628
  harnesses?: string[] | undefined;
505
- runDir?: string | undefined;
506
- outcomeFacts?: {
507
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
508
- review?: "not_run" | "approved" | "blocked" | undefined;
509
- 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" | null | undefined;
510
- checks?: "passed" | "failed" | "not_configured" | undefined;
511
- noChanges?: boolean | undefined;
512
- } | null | undefined;
513
629
  model?: string | undefined;
514
630
  tests?: {
515
631
  program: string;
@@ -519,11 +635,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
519
635
  }[] | undefined;
520
636
  project?: {
521
637
  kind?: "none" | "project" | undefined;
522
- root?: string | null | undefined;
523
638
  context?: "off" | "auto" | undefined;
639
+ root?: string | null | undefined;
524
640
  projectName?: string | null | undefined;
525
641
  } | undefined;
526
642
  taskId?: string | undefined;
643
+ runDir?: string | undefined;
527
644
  primaryHarness?: string | undefined;
528
645
  routingGoal?: "auto" | "quality" | "economy" | undefined;
529
646
  n?: number | undefined;
@@ -541,15 +658,16 @@ export declare const ControlRunListResponse: z.ZodObject<{
541
658
  reviewerPanel?: {
542
659
  harness: string;
543
660
  model?: string | undefined;
544
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
661
+ effort?: string | undefined;
545
662
  }[] | undefined;
546
663
  failure?: {
547
664
  safeMessage: string;
665
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
548
666
  harnessId?: string | null | undefined;
549
667
  attemptId?: string | null | undefined;
550
668
  runDir?: string | null | undefined;
551
669
  phase?: string | undefined;
552
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
670
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
553
671
  rawDetailRef?: string | null | undefined;
554
672
  logRefs?: string[] | undefined;
555
673
  eventRefs?: string[] | undefined;
@@ -579,12 +697,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
579
697
  webRequired?: boolean | undefined;
580
698
  webMode?: "off" | "auto" | "cached" | "live" | undefined;
581
699
  webEvidence?: {
582
- status?: "failed" | "none" | "attempted" | "unverified" | "satisfied" | undefined;
700
+ status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
583
701
  available?: boolean | undefined;
584
702
  target?: string | null | undefined;
585
703
  mode?: "off" | "auto" | "cached" | "live" | undefined;
586
- tool?: string | null | undefined;
587
704
  required?: boolean | undefined;
705
+ tool?: string | null | undefined;
588
706
  attempted?: boolean | undefined;
589
707
  rawDetailRef?: string | null | undefined;
590
708
  effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
@@ -618,39 +736,70 @@ export declare const ControlRunListResponse: z.ZodObject<{
618
736
  preTurnSha?: string | null | undefined;
619
737
  revertable?: boolean | undefined;
620
738
  } | undefined;
739
+ outcomeFacts?: {
740
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
741
+ review?: "not_run" | "approved" | "blocked" | undefined;
742
+ 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;
743
+ checks?: "passed" | "failed" | "not_configured" | undefined;
744
+ noChanges?: boolean | undefined;
745
+ work_state?: {
746
+ source: "constrained" | "validated" | "absent";
747
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
748
+ required_inputs?: {
749
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
750
+ description: string;
751
+ locator?: string | null | undefined;
752
+ }[] | undefined;
753
+ } | undefined;
754
+ } | null | undefined;
621
755
  waitingOnUser?: boolean | undefined;
622
756
  route?: {
623
757
  harnessId?: string | null | undefined;
758
+ verified?: boolean | undefined;
624
759
  requestedModel?: string | null | undefined;
625
760
  observedModel?: string | null | undefined;
626
- verified?: boolean | undefined;
761
+ } | null | undefined;
762
+ routingRationale?: {
763
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
764
+ goal: "auto" | "quality" | "economy";
765
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
766
+ entries?: {
767
+ harness_id: string;
768
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
769
+ eligible: boolean;
770
+ incremental_cost_usd?: number | null | undefined;
771
+ }[] | undefined;
772
+ order?: string[] | undefined;
773
+ dropped?: string[] | undefined;
627
774
  } | null | undefined;
628
775
  finishedAt?: string | undefined;
629
776
  }>, "many">>;
777
+ /** QA-052 keyset page cursor: opaque `(createdAt,id)` token to fetch the
778
+ * next (older) page. Null when this page is the tail — no further runs match
779
+ * the current filter. Feed it back verbatim as the `cursor` query param. */
780
+ nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
781
+ /** True when at least one further run matches the current filter beyond this
782
+ * page. A consumer keeps paging while this is true, never inferring the tail
783
+ * from a short page. */
784
+ hasMore: z.ZodDefault<z.ZodBoolean>;
630
785
  }, "strict", z.ZodTypeAny, {
631
786
  runs: {
632
787
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
633
- runId: string;
634
- outcomeFacts: {
635
- review: "not_run" | "approved" | "blocked";
636
- 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" | null;
637
- checks: "passed" | "failed" | "not_configured";
638
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
639
- noChanges: boolean;
640
- } | null;
641
788
  project: {
642
789
  kind: "none" | "project";
643
- root: string | null;
644
790
  context: "off" | "auto";
791
+ root: string | null;
645
792
  projectName: string | null;
646
793
  };
647
794
  jobId: string;
795
+ runId: string;
648
796
  failure: {
797
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
649
798
  harnessId: string | null;
650
799
  attemptId: string | null;
651
800
  runDir: string | null;
652
801
  phase: string;
653
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
802
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
654
803
  safeMessage: string;
655
804
  rawDetailRef: string | null;
656
805
  logRefs: string[];
@@ -658,12 +807,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
658
807
  nextActions: string[];
659
808
  } | null;
660
809
  webEvidence: {
661
- status: "failed" | "none" | "attempted" | "unverified" | "satisfied";
810
+ status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
662
811
  available: boolean;
663
812
  target: string | null;
664
813
  mode: "off" | "auto" | "cached" | "live";
665
- tool: string | null;
666
814
  required: boolean;
815
+ tool: string | null;
667
816
  attempted: boolean;
668
817
  rawDetailRef: string | null;
669
818
  effectiveMode: "off" | "auto" | "cached" | "live";
@@ -696,12 +845,41 @@ export declare const ControlRunListResponse: z.ZodObject<{
696
845
  preTurnSha: string | null;
697
846
  revertable: boolean;
698
847
  };
848
+ outcomeFacts: {
849
+ review: "not_run" | "approved" | "blocked";
850
+ 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;
851
+ checks: "passed" | "failed" | "not_configured";
852
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
853
+ noChanges: boolean;
854
+ work_state?: {
855
+ source: "constrained" | "validated" | "absent";
856
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
857
+ required_inputs?: {
858
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
859
+ description: string;
860
+ locator: string | null;
861
+ }[] | undefined;
862
+ } | undefined;
863
+ } | null;
699
864
  waitingOnUser: boolean;
700
865
  route: {
701
866
  harnessId: string | null;
867
+ verified: boolean;
702
868
  requestedModel: string | null;
703
869
  observedModel: string | null;
704
- verified: boolean;
870
+ } | null;
871
+ routingRationale: {
872
+ entries: {
873
+ harness_id: string;
874
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
875
+ incremental_cost_usd: number | null;
876
+ eligible: boolean;
877
+ }[];
878
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
879
+ goal: "auto" | "quality" | "economy";
880
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
881
+ order: string[];
882
+ dropped: string[];
705
883
  } | null;
706
884
  startedAt?: string | undefined;
707
885
  error?: string | undefined;
@@ -710,7 +888,6 @@ export declare const ControlRunListResponse: z.ZodObject<{
710
888
  prompt?: string | undefined;
711
889
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
712
890
  harnesses?: string[] | undefined;
713
- runDir?: string | undefined;
714
891
  model?: string | undefined;
715
892
  tests?: {
716
893
  args: string[];
@@ -719,6 +896,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
719
896
  cwd?: string | undefined;
720
897
  }[] | undefined;
721
898
  taskId?: string | undefined;
899
+ runDir?: string | undefined;
722
900
  primaryHarness?: string | undefined;
723
901
  routingGoal?: "auto" | "quality" | "economy" | undefined;
724
902
  n?: number | undefined;
@@ -736,7 +914,7 @@ export declare const ControlRunListResponse: z.ZodObject<{
736
914
  reviewerPanel?: {
737
915
  harness: string;
738
916
  model?: string | undefined;
739
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
917
+ effort?: string | undefined;
740
918
  }[] | undefined;
741
919
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
742
920
  spendUsd?: number | null | undefined;
@@ -764,11 +942,13 @@ export declare const ControlRunListResponse: z.ZodObject<{
764
942
  toolPermissionPolicy?: Record<string, unknown> | undefined;
765
943
  finishedAt?: string | undefined;
766
944
  }[];
945
+ nextCursor: string | null;
946
+ hasMore: boolean;
767
947
  }, {
768
948
  runs?: {
769
949
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
770
- runId: string;
771
950
  jobId: string;
951
+ runId: string;
772
952
  startedAt?: string | undefined;
773
953
  error?: string | undefined;
774
954
  createdAt?: string | undefined;
@@ -776,14 +956,6 @@ export declare const ControlRunListResponse: z.ZodObject<{
776
956
  prompt?: string | undefined;
777
957
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
778
958
  harnesses?: string[] | undefined;
779
- runDir?: string | undefined;
780
- outcomeFacts?: {
781
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
782
- review?: "not_run" | "approved" | "blocked" | undefined;
783
- 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" | null | undefined;
784
- checks?: "passed" | "failed" | "not_configured" | undefined;
785
- noChanges?: boolean | undefined;
786
- } | null | undefined;
787
959
  model?: string | undefined;
788
960
  tests?: {
789
961
  program: string;
@@ -793,11 +965,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
793
965
  }[] | undefined;
794
966
  project?: {
795
967
  kind?: "none" | "project" | undefined;
796
- root?: string | null | undefined;
797
968
  context?: "off" | "auto" | undefined;
969
+ root?: string | null | undefined;
798
970
  projectName?: string | null | undefined;
799
971
  } | undefined;
800
972
  taskId?: string | undefined;
973
+ runDir?: string | undefined;
801
974
  primaryHarness?: string | undefined;
802
975
  routingGoal?: "auto" | "quality" | "economy" | undefined;
803
976
  n?: number | undefined;
@@ -815,15 +988,16 @@ export declare const ControlRunListResponse: z.ZodObject<{
815
988
  reviewerPanel?: {
816
989
  harness: string;
817
990
  model?: string | undefined;
818
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
991
+ effort?: string | undefined;
819
992
  }[] | undefined;
820
993
  failure?: {
821
994
  safeMessage: string;
995
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
822
996
  harnessId?: string | null | undefined;
823
997
  attemptId?: string | null | undefined;
824
998
  runDir?: string | null | undefined;
825
999
  phase?: string | undefined;
826
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
1000
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
827
1001
  rawDetailRef?: string | null | undefined;
828
1002
  logRefs?: string[] | undefined;
829
1003
  eventRefs?: string[] | undefined;
@@ -853,12 +1027,12 @@ export declare const ControlRunListResponse: z.ZodObject<{
853
1027
  webRequired?: boolean | undefined;
854
1028
  webMode?: "off" | "auto" | "cached" | "live" | undefined;
855
1029
  webEvidence?: {
856
- status?: "failed" | "none" | "attempted" | "unverified" | "satisfied" | undefined;
1030
+ status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
857
1031
  available?: boolean | undefined;
858
1032
  target?: string | null | undefined;
859
1033
  mode?: "off" | "auto" | "cached" | "live" | undefined;
860
- tool?: string | null | undefined;
861
1034
  required?: boolean | undefined;
1035
+ tool?: string | null | undefined;
862
1036
  attempted?: boolean | undefined;
863
1037
  rawDetailRef?: string | null | undefined;
864
1038
  effectiveMode?: "off" | "auto" | "cached" | "live" | undefined;
@@ -892,15 +1066,46 @@ export declare const ControlRunListResponse: z.ZodObject<{
892
1066
  preTurnSha?: string | null | undefined;
893
1067
  revertable?: boolean | undefined;
894
1068
  } | undefined;
1069
+ outcomeFacts?: {
1070
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1071
+ review?: "not_run" | "approved" | "blocked" | undefined;
1072
+ 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;
1073
+ checks?: "passed" | "failed" | "not_configured" | undefined;
1074
+ noChanges?: boolean | undefined;
1075
+ work_state?: {
1076
+ source: "constrained" | "validated" | "absent";
1077
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1078
+ required_inputs?: {
1079
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1080
+ description: string;
1081
+ locator?: string | null | undefined;
1082
+ }[] | undefined;
1083
+ } | undefined;
1084
+ } | null | undefined;
895
1085
  waitingOnUser?: boolean | undefined;
896
1086
  route?: {
897
1087
  harnessId?: string | null | undefined;
1088
+ verified?: boolean | undefined;
898
1089
  requestedModel?: string | null | undefined;
899
1090
  observedModel?: string | null | undefined;
900
- verified?: boolean | undefined;
1091
+ } | null | undefined;
1092
+ routingRationale?: {
1093
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
1094
+ goal: "auto" | "quality" | "economy";
1095
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
1096
+ entries?: {
1097
+ harness_id: string;
1098
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1099
+ eligible: boolean;
1100
+ incremental_cost_usd?: number | null | undefined;
1101
+ }[] | undefined;
1102
+ order?: string[] | undefined;
1103
+ dropped?: string[] | undefined;
901
1104
  } | null | undefined;
902
1105
  finishedAt?: string | undefined;
903
1106
  }[] | undefined;
1107
+ nextCursor?: string | null | undefined;
1108
+ hasMore?: boolean | undefined;
904
1109
  }>;
905
1110
  export type ControlRunListResponse = z.infer<typeof ControlRunListResponse>;
906
1111
  export declare const ControlArtifactListResponse: z.ZodObject<{
@@ -979,14 +1184,22 @@ export declare const ControlApplyCheckResponse: z.ZodObject<{
979
1184
  ok: z.ZodBoolean;
980
1185
  code: z.ZodNullable<z.ZodNumber>;
981
1186
  stderr: z.ZodString;
1187
+ /** #26: TRUE when `ok` is a typed already-applied no-op (the run is
1188
+ * delivered and the tree is this patch's exact postimage) rather than a
1189
+ * fresh clean forward check. Lets a dry-run consumer distinguish "would
1190
+ * apply cleanly" from "already applied; nothing would change". Defaults
1191
+ * false. */
1192
+ alreadyApplied: z.ZodDefault<z.ZodBoolean>;
982
1193
  }, "strict", z.ZodTypeAny, {
983
1194
  code: number | null;
984
1195
  ok: boolean;
1196
+ alreadyApplied: boolean;
985
1197
  stderr: string;
986
1198
  }, {
987
1199
  code: number | null;
988
1200
  ok: boolean;
989
1201
  stderr: string;
1202
+ alreadyApplied?: boolean | undefined;
990
1203
  }>;
991
1204
  export type ControlApplyCheckResponse = z.infer<typeof ControlApplyCheckResponse>;
992
1205
  export declare const ControlDeliveryResponse: z.ZodObject<{
@@ -998,6 +1211,8 @@ export declare const ControlDeliveryResponse: z.ZodObject<{
998
1211
  detail: z.ZodOptional<z.ZodString>;
999
1212
  treeMutated: z.ZodOptional<z.ZodBoolean>;
1000
1213
  refused: z.ZodOptional<z.ZodBoolean>;
1214
+ alreadyApplied: z.ZodDefault<z.ZodBoolean>;
1215
+ deliveryStatus: z.ZodOptional<z.ZodEnum<["applied", "already_applied", "refused"]>>;
1001
1216
  finalVerify: z.ZodObject<{
1002
1217
  attempted: z.ZodBoolean;
1003
1218
  base_sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -1042,6 +1257,7 @@ export declare const ControlDeliveryResponse: z.ZodObject<{
1042
1257
  }, "strict", z.ZodTypeAny, {
1043
1258
  mode: "apply" | "commit" | "branch" | "pr";
1044
1259
  applied: boolean;
1260
+ alreadyApplied: boolean;
1045
1261
  finalVerify: {
1046
1262
  reason: string | null;
1047
1263
  duration_ms: number | null;
@@ -1061,6 +1277,7 @@ export declare const ControlDeliveryResponse: z.ZodObject<{
1061
1277
  prUrl?: string | undefined;
1062
1278
  treeMutated?: boolean | undefined;
1063
1279
  refused?: boolean | undefined;
1280
+ deliveryStatus?: "applied" | "refused" | "already_applied" | undefined;
1064
1281
  }, {
1065
1282
  mode: "apply" | "commit" | "branch" | "pr";
1066
1283
  applied: boolean;
@@ -1083,6 +1300,8 @@ export declare const ControlDeliveryResponse: z.ZodObject<{
1083
1300
  prUrl?: string | undefined;
1084
1301
  treeMutated?: boolean | undefined;
1085
1302
  refused?: boolean | undefined;
1303
+ alreadyApplied?: boolean | undefined;
1304
+ deliveryStatus?: "applied" | "refused" | "already_applied" | undefined;
1086
1305
  }>;
1087
1306
  export type ControlDeliveryResponse = z.infer<typeof ControlDeliveryResponse>;
1088
1307
  export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
@@ -1102,8 +1321,8 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1102
1321
  context: z.ZodDefault<z.ZodEnum<["auto"]>>;
1103
1322
  }, "strict", z.ZodTypeAny, {
1104
1323
  kind: "project";
1105
- root: string;
1106
1324
  context: "auto";
1325
+ root: string;
1107
1326
  }, {
1108
1327
  kind: "project";
1109
1328
  root: string;
@@ -1127,9 +1346,10 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1127
1346
  routingGoal: z.ZodOptional<z.ZodEnum<["auto", "quality", "economy"]>>;
1128
1347
  model: z.ZodOptional<z.ZodString>;
1129
1348
  models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1130
- effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
1349
+ effort: z.ZodOptional<z.ZodString>;
1350
+ efforts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1131
1351
  reviewerModels: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
1132
- reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
1352
+ reviewerEfforts: z.ZodOptional<z.ZodRecord<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>, z.ZodString>>;
1133
1353
  n: z.ZodOptional<z.ZodNumber>;
1134
1354
  attempts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1135
1355
  untilClean: z.ZodOptional<z.ZodBoolean>;
@@ -1204,15 +1424,15 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1204
1424
  reviewerPanel: z.ZodOptional<z.ZodArray<z.ZodObject<{
1205
1425
  harness: z.ZodString;
1206
1426
  model: z.ZodOptional<z.ZodString>;
1207
- effort: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>;
1427
+ effort: z.ZodOptional<z.ZodString>;
1208
1428
  }, "strict", z.ZodTypeAny, {
1209
1429
  harness: string;
1210
1430
  model?: string | undefined;
1211
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1431
+ effort?: string | undefined;
1212
1432
  }, {
1213
1433
  harness: string;
1214
1434
  model?: string | undefined;
1215
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1435
+ effort?: string | undefined;
1216
1436
  }>, "many">>;
1217
1437
  authPreference: z.ZodOptional<z.ZodEnum<["subscription", "api_key", "auto"]>>;
1218
1438
  credentialProfileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1244,7 +1464,7 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1244
1464
  models?: Record<string, string> | undefined;
1245
1465
  harnesses?: string[] | undefined;
1246
1466
  model?: string | undefined;
1247
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1467
+ effort?: string | undefined;
1248
1468
  tests?: {
1249
1469
  args: string[];
1250
1470
  program: string;
@@ -1253,8 +1473,9 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1253
1473
  }[] | undefined;
1254
1474
  primaryHarness?: string | undefined;
1255
1475
  routingGoal?: "auto" | "quality" | "economy" | undefined;
1476
+ efforts?: Record<string, string> | undefined;
1256
1477
  reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1257
- reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
1478
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1258
1479
  n?: number | undefined;
1259
1480
  attempts?: number | null | undefined;
1260
1481
  untilClean?: boolean | undefined;
@@ -1276,7 +1497,7 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1276
1497
  reviewerPanel?: {
1277
1498
  harness: string;
1278
1499
  model?: string | undefined;
1279
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1500
+ effort?: string | undefined;
1280
1501
  }[] | undefined;
1281
1502
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
1282
1503
  credentialProfileId?: string | null | undefined;
@@ -1305,7 +1526,7 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1305
1526
  models?: Record<string, string> | undefined;
1306
1527
  harnesses?: string[] | undefined;
1307
1528
  model?: string | undefined;
1308
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1529
+ effort?: string | undefined;
1309
1530
  tests?: {
1310
1531
  program: string;
1311
1532
  args?: string[] | undefined;
@@ -1314,8 +1535,9 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1314
1535
  }[] | undefined;
1315
1536
  primaryHarness?: string | undefined;
1316
1537
  routingGoal?: "auto" | "quality" | "economy" | undefined;
1538
+ efforts?: Record<string, string> | undefined;
1317
1539
  reviewerModels?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1318
- reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", "low" | "medium" | "high" | "xhigh" | "max">> | undefined;
1540
+ reviewerEfforts?: Partial<Record<"openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown", string>> | undefined;
1319
1541
  n?: number | undefined;
1320
1542
  attempts?: number | null | undefined;
1321
1543
  untilClean?: boolean | undefined;
@@ -1337,7 +1559,7 @@ export declare const ControlThreadTurnRequest: z.ZodObject<Omit<{
1337
1559
  reviewerPanel?: {
1338
1560
  harness: string;
1339
1561
  model?: string | undefined;
1340
- effort?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1562
+ effort?: string | undefined;
1341
1563
  }[] | undefined;
1342
1564
  authPreference?: "auto" | "subscription" | "api_key" | undefined;
1343
1565
  credentialProfileId?: string | null | undefined;