@fungi.computer/braid 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +260 -2
  3. package/dist/cloudflare/graph-engine.d.ts +25 -0
  4. package/dist/cloudflare/graph-engine.js +46 -0
  5. package/dist/cloudflare/graph-program.d.ts +6 -0
  6. package/dist/cloudflare/graph-program.js +550 -0
  7. package/dist/cloudflare/index.d.ts +1 -0
  8. package/dist/cloudflare/index.js +1 -0
  9. package/dist/code-execution.d.ts +16 -0
  10. package/dist/code-execution.js +50 -0
  11. package/dist/code-result.d.ts +11 -0
  12. package/dist/code-result.js +19 -0
  13. package/dist/code-sandbox.d.ts +9 -0
  14. package/dist/code-sandbox.js +13 -0
  15. package/dist/compile.d.ts +43 -0
  16. package/dist/compile.js +248 -0
  17. package/dist/execution.d.ts +194 -0
  18. package/dist/execution.js +130 -0
  19. package/dist/expressions.d.ts +16 -0
  20. package/dist/expressions.js +322 -0
  21. package/dist/git-access.d.ts +59 -0
  22. package/dist/git-access.js +106 -0
  23. package/dist/index.d.ts +9 -0
  24. package/dist/index.js +9 -0
  25. package/dist/ports.d.ts +58 -0
  26. package/dist/ports.js +256 -0
  27. package/dist/review-text.d.ts +15 -0
  28. package/dist/review-text.js +40 -0
  29. package/dist/runtime/arming-authority.d.ts +83 -0
  30. package/dist/runtime/arming-authority.js +90 -0
  31. package/dist/runtime/bindings.d.ts +25 -0
  32. package/dist/runtime/bindings.js +41 -0
  33. package/dist/runtime/capture.d.ts +18 -0
  34. package/dist/runtime/capture.js +99 -0
  35. package/dist/runtime/git-pass-contract.d.ts +63 -0
  36. package/dist/runtime/git-pass-contract.js +36 -0
  37. package/dist/runtime/git-pass-store.d.ts +32 -0
  38. package/dist/runtime/git-pass-store.js +82 -0
  39. package/dist/runtime/git-pass.d.ts +41 -0
  40. package/dist/runtime/git-pass.js +72 -0
  41. package/dist/runtime/graph-contract.d.ts +788 -0
  42. package/dist/runtime/graph-contract.js +122 -0
  43. package/dist/runtime/graph-dispatch.d.ts +31 -0
  44. package/dist/runtime/graph-dispatch.js +111 -0
  45. package/dist/runtime/graph-run-store.d.ts +79 -0
  46. package/dist/runtime/graph-run-store.js +267 -0
  47. package/dist/runtime/graph-start.d.ts +90 -0
  48. package/dist/runtime/graph-start.js +124 -0
  49. package/dist/runtime/index.d.ts +20 -0
  50. package/dist/runtime/index.js +20 -0
  51. package/dist/runtime/ports.d.ts +156 -0
  52. package/dist/runtime/ports.js +1 -0
  53. package/dist/runtime/run-authority.d.ts +60 -0
  54. package/dist/runtime/run-authority.js +145 -0
  55. package/dist/runtime/run-ceiling.d.ts +106 -0
  56. package/dist/runtime/run-ceiling.js +23 -0
  57. package/dist/runtime/run-member.d.ts +3 -0
  58. package/dist/runtime/run-member.js +12 -0
  59. package/dist/runtime/run-owner.d.ts +1650 -0
  60. package/dist/runtime/run-owner.js +513 -0
  61. package/dist/runtime/run-report.d.ts +14 -0
  62. package/dist/runtime/run-report.js +23 -0
  63. package/dist/runtime/schedules.d.ts +39 -0
  64. package/dist/runtime/schedules.js +149 -0
  65. package/dist/runtime/stored-trigger-rows.d.ts +12 -0
  66. package/dist/runtime/stored-trigger-rows.js +17 -0
  67. package/dist/runtime/trigger-owner.d.ts +594 -0
  68. package/dist/runtime/trigger-owner.js +280 -0
  69. package/dist/runtime/trigger-plans.d.ts +774 -0
  70. package/dist/runtime/trigger-plans.js +62 -0
  71. package/dist/runtime/trigger-router.d.ts +34 -0
  72. package/dist/runtime/trigger-router.js +143 -0
  73. package/dist/runtime/trigger-run-reservations.d.ts +28 -0
  74. package/dist/runtime/trigger-run-reservations.js +114 -0
  75. package/dist/schema.d.ts +1183 -0
  76. package/dist/schema.js +239 -0
  77. package/dist/triggers.d.ts +46 -0
  78. package/dist/triggers.js +75 -0
  79. package/dist/validate.d.ts +25 -0
  80. package/dist/validate.js +686 -0
  81. package/dist/workflow-id.d.ts +3 -0
  82. package/dist/workflow-id.js +3 -0
  83. package/package.json +96 -3
@@ -0,0 +1,1183 @@
1
+ import * as S from "effect/Schema";
2
+ /** Same byte/depth envelope as the App API projection. */
3
+ export declare const projectionSchema: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
4
+ export declare const portRefSchema: S.Struct<{
5
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
6
+ readonly port: S.String;
7
+ }>;
8
+ export declare const valueSchema: S.Union<readonly [S.Struct<{
9
+ readonly literal: S.Codec<S.Json, S.Json, never, never>;
10
+ }>, S.Struct<{
11
+ readonly template: S.String;
12
+ }>]>;
13
+ declare const fromSchema: S.Struct<{
14
+ readonly from: S.Struct<{
15
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
16
+ readonly port: S.String;
17
+ }>;
18
+ readonly path: S.optionalKey<S.String>;
19
+ }>;
20
+ export type Mapping = typeof fromSchema.Type | typeof valueSchema.Type | {
21
+ readonly coalesce: readonly Mapping[];
22
+ } | {
23
+ readonly object: Readonly<Record<string, Mapping>>;
24
+ } | {
25
+ readonly array: readonly Mapping[];
26
+ } | {
27
+ readonly each: {
28
+ readonly over: Mapping;
29
+ readonly body: Mapping;
30
+ readonly maxItems: number;
31
+ };
32
+ };
33
+ export declare const mappingSchema: S.Codec<Mapping>;
34
+ export type Predicate = {
35
+ readonly op: "eq" | "neq" | "gt" | "lt" | "in";
36
+ readonly left: Mapping;
37
+ readonly right: Mapping;
38
+ } | {
39
+ readonly op: "exists";
40
+ readonly value: Mapping;
41
+ } | {
42
+ readonly op: "and" | "or";
43
+ readonly tests: readonly Predicate[];
44
+ } | {
45
+ readonly op: "not";
46
+ readonly test: Predicate;
47
+ };
48
+ export declare const predicateSchema: S.Codec<Predicate>;
49
+ /** JavaScript body and declared data only; the whole graph also bounds UTF-8 bytes. */
50
+ export declare const codeNodeSchema: S.Struct<{
51
+ readonly id: S.String;
52
+ readonly kind: S.Literal<"code">;
53
+ readonly source: S.String;
54
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
55
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
56
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
57
+ }>;
58
+ export type CodeNode = typeof codeNodeSchema.Type;
59
+ export declare const nodeSchema: S.Union<readonly [S.Struct<{
60
+ readonly id: S.String;
61
+ readonly kind: S.Literal<"code">;
62
+ readonly source: S.String;
63
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
64
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
65
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
66
+ }>, S.Struct<{
67
+ readonly id: S.String;
68
+ readonly kind: S.Literal<"app">;
69
+ readonly app: S.String;
70
+ readonly method: S.String;
71
+ readonly methodDigest: S.String;
72
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
73
+ readonly gitAccess: S.optionalKey<S.declare<{
74
+ binding: string;
75
+ repository: string;
76
+ branches: string[];
77
+ } | {
78
+ binding: string;
79
+ repository: string;
80
+ access: "read";
81
+ }, {
82
+ binding: string;
83
+ repository: string;
84
+ branches: string[];
85
+ } | {
86
+ binding: string;
87
+ repository: string;
88
+ access: "read";
89
+ }>>;
90
+ readonly retry: S.optionalKey<S.Struct<{
91
+ readonly attempts: S.Number;
92
+ }>>;
93
+ }>, S.Struct<{
94
+ readonly id: S.String;
95
+ readonly kind: S.Literal<"review">;
96
+ readonly title: S.String;
97
+ /**
98
+ * One plain line under the title saying where the run is, such as
99
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
100
+ * filled from the loops around the review (see `fillReviewText`).
101
+ */
102
+ readonly detail: S.optionalKey<S.String>;
103
+ readonly show: S.$Array<S.Struct<{
104
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
105
+ readonly port: S.String;
106
+ }>>;
107
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
108
+ readonly timeout: S.Number;
109
+ /**
110
+ * Named outcomes a reviewer picks from; each is an output port carrying
111
+ * the shown item. Without choices the review approves or rejects. A
112
+ * choice's `description` says in plain words what picking it does, with
113
+ * the same placeholders as `detail`.
114
+ */
115
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
116
+ readonly id: S.String;
117
+ readonly label: S.String;
118
+ readonly description: S.optionalKey<S.String>;
119
+ }>>>;
120
+ }>, S.Struct<{
121
+ readonly id: S.String;
122
+ readonly kind: S.Literal<"condition">;
123
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
124
+ }>, S.Struct<{
125
+ readonly id: S.String;
126
+ readonly kind: S.Literal<"map">;
127
+ readonly over: S.Struct<{
128
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
129
+ readonly port: S.String;
130
+ }>;
131
+ readonly body: S.String;
132
+ readonly concurrency: S.Number;
133
+ readonly maxItems: S.Number;
134
+ }>, S.Struct<{
135
+ readonly id: S.String;
136
+ readonly kind: S.Literal<"repeat">;
137
+ readonly body: S.String;
138
+ readonly maxRounds: S.Number;
139
+ /** The predicate reads the completed body's output through $input. */
140
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
141
+ }>, S.Struct<{
142
+ readonly id: S.String;
143
+ readonly kind: S.Literal<"wait">;
144
+ readonly for: S.Number;
145
+ }>, S.Struct<{
146
+ readonly id: S.String;
147
+ readonly kind: S.Literal<"transform">;
148
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
149
+ }>]>;
150
+ export declare const edgeSchema: S.Struct<{
151
+ readonly from: S.Struct<{
152
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
153
+ readonly port: S.String;
154
+ }>;
155
+ readonly to: S.Struct<{
156
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
157
+ readonly port: S.String;
158
+ }>;
159
+ }>;
160
+ /**
161
+ * Ports of the event a trigger receives. Inside a trigger, `$input` names this
162
+ * event, not the run input: the trigger maps it onto the run's `$input`. Every
163
+ * port is the same on a redelivery of the same event, so a redelivery maps to
164
+ * the same run input and replays instead of conflicting.
165
+ */
166
+ export declare const TRIGGER_EVENT_PORTS: {
167
+ readonly webhook: readonly ["body", "eventId", "headers"];
168
+ readonly schedule: readonly ["scheduledAt", "eventId"];
169
+ readonly event: readonly ["payload", "eventId"];
170
+ };
171
+ export declare const graphSchema: S.Struct<{
172
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
173
+ readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
174
+ readonly id: S.String;
175
+ readonly kind: S.Literal<"code">;
176
+ readonly source: S.String;
177
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
178
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
179
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
180
+ }>, S.Struct<{
181
+ readonly id: S.String;
182
+ readonly kind: S.Literal<"app">;
183
+ readonly app: S.String;
184
+ readonly method: S.String;
185
+ readonly methodDigest: S.String;
186
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
187
+ readonly gitAccess: S.optionalKey<S.declare<{
188
+ binding: string;
189
+ repository: string;
190
+ branches: string[];
191
+ } | {
192
+ binding: string;
193
+ repository: string;
194
+ access: "read";
195
+ }, {
196
+ binding: string;
197
+ repository: string;
198
+ branches: string[];
199
+ } | {
200
+ binding: string;
201
+ repository: string;
202
+ access: "read";
203
+ }>>;
204
+ readonly retry: S.optionalKey<S.Struct<{
205
+ readonly attempts: S.Number;
206
+ }>>;
207
+ }>, S.Struct<{
208
+ readonly id: S.String;
209
+ readonly kind: S.Literal<"review">;
210
+ readonly title: S.String;
211
+ /**
212
+ * One plain line under the title saying where the run is, such as
213
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
214
+ * filled from the loops around the review (see `fillReviewText`).
215
+ */
216
+ readonly detail: S.optionalKey<S.String>;
217
+ readonly show: S.$Array<S.Struct<{
218
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
219
+ readonly port: S.String;
220
+ }>>;
221
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
222
+ readonly timeout: S.Number;
223
+ /**
224
+ * Named outcomes a reviewer picks from; each is an output port carrying
225
+ * the shown item. Without choices the review approves or rejects. A
226
+ * choice's `description` says in plain words what picking it does, with
227
+ * the same placeholders as `detail`.
228
+ */
229
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
230
+ readonly id: S.String;
231
+ readonly label: S.String;
232
+ readonly description: S.optionalKey<S.String>;
233
+ }>>>;
234
+ }>, S.Struct<{
235
+ readonly id: S.String;
236
+ readonly kind: S.Literal<"condition">;
237
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
238
+ }>, S.Struct<{
239
+ readonly id: S.String;
240
+ readonly kind: S.Literal<"map">;
241
+ readonly over: S.Struct<{
242
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
243
+ readonly port: S.String;
244
+ }>;
245
+ readonly body: S.String;
246
+ readonly concurrency: S.Number;
247
+ readonly maxItems: S.Number;
248
+ }>, S.Struct<{
249
+ readonly id: S.String;
250
+ readonly kind: S.Literal<"repeat">;
251
+ readonly body: S.String;
252
+ readonly maxRounds: S.Number;
253
+ /** The predicate reads the completed body's output through $input. */
254
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
255
+ }>, S.Struct<{
256
+ readonly id: S.String;
257
+ readonly kind: S.Literal<"wait">;
258
+ readonly for: S.Number;
259
+ }>, S.Struct<{
260
+ readonly id: S.String;
261
+ readonly kind: S.Literal<"transform">;
262
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
263
+ }>]>>;
264
+ readonly edges: S.$Array<S.Struct<{
265
+ readonly from: S.Struct<{
266
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
267
+ readonly port: S.String;
268
+ }>;
269
+ readonly to: S.Struct<{
270
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
271
+ readonly port: S.String;
272
+ }>;
273
+ }>>;
274
+ readonly output: S.$Record<S.String, S.Struct<{
275
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
276
+ readonly port: S.String;
277
+ }>>;
278
+ }>;
279
+ export declare const workflowDefinitionSchema: S.Struct<{
280
+ readonly format: S.Literal<"fungi.workflow/v1">;
281
+ readonly title: S.String;
282
+ readonly description: S.optionalKey<S.String>;
283
+ readonly apps: S.$Record<S.String, S.Struct<{
284
+ readonly appId: S.String;
285
+ readonly role: S.optionalKey<S.String>;
286
+ }>>;
287
+ readonly subgraphs: S.optionalKey<S.$Record<S.String, S.Struct<{
288
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
289
+ readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
290
+ readonly id: S.String;
291
+ readonly kind: S.Literal<"code">;
292
+ readonly source: S.String;
293
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
294
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
295
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
296
+ }>, S.Struct<{
297
+ readonly id: S.String;
298
+ readonly kind: S.Literal<"app">;
299
+ readonly app: S.String;
300
+ readonly method: S.String;
301
+ readonly methodDigest: S.String;
302
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
303
+ readonly gitAccess: S.optionalKey<S.declare<{
304
+ binding: string;
305
+ repository: string;
306
+ branches: string[];
307
+ } | {
308
+ binding: string;
309
+ repository: string;
310
+ access: "read";
311
+ }, {
312
+ binding: string;
313
+ repository: string;
314
+ branches: string[];
315
+ } | {
316
+ binding: string;
317
+ repository: string;
318
+ access: "read";
319
+ }>>;
320
+ readonly retry: S.optionalKey<S.Struct<{
321
+ readonly attempts: S.Number;
322
+ }>>;
323
+ }>, S.Struct<{
324
+ readonly id: S.String;
325
+ readonly kind: S.Literal<"review">;
326
+ readonly title: S.String;
327
+ /**
328
+ * One plain line under the title saying where the run is, such as
329
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
330
+ * filled from the loops around the review (see `fillReviewText`).
331
+ */
332
+ readonly detail: S.optionalKey<S.String>;
333
+ readonly show: S.$Array<S.Struct<{
334
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
335
+ readonly port: S.String;
336
+ }>>;
337
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
338
+ readonly timeout: S.Number;
339
+ /**
340
+ * Named outcomes a reviewer picks from; each is an output port carrying
341
+ * the shown item. Without choices the review approves or rejects. A
342
+ * choice's `description` says in plain words what picking it does, with
343
+ * the same placeholders as `detail`.
344
+ */
345
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
346
+ readonly id: S.String;
347
+ readonly label: S.String;
348
+ readonly description: S.optionalKey<S.String>;
349
+ }>>>;
350
+ }>, S.Struct<{
351
+ readonly id: S.String;
352
+ readonly kind: S.Literal<"condition">;
353
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
354
+ }>, S.Struct<{
355
+ readonly id: S.String;
356
+ readonly kind: S.Literal<"map">;
357
+ readonly over: S.Struct<{
358
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
359
+ readonly port: S.String;
360
+ }>;
361
+ readonly body: S.String;
362
+ readonly concurrency: S.Number;
363
+ readonly maxItems: S.Number;
364
+ }>, S.Struct<{
365
+ readonly id: S.String;
366
+ readonly kind: S.Literal<"repeat">;
367
+ readonly body: S.String;
368
+ readonly maxRounds: S.Number;
369
+ /** The predicate reads the completed body's output through $input. */
370
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
371
+ }>, S.Struct<{
372
+ readonly id: S.String;
373
+ readonly kind: S.Literal<"wait">;
374
+ readonly for: S.Number;
375
+ }>, S.Struct<{
376
+ readonly id: S.String;
377
+ readonly kind: S.Literal<"transform">;
378
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
379
+ }>]>>;
380
+ readonly edges: S.$Array<S.Struct<{
381
+ readonly from: S.Struct<{
382
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
383
+ readonly port: S.String;
384
+ }>;
385
+ readonly to: S.Struct<{
386
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
387
+ readonly port: S.String;
388
+ }>;
389
+ }>>;
390
+ readonly output: S.$Record<S.String, S.Struct<{
391
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
392
+ readonly port: S.String;
393
+ }>>;
394
+ }>>>;
395
+ readonly triggers: S.optionalKey<S.$Array<S.Union<readonly [S.Struct<{
396
+ readonly id: S.String;
397
+ readonly on: S.Literal<"webhook">;
398
+ readonly title: S.optionalKey<S.String>;
399
+ readonly when: S.optionalKey<S.Codec<Predicate, Predicate, never, never>>;
400
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
401
+ }>, S.Struct<{
402
+ readonly id: S.String;
403
+ readonly on: S.Literal<"schedule">;
404
+ readonly title: S.optionalKey<S.String>;
405
+ readonly cron: S.Struct<{
406
+ readonly expression: S.String;
407
+ readonly timeZone: S.String;
408
+ }>;
409
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
410
+ }>, S.Struct<{
411
+ readonly id: S.String;
412
+ readonly on: S.Literal<"event">;
413
+ readonly title: S.optionalKey<S.String>;
414
+ readonly app: S.String;
415
+ readonly event: S.String;
416
+ readonly eventDigest: S.String;
417
+ readonly when: S.optionalKey<S.Codec<Predicate, Predicate, never, never>>;
418
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
419
+ /**
420
+ * The one repository, in the event App's own Git namespace, this event is
421
+ * about. A node's `gitAccess` names it as `$trigger.repository`.
422
+ */
423
+ readonly repository: S.optionalKey<S.Codec<Mapping, Mapping, never, never>>;
424
+ }>]>>>;
425
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
426
+ readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
427
+ readonly id: S.String;
428
+ readonly kind: S.Literal<"code">;
429
+ readonly source: S.String;
430
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
431
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
432
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
433
+ }>, S.Struct<{
434
+ readonly id: S.String;
435
+ readonly kind: S.Literal<"app">;
436
+ readonly app: S.String;
437
+ readonly method: S.String;
438
+ readonly methodDigest: S.String;
439
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
440
+ readonly gitAccess: S.optionalKey<S.declare<{
441
+ binding: string;
442
+ repository: string;
443
+ branches: string[];
444
+ } | {
445
+ binding: string;
446
+ repository: string;
447
+ access: "read";
448
+ }, {
449
+ binding: string;
450
+ repository: string;
451
+ branches: string[];
452
+ } | {
453
+ binding: string;
454
+ repository: string;
455
+ access: "read";
456
+ }>>;
457
+ readonly retry: S.optionalKey<S.Struct<{
458
+ readonly attempts: S.Number;
459
+ }>>;
460
+ }>, S.Struct<{
461
+ readonly id: S.String;
462
+ readonly kind: S.Literal<"review">;
463
+ readonly title: S.String;
464
+ /**
465
+ * One plain line under the title saying where the run is, such as
466
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
467
+ * filled from the loops around the review (see `fillReviewText`).
468
+ */
469
+ readonly detail: S.optionalKey<S.String>;
470
+ readonly show: S.$Array<S.Struct<{
471
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
472
+ readonly port: S.String;
473
+ }>>;
474
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
475
+ readonly timeout: S.Number;
476
+ /**
477
+ * Named outcomes a reviewer picks from; each is an output port carrying
478
+ * the shown item. Without choices the review approves or rejects. A
479
+ * choice's `description` says in plain words what picking it does, with
480
+ * the same placeholders as `detail`.
481
+ */
482
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
483
+ readonly id: S.String;
484
+ readonly label: S.String;
485
+ readonly description: S.optionalKey<S.String>;
486
+ }>>>;
487
+ }>, S.Struct<{
488
+ readonly id: S.String;
489
+ readonly kind: S.Literal<"condition">;
490
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
491
+ }>, S.Struct<{
492
+ readonly id: S.String;
493
+ readonly kind: S.Literal<"map">;
494
+ readonly over: S.Struct<{
495
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
496
+ readonly port: S.String;
497
+ }>;
498
+ readonly body: S.String;
499
+ readonly concurrency: S.Number;
500
+ readonly maxItems: S.Number;
501
+ }>, S.Struct<{
502
+ readonly id: S.String;
503
+ readonly kind: S.Literal<"repeat">;
504
+ readonly body: S.String;
505
+ readonly maxRounds: S.Number;
506
+ /** The predicate reads the completed body's output through $input. */
507
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
508
+ }>, S.Struct<{
509
+ readonly id: S.String;
510
+ readonly kind: S.Literal<"wait">;
511
+ readonly for: S.Number;
512
+ }>, S.Struct<{
513
+ readonly id: S.String;
514
+ readonly kind: S.Literal<"transform">;
515
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
516
+ }>]>>;
517
+ readonly edges: S.$Array<S.Struct<{
518
+ readonly from: S.Struct<{
519
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
520
+ readonly port: S.String;
521
+ }>;
522
+ readonly to: S.Struct<{
523
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
524
+ readonly port: S.String;
525
+ }>;
526
+ }>>;
527
+ readonly output: S.$Record<S.String, S.Struct<{
528
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
529
+ readonly port: S.String;
530
+ }>>;
531
+ }>;
532
+ /** Structural App API method shape from T1; digests are supplied by its catalog owner. */
533
+ export declare const methodSchema: S.Struct<{
534
+ /** This method may yield Agar Pending before its completed output. */
535
+ readonly pending: S.optionalKey<S.Literal<true>>;
536
+ readonly description: S.String;
537
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
538
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
539
+ readonly effect: S.Literals<readonly ["read", "write", "external"]>;
540
+ readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
541
+ readonly requires: S.$Array<S.String>;
542
+ }>;
543
+ export declare const eventSchema: S.Struct<{
544
+ readonly description: S.String;
545
+ readonly payload: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
546
+ }>;
547
+ export declare const catalogSchema: S.$Record<S.String, S.Struct<{
548
+ readonly methods: S.$Record<S.String, S.Struct<{
549
+ readonly digest: S.String;
550
+ /** This method may yield Agar Pending before its completed output. */
551
+ readonly pending: S.optionalKey<S.Literal<true>>;
552
+ readonly description: S.String;
553
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
554
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
555
+ readonly effect: S.Literals<readonly ["read", "write", "external"]>;
556
+ readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
557
+ readonly requires: S.$Array<S.String>;
558
+ }>>;
559
+ readonly events: S.optionalKey<S.$Record<S.String, S.Struct<{
560
+ readonly digest: S.String;
561
+ readonly description: S.String;
562
+ readonly payload: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
563
+ }>>>;
564
+ }>>;
565
+ export declare const bindingsSchema: S.$Record<S.String, S.declare<{
566
+ kind: "team-source";
567
+ } | {
568
+ appId: string;
569
+ installationId: string;
570
+ }, {
571
+ kind: "team-source";
572
+ } | {
573
+ appId: string;
574
+ installationId: string;
575
+ }>>;
576
+ export type WorkflowDefinition = typeof workflowDefinitionSchema.Type;
577
+ export type Graph = typeof graphSchema.Type;
578
+ export type Node = typeof nodeSchema.Type;
579
+ export type PortRef = typeof portRefSchema.Type;
580
+ export type Json = S.Json;
581
+ export type JsonSchemaProjection = typeof projectionSchema.Type;
582
+ export type Catalog = typeof catalogSchema.Type;
583
+ export type Bindings = typeof bindingsSchema.Type;
584
+ export type Method = typeof methodSchema.Type;
585
+ export declare const planContentSchema: S.Struct<{
586
+ readonly definition: S.Struct<{
587
+ readonly format: S.Literal<"fungi.workflow/v1">;
588
+ readonly title: S.String;
589
+ readonly description: S.optionalKey<S.String>;
590
+ readonly apps: S.$Record<S.String, S.Struct<{
591
+ readonly appId: S.String;
592
+ readonly role: S.optionalKey<S.String>;
593
+ }>>;
594
+ readonly subgraphs: S.optionalKey<S.$Record<S.String, S.Struct<{
595
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
596
+ readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
597
+ readonly id: S.String;
598
+ readonly kind: S.Literal<"code">;
599
+ readonly source: S.String;
600
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
601
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
602
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
603
+ }>, S.Struct<{
604
+ readonly id: S.String;
605
+ readonly kind: S.Literal<"app">;
606
+ readonly app: S.String;
607
+ readonly method: S.String;
608
+ readonly methodDigest: S.String;
609
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
610
+ readonly gitAccess: S.optionalKey<S.declare<{
611
+ binding: string;
612
+ repository: string;
613
+ branches: string[];
614
+ } | {
615
+ binding: string;
616
+ repository: string;
617
+ access: "read";
618
+ }, {
619
+ binding: string;
620
+ repository: string;
621
+ branches: string[];
622
+ } | {
623
+ binding: string;
624
+ repository: string;
625
+ access: "read";
626
+ }>>;
627
+ readonly retry: S.optionalKey<S.Struct<{
628
+ readonly attempts: S.Number;
629
+ }>>;
630
+ }>, S.Struct<{
631
+ readonly id: S.String;
632
+ readonly kind: S.Literal<"review">;
633
+ readonly title: S.String;
634
+ /**
635
+ * One plain line under the title saying where the run is, such as
636
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
637
+ * filled from the loops around the review (see `fillReviewText`).
638
+ */
639
+ readonly detail: S.optionalKey<S.String>;
640
+ readonly show: S.$Array<S.Struct<{
641
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
642
+ readonly port: S.String;
643
+ }>>;
644
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
645
+ readonly timeout: S.Number;
646
+ /**
647
+ * Named outcomes a reviewer picks from; each is an output port carrying
648
+ * the shown item. Without choices the review approves or rejects. A
649
+ * choice's `description` says in plain words what picking it does, with
650
+ * the same placeholders as `detail`.
651
+ */
652
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
653
+ readonly id: S.String;
654
+ readonly label: S.String;
655
+ readonly description: S.optionalKey<S.String>;
656
+ }>>>;
657
+ }>, S.Struct<{
658
+ readonly id: S.String;
659
+ readonly kind: S.Literal<"condition">;
660
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
661
+ }>, S.Struct<{
662
+ readonly id: S.String;
663
+ readonly kind: S.Literal<"map">;
664
+ readonly over: S.Struct<{
665
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
666
+ readonly port: S.String;
667
+ }>;
668
+ readonly body: S.String;
669
+ readonly concurrency: S.Number;
670
+ readonly maxItems: S.Number;
671
+ }>, S.Struct<{
672
+ readonly id: S.String;
673
+ readonly kind: S.Literal<"repeat">;
674
+ readonly body: S.String;
675
+ readonly maxRounds: S.Number;
676
+ /** The predicate reads the completed body's output through $input. */
677
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
678
+ }>, S.Struct<{
679
+ readonly id: S.String;
680
+ readonly kind: S.Literal<"wait">;
681
+ readonly for: S.Number;
682
+ }>, S.Struct<{
683
+ readonly id: S.String;
684
+ readonly kind: S.Literal<"transform">;
685
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
686
+ }>]>>;
687
+ readonly edges: S.$Array<S.Struct<{
688
+ readonly from: S.Struct<{
689
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
690
+ readonly port: S.String;
691
+ }>;
692
+ readonly to: S.Struct<{
693
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
694
+ readonly port: S.String;
695
+ }>;
696
+ }>>;
697
+ readonly output: S.$Record<S.String, S.Struct<{
698
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
699
+ readonly port: S.String;
700
+ }>>;
701
+ }>>>;
702
+ readonly triggers: S.optionalKey<S.$Array<S.Union<readonly [S.Struct<{
703
+ readonly id: S.String;
704
+ readonly on: S.Literal<"webhook">;
705
+ readonly title: S.optionalKey<S.String>;
706
+ readonly when: S.optionalKey<S.Codec<Predicate, Predicate, never, never>>;
707
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
708
+ }>, S.Struct<{
709
+ readonly id: S.String;
710
+ readonly on: S.Literal<"schedule">;
711
+ readonly title: S.optionalKey<S.String>;
712
+ readonly cron: S.Struct<{
713
+ readonly expression: S.String;
714
+ readonly timeZone: S.String;
715
+ }>;
716
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
717
+ }>, S.Struct<{
718
+ readonly id: S.String;
719
+ readonly on: S.Literal<"event">;
720
+ readonly title: S.optionalKey<S.String>;
721
+ readonly app: S.String;
722
+ readonly event: S.String;
723
+ readonly eventDigest: S.String;
724
+ readonly when: S.optionalKey<S.Codec<Predicate, Predicate, never, never>>;
725
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
726
+ /**
727
+ * The one repository, in the event App's own Git namespace, this event is
728
+ * about. A node's `gitAccess` names it as `$trigger.repository`.
729
+ */
730
+ readonly repository: S.optionalKey<S.Codec<Mapping, Mapping, never, never>>;
731
+ }>]>>>;
732
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
733
+ readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
734
+ readonly id: S.String;
735
+ readonly kind: S.Literal<"code">;
736
+ readonly source: S.String;
737
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
738
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
739
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
740
+ }>, S.Struct<{
741
+ readonly id: S.String;
742
+ readonly kind: S.Literal<"app">;
743
+ readonly app: S.String;
744
+ readonly method: S.String;
745
+ readonly methodDigest: S.String;
746
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
747
+ readonly gitAccess: S.optionalKey<S.declare<{
748
+ binding: string;
749
+ repository: string;
750
+ branches: string[];
751
+ } | {
752
+ binding: string;
753
+ repository: string;
754
+ access: "read";
755
+ }, {
756
+ binding: string;
757
+ repository: string;
758
+ branches: string[];
759
+ } | {
760
+ binding: string;
761
+ repository: string;
762
+ access: "read";
763
+ }>>;
764
+ readonly retry: S.optionalKey<S.Struct<{
765
+ readonly attempts: S.Number;
766
+ }>>;
767
+ }>, S.Struct<{
768
+ readonly id: S.String;
769
+ readonly kind: S.Literal<"review">;
770
+ readonly title: S.String;
771
+ /**
772
+ * One plain line under the title saying where the run is, such as
773
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
774
+ * filled from the loops around the review (see `fillReviewText`).
775
+ */
776
+ readonly detail: S.optionalKey<S.String>;
777
+ readonly show: S.$Array<S.Struct<{
778
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
779
+ readonly port: S.String;
780
+ }>>;
781
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
782
+ readonly timeout: S.Number;
783
+ /**
784
+ * Named outcomes a reviewer picks from; each is an output port carrying
785
+ * the shown item. Without choices the review approves or rejects. A
786
+ * choice's `description` says in plain words what picking it does, with
787
+ * the same placeholders as `detail`.
788
+ */
789
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
790
+ readonly id: S.String;
791
+ readonly label: S.String;
792
+ readonly description: S.optionalKey<S.String>;
793
+ }>>>;
794
+ }>, S.Struct<{
795
+ readonly id: S.String;
796
+ readonly kind: S.Literal<"condition">;
797
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
798
+ }>, S.Struct<{
799
+ readonly id: S.String;
800
+ readonly kind: S.Literal<"map">;
801
+ readonly over: S.Struct<{
802
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
803
+ readonly port: S.String;
804
+ }>;
805
+ readonly body: S.String;
806
+ readonly concurrency: S.Number;
807
+ readonly maxItems: S.Number;
808
+ }>, S.Struct<{
809
+ readonly id: S.String;
810
+ readonly kind: S.Literal<"repeat">;
811
+ readonly body: S.String;
812
+ readonly maxRounds: S.Number;
813
+ /** The predicate reads the completed body's output through $input. */
814
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
815
+ }>, S.Struct<{
816
+ readonly id: S.String;
817
+ readonly kind: S.Literal<"wait">;
818
+ readonly for: S.Number;
819
+ }>, S.Struct<{
820
+ readonly id: S.String;
821
+ readonly kind: S.Literal<"transform">;
822
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
823
+ }>]>>;
824
+ readonly edges: S.$Array<S.Struct<{
825
+ readonly from: S.Struct<{
826
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
827
+ readonly port: S.String;
828
+ }>;
829
+ readonly to: S.Struct<{
830
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
831
+ readonly port: S.String;
832
+ }>;
833
+ }>>;
834
+ readonly output: S.$Record<S.String, S.Struct<{
835
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
836
+ readonly port: S.String;
837
+ }>>;
838
+ }>;
839
+ readonly catalog: S.$Record<S.String, S.Struct<{
840
+ readonly methods: S.$Record<S.String, S.Struct<{
841
+ readonly digest: S.String;
842
+ /** This method may yield Agar Pending before its completed output. */
843
+ readonly pending: S.optionalKey<S.Literal<true>>;
844
+ readonly description: S.String;
845
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
846
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
847
+ readonly effect: S.Literals<readonly ["read", "write", "external"]>;
848
+ readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
849
+ readonly requires: S.$Array<S.String>;
850
+ }>>;
851
+ readonly events: S.optionalKey<S.$Record<S.String, S.Struct<{
852
+ readonly digest: S.String;
853
+ readonly description: S.String;
854
+ readonly payload: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
855
+ }>>>;
856
+ }>>;
857
+ readonly bindings: S.$Record<S.String, S.declare<{
858
+ kind: "team-source";
859
+ } | {
860
+ appId: string;
861
+ installationId: string;
862
+ }, {
863
+ kind: "team-source";
864
+ } | {
865
+ appId: string;
866
+ installationId: string;
867
+ }>>;
868
+ readonly estimatedSteps: S.Number;
869
+ readonly requiredBindings: S.$Array<S.Struct<{
870
+ /** This method may yield Agar Pending before its completed output. */
871
+ readonly pending: S.optionalKey<S.Literal<true>>;
872
+ readonly description: S.String;
873
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
874
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
875
+ readonly effect: S.Literals<readonly ["read", "write", "external"]>;
876
+ readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
877
+ readonly requires: S.$Array<S.String>;
878
+ readonly app: S.String;
879
+ readonly installationId: S.String;
880
+ readonly method: S.String;
881
+ }>>;
882
+ }>;
883
+ export declare const executionPlanSchema: S.Struct<{
884
+ readonly planDigest: S.String;
885
+ readonly definition: S.Struct<{
886
+ readonly format: S.Literal<"fungi.workflow/v1">;
887
+ readonly title: S.String;
888
+ readonly description: S.optionalKey<S.String>;
889
+ readonly apps: S.$Record<S.String, S.Struct<{
890
+ readonly appId: S.String;
891
+ readonly role: S.optionalKey<S.String>;
892
+ }>>;
893
+ readonly subgraphs: S.optionalKey<S.$Record<S.String, S.Struct<{
894
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
895
+ readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
896
+ readonly id: S.String;
897
+ readonly kind: S.Literal<"code">;
898
+ readonly source: S.String;
899
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
900
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
901
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
902
+ }>, S.Struct<{
903
+ readonly id: S.String;
904
+ readonly kind: S.Literal<"app">;
905
+ readonly app: S.String;
906
+ readonly method: S.String;
907
+ readonly methodDigest: S.String;
908
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
909
+ readonly gitAccess: S.optionalKey<S.declare<{
910
+ binding: string;
911
+ repository: string;
912
+ branches: string[];
913
+ } | {
914
+ binding: string;
915
+ repository: string;
916
+ access: "read";
917
+ }, {
918
+ binding: string;
919
+ repository: string;
920
+ branches: string[];
921
+ } | {
922
+ binding: string;
923
+ repository: string;
924
+ access: "read";
925
+ }>>;
926
+ readonly retry: S.optionalKey<S.Struct<{
927
+ readonly attempts: S.Number;
928
+ }>>;
929
+ }>, S.Struct<{
930
+ readonly id: S.String;
931
+ readonly kind: S.Literal<"review">;
932
+ readonly title: S.String;
933
+ /**
934
+ * One plain line under the title saying where the run is, such as
935
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
936
+ * filled from the loops around the review (see `fillReviewText`).
937
+ */
938
+ readonly detail: S.optionalKey<S.String>;
939
+ readonly show: S.$Array<S.Struct<{
940
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
941
+ readonly port: S.String;
942
+ }>>;
943
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
944
+ readonly timeout: S.Number;
945
+ /**
946
+ * Named outcomes a reviewer picks from; each is an output port carrying
947
+ * the shown item. Without choices the review approves or rejects. A
948
+ * choice's `description` says in plain words what picking it does, with
949
+ * the same placeholders as `detail`.
950
+ */
951
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
952
+ readonly id: S.String;
953
+ readonly label: S.String;
954
+ readonly description: S.optionalKey<S.String>;
955
+ }>>>;
956
+ }>, S.Struct<{
957
+ readonly id: S.String;
958
+ readonly kind: S.Literal<"condition">;
959
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
960
+ }>, S.Struct<{
961
+ readonly id: S.String;
962
+ readonly kind: S.Literal<"map">;
963
+ readonly over: S.Struct<{
964
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
965
+ readonly port: S.String;
966
+ }>;
967
+ readonly body: S.String;
968
+ readonly concurrency: S.Number;
969
+ readonly maxItems: S.Number;
970
+ }>, S.Struct<{
971
+ readonly id: S.String;
972
+ readonly kind: S.Literal<"repeat">;
973
+ readonly body: S.String;
974
+ readonly maxRounds: S.Number;
975
+ /** The predicate reads the completed body's output through $input. */
976
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
977
+ }>, S.Struct<{
978
+ readonly id: S.String;
979
+ readonly kind: S.Literal<"wait">;
980
+ readonly for: S.Number;
981
+ }>, S.Struct<{
982
+ readonly id: S.String;
983
+ readonly kind: S.Literal<"transform">;
984
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
985
+ }>]>>;
986
+ readonly edges: S.$Array<S.Struct<{
987
+ readonly from: S.Struct<{
988
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
989
+ readonly port: S.String;
990
+ }>;
991
+ readonly to: S.Struct<{
992
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
993
+ readonly port: S.String;
994
+ }>;
995
+ }>>;
996
+ readonly output: S.$Record<S.String, S.Struct<{
997
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
998
+ readonly port: S.String;
999
+ }>>;
1000
+ }>>>;
1001
+ readonly triggers: S.optionalKey<S.$Array<S.Union<readonly [S.Struct<{
1002
+ readonly id: S.String;
1003
+ readonly on: S.Literal<"webhook">;
1004
+ readonly title: S.optionalKey<S.String>;
1005
+ readonly when: S.optionalKey<S.Codec<Predicate, Predicate, never, never>>;
1006
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
1007
+ }>, S.Struct<{
1008
+ readonly id: S.String;
1009
+ readonly on: S.Literal<"schedule">;
1010
+ readonly title: S.optionalKey<S.String>;
1011
+ readonly cron: S.Struct<{
1012
+ readonly expression: S.String;
1013
+ readonly timeZone: S.String;
1014
+ }>;
1015
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
1016
+ }>, S.Struct<{
1017
+ readonly id: S.String;
1018
+ readonly on: S.Literal<"event">;
1019
+ readonly title: S.optionalKey<S.String>;
1020
+ readonly app: S.String;
1021
+ readonly event: S.String;
1022
+ readonly eventDigest: S.String;
1023
+ readonly when: S.optionalKey<S.Codec<Predicate, Predicate, never, never>>;
1024
+ readonly input: S.optionalKey<S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>>;
1025
+ /**
1026
+ * The one repository, in the event App's own Git namespace, this event is
1027
+ * about. A node's `gitAccess` names it as `$trigger.repository`.
1028
+ */
1029
+ readonly repository: S.optionalKey<S.Codec<Mapping, Mapping, never, never>>;
1030
+ }>]>>>;
1031
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1032
+ readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
1033
+ readonly id: S.String;
1034
+ readonly kind: S.Literal<"code">;
1035
+ readonly source: S.String;
1036
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1037
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1038
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
1039
+ }>, S.Struct<{
1040
+ readonly id: S.String;
1041
+ readonly kind: S.Literal<"app">;
1042
+ readonly app: S.String;
1043
+ readonly method: S.String;
1044
+ readonly methodDigest: S.String;
1045
+ readonly values: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
1046
+ readonly gitAccess: S.optionalKey<S.declare<{
1047
+ binding: string;
1048
+ repository: string;
1049
+ branches: string[];
1050
+ } | {
1051
+ binding: string;
1052
+ repository: string;
1053
+ access: "read";
1054
+ }, {
1055
+ binding: string;
1056
+ repository: string;
1057
+ branches: string[];
1058
+ } | {
1059
+ binding: string;
1060
+ repository: string;
1061
+ access: "read";
1062
+ }>>;
1063
+ readonly retry: S.optionalKey<S.Struct<{
1064
+ readonly attempts: S.Number;
1065
+ }>>;
1066
+ }>, S.Struct<{
1067
+ readonly id: S.String;
1068
+ readonly kind: S.Literal<"review">;
1069
+ readonly title: S.String;
1070
+ /**
1071
+ * One plain line under the title saying where the run is, such as
1072
+ * `Beat {item} of {items} · try {try} of {tries}`. The placeholders are
1073
+ * filled from the loops around the review (see `fillReviewText`).
1074
+ */
1075
+ readonly detail: S.optionalKey<S.String>;
1076
+ readonly show: S.$Array<S.Struct<{
1077
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
1078
+ readonly port: S.String;
1079
+ }>>;
1080
+ readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
1081
+ readonly timeout: S.Number;
1082
+ /**
1083
+ * Named outcomes a reviewer picks from; each is an output port carrying
1084
+ * the shown item. Without choices the review approves or rejects. A
1085
+ * choice's `description` says in plain words what picking it does, with
1086
+ * the same placeholders as `detail`.
1087
+ */
1088
+ readonly choices: S.optionalKey<S.$Array<S.Struct<{
1089
+ readonly id: S.String;
1090
+ readonly label: S.String;
1091
+ readonly description: S.optionalKey<S.String>;
1092
+ }>>>;
1093
+ }>, S.Struct<{
1094
+ readonly id: S.String;
1095
+ readonly kind: S.Literal<"condition">;
1096
+ readonly test: S.Codec<Predicate, Predicate, never, never>;
1097
+ }>, S.Struct<{
1098
+ readonly id: S.String;
1099
+ readonly kind: S.Literal<"map">;
1100
+ readonly over: S.Struct<{
1101
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
1102
+ readonly port: S.String;
1103
+ }>;
1104
+ readonly body: S.String;
1105
+ readonly concurrency: S.Number;
1106
+ readonly maxItems: S.Number;
1107
+ }>, S.Struct<{
1108
+ readonly id: S.String;
1109
+ readonly kind: S.Literal<"repeat">;
1110
+ readonly body: S.String;
1111
+ readonly maxRounds: S.Number;
1112
+ /** The predicate reads the completed body's output through $input. */
1113
+ readonly until: S.Codec<Predicate, Predicate, never, never>;
1114
+ }>, S.Struct<{
1115
+ readonly id: S.String;
1116
+ readonly kind: S.Literal<"wait">;
1117
+ readonly for: S.Number;
1118
+ }>, S.Struct<{
1119
+ readonly id: S.String;
1120
+ readonly kind: S.Literal<"transform">;
1121
+ readonly fields: S.$Record<S.String, S.Codec<Mapping, Mapping, never, never>>;
1122
+ }>]>>;
1123
+ readonly edges: S.$Array<S.Struct<{
1124
+ readonly from: S.Struct<{
1125
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
1126
+ readonly port: S.String;
1127
+ }>;
1128
+ readonly to: S.Struct<{
1129
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
1130
+ readonly port: S.String;
1131
+ }>;
1132
+ }>>;
1133
+ readonly output: S.$Record<S.String, S.Struct<{
1134
+ readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
1135
+ readonly port: S.String;
1136
+ }>>;
1137
+ }>;
1138
+ readonly catalog: S.$Record<S.String, S.Struct<{
1139
+ readonly methods: S.$Record<S.String, S.Struct<{
1140
+ readonly digest: S.String;
1141
+ /** This method may yield Agar Pending before its completed output. */
1142
+ readonly pending: S.optionalKey<S.Literal<true>>;
1143
+ readonly description: S.String;
1144
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1145
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1146
+ readonly effect: S.Literals<readonly ["read", "write", "external"]>;
1147
+ readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
1148
+ readonly requires: S.$Array<S.String>;
1149
+ }>>;
1150
+ readonly events: S.optionalKey<S.$Record<S.String, S.Struct<{
1151
+ readonly digest: S.String;
1152
+ readonly description: S.String;
1153
+ readonly payload: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1154
+ }>>>;
1155
+ }>>;
1156
+ readonly bindings: S.$Record<S.String, S.declare<{
1157
+ kind: "team-source";
1158
+ } | {
1159
+ appId: string;
1160
+ installationId: string;
1161
+ }, {
1162
+ kind: "team-source";
1163
+ } | {
1164
+ appId: string;
1165
+ installationId: string;
1166
+ }>>;
1167
+ readonly estimatedSteps: S.Number;
1168
+ readonly requiredBindings: S.$Array<S.Struct<{
1169
+ /** This method may yield Agar Pending before its completed output. */
1170
+ readonly pending: S.optionalKey<S.Literal<true>>;
1171
+ readonly description: S.String;
1172
+ readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1173
+ readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
1174
+ readonly effect: S.Literals<readonly ["read", "write", "external"]>;
1175
+ readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
1176
+ readonly requires: S.$Array<S.String>;
1177
+ readonly app: S.String;
1178
+ readonly installationId: S.String;
1179
+ readonly method: S.String;
1180
+ }>>;
1181
+ }>;
1182
+ export type ExecutionPlan = typeof executionPlanSchema.Type;
1183
+ export {};