@cat-factory/contracts 0.169.0 → 0.170.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 (77) hide show
  1. package/dist/agent-presentation.d.ts +2 -2
  2. package/dist/errors.d.ts +1 -1
  3. package/dist/errors.d.ts.map +1 -1
  4. package/dist/errors.js +6 -0
  5. package/dist/errors.js.map +1 -1
  6. package/dist/execution.d.ts +103 -568
  7. package/dist/execution.d.ts.map +1 -1
  8. package/dist/execution.js +14 -199
  9. package/dist/execution.js.map +1 -1
  10. package/dist/gate.d.ts +283 -0
  11. package/dist/gate.d.ts.map +1 -0
  12. package/dist/gate.js +209 -0
  13. package/dist/gate.js.map +1 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/judge.d.ts +181 -0
  19. package/dist/judge.d.ts.map +1 -0
  20. package/dist/judge.js +147 -0
  21. package/dist/judge.js.map +1 -0
  22. package/dist/merge.d.ts +17 -0
  23. package/dist/merge.d.ts.map +1 -1
  24. package/dist/merge.js +19 -0
  25. package/dist/merge.js.map +1 -1
  26. package/dist/notification-webhooks.d.ts +3 -3
  27. package/dist/notifications.d.ts +3 -3
  28. package/dist/notifications.d.ts.map +1 -1
  29. package/dist/notifications.js +2 -0
  30. package/dist/notifications.js.map +1 -1
  31. package/dist/pr-report.d.ts +101 -0
  32. package/dist/pr-report.d.ts.map +1 -1
  33. package/dist/pr-report.js +40 -0
  34. package/dist/pr-report.js.map +1 -1
  35. package/dist/public-api.d.ts +1 -1
  36. package/dist/public-decisions.d.ts +94 -1
  37. package/dist/public-decisions.d.ts.map +1 -1
  38. package/dist/public-decisions.js +34 -1
  39. package/dist/public-decisions.js.map +1 -1
  40. package/dist/result-views.d.ts +1 -1
  41. package/dist/result-views.d.ts.map +1 -1
  42. package/dist/result-views.js +1 -0
  43. package/dist/result-views.js.map +1 -1
  44. package/dist/routes/agent-runs.d.ts +86 -0
  45. package/dist/routes/agent-runs.d.ts.map +1 -1
  46. package/dist/routes/execution.d.ts +344 -0
  47. package/dist/routes/execution.d.ts.map +1 -1
  48. package/dist/routes/human-review.d.ts +43 -0
  49. package/dist/routes/human-review.d.ts.map +1 -1
  50. package/dist/routes/human-test.d.ts +215 -0
  51. package/dist/routes/human-test.d.ts.map +1 -1
  52. package/dist/routes/index.d.ts +1 -0
  53. package/dist/routes/index.d.ts.map +1 -1
  54. package/dist/routes/index.js +1 -0
  55. package/dist/routes/index.js.map +1 -1
  56. package/dist/routes/judge.d.ts +158 -0
  57. package/dist/routes/judge.d.ts.map +1 -0
  58. package/dist/routes/judge.js +28 -0
  59. package/dist/routes/judge.js.map +1 -0
  60. package/dist/routes/merge.d.ts +12 -0
  61. package/dist/routes/merge.d.ts.map +1 -1
  62. package/dist/routes/notification-webhooks.d.ts +3 -3
  63. package/dist/routes/notifications.d.ts +3 -3
  64. package/dist/routes/public-api.d.ts +3 -3
  65. package/dist/routes/public-decisions.d.ts +246 -0
  66. package/dist/routes/public-decisions.d.ts.map +1 -1
  67. package/dist/routes/public-decisions.js +10 -1
  68. package/dist/routes/public-decisions.js.map +1 -1
  69. package/dist/routes/slack.d.ts +3 -3
  70. package/dist/routes/visual-confirm.d.ts +129 -0
  71. package/dist/routes/visual-confirm.d.ts.map +1 -1
  72. package/dist/routes/workspaces.d.ts +94 -4
  73. package/dist/routes/workspaces.d.ts.map +1 -1
  74. package/dist/slack.d.ts +2 -2
  75. package/dist/snapshot.d.ts +47 -2
  76. package/dist/snapshot.d.ts.map +1 -1
  77. package/package.json +1 -1
package/dist/gate.d.ts ADDED
@@ -0,0 +1,283 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * State a polling **gate** step carries (today `ci` and `conflicts`). A gate is
4
+ * special (like a `deployer` step): it is NOT itself an LLM/container agent. It
5
+ * runs a programmatic precheck against a provider (CI check runs / PR mergeability)
6
+ * for the PR head commit and only escalates to a helper container agent (`ci-fixer`
7
+ * / `conflict-resolver`) on a negative verdict, looping until the precheck passes or
8
+ * the attempt budget is spent. Which gate a step is comes from its `agentKind`, so it
9
+ * is not duplicated here. See the engine's `GateDefinition` registry.
10
+ * - `phase: 'checking'` — running the precheck / waiting for the provider.
11
+ * - `phase: 'working'` — a helper agent is in flight (tracked via the step's
12
+ * `jobId`); on completion the gate returns to `checking`.
13
+ */
14
+ /** One failing check the CI gate's precheck saw, flattened for display. */
15
+ export declare const gateFailingCheckSchema: v.ObjectSchema<{
16
+ readonly name: v.StringSchema<undefined>;
17
+ /** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
18
+ readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
19
+ /**
20
+ * The check run's GitHub web URL (`html_url`), so the UI can link straight to the
21
+ * failed run's logs. Null when GitHub didn't report one.
22
+ */
23
+ readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
24
+ /**
25
+ * The repo (owner/name) this check belongs to, on a MULTI-REPO block — so the UI can group
26
+ * failing checks by service. Absent on a single-repo block (there is only the own repo).
27
+ */
28
+ readonly repo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
29
+ }, undefined>;
30
+ export type GateFailingCheck = v.InferOutput<typeof gateFailingCheckSchema>;
31
+ /**
32
+ * One helper-agent attempt the gate dispatched (a ci-fixer / conflict-resolver run),
33
+ * recorded when the job finishes so the UI can show what each attempt tried and how it
34
+ * ended — detail that used to be discarded the moment the gate re-probed.
35
+ */
36
+ export declare const gateAttemptSchema: v.ObjectSchema<{
37
+ /** 1-based attempt number (matches `attempts` at the time the helper was dispatched). */
38
+ readonly attempt: v.NumberSchema<undefined>;
39
+ /** Epoch ms when the helper job finished. */
40
+ readonly at: v.NumberSchema<undefined>;
41
+ /**
42
+ * How the helper job ended:
43
+ * - `completed` — the container finished (it may or may not have fully fixed the
44
+ * issue; the gate's next precheck is the source of truth, and `summary` carries
45
+ * the agent's own account, e.g. which files it left conflicting).
46
+ * - `failed` — the job errored / was evicted without finishing.
47
+ */
48
+ readonly outcome: v.PicklistSchema<["completed", "failed"], undefined>;
49
+ /** The PR head commit the helper worked against, when known. */
50
+ readonly headSha: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
51
+ /**
52
+ * The fixing instructions handed to the helper for this round — the failing-check
53
+ * summary the CI gate fed the `ci-fixer`, the conflict reason / human-review comments
54
+ * the other gates fed their fixer. Stashed at dispatch and recorded with the attempt so
55
+ * the run-detail UI can show WHAT each round was asked to fix (not only that a round
56
+ * happened) — the gate analogue of the Tester attempt's `concerns`. Null when the gate
57
+ * hands its fixer no textual instructions (the conflicts gate: GitHub reports mergeability
58
+ * as a single bit and the harness leaves the conflict markers for the resolver).
59
+ */
60
+ readonly instructions: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
61
+ /**
62
+ * Structured failing checks handed to this attempt's helper (the CI gate's red check runs
63
+ * behind {@link instructions}), snapshotted at dispatch so each attempt shows the checks it
64
+ * set out to fix. Absent for the conflicts gate (no file-level detail) and when the round
65
+ * carried no structured checks.
66
+ */
67
+ readonly failingChecks: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
68
+ readonly name: v.StringSchema<undefined>;
69
+ /** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
70
+ readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
71
+ /**
72
+ * The check run's GitHub web URL (`html_url`), so the UI can link straight to the
73
+ * failed run's logs. Null when GitHub didn't report one.
74
+ */
75
+ readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
76
+ /**
77
+ * The repo (owner/name) this check belongs to, on a MULTI-REPO block — so the UI can group
78
+ * failing checks by service. Absent on a single-repo block (there is only the own repo).
79
+ */
80
+ readonly repo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
81
+ }, undefined>, undefined>, undefined>, undefined>;
82
+ /** The helper's own summary (or the failure reason), naming what it did / what remains. */
83
+ readonly summary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
84
+ }, undefined>;
85
+ export type GateAttempt = v.InferOutput<typeof gateAttemptSchema>;
86
+ export declare const gateStepStateSchema: v.ObjectSchema<{
87
+ readonly phase: v.PicklistSchema<["checking", "working"], undefined>;
88
+ /** How many helper-agent attempts have been dispatched so far. */
89
+ readonly attempts: v.NumberSchema<undefined>;
90
+ /** Ceiling on attempts, resolved from the task's merge preset at step start. */
91
+ readonly maxAttempts: v.NumberSchema<undefined>;
92
+ /** The PR head commit being gated, once resolved (the own-service PR on a multi-repo block). */
93
+ readonly headSha: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
94
+ /**
95
+ * Per-PR head commits for a MULTI-REPO block (service-connections phase 4), keyed by repo
96
+ * full name (owner/name) — own-service PR plus each peer-service PR. Set by the CI /
97
+ * conflicts gates whose precheck aggregates across every PR the task opened. Absent for a
98
+ * single-repo block (the scalar {@link headSha} is the only head).
99
+ */
100
+ readonly headShas: v.OptionalSchema<v.NullableSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>, undefined>;
101
+ /**
102
+ * The repo the conflicts gate's most recent `fail` verdict found conflicted, so the
103
+ * single-repo conflict-resolver is dispatched at THAT repo (own-service or a peer) rather
104
+ * than always the own-service one. Absent ⇒ the own-service repo. Only the conflicts gate
105
+ * sets it (the CI-fixer runs across all repos, so the CI gate leaves it undefined).
106
+ */
107
+ readonly conflictTarget: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
108
+ readonly repo: v.StringSchema<undefined>;
109
+ readonly frameId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
110
+ readonly branch: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
111
+ }, undefined>, undefined>, undefined>;
112
+ /**
113
+ * The most recent precheck verdict, so the UI can show why the gate is looping
114
+ * (failing → a helper is fixing) vs idle-passing. Set on every probe.
115
+ */
116
+ readonly lastVerdict: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["pass", "pending", "fail"], undefined>, undefined>, undefined>;
117
+ /**
118
+ * Human-readable summary of the latest failing precheck (the failing CI checks /
119
+ * the conflict reason) — the conclusion detail that used to be fed only to the
120
+ * helper agent and then discarded. Carried across the helper dispatch so the
121
+ * window keeps showing what is being fixed. Null when the last probe passed.
122
+ */
123
+ readonly lastFailureSummary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
124
+ /**
125
+ * Structured failing checks behind {@link lastFailureSummary} for the CI gate, so
126
+ * the UI can list each red check by name + conclusion. Absent for the conflicts
127
+ * gate (GitHub reports no file-level detail) and when the last probe passed.
128
+ */
129
+ readonly failingChecks: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
130
+ readonly name: v.StringSchema<undefined>;
131
+ /** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
132
+ readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
133
+ /**
134
+ * The check run's GitHub web URL (`html_url`), so the UI can link straight to the
135
+ * failed run's logs. Null when GitHub didn't report one.
136
+ */
137
+ readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
138
+ /**
139
+ * The repo (owner/name) this check belongs to, on a MULTI-REPO block — so the UI can group
140
+ * failing checks by service. Absent on a single-repo block (there is only the own repo).
141
+ */
142
+ readonly repo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
143
+ }, undefined>, undefined>, undefined>, undefined>;
144
+ /**
145
+ * The fixing instructions handed to the most-recently dispatched helper (the failing-check
146
+ * summary / conflict reason / human fix prompt), stashed at dispatch so the attempt recorded
147
+ * when that helper's job settles can carry WHAT the round was asked to fix onto its
148
+ * {@link gateAttemptSchema} entry. Transient bookkeeping — the durable per-round history lives
149
+ * on {@link attemptLog}. Null when the gate hands its fixer no textual instructions.
150
+ */
151
+ readonly lastDispatchedInstructions: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
152
+ /**
153
+ * Epoch ms of the release marker for a time-windowed gate (post-release-health) — the
154
+ * moment it began watching the deployed release. The gate keeps polling `pending`
155
+ * until this + the preset's watch window has elapsed (then a clean run passes) or a
156
+ * monitor/SLO regresses (then it escalates to the on-call agent). Absent for the
157
+ * CI/conflicts gates.
158
+ */
159
+ readonly watchSince: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
160
+ /**
161
+ * The watch-window length (minutes) for a time-windowed gate (post-release-health),
162
+ * resolved from the task's merge preset ONCE on first entry (alongside `maxAttempts`)
163
+ * so the probe doesn't re-load the block + re-resolve the preset on every poll. Absent
164
+ * for the CI/conflicts gates.
165
+ */
166
+ readonly watchWindowMinutes: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
167
+ /**
168
+ * The regressed signals captured when the post-release-health gate escalated to the
169
+ * on-call agent, so the agent's completion handler can build the `release_regression`
170
+ * notification + incident enrichment from the SAME evidence the agent investigated
171
+ * — rather than re-reading Datadog (a third round-trip that could also disagree with
172
+ * what the agent saw if the window moved). Absent for the CI/conflicts gates.
173
+ */
174
+ readonly regressedSignals: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
175
+ readonly kind: v.PicklistSchema<["monitor", "slo"], undefined>;
176
+ readonly id: v.StringSchema<undefined>;
177
+ readonly name: v.StringSchema<undefined>;
178
+ readonly state: v.PicklistSchema<["ok", "warn", "alert", "no_data"], undefined>;
179
+ readonly detail: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
180
+ }, undefined>, undefined>, undefined>, undefined>;
181
+ /**
182
+ * Append-only history of the helper-agent attempts this gate dispatched (ci-fixer /
183
+ * conflict-resolver runs), each recorded when its job finished. Lets the UI show what
184
+ * every attempt tried and how it ended, instead of only a bare `attempts` count.
185
+ * Absent for the post-release-health gate (its on-call helper is resolved specially).
186
+ */
187
+ readonly attemptLog: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
188
+ /** 1-based attempt number (matches `attempts` at the time the helper was dispatched). */
189
+ readonly attempt: v.NumberSchema<undefined>;
190
+ /** Epoch ms when the helper job finished. */
191
+ readonly at: v.NumberSchema<undefined>;
192
+ /**
193
+ * How the helper job ended:
194
+ * - `completed` — the container finished (it may or may not have fully fixed the
195
+ * issue; the gate's next precheck is the source of truth, and `summary` carries
196
+ * the agent's own account, e.g. which files it left conflicting).
197
+ * - `failed` — the job errored / was evicted without finishing.
198
+ */
199
+ readonly outcome: v.PicklistSchema<["completed", "failed"], undefined>;
200
+ /** The PR head commit the helper worked against, when known. */
201
+ readonly headSha: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
202
+ /**
203
+ * The fixing instructions handed to the helper for this round — the failing-check
204
+ * summary the CI gate fed the `ci-fixer`, the conflict reason / human-review comments
205
+ * the other gates fed their fixer. Stashed at dispatch and recorded with the attempt so
206
+ * the run-detail UI can show WHAT each round was asked to fix (not only that a round
207
+ * happened) — the gate analogue of the Tester attempt's `concerns`. Null when the gate
208
+ * hands its fixer no textual instructions (the conflicts gate: GitHub reports mergeability
209
+ * as a single bit and the harness leaves the conflict markers for the resolver).
210
+ */
211
+ readonly instructions: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
212
+ /**
213
+ * Structured failing checks handed to this attempt's helper (the CI gate's red check runs
214
+ * behind {@link instructions}), snapshotted at dispatch so each attempt shows the checks it
215
+ * set out to fix. Absent for the conflicts gate (no file-level detail) and when the round
216
+ * carried no structured checks.
217
+ */
218
+ readonly failingChecks: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
219
+ readonly name: v.StringSchema<undefined>;
220
+ /** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
221
+ readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
222
+ /**
223
+ * The check run's GitHub web URL (`html_url`), so the UI can link straight to the
224
+ * failed run's logs. Null when GitHub didn't report one.
225
+ */
226
+ readonly url: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
227
+ /**
228
+ * The repo (owner/name) this check belongs to, on a MULTI-REPO block — so the UI can group
229
+ * failing checks by service. Absent on a single-repo block (there is only the own repo).
230
+ */
231
+ readonly repo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
232
+ }, undefined>, undefined>, undefined>, undefined>;
233
+ /** The helper's own summary (or the failure reason), naming what it did / what remains. */
234
+ readonly summary: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
235
+ }, undefined>, undefined>, undefined>, undefined>;
236
+ /**
237
+ * The number of approving reviews the PR had at the last probe, so the UI can show
238
+ * "1 / N approvals". The "required" side is derived from {@link requiredApprovingReviewCount}
239
+ * via the same `max(1, …)` floor the gate applies (see review.logic.ts) rather than persisted
240
+ * a second time. Absent for the other gates.
241
+ */
242
+ readonly lastApprovals: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
243
+ /**
244
+ * The raw branch-protection required-approving-review count, cached after the FIRST probe
245
+ * resolves it so subsequent polls skip the static protection read (branch protection is repo
246
+ * config, not PR activity — re-reading it every poll over a multi-day review only burns GitHub
247
+ * rate budget). The UI's displayed "required" count is `max(1, this)` (the gate's effective
248
+ * floor). Absent for the other gates.
249
+ */
250
+ readonly requiredApprovingReviewCount: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
251
+ /**
252
+ * The GraphQL ids of the review threads the gate just handed the `fixer`, stashed at
253
+ * dispatch so the helper-completion hook can post a reply + RESOLVE exactly those threads
254
+ * on GitHub before the next probe reads them. Absent for the other gates.
255
+ */
256
+ readonly pendingThreadIds: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
257
+ /**
258
+ * Epoch ms of the newest plain PR comment the gate has already handed the `fixer`. Plain
259
+ * conversation comments (unlike review threads) can't be "resolved" on GitHub, so they are
260
+ * tracked by timestamp: a comment newer than this is outstanding; the dispatch advances it to
261
+ * the batch max. A reviewer's later comment (newer timestamp) re-opens the work. Absent for
262
+ * the other gates.
263
+ */
264
+ readonly lastAddressedCommentAt: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
265
+ /**
266
+ * The grace window (minutes) the human-review gate waits after the latest review comment
267
+ * before dispatching the fixer, resolved from the task's merge preset ONCE on first entry
268
+ * (alongside `maxAttempts`) so the probe doesn't re-resolve the preset every poll. Absent
269
+ * for the other gates.
270
+ */
271
+ readonly humanReviewGraceMinutes: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
272
+ /**
273
+ * A human-initiated freeform fix request parked on the gate (an in-app prompt). Consumed at
274
+ * the top of the next `evaluateGate` pass, which dispatches the fixer with these instructions
275
+ * folded in — bypassing the grace window. Absent for the other gates.
276
+ */
277
+ readonly pendingFix: v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
278
+ readonly instructions: v.StringSchema<undefined>;
279
+ readonly at: v.NumberSchema<undefined>;
280
+ }, undefined>, undefined>, undefined>;
281
+ }, undefined>;
282
+ export type GateStepState = v.InferOutput<typeof gateStepStateSchema>;
283
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B;;;;;;;;;;;GAWG;AACH,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB;;IAEjC,kFAAkF;;IAElF;;;OAGG;;IAEH;;;OAGG;;aAEH,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;IAC5B,yFAAyF;;IAEzF,6CAA6C;;IAE7C;;;;;;OAMG;;IAEH,gEAAgE;;IAEhE;;;;;;;;OAQG;;IAEH;;;;;OAKG;;;QAlDH,kFAAkF;;QAElF;;;WAGG;;QAEH;;;WAGG;;;IA0CH,2FAA2F;;aAE3F,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,eAAO,MAAM,mBAAmB;;IAE9B,kEAAkE;;IAElE,gFAAgF;;IAEhF,gGAAgG;;IAEhG;;;;;OAKG;;IAEH;;;;;OAKG;;;;;;IAUH;;;OAGG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;;QAvGH,kFAAkF;;QAElF;;;WAGG;;QAEH;;;WAGG;;;IA+FH;;;;;;OAMG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;;;;;OAMG;;;;;;;;IAEH;;;;;OAKG;;QAxHH,yFAAyF;;QAEzF,6CAA6C;;QAE7C;;;;;;WAMG;;QAEH,gEAAgE;;QAEhE;;;;;;;;WAQG;;QAEH;;;;;WAKG;;;YAlDH,kFAAkF;;YAElF;;;eAGG;;YAEH;;;eAGG;;;QA0CH,2FAA2F;;;IA4F3F;;;;;OAKG;;IAEH;;;;;;OAMG;;IAEH;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;;;;aASH,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
package/dist/gate.js ADDED
@@ -0,0 +1,209 @@
1
+ import * as v from 'valibot';
2
+ import { releaseSignalSchema } from './release.js';
3
+ // ---------------------------------------------------------------------------
4
+ // Polling-GATE step state — the live loop state a `ci` / `conflicts` /
5
+ // `post-release-health` / `human-review` (or a deployment's own) gate step carries.
6
+ //
7
+ // Split out of `execution.ts` along a cohesive seam (the file-size ratchet: split, never
8
+ // grow), matching how the other per-step-kind state clusters already live in their own
9
+ // modules — `forkDecision.ts`, `judge.ts`. `execution.ts` composes it back onto
10
+ // `PipelineStep` as the `gate` field.
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * State a polling **gate** step carries (today `ci` and `conflicts`). A gate is
14
+ * special (like a `deployer` step): it is NOT itself an LLM/container agent. It
15
+ * runs a programmatic precheck against a provider (CI check runs / PR mergeability)
16
+ * for the PR head commit and only escalates to a helper container agent (`ci-fixer`
17
+ * / `conflict-resolver`) on a negative verdict, looping until the precheck passes or
18
+ * the attempt budget is spent. Which gate a step is comes from its `agentKind`, so it
19
+ * is not duplicated here. See the engine's `GateDefinition` registry.
20
+ * - `phase: 'checking'` — running the precheck / waiting for the provider.
21
+ * - `phase: 'working'` — a helper agent is in flight (tracked via the step's
22
+ * `jobId`); on completion the gate returns to `checking`.
23
+ */
24
+ /** One failing check the CI gate's precheck saw, flattened for display. */
25
+ export const gateFailingCheckSchema = v.object({
26
+ name: v.string(),
27
+ /** GitHub conclusion (e.g. `failure`, `timed_out`), or null when not reported. */
28
+ conclusion: v.nullable(v.string()),
29
+ /**
30
+ * The check run's GitHub web URL (`html_url`), so the UI can link straight to the
31
+ * failed run's logs. Null when GitHub didn't report one.
32
+ */
33
+ url: v.optional(v.nullable(v.string())),
34
+ /**
35
+ * The repo (owner/name) this check belongs to, on a MULTI-REPO block — so the UI can group
36
+ * failing checks by service. Absent on a single-repo block (there is only the own repo).
37
+ */
38
+ repo: v.optional(v.string()),
39
+ });
40
+ /**
41
+ * One helper-agent attempt the gate dispatched (a ci-fixer / conflict-resolver run),
42
+ * recorded when the job finishes so the UI can show what each attempt tried and how it
43
+ * ended — detail that used to be discarded the moment the gate re-probed.
44
+ */
45
+ export const gateAttemptSchema = v.object({
46
+ /** 1-based attempt number (matches `attempts` at the time the helper was dispatched). */
47
+ attempt: v.number(),
48
+ /** Epoch ms when the helper job finished. */
49
+ at: v.number(),
50
+ /**
51
+ * How the helper job ended:
52
+ * - `completed` — the container finished (it may or may not have fully fixed the
53
+ * issue; the gate's next precheck is the source of truth, and `summary` carries
54
+ * the agent's own account, e.g. which files it left conflicting).
55
+ * - `failed` — the job errored / was evicted without finishing.
56
+ */
57
+ outcome: v.picklist(['completed', 'failed']),
58
+ /** The PR head commit the helper worked against, when known. */
59
+ headSha: v.optional(v.nullable(v.string())),
60
+ /**
61
+ * The fixing instructions handed to the helper for this round — the failing-check
62
+ * summary the CI gate fed the `ci-fixer`, the conflict reason / human-review comments
63
+ * the other gates fed their fixer. Stashed at dispatch and recorded with the attempt so
64
+ * the run-detail UI can show WHAT each round was asked to fix (not only that a round
65
+ * happened) — the gate analogue of the Tester attempt's `concerns`. Null when the gate
66
+ * hands its fixer no textual instructions (the conflicts gate: GitHub reports mergeability
67
+ * as a single bit and the harness leaves the conflict markers for the resolver).
68
+ */
69
+ instructions: v.optional(v.nullable(v.string())),
70
+ /**
71
+ * Structured failing checks handed to this attempt's helper (the CI gate's red check runs
72
+ * behind {@link instructions}), snapshotted at dispatch so each attempt shows the checks it
73
+ * set out to fix. Absent for the conflicts gate (no file-level detail) and when the round
74
+ * carried no structured checks.
75
+ */
76
+ failingChecks: v.optional(v.nullable(v.array(gateFailingCheckSchema))),
77
+ /** The helper's own summary (or the failure reason), naming what it did / what remains. */
78
+ summary: v.optional(v.nullable(v.string())),
79
+ });
80
+ export const gateStepStateSchema = v.object({
81
+ phase: v.picklist(['checking', 'working']),
82
+ /** How many helper-agent attempts have been dispatched so far. */
83
+ attempts: v.number(),
84
+ /** Ceiling on attempts, resolved from the task's merge preset at step start. */
85
+ maxAttempts: v.number(),
86
+ /** The PR head commit being gated, once resolved (the own-service PR on a multi-repo block). */
87
+ headSha: v.optional(v.nullable(v.string())),
88
+ /**
89
+ * Per-PR head commits for a MULTI-REPO block (service-connections phase 4), keyed by repo
90
+ * full name (owner/name) — own-service PR plus each peer-service PR. Set by the CI /
91
+ * conflicts gates whose precheck aggregates across every PR the task opened. Absent for a
92
+ * single-repo block (the scalar {@link headSha} is the only head).
93
+ */
94
+ headShas: v.optional(v.nullable(v.record(v.string(), v.string()))),
95
+ /**
96
+ * The repo the conflicts gate's most recent `fail` verdict found conflicted, so the
97
+ * single-repo conflict-resolver is dispatched at THAT repo (own-service or a peer) rather
98
+ * than always the own-service one. Absent ⇒ the own-service repo. Only the conflicts gate
99
+ * sets it (the CI-fixer runs across all repos, so the CI gate leaves it undefined).
100
+ */
101
+ conflictTarget: v.optional(v.nullable(v.object({
102
+ repo: v.string(),
103
+ frameId: v.optional(v.string()),
104
+ branch: v.optional(v.string()),
105
+ }))),
106
+ /**
107
+ * The most recent precheck verdict, so the UI can show why the gate is looping
108
+ * (failing → a helper is fixing) vs idle-passing. Set on every probe.
109
+ */
110
+ lastVerdict: v.optional(v.nullable(v.picklist(['pass', 'pending', 'fail']))),
111
+ /**
112
+ * Human-readable summary of the latest failing precheck (the failing CI checks /
113
+ * the conflict reason) — the conclusion detail that used to be fed only to the
114
+ * helper agent and then discarded. Carried across the helper dispatch so the
115
+ * window keeps showing what is being fixed. Null when the last probe passed.
116
+ */
117
+ lastFailureSummary: v.optional(v.nullable(v.string())),
118
+ /**
119
+ * Structured failing checks behind {@link lastFailureSummary} for the CI gate, so
120
+ * the UI can list each red check by name + conclusion. Absent for the conflicts
121
+ * gate (GitHub reports no file-level detail) and when the last probe passed.
122
+ */
123
+ failingChecks: v.optional(v.nullable(v.array(gateFailingCheckSchema))),
124
+ /**
125
+ * The fixing instructions handed to the most-recently dispatched helper (the failing-check
126
+ * summary / conflict reason / human fix prompt), stashed at dispatch so the attempt recorded
127
+ * when that helper's job settles can carry WHAT the round was asked to fix onto its
128
+ * {@link gateAttemptSchema} entry. Transient bookkeeping — the durable per-round history lives
129
+ * on {@link attemptLog}. Null when the gate hands its fixer no textual instructions.
130
+ */
131
+ lastDispatchedInstructions: v.optional(v.nullable(v.string())),
132
+ /**
133
+ * Epoch ms of the release marker for a time-windowed gate (post-release-health) — the
134
+ * moment it began watching the deployed release. The gate keeps polling `pending`
135
+ * until this + the preset's watch window has elapsed (then a clean run passes) or a
136
+ * monitor/SLO regresses (then it escalates to the on-call agent). Absent for the
137
+ * CI/conflicts gates.
138
+ */
139
+ watchSince: v.optional(v.nullable(v.number())),
140
+ /**
141
+ * The watch-window length (minutes) for a time-windowed gate (post-release-health),
142
+ * resolved from the task's merge preset ONCE on first entry (alongside `maxAttempts`)
143
+ * so the probe doesn't re-load the block + re-resolve the preset on every poll. Absent
144
+ * for the CI/conflicts gates.
145
+ */
146
+ watchWindowMinutes: v.optional(v.nullable(v.number())),
147
+ /**
148
+ * The regressed signals captured when the post-release-health gate escalated to the
149
+ * on-call agent, so the agent's completion handler can build the `release_regression`
150
+ * notification + incident enrichment from the SAME evidence the agent investigated
151
+ * — rather than re-reading Datadog (a third round-trip that could also disagree with
152
+ * what the agent saw if the window moved). Absent for the CI/conflicts gates.
153
+ */
154
+ regressedSignals: v.optional(v.nullable(v.array(releaseSignalSchema))),
155
+ /**
156
+ * Append-only history of the helper-agent attempts this gate dispatched (ci-fixer /
157
+ * conflict-resolver runs), each recorded when its job finished. Lets the UI show what
158
+ * every attempt tried and how it ended, instead of only a bare `attempts` count.
159
+ * Absent for the post-release-health gate (its on-call helper is resolved specially).
160
+ */
161
+ attemptLog: v.optional(v.nullable(v.array(gateAttemptSchema))),
162
+ // ---- human-review gate only (absent for the CI/conflicts/post-release-health gates) ----
163
+ /**
164
+ * The number of approving reviews the PR had at the last probe, so the UI can show
165
+ * "1 / N approvals". The "required" side is derived from {@link requiredApprovingReviewCount}
166
+ * via the same `max(1, …)` floor the gate applies (see review.logic.ts) rather than persisted
167
+ * a second time. Absent for the other gates.
168
+ */
169
+ lastApprovals: v.optional(v.nullable(v.number())),
170
+ /**
171
+ * The raw branch-protection required-approving-review count, cached after the FIRST probe
172
+ * resolves it so subsequent polls skip the static protection read (branch protection is repo
173
+ * config, not PR activity — re-reading it every poll over a multi-day review only burns GitHub
174
+ * rate budget). The UI's displayed "required" count is `max(1, this)` (the gate's effective
175
+ * floor). Absent for the other gates.
176
+ */
177
+ requiredApprovingReviewCount: v.optional(v.nullable(v.number())),
178
+ /**
179
+ * The GraphQL ids of the review threads the gate just handed the `fixer`, stashed at
180
+ * dispatch so the helper-completion hook can post a reply + RESOLVE exactly those threads
181
+ * on GitHub before the next probe reads them. Absent for the other gates.
182
+ */
183
+ pendingThreadIds: v.optional(v.nullable(v.array(v.string()))),
184
+ /**
185
+ * Epoch ms of the newest plain PR comment the gate has already handed the `fixer`. Plain
186
+ * conversation comments (unlike review threads) can't be "resolved" on GitHub, so they are
187
+ * tracked by timestamp: a comment newer than this is outstanding; the dispatch advances it to
188
+ * the batch max. A reviewer's later comment (newer timestamp) re-opens the work. Absent for
189
+ * the other gates.
190
+ */
191
+ lastAddressedCommentAt: v.optional(v.nullable(v.number())),
192
+ /**
193
+ * The grace window (minutes) the human-review gate waits after the latest review comment
194
+ * before dispatching the fixer, resolved from the task's merge preset ONCE on first entry
195
+ * (alongside `maxAttempts`) so the probe doesn't re-resolve the preset every poll. Absent
196
+ * for the other gates.
197
+ */
198
+ humanReviewGraceMinutes: v.optional(v.nullable(v.number())),
199
+ /**
200
+ * A human-initiated freeform fix request parked on the gate (an in-app prompt). Consumed at
201
+ * the top of the next `evaluateGate` pass, which dispatches the fixer with these instructions
202
+ * folded in — bypassing the grace window. Absent for the other gates.
203
+ */
204
+ pendingFix: v.optional(v.nullable(v.object({
205
+ instructions: v.string(),
206
+ at: v.number(),
207
+ }))),
208
+ });
209
+ //# sourceMappingURL=gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.js","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAElD,8EAA8E;AAC9E,uEAAuE;AACvE,oFAAoF;AACpF,EAAE;AACF,yFAAyF;AACzF,uFAAuF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AsB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1D;;;;;OAKG;IACH,uBAAuB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3D;;;;OAIG;IACH,UAAU,EAAE,CAAC,CAAC,QAAQ,CACpB,CAAC,CAAC,QAAQ,CACR,CAAC,CAAC,MAAM,CAAC;QACP,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;QACxB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;KACf,CAAC,CACH,CACF;CACF,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -42,6 +42,8 @@ export * from './requirements.js';
42
42
  export * from './doc-interview.js';
43
43
  export * from './followUp.js';
44
44
  export * from './forkDecision.js';
45
+ export * from './gate.js';
46
+ export * from './judge.js';
45
47
  export * from './ralph.js';
46
48
  export * from './validation-checks.js';
47
49
  export * from './reproduction.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC,cAAc,WAAW,CAA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CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -42,6 +42,8 @@ export * from './requirements.js';
42
42
  export * from './doc-interview.js';
43
43
  export * from './followUp.js';
44
44
  export * from './forkDecision.js';
45
+ export * from './gate.js';
46
+ export * from './judge.js';
45
47
  export * from './ralph.js';
46
48
  export * from './validation-checks.js';
47
49
  export * from './reproduction.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,wBAAwB,CAAA;AACtC,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe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