@claudexor/schema 4.8.1 → 5.0.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 (217) hide show
  1. package/dist/account-resources.d.ts +325 -56
  2. package/dist/account-resources.d.ts.map +1 -1
  3. package/dist/account-resources.js +35 -5
  4. package/dist/account-resources.js.map +1 -1
  5. package/dist/account-routing-evidence.d.ts +253 -45
  6. package/dist/account-routing-evidence.d.ts.map +1 -1
  7. package/dist/account-target.d.ts +19 -5
  8. package/dist/account-target.d.ts.map +1 -1
  9. package/dist/account-target.js +14 -1
  10. package/dist/account-target.js.map +1 -1
  11. package/dist/agent-capabilities.d.ts +183 -0
  12. package/dist/agent-capabilities.d.ts.map +1 -1
  13. package/dist/agent-capabilities.js +2 -0
  14. package/dist/agent-capabilities.js.map +1 -1
  15. package/dist/budget.d.ts +3 -0
  16. package/dist/budget.d.ts.map +1 -1
  17. package/dist/budget.js +5 -1
  18. package/dist/budget.js.map +1 -1
  19. package/dist/capture-inventory.d.ts +60 -0
  20. package/dist/capture-inventory.d.ts.map +1 -0
  21. package/dist/capture-inventory.js +57 -0
  22. package/dist/capture-inventory.js.map +1 -0
  23. package/dist/control-gc.d.ts +377 -0
  24. package/dist/control-gc.d.ts.map +1 -1
  25. package/dist/control-gc.js +74 -1
  26. package/dist/control-gc.js.map +1 -1
  27. package/dist/control-harness-list.d.ts +102 -18
  28. package/dist/control-harness-list.d.ts.map +1 -1
  29. package/dist/control-harness-models.d.ts +299 -6
  30. package/dist/control-harness-models.d.ts.map +1 -1
  31. package/dist/control-harness-models.js +12 -3
  32. package/dist/control-harness-models.js.map +1 -1
  33. package/dist/control-operation-responses.d.ts +606 -23
  34. package/dist/control-operation-responses.d.ts.map +1 -1
  35. package/dist/control-operation-responses.js +3 -0
  36. package/dist/control-operation-responses.js.map +1 -1
  37. package/dist/control-run-detail.d.ts +1193 -72
  38. package/dist/control-run-detail.d.ts.map +1 -1
  39. package/dist/control-run-event-part.d.ts +3 -3
  40. package/dist/control-run-event-part.js +1 -1
  41. package/dist/control-run-event-part.js.map +1 -1
  42. package/dist/control-run-failure.d.ts +276 -12
  43. package/dist/control-run-failure.d.ts.map +1 -1
  44. package/dist/control-run-failure.js +54 -16
  45. package/dist/control-run-failure.js.map +1 -1
  46. package/dist/control-run-message.js +1 -1
  47. package/dist/control-run-message.js.map +1 -1
  48. package/dist/control-thread-apply.d.ts +165 -0
  49. package/dist/control-thread-apply.d.ts.map +1 -1
  50. package/dist/control-timeline.d.ts +9 -0
  51. package/dist/control-timeline.d.ts.map +1 -1
  52. package/dist/control-timeline.js +20 -3
  53. package/dist/control-timeline.js.map +1 -1
  54. package/dist/control.d.ts +392 -42
  55. package/dist/control.d.ts.map +1 -1
  56. package/dist/control.js +13 -7
  57. package/dist/control.js.map +1 -1
  58. package/dist/credential-profile-snapshot.d.ts +506 -90
  59. package/dist/credential-profile-snapshot.d.ts.map +1 -1
  60. package/dist/daemon-status.d.ts +492 -0
  61. package/dist/daemon-status.d.ts.map +1 -1
  62. package/dist/daemon-status.js +22 -0
  63. package/dist/daemon-status.js.map +1 -1
  64. package/dist/decision.d.ts +9 -9
  65. package/dist/decision.d.ts.map +1 -1
  66. package/dist/decision.js +4 -0
  67. package/dist/decision.js.map +1 -1
  68. package/dist/delivery.d.ts +162 -0
  69. package/dist/delivery.d.ts.map +1 -1
  70. package/dist/delivery.js +32 -0
  71. package/dist/delivery.js.map +1 -1
  72. package/dist/events.d.ts +7 -6
  73. package/dist/events.d.ts.map +1 -1
  74. package/dist/events.js +10 -8
  75. package/dist/events.js.map +1 -1
  76. package/dist/git-result.d.ts +99 -0
  77. package/dist/git-result.d.ts.map +1 -0
  78. package/dist/git-result.js +80 -0
  79. package/dist/git-result.js.map +1 -0
  80. package/dist/harness-model.d.ts +89 -0
  81. package/dist/harness-model.d.ts.map +1 -1
  82. package/dist/harness-model.js +83 -0
  83. package/dist/harness-model.js.map +1 -1
  84. package/dist/harness-speech.d.ts +36 -0
  85. package/dist/harness-speech.d.ts.map +1 -0
  86. package/dist/harness-speech.js +27 -0
  87. package/dist/harness-speech.js.map +1 -0
  88. package/dist/harness.d.ts +371 -35
  89. package/dist/harness.d.ts.map +1 -1
  90. package/dist/harness.js +7 -21
  91. package/dist/harness.js.map +1 -1
  92. package/dist/index.d.ts +5 -0
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +5 -0
  95. package/dist/index.js.map +1 -1
  96. package/dist/mcp-run-result.d.ts +620 -51
  97. package/dist/mcp-run-result.d.ts.map +1 -1
  98. package/dist/mcp-run-result.js +45 -5
  99. package/dist/mcp-run-result.js.map +1 -1
  100. package/dist/mcp-run-wait.d.ts +7 -7
  101. package/dist/primitives.d.ts.map +1 -1
  102. package/dist/primitives.js +3 -2
  103. package/dist/primitives.js.map +1 -1
  104. package/dist/project.d.ts +45 -1
  105. package/dist/project.d.ts.map +1 -1
  106. package/dist/project.js +26 -1
  107. package/dist/project.js.map +1 -1
  108. package/dist/quota-read.d.ts +6 -3
  109. package/dist/quota-read.d.ts.map +1 -1
  110. package/dist/quota-read.js +7 -1
  111. package/dist/quota-read.js.map +1 -1
  112. package/dist/quota-scope.d.ts +29 -0
  113. package/dist/quota-scope.d.ts.map +1 -0
  114. package/dist/quota-scope.js +95 -0
  115. package/dist/quota-scope.js.map +1 -0
  116. package/dist/rate-limit.d.ts +3 -0
  117. package/dist/rate-limit.d.ts.map +1 -1
  118. package/dist/rate-limit.js +5 -1
  119. package/dist/rate-limit.js.map +1 -1
  120. package/dist/raw.d.ts +223 -1
  121. package/dist/raw.d.ts.map +1 -1
  122. package/dist/raw.js +86 -0
  123. package/dist/raw.js.map +1 -1
  124. package/dist/readiness.d.ts +87 -18
  125. package/dist/readiness.d.ts.map +1 -1
  126. package/dist/readiness.js +7 -6
  127. package/dist/readiness.js.map +1 -1
  128. package/dist/route-health.d.ts +303 -0
  129. package/dist/route-health.d.ts.map +1 -0
  130. package/dist/route-health.js +71 -0
  131. package/dist/route-health.js.map +1 -0
  132. package/dist/run-continuity.d.ts +3 -0
  133. package/dist/run-continuity.d.ts.map +1 -1
  134. package/dist/run-continuity.js +4 -0
  135. package/dist/run-continuity.js.map +1 -1
  136. package/dist/run-facts.d.ts +5 -5
  137. package/dist/run-facts.d.ts.map +1 -1
  138. package/dist/run-facts.js +1 -0
  139. package/dist/run-facts.js.map +1 -1
  140. package/dist/run-observation.d.ts +6 -6
  141. package/dist/run-observation.d.ts.map +1 -1
  142. package/dist/run-observation.js +7 -1
  143. package/dist/run-observation.js.map +1 -1
  144. package/dist/setup-login.d.ts +1 -1
  145. package/dist/setup-login.js +1 -1
  146. package/dist/setup.d.ts +1 -1
  147. package/dist/setup.js +1 -1
  148. package/dist/status-projection.d.ts.map +1 -1
  149. package/dist/status-projection.js +3 -0
  150. package/dist/status-projection.js.map +1 -1
  151. package/dist/task-group-runs.d.ts +1 -0
  152. package/dist/task-group-runs.d.ts.map +1 -1
  153. package/dist/task-group-runs.js +6 -3
  154. package/dist/task-group-runs.js.map +1 -1
  155. package/dist/telemetry.d.ts +239 -7
  156. package/dist/telemetry.d.ts.map +1 -1
  157. package/dist/telemetry.js +4 -2
  158. package/dist/telemetry.js.map +1 -1
  159. package/dist/thread-history.d.ts +1109 -161
  160. package/dist/thread-history.d.ts.map +1 -1
  161. package/dist/thread-history.js +1 -1
  162. package/dist/thread-history.js.map +1 -1
  163. package/dist/tool-ref.d.ts +94 -3
  164. package/dist/tool-ref.d.ts.map +1 -1
  165. package/dist/tool-ref.js +98 -6
  166. package/dist/tool-ref.js.map +1 -1
  167. package/generated/AgentCapabilityCatalog.schema.json +54 -0
  168. package/generated/BudgetObservation.schema.json +8 -1
  169. package/generated/ControlAccountResetResponse.schema.json +60 -1
  170. package/generated/ControlAccountResourcesFreshnessResponse.schema.json +46 -2
  171. package/generated/ControlAccountResourcesResponse.schema.json +46 -2
  172. package/generated/ControlApplyCheckResponse.schema.json +47 -0
  173. package/generated/ControlCredentialProfilesQueryResponse.schema.json +105 -4
  174. package/generated/ControlCredentialProfilesResourcesResponse.schema.json +105 -4
  175. package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +59 -2
  176. package/generated/ControlDaemonStatus.schema.json +112 -43
  177. package/generated/ControlDeliveryResponse.schema.json +154 -0
  178. package/generated/ControlGcLastResponse.schema.json +184 -0
  179. package/generated/ControlGcReceipt.schema.json +60 -1
  180. package/generated/ControlGcRequest.schema.json +4 -0
  181. package/generated/ControlHarnessAccountCatalog.schema.json +13 -0
  182. package/generated/ControlHarnessAccountModelsResponse.schema.json +13 -0
  183. package/generated/ControlHarnessListResponse.schema.json +59 -2
  184. package/generated/ControlHarnessModelsQueryResponse.schema.json +97 -51
  185. package/generated/ControlHarnessModelsResponse.schema.json +96 -0
  186. package/generated/ControlProjectRemoveReceipt.schema.json +36 -0
  187. package/generated/ControlQuotaQueryResponse.schema.json +46 -2
  188. package/generated/ControlQuotaReadRequest.schema.json +4 -0
  189. package/generated/ControlQuotaRefreshRequest.schema.json +12 -3
  190. package/generated/ControlRouteHealth.schema.json +202 -0
  191. package/generated/ControlRunDecisionResponse.schema.json +14 -0
  192. package/generated/ControlRunDetail.schema.json +376 -6
  193. package/generated/ControlRunEventPart.schema.json +3 -2
  194. package/generated/ControlRunListResponse.schema.json +342 -3
  195. package/generated/ControlRunMessageRequest.schema.json +1 -1
  196. package/generated/ControlRunSummary.schema.json +342 -3
  197. package/generated/ControlThreadApplyResponse.schema.json +154 -0
  198. package/generated/ControlThreadDetail.schema.json +2 -1
  199. package/generated/DecisionRecord.schema.json +1 -0
  200. package/generated/HarnessEvent.schema.json +214 -5
  201. package/generated/HarnessManifest.schema.json +57 -0
  202. package/generated/HarnessModel.schema.json +13 -0
  203. package/generated/HarnessStatusDto.schema.json +59 -2
  204. package/generated/JournaledRunCreatedPayload.schema.json +2 -2
  205. package/generated/McpAccountsToolResult.schema.json +105 -4
  206. package/generated/McpRunHandleResult.schema.json +279 -2
  207. package/generated/McpRunToolResult.schema.json +269 -0
  208. package/generated/McpRunWaitResult.schema.json +2 -1
  209. package/generated/RawContextPacket.schema.json +98 -0
  210. package/generated/RunContinuityReceipt.schema.json +8 -0
  211. package/generated/RunEvent.schema.json +2 -1
  212. package/generated/RunFacts.schema.json +1 -0
  213. package/generated/RunFailure.schema.json +201 -0
  214. package/generated/RunTelemetry.schema.json +123 -2
  215. package/generated/RunWaitManyInput.schema.json +11 -4
  216. package/generated/ThreadHistoryPage.schema.json +204 -2
  217. package/package.json +2 -2
@@ -402,6 +402,7 @@ export declare const ControlRunDetail: z.ZodObject<{
402
402
  modelMismatch: z.ZodNullable<z.ZodBoolean>;
403
403
  identityCheck: z.ZodEnum<["matched_before_effects", "mismatch_before_effects", "mismatch_after_possible_effects", "not_applicable"]>;
404
404
  inputDelivery: z.ZodEnum<["confirmed", "uncertain", "not_applicable"]>;
405
+ sourceRetirement: z.ZodOptional<z.ZodEnum<["retired", "not_confirmed"]>>;
405
406
  }, "strict", z.ZodTypeAny, {
406
407
  tryIndex: number;
407
408
  attemptId: string;
@@ -423,6 +424,7 @@ export declare const ControlRunDetail: z.ZodObject<{
423
424
  modelMismatch: boolean | null;
424
425
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
425
426
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
427
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
426
428
  }, {
427
429
  tryIndex: number;
428
430
  attemptId: string;
@@ -444,6 +446,7 @@ export declare const ControlRunDetail: z.ZodObject<{
444
446
  modelMismatch: boolean | null;
445
447
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
446
448
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
449
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
447
450
  }>, "many">>;
448
451
  retainedEnvelope: z.ZodDefault<z.ZodNullable<z.ZodObject<{
449
452
  root: z.ZodString;
@@ -525,13 +528,54 @@ export declare const ControlRunDetail: z.ZodObject<{
525
528
  source: "grok_init";
526
529
  reported_source: string;
527
530
  }>]>>;
531
+ rawContextShortfall: z.ZodOptional<z.ZodObject<{
532
+ model: z.ZodString;
533
+ context_window: z.ZodNumber;
534
+ packet_tokens: z.ZodNumber;
535
+ framing_tokens: z.ZodNumber;
536
+ output_allowance_tokens: z.ZodNumber;
537
+ mandatory_files: z.ZodArray<z.ZodObject<{
538
+ path: z.ZodString;
539
+ estimated_tokens: z.ZodNumber;
540
+ }, "strict", z.ZodTypeAny, {
541
+ path: string;
542
+ estimated_tokens: number;
543
+ }, {
544
+ path: string;
545
+ estimated_tokens: number;
546
+ }>, "many">;
547
+ }, "strict", z.ZodTypeAny, {
548
+ model: string;
549
+ context_window: number;
550
+ packet_tokens: number;
551
+ framing_tokens: number;
552
+ output_allowance_tokens: number;
553
+ mandatory_files: {
554
+ path: string;
555
+ estimated_tokens: number;
556
+ }[];
557
+ }, {
558
+ model: string;
559
+ context_window: number;
560
+ packet_tokens: number;
561
+ framing_tokens: number;
562
+ output_allowance_tokens: number;
563
+ mandatory_files: {
564
+ path: string;
565
+ estimated_tokens: number;
566
+ }[];
567
+ }>>;
528
568
  captureFailure: z.ZodOptional<z.ZodObject<{
529
- code: z.ZodEnum<["capture_output_exceeded", "capture_output_incomplete", "capture_preview_truncated", "capture_failed"]>;
569
+ code: z.ZodEnum<["capture_output_exceeded", "capture_output_incomplete", "capture_preview_truncated", "capture_space_insufficient", "capture_git_stalled", "capture_git_signal", "capture_read_failed", "capture_object_missing", "capture_failed"]>;
530
570
  message: z.ZodString;
531
571
  causeCode: z.ZodOptional<z.ZodString>;
532
572
  bufferBudgetBytes: z.ZodOptional<z.ZodNumber>;
533
573
  stream: z.ZodOptional<z.ZodEnum<["stdout", "stderr"]>>;
534
574
  drain: z.ZodOptional<z.ZodLiteral<"truncated">>;
575
+ requiredBytes: z.ZodOptional<z.ZodNumber>;
576
+ availableBytes: z.ZodOptional<z.ZodNumber>;
577
+ signal: z.ZodOptional<z.ZodString>;
578
+ stallMs: z.ZodOptional<z.ZodNumber>;
535
579
  cleanup: z.ZodOptional<z.ZodObject<{
536
580
  code: z.ZodNullable<z.ZodString>;
537
581
  message: z.ZodString;
@@ -542,32 +586,91 @@ export declare const ControlRunDetail: z.ZodObject<{
542
586
  code: string | null;
543
587
  message: string;
544
588
  }>>;
589
+ inventory: z.ZodOptional<z.ZodObject<{
590
+ exact: z.ZodLiteral<false>;
591
+ changedFiles: z.ZodNumber;
592
+ largest: z.ZodArray<z.ZodObject<{
593
+ path: z.ZodString;
594
+ change: z.ZodEnum<["added", "modified", "deleted", "type_changed"]>;
595
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
596
+ }, "strip", z.ZodTypeAny, {
597
+ path: string;
598
+ change: "added" | "deleted" | "modified" | "type_changed";
599
+ sizeBytes: number | null;
600
+ }, {
601
+ path: string;
602
+ change: "added" | "deleted" | "modified" | "type_changed";
603
+ sizeBytes: number | null;
604
+ }>, "many">;
605
+ }, "strip", z.ZodTypeAny, {
606
+ exact: false;
607
+ changedFiles: number;
608
+ largest: {
609
+ path: string;
610
+ change: "added" | "deleted" | "modified" | "type_changed";
611
+ sizeBytes: number | null;
612
+ }[];
613
+ }, {
614
+ exact: false;
615
+ changedFiles: number;
616
+ largest: {
617
+ path: string;
618
+ change: "added" | "deleted" | "modified" | "type_changed";
619
+ sizeBytes: number | null;
620
+ }[];
621
+ }>>;
545
622
  }, "strip", z.ZodTypeAny, {
546
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
623
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
547
624
  message: string;
548
625
  causeCode?: string | undefined;
549
626
  bufferBudgetBytes?: number | undefined;
550
627
  stream?: "stderr" | "stdout" | undefined;
551
628
  drain?: "truncated" | undefined;
629
+ requiredBytes?: number | undefined;
630
+ availableBytes?: number | undefined;
631
+ signal?: string | undefined;
632
+ stallMs?: number | undefined;
552
633
  cleanup?: {
553
634
  code: string | null;
554
635
  message: string;
555
636
  } | undefined;
637
+ inventory?: {
638
+ exact: false;
639
+ changedFiles: number;
640
+ largest: {
641
+ path: string;
642
+ change: "added" | "deleted" | "modified" | "type_changed";
643
+ sizeBytes: number | null;
644
+ }[];
645
+ } | undefined;
556
646
  }, {
557
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
647
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
558
648
  message: string;
559
649
  causeCode?: string | undefined;
560
650
  bufferBudgetBytes?: number | undefined;
561
651
  stream?: "stderr" | "stdout" | undefined;
562
652
  drain?: "truncated" | undefined;
653
+ requiredBytes?: number | undefined;
654
+ availableBytes?: number | undefined;
655
+ signal?: string | undefined;
656
+ stallMs?: number | undefined;
563
657
  cleanup?: {
564
658
  code: string | null;
565
659
  message: string;
566
660
  } | undefined;
661
+ inventory?: {
662
+ exact: false;
663
+ changedFiles: number;
664
+ largest: {
665
+ path: string;
666
+ change: "added" | "deleted" | "modified" | "type_changed";
667
+ sizeBytes: number | null;
668
+ }[];
669
+ } | undefined;
567
670
  }>>;
568
671
  phase: z.ZodDefault<z.ZodString>;
569
672
  category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
570
- code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "input_too_large", "vendor_cli_too_old", "credential_source_unconfirmed", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete", "access_profile_incompatible", "auxiliary_writable_roots_unsupported", "retired_access_profile"]>>>;
673
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "input_too_large", "raw_context_mandatory_unavailable", "raw_context_exceeds_window", "model_catalog_unavailable", "vendor_cli_too_old", "credential_source_unconfirmed", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete", "access_profile_incompatible", "auxiliary_writable_roots_unsupported", "retired_access_profile"]>>>;
571
674
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
572
675
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
573
676
  safeMessage: z.ZodString;
@@ -576,6 +679,22 @@ export declare const ControlRunDetail: z.ZodObject<{
576
679
  eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
577
680
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
578
681
  resetsAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
682
+ quotaRefusal: z.ZodOptional<z.ZodObject<{
683
+ basis: z.ZodEnum<["owner_reserve", "provider_window", "provider_cooldown"]>;
684
+ constraintId: z.ZodNullable<z.ZodString>;
685
+ usedRatio: z.ZodNullable<z.ZodNumber>;
686
+ threshold: z.ZodNullable<z.ZodNumber>;
687
+ }, "strip", z.ZodTypeAny, {
688
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
689
+ constraintId: string | null;
690
+ usedRatio: number | null;
691
+ threshold: number | null;
692
+ }, {
693
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
694
+ constraintId: string | null;
695
+ usedRatio: number | null;
696
+ threshold: number | null;
697
+ }>>;
579
698
  vendorFailure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
580
699
  code: z.ZodNullable<z.ZodString>;
581
700
  message: z.ZodNullable<z.ZodString>;
@@ -668,21 +787,45 @@ export declare const ControlRunDetail: z.ZodObject<{
668
787
  source: "grok_init";
669
788
  reported_source: string;
670
789
  } | undefined;
790
+ rawContextShortfall?: {
791
+ model: string;
792
+ context_window: number;
793
+ packet_tokens: number;
794
+ framing_tokens: number;
795
+ output_allowance_tokens: number;
796
+ mandatory_files: {
797
+ path: string;
798
+ estimated_tokens: number;
799
+ }[];
800
+ } | undefined;
671
801
  captureFailure?: {
672
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
802
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
673
803
  message: string;
674
804
  causeCode?: string | undefined;
675
805
  bufferBudgetBytes?: number | undefined;
676
806
  stream?: "stderr" | "stdout" | undefined;
677
807
  drain?: "truncated" | undefined;
808
+ requiredBytes?: number | undefined;
809
+ availableBytes?: number | undefined;
810
+ signal?: string | undefined;
811
+ stallMs?: number | undefined;
678
812
  cleanup?: {
679
813
  code: string | null;
680
814
  message: string;
681
815
  } | undefined;
816
+ inventory?: {
817
+ exact: false;
818
+ changedFiles: number;
819
+ largest: {
820
+ path: string;
821
+ change: "added" | "deleted" | "modified" | "type_changed";
822
+ sizeBytes: number | null;
823
+ }[];
824
+ } | undefined;
682
825
  } | undefined;
683
826
  phase: string;
684
827
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
685
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
828
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
686
829
  harnessId: string | null;
687
830
  attemptId: string | null;
688
831
  safeMessage: string;
@@ -691,6 +834,12 @@ export declare const ControlRunDetail: z.ZodObject<{
691
834
  eventRefs: string[];
692
835
  runDir: string | null;
693
836
  resetsAt: string | null;
837
+ quotaRefusal?: {
838
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
839
+ constraintId: string | null;
840
+ usedRatio: number | null;
841
+ threshold: number | null;
842
+ } | undefined;
694
843
  vendorFailure: {
695
844
  code: string | null;
696
845
  message: string | null;
@@ -735,21 +884,45 @@ export declare const ControlRunDetail: z.ZodObject<{
735
884
  source: "grok_init";
736
885
  reported_source: string;
737
886
  } | undefined;
887
+ rawContextShortfall?: {
888
+ model: string;
889
+ context_window: number;
890
+ packet_tokens: number;
891
+ framing_tokens: number;
892
+ output_allowance_tokens: number;
893
+ mandatory_files: {
894
+ path: string;
895
+ estimated_tokens: number;
896
+ }[];
897
+ } | undefined;
738
898
  captureFailure?: {
739
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
899
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
740
900
  message: string;
741
901
  causeCode?: string | undefined;
742
902
  bufferBudgetBytes?: number | undefined;
743
903
  stream?: "stderr" | "stdout" | undefined;
744
904
  drain?: "truncated" | undefined;
905
+ requiredBytes?: number | undefined;
906
+ availableBytes?: number | undefined;
907
+ signal?: string | undefined;
908
+ stallMs?: number | undefined;
745
909
  cleanup?: {
746
910
  code: string | null;
747
911
  message: string;
748
912
  } | undefined;
913
+ inventory?: {
914
+ exact: false;
915
+ changedFiles: number;
916
+ largest: {
917
+ path: string;
918
+ change: "added" | "deleted" | "modified" | "type_changed";
919
+ sizeBytes: number | null;
920
+ }[];
921
+ } | undefined;
749
922
  } | undefined;
750
923
  phase?: string | undefined;
751
924
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
752
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
925
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
753
926
  harnessId?: string | null | undefined;
754
927
  attemptId?: string | null | undefined;
755
928
  safeMessage: string;
@@ -758,6 +931,12 @@ export declare const ControlRunDetail: z.ZodObject<{
758
931
  eventRefs?: string[] | undefined;
759
932
  runDir?: string | null | undefined;
760
933
  resetsAt?: string | null | undefined;
934
+ quotaRefusal?: {
935
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
936
+ constraintId: string | null;
937
+ usedRatio: number | null;
938
+ threshold: number | null;
939
+ } | undefined;
761
940
  vendorFailure?: {
762
941
  code: string | null;
763
942
  message: string | null;
@@ -1043,7 +1222,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1043
1222
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
1044
1223
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
1045
1224
  review_requested: z.ZodOptional<z.ZodBoolean>;
1046
- 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
1225
+ 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "capture_refused", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
1047
1226
  work_state: z.ZodOptional<z.ZodObject<{
1048
1227
  state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
1049
1228
  source: z.ZodEnum<["constrained", "validated", "absent"]>;
@@ -1086,7 +1265,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1086
1265
  checks: "failed" | "not_configured" | "passed";
1087
1266
  review: "approved" | "blocked" | "not_run";
1088
1267
  review_requested?: boolean | undefined;
1089
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
1268
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
1090
1269
  work_state?: {
1091
1270
  state: "completed" | "incomplete" | "needs_input" | "unverified";
1092
1271
  source: "absent" | "constrained" | "validated";
@@ -1103,7 +1282,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1103
1282
  checks?: "failed" | "not_configured" | "passed" | undefined;
1104
1283
  review?: "approved" | "blocked" | "not_run" | undefined;
1105
1284
  review_requested?: boolean | undefined;
1106
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
1285
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
1107
1286
  work_state?: {
1108
1287
  state: "completed" | "incomplete" | "needs_input" | "unverified";
1109
1288
  source: "absent" | "constrained" | "validated";
@@ -1201,6 +1380,74 @@ export declare const ControlRunDetail: z.ZodObject<{
1201
1380
  eligible: boolean;
1202
1381
  }[] | undefined;
1203
1382
  }>>>;
1383
+ rawContext: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1384
+ model: z.ZodString;
1385
+ estimated_request_tokens: z.ZodNumber;
1386
+ budget: z.ZodObject<{
1387
+ estimator: z.ZodLiteral<"chars_div_4">;
1388
+ basis: z.ZodEnum<["model_context_window", "assumed_ceiling"]>;
1389
+ model: z.ZodNullable<z.ZodString>;
1390
+ context_window: z.ZodNullable<z.ZodNumber>;
1391
+ output_allowance_tokens: z.ZodNullable<z.ZodNumber>;
1392
+ framing_tokens: z.ZodNullable<z.ZodNumber>;
1393
+ selection_limit_tokens: z.ZodNumber;
1394
+ estimated_packet_tokens: z.ZodNumber;
1395
+ omitted_for_budget: z.ZodNumber;
1396
+ mandatory_paths: z.ZodArray<z.ZodString, "many">;
1397
+ }, "strict", z.ZodTypeAny, {
1398
+ estimator: "chars_div_4";
1399
+ basis: "assumed_ceiling" | "model_context_window";
1400
+ model: string | null;
1401
+ context_window: number | null;
1402
+ output_allowance_tokens: number | null;
1403
+ framing_tokens: number | null;
1404
+ selection_limit_tokens: number;
1405
+ estimated_packet_tokens: number;
1406
+ omitted_for_budget: number;
1407
+ mandatory_paths: string[];
1408
+ }, {
1409
+ estimator: "chars_div_4";
1410
+ basis: "assumed_ceiling" | "model_context_window";
1411
+ model: string | null;
1412
+ context_window: number | null;
1413
+ output_allowance_tokens: number | null;
1414
+ framing_tokens: number | null;
1415
+ selection_limit_tokens: number;
1416
+ estimated_packet_tokens: number;
1417
+ omitted_for_budget: number;
1418
+ mandatory_paths: string[];
1419
+ }>;
1420
+ }, "strict", z.ZodTypeAny, {
1421
+ model: string;
1422
+ estimated_request_tokens: number;
1423
+ budget: {
1424
+ estimator: "chars_div_4";
1425
+ basis: "assumed_ceiling" | "model_context_window";
1426
+ model: string | null;
1427
+ context_window: number | null;
1428
+ output_allowance_tokens: number | null;
1429
+ framing_tokens: number | null;
1430
+ selection_limit_tokens: number;
1431
+ estimated_packet_tokens: number;
1432
+ omitted_for_budget: number;
1433
+ mandatory_paths: string[];
1434
+ };
1435
+ }, {
1436
+ model: string;
1437
+ estimated_request_tokens: number;
1438
+ budget: {
1439
+ estimator: "chars_div_4";
1440
+ basis: "assumed_ceiling" | "model_context_window";
1441
+ model: string | null;
1442
+ context_window: number | null;
1443
+ output_allowance_tokens: number | null;
1444
+ framing_tokens: number | null;
1445
+ selection_limit_tokens: number;
1446
+ estimated_packet_tokens: number;
1447
+ omitted_for_budget: number;
1448
+ mandatory_paths: string[];
1449
+ };
1450
+ }>>>;
1204
1451
  tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1205
1452
  program: z.ZodString;
1206
1453
  args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -1271,6 +1518,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1271
1518
  modelMismatch: boolean | null;
1272
1519
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
1273
1520
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
1521
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
1274
1522
  }[] | undefined;
1275
1523
  retainedEnvelope: {
1276
1524
  root: string;
@@ -1303,21 +1551,45 @@ export declare const ControlRunDetail: z.ZodObject<{
1303
1551
  source: "grok_init";
1304
1552
  reported_source: string;
1305
1553
  } | undefined;
1554
+ rawContextShortfall?: {
1555
+ model: string;
1556
+ context_window: number;
1557
+ packet_tokens: number;
1558
+ framing_tokens: number;
1559
+ output_allowance_tokens: number;
1560
+ mandatory_files: {
1561
+ path: string;
1562
+ estimated_tokens: number;
1563
+ }[];
1564
+ } | undefined;
1306
1565
  captureFailure?: {
1307
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
1566
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
1308
1567
  message: string;
1309
1568
  causeCode?: string | undefined;
1310
1569
  bufferBudgetBytes?: number | undefined;
1311
1570
  stream?: "stderr" | "stdout" | undefined;
1312
1571
  drain?: "truncated" | undefined;
1572
+ requiredBytes?: number | undefined;
1573
+ availableBytes?: number | undefined;
1574
+ signal?: string | undefined;
1575
+ stallMs?: number | undefined;
1313
1576
  cleanup?: {
1314
1577
  code: string | null;
1315
1578
  message: string;
1316
1579
  } | undefined;
1580
+ inventory?: {
1581
+ exact: false;
1582
+ changedFiles: number;
1583
+ largest: {
1584
+ path: string;
1585
+ change: "added" | "deleted" | "modified" | "type_changed";
1586
+ sizeBytes: number | null;
1587
+ }[];
1588
+ } | undefined;
1317
1589
  } | undefined;
1318
1590
  phase: string;
1319
1591
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
1320
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
1592
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
1321
1593
  harnessId: string | null;
1322
1594
  attemptId: string | null;
1323
1595
  safeMessage: string;
@@ -1326,6 +1598,12 @@ export declare const ControlRunDetail: z.ZodObject<{
1326
1598
  eventRefs: string[];
1327
1599
  runDir: string | null;
1328
1600
  resetsAt: string | null;
1601
+ quotaRefusal?: {
1602
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
1603
+ constraintId: string | null;
1604
+ usedRatio: number | null;
1605
+ threshold: number | null;
1606
+ } | undefined;
1329
1607
  vendorFailure: {
1330
1608
  code: string | null;
1331
1609
  message: string | null;
@@ -1459,7 +1737,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1459
1737
  checks: "failed" | "not_configured" | "passed";
1460
1738
  review: "approved" | "blocked" | "not_run";
1461
1739
  review_requested?: boolean | undefined;
1462
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
1740
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
1463
1741
  work_state?: {
1464
1742
  state: "completed" | "incomplete" | "needs_input" | "unverified";
1465
1743
  source: "absent" | "constrained" | "validated";
@@ -1499,6 +1777,22 @@ export declare const ControlRunDetail: z.ZodObject<{
1499
1777
  eligible: boolean;
1500
1778
  }[];
1501
1779
  } | null;
1780
+ rawContext: {
1781
+ model: string;
1782
+ estimated_request_tokens: number;
1783
+ budget: {
1784
+ estimator: "chars_div_4";
1785
+ basis: "assumed_ceiling" | "model_context_window";
1786
+ model: string | null;
1787
+ context_window: number | null;
1788
+ output_allowance_tokens: number | null;
1789
+ framing_tokens: number | null;
1790
+ selection_limit_tokens: number;
1791
+ estimated_packet_tokens: number;
1792
+ omitted_for_budget: number;
1793
+ mandatory_paths: string[];
1794
+ };
1795
+ } | null;
1502
1796
  tests?: {
1503
1797
  program: string;
1504
1798
  args: string[];
@@ -1559,6 +1853,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1559
1853
  modelMismatch: boolean | null;
1560
1854
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
1561
1855
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
1856
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
1562
1857
  }[] | undefined;
1563
1858
  retainedEnvelope?: {
1564
1859
  root: string;
@@ -1591,21 +1886,45 @@ export declare const ControlRunDetail: z.ZodObject<{
1591
1886
  source: "grok_init";
1592
1887
  reported_source: string;
1593
1888
  } | undefined;
1889
+ rawContextShortfall?: {
1890
+ model: string;
1891
+ context_window: number;
1892
+ packet_tokens: number;
1893
+ framing_tokens: number;
1894
+ output_allowance_tokens: number;
1895
+ mandatory_files: {
1896
+ path: string;
1897
+ estimated_tokens: number;
1898
+ }[];
1899
+ } | undefined;
1594
1900
  captureFailure?: {
1595
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
1901
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
1596
1902
  message: string;
1597
1903
  causeCode?: string | undefined;
1598
1904
  bufferBudgetBytes?: number | undefined;
1599
1905
  stream?: "stderr" | "stdout" | undefined;
1600
1906
  drain?: "truncated" | undefined;
1907
+ requiredBytes?: number | undefined;
1908
+ availableBytes?: number | undefined;
1909
+ signal?: string | undefined;
1910
+ stallMs?: number | undefined;
1601
1911
  cleanup?: {
1602
1912
  code: string | null;
1603
1913
  message: string;
1604
1914
  } | undefined;
1915
+ inventory?: {
1916
+ exact: false;
1917
+ changedFiles: number;
1918
+ largest: {
1919
+ path: string;
1920
+ change: "added" | "deleted" | "modified" | "type_changed";
1921
+ sizeBytes: number | null;
1922
+ }[];
1923
+ } | undefined;
1605
1924
  } | undefined;
1606
1925
  phase?: string | undefined;
1607
1926
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
1608
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
1927
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
1609
1928
  harnessId?: string | null | undefined;
1610
1929
  attemptId?: string | null | undefined;
1611
1930
  safeMessage: string;
@@ -1614,6 +1933,12 @@ export declare const ControlRunDetail: z.ZodObject<{
1614
1933
  eventRefs?: string[] | undefined;
1615
1934
  runDir?: string | null | undefined;
1616
1935
  resetsAt?: string | null | undefined;
1936
+ quotaRefusal?: {
1937
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
1938
+ constraintId: string | null;
1939
+ usedRatio: number | null;
1940
+ threshold: number | null;
1941
+ } | undefined;
1617
1942
  vendorFailure?: {
1618
1943
  code: string | null;
1619
1944
  message: string | null;
@@ -1747,7 +2072,7 @@ export declare const ControlRunDetail: z.ZodObject<{
1747
2072
  checks?: "failed" | "not_configured" | "passed" | undefined;
1748
2073
  review?: "approved" | "blocked" | "not_run" | undefined;
1749
2074
  review_requested?: boolean | undefined;
1750
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
2075
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
1751
2076
  work_state?: {
1752
2077
  state: "completed" | "incomplete" | "needs_input" | "unverified";
1753
2078
  source: "absent" | "constrained" | "validated";
@@ -1787,6 +2112,22 @@ export declare const ControlRunDetail: z.ZodObject<{
1787
2112
  eligible: boolean;
1788
2113
  }[] | undefined;
1789
2114
  } | null | undefined;
2115
+ rawContext?: {
2116
+ model: string;
2117
+ estimated_request_tokens: number;
2118
+ budget: {
2119
+ estimator: "chars_div_4";
2120
+ basis: "assumed_ceiling" | "model_context_window";
2121
+ model: string | null;
2122
+ context_window: number | null;
2123
+ output_allowance_tokens: number | null;
2124
+ framing_tokens: number | null;
2125
+ selection_limit_tokens: number;
2126
+ estimated_packet_tokens: number;
2127
+ omitted_for_budget: number;
2128
+ mandatory_paths: string[];
2129
+ };
2130
+ } | null | undefined;
1790
2131
  tests?: {
1791
2132
  program: string;
1792
2133
  args?: string[] | undefined;
@@ -2021,6 +2362,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2021
2362
  modelMismatch: z.ZodNullable<z.ZodBoolean>;
2022
2363
  identityCheck: z.ZodEnum<["matched_before_effects", "mismatch_before_effects", "mismatch_after_possible_effects", "not_applicable"]>;
2023
2364
  inputDelivery: z.ZodEnum<["confirmed", "uncertain", "not_applicable"]>;
2365
+ sourceRetirement: z.ZodOptional<z.ZodEnum<["retired", "not_confirmed"]>>;
2024
2366
  }, "strict", z.ZodTypeAny, {
2025
2367
  tryIndex: number;
2026
2368
  attemptId: string;
@@ -2042,6 +2384,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2042
2384
  modelMismatch: boolean | null;
2043
2385
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
2044
2386
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
2387
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
2045
2388
  }, {
2046
2389
  tryIndex: number;
2047
2390
  attemptId: string;
@@ -2063,6 +2406,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2063
2406
  modelMismatch: boolean | null;
2064
2407
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
2065
2408
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
2409
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
2066
2410
  }>, "many">>;
2067
2411
  retainedEnvelope: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2068
2412
  root: z.ZodString;
@@ -2144,13 +2488,54 @@ export declare const ControlRunDetail: z.ZodObject<{
2144
2488
  source: "grok_init";
2145
2489
  reported_source: string;
2146
2490
  }>]>>;
2491
+ rawContextShortfall: z.ZodOptional<z.ZodObject<{
2492
+ model: z.ZodString;
2493
+ context_window: z.ZodNumber;
2494
+ packet_tokens: z.ZodNumber;
2495
+ framing_tokens: z.ZodNumber;
2496
+ output_allowance_tokens: z.ZodNumber;
2497
+ mandatory_files: z.ZodArray<z.ZodObject<{
2498
+ path: z.ZodString;
2499
+ estimated_tokens: z.ZodNumber;
2500
+ }, "strict", z.ZodTypeAny, {
2501
+ path: string;
2502
+ estimated_tokens: number;
2503
+ }, {
2504
+ path: string;
2505
+ estimated_tokens: number;
2506
+ }>, "many">;
2507
+ }, "strict", z.ZodTypeAny, {
2508
+ model: string;
2509
+ context_window: number;
2510
+ packet_tokens: number;
2511
+ framing_tokens: number;
2512
+ output_allowance_tokens: number;
2513
+ mandatory_files: {
2514
+ path: string;
2515
+ estimated_tokens: number;
2516
+ }[];
2517
+ }, {
2518
+ model: string;
2519
+ context_window: number;
2520
+ packet_tokens: number;
2521
+ framing_tokens: number;
2522
+ output_allowance_tokens: number;
2523
+ mandatory_files: {
2524
+ path: string;
2525
+ estimated_tokens: number;
2526
+ }[];
2527
+ }>>;
2147
2528
  captureFailure: z.ZodOptional<z.ZodObject<{
2148
- code: z.ZodEnum<["capture_output_exceeded", "capture_output_incomplete", "capture_preview_truncated", "capture_failed"]>;
2529
+ code: z.ZodEnum<["capture_output_exceeded", "capture_output_incomplete", "capture_preview_truncated", "capture_space_insufficient", "capture_git_stalled", "capture_git_signal", "capture_read_failed", "capture_object_missing", "capture_failed"]>;
2149
2530
  message: z.ZodString;
2150
2531
  causeCode: z.ZodOptional<z.ZodString>;
2151
2532
  bufferBudgetBytes: z.ZodOptional<z.ZodNumber>;
2152
2533
  stream: z.ZodOptional<z.ZodEnum<["stdout", "stderr"]>>;
2153
2534
  drain: z.ZodOptional<z.ZodLiteral<"truncated">>;
2535
+ requiredBytes: z.ZodOptional<z.ZodNumber>;
2536
+ availableBytes: z.ZodOptional<z.ZodNumber>;
2537
+ signal: z.ZodOptional<z.ZodString>;
2538
+ stallMs: z.ZodOptional<z.ZodNumber>;
2154
2539
  cleanup: z.ZodOptional<z.ZodObject<{
2155
2540
  code: z.ZodNullable<z.ZodString>;
2156
2541
  message: z.ZodString;
@@ -2161,32 +2546,91 @@ export declare const ControlRunDetail: z.ZodObject<{
2161
2546
  code: string | null;
2162
2547
  message: string;
2163
2548
  }>>;
2549
+ inventory: z.ZodOptional<z.ZodObject<{
2550
+ exact: z.ZodLiteral<false>;
2551
+ changedFiles: z.ZodNumber;
2552
+ largest: z.ZodArray<z.ZodObject<{
2553
+ path: z.ZodString;
2554
+ change: z.ZodEnum<["added", "modified", "deleted", "type_changed"]>;
2555
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
2556
+ }, "strip", z.ZodTypeAny, {
2557
+ path: string;
2558
+ change: "added" | "deleted" | "modified" | "type_changed";
2559
+ sizeBytes: number | null;
2560
+ }, {
2561
+ path: string;
2562
+ change: "added" | "deleted" | "modified" | "type_changed";
2563
+ sizeBytes: number | null;
2564
+ }>, "many">;
2565
+ }, "strip", z.ZodTypeAny, {
2566
+ exact: false;
2567
+ changedFiles: number;
2568
+ largest: {
2569
+ path: string;
2570
+ change: "added" | "deleted" | "modified" | "type_changed";
2571
+ sizeBytes: number | null;
2572
+ }[];
2573
+ }, {
2574
+ exact: false;
2575
+ changedFiles: number;
2576
+ largest: {
2577
+ path: string;
2578
+ change: "added" | "deleted" | "modified" | "type_changed";
2579
+ sizeBytes: number | null;
2580
+ }[];
2581
+ }>>;
2164
2582
  }, "strip", z.ZodTypeAny, {
2165
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
2583
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
2166
2584
  message: string;
2167
2585
  causeCode?: string | undefined;
2168
2586
  bufferBudgetBytes?: number | undefined;
2169
2587
  stream?: "stderr" | "stdout" | undefined;
2170
2588
  drain?: "truncated" | undefined;
2589
+ requiredBytes?: number | undefined;
2590
+ availableBytes?: number | undefined;
2591
+ signal?: string | undefined;
2592
+ stallMs?: number | undefined;
2171
2593
  cleanup?: {
2172
2594
  code: string | null;
2173
2595
  message: string;
2174
2596
  } | undefined;
2597
+ inventory?: {
2598
+ exact: false;
2599
+ changedFiles: number;
2600
+ largest: {
2601
+ path: string;
2602
+ change: "added" | "deleted" | "modified" | "type_changed";
2603
+ sizeBytes: number | null;
2604
+ }[];
2605
+ } | undefined;
2175
2606
  }, {
2176
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
2607
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
2177
2608
  message: string;
2178
2609
  causeCode?: string | undefined;
2179
2610
  bufferBudgetBytes?: number | undefined;
2180
2611
  stream?: "stderr" | "stdout" | undefined;
2181
2612
  drain?: "truncated" | undefined;
2613
+ requiredBytes?: number | undefined;
2614
+ availableBytes?: number | undefined;
2615
+ signal?: string | undefined;
2616
+ stallMs?: number | undefined;
2182
2617
  cleanup?: {
2183
2618
  code: string | null;
2184
2619
  message: string;
2185
2620
  } | undefined;
2621
+ inventory?: {
2622
+ exact: false;
2623
+ changedFiles: number;
2624
+ largest: {
2625
+ path: string;
2626
+ change: "added" | "deleted" | "modified" | "type_changed";
2627
+ sizeBytes: number | null;
2628
+ }[];
2629
+ } | undefined;
2186
2630
  }>>;
2187
2631
  phase: z.ZodDefault<z.ZodString>;
2188
2632
  category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
2189
- code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "input_too_large", "vendor_cli_too_old", "credential_source_unconfirmed", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete", "access_profile_incompatible", "auxiliary_writable_roots_unsupported", "retired_access_profile"]>>>;
2633
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "input_too_large", "raw_context_mandatory_unavailable", "raw_context_exceeds_window", "model_catalog_unavailable", "vendor_cli_too_old", "credential_source_unconfirmed", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete", "access_profile_incompatible", "auxiliary_writable_roots_unsupported", "retired_access_profile"]>>>;
2190
2634
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2191
2635
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2192
2636
  safeMessage: z.ZodString;
@@ -2195,6 +2639,22 @@ export declare const ControlRunDetail: z.ZodObject<{
2195
2639
  eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2196
2640
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2197
2641
  resetsAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2642
+ quotaRefusal: z.ZodOptional<z.ZodObject<{
2643
+ basis: z.ZodEnum<["owner_reserve", "provider_window", "provider_cooldown"]>;
2644
+ constraintId: z.ZodNullable<z.ZodString>;
2645
+ usedRatio: z.ZodNullable<z.ZodNumber>;
2646
+ threshold: z.ZodNullable<z.ZodNumber>;
2647
+ }, "strip", z.ZodTypeAny, {
2648
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
2649
+ constraintId: string | null;
2650
+ usedRatio: number | null;
2651
+ threshold: number | null;
2652
+ }, {
2653
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
2654
+ constraintId: string | null;
2655
+ usedRatio: number | null;
2656
+ threshold: number | null;
2657
+ }>>;
2198
2658
  vendorFailure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2199
2659
  code: z.ZodNullable<z.ZodString>;
2200
2660
  message: z.ZodNullable<z.ZodString>;
@@ -2287,21 +2747,45 @@ export declare const ControlRunDetail: z.ZodObject<{
2287
2747
  source: "grok_init";
2288
2748
  reported_source: string;
2289
2749
  } | undefined;
2750
+ rawContextShortfall?: {
2751
+ model: string;
2752
+ context_window: number;
2753
+ packet_tokens: number;
2754
+ framing_tokens: number;
2755
+ output_allowance_tokens: number;
2756
+ mandatory_files: {
2757
+ path: string;
2758
+ estimated_tokens: number;
2759
+ }[];
2760
+ } | undefined;
2290
2761
  captureFailure?: {
2291
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
2762
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
2292
2763
  message: string;
2293
2764
  causeCode?: string | undefined;
2294
2765
  bufferBudgetBytes?: number | undefined;
2295
2766
  stream?: "stderr" | "stdout" | undefined;
2296
2767
  drain?: "truncated" | undefined;
2768
+ requiredBytes?: number | undefined;
2769
+ availableBytes?: number | undefined;
2770
+ signal?: string | undefined;
2771
+ stallMs?: number | undefined;
2297
2772
  cleanup?: {
2298
2773
  code: string | null;
2299
2774
  message: string;
2300
2775
  } | undefined;
2776
+ inventory?: {
2777
+ exact: false;
2778
+ changedFiles: number;
2779
+ largest: {
2780
+ path: string;
2781
+ change: "added" | "deleted" | "modified" | "type_changed";
2782
+ sizeBytes: number | null;
2783
+ }[];
2784
+ } | undefined;
2301
2785
  } | undefined;
2302
2786
  phase: string;
2303
2787
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
2304
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
2788
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
2305
2789
  harnessId: string | null;
2306
2790
  attemptId: string | null;
2307
2791
  safeMessage: string;
@@ -2310,6 +2794,12 @@ export declare const ControlRunDetail: z.ZodObject<{
2310
2794
  eventRefs: string[];
2311
2795
  runDir: string | null;
2312
2796
  resetsAt: string | null;
2797
+ quotaRefusal?: {
2798
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
2799
+ constraintId: string | null;
2800
+ usedRatio: number | null;
2801
+ threshold: number | null;
2802
+ } | undefined;
2313
2803
  vendorFailure: {
2314
2804
  code: string | null;
2315
2805
  message: string | null;
@@ -2354,21 +2844,45 @@ export declare const ControlRunDetail: z.ZodObject<{
2354
2844
  source: "grok_init";
2355
2845
  reported_source: string;
2356
2846
  } | undefined;
2847
+ rawContextShortfall?: {
2848
+ model: string;
2849
+ context_window: number;
2850
+ packet_tokens: number;
2851
+ framing_tokens: number;
2852
+ output_allowance_tokens: number;
2853
+ mandatory_files: {
2854
+ path: string;
2855
+ estimated_tokens: number;
2856
+ }[];
2857
+ } | undefined;
2357
2858
  captureFailure?: {
2358
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
2859
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
2359
2860
  message: string;
2360
2861
  causeCode?: string | undefined;
2361
2862
  bufferBudgetBytes?: number | undefined;
2362
2863
  stream?: "stderr" | "stdout" | undefined;
2363
2864
  drain?: "truncated" | undefined;
2865
+ requiredBytes?: number | undefined;
2866
+ availableBytes?: number | undefined;
2867
+ signal?: string | undefined;
2868
+ stallMs?: number | undefined;
2364
2869
  cleanup?: {
2365
2870
  code: string | null;
2366
2871
  message: string;
2367
2872
  } | undefined;
2873
+ inventory?: {
2874
+ exact: false;
2875
+ changedFiles: number;
2876
+ largest: {
2877
+ path: string;
2878
+ change: "added" | "deleted" | "modified" | "type_changed";
2879
+ sizeBytes: number | null;
2880
+ }[];
2881
+ } | undefined;
2368
2882
  } | undefined;
2369
2883
  phase?: string | undefined;
2370
2884
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
2371
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
2885
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
2372
2886
  harnessId?: string | null | undefined;
2373
2887
  attemptId?: string | null | undefined;
2374
2888
  safeMessage: string;
@@ -2377,6 +2891,12 @@ export declare const ControlRunDetail: z.ZodObject<{
2377
2891
  eventRefs?: string[] | undefined;
2378
2892
  runDir?: string | null | undefined;
2379
2893
  resetsAt?: string | null | undefined;
2894
+ quotaRefusal?: {
2895
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
2896
+ constraintId: string | null;
2897
+ usedRatio: number | null;
2898
+ threshold: number | null;
2899
+ } | undefined;
2380
2900
  vendorFailure?: {
2381
2901
  code: string | null;
2382
2902
  message: string | null;
@@ -2662,7 +3182,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2662
3182
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
2663
3183
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
2664
3184
  review_requested: z.ZodOptional<z.ZodBoolean>;
2665
- 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
3185
+ 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "capture_refused", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
2666
3186
  work_state: z.ZodOptional<z.ZodObject<{
2667
3187
  state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
2668
3188
  source: z.ZodEnum<["constrained", "validated", "absent"]>;
@@ -2705,7 +3225,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2705
3225
  checks: "failed" | "not_configured" | "passed";
2706
3226
  review: "approved" | "blocked" | "not_run";
2707
3227
  review_requested?: boolean | undefined;
2708
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
3228
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
2709
3229
  work_state?: {
2710
3230
  state: "completed" | "incomplete" | "needs_input" | "unverified";
2711
3231
  source: "absent" | "constrained" | "validated";
@@ -2722,7 +3242,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2722
3242
  checks?: "failed" | "not_configured" | "passed" | undefined;
2723
3243
  review?: "approved" | "blocked" | "not_run" | undefined;
2724
3244
  review_requested?: boolean | undefined;
2725
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
3245
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
2726
3246
  work_state?: {
2727
3247
  state: "completed" | "incomplete" | "needs_input" | "unverified";
2728
3248
  source: "absent" | "constrained" | "validated";
@@ -2820,6 +3340,74 @@ export declare const ControlRunDetail: z.ZodObject<{
2820
3340
  eligible: boolean;
2821
3341
  }[] | undefined;
2822
3342
  }>>>;
3343
+ rawContext: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3344
+ model: z.ZodString;
3345
+ estimated_request_tokens: z.ZodNumber;
3346
+ budget: z.ZodObject<{
3347
+ estimator: z.ZodLiteral<"chars_div_4">;
3348
+ basis: z.ZodEnum<["model_context_window", "assumed_ceiling"]>;
3349
+ model: z.ZodNullable<z.ZodString>;
3350
+ context_window: z.ZodNullable<z.ZodNumber>;
3351
+ output_allowance_tokens: z.ZodNullable<z.ZodNumber>;
3352
+ framing_tokens: z.ZodNullable<z.ZodNumber>;
3353
+ selection_limit_tokens: z.ZodNumber;
3354
+ estimated_packet_tokens: z.ZodNumber;
3355
+ omitted_for_budget: z.ZodNumber;
3356
+ mandatory_paths: z.ZodArray<z.ZodString, "many">;
3357
+ }, "strict", z.ZodTypeAny, {
3358
+ estimator: "chars_div_4";
3359
+ basis: "assumed_ceiling" | "model_context_window";
3360
+ model: string | null;
3361
+ context_window: number | null;
3362
+ output_allowance_tokens: number | null;
3363
+ framing_tokens: number | null;
3364
+ selection_limit_tokens: number;
3365
+ estimated_packet_tokens: number;
3366
+ omitted_for_budget: number;
3367
+ mandatory_paths: string[];
3368
+ }, {
3369
+ estimator: "chars_div_4";
3370
+ basis: "assumed_ceiling" | "model_context_window";
3371
+ model: string | null;
3372
+ context_window: number | null;
3373
+ output_allowance_tokens: number | null;
3374
+ framing_tokens: number | null;
3375
+ selection_limit_tokens: number;
3376
+ estimated_packet_tokens: number;
3377
+ omitted_for_budget: number;
3378
+ mandatory_paths: string[];
3379
+ }>;
3380
+ }, "strict", z.ZodTypeAny, {
3381
+ model: string;
3382
+ estimated_request_tokens: number;
3383
+ budget: {
3384
+ estimator: "chars_div_4";
3385
+ basis: "assumed_ceiling" | "model_context_window";
3386
+ model: string | null;
3387
+ context_window: number | null;
3388
+ output_allowance_tokens: number | null;
3389
+ framing_tokens: number | null;
3390
+ selection_limit_tokens: number;
3391
+ estimated_packet_tokens: number;
3392
+ omitted_for_budget: number;
3393
+ mandatory_paths: string[];
3394
+ };
3395
+ }, {
3396
+ model: string;
3397
+ estimated_request_tokens: number;
3398
+ budget: {
3399
+ estimator: "chars_div_4";
3400
+ basis: "assumed_ceiling" | "model_context_window";
3401
+ model: string | null;
3402
+ context_window: number | null;
3403
+ output_allowance_tokens: number | null;
3404
+ framing_tokens: number | null;
3405
+ selection_limit_tokens: number;
3406
+ estimated_packet_tokens: number;
3407
+ omitted_for_budget: number;
3408
+ mandatory_paths: string[];
3409
+ };
3410
+ }>>>;
2823
3411
  tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2824
3412
  program: z.ZodString;
2825
3413
  args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -2890,6 +3478,7 @@ export declare const ControlRunDetail: z.ZodObject<{
2890
3478
  modelMismatch: boolean | null;
2891
3479
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
2892
3480
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
3481
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
2893
3482
  }[] | undefined;
2894
3483
  retainedEnvelope: {
2895
3484
  root: string;
@@ -2922,21 +3511,45 @@ export declare const ControlRunDetail: z.ZodObject<{
2922
3511
  source: "grok_init";
2923
3512
  reported_source: string;
2924
3513
  } | undefined;
3514
+ rawContextShortfall?: {
3515
+ model: string;
3516
+ context_window: number;
3517
+ packet_tokens: number;
3518
+ framing_tokens: number;
3519
+ output_allowance_tokens: number;
3520
+ mandatory_files: {
3521
+ path: string;
3522
+ estimated_tokens: number;
3523
+ }[];
3524
+ } | undefined;
2925
3525
  captureFailure?: {
2926
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
3526
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
2927
3527
  message: string;
2928
3528
  causeCode?: string | undefined;
2929
3529
  bufferBudgetBytes?: number | undefined;
2930
3530
  stream?: "stderr" | "stdout" | undefined;
2931
3531
  drain?: "truncated" | undefined;
3532
+ requiredBytes?: number | undefined;
3533
+ availableBytes?: number | undefined;
3534
+ signal?: string | undefined;
3535
+ stallMs?: number | undefined;
2932
3536
  cleanup?: {
2933
3537
  code: string | null;
2934
3538
  message: string;
2935
3539
  } | undefined;
3540
+ inventory?: {
3541
+ exact: false;
3542
+ changedFiles: number;
3543
+ largest: {
3544
+ path: string;
3545
+ change: "added" | "deleted" | "modified" | "type_changed";
3546
+ sizeBytes: number | null;
3547
+ }[];
3548
+ } | undefined;
2936
3549
  } | undefined;
2937
3550
  phase: string;
2938
3551
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
2939
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
3552
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
2940
3553
  harnessId: string | null;
2941
3554
  attemptId: string | null;
2942
3555
  safeMessage: string;
@@ -2945,6 +3558,12 @@ export declare const ControlRunDetail: z.ZodObject<{
2945
3558
  eventRefs: string[];
2946
3559
  runDir: string | null;
2947
3560
  resetsAt: string | null;
3561
+ quotaRefusal?: {
3562
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
3563
+ constraintId: string | null;
3564
+ usedRatio: number | null;
3565
+ threshold: number | null;
3566
+ } | undefined;
2948
3567
  vendorFailure: {
2949
3568
  code: string | null;
2950
3569
  message: string | null;
@@ -3078,7 +3697,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3078
3697
  checks: "failed" | "not_configured" | "passed";
3079
3698
  review: "approved" | "blocked" | "not_run";
3080
3699
  review_requested?: boolean | undefined;
3081
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
3700
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
3082
3701
  work_state?: {
3083
3702
  state: "completed" | "incomplete" | "needs_input" | "unverified";
3084
3703
  source: "absent" | "constrained" | "validated";
@@ -3118,6 +3737,22 @@ export declare const ControlRunDetail: z.ZodObject<{
3118
3737
  eligible: boolean;
3119
3738
  }[];
3120
3739
  } | null;
3740
+ rawContext: {
3741
+ model: string;
3742
+ estimated_request_tokens: number;
3743
+ budget: {
3744
+ estimator: "chars_div_4";
3745
+ basis: "assumed_ceiling" | "model_context_window";
3746
+ model: string | null;
3747
+ context_window: number | null;
3748
+ output_allowance_tokens: number | null;
3749
+ framing_tokens: number | null;
3750
+ selection_limit_tokens: number;
3751
+ estimated_packet_tokens: number;
3752
+ omitted_for_budget: number;
3753
+ mandatory_paths: string[];
3754
+ };
3755
+ } | null;
3121
3756
  tests?: {
3122
3757
  program: string;
3123
3758
  args: string[];
@@ -3178,6 +3813,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3178
3813
  modelMismatch: boolean | null;
3179
3814
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
3180
3815
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
3816
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
3181
3817
  }[] | undefined;
3182
3818
  retainedEnvelope?: {
3183
3819
  root: string;
@@ -3210,21 +3846,45 @@ export declare const ControlRunDetail: z.ZodObject<{
3210
3846
  source: "grok_init";
3211
3847
  reported_source: string;
3212
3848
  } | undefined;
3849
+ rawContextShortfall?: {
3850
+ model: string;
3851
+ context_window: number;
3852
+ packet_tokens: number;
3853
+ framing_tokens: number;
3854
+ output_allowance_tokens: number;
3855
+ mandatory_files: {
3856
+ path: string;
3857
+ estimated_tokens: number;
3858
+ }[];
3859
+ } | undefined;
3213
3860
  captureFailure?: {
3214
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
3861
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
3215
3862
  message: string;
3216
3863
  causeCode?: string | undefined;
3217
3864
  bufferBudgetBytes?: number | undefined;
3218
3865
  stream?: "stderr" | "stdout" | undefined;
3219
3866
  drain?: "truncated" | undefined;
3867
+ requiredBytes?: number | undefined;
3868
+ availableBytes?: number | undefined;
3869
+ signal?: string | undefined;
3870
+ stallMs?: number | undefined;
3220
3871
  cleanup?: {
3221
3872
  code: string | null;
3222
3873
  message: string;
3223
3874
  } | undefined;
3875
+ inventory?: {
3876
+ exact: false;
3877
+ changedFiles: number;
3878
+ largest: {
3879
+ path: string;
3880
+ change: "added" | "deleted" | "modified" | "type_changed";
3881
+ sizeBytes: number | null;
3882
+ }[];
3883
+ } | undefined;
3224
3884
  } | undefined;
3225
3885
  phase?: string | undefined;
3226
3886
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
3227
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
3887
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
3228
3888
  harnessId?: string | null | undefined;
3229
3889
  attemptId?: string | null | undefined;
3230
3890
  safeMessage: string;
@@ -3233,6 +3893,12 @@ export declare const ControlRunDetail: z.ZodObject<{
3233
3893
  eventRefs?: string[] | undefined;
3234
3894
  runDir?: string | null | undefined;
3235
3895
  resetsAt?: string | null | undefined;
3896
+ quotaRefusal?: {
3897
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
3898
+ constraintId: string | null;
3899
+ usedRatio: number | null;
3900
+ threshold: number | null;
3901
+ } | undefined;
3236
3902
  vendorFailure?: {
3237
3903
  code: string | null;
3238
3904
  message: string | null;
@@ -3366,7 +4032,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3366
4032
  checks?: "failed" | "not_configured" | "passed" | undefined;
3367
4033
  review?: "approved" | "blocked" | "not_run" | undefined;
3368
4034
  review_requested?: boolean | undefined;
3369
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
4035
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
3370
4036
  work_state?: {
3371
4037
  state: "completed" | "incomplete" | "needs_input" | "unverified";
3372
4038
  source: "absent" | "constrained" | "validated";
@@ -3406,6 +4072,22 @@ export declare const ControlRunDetail: z.ZodObject<{
3406
4072
  eligible: boolean;
3407
4073
  }[] | undefined;
3408
4074
  } | null | undefined;
4075
+ rawContext?: {
4076
+ model: string;
4077
+ estimated_request_tokens: number;
4078
+ budget: {
4079
+ estimator: "chars_div_4";
4080
+ basis: "assumed_ceiling" | "model_context_window";
4081
+ model: string | null;
4082
+ context_window: number | null;
4083
+ output_allowance_tokens: number | null;
4084
+ framing_tokens: number | null;
4085
+ selection_limit_tokens: number;
4086
+ estimated_packet_tokens: number;
4087
+ omitted_for_budget: number;
4088
+ mandatory_paths: string[];
4089
+ };
4090
+ } | null | undefined;
3409
4091
  tests?: {
3410
4092
  program: string;
3411
4093
  args?: string[] | undefined;
@@ -3429,7 +4111,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3429
4111
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
3430
4112
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
3431
4113
  review_requested: z.ZodOptional<z.ZodBoolean>;
3432
- 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
4114
+ 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "capture_refused", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
3433
4115
  work_state: z.ZodOptional<z.ZodObject<{
3434
4116
  state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
3435
4117
  source: z.ZodEnum<["constrained", "validated", "absent"]>;
@@ -3472,7 +4154,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3472
4154
  checks: "failed" | "not_configured" | "passed";
3473
4155
  review: "approved" | "blocked" | "not_run";
3474
4156
  review_requested?: boolean | undefined;
3475
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
4157
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
3476
4158
  work_state?: {
3477
4159
  state: "completed" | "incomplete" | "needs_input" | "unverified";
3478
4160
  source: "absent" | "constrained" | "validated";
@@ -3489,7 +4171,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3489
4171
  checks?: "failed" | "not_configured" | "passed" | undefined;
3490
4172
  review?: "approved" | "blocked" | "not_run" | undefined;
3491
4173
  review_requested?: boolean | undefined;
3492
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
4174
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
3493
4175
  work_state?: {
3494
4176
  state: "completed" | "incomplete" | "needs_input" | "unverified";
3495
4177
  source: "absent" | "constrained" | "validated";
@@ -3674,7 +4356,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3674
4356
  checks: "failed" | "not_configured" | "passed";
3675
4357
  review: "approved" | "blocked" | "not_run";
3676
4358
  review_requested?: boolean | undefined;
3677
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
4359
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
3678
4360
  work_state?: {
3679
4361
  state: "completed" | "incomplete" | "needs_input" | "unverified";
3680
4362
  source: "absent" | "constrained" | "validated";
@@ -3747,7 +4429,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3747
4429
  checks?: "failed" | "not_configured" | "passed" | undefined;
3748
4430
  review?: "approved" | "blocked" | "not_run" | undefined;
3749
4431
  review_requested?: boolean | undefined;
3750
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
4432
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
3751
4433
  work_state?: {
3752
4434
  state: "completed" | "incomplete" | "needs_input" | "unverified";
3753
4435
  source: "absent" | "constrained" | "validated";
@@ -3870,6 +4552,9 @@ export declare const ControlRunDetail: z.ZodObject<{
3870
4552
  detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3871
4553
  textKind: z.ZodDefault<z.ZodNullable<z.ZodEnum<["thinking", "message"]>>>;
3872
4554
  textDelta: z.ZodDefault<z.ZodBoolean>;
4555
+ speechKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4556
+ speechOp: z.ZodDefault<z.ZodNullable<z.ZodEnum<["fragment", "complete", "abandoned"]>>>;
4557
+ textFinal: z.ZodDefault<z.ZodBoolean>;
3873
4558
  severity: z.ZodDefault<z.ZodEnum<["info", "warning", "error"]>>;
3874
4559
  toolName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3875
4560
  target: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -3887,6 +4572,9 @@ export declare const ControlRunDetail: z.ZodObject<{
3887
4572
  detail: string | null;
3888
4573
  textKind: "message" | "thinking" | null;
3889
4574
  textDelta: boolean;
4575
+ speechKey: string | null;
4576
+ speechOp: "abandoned" | "complete" | "fragment" | null;
4577
+ textFinal: boolean;
3890
4578
  severity: "error" | "info" | "warning";
3891
4579
  toolName: string | null;
3892
4580
  target: string | null;
@@ -3904,6 +4592,9 @@ export declare const ControlRunDetail: z.ZodObject<{
3904
4592
  detail?: string | null | undefined;
3905
4593
  textKind?: "message" | "thinking" | null | undefined;
3906
4594
  textDelta?: boolean | undefined;
4595
+ speechKey?: string | null | undefined;
4596
+ speechOp?: "abandoned" | "complete" | "fragment" | null | undefined;
4597
+ textFinal?: boolean | undefined;
3907
4598
  severity?: "error" | "info" | "warning" | undefined;
3908
4599
  toolName?: string | null | undefined;
3909
4600
  target?: string | null | undefined;
@@ -3979,7 +4670,7 @@ export declare const ControlRunDetail: z.ZodObject<{
3979
4670
  checks: z.ZodDefault<z.ZodEnum<["passed", "failed", "not_configured"]>>;
3980
4671
  review: z.ZodDefault<z.ZodEnum<["approved", "blocked", "not_run"]>>;
3981
4672
  review_requested: z.ZodOptional<z.ZodBoolean>;
3982
- 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
4673
+ 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", "host_cancelled", "owner_task_gone", "crash_interrupted", "workspace_unavailable", "capture_refused", "input_required", "work_incomplete", "context_capacity_exhausted", "work_report_contract"]>>>;
3983
4674
  work_state: z.ZodOptional<z.ZodObject<{
3984
4675
  state: z.ZodEnum<["completed", "needs_input", "incomplete", "unverified"]>;
3985
4676
  source: z.ZodEnum<["constrained", "validated", "absent"]>;
@@ -4022,7 +4713,7 @@ export declare const ControlRunDetail: z.ZodObject<{
4022
4713
  checks: "failed" | "not_configured" | "passed";
4023
4714
  review: "approved" | "blocked" | "not_run";
4024
4715
  review_requested?: boolean | undefined;
4025
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
4716
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
4026
4717
  work_state?: {
4027
4718
  state: "completed" | "incomplete" | "needs_input" | "unverified";
4028
4719
  source: "absent" | "constrained" | "validated";
@@ -4039,7 +4730,7 @@ export declare const ControlRunDetail: z.ZodObject<{
4039
4730
  checks?: "failed" | "not_configured" | "passed" | undefined;
4040
4731
  review?: "approved" | "blocked" | "not_run" | undefined;
4041
4732
  review_requested?: boolean | undefined;
4042
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
4733
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
4043
4734
  work_state?: {
4044
4735
  state: "completed" | "incomplete" | "needs_input" | "unverified";
4045
4736
  source: "absent" | "constrained" | "validated";
@@ -4159,7 +4850,7 @@ export declare const ControlRunDetail: z.ZodObject<{
4159
4850
  checks: "failed" | "not_configured" | "passed";
4160
4851
  review: "approved" | "blocked" | "not_run";
4161
4852
  review_requested?: boolean | undefined;
4162
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
4853
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
4163
4854
  work_state?: {
4164
4855
  state: "completed" | "incomplete" | "needs_input" | "unverified";
4165
4856
  source: "absent" | "constrained" | "validated";
@@ -4219,7 +4910,7 @@ export declare const ControlRunDetail: z.ZodObject<{
4219
4910
  checks?: "failed" | "not_configured" | "passed" | undefined;
4220
4911
  review?: "approved" | "blocked" | "not_run" | undefined;
4221
4912
  review_requested?: boolean | undefined;
4222
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
4913
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
4223
4914
  work_state?: {
4224
4915
  state: "completed" | "incomplete" | "needs_input" | "unverified";
4225
4916
  source: "absent" | "constrained" | "validated";
@@ -4853,13 +5544,54 @@ export declare const ControlRunDetail: z.ZodObject<{
4853
5544
  source: "grok_init";
4854
5545
  reported_source: string;
4855
5546
  }>]>>;
5547
+ rawContextShortfall: z.ZodOptional<z.ZodObject<{
5548
+ model: z.ZodString;
5549
+ context_window: z.ZodNumber;
5550
+ packet_tokens: z.ZodNumber;
5551
+ framing_tokens: z.ZodNumber;
5552
+ output_allowance_tokens: z.ZodNumber;
5553
+ mandatory_files: z.ZodArray<z.ZodObject<{
5554
+ path: z.ZodString;
5555
+ estimated_tokens: z.ZodNumber;
5556
+ }, "strict", z.ZodTypeAny, {
5557
+ path: string;
5558
+ estimated_tokens: number;
5559
+ }, {
5560
+ path: string;
5561
+ estimated_tokens: number;
5562
+ }>, "many">;
5563
+ }, "strict", z.ZodTypeAny, {
5564
+ model: string;
5565
+ context_window: number;
5566
+ packet_tokens: number;
5567
+ framing_tokens: number;
5568
+ output_allowance_tokens: number;
5569
+ mandatory_files: {
5570
+ path: string;
5571
+ estimated_tokens: number;
5572
+ }[];
5573
+ }, {
5574
+ model: string;
5575
+ context_window: number;
5576
+ packet_tokens: number;
5577
+ framing_tokens: number;
5578
+ output_allowance_tokens: number;
5579
+ mandatory_files: {
5580
+ path: string;
5581
+ estimated_tokens: number;
5582
+ }[];
5583
+ }>>;
4856
5584
  captureFailure: z.ZodOptional<z.ZodObject<{
4857
- code: z.ZodEnum<["capture_output_exceeded", "capture_output_incomplete", "capture_preview_truncated", "capture_failed"]>;
5585
+ code: z.ZodEnum<["capture_output_exceeded", "capture_output_incomplete", "capture_preview_truncated", "capture_space_insufficient", "capture_git_stalled", "capture_git_signal", "capture_read_failed", "capture_object_missing", "capture_failed"]>;
4858
5586
  message: z.ZodString;
4859
5587
  causeCode: z.ZodOptional<z.ZodString>;
4860
5588
  bufferBudgetBytes: z.ZodOptional<z.ZodNumber>;
4861
5589
  stream: z.ZodOptional<z.ZodEnum<["stdout", "stderr"]>>;
4862
5590
  drain: z.ZodOptional<z.ZodLiteral<"truncated">>;
5591
+ requiredBytes: z.ZodOptional<z.ZodNumber>;
5592
+ availableBytes: z.ZodOptional<z.ZodNumber>;
5593
+ signal: z.ZodOptional<z.ZodString>;
5594
+ stallMs: z.ZodOptional<z.ZodNumber>;
4863
5595
  cleanup: z.ZodOptional<z.ZodObject<{
4864
5596
  code: z.ZodNullable<z.ZodString>;
4865
5597
  message: z.ZodString;
@@ -4870,32 +5602,91 @@ export declare const ControlRunDetail: z.ZodObject<{
4870
5602
  code: string | null;
4871
5603
  message: string;
4872
5604
  }>>;
5605
+ inventory: z.ZodOptional<z.ZodObject<{
5606
+ exact: z.ZodLiteral<false>;
5607
+ changedFiles: z.ZodNumber;
5608
+ largest: z.ZodArray<z.ZodObject<{
5609
+ path: z.ZodString;
5610
+ change: z.ZodEnum<["added", "modified", "deleted", "type_changed"]>;
5611
+ sizeBytes: z.ZodNullable<z.ZodNumber>;
5612
+ }, "strip", z.ZodTypeAny, {
5613
+ path: string;
5614
+ change: "added" | "deleted" | "modified" | "type_changed";
5615
+ sizeBytes: number | null;
5616
+ }, {
5617
+ path: string;
5618
+ change: "added" | "deleted" | "modified" | "type_changed";
5619
+ sizeBytes: number | null;
5620
+ }>, "many">;
5621
+ }, "strip", z.ZodTypeAny, {
5622
+ exact: false;
5623
+ changedFiles: number;
5624
+ largest: {
5625
+ path: string;
5626
+ change: "added" | "deleted" | "modified" | "type_changed";
5627
+ sizeBytes: number | null;
5628
+ }[];
5629
+ }, {
5630
+ exact: false;
5631
+ changedFiles: number;
5632
+ largest: {
5633
+ path: string;
5634
+ change: "added" | "deleted" | "modified" | "type_changed";
5635
+ sizeBytes: number | null;
5636
+ }[];
5637
+ }>>;
4873
5638
  }, "strip", z.ZodTypeAny, {
4874
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
5639
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
4875
5640
  message: string;
4876
5641
  causeCode?: string | undefined;
4877
5642
  bufferBudgetBytes?: number | undefined;
4878
5643
  stream?: "stderr" | "stdout" | undefined;
4879
5644
  drain?: "truncated" | undefined;
5645
+ requiredBytes?: number | undefined;
5646
+ availableBytes?: number | undefined;
5647
+ signal?: string | undefined;
5648
+ stallMs?: number | undefined;
4880
5649
  cleanup?: {
4881
5650
  code: string | null;
4882
5651
  message: string;
4883
5652
  } | undefined;
5653
+ inventory?: {
5654
+ exact: false;
5655
+ changedFiles: number;
5656
+ largest: {
5657
+ path: string;
5658
+ change: "added" | "deleted" | "modified" | "type_changed";
5659
+ sizeBytes: number | null;
5660
+ }[];
5661
+ } | undefined;
4884
5662
  }, {
4885
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
5663
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
4886
5664
  message: string;
4887
5665
  causeCode?: string | undefined;
4888
5666
  bufferBudgetBytes?: number | undefined;
4889
5667
  stream?: "stderr" | "stdout" | undefined;
4890
5668
  drain?: "truncated" | undefined;
5669
+ requiredBytes?: number | undefined;
5670
+ availableBytes?: number | undefined;
5671
+ signal?: string | undefined;
5672
+ stallMs?: number | undefined;
4891
5673
  cleanup?: {
4892
5674
  code: string | null;
4893
5675
  message: string;
4894
5676
  } | undefined;
5677
+ inventory?: {
5678
+ exact: false;
5679
+ changedFiles: number;
5680
+ largest: {
5681
+ path: string;
5682
+ change: "added" | "deleted" | "modified" | "type_changed";
5683
+ sizeBytes: number | null;
5684
+ }[];
5685
+ } | undefined;
4895
5686
  }>>;
4896
5687
  phase: z.ZodDefault<z.ZodString>;
4897
5688
  category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
4898
- code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "input_too_large", "vendor_cli_too_old", "credential_source_unconfirmed", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete", "access_profile_incompatible", "auxiliary_writable_roots_unsupported", "retired_access_profile"]>>>;
5689
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "input_too_large", "raw_context_mandatory_unavailable", "raw_context_exceeds_window", "model_catalog_unavailable", "vendor_cli_too_old", "credential_source_unconfirmed", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete", "access_profile_incompatible", "auxiliary_writable_roots_unsupported", "retired_access_profile"]>>>;
4899
5690
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4900
5691
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4901
5692
  safeMessage: z.ZodString;
@@ -4904,6 +5695,22 @@ export declare const ControlRunDetail: z.ZodObject<{
4904
5695
  eventRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4905
5696
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4906
5697
  resetsAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
5698
+ quotaRefusal: z.ZodOptional<z.ZodObject<{
5699
+ basis: z.ZodEnum<["owner_reserve", "provider_window", "provider_cooldown"]>;
5700
+ constraintId: z.ZodNullable<z.ZodString>;
5701
+ usedRatio: z.ZodNullable<z.ZodNumber>;
5702
+ threshold: z.ZodNullable<z.ZodNumber>;
5703
+ }, "strip", z.ZodTypeAny, {
5704
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
5705
+ constraintId: string | null;
5706
+ usedRatio: number | null;
5707
+ threshold: number | null;
5708
+ }, {
5709
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
5710
+ constraintId: string | null;
5711
+ usedRatio: number | null;
5712
+ threshold: number | null;
5713
+ }>>;
4907
5714
  vendorFailure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4908
5715
  code: z.ZodNullable<z.ZodString>;
4909
5716
  message: z.ZodNullable<z.ZodString>;
@@ -4996,21 +5803,45 @@ export declare const ControlRunDetail: z.ZodObject<{
4996
5803
  source: "grok_init";
4997
5804
  reported_source: string;
4998
5805
  } | undefined;
5806
+ rawContextShortfall?: {
5807
+ model: string;
5808
+ context_window: number;
5809
+ packet_tokens: number;
5810
+ framing_tokens: number;
5811
+ output_allowance_tokens: number;
5812
+ mandatory_files: {
5813
+ path: string;
5814
+ estimated_tokens: number;
5815
+ }[];
5816
+ } | undefined;
4999
5817
  captureFailure?: {
5000
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
5818
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
5001
5819
  message: string;
5002
5820
  causeCode?: string | undefined;
5003
5821
  bufferBudgetBytes?: number | undefined;
5004
5822
  stream?: "stderr" | "stdout" | undefined;
5005
5823
  drain?: "truncated" | undefined;
5824
+ requiredBytes?: number | undefined;
5825
+ availableBytes?: number | undefined;
5826
+ signal?: string | undefined;
5827
+ stallMs?: number | undefined;
5006
5828
  cleanup?: {
5007
5829
  code: string | null;
5008
5830
  message: string;
5009
5831
  } | undefined;
5832
+ inventory?: {
5833
+ exact: false;
5834
+ changedFiles: number;
5835
+ largest: {
5836
+ path: string;
5837
+ change: "added" | "deleted" | "modified" | "type_changed";
5838
+ sizeBytes: number | null;
5839
+ }[];
5840
+ } | undefined;
5010
5841
  } | undefined;
5011
5842
  phase: string;
5012
5843
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
5013
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
5844
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
5014
5845
  harnessId: string | null;
5015
5846
  attemptId: string | null;
5016
5847
  safeMessage: string;
@@ -5019,6 +5850,12 @@ export declare const ControlRunDetail: z.ZodObject<{
5019
5850
  eventRefs: string[];
5020
5851
  runDir: string | null;
5021
5852
  resetsAt: string | null;
5853
+ quotaRefusal?: {
5854
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
5855
+ constraintId: string | null;
5856
+ usedRatio: number | null;
5857
+ threshold: number | null;
5858
+ } | undefined;
5022
5859
  vendorFailure: {
5023
5860
  code: string | null;
5024
5861
  message: string | null;
@@ -5063,21 +5900,45 @@ export declare const ControlRunDetail: z.ZodObject<{
5063
5900
  source: "grok_init";
5064
5901
  reported_source: string;
5065
5902
  } | undefined;
5903
+ rawContextShortfall?: {
5904
+ model: string;
5905
+ context_window: number;
5906
+ packet_tokens: number;
5907
+ framing_tokens: number;
5908
+ output_allowance_tokens: number;
5909
+ mandatory_files: {
5910
+ path: string;
5911
+ estimated_tokens: number;
5912
+ }[];
5913
+ } | undefined;
5066
5914
  captureFailure?: {
5067
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
5915
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
5068
5916
  message: string;
5069
5917
  causeCode?: string | undefined;
5070
5918
  bufferBudgetBytes?: number | undefined;
5071
5919
  stream?: "stderr" | "stdout" | undefined;
5072
5920
  drain?: "truncated" | undefined;
5921
+ requiredBytes?: number | undefined;
5922
+ availableBytes?: number | undefined;
5923
+ signal?: string | undefined;
5924
+ stallMs?: number | undefined;
5073
5925
  cleanup?: {
5074
5926
  code: string | null;
5075
5927
  message: string;
5076
5928
  } | undefined;
5929
+ inventory?: {
5930
+ exact: false;
5931
+ changedFiles: number;
5932
+ largest: {
5933
+ path: string;
5934
+ change: "added" | "deleted" | "modified" | "type_changed";
5935
+ sizeBytes: number | null;
5936
+ }[];
5937
+ } | undefined;
5077
5938
  } | undefined;
5078
5939
  phase?: string | undefined;
5079
5940
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
5080
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
5941
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
5081
5942
  harnessId?: string | null | undefined;
5082
5943
  attemptId?: string | null | undefined;
5083
5944
  safeMessage: string;
@@ -5086,6 +5947,12 @@ export declare const ControlRunDetail: z.ZodObject<{
5086
5947
  eventRefs?: string[] | undefined;
5087
5948
  runDir?: string | null | undefined;
5088
5949
  resetsAt?: string | null | undefined;
5950
+ quotaRefusal?: {
5951
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
5952
+ constraintId: string | null;
5953
+ usedRatio: number | null;
5954
+ threshold: number | null;
5955
+ } | undefined;
5089
5956
  vendorFailure?: {
5090
5957
  code: string | null;
5091
5958
  message: string | null;
@@ -5204,6 +6071,7 @@ export declare const ControlRunDetail: z.ZodObject<{
5204
6071
  modelMismatch: boolean | null;
5205
6072
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
5206
6073
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
6074
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
5207
6075
  }[] | undefined;
5208
6076
  retainedEnvelope: {
5209
6077
  root: string;
@@ -5236,21 +6104,45 @@ export declare const ControlRunDetail: z.ZodObject<{
5236
6104
  source: "grok_init";
5237
6105
  reported_source: string;
5238
6106
  } | undefined;
6107
+ rawContextShortfall?: {
6108
+ model: string;
6109
+ context_window: number;
6110
+ packet_tokens: number;
6111
+ framing_tokens: number;
6112
+ output_allowance_tokens: number;
6113
+ mandatory_files: {
6114
+ path: string;
6115
+ estimated_tokens: number;
6116
+ }[];
6117
+ } | undefined;
5239
6118
  captureFailure?: {
5240
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
6119
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
5241
6120
  message: string;
5242
6121
  causeCode?: string | undefined;
5243
6122
  bufferBudgetBytes?: number | undefined;
5244
6123
  stream?: "stderr" | "stdout" | undefined;
5245
6124
  drain?: "truncated" | undefined;
6125
+ requiredBytes?: number | undefined;
6126
+ availableBytes?: number | undefined;
6127
+ signal?: string | undefined;
6128
+ stallMs?: number | undefined;
5246
6129
  cleanup?: {
5247
6130
  code: string | null;
5248
6131
  message: string;
5249
6132
  } | undefined;
6133
+ inventory?: {
6134
+ exact: false;
6135
+ changedFiles: number;
6136
+ largest: {
6137
+ path: string;
6138
+ change: "added" | "deleted" | "modified" | "type_changed";
6139
+ sizeBytes: number | null;
6140
+ }[];
6141
+ } | undefined;
5250
6142
  } | undefined;
5251
6143
  phase: string;
5252
6144
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
5253
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
6145
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
5254
6146
  harnessId: string | null;
5255
6147
  attemptId: string | null;
5256
6148
  safeMessage: string;
@@ -5259,6 +6151,12 @@ export declare const ControlRunDetail: z.ZodObject<{
5259
6151
  eventRefs: string[];
5260
6152
  runDir: string | null;
5261
6153
  resetsAt: string | null;
6154
+ quotaRefusal?: {
6155
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
6156
+ constraintId: string | null;
6157
+ usedRatio: number | null;
6158
+ threshold: number | null;
6159
+ } | undefined;
5262
6160
  vendorFailure: {
5263
6161
  code: string | null;
5264
6162
  message: string | null;
@@ -5392,7 +6290,7 @@ export declare const ControlRunDetail: z.ZodObject<{
5392
6290
  checks: "failed" | "not_configured" | "passed";
5393
6291
  review: "approved" | "blocked" | "not_run";
5394
6292
  review_requested?: boolean | undefined;
5395
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
6293
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
5396
6294
  work_state?: {
5397
6295
  state: "completed" | "incomplete" | "needs_input" | "unverified";
5398
6296
  source: "absent" | "constrained" | "validated";
@@ -5432,6 +6330,22 @@ export declare const ControlRunDetail: z.ZodObject<{
5432
6330
  eligible: boolean;
5433
6331
  }[];
5434
6332
  } | null;
6333
+ rawContext: {
6334
+ model: string;
6335
+ estimated_request_tokens: number;
6336
+ budget: {
6337
+ estimator: "chars_div_4";
6338
+ basis: "assumed_ceiling" | "model_context_window";
6339
+ model: string | null;
6340
+ context_window: number | null;
6341
+ output_allowance_tokens: number | null;
6342
+ framing_tokens: number | null;
6343
+ selection_limit_tokens: number;
6344
+ estimated_packet_tokens: number;
6345
+ omitted_for_budget: number;
6346
+ mandatory_paths: string[];
6347
+ };
6348
+ } | null;
5435
6349
  tests?: {
5436
6350
  program: string;
5437
6351
  args: string[];
@@ -5514,6 +6428,7 @@ export declare const ControlRunDetail: z.ZodObject<{
5514
6428
  modelMismatch: boolean | null;
5515
6429
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
5516
6430
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
6431
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
5517
6432
  }[] | undefined;
5518
6433
  retainedEnvelope: {
5519
6434
  root: string;
@@ -5546,21 +6461,45 @@ export declare const ControlRunDetail: z.ZodObject<{
5546
6461
  source: "grok_init";
5547
6462
  reported_source: string;
5548
6463
  } | undefined;
6464
+ rawContextShortfall?: {
6465
+ model: string;
6466
+ context_window: number;
6467
+ packet_tokens: number;
6468
+ framing_tokens: number;
6469
+ output_allowance_tokens: number;
6470
+ mandatory_files: {
6471
+ path: string;
6472
+ estimated_tokens: number;
6473
+ }[];
6474
+ } | undefined;
5549
6475
  captureFailure?: {
5550
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
6476
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
5551
6477
  message: string;
5552
6478
  causeCode?: string | undefined;
5553
6479
  bufferBudgetBytes?: number | undefined;
5554
6480
  stream?: "stderr" | "stdout" | undefined;
5555
6481
  drain?: "truncated" | undefined;
6482
+ requiredBytes?: number | undefined;
6483
+ availableBytes?: number | undefined;
6484
+ signal?: string | undefined;
6485
+ stallMs?: number | undefined;
5556
6486
  cleanup?: {
5557
6487
  code: string | null;
5558
6488
  message: string;
5559
6489
  } | undefined;
6490
+ inventory?: {
6491
+ exact: false;
6492
+ changedFiles: number;
6493
+ largest: {
6494
+ path: string;
6495
+ change: "added" | "deleted" | "modified" | "type_changed";
6496
+ sizeBytes: number | null;
6497
+ }[];
6498
+ } | undefined;
5560
6499
  } | undefined;
5561
6500
  phase: string;
5562
6501
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
5563
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
6502
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
5564
6503
  harnessId: string | null;
5565
6504
  attemptId: string | null;
5566
6505
  safeMessage: string;
@@ -5569,6 +6508,12 @@ export declare const ControlRunDetail: z.ZodObject<{
5569
6508
  eventRefs: string[];
5570
6509
  runDir: string | null;
5571
6510
  resetsAt: string | null;
6511
+ quotaRefusal?: {
6512
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
6513
+ constraintId: string | null;
6514
+ usedRatio: number | null;
6515
+ threshold: number | null;
6516
+ } | undefined;
5572
6517
  vendorFailure: {
5573
6518
  code: string | null;
5574
6519
  message: string | null;
@@ -5702,7 +6647,7 @@ export declare const ControlRunDetail: z.ZodObject<{
5702
6647
  checks: "failed" | "not_configured" | "passed";
5703
6648
  review: "approved" | "blocked" | "not_run";
5704
6649
  review_requested?: boolean | undefined;
5705
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
6650
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
5706
6651
  work_state?: {
5707
6652
  state: "completed" | "incomplete" | "needs_input" | "unverified";
5708
6653
  source: "absent" | "constrained" | "validated";
@@ -5742,6 +6687,22 @@ export declare const ControlRunDetail: z.ZodObject<{
5742
6687
  eligible: boolean;
5743
6688
  }[];
5744
6689
  } | null;
6690
+ rawContext: {
6691
+ model: string;
6692
+ estimated_request_tokens: number;
6693
+ budget: {
6694
+ estimator: "chars_div_4";
6695
+ basis: "assumed_ceiling" | "model_context_window";
6696
+ model: string | null;
6697
+ context_window: number | null;
6698
+ output_allowance_tokens: number | null;
6699
+ framing_tokens: number | null;
6700
+ selection_limit_tokens: number;
6701
+ estimated_packet_tokens: number;
6702
+ omitted_for_budget: number;
6703
+ mandatory_paths: string[];
6704
+ };
6705
+ } | null;
5745
6706
  tests?: {
5746
6707
  program: string;
5747
6708
  args: string[];
@@ -5763,7 +6724,7 @@ export declare const ControlRunDetail: z.ZodObject<{
5763
6724
  checks: "failed" | "not_configured" | "passed";
5764
6725
  review: "approved" | "blocked" | "not_run";
5765
6726
  review_requested?: boolean | undefined;
5766
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
6727
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
5767
6728
  work_state?: {
5768
6729
  state: "completed" | "incomplete" | "needs_input" | "unverified";
5769
6730
  source: "absent" | "constrained" | "validated";
@@ -5852,6 +6813,9 @@ export declare const ControlRunDetail: z.ZodObject<{
5852
6813
  detail: string | null;
5853
6814
  textKind: "message" | "thinking" | null;
5854
6815
  textDelta: boolean;
6816
+ speechKey: string | null;
6817
+ speechOp: "abandoned" | "complete" | "fragment" | null;
6818
+ textFinal: boolean;
5855
6819
  severity: "error" | "info" | "warning";
5856
6820
  toolName: string | null;
5857
6821
  target: string | null;
@@ -5885,7 +6849,7 @@ export declare const ControlRunDetail: z.ZodObject<{
5885
6849
  checks: "failed" | "not_configured" | "passed";
5886
6850
  review: "approved" | "blocked" | "not_run";
5887
6851
  review_requested?: boolean | undefined;
5888
- reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
6852
+ reason: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null;
5889
6853
  work_state?: {
5890
6854
  state: "completed" | "incomplete" | "needs_input" | "unverified";
5891
6855
  source: "absent" | "constrained" | "validated";
@@ -6089,21 +7053,45 @@ export declare const ControlRunDetail: z.ZodObject<{
6089
7053
  source: "grok_init";
6090
7054
  reported_source: string;
6091
7055
  } | undefined;
7056
+ rawContextShortfall?: {
7057
+ model: string;
7058
+ context_window: number;
7059
+ packet_tokens: number;
7060
+ framing_tokens: number;
7061
+ output_allowance_tokens: number;
7062
+ mandatory_files: {
7063
+ path: string;
7064
+ estimated_tokens: number;
7065
+ }[];
7066
+ } | undefined;
6092
7067
  captureFailure?: {
6093
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
7068
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
6094
7069
  message: string;
6095
7070
  causeCode?: string | undefined;
6096
7071
  bufferBudgetBytes?: number | undefined;
6097
7072
  stream?: "stderr" | "stdout" | undefined;
6098
7073
  drain?: "truncated" | undefined;
7074
+ requiredBytes?: number | undefined;
7075
+ availableBytes?: number | undefined;
7076
+ signal?: string | undefined;
7077
+ stallMs?: number | undefined;
6099
7078
  cleanup?: {
6100
7079
  code: string | null;
6101
7080
  message: string;
6102
7081
  } | undefined;
7082
+ inventory?: {
7083
+ exact: false;
7084
+ changedFiles: number;
7085
+ largest: {
7086
+ path: string;
7087
+ change: "added" | "deleted" | "modified" | "type_changed";
7088
+ sizeBytes: number | null;
7089
+ }[];
7090
+ } | undefined;
6103
7091
  } | undefined;
6104
7092
  phase: string;
6105
7093
  category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
6106
- code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
7094
+ code: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null;
6107
7095
  harnessId: string | null;
6108
7096
  attemptId: string | null;
6109
7097
  safeMessage: string;
@@ -6112,6 +7100,12 @@ export declare const ControlRunDetail: z.ZodObject<{
6112
7100
  eventRefs: string[];
6113
7101
  runDir: string | null;
6114
7102
  resetsAt: string | null;
7103
+ quotaRefusal?: {
7104
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
7105
+ constraintId: string | null;
7106
+ usedRatio: number | null;
7107
+ threshold: number | null;
7108
+ } | undefined;
6115
7109
  vendorFailure: {
6116
7110
  code: string | null;
6117
7111
  message: string | null;
@@ -6218,6 +7212,7 @@ export declare const ControlRunDetail: z.ZodObject<{
6218
7212
  modelMismatch: boolean | null;
6219
7213
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
6220
7214
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
7215
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
6221
7216
  }[] | undefined;
6222
7217
  retainedEnvelope?: {
6223
7218
  root: string;
@@ -6250,21 +7245,45 @@ export declare const ControlRunDetail: z.ZodObject<{
6250
7245
  source: "grok_init";
6251
7246
  reported_source: string;
6252
7247
  } | undefined;
7248
+ rawContextShortfall?: {
7249
+ model: string;
7250
+ context_window: number;
7251
+ packet_tokens: number;
7252
+ framing_tokens: number;
7253
+ output_allowance_tokens: number;
7254
+ mandatory_files: {
7255
+ path: string;
7256
+ estimated_tokens: number;
7257
+ }[];
7258
+ } | undefined;
6253
7259
  captureFailure?: {
6254
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
7260
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
6255
7261
  message: string;
6256
7262
  causeCode?: string | undefined;
6257
7263
  bufferBudgetBytes?: number | undefined;
6258
7264
  stream?: "stderr" | "stdout" | undefined;
6259
7265
  drain?: "truncated" | undefined;
7266
+ requiredBytes?: number | undefined;
7267
+ availableBytes?: number | undefined;
7268
+ signal?: string | undefined;
7269
+ stallMs?: number | undefined;
6260
7270
  cleanup?: {
6261
7271
  code: string | null;
6262
7272
  message: string;
6263
7273
  } | undefined;
7274
+ inventory?: {
7275
+ exact: false;
7276
+ changedFiles: number;
7277
+ largest: {
7278
+ path: string;
7279
+ change: "added" | "deleted" | "modified" | "type_changed";
7280
+ sizeBytes: number | null;
7281
+ }[];
7282
+ } | undefined;
6264
7283
  } | undefined;
6265
7284
  phase?: string | undefined;
6266
7285
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
6267
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
7286
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
6268
7287
  harnessId?: string | null | undefined;
6269
7288
  attemptId?: string | null | undefined;
6270
7289
  safeMessage: string;
@@ -6273,6 +7292,12 @@ export declare const ControlRunDetail: z.ZodObject<{
6273
7292
  eventRefs?: string[] | undefined;
6274
7293
  runDir?: string | null | undefined;
6275
7294
  resetsAt?: string | null | undefined;
7295
+ quotaRefusal?: {
7296
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
7297
+ constraintId: string | null;
7298
+ usedRatio: number | null;
7299
+ threshold: number | null;
7300
+ } | undefined;
6276
7301
  vendorFailure?: {
6277
7302
  code: string | null;
6278
7303
  message: string | null;
@@ -6406,7 +7431,7 @@ export declare const ControlRunDetail: z.ZodObject<{
6406
7431
  checks?: "failed" | "not_configured" | "passed" | undefined;
6407
7432
  review?: "approved" | "blocked" | "not_run" | undefined;
6408
7433
  review_requested?: boolean | undefined;
6409
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
7434
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
6410
7435
  work_state?: {
6411
7436
  state: "completed" | "incomplete" | "needs_input" | "unverified";
6412
7437
  source: "absent" | "constrained" | "validated";
@@ -6446,6 +7471,22 @@ export declare const ControlRunDetail: z.ZodObject<{
6446
7471
  eligible: boolean;
6447
7472
  }[] | undefined;
6448
7473
  } | null | undefined;
7474
+ rawContext?: {
7475
+ model: string;
7476
+ estimated_request_tokens: number;
7477
+ budget: {
7478
+ estimator: "chars_div_4";
7479
+ basis: "assumed_ceiling" | "model_context_window";
7480
+ model: string | null;
7481
+ context_window: number | null;
7482
+ output_allowance_tokens: number | null;
7483
+ framing_tokens: number | null;
7484
+ selection_limit_tokens: number;
7485
+ estimated_packet_tokens: number;
7486
+ omitted_for_budget: number;
7487
+ mandatory_paths: string[];
7488
+ };
7489
+ } | null | undefined;
6449
7490
  tests?: {
6450
7491
  program: string;
6451
7492
  args?: string[] | undefined;
@@ -6528,6 +7569,7 @@ export declare const ControlRunDetail: z.ZodObject<{
6528
7569
  modelMismatch: boolean | null;
6529
7570
  identityCheck: "matched_before_effects" | "mismatch_after_possible_effects" | "mismatch_before_effects" | "not_applicable";
6530
7571
  inputDelivery: "confirmed" | "not_applicable" | "uncertain";
7572
+ sourceRetirement?: "not_confirmed" | "retired" | undefined;
6531
7573
  }[] | undefined;
6532
7574
  retainedEnvelope?: {
6533
7575
  root: string;
@@ -6560,21 +7602,45 @@ export declare const ControlRunDetail: z.ZodObject<{
6560
7602
  source: "grok_init";
6561
7603
  reported_source: string;
6562
7604
  } | undefined;
7605
+ rawContextShortfall?: {
7606
+ model: string;
7607
+ context_window: number;
7608
+ packet_tokens: number;
7609
+ framing_tokens: number;
7610
+ output_allowance_tokens: number;
7611
+ mandatory_files: {
7612
+ path: string;
7613
+ estimated_tokens: number;
7614
+ }[];
7615
+ } | undefined;
6563
7616
  captureFailure?: {
6564
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
7617
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
6565
7618
  message: string;
6566
7619
  causeCode?: string | undefined;
6567
7620
  bufferBudgetBytes?: number | undefined;
6568
7621
  stream?: "stderr" | "stdout" | undefined;
6569
7622
  drain?: "truncated" | undefined;
7623
+ requiredBytes?: number | undefined;
7624
+ availableBytes?: number | undefined;
7625
+ signal?: string | undefined;
7626
+ stallMs?: number | undefined;
6570
7627
  cleanup?: {
6571
7628
  code: string | null;
6572
7629
  message: string;
6573
7630
  } | undefined;
7631
+ inventory?: {
7632
+ exact: false;
7633
+ changedFiles: number;
7634
+ largest: {
7635
+ path: string;
7636
+ change: "added" | "deleted" | "modified" | "type_changed";
7637
+ sizeBytes: number | null;
7638
+ }[];
7639
+ } | undefined;
6574
7640
  } | undefined;
6575
7641
  phase?: string | undefined;
6576
7642
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
6577
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
7643
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
6578
7644
  harnessId?: string | null | undefined;
6579
7645
  attemptId?: string | null | undefined;
6580
7646
  safeMessage: string;
@@ -6583,6 +7649,12 @@ export declare const ControlRunDetail: z.ZodObject<{
6583
7649
  eventRefs?: string[] | undefined;
6584
7650
  runDir?: string | null | undefined;
6585
7651
  resetsAt?: string | null | undefined;
7652
+ quotaRefusal?: {
7653
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
7654
+ constraintId: string | null;
7655
+ usedRatio: number | null;
7656
+ threshold: number | null;
7657
+ } | undefined;
6586
7658
  vendorFailure?: {
6587
7659
  code: string | null;
6588
7660
  message: string | null;
@@ -6716,7 +7788,7 @@ export declare const ControlRunDetail: z.ZodObject<{
6716
7788
  checks?: "failed" | "not_configured" | "passed" | undefined;
6717
7789
  review?: "approved" | "blocked" | "not_run" | undefined;
6718
7790
  review_requested?: boolean | undefined;
6719
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
7791
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
6720
7792
  work_state?: {
6721
7793
  state: "completed" | "incomplete" | "needs_input" | "unverified";
6722
7794
  source: "absent" | "constrained" | "validated";
@@ -6756,6 +7828,22 @@ export declare const ControlRunDetail: z.ZodObject<{
6756
7828
  eligible: boolean;
6757
7829
  }[] | undefined;
6758
7830
  } | null | undefined;
7831
+ rawContext?: {
7832
+ model: string;
7833
+ estimated_request_tokens: number;
7834
+ budget: {
7835
+ estimator: "chars_div_4";
7836
+ basis: "assumed_ceiling" | "model_context_window";
7837
+ model: string | null;
7838
+ context_window: number | null;
7839
+ output_allowance_tokens: number | null;
7840
+ framing_tokens: number | null;
7841
+ selection_limit_tokens: number;
7842
+ estimated_packet_tokens: number;
7843
+ omitted_for_budget: number;
7844
+ mandatory_paths: string[];
7845
+ };
7846
+ } | null | undefined;
6759
7847
  tests?: {
6760
7848
  program: string;
6761
7849
  args?: string[] | undefined;
@@ -6777,7 +7865,7 @@ export declare const ControlRunDetail: z.ZodObject<{
6777
7865
  checks?: "failed" | "not_configured" | "passed" | undefined;
6778
7866
  review?: "approved" | "blocked" | "not_run" | undefined;
6779
7867
  review_requested?: boolean | undefined;
6780
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
7868
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
6781
7869
  work_state?: {
6782
7870
  state: "completed" | "incomplete" | "needs_input" | "unverified";
6783
7871
  source: "absent" | "constrained" | "validated";
@@ -6866,6 +7954,9 @@ export declare const ControlRunDetail: z.ZodObject<{
6866
7954
  detail?: string | null | undefined;
6867
7955
  textKind?: "message" | "thinking" | null | undefined;
6868
7956
  textDelta?: boolean | undefined;
7957
+ speechKey?: string | null | undefined;
7958
+ speechOp?: "abandoned" | "complete" | "fragment" | null | undefined;
7959
+ textFinal?: boolean | undefined;
6869
7960
  severity?: "error" | "info" | "warning" | undefined;
6870
7961
  toolName?: string | null | undefined;
6871
7962
  target?: string | null | undefined;
@@ -6899,7 +7990,7 @@ export declare const ControlRunDetail: z.ZodObject<{
6899
7990
  checks?: "failed" | "not_configured" | "passed" | undefined;
6900
7991
  review?: "approved" | "blocked" | "not_run" | undefined;
6901
7992
  review_requested?: boolean | undefined;
6902
- reason?: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
7993
+ reason?: "budget_exhausted" | "budget_overshoot" | "capture_refused" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null | undefined;
6903
7994
  work_state?: {
6904
7995
  state: "completed" | "incomplete" | "needs_input" | "unverified";
6905
7996
  source: "absent" | "constrained" | "validated";
@@ -7103,21 +8194,45 @@ export declare const ControlRunDetail: z.ZodObject<{
7103
8194
  source: "grok_init";
7104
8195
  reported_source: string;
7105
8196
  } | undefined;
8197
+ rawContextShortfall?: {
8198
+ model: string;
8199
+ context_window: number;
8200
+ packet_tokens: number;
8201
+ framing_tokens: number;
8202
+ output_allowance_tokens: number;
8203
+ mandatory_files: {
8204
+ path: string;
8205
+ estimated_tokens: number;
8206
+ }[];
8207
+ } | undefined;
7106
8208
  captureFailure?: {
7107
- code: "capture_failed" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated";
8209
+ code: "capture_failed" | "capture_git_signal" | "capture_git_stalled" | "capture_object_missing" | "capture_output_exceeded" | "capture_output_incomplete" | "capture_preview_truncated" | "capture_read_failed" | "capture_space_insufficient";
7108
8210
  message: string;
7109
8211
  causeCode?: string | undefined;
7110
8212
  bufferBudgetBytes?: number | undefined;
7111
8213
  stream?: "stderr" | "stdout" | undefined;
7112
8214
  drain?: "truncated" | undefined;
8215
+ requiredBytes?: number | undefined;
8216
+ availableBytes?: number | undefined;
8217
+ signal?: string | undefined;
8218
+ stallMs?: number | undefined;
7113
8219
  cleanup?: {
7114
8220
  code: string | null;
7115
8221
  message: string;
7116
8222
  } | undefined;
8223
+ inventory?: {
8224
+ exact: false;
8225
+ changedFiles: number;
8226
+ largest: {
8227
+ path: string;
8228
+ change: "added" | "deleted" | "modified" | "type_changed";
8229
+ sizeBytes: number | null;
8230
+ }[];
8231
+ } | undefined;
7117
8232
  } | undefined;
7118
8233
  phase?: string | undefined;
7119
8234
  category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
7120
- code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
8235
+ code?: "access_profile_incompatible" | "auxiliary_writable_roots_unsupported" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "credential_source_unconfirmed" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "input_too_large" | "model_catalog_unavailable" | "raw_context_exceeds_window" | "raw_context_mandatory_unavailable" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | "vendor_cli_too_old" | null | undefined;
7121
8236
  harnessId?: string | null | undefined;
7122
8237
  attemptId?: string | null | undefined;
7123
8238
  safeMessage: string;
@@ -7126,6 +8241,12 @@ export declare const ControlRunDetail: z.ZodObject<{
7126
8241
  eventRefs?: string[] | undefined;
7127
8242
  runDir?: string | null | undefined;
7128
8243
  resetsAt?: string | null | undefined;
8244
+ quotaRefusal?: {
8245
+ basis: "owner_reserve" | "provider_cooldown" | "provider_window";
8246
+ constraintId: string | null;
8247
+ usedRatio: number | null;
8248
+ threshold: number | null;
8249
+ } | undefined;
7129
8250
  vendorFailure?: {
7130
8251
  code: string | null;
7131
8252
  message: string | null;