@farmslot/protocol 0.21.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/dist/contracts/agents.d.ts +33 -0
  3. package/dist/contracts/agents.d.ts.map +1 -1
  4. package/dist/contracts/backlog.d.ts +8 -0
  5. package/dist/contracts/backlog.d.ts.map +1 -1
  6. package/dist/contracts/backlog.js.map +1 -1
  7. package/dist/contracts/device-inventory.d.ts +118 -0
  8. package/dist/contracts/device-inventory.d.ts.map +1 -0
  9. package/dist/contracts/device-inventory.js +51 -0
  10. package/dist/contracts/device-inventory.js.map +1 -0
  11. package/dist/contracts/dispatch.d.ts +4 -0
  12. package/dist/contracts/dispatch.d.ts.map +1 -1
  13. package/dist/contracts/execution-templates.d.ts +16 -0
  14. package/dist/contracts/execution-templates.d.ts.map +1 -1
  15. package/dist/contracts/execution-templates.js +6 -0
  16. package/dist/contracts/execution-templates.js.map +1 -1
  17. package/dist/contracts/gate-park.d.ts +284 -0
  18. package/dist/contracts/gate-park.d.ts.map +1 -0
  19. package/dist/contracts/gate-park.js +415 -0
  20. package/dist/contracts/gate-park.js.map +1 -0
  21. package/dist/contracts/index.d.ts +8 -0
  22. package/dist/contracts/index.d.ts.map +1 -1
  23. package/dist/contracts/index.js +8 -0
  24. package/dist/contracts/index.js.map +1 -1
  25. package/dist/contracts/pr-monitoring.d.ts +167 -0
  26. package/dist/contracts/pr-monitoring.d.ts.map +1 -0
  27. package/dist/contracts/pr-monitoring.js +2 -0
  28. package/dist/contracts/pr-monitoring.js.map +1 -0
  29. package/dist/contracts/pr-rules.d.ts +350 -0
  30. package/dist/contracts/pr-rules.d.ts.map +1 -0
  31. package/dist/contracts/pr-rules.js +6 -0
  32. package/dist/contracts/pr-rules.js.map +1 -0
  33. package/dist/contracts/pressure-admission.d.ts +175 -0
  34. package/dist/contracts/pressure-admission.d.ts.map +1 -0
  35. package/dist/contracts/pressure-admission.js +26 -0
  36. package/dist/contracts/pressure-admission.js.map +1 -0
  37. package/dist/contracts/readiness.d.ts +37 -0
  38. package/dist/contracts/readiness.d.ts.map +1 -0
  39. package/dist/contracts/readiness.js +8 -0
  40. package/dist/contracts/readiness.js.map +1 -0
  41. package/dist/contracts/resource-posture.d.ts +379 -0
  42. package/dist/contracts/resource-posture.d.ts.map +1 -0
  43. package/dist/contracts/resource-posture.js +293 -0
  44. package/dist/contracts/resource-posture.js.map +1 -0
  45. package/dist/contracts/resources.d.ts +27 -1
  46. package/dist/contracts/resources.d.ts.map +1 -1
  47. package/dist/contracts/resources.js +1 -1
  48. package/dist/contracts/resources.js.map +1 -1
  49. package/dist/contracts/reviews.d.ts +3 -0
  50. package/dist/contracts/reviews.d.ts.map +1 -1
  51. package/dist/contracts/reviews.js.map +1 -1
  52. package/dist/contracts/runs.d.ts +501 -12
  53. package/dist/contracts/runs.d.ts.map +1 -1
  54. package/dist/contracts/runs.js +148 -5
  55. package/dist/contracts/runs.js.map +1 -1
  56. package/dist/contracts/runtime-capabilities.d.ts +255 -3
  57. package/dist/contracts/runtime-capabilities.d.ts.map +1 -1
  58. package/dist/contracts/runtime-capabilities.js +113 -1
  59. package/dist/contracts/runtime-capabilities.js.map +1 -1
  60. package/dist/contracts/slots.d.ts +53 -1
  61. package/dist/contracts/slots.d.ts.map +1 -1
  62. package/dist/contracts/template-placeholders.d.ts +16 -0
  63. package/dist/contracts/template-placeholders.d.ts.map +1 -0
  64. package/dist/contracts/template-placeholders.js +39 -0
  65. package/dist/contracts/template-placeholders.js.map +1 -0
  66. package/dist/index.d.ts +6 -0
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +6 -0
  69. package/dist/index.js.map +1 -1
  70. package/dist/integrations/pr-monitoring.d.ts +13 -0
  71. package/dist/integrations/pr-monitoring.d.ts.map +1 -0
  72. package/dist/integrations/pr-monitoring.js +160 -0
  73. package/dist/integrations/pr-monitoring.js.map +1 -0
  74. package/dist/integrations/pr-project-import.d.ts +12 -0
  75. package/dist/integrations/pr-project-import.d.ts.map +1 -0
  76. package/dist/integrations/pr-project-import.js +279 -0
  77. package/dist/integrations/pr-project-import.js.map +1 -0
  78. package/dist/integrations/pr-review-requirements.d.ts +4 -0
  79. package/dist/integrations/pr-review-requirements.d.ts.map +1 -0
  80. package/dist/integrations/pr-review-requirements.js +21 -0
  81. package/dist/integrations/pr-review-requirements.js.map +1 -0
  82. package/dist/integrations/pr-rule-config.d.ts +6 -0
  83. package/dist/integrations/pr-rule-config.d.ts.map +1 -0
  84. package/dist/integrations/pr-rule-config.js +217 -0
  85. package/dist/integrations/pr-rule-config.js.map +1 -0
  86. package/dist/integrations/pr-rule-predicates.d.ts +9 -0
  87. package/dist/integrations/pr-rule-predicates.d.ts.map +1 -0
  88. package/dist/integrations/pr-rule-predicates.js +223 -0
  89. package/dist/integrations/pr-rule-predicates.js.map +1 -0
  90. package/dist/recipes/step-io.d.ts +10 -1
  91. package/dist/recipes/step-io.d.ts.map +1 -1
  92. package/dist/rpc/backlog.d.ts +2 -2
  93. package/dist/rpc/backlog.d.ts.map +1 -1
  94. package/dist/rpc/backlog.js +2 -1
  95. package/dist/rpc/backlog.js.map +1 -1
  96. package/dist/rpc/config.d.ts +22 -2
  97. package/dist/rpc/config.d.ts.map +1 -1
  98. package/dist/rpc/config.js +1 -0
  99. package/dist/rpc/config.js.map +1 -1
  100. package/dist/rpc/copilot-runtime.d.ts +17 -0
  101. package/dist/rpc/copilot-runtime.d.ts.map +1 -1
  102. package/dist/rpc/copilot-runtime.js +5 -0
  103. package/dist/rpc/copilot-runtime.js.map +1 -1
  104. package/dist/rpc/dispatch.d.ts +39 -1
  105. package/dist/rpc/dispatch.d.ts.map +1 -1
  106. package/dist/rpc/dispatch.js +2 -0
  107. package/dist/rpc/dispatch.js.map +1 -1
  108. package/dist/rpc/git.d.ts +35 -0
  109. package/dist/rpc/git.d.ts.map +1 -1
  110. package/dist/rpc/index.d.ts +7 -0
  111. package/dist/rpc/index.d.ts.map +1 -1
  112. package/dist/rpc/index.js +7 -0
  113. package/dist/rpc/index.js.map +1 -1
  114. package/dist/rpc/machine-pause.d.ts +158 -0
  115. package/dist/rpc/machine-pause.d.ts.map +1 -0
  116. package/dist/rpc/machine-pause.js +8 -0
  117. package/dist/rpc/machine-pause.js.map +1 -0
  118. package/dist/rpc/native-session.d.ts +193 -0
  119. package/dist/rpc/native-session.d.ts.map +1 -0
  120. package/dist/rpc/native-session.js +2 -0
  121. package/dist/rpc/native-session.js.map +1 -0
  122. package/dist/rpc/pr-push.d.ts +56 -0
  123. package/dist/rpc/pr-push.d.ts.map +1 -0
  124. package/dist/rpc/pr-push.js +2 -0
  125. package/dist/rpc/pr-push.js.map +1 -0
  126. package/dist/rpc/pr-rules.d.ts +72 -0
  127. package/dist/rpc/pr-rules.d.ts.map +1 -0
  128. package/dist/rpc/pr-rules.js +2 -0
  129. package/dist/rpc/pr-rules.js.map +1 -0
  130. package/dist/rpc/pr-watch.d.ts +43 -0
  131. package/dist/rpc/pr-watch.d.ts.map +1 -0
  132. package/dist/rpc/pr-watch.js +2 -0
  133. package/dist/rpc/pr-watch.js.map +1 -0
  134. package/dist/rpc/registry.d.ts +56 -0
  135. package/dist/rpc/registry.d.ts.map +1 -1
  136. package/dist/rpc/registry.js +57 -0
  137. package/dist/rpc/registry.js.map +1 -1
  138. package/dist/rpc/resource-posture.d.ts +36 -0
  139. package/dist/rpc/resource-posture.d.ts.map +1 -0
  140. package/dist/rpc/resource-posture.js +7 -0
  141. package/dist/rpc/resource-posture.js.map +1 -0
  142. package/dist/rpc/resource-pressure-selection.d.ts +4 -0
  143. package/dist/rpc/resource-pressure-selection.d.ts.map +1 -0
  144. package/dist/rpc/resource-pressure-selection.js +21 -0
  145. package/dist/rpc/resource-pressure-selection.js.map +1 -0
  146. package/dist/rpc/resources.d.ts +176 -1
  147. package/dist/rpc/resources.d.ts.map +1 -1
  148. package/dist/rpc/resources.js +6 -0
  149. package/dist/rpc/resources.js.map +1 -1
  150. package/dist/rpc/roadmap.d.ts +1 -1
  151. package/dist/rpc/roadmap.d.ts.map +1 -1
  152. package/dist/rpc/roadmap.js +2 -1
  153. package/dist/rpc/roadmap.js.map +1 -1
  154. package/dist/rpc/run.d.ts +122 -5
  155. package/dist/rpc/run.d.ts.map +1 -1
  156. package/dist/rpc/run.js +1 -0
  157. package/dist/rpc/run.js.map +1 -1
  158. package/dist/rpc/runtime-capabilities.d.ts +73 -3
  159. package/dist/rpc/runtime-capabilities.d.ts.map +1 -1
  160. package/dist/rpc/runtime-capabilities.js +11 -0
  161. package/dist/rpc/runtime-capabilities.js.map +1 -1
  162. package/dist/rpc/slot.d.ts +9 -1
  163. package/dist/rpc/slot.d.ts.map +1 -1
  164. package/dist/rpc/slot.js.map +1 -1
  165. package/dist/rpc/tmux.d.ts +4 -0
  166. package/dist/rpc/tmux.d.ts.map +1 -1
  167. package/dist/rpc/worker-session-history.d.ts +1 -1
  168. package/dist/rpc/worker-session-history.d.ts.map +1 -1
  169. package/dist/runs/decision-resolution.d.ts +7 -0
  170. package/dist/runs/decision-resolution.d.ts.map +1 -1
  171. package/dist/runs/decision-resolution.js +1 -0
  172. package/dist/runs/decision-resolution.js.map +1 -1
  173. package/dist/runs/interactive-handoff.d.ts +14 -0
  174. package/dist/runs/interactive-handoff.d.ts.map +1 -0
  175. package/dist/runs/interactive-handoff.js +69 -0
  176. package/dist/runs/interactive-handoff.js.map +1 -0
  177. package/dist/runs/portable-bundle.d.ts +2 -0
  178. package/dist/runs/portable-bundle.d.ts.map +1 -1
  179. package/dist/runs/portable-bundle.js +14 -1
  180. package/dist/runs/portable-bundle.js.map +1 -1
  181. package/dist/runs/review-chain.d.ts +3 -2
  182. package/dist/runs/review-chain.d.ts.map +1 -1
  183. package/dist/runs/review-chain.js +4 -2
  184. package/dist/runs/review-chain.js.map +1 -1
  185. package/dist/slots/tracking-branch.d.ts +12 -0
  186. package/dist/slots/tracking-branch.d.ts.map +1 -1
  187. package/dist/slots/tracking-branch.js +12 -0
  188. package/dist/slots/tracking-branch.js.map +1 -1
  189. package/dist/transport/events.d.ts +19 -2
  190. package/dist/transport/events.d.ts.map +1 -1
  191. package/dist/transport/events.js +6 -0
  192. package/dist/transport/events.js.map +1 -1
  193. package/dist/transport/signal.d.ts +11 -0
  194. package/dist/transport/signal.d.ts.map +1 -1
  195. package/dist/transport/signal.js +19 -1
  196. package/dist/transport/signal.js.map +1 -1
  197. package/dist/version.d.ts +1 -1
  198. package/dist/version.js +1 -1
  199. package/package.json +6 -1
@@ -1,14 +1,18 @@
1
1
  import type { ArtifactRef, SelfReviewIssue } from '../recipes/step-io.js';
2
2
  import type { WorkerSignalChecklistEvent, WorkerSignalChecklistTiming } from '../transport/signal.js';
3
- import type { AgentContext, SafetyTier, ScriptedRunnerConfig } from './agents.js';
3
+ import type { AgentContext, AgentContextTarget, RunnerSessionArchiveRef, SafetyTier, ScriptedRunnerConfig } from './agents.js';
4
4
  import type { FailureCategory, RunRecoveryProposalConfidence } from './chat.js';
5
5
  import type { TaskTemplateSelection, TemplateProvenance } from './evals.js';
6
6
  import type { EvidenceQualityReport, RecipeQualityArtifact } from './recipes.js';
7
+ import type { ResourcePostureWaitPolicy, RunResourcePostureState } from './resource-posture.js';
8
+ import type { ResourceType } from './resources.js';
7
9
  import type { RunImportProvenance } from './run-bundles.js';
10
+ import type { RuntimeCapabilityProofRequirement } from './runtime-capabilities.js';
8
11
  import type { SlotHealth } from './slots.js';
9
12
  import type { ProfileFitSuggestion, ValidationPlanStep } from './validation-plan.js';
10
13
  export type RunStatus = 'created' | 'grading' | 'writing-task' | 'slot-finding' | 'preparing' | 'dispatching' | 'monitoring' | 'self-reviewing' | 'completing' | 'human-gating' | 'ci-watching' | 'paused' | 'done' | 'blocked' | 'failed' | 'cancelled';
11
14
  export declare const TERMINAL_RUN_STATUSES: readonly RunStatus[];
15
+ export declare const ACTIVE_RUN_STATUSES: readonly RunStatus[];
12
16
  export declare function isTerminalRunStatus(status: RunStatus): boolean;
13
17
  /**
14
18
  * Runs eligible for activate-on-slot re-bind (ADR-024 §7 addendum): terminal
@@ -89,12 +93,17 @@ export interface ReviewGatePayload {
89
93
  qualityReport?: EvidenceQualityReport | null;
90
94
  workerLearnings?: string;
91
95
  }
96
+ /** Review evidence retained independently of the decision to publish it. */
97
+ export type RunReviewResult = Pick<ReviewGatePayload, 'recommendation' | 'reviewMd' | 'lineComments' | 'reviewSnapshot' | 'artifactManifest' | 'reviewInputArtifactPaths'>;
92
98
  export type PublicationTarget = 'draft' | 'ready';
93
99
  export type PublicationStatus = 'not_published' | 'pending_publish' | 'published_draft' | 'published_ready' | 'publish_failed';
94
100
  export interface ReviewDepthPolicy {
95
101
  minimumIndependentReviews: number;
96
102
  requireCrossRunner: boolean;
103
+ /** Independent review loops required beyond `minimumIndependentReviews`. */
97
104
  extraLoopsRequested: number;
105
+ /** V2 counts the first configured loop in the minimum, not again as an extra. */
106
+ countingVersion?: 2;
98
107
  requestedBy: 'dispatch' | 'human-gate' | 'agent-gate';
99
108
  }
100
109
  /**
@@ -119,7 +128,7 @@ export declare function reviewValidationDepthForLoop(_index: number, _total: num
119
128
  export type ReviewSessionIntent = 'resume' | 'reset';
120
129
  /** What actually happened when the reviewer generation launched. */
121
130
  export type ReviewSessionContinuity = 'fresh' | 'resumed' | 'fallback-fresh' | 'resume-unconfirmed';
122
- export type ReviewSessionFallbackReason = 'unsupported-runner' | 'slot-mismatch' | 'runner-mismatch' | 'missing-session' | 'session-unavailable';
131
+ export type ReviewSessionFallbackReason = 'unsupported-runner' | 'slot-mismatch' | 'runner-mismatch' | 'model-mismatch' | 'missing-session' | 'session-unavailable';
123
132
  export interface ReviewSessionTrace {
124
133
  intent: ReviewSessionIntent;
125
134
  continuity: ReviewSessionContinuity;
@@ -259,6 +268,8 @@ export interface IndependentReviewAttempt {
259
268
  issues?: SelfReviewIssue[];
260
269
  validationDepth?: ReviewValidationDepth;
261
270
  usage?: RunnerSessionUsage;
271
+ /** Checklist marks and timings captured from this review round's role-scoped signal. */
272
+ checklistTiming?: WorkerSignalChecklistTiming;
262
273
  reviewSnapshot?: ReviewDiffSnapshot;
263
274
  fixDelta?: ReviewFixDeltaSnapshot;
264
275
  artifactPaths?: string[];
@@ -917,6 +928,11 @@ export interface RunMetrics {
917
928
  runner: string | null;
918
929
  runnerSessionId?: string | null;
919
930
  runnerSessionPath?: string | null;
931
+ /**
932
+ * Recycle snapshot of the primary runner transcript. Pointer only; the bytes
933
+ * live under `.runs/session-archives/`. Not eval evidence and not a farmrun payload.
934
+ */
935
+ runnerSessionArchive?: RunnerSessionArchiveRef;
920
936
  /**
921
937
  * Operator-local provider subscription label that actually funded this run
922
938
  * (after any in-place failover). Label only — never an email, token, or home path.
@@ -1050,23 +1066,62 @@ export interface RunMonitorBudgetUsageState {
1050
1066
  integrityFailureReason?: string;
1051
1067
  /** True while advancing past a record larger than the bounded read window. */
1052
1068
  skippingOversizedRecord?: boolean;
1069
+ /** Count of records skipped for exceeding the window (their usage is uncounted). */
1070
+ skippedOversizedRecords?: number;
1071
+ /**
1072
+ * Last session-total reading for runners that restate totals rather than reporting
1073
+ * per-record usage (codex). Zeros mean counting from the start of the transcript;
1074
+ * absent means counting started at a byte offset, so the next reading only sets the
1075
+ * reference.
1076
+ */
1077
+ lastCumulative?: {
1078
+ input: number;
1079
+ output: number;
1080
+ cacheRead: number;
1081
+ total: number;
1082
+ };
1083
+ /** Discard the next complete record: it is the previous writer's in-flight record. */
1084
+ discardNextRecord?: boolean;
1085
+ /** Filesystem identity of the counted transcript; path equality is not identity. */
1086
+ fileId?: string;
1053
1087
  /**
1054
- * First successful sample for this monitor session (warm-handoff parent totals
1055
- * or cold-start initial point). Soft ceilings apply to (turns - baselineTurns).
1088
+ * True once counting has been deliberately anchored at a byte offset (a warm-handoff
1089
+ * pin). Providers report increments, so there is no total to subtract.
1056
1090
  */
1057
1091
  baselineCaptured?: boolean;
1092
+ /** Legacy: parent totals the pre-increment guard subtracted. Migrated on restore. */
1058
1093
  baselineTurns?: number;
1059
1094
  baselineTotalTokens?: number;
1060
1095
  }
1096
+ /** Persisted form of the budget guard's delivery state machine. */
1097
+ export interface RunBudgetDeliveryState {
1098
+ phase: 'ok' | 'breach-pending' | 'delivered' | 'abandoned' | 'unenforceable';
1099
+ pendingMessage: string | null;
1100
+ operatorMessage: string | null;
1101
+ attempts: number;
1102
+ firstHeldAt?: number;
1103
+ }
1061
1104
  export interface RunMonitorState {
1062
1105
  nudgeCount: number;
1063
1106
  lastPollAt: string;
1064
1107
  startedAt: string;
1065
1108
  lastPaneHash?: string;
1109
+ /** ISO time of last structured runner progress; used to restore stuck clocks. */
1110
+ lastStructuredProgressAt?: string;
1066
1111
  /** True after a one-shot usage-budget warning was emitted for this monitor session. */
1067
1112
  budgetWarned?: boolean;
1068
1113
  /** True after a budget nudge was confirmed delivered (may retry while false). */
1069
1114
  budgetNudgeSent?: boolean;
1115
+ /**
1116
+ * Delivery attempts made for the budget nudge. Retries stop at
1117
+ * MAX_BUDGET_NUDGE_ATTEMPTS so an unconfirmable pane cannot accumulate copies
1118
+ * of the warning in the runner composer.
1119
+ */
1120
+ budgetNudgeAttempts?: number;
1121
+ /** Epoch ms of the first mid-turn deferral of a pending budget warning. */
1122
+ budgetFirstDeferredAt?: number;
1123
+ /** The budget guard's delivery state. Supersedes the flags below. */
1124
+ budgetDelivery?: RunBudgetDeliveryState;
1070
1125
  /** Append-only transcript sample cache for the soft budget guard. */
1071
1126
  budgetUsage?: RunMonitorBudgetUsageState;
1072
1127
  }
@@ -1162,8 +1217,415 @@ export declare function normalizeRunTags(values: readonly string[] | undefined |
1162
1217
  */
1163
1218
  export declare const DOMAIN_NAME_RE: RegExp;
1164
1219
  export declare function isValidDomainName(value: string): boolean;
1220
+ export type MachinePauseMode = 'orchestration' | 'release';
1221
+ /** Durable checkpoints used to resume an interrupted park/restore operation. */
1222
+ export type MachineParkPhase = 'intent-persisted' | 'orchestration-pausing' | 'orchestration-paused' | 'runner-stopping' | 'runner-stopped' | 'resources-stopping' | 'parked' | 'resources-restoring' | 'runner-reloading' | 'orchestration-resuming' | 'restored' | 'cancelling' | 'partial' | 'failed' | 'cancelled';
1223
+ export type MachineParkResourcePhase = 'observed-running' | 'stopping' | 'stopped'
1224
+ /** Left running on purpose because the catalog says releasing never stops it, and verified still running at settle. */
1225
+ | 'retained' | 'restoring' | 'restored' | 'failed';
1226
+ export type MachineParkCapabilityLeaseState = 'held' | 'releasing' | 'released' | 'reacquiring' | 'reacquired' | 'failed';
1227
+ export interface MachineParkCapabilityLease {
1228
+ leaseId: string;
1229
+ /** Lease created when restore reacquires this capability; differs from the released lease id. */
1230
+ restoredLeaseId?: string;
1231
+ capabilityId: string;
1232
+ state: MachineParkCapabilityLeaseState;
1233
+ parameters: Record<string, unknown>;
1234
+ proofRequirement: RuntimeCapabilityProofRequirement;
1235
+ ownerFamilyId?: string;
1236
+ /** Optional provider-resource association; leases remain first-class manifest entries. */
1237
+ resourceId?: string;
1238
+ error?: string;
1239
+ }
1240
+ /** Parking's factual disposition for one manifest resource. */
1241
+ export type MachineParkResourceReleaseEffect = 'stop' | 'retain';
1242
+ /** One resource that was observed running when release-pause intent was captured. */
1243
+ export interface MachineParkResource {
1244
+ resourceId: string;
1245
+ label: string;
1246
+ type: ResourceType;
1247
+ observedStatus: 'running';
1248
+ phase: MachineParkResourcePhase;
1249
+ /**
1250
+ * What parking does to this resource, resolved from the project catalog's
1251
+ * affected-resource metadata. `stop` shuts it down and restore boots it back;
1252
+ * `retain` leaves it running and restore only verifies it never stopped.
1253
+ * Absent on records journalled before the metadata existed; read it as `stop`.
1254
+ */
1255
+ releaseEffect?: MachineParkResourceReleaseEffect;
1256
+ capabilityLeaseIds: string[];
1257
+ stoppedAt?: string;
1258
+ restoredAt?: string;
1259
+ error?: string;
1260
+ }
1261
+ /** What restore did to one resource, emitted by the code path that did it. */
1262
+ export type MachineParkRestoreAction = 'verified' | 'booted' | 'stopped' | 'skipped';
1263
+ /**
1264
+ * One lifecycle effect a restore performed, recorded as fact rather than
1265
+ * inferred from the absence of an error. A successful boot leaves no error
1266
+ * behind, so "no boot error" can never prove no boot happened; this can.
1267
+ */
1268
+ export interface MachineParkRestoreEffect {
1269
+ resourceId: string;
1270
+ action: MachineParkRestoreAction;
1271
+ /** Gateway clock, when the effect was performed or observed. */
1272
+ at: string;
1273
+ /** False when the action failed, or when it happened and should not have. */
1274
+ ok: boolean;
1275
+ reason?: string;
1276
+ }
1277
+ export interface MachineParkResourceManifest {
1278
+ capturedAt: string;
1279
+ resources: MachineParkResource[];
1280
+ capabilityLeases: MachineParkCapabilityLease[];
1281
+ }
1282
+ /** Exact persisted runner identity required to restore a released worker. */
1283
+ export interface MachinePauseRecoveryHandle {
1284
+ version: 1;
1285
+ runnerId: string;
1286
+ contextId: string;
1287
+ sessionId: string;
1288
+ sessionPath: string;
1289
+ target: AgentContextTarget & {
1290
+ paneId: string;
1291
+ };
1292
+ model: string | null;
1293
+ effort?: string | null;
1294
+ safetyTier?: SafetyTier;
1295
+ runtimeDir?: string;
1296
+ taskDir?: string;
1297
+ capturedAt: string;
1298
+ }
1299
+ export interface MachineParkError {
1300
+ phase: MachineParkPhase;
1301
+ action: string;
1302
+ code: string;
1303
+ message: string;
1304
+ occurredAt: string;
1305
+ retryable: boolean;
1306
+ resourceId?: string;
1307
+ }
1308
+ export type MachineParkResidualState = 'running' | 'stopped' | 'unknown';
1309
+ export interface MachineParkResiduals {
1310
+ runner: MachineParkResidualState;
1311
+ resources: Array<{
1312
+ resourceId: string;
1313
+ state: MachineParkResidualState;
1314
+ detail?: string;
1315
+ }>;
1316
+ }
1317
+ export interface MachineParkCurrentStep {
1318
+ index: number;
1319
+ name: string;
1320
+ status: RunStepStatus;
1321
+ }
1322
+ /**
1323
+ * What a release-mode park does with the run's slot.
1324
+ *
1325
+ * `retained` keeps the slot bound to the parked run (machine-wide pause of a
1326
+ * monitoring or CI-watching run). `freed` releases slot ownership so dispatch
1327
+ * can select it while the run stays parked at its operator wait — the park
1328
+ * record, not the slot row, is then the authority for the run's slot binding.
1329
+ * Absent on records written before slot freeing existed; treat as `retained`.
1330
+ */
1331
+ export type MachineParkSlotDisposition = 'retained' | 'freed';
1332
+ /**
1333
+ * Machine-pause eligibility codes that clients and the Gateway share. Every
1334
+ * other code stays private to the Gateway verdict; these are the gate-park
1335
+ * contract added by the free-slot-at-an-operator-wait decision.
1336
+ */
1337
+ export declare const MachineParkEligibilityCodes: {
1338
+ /** A gate-held publication run may be released and its slot freed. */
1339
+ readonly eligibleGateRelease: "ELIGIBLE_GATE_RELEASE_PAUSE";
1340
+ /** The run's runner declares no graceful stop plus persisted session reload. */
1341
+ readonly runnerReloadUnsupported: "RUNNER_RELOAD_UNSUPPORTED";
1342
+ /** A gate-held run can only be parked in release mode; orchestration-only would strand its gate. */
1343
+ readonly gateParkRequiresRelease: "GATE_PARK_REQUIRES_RELEASE";
1344
+ /**
1345
+ * The record freed its slot, so the operation asked for cannot act on the
1346
+ * run until a restore has put it back. Not a refusal of restore itself:
1347
+ * `machine.pause.restore` and gate resolution both drive that restore.
1348
+ */
1349
+ readonly freedSlotRestoreRequired: "FREED_SLOT_RESTORE_REQUIRED";
1350
+ /**
1351
+ * Restore refused: the original slot is no longer free AND no other slot on
1352
+ * the machine could take the run instead. The record stays parked and its
1353
+ * decision stays pending, so the run can be restored later or cancelled.
1354
+ *
1355
+ * Kept as the refusal for the case where re-homing was not even attempted —
1356
+ * the runner cannot carry its session across working directories, or the
1357
+ * record has no preserved workspace to re-home. When a re-home WAS attempted
1358
+ * and every candidate failed a proof, `RESTORE_NO_REHOME_TARGET` says so.
1359
+ */
1360
+ readonly restoreSlotTaken: "RESTORE_SLOT_TAKEN";
1361
+ /**
1362
+ * The original slot was taken, so the restore will put the run into a
1363
+ * DIFFERENT free slot on the same machine. An eligible verdict, not a
1364
+ * refusal: the Gateway picked the target through the same dispatch scoring
1365
+ * that picks a slot for a new run, and the preview names it so the operator
1366
+ * sees where the run is going before answering the gate.
1367
+ */
1368
+ readonly restoreRehomed: "ELIGIBLE_FREED_SLOT_REHOME";
1369
+ /**
1370
+ * Re-home refused: the run's runner scopes its persisted session by working
1371
+ * directory, so the session recorded under the original slot's workspace
1372
+ * could not be resumed from another slot's. Fails closed — a reload that
1373
+ * silently started a FRESH conversation would lose the run's whole context
1374
+ * while reporting a successful restore.
1375
+ */
1376
+ readonly restoreRehomeSessionNotPortable: "RESTORE_REHOME_SESSION_NOT_PORTABLE";
1377
+ /**
1378
+ * Re-home refused: the original slot is taken and no other slot on the
1379
+ * machine passed every read-only eligibility proof. Distinct from
1380
+ * `RESTORE_SLOT_TAKEN`: a re-home WAS attempted, so the operator knows the
1381
+ * machine has no home for this run rather than that the feature declined to
1382
+ * look.
1383
+ */
1384
+ readonly restoreNoRehomeTarget: "RESTORE_NO_REHOME_TARGET";
1385
+ /**
1386
+ * Restore refused: the preserved branch cannot be checked back out — the
1387
+ * successor left uncommitted work in the tree, or the branch no longer sits
1388
+ * at the tip the park detached from.
1389
+ */
1390
+ readonly restoreWorkspaceUnavailable: "RESTORE_WORKSPACE_UNAVAILABLE";
1391
+ /**
1392
+ * Restore refused: the persisted runner session could not be reloaded with a
1393
+ * structured acknowledgement, so nothing may claim the worker is back.
1394
+ */
1395
+ readonly restoreRunnerReloadFailed: "RESTORE_RUNNER_RELOAD_FAILED";
1396
+ /**
1397
+ * The restore had to re-present the gate because its engine loop had exited,
1398
+ * so the decision the operator answered is no longer the live one.
1399
+ */
1400
+ readonly restoreGateReplayed: "RESTORE_GATE_REPLAYED";
1401
+ /**
1402
+ * Freeing the slot would expose the run's workspace to the next occupant's
1403
+ * prepare, and its branch tip could not be preserved first.
1404
+ */
1405
+ readonly workspaceNotPreservable: "WORKSPACE_NOT_PRESERVABLE";
1406
+ /** A gate park is in flight for this run; its gate cannot be resolved yet. */
1407
+ readonly gateParkInFlight: "GATE_PARK_IN_FLIGHT";
1408
+ /**
1409
+ * The runner liveness probe exceeded its fixed budget before it could say
1410
+ * whether the worker is alive. Distinct from `RUNNER_RELOAD_UNSUPPORTED` and
1411
+ * from the gateway's generic recovery-handle refusal: nothing was decided
1412
+ * about this runner's capability, so the operator's own retry is the answer.
1413
+ * `details.probeBudgetMs` carries the budget that elapsed.
1414
+ */
1415
+ readonly runnerLivenessProbeTimeout: "RUNNER_LIVENESS_PROBE_TIMEOUT";
1416
+ /**
1417
+ * The machine-pause preview digest moved between preview and execute, so the
1418
+ * batch the operator reviewed is no longer the batch that would run. A race,
1419
+ * not a verdict about the run: previewing again resolves it.
1420
+ */
1421
+ readonly machinePausePreviewStale: "MACHINE_PAUSE_PREVIEW_STALE";
1422
+ };
1423
+ export type MachineParkEligibilityCode = (typeof MachineParkEligibilityCodes)[keyof typeof MachineParkEligibilityCodes];
1424
+ /**
1425
+ * Structured facts behind an eligibility verdict, for the codes that have one.
1426
+ *
1427
+ * The reason string is prose for an operator; anything a client or a validation
1428
+ * harness has to BRANCH on belongs here instead, so nobody has to parse the
1429
+ * sentence back apart to recover a number the gateway already knew.
1430
+ */
1431
+ export interface MachinePauseEligibilityDetails {
1432
+ /** Budget the runner liveness probe exhausted (`RUNNER_LIVENESS_PROBE_TIMEOUT`). */
1433
+ probeBudgetMs?: number;
1434
+ }
1435
+ /**
1436
+ * The git identity a freeing park took out of the slot's working tree.
1437
+ *
1438
+ * A linked worktree keeps the parked run's branch checked out, and the next
1439
+ * occupant's prepare resets the checked-out branch to its base ref — which
1440
+ * would move the parked branch and discard its commits. The park detaches HEAD
1441
+ * first and records what it detached from, so the branch ref survives at
1442
+ * `headSha` and restore can check it out again.
1443
+ */
1444
+ export interface MachineParkWorkspace {
1445
+ branch: string;
1446
+ headSha: string;
1447
+ /**
1448
+ * When the detach actually landed, not when it was planned. Absent means the
1449
+ * branch is still checked out in the slot, so the park had no workspace
1450
+ * effect yet. Same fact-versus-intent split as `slotFreedAt`.
1451
+ */
1452
+ detachedAt?: string;
1453
+ }
1454
+ /**
1455
+ * A restore that put the run back into a DIFFERENT slot than the park freed.
1456
+ *
1457
+ * Written write-ahead, before the slot claim, for the same reason every other
1458
+ * park transition is: the re-home is two writes — the record's slot binding and
1459
+ * the slot row's owner — and a crash between them must leave the repair path a
1460
+ * marker saying which slot this record is now homed to. `repairRestoreSlotIntent`
1461
+ * reads `toSlotId`, never the journalled snapshot's `slotId`.
1462
+ *
1463
+ * `fromSlotId` is the slot the park freed, and it stays meaningful after the
1464
+ * re-home: the preserved workspace's detached HEAD is still sitting THERE, so
1465
+ * dispatch's detached-HEAD exemption keys on it rather than on the record's
1466
+ * current slot.
1467
+ */
1468
+ export interface MachineParkRehome {
1469
+ /** The slot the park freed, whose successor made a same-slot restore impossible. */
1470
+ fromSlotId: string;
1471
+ /** The slot the restore re-bound the run into instead. */
1472
+ toSlotId: string;
1473
+ at: string;
1474
+ /** Why the original could not take the run back — the availability refusal, verbatim. */
1475
+ reason: string;
1476
+ }
1477
+ /**
1478
+ * The stages a freed-slot restore owes, in the order it owes them.
1479
+ *
1480
+ * Tracked as its own sequence rather than inferred from what the record happens
1481
+ * to look like. Occupancy, the detached branch, the lease states, and the
1482
+ * runner proof each record ONE stage's outcome, so reading them as a whole is a
1483
+ * guess: a restore that re-bound the slot and then died before re-creating the
1484
+ * pane looks, to an occupancy reader, exactly like a restore that never had to
1485
+ * touch the slot at all — and the retry then takes the ordinary path and fails
1486
+ * on a recovery handle nothing re-hosted.
1487
+ */
1488
+ export declare const MACHINE_PARK_RESTORE_STAGES: readonly ["rebind", "reattach", "reacquire", "reload"];
1489
+ export type MachineParkRestoreStage = (typeof MACHINE_PARK_RESTORE_STAGES)[number];
1490
+ /**
1491
+ * How far the current restore attempt got, written around each stage.
1492
+ *
1493
+ * `attempting` is written BEFORE the stage runs and `completed` only after it
1494
+ * lands, so a crash anywhere inside a stage is visible as an unfinished stage
1495
+ * rather than as an absence. The write-ahead journal is kept until every stage
1496
+ * is in `completed`.
1497
+ */
1498
+ export interface MachineParkRestoreProgress {
1499
+ /** The restore operation these stages belong to; a newer one starts over. */
1500
+ operationId: string;
1501
+ /** The stage currently being attempted, if any. Cleared when it completes. */
1502
+ attempting?: MachineParkRestoreStage;
1503
+ /** Stages proven complete, in the order they landed. */
1504
+ completed: MachineParkRestoreStage[];
1505
+ updatedAt: string;
1506
+ }
1507
+ /** Whether every stage a freed-slot restore owes has landed. */
1508
+ export declare function machineParkRestoreComplete(progress: MachineParkRestoreProgress | undefined): boolean;
1509
+ /**
1510
+ * Why the last restore attempt refused, kept on the record so a reconnecting
1511
+ * client sees the reason without replaying the RPC that produced it.
1512
+ *
1513
+ * A refusal is not a failure of the park: the record stays `parked`, its
1514
+ * decision stays pending, and the run can be restored again later or
1515
+ * cancelled. Cleared the moment a restore gets past the refusal.
1516
+ */
1517
+ export interface MachineParkRestoreRefusal {
1518
+ /** A `MachineParkEligibilityCode`; carried as a string like every verdict code. */
1519
+ code: string;
1520
+ reason: string;
1521
+ at: string;
1522
+ }
1523
+ /** Write-ahead per-run record; persisted on Run before any release side effect. */
1524
+ export interface MachineParkRecord {
1525
+ version: 1;
1526
+ operationId: string;
1527
+ previewId: string;
1528
+ runId: string;
1529
+ generation: number;
1530
+ restoredGeneration?: number;
1531
+ machine: string;
1532
+ slotId: string;
1533
+ mode: MachinePauseMode;
1534
+ phase: MachineParkPhase;
1535
+ prePauseStatus: RunStatus;
1536
+ prePauseCurrentStep: MachineParkCurrentStep | null;
1537
+ resourceManifest: MachineParkResourceManifest;
1538
+ recoveryHandle: MachinePauseRecoveryHandle | null;
1539
+ /** Slot intent decided at preview; absent means `retained`. */
1540
+ slotDisposition?: MachineParkSlotDisposition;
1541
+ /**
1542
+ * The workspace a freeing park detached, so the next occupant's prepare
1543
+ * cannot reset the parked run's branch. Written before slot ownership is
1544
+ * released; `restore` checks the branch back out at this exact tip.
1545
+ */
1546
+ preservedWorkspace?: MachineParkWorkspace;
1547
+ /**
1548
+ * When slot ownership was actually released, not merely intended. Set only
1549
+ * after the park stopped the runner and every manifest resource, so a partial
1550
+ * park never advertises a freed slot.
1551
+ *
1552
+ * Kept for the whole restore and cleared only when every restore stage has
1553
+ * landed, so it stays the marker of "this record owes a freed-slot restore".
1554
+ * OCCUPANCY is `slotReboundAt`, which lands earlier: the two are deliberately
1555
+ * separate, because a restore that re-bound the slot and then failed still
1556
+ * owes the rest of its stages.
1557
+ */
1558
+ slotFreedAt?: string;
1559
+ /**
1560
+ * When a restore re-bound the freed slot to this run, not merely intended
1561
+ * to. Written in the same write-ahead window that clears `slotFreedAt`, so a
1562
+ * crash between the slot claim and the record write is repairable. Survives
1563
+ * the restore as the note that this record's slot came back.
1564
+ */
1565
+ slotReboundAt?: string;
1566
+ /**
1567
+ * Set when a restore re-bound a DIFFERENT slot than the park freed, because
1568
+ * the original had been taken. `slotId` above already names the new slot —
1569
+ * this is the note that says it moved, and from where.
1570
+ */
1571
+ rehome?: MachineParkRehome;
1572
+ /**
1573
+ * How far the current restore attempt got. Absent until a freed-slot restore
1574
+ * starts, and the authority for what a retry still owes — never inferred from
1575
+ * whether the run currently occupies its slot.
1576
+ */
1577
+ restoreProgress?: MachineParkRestoreProgress;
1578
+ /**
1579
+ * Why the last restore attempt refused, when it refused without changing
1580
+ * anything. Absent once a restore gets past the refusal.
1581
+ */
1582
+ restoreRefusal?: MachineParkRestoreRefusal;
1583
+ /** Restore intent classification persisted before any selected batch member mutates. */
1584
+ restoreDisposition?: 'zero-effect' | 'effectful';
1585
+ /**
1586
+ * What the last restore attempt actually did to each manifest resource, in
1587
+ * the order it did it. Reset at the start of each attempt. Absent on records
1588
+ * written before restore recorded its effects.
1589
+ */
1590
+ restoreEffects?: MachineParkRestoreEffect[];
1591
+ /** Exact runner-native acknowledgement captured before orchestration resumes. */
1592
+ recoveryProof?: {
1593
+ sessionId: string;
1594
+ live: true;
1595
+ acknowledgement: {
1596
+ /**
1597
+ * How the worker was proven back.
1598
+ *
1599
+ * `structured` — the restore relaunched the session and the runner
1600
+ * acknowledged the continuation prompt: a turn was delivered and started.
1601
+ *
1602
+ * `adopted` — the worker was ALREADY running this run's persisted session
1603
+ * when the restore reached it, so nothing was relaunched and no turn was
1604
+ * delivered. The evidence is the structured live-binding check, not a
1605
+ * prompt acknowledgement, and the two must be distinguishable: a consumer
1606
+ * with only `source` to go on cannot tell a delivered turn from an
1607
+ * inherited one.
1608
+ */
1609
+ kind: 'structured' | 'adopted';
1610
+ source: string;
1611
+ reason: string;
1612
+ /** Present only for `structured`; an adopted worker started no turn. */
1613
+ turnToken?: string;
1614
+ };
1615
+ acceptedAt: string;
1616
+ };
1617
+ errors: MachineParkError[];
1618
+ residuals: MachineParkResiduals;
1619
+ createdAt: string;
1620
+ updatedAt: string;
1621
+ parkedAt?: string;
1622
+ restoredAt?: string;
1623
+ cancelledAt?: string;
1624
+ }
1165
1625
  export interface Run {
1166
1626
  id: string;
1627
+ prWork?: import('./pr-monitoring.js').PRWorkReference;
1628
+ prPublications?: import('./pr-monitoring.js').PRPublicationRecord[];
1167
1629
  familyId: string;
1168
1630
  parentRunId?: string | null;
1169
1631
  familyRootTicketOrPr?: string;
@@ -1195,6 +1657,11 @@ export interface Run {
1195
1657
  domain?: string;
1196
1658
  /** Named prepare profile requested for this run (ADR-037). */
1197
1659
  prepareProfile?: string;
1660
+ /**
1661
+ * Dispatch-time resource posture preset (ADR-054). Presets the gate choice for
1662
+ * every durable operator wait of this run; an explicit gate choice still wins.
1663
+ */
1664
+ waitPolicy?: ResourcePostureWaitPolicy;
1198
1665
  /**
1199
1666
  * Branch-update strategy for `update-branch` runs (rebase | merge |
1200
1667
  * project-default). Ignored for other flows. Rendered into the worker task
@@ -1210,6 +1677,15 @@ export interface Run {
1210
1677
  branch: string | null;
1211
1678
  /** Completion side-effect policy; artifact-only suppresses publication/PR mutation paths. */
1212
1679
  completionPolicy?: RunCompletionPolicy;
1680
+ /** Principal-stamped one-dispatch pressure override requested for this run.
1681
+ * Bound to one machine + pressure generation; dispatch execution recomputes
1682
+ * the admission decision and rejects the override when the generation moved. */
1683
+ pressureOverride?: import('./pressure-admission.js').PressureOverrideAudit;
1684
+ /** Preview identity of the admitted pressure decision this run was created
1685
+ * against (client-rendered preview, or FIND_SLOT's selected decision for
1686
+ * automatic runs). Execution rejects with PRESSURE_PREVIEW_STALE when it no
1687
+ * longer matches freshly recomputed evidence. */
1688
+ pressureAdmissionRef?: import('./pressure-admission.js').PressureAdmissionReference;
1213
1689
  /** Requested/resolved base ref for artifact-only comparison replay runs. */
1214
1690
  startRef?: RunStartRefProvenance | null;
1215
1691
  /** Gateway-captured template provenance for the rendered worker task. */
@@ -1229,6 +1705,7 @@ export interface Run {
1229
1705
  mergedAt?: string | null;
1230
1706
  steps: RunStep[];
1231
1707
  decisions: RunDecision[];
1708
+ reviewResult?: RunReviewResult;
1232
1709
  metrics: RunMetrics;
1233
1710
  createdAt: string;
1234
1711
  /** Timestamp when the supervised run lifecycle started. */
@@ -1303,6 +1780,10 @@ export interface Run {
1303
1780
  analyticsEmittedAt?: string;
1304
1781
  /** Present when this run record was imported from a portable bundle (ADR-039). */
1305
1782
  importProvenance?: RunImportProvenance;
1783
+ /** Durable machine-scoped pause/release/restore state. */
1784
+ park?: MachineParkRecord | null;
1785
+ /** Gateway-owned effective resource posture and last transition (ADR-054). */
1786
+ resourcePosture?: RunResourcePostureState;
1306
1787
  /** Imported reference-only runs must not be re-dispatched or activated on slot. */
1307
1788
  readOnly?: boolean;
1308
1789
  /** Slot HEAD SHA captured at dispatch (after prepare) — base for per-run iteration diff. */
@@ -1317,9 +1798,9 @@ export interface RunEngineState {
1317
1798
  * `nudgeReuse` is set when the operator picks "Nudge worker" in the dispatch wizard or the
1318
1799
  * branch-affinity decision card; FIND_SLOT honors it to bind the busy slot, and DISPATCH
1319
1800
  * routes through `nudgeDispatch` (skip PREPARE, send-keys to existing tmux session) instead
1320
- * of `dispatchExecute` (kill + relaunch). `freshReuse` is the "Kill & dispatch fresh"
1321
- * sibling FIND_SLOT hard-kills the prior worker BEFORE PREPARE so git reset / checkout /
1322
- * dependency install don't race a still-writing worker in the same worktree.
1801
+ * of `dispatchExecute` (kill + relaunch). `freshReuse` replaces either that busy
1802
+ * branch-affinity worker or an unowned warm runner. FIND_SLOT hard-kills it BEFORE PREPARE
1803
+ * so git reset / checkout / dependency install don't race a still-writing worker.
1323
1804
  * `warmSessionReuse` is set on CI-watch chained follow-ups (pr-complete / update-branch)
1324
1805
  * when the parent kept its worker warm through finalize; DISPATCH tries handoff into that
1325
1806
  * session and falls back to fresh `dispatchExecute` when the process is dead or not nudgeable. */
@@ -1345,6 +1826,8 @@ export interface RunEngineState {
1345
1826
  };
1346
1827
  /** Monotonic replay generation counter; startRun bails if the run has been superseded. */
1347
1828
  generation?: number;
1829
+ /** Operator `run.forceComplete` on a failed run. Replay must not treat this as ordinary done. */
1830
+ operatorForceCompleted?: true;
1348
1831
  /** Multi-surface validation matrix suggested at dispatch (farmslot profile-fit). */
1349
1832
  validationPlan?: ValidationPlanStep[];
1350
1833
  profileFitSuggestion?: ProfileFitSuggestion;
@@ -1421,6 +1904,8 @@ export interface RunCiWatchState {
1421
1904
  lastProgressReason?: string;
1422
1905
  /** Last watched-check status fingerprint used to detect progress. */
1423
1906
  lastCheckFingerprint?: string;
1907
+ /** Last observed actionable feedback, retained so restart does not invent progress. */
1908
+ lastActionableFingerprint?: string;
1424
1909
  /** Last observed local PR head SHA used to detect new commits. */
1425
1910
  lastHeadSha?: string | null;
1426
1911
  /** Consecutive-failure counter; resets on success. Gates consecutive fallback (MAX_INLINE_CI_FIX_ATTEMPTS). */
@@ -1628,15 +2113,19 @@ export declare const DEFAULT_TASK_DIR = ".task";
1628
2113
  * Changing this value alters defaults across the dispatch wizard and gateway
1629
2114
  * dispatch path — verify all `DEFAULT_CLAUDE_MODEL` callers when touching it. */
1630
2115
  export declare const DEFAULT_CLAUDE_MODEL = "opus";
1631
- /** Default Codex model used when no slot/task/project/user override is set.
1632
- * GPT-5.6 family uses tiered slugs (sol/terra/luna); Sol is the flagship. */
1633
- export declare const DEFAULT_CODEX_MODEL = "gpt-5.6-sol";
2116
+ /** Default Codex model used when no slot/task/project/user override is set. */
2117
+ export declare const DEFAULT_CODEX_MODEL = "gpt-6-astra";
2118
+ /** Reasoning efforts exposed by the Codex CLI, including Astra's max and ultra. */
2119
+ export declare const CODEX_REASONING_EFFORTS: readonly ["low", "medium", "high", "xhigh", "max", "ultra"];
2120
+ export type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORTS)[number];
2121
+ /** Model capabilities from the Codex CLI catalog. Unknown models keep the legacy levels. */
2122
+ export declare function codexReasoningEfforts(model?: string | null): readonly CodexReasoningEffort[];
1634
2123
  /** Default Codex reasoning effort when dispatch/launch omits effort. */
1635
- export declare const DEFAULT_CODEX_EFFORT = "xhigh";
2124
+ export declare const DEFAULT_CODEX_EFFORT = "high";
1636
2125
  /** Default Cursor Agent model used when no slot/task/project/user override is set. */
1637
2126
  export declare const DEFAULT_CURSOR_MODEL = "cursor-grok-4.6-high-fast";
1638
2127
  /** Default Grok model used when no slot/task/project/user override is set. */
1639
- export declare const DEFAULT_GROK_MODEL = "grok-4.5";
2128
+ export declare const DEFAULT_GROK_MODEL = "grok-4.6";
1640
2129
  /** Default Grok reasoning effort when dispatch/launch omits effort. */
1641
2130
  export declare const DEFAULT_GROK_EFFORT = "xhigh";
1642
2131
  export type DecisionType = 'collision_check' | 'plan_confirmation' | 'retrospective' | 'review_posting' | 'blocked_alert' | 'review_comments' | 'improvement' | 'recipe_strategy' | `engine_${string}` | `monitor_${string}` | `ci_${string}`;