@claudexor/schema 3.0.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/LICENSE +1 -1
  2. package/dist/agent-capabilities.d.ts +37 -0
  3. package/dist/agent-capabilities.d.ts.map +1 -1
  4. package/dist/agent-capabilities.js +14 -0
  5. package/dist/agent-capabilities.js.map +1 -1
  6. package/dist/apply-eligibility.d.ts +384 -18
  7. package/dist/apply-eligibility.d.ts.map +1 -1
  8. package/dist/apply-eligibility.js +20 -1
  9. package/dist/apply-eligibility.js.map +1 -1
  10. package/dist/budget.d.ts +75 -0
  11. package/dist/budget.d.ts.map +1 -1
  12. package/dist/budget.js +46 -0
  13. package/dist/budget.js.map +1 -1
  14. package/dist/config.d.ts +41 -41
  15. package/dist/control-operation-responses.d.ts +287 -65
  16. package/dist/control-operation-responses.d.ts.map +1 -1
  17. package/dist/control-operation-responses.js +33 -3
  18. package/dist/control-operation-responses.js.map +1 -1
  19. package/dist/control-run-detail.d.ts +600 -150
  20. package/dist/control-run-detail.d.ts.map +1 -1
  21. package/dist/control-run-detail.js +28 -2
  22. package/dist/control-run-detail.js.map +1 -1
  23. package/dist/control-run-retry.d.ts +1 -1
  24. package/dist/control-run-scope.d.ts +1 -1
  25. package/dist/control-thread-apply.d.ts +10 -0
  26. package/dist/control-thread-apply.d.ts.map +1 -1
  27. package/dist/control.d.ts +664 -156
  28. package/dist/control.d.ts.map +1 -1
  29. package/dist/control.js +76 -2
  30. package/dist/control.js.map +1 -1
  31. package/dist/decision.d.ts +205 -9
  32. package/dist/decision.d.ts.map +1 -1
  33. package/dist/decision.js +69 -1
  34. package/dist/decision.js.map +1 -1
  35. package/dist/deep-scan.d.ts +27 -0
  36. package/dist/deep-scan.d.ts.map +1 -0
  37. package/dist/deep-scan.js +27 -0
  38. package/dist/deep-scan.js.map +1 -0
  39. package/dist/delivery.d.ts +13 -0
  40. package/dist/delivery.d.ts.map +1 -1
  41. package/dist/delivery.js +15 -0
  42. package/dist/delivery.js.map +1 -1
  43. package/dist/events.d.ts +59 -4
  44. package/dist/events.d.ts.map +1 -1
  45. package/dist/events.js +85 -0
  46. package/dist/events.js.map +1 -1
  47. package/dist/harness.d.ts +111 -3
  48. package/dist/harness.d.ts.map +1 -1
  49. package/dist/harness.js +77 -1
  50. package/dist/harness.js.map +1 -1
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +3 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/operation.d.ts +193 -10
  56. package/dist/operation.d.ts.map +1 -1
  57. package/dist/operation.js +45 -0
  58. package/dist/operation.js.map +1 -1
  59. package/dist/output-schema-dialect.d.ts +22 -0
  60. package/dist/output-schema-dialect.d.ts.map +1 -0
  61. package/dist/output-schema-dialect.js +37 -0
  62. package/dist/output-schema-dialect.js.map +1 -0
  63. package/dist/output-schema.d.ts +26 -2
  64. package/dist/output-schema.d.ts.map +1 -1
  65. package/dist/output-schema.js +313 -16
  66. package/dist/output-schema.js.map +1 -1
  67. package/dist/plan.d.ts +2 -2
  68. package/dist/problem.d.ts +3 -3
  69. package/dist/project.d.ts +47 -12
  70. package/dist/project.d.ts.map +1 -1
  71. package/dist/project.js +32 -0
  72. package/dist/project.js.map +1 -1
  73. package/dist/readiness.d.ts +14 -0
  74. package/dist/readiness.d.ts.map +1 -1
  75. package/dist/recovery.d.ts +14 -14
  76. package/dist/review.d.ts +7 -7
  77. package/dist/route.d.ts +2 -2
  78. package/dist/setup.d.ts +288 -94
  79. package/dist/setup.d.ts.map +1 -1
  80. package/dist/setup.js +90 -6
  81. package/dist/setup.js.map +1 -1
  82. package/dist/status-projection.d.ts +79 -4
  83. package/dist/status-projection.d.ts.map +1 -1
  84. package/dist/status-projection.js +161 -4
  85. package/dist/status-projection.js.map +1 -1
  86. package/dist/task.d.ts +14 -0
  87. package/dist/task.d.ts.map +1 -1
  88. package/dist/task.js +9 -0
  89. package/dist/task.js.map +1 -1
  90. package/dist/telemetry.d.ts +779 -16
  91. package/dist/telemetry.d.ts.map +1 -1
  92. package/dist/telemetry.js +177 -4
  93. package/dist/telemetry.js.map +1 -1
  94. package/dist/tool-ref.d.ts +14 -0
  95. package/dist/tool-ref.d.ts.map +1 -1
  96. package/dist/tool-ref.js +15 -0
  97. package/dist/tool-ref.js.map +1 -1
  98. package/dist/work-report.d.ts +131 -0
  99. package/dist/work-report.d.ts.map +1 -0
  100. package/dist/work-report.js +124 -0
  101. package/dist/work-report.js.map +1 -0
  102. package/dist/workspace.d.ts +2 -2
  103. package/generated/AgentCapabilityCatalog.schema.json +35 -0
  104. package/generated/ControlApplyCheckResponse.schema.json +5 -0
  105. package/generated/ControlDeliveryResponse.schema.json +14 -0
  106. package/generated/ControlHarnessListResponse.schema.json +19 -0
  107. package/generated/ControlOperationCatalog.schema.json +74 -0
  108. package/generated/ControlOperationDescriptor.schema.json +74 -0
  109. package/generated/ControlOperationParameter.schema.json +75 -0
  110. package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
  111. package/generated/ControlRunAgainDraft.schema.json +11 -0
  112. package/generated/ControlRunDetail.schema.json +403 -9
  113. package/generated/ControlRunListResponse.schema.json +229 -3
  114. package/generated/ControlRunStartRequest.schema.json +11 -0
  115. package/generated/ControlRunSummary.schema.json +215 -2
  116. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  117. package/generated/ControlSetupJobEvent.schema.json +28 -0
  118. package/generated/ControlSetupJobSnapshot.schema.json +28 -0
  119. package/generated/ControlThreadApplyResponse.schema.json +14 -0
  120. package/generated/ControlThreadDetail.schema.json +94 -1
  121. package/generated/ControlThreadTurnRequest.schema.json +11 -0
  122. package/generated/DecisionRecord.schema.json +178 -2
  123. package/generated/HarnessEvent.schema.json +79 -1
  124. package/generated/HarnessManifest.schema.json +19 -0
  125. package/generated/HarnessStatusDto.schema.json +19 -0
  126. package/generated/McpRunHandleResult.schema.json +286 -1
  127. package/generated/McpRunToolResult.schema.json +171 -1
  128. package/generated/RoutePoolDegradedPayload.schema.json +79 -0
  129. package/generated/RunEvent.schema.json +7 -1
  130. package/generated/RunFailure.schema.json +23 -1
  131. package/generated/RunTelemetry.schema.json +376 -1
  132. package/generated/StructuredOutputConformance.schema.json +83 -0
  133. package/generated/TaskContract.schema.json +16 -0
  134. package/package.json +2 -2
@@ -51,6 +51,16 @@ export declare const ControlCandidate: z.ZodObject<{
51
51
  additions?: number | undefined;
52
52
  deletions?: number | undefined;
53
53
  }>>>;
54
+ /**
55
+ * QA-028: this candidate's row of the decision's ranking scorecard —
56
+ * every compared ranking axis (`tool_warnings`, `diff_size`, `cost`, …)
57
+ * keyed to its formatted value, projected from
58
+ * `decision.ranking_scorecard` by attempt id. Null when the run had no
59
+ * arbitration (single candidate / no decision). Together with the
60
+ * detail-level `decision.decisive_axis`, a machine surface can explain WHY
61
+ * a winner beat a runner-up without reimplementing the ranking order.
62
+ */
63
+ rankingAxes: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
54
64
  }, "strip", z.ZodTypeAny, {
55
65
  harnessId: string;
56
66
  attemptId: string;
@@ -70,6 +80,7 @@ export declare const ControlCandidate: z.ZodObject<{
70
80
  additions: number;
71
81
  deletions: number;
72
82
  } | null;
83
+ rankingAxes: Record<string, string> | null;
73
84
  }, {
74
85
  harnessId: string;
75
86
  attemptId: string;
@@ -89,6 +100,7 @@ export declare const ControlCandidate: z.ZodObject<{
89
100
  additions?: number | undefined;
90
101
  deletions?: number | undefined;
91
102
  } | null | undefined;
103
+ rankingAxes?: Record<string, string> | null | undefined;
92
104
  }>;
93
105
  export type ControlCandidate = z.infer<typeof ControlCandidate>;
94
106
  export declare const ControlRunDetail: z.ZodObject<{
@@ -101,7 +113,8 @@ export declare const ControlRunDetail: z.ZodObject<{
101
113
  error: z.ZodOptional<z.ZodString>;
102
114
  failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
103
115
  phase: z.ZodDefault<z.ZodString>;
104
- category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
116
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
117
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable"]>>>;
105
118
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
106
119
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
107
120
  safeMessage: z.ZodString;
@@ -111,11 +124,12 @@ export declare const ControlRunDetail: z.ZodObject<{
111
124
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
112
125
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
113
126
  }, "strip", z.ZodTypeAny, {
127
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
114
128
  harnessId: string | null;
115
129
  attemptId: string | null;
116
130
  runDir: string | null;
117
131
  phase: string;
118
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
132
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
119
133
  safeMessage: string;
120
134
  rawDetailRef: string | null;
121
135
  logRefs: string[];
@@ -123,11 +137,12 @@ export declare const ControlRunDetail: z.ZodObject<{
123
137
  nextActions: string[];
124
138
  }, {
125
139
  safeMessage: string;
140
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
126
141
  harnessId?: string | null | undefined;
127
142
  attemptId?: string | null | undefined;
128
143
  runDir?: string | null | undefined;
129
144
  phase?: string | undefined;
130
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
145
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
131
146
  rawDetailRef?: string | null | undefined;
132
147
  logRefs?: string[] | undefined;
133
148
  eventRefs?: string[] | undefined;
@@ -140,13 +155,13 @@ export declare const ControlRunDetail: z.ZodObject<{
140
155
  context: z.ZodDefault<z.ZodEnum<["off", "auto"]>>;
141
156
  }, "strip", z.ZodTypeAny, {
142
157
  kind: "none" | "project";
143
- root: string | null;
144
158
  context: "off" | "auto";
159
+ root: string | null;
145
160
  projectName: string | null;
146
161
  }, {
147
162
  kind?: "none" | "project" | undefined;
148
- root?: string | null | undefined;
149
163
  context?: "off" | "auto" | undefined;
164
+ root?: string | null | undefined;
150
165
  projectName?: string | null | undefined;
151
166
  }>>;
152
167
  mode: z.ZodOptional<z.ZodEnum<["ask", "plan", "agent"]>>;
@@ -261,7 +276,7 @@ export declare const ControlRunDetail: z.ZodObject<{
261
276
  rawDetailRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
262
277
  available: z.ZodDefault<z.ZodBoolean>;
263
278
  }, "strip", z.ZodTypeAny, {
264
- status: "failed" | "none" | "attempted" | "unverified" | "satisfied";
279
+ status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
265
280
  available: boolean;
266
281
  target: string | null;
267
282
  mode: "off" | "auto" | "cached" | "live";
@@ -273,7 +288,7 @@ export declare const ControlRunDetail: z.ZodObject<{
273
288
  satisfied: boolean;
274
289
  errorSummary: string | null;
275
290
  }, {
276
- status?: "failed" | "none" | "attempted" | "unverified" | "satisfied" | undefined;
291
+ status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
277
292
  available?: boolean | undefined;
278
293
  target?: string | null | undefined;
279
294
  mode?: "off" | "auto" | "cached" | "live" | undefined;
@@ -369,19 +384,70 @@ export declare const ControlRunDetail: z.ZodObject<{
369
384
  noChanges: z.ZodDefault<z.ZodBoolean>;
370
385
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
371
386
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
372
- 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"]>>>;
387
+ 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"]>>>;
388
+ work_state: z.ZodOptional<z.ZodObject<{
389
+ state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
390
+ source: z.ZodEnum<["constrained", "validated", "absent"]>;
391
+ required_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
392
+ kind: z.ZodEnum<["file", "context", "credential", "permission", "decision", "external_dependency"]>;
393
+ locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
394
+ description: z.ZodString;
395
+ }, "strip", z.ZodTypeAny, {
396
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
397
+ description: string;
398
+ locator: string | null;
399
+ }, {
400
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
401
+ description: string;
402
+ locator?: string | null | undefined;
403
+ }>, "many">>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ source: "constrained" | "validated" | "absent";
406
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
407
+ required_inputs?: {
408
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
409
+ description: string;
410
+ locator: string | null;
411
+ }[] | undefined;
412
+ }, {
413
+ source: "constrained" | "validated" | "absent";
414
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
415
+ required_inputs?: {
416
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
417
+ description: string;
418
+ locator?: string | null | undefined;
419
+ }[] | undefined;
420
+ }>>;
373
421
  }, "strict", z.ZodTypeAny, {
374
422
  review: "not_run" | "approved" | "blocked";
375
- 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;
423
+ 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;
376
424
  checks: "passed" | "failed" | "not_configured";
377
425
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
378
426
  noChanges: boolean;
427
+ work_state?: {
428
+ source: "constrained" | "validated" | "absent";
429
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
430
+ required_inputs?: {
431
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
432
+ description: string;
433
+ locator: string | null;
434
+ }[] | undefined;
435
+ } | undefined;
379
436
  }, {
380
437
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
381
438
  review?: "not_run" | "approved" | "blocked" | undefined;
382
- 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;
439
+ 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;
383
440
  checks?: "passed" | "failed" | "not_configured" | undefined;
384
441
  noChanges?: boolean | undefined;
442
+ work_state?: {
443
+ source: "constrained" | "validated" | "absent";
444
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
445
+ required_inputs?: {
446
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
447
+ description: string;
448
+ locator?: string | null | undefined;
449
+ }[] | undefined;
450
+ } | undefined;
385
451
  }>>>;
386
452
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
387
453
  route: z.ZodDefault<z.ZodNullable<z.ZodObject<{
@@ -391,14 +457,61 @@ export declare const ControlRunDetail: z.ZodObject<{
391
457
  verified: z.ZodDefault<z.ZodBoolean>;
392
458
  }, "strip", z.ZodTypeAny, {
393
459
  harnessId: string | null;
460
+ verified: boolean;
394
461
  requestedModel: string | null;
395
462
  observedModel: string | null;
396
- verified: boolean;
397
463
  }, {
398
464
  harnessId?: string | null | undefined;
465
+ verified?: boolean | undefined;
399
466
  requestedModel?: string | null | undefined;
400
467
  observedModel?: string | null | undefined;
401
- verified?: boolean | undefined;
468
+ }>>>;
469
+ routingRationale: z.ZodDefault<z.ZodNullable<z.ZodObject<{
470
+ goal: z.ZodEnum<["auto", "quality", "economy"]>;
471
+ paid_fallback: z.ZodEnum<["never", "when_unavailable", "allowed_within_cap"]>;
472
+ order: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
473
+ dropped: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
474
+ reason: z.ZodEnum<["subscription_entitlement_first", "lowest_incremental_cash", "quality_tier", "expiring_quota_slack", "all_incremental_cash_unknown", "declared_order"]>;
475
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
476
+ harness_id: z.ZodString;
477
+ billing_knowledge: z.ZodEnum<["proven_zero", "subscription_entitlement", "metered", "unknown"]>;
478
+ incremental_cost_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
479
+ eligible: z.ZodBoolean;
480
+ }, "strip", z.ZodTypeAny, {
481
+ harness_id: string;
482
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
483
+ incremental_cost_usd: number | null;
484
+ eligible: boolean;
485
+ }, {
486
+ harness_id: string;
487
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
488
+ eligible: boolean;
489
+ incremental_cost_usd?: number | null | undefined;
490
+ }>, "many">>;
491
+ }, "strip", z.ZodTypeAny, {
492
+ entries: {
493
+ harness_id: string;
494
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
495
+ incremental_cost_usd: number | null;
496
+ eligible: boolean;
497
+ }[];
498
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
499
+ goal: "auto" | "quality" | "economy";
500
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
501
+ order: string[];
502
+ dropped: string[];
503
+ }, {
504
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
505
+ goal: "auto" | "quality" | "economy";
506
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
507
+ entries?: {
508
+ harness_id: string;
509
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
510
+ eligible: boolean;
511
+ incremental_cost_usd?: number | null | undefined;
512
+ }[] | undefined;
513
+ order?: string[] | undefined;
514
+ dropped?: string[] | undefined;
402
515
  }>>>;
403
516
  tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
404
517
  program: z.ZodString;
@@ -421,27 +534,21 @@ export declare const ControlRunDetail: z.ZodObject<{
421
534
  finishedAt: z.ZodOptional<z.ZodString>;
422
535
  }, "strip", z.ZodTypeAny, {
423
536
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
424
- runId: string;
425
- outcomeFacts: {
426
- review: "not_run" | "approved" | "blocked";
427
- 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;
428
- checks: "passed" | "failed" | "not_configured";
429
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
430
- noChanges: boolean;
431
- } | null;
432
537
  project: {
433
538
  kind: "none" | "project";
434
- root: string | null;
435
539
  context: "off" | "auto";
540
+ root: string | null;
436
541
  projectName: string | null;
437
542
  };
438
543
  jobId: string;
544
+ runId: string;
439
545
  failure: {
546
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
440
547
  harnessId: string | null;
441
548
  attemptId: string | null;
442
549
  runDir: string | null;
443
550
  phase: string;
444
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
551
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
445
552
  safeMessage: string;
446
553
  rawDetailRef: string | null;
447
554
  logRefs: string[];
@@ -449,7 +556,7 @@ export declare const ControlRunDetail: z.ZodObject<{
449
556
  nextActions: string[];
450
557
  } | null;
451
558
  webEvidence: {
452
- status: "failed" | "none" | "attempted" | "unverified" | "satisfied";
559
+ status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
453
560
  available: boolean;
454
561
  target: string | null;
455
562
  mode: "off" | "auto" | "cached" | "live";
@@ -487,12 +594,41 @@ export declare const ControlRunDetail: z.ZodObject<{
487
594
  preTurnSha: string | null;
488
595
  revertable: boolean;
489
596
  };
597
+ outcomeFacts: {
598
+ review: "not_run" | "approved" | "blocked";
599
+ 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;
600
+ checks: "passed" | "failed" | "not_configured";
601
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
602
+ noChanges: boolean;
603
+ work_state?: {
604
+ source: "constrained" | "validated" | "absent";
605
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
606
+ required_inputs?: {
607
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
608
+ description: string;
609
+ locator: string | null;
610
+ }[] | undefined;
611
+ } | undefined;
612
+ } | null;
490
613
  waitingOnUser: boolean;
491
614
  route: {
492
615
  harnessId: string | null;
616
+ verified: boolean;
493
617
  requestedModel: string | null;
494
618
  observedModel: string | null;
495
- verified: boolean;
619
+ } | null;
620
+ routingRationale: {
621
+ entries: {
622
+ harness_id: string;
623
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
624
+ incremental_cost_usd: number | null;
625
+ eligible: boolean;
626
+ }[];
627
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
628
+ goal: "auto" | "quality" | "economy";
629
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
630
+ order: string[];
631
+ dropped: string[];
496
632
  } | null;
497
633
  startedAt?: string | undefined;
498
634
  error?: string | undefined;
@@ -501,7 +637,6 @@ export declare const ControlRunDetail: z.ZodObject<{
501
637
  prompt?: string | undefined;
502
638
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
503
639
  harnesses?: string[] | undefined;
504
- runDir?: string | undefined;
505
640
  model?: string | undefined;
506
641
  tests?: {
507
642
  args: string[];
@@ -510,6 +645,7 @@ export declare const ControlRunDetail: z.ZodObject<{
510
645
  cwd?: string | undefined;
511
646
  }[] | undefined;
512
647
  taskId?: string | undefined;
648
+ runDir?: string | undefined;
513
649
  primaryHarness?: string | undefined;
514
650
  routingGoal?: "auto" | "quality" | "economy" | undefined;
515
651
  n?: number | undefined;
@@ -556,8 +692,8 @@ export declare const ControlRunDetail: z.ZodObject<{
556
692
  finishedAt?: string | undefined;
557
693
  }, {
558
694
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
559
- runId: string;
560
695
  jobId: string;
696
+ runId: string;
561
697
  startedAt?: string | undefined;
562
698
  error?: string | undefined;
563
699
  createdAt?: string | undefined;
@@ -565,14 +701,6 @@ export declare const ControlRunDetail: z.ZodObject<{
565
701
  prompt?: string | undefined;
566
702
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
567
703
  harnesses?: string[] | undefined;
568
- runDir?: string | undefined;
569
- outcomeFacts?: {
570
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
571
- review?: "not_run" | "approved" | "blocked" | undefined;
572
- 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;
573
- checks?: "passed" | "failed" | "not_configured" | undefined;
574
- noChanges?: boolean | undefined;
575
- } | null | undefined;
576
704
  model?: string | undefined;
577
705
  tests?: {
578
706
  program: string;
@@ -582,11 +710,12 @@ export declare const ControlRunDetail: z.ZodObject<{
582
710
  }[] | undefined;
583
711
  project?: {
584
712
  kind?: "none" | "project" | undefined;
585
- root?: string | null | undefined;
586
713
  context?: "off" | "auto" | undefined;
714
+ root?: string | null | undefined;
587
715
  projectName?: string | null | undefined;
588
716
  } | undefined;
589
717
  taskId?: string | undefined;
718
+ runDir?: string | undefined;
590
719
  primaryHarness?: string | undefined;
591
720
  routingGoal?: "auto" | "quality" | "economy" | undefined;
592
721
  n?: number | undefined;
@@ -608,11 +737,12 @@ export declare const ControlRunDetail: z.ZodObject<{
608
737
  }[] | undefined;
609
738
  failure?: {
610
739
  safeMessage: string;
740
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
611
741
  harnessId?: string | null | undefined;
612
742
  attemptId?: string | null | undefined;
613
743
  runDir?: string | null | undefined;
614
744
  phase?: string | undefined;
615
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
745
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
616
746
  rawDetailRef?: string | null | undefined;
617
747
  logRefs?: string[] | undefined;
618
748
  eventRefs?: string[] | undefined;
@@ -642,7 +772,7 @@ export declare const ControlRunDetail: z.ZodObject<{
642
772
  webRequired?: boolean | undefined;
643
773
  webMode?: "off" | "auto" | "cached" | "live" | undefined;
644
774
  webEvidence?: {
645
- status?: "failed" | "none" | "attempted" | "unverified" | "satisfied" | undefined;
775
+ status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
646
776
  available?: boolean | undefined;
647
777
  target?: string | null | undefined;
648
778
  mode?: "off" | "auto" | "cached" | "live" | undefined;
@@ -681,12 +811,41 @@ export declare const ControlRunDetail: z.ZodObject<{
681
811
  preTurnSha?: string | null | undefined;
682
812
  revertable?: boolean | undefined;
683
813
  } | undefined;
814
+ outcomeFacts?: {
815
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
816
+ review?: "not_run" | "approved" | "blocked" | undefined;
817
+ 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;
818
+ checks?: "passed" | "failed" | "not_configured" | undefined;
819
+ noChanges?: boolean | undefined;
820
+ work_state?: {
821
+ source: "constrained" | "validated" | "absent";
822
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
823
+ required_inputs?: {
824
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
825
+ description: string;
826
+ locator?: string | null | undefined;
827
+ }[] | undefined;
828
+ } | undefined;
829
+ } | null | undefined;
684
830
  waitingOnUser?: boolean | undefined;
685
831
  route?: {
686
832
  harnessId?: string | null | undefined;
833
+ verified?: boolean | undefined;
687
834
  requestedModel?: string | null | undefined;
688
835
  observedModel?: string | null | undefined;
689
- verified?: boolean | undefined;
836
+ } | null | undefined;
837
+ routingRationale?: {
838
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
839
+ goal: "auto" | "quality" | "economy";
840
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
841
+ entries?: {
842
+ harness_id: string;
843
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
844
+ eligible: boolean;
845
+ incremental_cost_usd?: number | null | undefined;
846
+ }[] | undefined;
847
+ order?: string[] | undefined;
848
+ dropped?: string[] | undefined;
690
849
  } | null | undefined;
691
850
  finishedAt?: string | undefined;
692
851
  }>;
@@ -750,6 +909,7 @@ export declare const ControlRunDetail: z.ZodObject<{
750
909
  toolName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
751
910
  target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
752
911
  errorSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
912
+ ignoredSettings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
753
913
  rawRef: z.ZodDefault<z.ZodNullable<z.ZodString>>;
754
914
  }, "strip", z.ZodTypeAny, {
755
915
  type: string;
@@ -761,6 +921,7 @@ export declare const ControlRunDetail: z.ZodObject<{
761
921
  errorSummary: string | null;
762
922
  severity: "error" | "info" | "warning";
763
923
  toolName: string | null;
924
+ ignoredSettings: string[];
764
925
  rawRef: string | null;
765
926
  ts?: string | undefined;
766
927
  }, {
@@ -774,6 +935,7 @@ export declare const ControlRunDetail: z.ZodObject<{
774
935
  errorSummary?: string | null | undefined;
775
936
  severity?: "error" | "info" | "warning" | undefined;
776
937
  toolName?: string | null | undefined;
938
+ ignoredSettings?: string[] | undefined;
777
939
  rawRef?: string | null | undefined;
778
940
  }>, "many">>;
779
941
  budget: z.ZodDefault<z.ZodObject<{
@@ -794,9 +956,12 @@ export declare const ControlRunDetail: z.ZodObject<{
794
956
  maxUsd: number;
795
957
  }>]>>;
796
958
  spendUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
959
+ valuationUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
960
+ valuationKnowledge: z.ZodDefault<z.ZodEnum<["exact", "estimated", "unknown"]>>;
797
961
  remainingUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
798
962
  estimated: z.ZodDefault<z.ZodBoolean>;
799
963
  source: z.ZodDefault<z.ZodEnum<["decision", "events", "settings", "unknown"]>>;
964
+ evidence: z.ZodDefault<z.ZodEnum<["complete", "incomplete", "unavailable"]>>;
800
965
  }, "strip", z.ZodTypeAny, {
801
966
  source: "unknown" | "decision" | "events" | "settings";
802
967
  estimated: boolean;
@@ -807,7 +972,10 @@ export declare const ControlRunDetail: z.ZodObject<{
807
972
  maxUsd: number;
808
973
  };
809
974
  spendUsd: number | null;
975
+ valuationUsd: number | null;
976
+ valuationKnowledge: "exact" | "unknown" | "estimated";
810
977
  remainingUsd: number | null;
978
+ evidence: "unavailable" | "incomplete" | "complete";
811
979
  }, {
812
980
  source?: "unknown" | "decision" | "events" | "settings" | undefined;
813
981
  estimated?: boolean | undefined;
@@ -818,7 +986,10 @@ export declare const ControlRunDetail: z.ZodObject<{
818
986
  maxUsd: number;
819
987
  } | undefined;
820
988
  spendUsd?: number | null | undefined;
989
+ valuationUsd?: number | null | undefined;
990
+ valuationKnowledge?: "exact" | "unknown" | "estimated" | undefined;
821
991
  remainingUsd?: number | null | undefined;
992
+ evidence?: "unavailable" | "incomplete" | "complete" | undefined;
822
993
  }>>;
823
994
  finalSummary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
824
995
  decision: z.ZodDefault<z.ZodNullable<z.ZodObject<{
@@ -828,34 +999,119 @@ export declare const ControlRunDetail: z.ZodObject<{
828
999
  noChanges: z.ZodDefault<z.ZodBoolean>;
829
1000
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
830
1001
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
831
- 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"]>>>;
1002
+ 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"]>>>;
1003
+ work_state: z.ZodOptional<z.ZodObject<{
1004
+ state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
1005
+ source: z.ZodEnum<["constrained", "validated", "absent"]>;
1006
+ required_inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1007
+ kind: z.ZodEnum<["file", "context", "credential", "permission", "decision", "external_dependency"]>;
1008
+ locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1009
+ description: z.ZodString;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1012
+ description: string;
1013
+ locator: string | null;
1014
+ }, {
1015
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1016
+ description: string;
1017
+ locator?: string | null | undefined;
1018
+ }>, "many">>;
1019
+ }, "strip", z.ZodTypeAny, {
1020
+ source: "constrained" | "validated" | "absent";
1021
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1022
+ required_inputs?: {
1023
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1024
+ description: string;
1025
+ locator: string | null;
1026
+ }[] | undefined;
1027
+ }, {
1028
+ source: "constrained" | "validated" | "absent";
1029
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1030
+ required_inputs?: {
1031
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1032
+ description: string;
1033
+ locator?: string | null | undefined;
1034
+ }[] | undefined;
1035
+ }>>;
832
1036
  }, "strict", z.ZodTypeAny, {
833
1037
  review: "not_run" | "approved" | "blocked";
834
- 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;
1038
+ 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;
835
1039
  checks: "passed" | "failed" | "not_configured";
836
1040
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
837
1041
  noChanges: boolean;
1042
+ work_state?: {
1043
+ source: "constrained" | "validated" | "absent";
1044
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1045
+ required_inputs?: {
1046
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1047
+ description: string;
1048
+ locator: string | null;
1049
+ }[] | undefined;
1050
+ } | undefined;
838
1051
  }, {
839
1052
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
840
1053
  review?: "not_run" | "approved" | "blocked" | undefined;
841
- 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;
1054
+ 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;
842
1055
  checks?: "passed" | "failed" | "not_configured" | undefined;
843
1056
  noChanges?: boolean | undefined;
1057
+ work_state?: {
1058
+ source: "constrained" | "validated" | "absent";
1059
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1060
+ required_inputs?: {
1061
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1062
+ description: string;
1063
+ locator?: string | null | undefined;
1064
+ }[] | undefined;
1065
+ } | undefined;
844
1066
  }>;
845
1067
  why_winner: z.ZodDefault<z.ZodString>;
846
1068
  why_not_others: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1069
+ ranking_policy_version: z.ZodDefault<z.ZodNumber>;
1070
+ score_axes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1071
+ ranking_scorecard: z.ZodDefault<z.ZodArray<z.ZodObject<{
1072
+ attempt_id: z.ZodString;
1073
+ label: z.ZodString;
1074
+ axes: z.ZodRecord<z.ZodString, z.ZodString>;
1075
+ }, "strip", z.ZodTypeAny, {
1076
+ label: string;
1077
+ attempt_id: string;
1078
+ axes: Record<string, string>;
1079
+ }, {
1080
+ label: string;
1081
+ attempt_id: string;
1082
+ axes: Record<string, string>;
1083
+ }>, "many">>;
1084
+ decisive_axis: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1085
+ key: z.ZodString;
1086
+ winner_value: z.ZodString;
1087
+ runner_up_value: z.ZodString;
1088
+ }, "strip", z.ZodTypeAny, {
1089
+ key: string;
1090
+ winner_value: string;
1091
+ runner_up_value: string;
1092
+ }, {
1093
+ key: string;
1094
+ winner_value: string;
1095
+ runner_up_value: string;
1096
+ }>>>;
847
1097
  accepted_risks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
848
1098
  final_checks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
849
1099
  evidence_facts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
850
1100
  budget_summary: z.ZodDefault<z.ZodObject<{
851
1101
  spend_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
852
1102
  estimated: z.ZodDefault<z.ZodBoolean>;
1103
+ cash_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1104
+ valuation_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
853
1105
  }, "strip", z.ZodTypeAny, {
854
1106
  estimated: boolean;
855
1107
  spend_usd: number | null;
1108
+ cash_usd: number | null;
1109
+ valuation_usd: number | null;
856
1110
  }, {
857
1111
  estimated?: boolean | undefined;
858
1112
  spend_usd?: number | null | undefined;
1113
+ cash_usd?: number | null | undefined;
1114
+ valuation_usd?: number | null | undefined;
859
1115
  }>>;
860
1116
  apply_recommendation: z.ZodDefault<z.ZodEnum<["apply", "inspect", "continue", "human_review"]>>;
861
1117
  verification_basis: z.ZodDefault<z.ZodEnum<["none", "cross_family_review", "both"]>>;
@@ -903,19 +1159,42 @@ export declare const ControlRunDetail: z.ZodObject<{
903
1159
  winner: string | null;
904
1160
  facts: {
905
1161
  review: "not_run" | "approved" | "blocked";
906
- 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;
1162
+ 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;
907
1163
  checks: "passed" | "failed" | "not_configured";
908
1164
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
909
1165
  noChanges: boolean;
1166
+ work_state?: {
1167
+ source: "constrained" | "validated" | "absent";
1168
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1169
+ required_inputs?: {
1170
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1171
+ description: string;
1172
+ locator: string | null;
1173
+ }[] | undefined;
1174
+ } | undefined;
910
1175
  };
911
1176
  why_winner: string;
912
1177
  why_not_others: Record<string, string>;
1178
+ ranking_policy_version: number;
1179
+ score_axes: string[];
1180
+ ranking_scorecard: {
1181
+ label: string;
1182
+ attempt_id: string;
1183
+ axes: Record<string, string>;
1184
+ }[];
1185
+ decisive_axis: {
1186
+ key: string;
1187
+ winner_value: string;
1188
+ runner_up_value: string;
1189
+ } | null;
913
1190
  accepted_risks: string[];
914
1191
  final_checks: string[];
915
1192
  evidence_facts: string[];
916
1193
  budget_summary: {
917
1194
  estimated: boolean;
918
1195
  spend_usd: number | null;
1196
+ cash_usd: number | null;
1197
+ valuation_usd: number | null;
919
1198
  };
920
1199
  apply_recommendation: "apply" | "inspect" | "continue" | "human_review";
921
1200
  verification_basis: "none" | "cross_family_review" | "both";
@@ -936,18 +1215,41 @@ export declare const ControlRunDetail: z.ZodObject<{
936
1215
  facts: {
937
1216
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
938
1217
  review?: "not_run" | "approved" | "blocked" | undefined;
939
- 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;
1218
+ 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;
940
1219
  checks?: "passed" | "failed" | "not_configured" | undefined;
941
1220
  noChanges?: boolean | undefined;
1221
+ work_state?: {
1222
+ source: "constrained" | "validated" | "absent";
1223
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1224
+ required_inputs?: {
1225
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1226
+ description: string;
1227
+ locator?: string | null | undefined;
1228
+ }[] | undefined;
1229
+ } | undefined;
942
1230
  };
943
1231
  why_winner?: string | undefined;
944
1232
  why_not_others?: Record<string, string> | undefined;
1233
+ ranking_policy_version?: number | undefined;
1234
+ score_axes?: string[] | undefined;
1235
+ ranking_scorecard?: {
1236
+ label: string;
1237
+ attempt_id: string;
1238
+ axes: Record<string, string>;
1239
+ }[] | undefined;
1240
+ decisive_axis?: {
1241
+ key: string;
1242
+ winner_value: string;
1243
+ runner_up_value: string;
1244
+ } | null | undefined;
945
1245
  accepted_risks?: string[] | undefined;
946
1246
  final_checks?: string[] | undefined;
947
1247
  evidence_facts?: string[] | undefined;
948
1248
  budget_summary?: {
949
1249
  estimated?: boolean | undefined;
950
1250
  spend_usd?: number | null | undefined;
1251
+ cash_usd?: number | null | undefined;
1252
+ valuation_usd?: number | null | undefined;
951
1253
  } | undefined;
952
1254
  apply_recommendation?: "apply" | "inspect" | "continue" | "human_review" | undefined;
953
1255
  verification_basis?: "none" | "cross_family_review" | "both" | undefined;
@@ -1007,10 +1309,10 @@ export declare const ControlRunDetail: z.ZodObject<{
1007
1309
  state: z.ZodEnum<["ready", "needs_answers", "unverified"]>;
1008
1310
  questionCount: z.ZodDefault<z.ZodNumber>;
1009
1311
  }, "strict", z.ZodTypeAny, {
1010
- state: "ready" | "needs_answers" | "unverified";
1312
+ state: "ready" | "unverified" | "needs_answers";
1011
1313
  questionCount: number;
1012
1314
  }, {
1013
- state: "ready" | "needs_answers" | "unverified";
1315
+ state: "ready" | "unverified" | "needs_answers";
1014
1316
  questionCount?: number | undefined;
1015
1317
  }>>>;
1016
1318
  /** The plan run's OPEN questions, projected from the same
@@ -1185,13 +1487,13 @@ export declare const ControlRunDetail: z.ZodObject<{
1185
1487
  observed_model: string | null;
1186
1488
  requested_model: string | null;
1187
1489
  requested_effort: string | null;
1188
- route_proof_status: "unverified" | "verified" | "accepted_model_arg" | "same_model_fallback";
1490
+ route_proof_status: "verified" | "unverified" | "accepted_model_arg" | "same_model_fallback";
1189
1491
  }, {
1190
1492
  harness_id: string;
1191
1493
  observed_model?: string | null | undefined;
1192
1494
  requested_model?: string | null | undefined;
1193
1495
  requested_effort?: string | null | undefined;
1194
- route_proof_status?: "unverified" | "verified" | "accepted_model_arg" | "same_model_fallback" | undefined;
1496
+ route_proof_status?: "verified" | "unverified" | "accepted_model_arg" | "same_model_fallback" | undefined;
1195
1497
  }>;
1196
1498
  status: z.ZodDefault<z.ZodEnum<["proposed", "accepted", "rebutted", "fixed", "accepted_risk", "duplicate", "stale", "out_of_scope", "insufficient_evidence"]>>;
1197
1499
  revalidation_note: z.ZodOptional<z.ZodString>;
@@ -1200,8 +1502,6 @@ export declare const ControlRunDetail: z.ZodObject<{
1200
1502
  id: string;
1201
1503
  category: "correctness" | "regression" | "security" | "performance" | "maintainability" | "test_gap" | "spec_gap" | "deploy" | "architecture" | "ux";
1202
1504
  severity: "BLOCK" | "FIX_FIRST" | "WARN" | "NIT" | "OUT_OF_SCOPE" | "INSUFFICIENT_EVIDENCE" | "NEEDS_HUMAN";
1203
- claim: string;
1204
- linked_acceptance_criteria: string[];
1205
1505
  evidence: {
1206
1506
  files: {
1207
1507
  path: string;
@@ -1215,13 +1515,15 @@ export declare const ControlRunDetail: z.ZodObject<{
1215
1515
  path: string;
1216
1516
  }[];
1217
1517
  };
1518
+ claim: string;
1519
+ linked_acceptance_criteria: string[];
1218
1520
  proposed_fix: string | null;
1219
1521
  reviewer: {
1220
1522
  harness_id: string;
1221
1523
  observed_model: string | null;
1222
1524
  requested_model: string | null;
1223
1525
  requested_effort: string | null;
1224
- route_proof_status: "unverified" | "verified" | "accepted_model_arg" | "same_model_fallback";
1526
+ route_proof_status: "verified" | "unverified" | "accepted_model_arg" | "same_model_fallback";
1225
1527
  };
1226
1528
  revalidation_note?: string | undefined;
1227
1529
  }, {
@@ -1234,10 +1536,9 @@ export declare const ControlRunDetail: z.ZodObject<{
1234
1536
  observed_model?: string | null | undefined;
1235
1537
  requested_model?: string | null | undefined;
1236
1538
  requested_effort?: string | null | undefined;
1237
- route_proof_status?: "unverified" | "verified" | "accepted_model_arg" | "same_model_fallback" | undefined;
1539
+ route_proof_status?: "verified" | "unverified" | "accepted_model_arg" | "same_model_fallback" | undefined;
1238
1540
  };
1239
1541
  status?: "stale" | "accepted" | "proposed" | "rebutted" | "fixed" | "accepted_risk" | "duplicate" | "out_of_scope" | "insufficient_evidence" | undefined;
1240
- linked_acceptance_criteria?: string[] | undefined;
1241
1542
  evidence?: {
1242
1543
  files?: {
1243
1544
  path: string;
@@ -1251,6 +1552,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1251
1552
  path: string;
1252
1553
  }[] | undefined;
1253
1554
  } | undefined;
1555
+ linked_acceptance_criteria?: string[] | undefined;
1254
1556
  proposed_fix?: string | null | undefined;
1255
1557
  revalidation_note?: string | undefined;
1256
1558
  }>, "many">>;
@@ -1365,6 +1667,16 @@ export declare const ControlRunDetail: z.ZodObject<{
1365
1667
  additions?: number | undefined;
1366
1668
  deletions?: number | undefined;
1367
1669
  }>>>;
1670
+ /**
1671
+ * QA-028: this candidate's row of the decision's ranking scorecard —
1672
+ * every compared ranking axis (`tool_warnings`, `diff_size`, `cost`, …)
1673
+ * keyed to its formatted value, projected from
1674
+ * `decision.ranking_scorecard` by attempt id. Null when the run had no
1675
+ * arbitration (single candidate / no decision). Together with the
1676
+ * detail-level `decision.decisive_axis`, a machine surface can explain WHY
1677
+ * a winner beat a runner-up without reimplementing the ranking order.
1678
+ */
1679
+ rankingAxes: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
1368
1680
  }, "strip", z.ZodTypeAny, {
1369
1681
  harnessId: string;
1370
1682
  attemptId: string;
@@ -1384,6 +1696,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1384
1696
  additions: number;
1385
1697
  deletions: number;
1386
1698
  } | null;
1699
+ rankingAxes: Record<string, string> | null;
1387
1700
  }, {
1388
1701
  harnessId: string;
1389
1702
  attemptId: string;
@@ -1403,6 +1716,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1403
1716
  additions?: number | undefined;
1404
1717
  deletions?: number | undefined;
1405
1718
  } | null | undefined;
1719
+ rankingAxes?: Record<string, string> | null | undefined;
1406
1720
  }>, "many">>;
1407
1721
  /** Live plan checklist: the LAST plan.progress event's items, or null
1408
1722
  * when the run never emitted one. */
@@ -1420,22 +1734,26 @@ export declare const ControlRunDetail: z.ZodObject<{
1420
1734
  id: string;
1421
1735
  title: string;
1422
1736
  }>, "many">>;
1737
+ evidence: z.ZodDefault<z.ZodEnum<["complete", "incomplete", "unavailable"]>>;
1423
1738
  }, "strip", z.ZodTypeAny, {
1424
1739
  items: {
1425
1740
  status: "pending" | "completed" | "in_progress";
1426
1741
  id: string;
1427
1742
  title: string;
1428
1743
  }[];
1744
+ evidence: "unavailable" | "incomplete" | "complete";
1429
1745
  }, {
1430
1746
  items?: {
1431
1747
  status: "pending" | "completed" | "in_progress";
1432
1748
  id: string;
1433
1749
  title: string;
1434
1750
  }[] | undefined;
1751
+ evidence?: "unavailable" | "incomplete" | "complete" | undefined;
1435
1752
  }>>>;
1436
1753
  failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1437
1754
  phase: z.ZodDefault<z.ZodString>;
1438
- category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
1755
+ category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
1756
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable"]>>>;
1439
1757
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1440
1758
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1441
1759
  safeMessage: z.ZodString;
@@ -1445,11 +1763,12 @@ export declare const ControlRunDetail: z.ZodObject<{
1445
1763
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1446
1764
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1447
1765
  }, "strip", z.ZodTypeAny, {
1766
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
1448
1767
  harnessId: string | null;
1449
1768
  attemptId: string | null;
1450
1769
  runDir: string | null;
1451
1770
  phase: string;
1452
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
1771
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
1453
1772
  safeMessage: string;
1454
1773
  rawDetailRef: string | null;
1455
1774
  logRefs: string[];
@@ -1457,40 +1776,51 @@ export declare const ControlRunDetail: z.ZodObject<{
1457
1776
  nextActions: string[];
1458
1777
  }, {
1459
1778
  safeMessage: string;
1779
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
1460
1780
  harnessId?: string | null | undefined;
1461
1781
  attemptId?: string | null | undefined;
1462
1782
  runDir?: string | null | undefined;
1463
1783
  phase?: string | undefined;
1464
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
1784
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
1465
1785
  rawDetailRef?: string | null | undefined;
1466
1786
  logRefs?: string[] | undefined;
1467
1787
  eventRefs?: string[] | undefined;
1468
1788
  nextActions?: string[] | undefined;
1469
1789
  }>>>;
1790
+ /** Minimal typed required-operator-actions for a succeeded-but-BLOCKED run
1791
+ * (GH #29): stable-id actions derived by the single status-projection owner
1792
+ * (requiredActionsFor) from the terminal outcome facts + operator-decision
1793
+ * state — review blocked, checks failed, needs-decision, or a work_state
1794
+ * needs_input/incomplete veto. Empty for clean, already-decided, and failed
1795
+ * runs (a failed run's remediation rides RunFailure.nextActions). */
1796
+ requiredActions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1797
+ id: z.ZodEnum<["provide_required_input", "complete_incomplete_work", "resolve_review_block", "fix_failed_checks", "record_operator_decision"]>;
1798
+ detail: z.ZodString;
1799
+ }, "strict", z.ZodTypeAny, {
1800
+ detail: string;
1801
+ id: "provide_required_input" | "complete_incomplete_work" | "resolve_review_block" | "fix_failed_checks" | "record_operator_decision";
1802
+ }, {
1803
+ detail: string;
1804
+ id: "provide_required_input" | "complete_incomplete_work" | "resolve_review_block" | "fix_failed_checks" | "record_operator_decision";
1805
+ }>, "many">>;
1470
1806
  }, "strip", z.ZodTypeAny, {
1471
1807
  summary: {
1472
1808
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
1473
- runId: string;
1474
- outcomeFacts: {
1475
- review: "not_run" | "approved" | "blocked";
1476
- 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;
1477
- checks: "passed" | "failed" | "not_configured";
1478
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1479
- noChanges: boolean;
1480
- } | null;
1481
1809
  project: {
1482
1810
  kind: "none" | "project";
1483
- root: string | null;
1484
1811
  context: "off" | "auto";
1812
+ root: string | null;
1485
1813
  projectName: string | null;
1486
1814
  };
1487
1815
  jobId: string;
1816
+ runId: string;
1488
1817
  failure: {
1818
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
1489
1819
  harnessId: string | null;
1490
1820
  attemptId: string | null;
1491
1821
  runDir: string | null;
1492
1822
  phase: string;
1493
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
1823
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
1494
1824
  safeMessage: string;
1495
1825
  rawDetailRef: string | null;
1496
1826
  logRefs: string[];
@@ -1498,7 +1828,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1498
1828
  nextActions: string[];
1499
1829
  } | null;
1500
1830
  webEvidence: {
1501
- status: "failed" | "none" | "attempted" | "unverified" | "satisfied";
1831
+ status: "failed" | "none" | "unverified" | "attempted" | "satisfied";
1502
1832
  available: boolean;
1503
1833
  target: string | null;
1504
1834
  mode: "off" | "auto" | "cached" | "live";
@@ -1536,12 +1866,41 @@ export declare const ControlRunDetail: z.ZodObject<{
1536
1866
  preTurnSha: string | null;
1537
1867
  revertable: boolean;
1538
1868
  };
1869
+ outcomeFacts: {
1870
+ review: "not_run" | "approved" | "blocked";
1871
+ 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;
1872
+ checks: "passed" | "failed" | "not_configured";
1873
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1874
+ noChanges: boolean;
1875
+ work_state?: {
1876
+ source: "constrained" | "validated" | "absent";
1877
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1878
+ required_inputs?: {
1879
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1880
+ description: string;
1881
+ locator: string | null;
1882
+ }[] | undefined;
1883
+ } | undefined;
1884
+ } | null;
1539
1885
  waitingOnUser: boolean;
1540
1886
  route: {
1541
1887
  harnessId: string | null;
1888
+ verified: boolean;
1542
1889
  requestedModel: string | null;
1543
1890
  observedModel: string | null;
1544
- verified: boolean;
1891
+ } | null;
1892
+ routingRationale: {
1893
+ entries: {
1894
+ harness_id: string;
1895
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
1896
+ incremental_cost_usd: number | null;
1897
+ eligible: boolean;
1898
+ }[];
1899
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
1900
+ goal: "auto" | "quality" | "economy";
1901
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
1902
+ order: string[];
1903
+ dropped: string[];
1545
1904
  } | null;
1546
1905
  startedAt?: string | undefined;
1547
1906
  error?: string | undefined;
@@ -1550,7 +1909,6 @@ export declare const ControlRunDetail: z.ZodObject<{
1550
1909
  prompt?: string | undefined;
1551
1910
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1552
1911
  harnesses?: string[] | undefined;
1553
- runDir?: string | undefined;
1554
1912
  model?: string | undefined;
1555
1913
  tests?: {
1556
1914
  args: string[];
@@ -1559,6 +1917,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1559
1917
  cwd?: string | undefined;
1560
1918
  }[] | undefined;
1561
1919
  taskId?: string | undefined;
1920
+ runDir?: string | undefined;
1562
1921
  primaryHarness?: string | undefined;
1563
1922
  routingGoal?: "auto" | "quality" | "economy" | undefined;
1564
1923
  n?: number | undefined;
@@ -1608,19 +1967,42 @@ export declare const ControlRunDetail: z.ZodObject<{
1608
1967
  winner: string | null;
1609
1968
  facts: {
1610
1969
  review: "not_run" | "approved" | "blocked";
1611
- 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;
1970
+ 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;
1612
1971
  checks: "passed" | "failed" | "not_configured";
1613
1972
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1614
1973
  noChanges: boolean;
1974
+ work_state?: {
1975
+ source: "constrained" | "validated" | "absent";
1976
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
1977
+ required_inputs?: {
1978
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
1979
+ description: string;
1980
+ locator: string | null;
1981
+ }[] | undefined;
1982
+ } | undefined;
1615
1983
  };
1616
1984
  why_winner: string;
1617
1985
  why_not_others: Record<string, string>;
1986
+ ranking_policy_version: number;
1987
+ score_axes: string[];
1988
+ ranking_scorecard: {
1989
+ label: string;
1990
+ attempt_id: string;
1991
+ axes: Record<string, string>;
1992
+ }[];
1993
+ decisive_axis: {
1994
+ key: string;
1995
+ winner_value: string;
1996
+ runner_up_value: string;
1997
+ } | null;
1618
1998
  accepted_risks: string[];
1619
1999
  final_checks: string[];
1620
2000
  evidence_facts: string[];
1621
2001
  budget_summary: {
1622
2002
  estimated: boolean;
1623
2003
  spend_usd: number | null;
2004
+ cash_usd: number | null;
2005
+ valuation_usd: number | null;
1624
2006
  };
1625
2007
  apply_recommendation: "apply" | "inspect" | "continue" | "human_review";
1626
2008
  verification_basis: "none" | "cross_family_review" | "both";
@@ -1637,36 +2019,6 @@ export declare const ControlRunDetail: z.ZodObject<{
1637
2019
  }[];
1638
2020
  } | null;
1639
2021
  } | null;
1640
- applyEligibility: {
1641
- state: string | null;
1642
- reason: string | null;
1643
- eligible: boolean;
1644
- requiredAction: string | null;
1645
- } | null;
1646
- outcomeBanner: string | null;
1647
- planReadiness: {
1648
- state: "ready" | "needs_answers" | "unverified";
1649
- questionCount: number;
1650
- } | null;
1651
- pendingInteractions: {
1652
- harnessId: string | null;
1653
- attemptId: string | null;
1654
- questions: {
1655
- options: {
1656
- label: string;
1657
- description: string | null;
1658
- }[];
1659
- id: string;
1660
- question: string;
1661
- header: string | null;
1662
- multi_select: boolean;
1663
- }[];
1664
- runId: string;
1665
- interactionId: string;
1666
- sourceTool: string | null;
1667
- requestedAt: string;
1668
- timeoutAt: string | null;
1669
- }[];
1670
2022
  budget: {
1671
2023
  source: "unknown" | "decision" | "events" | "settings";
1672
2024
  estimated: boolean;
@@ -1677,7 +2029,10 @@ export declare const ControlRunDetail: z.ZodObject<{
1677
2029
  maxUsd: number;
1678
2030
  };
1679
2031
  spendUsd: number | null;
2032
+ valuationUsd: number | null;
2033
+ valuationKnowledge: "exact" | "unknown" | "estimated";
1680
2034
  remainingUsd: number | null;
2035
+ evidence: "unavailable" | "incomplete" | "complete";
1681
2036
  };
1682
2037
  council: {
1683
2038
  requested: number;
@@ -1692,17 +2047,48 @@ export declare const ControlRunDetail: z.ZodObject<{
1692
2047
  }[];
1693
2048
  } | null;
1694
2049
  failure: {
2050
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
1695
2051
  harnessId: string | null;
1696
2052
  attemptId: string | null;
1697
2053
  runDir: string | null;
1698
2054
  phase: string;
1699
- category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal";
2055
+ category: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal";
1700
2056
  safeMessage: string;
1701
2057
  rawDetailRef: string | null;
1702
2058
  logRefs: string[];
1703
2059
  eventRefs: string[];
1704
2060
  nextActions: string[];
1705
2061
  } | null;
2062
+ applyEligibility: {
2063
+ state: string | null;
2064
+ reason: string | null;
2065
+ eligible: boolean;
2066
+ requiredAction: string | null;
2067
+ } | null;
2068
+ outcomeBanner: string | null;
2069
+ planReadiness: {
2070
+ state: "ready" | "unverified" | "needs_answers";
2071
+ questionCount: number;
2072
+ } | null;
2073
+ pendingInteractions: {
2074
+ harnessId: string | null;
2075
+ attemptId: string | null;
2076
+ questions: {
2077
+ options: {
2078
+ label: string;
2079
+ description: string | null;
2080
+ }[];
2081
+ id: string;
2082
+ question: string;
2083
+ header: string | null;
2084
+ multi_select: boolean;
2085
+ }[];
2086
+ runId: string;
2087
+ interactionId: string;
2088
+ sourceTool: string | null;
2089
+ requestedAt: string;
2090
+ timeoutAt: string | null;
2091
+ }[];
1706
2092
  artifacts: {
1707
2093
  path: string;
1708
2094
  kind: "file" | "directory";
@@ -1727,6 +2113,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1727
2113
  errorSummary: string | null;
1728
2114
  severity: "error" | "info" | "warning";
1729
2115
  toolName: string | null;
2116
+ ignoredSettings: string[];
1730
2117
  rawRef: string | null;
1731
2118
  ts?: string | undefined;
1732
2119
  }[];
@@ -1759,8 +2146,6 @@ export declare const ControlRunDetail: z.ZodObject<{
1759
2146
  id: string;
1760
2147
  category: "correctness" | "regression" | "security" | "performance" | "maintainability" | "test_gap" | "spec_gap" | "deploy" | "architecture" | "ux";
1761
2148
  severity: "BLOCK" | "FIX_FIRST" | "WARN" | "NIT" | "OUT_OF_SCOPE" | "INSUFFICIENT_EVIDENCE" | "NEEDS_HUMAN";
1762
- claim: string;
1763
- linked_acceptance_criteria: string[];
1764
2149
  evidence: {
1765
2150
  files: {
1766
2151
  path: string;
@@ -1774,13 +2159,15 @@ export declare const ControlRunDetail: z.ZodObject<{
1774
2159
  path: string;
1775
2160
  }[];
1776
2161
  };
2162
+ claim: string;
2163
+ linked_acceptance_criteria: string[];
1777
2164
  proposed_fix: string | null;
1778
2165
  reviewer: {
1779
2166
  harness_id: string;
1780
2167
  observed_model: string | null;
1781
2168
  requested_model: string | null;
1782
2169
  requested_effort: string | null;
1783
- route_proof_status: "unverified" | "verified" | "accepted_model_arg" | "same_model_fallback";
2170
+ route_proof_status: "verified" | "unverified" | "accepted_model_arg" | "same_model_fallback";
1784
2171
  };
1785
2172
  revalidation_note?: string | undefined;
1786
2173
  }[];
@@ -1803,6 +2190,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1803
2190
  additions: number;
1804
2191
  deletions: number;
1805
2192
  } | null;
2193
+ rankingAxes: Record<string, string> | null;
1806
2194
  }[];
1807
2195
  planProgress: {
1808
2196
  items: {
@@ -1810,12 +2198,17 @@ export declare const ControlRunDetail: z.ZodObject<{
1810
2198
  id: string;
1811
2199
  title: string;
1812
2200
  }[];
2201
+ evidence: "unavailable" | "incomplete" | "complete";
1813
2202
  } | null;
2203
+ requiredActions: {
2204
+ detail: string;
2205
+ id: "provide_required_input" | "complete_incomplete_work" | "resolve_review_block" | "fix_failed_checks" | "record_operator_decision";
2206
+ }[];
1814
2207
  }, {
1815
2208
  summary: {
1816
2209
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
1817
- runId: string;
1818
2210
  jobId: string;
2211
+ runId: string;
1819
2212
  startedAt?: string | undefined;
1820
2213
  error?: string | undefined;
1821
2214
  createdAt?: string | undefined;
@@ -1823,14 +2216,6 @@ export declare const ControlRunDetail: z.ZodObject<{
1823
2216
  prompt?: string | undefined;
1824
2217
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1825
2218
  harnesses?: string[] | undefined;
1826
- runDir?: string | undefined;
1827
- outcomeFacts?: {
1828
- lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1829
- review?: "not_run" | "approved" | "blocked" | undefined;
1830
- 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;
1831
- checks?: "passed" | "failed" | "not_configured" | undefined;
1832
- noChanges?: boolean | undefined;
1833
- } | null | undefined;
1834
2219
  model?: string | undefined;
1835
2220
  tests?: {
1836
2221
  program: string;
@@ -1840,11 +2225,12 @@ export declare const ControlRunDetail: z.ZodObject<{
1840
2225
  }[] | undefined;
1841
2226
  project?: {
1842
2227
  kind?: "none" | "project" | undefined;
1843
- root?: string | null | undefined;
1844
2228
  context?: "off" | "auto" | undefined;
2229
+ root?: string | null | undefined;
1845
2230
  projectName?: string | null | undefined;
1846
2231
  } | undefined;
1847
2232
  taskId?: string | undefined;
2233
+ runDir?: string | undefined;
1848
2234
  primaryHarness?: string | undefined;
1849
2235
  routingGoal?: "auto" | "quality" | "economy" | undefined;
1850
2236
  n?: number | undefined;
@@ -1866,11 +2252,12 @@ export declare const ControlRunDetail: z.ZodObject<{
1866
2252
  }[] | undefined;
1867
2253
  failure?: {
1868
2254
  safeMessage: string;
2255
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
1869
2256
  harnessId?: string | null | undefined;
1870
2257
  attemptId?: string | null | undefined;
1871
2258
  runDir?: string | null | undefined;
1872
2259
  phase?: string | undefined;
1873
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
2260
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
1874
2261
  rawDetailRef?: string | null | undefined;
1875
2262
  logRefs?: string[] | undefined;
1876
2263
  eventRefs?: string[] | undefined;
@@ -1900,7 +2287,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1900
2287
  webRequired?: boolean | undefined;
1901
2288
  webMode?: "off" | "auto" | "cached" | "live" | undefined;
1902
2289
  webEvidence?: {
1903
- status?: "failed" | "none" | "attempted" | "unverified" | "satisfied" | undefined;
2290
+ status?: "failed" | "none" | "unverified" | "attempted" | "satisfied" | undefined;
1904
2291
  available?: boolean | undefined;
1905
2292
  target?: string | null | undefined;
1906
2293
  mode?: "off" | "auto" | "cached" | "live" | undefined;
@@ -1939,12 +2326,41 @@ export declare const ControlRunDetail: z.ZodObject<{
1939
2326
  preTurnSha?: string | null | undefined;
1940
2327
  revertable?: boolean | undefined;
1941
2328
  } | undefined;
2329
+ outcomeFacts?: {
2330
+ lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
2331
+ review?: "not_run" | "approved" | "blocked" | undefined;
2332
+ 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;
2333
+ checks?: "passed" | "failed" | "not_configured" | undefined;
2334
+ noChanges?: boolean | undefined;
2335
+ work_state?: {
2336
+ source: "constrained" | "validated" | "absent";
2337
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
2338
+ required_inputs?: {
2339
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
2340
+ description: string;
2341
+ locator?: string | null | undefined;
2342
+ }[] | undefined;
2343
+ } | undefined;
2344
+ } | null | undefined;
1942
2345
  waitingOnUser?: boolean | undefined;
1943
2346
  route?: {
1944
2347
  harnessId?: string | null | undefined;
2348
+ verified?: boolean | undefined;
1945
2349
  requestedModel?: string | null | undefined;
1946
2350
  observedModel?: string | null | undefined;
1947
- verified?: boolean | undefined;
2351
+ } | null | undefined;
2352
+ routingRationale?: {
2353
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
2354
+ goal: "auto" | "quality" | "economy";
2355
+ paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
2356
+ entries?: {
2357
+ harness_id: string;
2358
+ billing_knowledge: "unknown" | "proven_zero" | "subscription_entitlement" | "metered";
2359
+ eligible: boolean;
2360
+ incremental_cost_usd?: number | null | undefined;
2361
+ }[] | undefined;
2362
+ order?: string[] | undefined;
2363
+ dropped?: string[] | undefined;
1948
2364
  } | null | undefined;
1949
2365
  finishedAt?: string | undefined;
1950
2366
  };
@@ -1953,18 +2369,41 @@ export declare const ControlRunDetail: z.ZodObject<{
1953
2369
  facts: {
1954
2370
  lifecycle: "failed" | "cancelled" | "succeeded" | "interrupted";
1955
2371
  review?: "not_run" | "approved" | "blocked" | undefined;
1956
- 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;
2372
+ 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;
1957
2373
  checks?: "passed" | "failed" | "not_configured" | undefined;
1958
2374
  noChanges?: boolean | undefined;
2375
+ work_state?: {
2376
+ source: "constrained" | "validated" | "absent";
2377
+ state: "completed" | "needs_input" | "incomplete" | "unverified";
2378
+ required_inputs?: {
2379
+ kind: "file" | "context" | "decision" | "credential" | "permission" | "external_dependency";
2380
+ description: string;
2381
+ locator?: string | null | undefined;
2382
+ }[] | undefined;
2383
+ } | undefined;
1959
2384
  };
1960
2385
  why_winner?: string | undefined;
1961
2386
  why_not_others?: Record<string, string> | undefined;
2387
+ ranking_policy_version?: number | undefined;
2388
+ score_axes?: string[] | undefined;
2389
+ ranking_scorecard?: {
2390
+ label: string;
2391
+ attempt_id: string;
2392
+ axes: Record<string, string>;
2393
+ }[] | undefined;
2394
+ decisive_axis?: {
2395
+ key: string;
2396
+ winner_value: string;
2397
+ runner_up_value: string;
2398
+ } | null | undefined;
1962
2399
  accepted_risks?: string[] | undefined;
1963
2400
  final_checks?: string[] | undefined;
1964
2401
  evidence_facts?: string[] | undefined;
1965
2402
  budget_summary?: {
1966
2403
  estimated?: boolean | undefined;
1967
2404
  spend_usd?: number | null | undefined;
2405
+ cash_usd?: number | null | undefined;
2406
+ valuation_usd?: number | null | undefined;
1968
2407
  } | undefined;
1969
2408
  apply_recommendation?: "apply" | "inspect" | "continue" | "human_review" | undefined;
1970
2409
  verification_basis?: "none" | "cross_family_review" | "both" | undefined;
@@ -1981,36 +2420,6 @@ export declare const ControlRunDetail: z.ZodObject<{
1981
2420
  }[] | undefined;
1982
2421
  } | null | undefined;
1983
2422
  } | null | undefined;
1984
- applyEligibility?: {
1985
- state: string | null;
1986
- reason: string | null;
1987
- eligible: boolean;
1988
- requiredAction: string | null;
1989
- } | null | undefined;
1990
- outcomeBanner?: string | null | undefined;
1991
- planReadiness?: {
1992
- state: "ready" | "needs_answers" | "unverified";
1993
- questionCount?: number | undefined;
1994
- } | null | undefined;
1995
- pendingInteractions?: {
1996
- runId: string;
1997
- interactionId: string;
1998
- requestedAt: string;
1999
- harnessId?: string | null | undefined;
2000
- attemptId?: string | null | undefined;
2001
- questions?: {
2002
- id: string;
2003
- question: string;
2004
- options?: {
2005
- label: string;
2006
- description?: string | null | undefined;
2007
- }[] | undefined;
2008
- header?: string | null | undefined;
2009
- multi_select?: boolean | undefined;
2010
- }[] | undefined;
2011
- sourceTool?: string | null | undefined;
2012
- timeoutAt?: string | null | undefined;
2013
- }[] | undefined;
2014
2423
  budget?: {
2015
2424
  source?: "unknown" | "decision" | "events" | "settings" | undefined;
2016
2425
  estimated?: boolean | undefined;
@@ -2021,7 +2430,10 @@ export declare const ControlRunDetail: z.ZodObject<{
2021
2430
  maxUsd: number;
2022
2431
  } | undefined;
2023
2432
  spendUsd?: number | null | undefined;
2433
+ valuationUsd?: number | null | undefined;
2434
+ valuationKnowledge?: "exact" | "unknown" | "estimated" | undefined;
2024
2435
  remainingUsd?: number | null | undefined;
2436
+ evidence?: "unavailable" | "incomplete" | "complete" | undefined;
2025
2437
  } | undefined;
2026
2438
  council?: {
2027
2439
  requested: number;
@@ -2037,16 +2449,47 @@ export declare const ControlRunDetail: z.ZodObject<{
2037
2449
  } | null | undefined;
2038
2450
  failure?: {
2039
2451
  safeMessage: string;
2452
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
2040
2453
  harnessId?: string | null | undefined;
2041
2454
  attemptId?: string | null | undefined;
2042
2455
  runDir?: string | null | undefined;
2043
2456
  phase?: string | undefined;
2044
- category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "internal" | undefined;
2457
+ category?: "validation" | "unknown" | "harness_error" | "cancelled" | "auth" | "policy" | "budget" | "project" | "harness_unavailable" | "config_error" | "internal" | undefined;
2045
2458
  rawDetailRef?: string | null | undefined;
2046
2459
  logRefs?: string[] | undefined;
2047
2460
  eventRefs?: string[] | undefined;
2048
2461
  nextActions?: string[] | undefined;
2049
2462
  } | null | undefined;
2463
+ applyEligibility?: {
2464
+ state: string | null;
2465
+ reason: string | null;
2466
+ eligible: boolean;
2467
+ requiredAction: string | null;
2468
+ } | null | undefined;
2469
+ outcomeBanner?: string | null | undefined;
2470
+ planReadiness?: {
2471
+ state: "ready" | "unverified" | "needs_answers";
2472
+ questionCount?: number | undefined;
2473
+ } | null | undefined;
2474
+ pendingInteractions?: {
2475
+ runId: string;
2476
+ interactionId: string;
2477
+ requestedAt: string;
2478
+ harnessId?: string | null | undefined;
2479
+ attemptId?: string | null | undefined;
2480
+ questions?: {
2481
+ id: string;
2482
+ question: string;
2483
+ options?: {
2484
+ label: string;
2485
+ description?: string | null | undefined;
2486
+ }[] | undefined;
2487
+ header?: string | null | undefined;
2488
+ multi_select?: boolean | undefined;
2489
+ }[] | undefined;
2490
+ sourceTool?: string | null | undefined;
2491
+ timeoutAt?: string | null | undefined;
2492
+ }[] | undefined;
2050
2493
  artifacts?: {
2051
2494
  path: string;
2052
2495
  kind: "file" | "directory";
@@ -2072,6 +2515,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2072
2515
  errorSummary?: string | null | undefined;
2073
2516
  severity?: "error" | "info" | "warning" | undefined;
2074
2517
  toolName?: string | null | undefined;
2518
+ ignoredSettings?: string[] | undefined;
2075
2519
  rawRef?: string | null | undefined;
2076
2520
  }[] | undefined;
2077
2521
  finalSummary?: string | null | undefined;
@@ -2108,10 +2552,9 @@ export declare const ControlRunDetail: z.ZodObject<{
2108
2552
  observed_model?: string | null | undefined;
2109
2553
  requested_model?: string | null | undefined;
2110
2554
  requested_effort?: string | null | undefined;
2111
- route_proof_status?: "unverified" | "verified" | "accepted_model_arg" | "same_model_fallback" | undefined;
2555
+ route_proof_status?: "verified" | "unverified" | "accepted_model_arg" | "same_model_fallback" | undefined;
2112
2556
  };
2113
2557
  status?: "stale" | "accepted" | "proposed" | "rebutted" | "fixed" | "accepted_risk" | "duplicate" | "out_of_scope" | "insufficient_evidence" | undefined;
2114
- linked_acceptance_criteria?: string[] | undefined;
2115
2558
  evidence?: {
2116
2559
  files?: {
2117
2560
  path: string;
@@ -2125,6 +2568,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2125
2568
  path: string;
2126
2569
  }[] | undefined;
2127
2570
  } | undefined;
2571
+ linked_acceptance_criteria?: string[] | undefined;
2128
2572
  proposed_fix?: string | null | undefined;
2129
2573
  revalidation_note?: string | undefined;
2130
2574
  }[] | undefined;
@@ -2147,6 +2591,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2147
2591
  additions?: number | undefined;
2148
2592
  deletions?: number | undefined;
2149
2593
  } | null | undefined;
2594
+ rankingAxes?: Record<string, string> | null | undefined;
2150
2595
  }[] | undefined;
2151
2596
  planProgress?: {
2152
2597
  items?: {
@@ -2154,7 +2599,12 @@ export declare const ControlRunDetail: z.ZodObject<{
2154
2599
  id: string;
2155
2600
  title: string;
2156
2601
  }[] | undefined;
2602
+ evidence?: "unavailable" | "incomplete" | "complete" | undefined;
2157
2603
  } | null | undefined;
2604
+ requiredActions?: {
2605
+ detail: string;
2606
+ id: "provide_required_input" | "complete_incomplete_work" | "resolve_review_block" | "fix_failed_checks" | "record_operator_decision";
2607
+ }[] | undefined;
2158
2608
  }>;
2159
2609
  export type ControlRunDetail = z.infer<typeof ControlRunDetail>;
2160
2610
  //# sourceMappingURL=control-run-detail.d.ts.map