@fungi.computer/oyster 0.0.1 → 0.2.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 (195) hide show
  1. package/README.md +228 -176
  2. package/dist/agent-avatars.d.ts +103 -0
  3. package/dist/agent-avatars.js +66 -0
  4. package/dist/agents.d.ts +12 -2
  5. package/dist/agents.js +39 -2
  6. package/dist/app-builds.d.ts +76 -17
  7. package/dist/app-builds.js +207 -63
  8. package/dist/app-sources.d.ts +7 -22
  9. package/dist/app-sources.js +49 -14
  10. package/dist/apps/gate.d.ts +7 -7
  11. package/dist/apps/gate.js +6 -6
  12. package/dist/apps/installation.d.ts +35 -35
  13. package/dist/apps/installation.js +20 -19
  14. package/dist/build/artifact-writer.d.ts +40 -0
  15. package/dist/build/artifact-writer.js +181 -0
  16. package/dist/build/build-jobs.js +7 -1
  17. package/dist/build/build-policy.d.ts +10 -0
  18. package/dist/build/build-policy.js +10 -0
  19. package/dist/build/build-step.d.ts +12 -1
  20. package/dist/build/build-step.js +9 -1
  21. package/dist/build/candidate-builder.d.ts +68 -0
  22. package/dist/build/candidate-builder.js +91 -0
  23. package/dist/build/candidate-cli.d.ts +1 -0
  24. package/dist/build/candidate-cli.js +119 -0
  25. package/dist/build/candidate-cli.mjs +28220 -0
  26. package/dist/build/content-objects.d.ts +37 -0
  27. package/dist/build/content-objects.js +53 -0
  28. package/dist/build/effect.d.ts +18 -0
  29. package/dist/build/effect.js +52 -12
  30. package/dist/build/git-environment.d.ts +3 -0
  31. package/dist/build/git-environment.js +21 -9
  32. package/dist/build/local-build.d.ts +13 -3
  33. package/dist/build/local-build.js +149 -99
  34. package/dist/build/snapshot-package-store.d.ts +10 -0
  35. package/dist/build/snapshot-package-store.js +15 -0
  36. package/dist/build/snapshot-program-scripts.js +1 -1
  37. package/dist/build/snapshot-programs/snapshot-path.d.ts +2 -0
  38. package/dist/build/snapshot-programs/snapshot-path.js +6 -0
  39. package/dist/build/submission-contract.d.ts +461 -17
  40. package/dist/build/submission-contract.js +136 -26
  41. package/dist/build/workspace-build.d.ts +7 -2
  42. package/dist/build/workspace-build.js +55 -11
  43. package/dist/build-contract.d.ts +3 -0
  44. package/dist/build-contract.js +3 -0
  45. package/dist/build-egress.d.ts +62 -0
  46. package/dist/build-egress.js +148 -0
  47. package/dist/build.d.ts +1 -0
  48. package/dist/build.js +1 -0
  49. package/dist/cloudflare.js +4 -4
  50. package/dist/frame-binding-wire-script.js +1 -1
  51. package/dist/frame-binding-wire.d.ts +1 -1
  52. package/dist/frame-binding-wire.js +1 -1
  53. package/dist/git-journal.js +4 -4
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +1 -0
  56. package/dist/installation-consent.d.ts +3 -1
  57. package/dist/installation-consent.js +2 -0
  58. package/dist/mcp-owner.js +20 -8
  59. package/dist/pack.d.ts +6 -3
  60. package/dist/pack.js +28 -11
  61. package/dist/page/gill-observation.d.ts +4 -0
  62. package/dist/page/gill-observation.js +31 -0
  63. package/dist/page/mount.d.ts +4 -8
  64. package/dist/page/window-launch.d.ts +18 -0
  65. package/dist/page/window-launch.js +11 -0
  66. package/dist/page-script.js +4 -4
  67. package/dist/release.d.ts +11 -0
  68. package/dist/release.js +4 -1
  69. package/dist/shell/app-directory.d.ts +50 -45
  70. package/dist/shell/app-directory.js +19 -18
  71. package/dist/shell/shell-module.d.ts +26 -2
  72. package/dist/shell/shell-module.js +51 -2
  73. package/dist/shell/window-manager.d.ts +5 -1
  74. package/dist/shell/window-manager.js +21 -2
  75. package/dist/shell/workbench-directory.d.ts +332 -0
  76. package/dist/shell/workbench-directory.js +35 -0
  77. package/dist/shell/workbench-host-types.d.ts +1 -1
  78. package/dist/shell/workbench-host.js +5 -0
  79. package/dist/shell/workbench-model.d.ts +3 -1
  80. package/dist/source/index.d.ts +6 -7
  81. package/dist/source/index.js +6 -7
  82. package/dist/source/template-push.d.ts +33 -0
  83. package/dist/source/template-push.js +223 -0
  84. package/dist/source/template-repository.d.ts +2 -0
  85. package/dist/source/template-repository.js +13 -0
  86. package/dist/source/{template-write.d.ts → template-seed.d.ts} +19 -20
  87. package/dist/source/template-seed.js +80 -0
  88. package/dist/standalone/agent-directory.d.ts +4 -0
  89. package/dist/standalone/agent-directory.js +4 -0
  90. package/dist/standalone/agents.d.ts +227 -0
  91. package/dist/standalone/agents.js +834 -0
  92. package/dist/standalone/app-builds-binding.d.ts +36 -0
  93. package/dist/standalone/app-builds-binding.js +119 -0
  94. package/dist/standalone/app-set.d.ts +91 -0
  95. package/dist/standalone/app-set.js +395 -0
  96. package/dist/standalone/app-source.d.ts +41 -0
  97. package/dist/standalone/app-source.js +59 -0
  98. package/dist/standalone/builds.d.ts +18 -0
  99. package/dist/standalone/builds.js +101 -0
  100. package/dist/standalone/computer-egress.d.ts +37 -0
  101. package/dist/standalone/computer-egress.js +111 -0
  102. package/dist/standalone/computer.d.ts +122 -0
  103. package/dist/standalone/computer.js +714 -0
  104. package/dist/standalone/install-apps-cli.d.ts +2 -0
  105. package/dist/standalone/install-apps-cli.js +126 -0
  106. package/dist/standalone/instance.d.ts +35 -0
  107. package/dist/standalone/instance.js +74 -0
  108. package/dist/standalone/media.d.ts +76 -0
  109. package/dist/standalone/media.js +227 -0
  110. package/dist/standalone/preview.d.ts +51 -0
  111. package/dist/standalone/preview.js +167 -0
  112. package/dist/standalone/registry.d.ts +102 -0
  113. package/dist/standalone/registry.js +193 -0
  114. package/dist/standalone/tenancy.d.ts +42 -0
  115. package/dist/standalone/tenancy.js +241 -0
  116. package/dist/standalone/worker.d.ts +55 -0
  117. package/dist/standalone/worker.js +147 -0
  118. package/dist/standalone/workflow-authority-readers.d.ts +16 -0
  119. package/dist/standalone/workflow-authority-readers.js +35 -0
  120. package/dist/standalone/workflow-binding.d.ts +216 -0
  121. package/dist/standalone/workflow-binding.js +217 -0
  122. package/dist/standalone/workflow-events.d.ts +46 -0
  123. package/dist/standalone/workflow-events.js +39 -0
  124. package/dist/standalone/workflow-git-capture.d.ts +7 -0
  125. package/dist/standalone/workflow-git-capture.js +62 -0
  126. package/dist/standalone/workflow-host.d.ts +955 -0
  127. package/dist/standalone/workflow-host.js +778 -0
  128. package/dist/standalone/workflow-node-capture.d.ts +13 -0
  129. package/dist/standalone/workflow-node-capture.js +72 -0
  130. package/dist/standalone/workflow-root-authority.d.ts +27 -0
  131. package/dist/standalone/workflow-root-authority.js +87 -0
  132. package/dist/standalone/workflow-schedules.d.ts +52 -0
  133. package/dist/standalone/workflow-schedules.js +40 -0
  134. package/dist/standalone/workflow-trigger-host.d.ts +1716 -0
  135. package/dist/standalone/workflow-trigger-host.js +52 -0
  136. package/dist/standalone/workflows.d.ts +713 -0
  137. package/dist/standalone/workflows.js +554 -0
  138. package/dist/tenancy/auth0.d.ts +64 -0
  139. package/dist/tenancy/auth0.js +198 -0
  140. package/dist/tenancy/cloudflare/rate-limit.d.ts +8 -0
  141. package/dist/tenancy/cloudflare/rate-limit.js +19 -0
  142. package/dist/tenancy/cloudflare/registry.d.ts +50 -0
  143. package/dist/tenancy/cloudflare/registry.js +301 -0
  144. package/dist/tenancy/cloudflare.d.ts +2 -0
  145. package/dist/tenancy/cloudflare.js +2 -0
  146. package/dist/tenancy/cold-directory.d.ts +13 -0
  147. package/dist/tenancy/cold-directory.js +43 -0
  148. package/dist/tenancy/contracts.d.ts +195 -0
  149. package/dist/tenancy/contracts.js +1 -0
  150. package/dist/tenancy/index.d.ts +19 -0
  151. package/dist/tenancy/index.js +156 -0
  152. package/dist/tenancy/owner-key.d.ts +26 -0
  153. package/dist/tenancy/owner-key.js +63 -0
  154. package/dist/tenancy/oyster.d.ts +4 -0
  155. package/dist/tenancy/oyster.js +25 -0
  156. package/dist/tenancy/registry-record.d.ts +7 -0
  157. package/dist/tenancy/registry-record.js +44 -0
  158. package/dist/tenancy/registry.d.ts +27 -0
  159. package/dist/tenancy/registry.js +138 -0
  160. package/dist/tenancy/resolve.d.ts +7 -0
  161. package/dist/tenancy/resolve.js +64 -0
  162. package/dist/workers-git.js +1 -4
  163. package/dist/workers.d.ts +2 -2
  164. package/dist/workers.js +3 -1
  165. package/docs/api/build-contract.md +829 -32
  166. package/docs/api/build.md +253 -17
  167. package/docs/api/modules.md +40 -32
  168. package/docs/api/pack.md +6 -3
  169. package/docs/api/shell/app-directory.md +267 -0
  170. package/docs/api/shell/shell-module.md +64 -3
  171. package/docs/api/shell/workbench-directory.md +119 -0
  172. package/docs/api/shell/workbench.md +19 -0
  173. package/docs/api/shell.md +127 -0
  174. package/docs/api/tenancy/auth0.md +110 -0
  175. package/docs/api/tenancy/cloudflare.md +221 -0
  176. package/docs/api/tenancy/cold-directory.md +46 -0
  177. package/docs/api/tenancy/owner-key.md +63 -0
  178. package/docs/api/tenancy/registry.md +77 -0
  179. package/docs/api/tenancy/resolve.md +69 -0
  180. package/docs/api/tenancy.md +430 -0
  181. package/docs/api/workers-git.md +140 -21
  182. package/docs/api/workers.md +15 -2
  183. package/docs/site/agent-quickstart.mdx +52 -55
  184. package/examples/standalone/worker.ts +7 -14
  185. package/examples/standalone/wrangler.jsonc +67 -6
  186. package/package.json +78 -25
  187. package/dist/build/r2-artifact-writer.d.ts +0 -31
  188. package/dist/build/r2-artifact-writer.js +0 -179
  189. package/dist/source/template-write.js +0 -344
  190. package/docs/media/architecture.mmd +0 -32
  191. package/docs/media/architecture.png +0 -0
  192. package/docs/media/bonsai-network.png +0 -0
  193. package/docs/media/bonsai-repository.png +0 -0
  194. package/examples/git/worker.ts +0 -39
  195. package/examples/git/wrangler.jsonc +0 -32
@@ -0,0 +1,1716 @@
1
+ import { createTeamWorkflowRuns, createTeamWorkflowTriggers, type WorkflowErrorPort, type WorkflowRunAuthority } from "@fungi.computer/braid/runtime";
2
+ /** Standalone denial is the Instance's revoked refusal; other failures retry. */
3
+ export declare const standaloneTriggerErrors: WorkflowErrorPort;
4
+ /**
5
+ * Trigger starts reuse the shared cached-plan start owner over this host's run
6
+ * store. The Hub-only reviewer and Team run termination ports have no
7
+ * standalone producer, so each refuses instead of inventing authority.
8
+ */
9
+ export declare function createStandaloneWorkflowTriggerHost(options: {
10
+ authority: WorkflowRunAuthority;
11
+ runs: Pick<Parameters<typeof createTeamWorkflowRuns>[0], "sql" | "transactionSync" | "teamId">;
12
+ triggers: Omit<Parameters<typeof createTeamWorkflowTriggers>[0], "runs" | "errors">;
13
+ /** Whether this member may have run endings reported to the Agent Session. */
14
+ admitDelivery: Parameters<typeof createTeamWorkflowRuns>[0]["admitDelivery"];
15
+ /** Dispatch re-admits this protected owner context for every trigger run. */
16
+ recordCaller(runId: string, memberId: string, computerId: string | null): void;
17
+ }): {
18
+ authority: WorkflowRunAuthority;
19
+ runs: {
20
+ workflowRunOutcome: (rawRunId: string) => "active" | "terminal" | "cancelled" | null;
21
+ admitWorkflowNode: (rawContext: import("@fungi.computer/braid/runtime").WorkflowRunContext, rawTarget: {
22
+ installationId: string;
23
+ method: string;
24
+ }) => import("@fungi.computer/braid/runtime").WorkflowNodeAdmission | null;
25
+ listRuns(installationId: string, actorId?: string, workflowId?: string): readonly ({
26
+ readonly input: {
27
+ readonly [x: string]: import("effect/Schema").Json;
28
+ };
29
+ readonly source: "key" | "manual" | "event" | "schedule" | "agent";
30
+ readonly runId: string;
31
+ readonly computerId: string | null;
32
+ readonly teamId: string;
33
+ readonly plan: {
34
+ readonly planDigest: string;
35
+ readonly definition: {
36
+ readonly input: {
37
+ readonly [x: string]: import("effect/Schema").Json;
38
+ };
39
+ readonly output: {
40
+ readonly [x: string]: {
41
+ readonly node: string;
42
+ readonly port: string;
43
+ };
44
+ };
45
+ readonly title: string;
46
+ readonly format: "fungi.workflow/v1";
47
+ readonly nodes: readonly ({
48
+ readonly id: string;
49
+ readonly kind: "code";
50
+ readonly source: string;
51
+ readonly input: {
52
+ readonly [x: string]: import("effect/Schema").Json;
53
+ };
54
+ readonly output: {
55
+ readonly [x: string]: import("effect/Schema").Json;
56
+ };
57
+ readonly values: {
58
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
59
+ };
60
+ } | {
61
+ readonly values: {
62
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
63
+ };
64
+ readonly id: string;
65
+ readonly method: string;
66
+ readonly kind: "app";
67
+ readonly app: string;
68
+ readonly methodDigest: string;
69
+ readonly gitAccess?: {
70
+ binding: string;
71
+ repository: string;
72
+ branches: string[];
73
+ } | {
74
+ binding: string;
75
+ repository: string;
76
+ access: "read";
77
+ };
78
+ readonly retry?: {
79
+ readonly attempts: number;
80
+ };
81
+ } | {
82
+ readonly show: readonly {
83
+ readonly node: string;
84
+ readonly port: string;
85
+ }[];
86
+ readonly id: string;
87
+ readonly title: string;
88
+ readonly timeout: number;
89
+ readonly kind: "review";
90
+ readonly reviewers: "runner" | "owners";
91
+ readonly detail?: string;
92
+ readonly choices?: readonly {
93
+ readonly id: string;
94
+ readonly label: string;
95
+ readonly description?: string;
96
+ }[];
97
+ } | {
98
+ readonly id: string;
99
+ readonly kind: "condition";
100
+ readonly test: import("@fungi.computer/braid").Predicate;
101
+ } | {
102
+ readonly id: string;
103
+ readonly kind: "map";
104
+ readonly over: {
105
+ readonly node: string;
106
+ readonly port: string;
107
+ };
108
+ readonly body: string;
109
+ readonly concurrency: number;
110
+ readonly maxItems: number;
111
+ } | {
112
+ readonly id: string;
113
+ readonly kind: "repeat";
114
+ readonly body: string;
115
+ readonly maxRounds: number;
116
+ readonly until: import("@fungi.computer/braid").Predicate;
117
+ } | {
118
+ readonly id: string;
119
+ readonly kind: "wait";
120
+ readonly for: number;
121
+ } | {
122
+ readonly id: string;
123
+ readonly kind: "transform";
124
+ readonly fields: {
125
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
126
+ };
127
+ })[];
128
+ readonly edges: readonly {
129
+ readonly from: {
130
+ readonly node: string;
131
+ readonly port: string;
132
+ };
133
+ readonly to: {
134
+ readonly node: string;
135
+ readonly port: string;
136
+ };
137
+ }[];
138
+ readonly apps: {
139
+ readonly [x: string]: {
140
+ readonly appId: string;
141
+ readonly role?: string;
142
+ };
143
+ };
144
+ readonly description?: string;
145
+ readonly subgraphs?: {
146
+ readonly [x: string]: {
147
+ readonly input: {
148
+ readonly [x: string]: import("effect/Schema").Json;
149
+ };
150
+ readonly nodes: readonly ({
151
+ readonly id: string;
152
+ readonly kind: "code";
153
+ readonly source: string;
154
+ readonly input: {
155
+ readonly [x: string]: import("effect/Schema").Json;
156
+ };
157
+ readonly output: {
158
+ readonly [x: string]: import("effect/Schema").Json;
159
+ };
160
+ readonly values: {
161
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
162
+ };
163
+ } | {
164
+ readonly values: {
165
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
166
+ };
167
+ readonly id: string;
168
+ readonly method: string;
169
+ readonly kind: "app";
170
+ readonly app: string;
171
+ readonly methodDigest: string;
172
+ readonly gitAccess?: {
173
+ binding: string;
174
+ repository: string;
175
+ branches: string[];
176
+ } | {
177
+ binding: string;
178
+ repository: string;
179
+ access: "read";
180
+ };
181
+ readonly retry?: {
182
+ readonly attempts: number;
183
+ };
184
+ } | {
185
+ readonly show: readonly {
186
+ readonly node: string;
187
+ readonly port: string;
188
+ }[];
189
+ readonly id: string;
190
+ readonly title: string;
191
+ readonly timeout: number;
192
+ readonly kind: "review";
193
+ readonly reviewers: "runner" | "owners";
194
+ readonly detail?: string;
195
+ readonly choices?: readonly {
196
+ readonly id: string;
197
+ readonly label: string;
198
+ readonly description?: string;
199
+ }[];
200
+ } | {
201
+ readonly id: string;
202
+ readonly kind: "condition";
203
+ readonly test: import("@fungi.computer/braid").Predicate;
204
+ } | {
205
+ readonly id: string;
206
+ readonly kind: "map";
207
+ readonly over: {
208
+ readonly node: string;
209
+ readonly port: string;
210
+ };
211
+ readonly body: string;
212
+ readonly concurrency: number;
213
+ readonly maxItems: number;
214
+ } | {
215
+ readonly id: string;
216
+ readonly kind: "repeat";
217
+ readonly body: string;
218
+ readonly maxRounds: number;
219
+ readonly until: import("@fungi.computer/braid").Predicate;
220
+ } | {
221
+ readonly id: string;
222
+ readonly kind: "wait";
223
+ readonly for: number;
224
+ } | {
225
+ readonly id: string;
226
+ readonly kind: "transform";
227
+ readonly fields: {
228
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
229
+ };
230
+ })[];
231
+ readonly edges: readonly {
232
+ readonly from: {
233
+ readonly node: string;
234
+ readonly port: string;
235
+ };
236
+ readonly to: {
237
+ readonly node: string;
238
+ readonly port: string;
239
+ };
240
+ }[];
241
+ readonly output: {
242
+ readonly [x: string]: {
243
+ readonly node: string;
244
+ readonly port: string;
245
+ };
246
+ };
247
+ };
248
+ };
249
+ readonly triggers?: readonly ({
250
+ readonly id: string;
251
+ readonly on: "webhook";
252
+ readonly input?: {
253
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
254
+ };
255
+ readonly title?: string;
256
+ readonly when?: import("@fungi.computer/braid").Predicate;
257
+ } | {
258
+ readonly id: string;
259
+ readonly on: "schedule";
260
+ readonly cron: {
261
+ readonly expression: string;
262
+ readonly timeZone: string;
263
+ };
264
+ readonly input?: {
265
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
266
+ };
267
+ readonly title?: string;
268
+ } | {
269
+ readonly id: string;
270
+ readonly on: "event";
271
+ readonly event: string;
272
+ readonly app: string;
273
+ readonly eventDigest: string;
274
+ readonly input?: {
275
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
276
+ };
277
+ readonly title?: string;
278
+ readonly when?: import("@fungi.computer/braid").Predicate;
279
+ readonly repository?: import("@fungi.computer/braid").Mapping;
280
+ })[];
281
+ };
282
+ readonly catalog: {
283
+ readonly [x: string]: {
284
+ readonly methods: {
285
+ readonly [x: string]: {
286
+ readonly input: {
287
+ readonly [x: string]: import("effect/Schema").Json;
288
+ };
289
+ readonly output: {
290
+ readonly [x: string]: import("effect/Schema").Json;
291
+ };
292
+ readonly description: string;
293
+ readonly requires: readonly string[];
294
+ readonly effect: "write" | "external" | "read";
295
+ readonly approval: "none" | "queue" | "simulate";
296
+ readonly digest: string;
297
+ readonly pending?: true;
298
+ };
299
+ };
300
+ readonly events?: {
301
+ readonly [x: string]: {
302
+ readonly digest: string;
303
+ readonly description: string;
304
+ readonly payload: {
305
+ readonly [x: string]: import("effect/Schema").Json;
306
+ };
307
+ };
308
+ };
309
+ };
310
+ };
311
+ readonly bindings: {
312
+ readonly [x: string]: {
313
+ kind: "team-source";
314
+ } | {
315
+ appId: string;
316
+ installationId: string;
317
+ };
318
+ };
319
+ readonly estimatedSteps: number;
320
+ readonly requiredBindings: readonly {
321
+ readonly input: {
322
+ readonly [x: string]: import("effect/Schema").Json;
323
+ };
324
+ readonly output: {
325
+ readonly [x: string]: import("effect/Schema").Json;
326
+ };
327
+ readonly method: string;
328
+ readonly description: string;
329
+ readonly requires: readonly string[];
330
+ readonly effect: "write" | "external" | "read";
331
+ readonly installationId: string;
332
+ readonly app: string;
333
+ readonly approval: "none" | "queue" | "simulate";
334
+ readonly pending?: true;
335
+ }[];
336
+ };
337
+ readonly requestId: string;
338
+ readonly actorId: string;
339
+ readonly ceiling: {
340
+ readonly nodes: readonly {
341
+ readonly level: "write" | "read";
342
+ readonly bindings: readonly {
343
+ readonly name: "BACKGROUND" | "GIT" | "EVENTS" | "APPS" | "WORKFLOWS" | "APP_STORAGE" | "MEDIA" | "COMPUTER" | "INBOX" | "AGENTS";
344
+ readonly operations: readonly string[];
345
+ }[];
346
+ readonly nodeId: string;
347
+ readonly capabilities: readonly ("agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[];
348
+ readonly graphId?: string;
349
+ }[];
350
+ readonly nodeGitAccess: readonly {
351
+ readonly nodeId: string;
352
+ readonly gitAccess: {
353
+ repository: {
354
+ kind: "installation";
355
+ installationId: string;
356
+ repository: string;
357
+ } | {
358
+ kind: "team-source";
359
+ repository: string;
360
+ };
361
+ branches: string[];
362
+ } | {
363
+ repository: {
364
+ kind: "installation";
365
+ installationId: string;
366
+ repository: string;
367
+ } | {
368
+ kind: "team-source";
369
+ repository: string;
370
+ };
371
+ access: "read";
372
+ };
373
+ readonly graphId?: string;
374
+ }[];
375
+ };
376
+ readonly initiatedBy: {
377
+ readonly kind: "member";
378
+ readonly memberId: string;
379
+ } | {
380
+ readonly kind: "agent";
381
+ readonly agentId: string;
382
+ readonly sessionId: string;
383
+ readonly grantorMemberId: string;
384
+ } | {
385
+ readonly kind: "key";
386
+ readonly keyId: string;
387
+ readonly grantorMemberId: string;
388
+ };
389
+ readonly delivery?: {
390
+ readonly agentId: string;
391
+ readonly sessionId: string;
392
+ };
393
+ readonly trigger?: {
394
+ readonly workflowId: string;
395
+ readonly armedBy: string;
396
+ readonly commit: string;
397
+ readonly triggerId: string;
398
+ readonly libraryInstallationId: string;
399
+ readonly repository?: string;
400
+ readonly nodeGitAccess?: readonly {
401
+ readonly nodeId: string;
402
+ readonly gitAccess: {
403
+ repository: {
404
+ kind: "installation";
405
+ installationId: string;
406
+ repository: string;
407
+ } | {
408
+ kind: "team-source";
409
+ repository: string;
410
+ };
411
+ branches: string[];
412
+ } | {
413
+ repository: {
414
+ kind: "installation";
415
+ installationId: string;
416
+ repository: string;
417
+ } | {
418
+ kind: "team-source";
419
+ repository: string;
420
+ };
421
+ access: "read";
422
+ };
423
+ readonly graphId?: string;
424
+ }[];
425
+ };
426
+ readonly publication?: {
427
+ readonly installationId: string;
428
+ readonly workflowId: string;
429
+ readonly commit: string;
430
+ readonly digest: string;
431
+ readonly armedBy: {
432
+ kind: "member";
433
+ memberId: string;
434
+ } | {
435
+ kind: "agent";
436
+ agentId: string;
437
+ } | {
438
+ kind: "team-key";
439
+ keyId: string;
440
+ };
441
+ };
442
+ readonly libraryInstallationId?: string;
443
+ } & {
444
+ startedAt: number;
445
+ })[];
446
+ bindTriggerRun(reservationId: string, rawRunId: string): "bound" | "replay" | "conflict";
447
+ terminalTriggerRun: (rawRunId: string, outcome?: "terminal" | "cancelled") => void;
448
+ cancel(memberId: string, rawRunId: string): Promise<{
449
+ kind: "cancelled" | "terminal";
450
+ } | {
451
+ kind: "refused";
452
+ reason: "denied";
453
+ }>;
454
+ pendingWorkflowRunCleanups(): {
455
+ teamId: string;
456
+ runId: string;
457
+ computerId: string;
458
+ }[];
459
+ acknowledgeWorkflowRunCleanup(rawRunId: string): void;
460
+ triggerPlans: {
461
+ put(binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger, plan: import("@fungi.computer/braid").ExecutionPlan): void;
462
+ read(binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger): {
463
+ binding: {
464
+ installationId: string;
465
+ workflowId: string;
466
+ commit: string;
467
+ digest: string & {
468
+ readonly appReleaseKind: "Sha256Digest";
469
+ };
470
+ triggerId: string;
471
+ bindings: Record<string, string | {
472
+ kind: "team-source";
473
+ }>;
474
+ armedBy: string;
475
+ armedVia: {
476
+ kind: "connector";
477
+ agentId: string;
478
+ attachmentId: string;
479
+ attachmentVersion: number;
480
+ } | {
481
+ kind: "policy";
482
+ agentId: string;
483
+ policyRevision: string;
484
+ grantorMemberId: string;
485
+ } | null;
486
+ grantorMembershipVersion: number;
487
+ installationAuthority: {
488
+ selection: {
489
+ instanceId: string;
490
+ owner: {
491
+ kind: "installation" | "deployment";
492
+ id: string;
493
+ };
494
+ appId: string & {
495
+ readonly appReleaseKind: "AppId";
496
+ };
497
+ releaseId: string & {
498
+ readonly appReleaseKind: "ReleaseId";
499
+ };
500
+ authorityVersion: number;
501
+ };
502
+ artifactDigest: string & {
503
+ readonly appReleaseKind: "Sha256Digest";
504
+ };
505
+ };
506
+ computerId: string;
507
+ delivery?: {
508
+ readonly agentId: string;
509
+ readonly sessionId: string;
510
+ } | undefined;
511
+ nodeGitAccess?: readonly {
512
+ readonly nodeId: string;
513
+ readonly gitAccess: {
514
+ repository: {
515
+ kind: "installation";
516
+ installationId: string;
517
+ repository: string;
518
+ } | {
519
+ kind: "team-source";
520
+ repository: string;
521
+ };
522
+ branches: string[];
523
+ } | {
524
+ repository: {
525
+ kind: "installation";
526
+ installationId: string;
527
+ repository: string;
528
+ } | {
529
+ kind: "team-source";
530
+ repository: string;
531
+ };
532
+ access: "read";
533
+ };
534
+ readonly graphId?: string;
535
+ }[] | undefined;
536
+ };
537
+ plan: {
538
+ readonly planDigest: string;
539
+ readonly definition: {
540
+ readonly input: {
541
+ readonly [x: string]: import("effect/Schema").Json;
542
+ };
543
+ readonly output: {
544
+ readonly [x: string]: {
545
+ readonly node: string;
546
+ readonly port: string;
547
+ };
548
+ };
549
+ readonly title: string;
550
+ readonly format: "fungi.workflow/v1";
551
+ readonly nodes: readonly ({
552
+ readonly id: string;
553
+ readonly kind: "code";
554
+ readonly source: string;
555
+ readonly input: {
556
+ readonly [x: string]: import("effect/Schema").Json;
557
+ };
558
+ readonly output: {
559
+ readonly [x: string]: import("effect/Schema").Json;
560
+ };
561
+ readonly values: {
562
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
563
+ };
564
+ } | {
565
+ readonly values: {
566
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
567
+ };
568
+ readonly id: string;
569
+ readonly method: string;
570
+ readonly kind: "app";
571
+ readonly app: string;
572
+ readonly methodDigest: string;
573
+ readonly gitAccess?: {
574
+ binding: string;
575
+ repository: string;
576
+ branches: string[];
577
+ } | {
578
+ binding: string;
579
+ repository: string;
580
+ access: "read";
581
+ };
582
+ readonly retry?: {
583
+ readonly attempts: number;
584
+ };
585
+ } | {
586
+ readonly show: readonly {
587
+ readonly node: string;
588
+ readonly port: string;
589
+ }[];
590
+ readonly id: string;
591
+ readonly title: string;
592
+ readonly timeout: number;
593
+ readonly kind: "review";
594
+ readonly reviewers: "runner" | "owners";
595
+ readonly detail?: string;
596
+ readonly choices?: readonly {
597
+ readonly id: string;
598
+ readonly label: string;
599
+ readonly description?: string;
600
+ }[];
601
+ } | {
602
+ readonly id: string;
603
+ readonly kind: "condition";
604
+ readonly test: import("@fungi.computer/braid").Predicate;
605
+ } | {
606
+ readonly id: string;
607
+ readonly kind: "map";
608
+ readonly over: {
609
+ readonly node: string;
610
+ readonly port: string;
611
+ };
612
+ readonly body: string;
613
+ readonly concurrency: number;
614
+ readonly maxItems: number;
615
+ } | {
616
+ readonly id: string;
617
+ readonly kind: "repeat";
618
+ readonly body: string;
619
+ readonly maxRounds: number;
620
+ readonly until: import("@fungi.computer/braid").Predicate;
621
+ } | {
622
+ readonly id: string;
623
+ readonly kind: "wait";
624
+ readonly for: number;
625
+ } | {
626
+ readonly id: string;
627
+ readonly kind: "transform";
628
+ readonly fields: {
629
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
630
+ };
631
+ })[];
632
+ readonly edges: readonly {
633
+ readonly from: {
634
+ readonly node: string;
635
+ readonly port: string;
636
+ };
637
+ readonly to: {
638
+ readonly node: string;
639
+ readonly port: string;
640
+ };
641
+ }[];
642
+ readonly apps: {
643
+ readonly [x: string]: {
644
+ readonly appId: string;
645
+ readonly role?: string;
646
+ };
647
+ };
648
+ readonly description?: string;
649
+ readonly subgraphs?: {
650
+ readonly [x: string]: {
651
+ readonly input: {
652
+ readonly [x: string]: import("effect/Schema").Json;
653
+ };
654
+ readonly nodes: readonly ({
655
+ readonly id: string;
656
+ readonly kind: "code";
657
+ readonly source: string;
658
+ readonly input: {
659
+ readonly [x: string]: import("effect/Schema").Json;
660
+ };
661
+ readonly output: {
662
+ readonly [x: string]: import("effect/Schema").Json;
663
+ };
664
+ readonly values: {
665
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
666
+ };
667
+ } | {
668
+ readonly values: {
669
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
670
+ };
671
+ readonly id: string;
672
+ readonly method: string;
673
+ readonly kind: "app";
674
+ readonly app: string;
675
+ readonly methodDigest: string;
676
+ readonly gitAccess?: {
677
+ binding: string;
678
+ repository: string;
679
+ branches: string[];
680
+ } | {
681
+ binding: string;
682
+ repository: string;
683
+ access: "read";
684
+ };
685
+ readonly retry?: {
686
+ readonly attempts: number;
687
+ };
688
+ } | {
689
+ readonly show: readonly {
690
+ readonly node: string;
691
+ readonly port: string;
692
+ }[];
693
+ readonly id: string;
694
+ readonly title: string;
695
+ readonly timeout: number;
696
+ readonly kind: "review";
697
+ readonly reviewers: "runner" | "owners";
698
+ readonly detail?: string;
699
+ readonly choices?: readonly {
700
+ readonly id: string;
701
+ readonly label: string;
702
+ readonly description?: string;
703
+ }[];
704
+ } | {
705
+ readonly id: string;
706
+ readonly kind: "condition";
707
+ readonly test: import("@fungi.computer/braid").Predicate;
708
+ } | {
709
+ readonly id: string;
710
+ readonly kind: "map";
711
+ readonly over: {
712
+ readonly node: string;
713
+ readonly port: string;
714
+ };
715
+ readonly body: string;
716
+ readonly concurrency: number;
717
+ readonly maxItems: number;
718
+ } | {
719
+ readonly id: string;
720
+ readonly kind: "repeat";
721
+ readonly body: string;
722
+ readonly maxRounds: number;
723
+ readonly until: import("@fungi.computer/braid").Predicate;
724
+ } | {
725
+ readonly id: string;
726
+ readonly kind: "wait";
727
+ readonly for: number;
728
+ } | {
729
+ readonly id: string;
730
+ readonly kind: "transform";
731
+ readonly fields: {
732
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
733
+ };
734
+ })[];
735
+ readonly edges: readonly {
736
+ readonly from: {
737
+ readonly node: string;
738
+ readonly port: string;
739
+ };
740
+ readonly to: {
741
+ readonly node: string;
742
+ readonly port: string;
743
+ };
744
+ }[];
745
+ readonly output: {
746
+ readonly [x: string]: {
747
+ readonly node: string;
748
+ readonly port: string;
749
+ };
750
+ };
751
+ };
752
+ };
753
+ readonly triggers?: readonly ({
754
+ readonly id: string;
755
+ readonly on: "webhook";
756
+ readonly input?: {
757
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
758
+ };
759
+ readonly title?: string;
760
+ readonly when?: import("@fungi.computer/braid").Predicate;
761
+ } | {
762
+ readonly id: string;
763
+ readonly on: "schedule";
764
+ readonly cron: {
765
+ readonly expression: string;
766
+ readonly timeZone: string;
767
+ };
768
+ readonly input?: {
769
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
770
+ };
771
+ readonly title?: string;
772
+ } | {
773
+ readonly id: string;
774
+ readonly on: "event";
775
+ readonly event: string;
776
+ readonly app: string;
777
+ readonly eventDigest: string;
778
+ readonly input?: {
779
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
780
+ };
781
+ readonly title?: string;
782
+ readonly when?: import("@fungi.computer/braid").Predicate;
783
+ readonly repository?: import("@fungi.computer/braid").Mapping;
784
+ })[];
785
+ };
786
+ readonly catalog: {
787
+ readonly [x: string]: {
788
+ readonly methods: {
789
+ readonly [x: string]: {
790
+ readonly input: {
791
+ readonly [x: string]: import("effect/Schema").Json;
792
+ };
793
+ readonly output: {
794
+ readonly [x: string]: import("effect/Schema").Json;
795
+ };
796
+ readonly description: string;
797
+ readonly requires: readonly string[];
798
+ readonly effect: "write" | "external" | "read";
799
+ readonly approval: "none" | "queue" | "simulate";
800
+ readonly digest: string;
801
+ readonly pending?: true;
802
+ };
803
+ };
804
+ readonly events?: {
805
+ readonly [x: string]: {
806
+ readonly digest: string;
807
+ readonly description: string;
808
+ readonly payload: {
809
+ readonly [x: string]: import("effect/Schema").Json;
810
+ };
811
+ };
812
+ };
813
+ };
814
+ };
815
+ readonly bindings: {
816
+ readonly [x: string]: {
817
+ kind: "team-source";
818
+ } | {
819
+ appId: string;
820
+ installationId: string;
821
+ };
822
+ };
823
+ readonly estimatedSteps: number;
824
+ readonly requiredBindings: readonly {
825
+ readonly input: {
826
+ readonly [x: string]: import("effect/Schema").Json;
827
+ };
828
+ readonly output: {
829
+ readonly [x: string]: import("effect/Schema").Json;
830
+ };
831
+ readonly method: string;
832
+ readonly description: string;
833
+ readonly requires: readonly string[];
834
+ readonly effect: "write" | "external" | "read";
835
+ readonly installationId: string;
836
+ readonly app: string;
837
+ readonly approval: "none" | "queue" | "simulate";
838
+ readonly pending?: true;
839
+ }[];
840
+ };
841
+ refusal: string | null;
842
+ } | null;
843
+ refusal(binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger): string | null;
844
+ installation(installationId: string): {
845
+ binding: {
846
+ installationId: string;
847
+ workflowId: string;
848
+ commit: string;
849
+ digest: string & {
850
+ readonly appReleaseKind: "Sha256Digest";
851
+ };
852
+ triggerId: string;
853
+ bindings: Record<string, string | {
854
+ kind: "team-source";
855
+ }>;
856
+ armedBy: string;
857
+ armedVia: {
858
+ kind: "connector";
859
+ agentId: string;
860
+ attachmentId: string;
861
+ attachmentVersion: number;
862
+ } | {
863
+ kind: "policy";
864
+ agentId: string;
865
+ policyRevision: string;
866
+ grantorMemberId: string;
867
+ } | null;
868
+ grantorMembershipVersion: number;
869
+ installationAuthority: {
870
+ selection: {
871
+ instanceId: string;
872
+ owner: {
873
+ kind: "installation" | "deployment";
874
+ id: string;
875
+ };
876
+ appId: string & {
877
+ readonly appReleaseKind: "AppId";
878
+ };
879
+ releaseId: string & {
880
+ readonly appReleaseKind: "ReleaseId";
881
+ };
882
+ authorityVersion: number;
883
+ };
884
+ artifactDigest: string & {
885
+ readonly appReleaseKind: "Sha256Digest";
886
+ };
887
+ };
888
+ computerId: string;
889
+ delivery?: {
890
+ readonly agentId: string;
891
+ readonly sessionId: string;
892
+ } | undefined;
893
+ nodeGitAccess?: readonly {
894
+ readonly nodeId: string;
895
+ readonly gitAccess: {
896
+ repository: {
897
+ kind: "installation";
898
+ installationId: string;
899
+ repository: string;
900
+ } | {
901
+ kind: "team-source";
902
+ repository: string;
903
+ };
904
+ branches: string[];
905
+ } | {
906
+ repository: {
907
+ kind: "installation";
908
+ installationId: string;
909
+ repository: string;
910
+ } | {
911
+ kind: "team-source";
912
+ repository: string;
913
+ };
914
+ access: "read";
915
+ };
916
+ readonly graphId?: string;
917
+ }[] | undefined;
918
+ };
919
+ plan: {
920
+ readonly planDigest: string;
921
+ readonly definition: {
922
+ readonly input: {
923
+ readonly [x: string]: import("effect/Schema").Json;
924
+ };
925
+ readonly output: {
926
+ readonly [x: string]: {
927
+ readonly node: string;
928
+ readonly port: string;
929
+ };
930
+ };
931
+ readonly title: string;
932
+ readonly format: "fungi.workflow/v1";
933
+ readonly nodes: readonly ({
934
+ readonly id: string;
935
+ readonly kind: "code";
936
+ readonly source: string;
937
+ readonly input: {
938
+ readonly [x: string]: import("effect/Schema").Json;
939
+ };
940
+ readonly output: {
941
+ readonly [x: string]: import("effect/Schema").Json;
942
+ };
943
+ readonly values: {
944
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
945
+ };
946
+ } | {
947
+ readonly values: {
948
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
949
+ };
950
+ readonly id: string;
951
+ readonly method: string;
952
+ readonly kind: "app";
953
+ readonly app: string;
954
+ readonly methodDigest: string;
955
+ readonly gitAccess?: {
956
+ binding: string;
957
+ repository: string;
958
+ branches: string[];
959
+ } | {
960
+ binding: string;
961
+ repository: string;
962
+ access: "read";
963
+ };
964
+ readonly retry?: {
965
+ readonly attempts: number;
966
+ };
967
+ } | {
968
+ readonly show: readonly {
969
+ readonly node: string;
970
+ readonly port: string;
971
+ }[];
972
+ readonly id: string;
973
+ readonly title: string;
974
+ readonly timeout: number;
975
+ readonly kind: "review";
976
+ readonly reviewers: "runner" | "owners";
977
+ readonly detail?: string;
978
+ readonly choices?: readonly {
979
+ readonly id: string;
980
+ readonly label: string;
981
+ readonly description?: string;
982
+ }[];
983
+ } | {
984
+ readonly id: string;
985
+ readonly kind: "condition";
986
+ readonly test: import("@fungi.computer/braid").Predicate;
987
+ } | {
988
+ readonly id: string;
989
+ readonly kind: "map";
990
+ readonly over: {
991
+ readonly node: string;
992
+ readonly port: string;
993
+ };
994
+ readonly body: string;
995
+ readonly concurrency: number;
996
+ readonly maxItems: number;
997
+ } | {
998
+ readonly id: string;
999
+ readonly kind: "repeat";
1000
+ readonly body: string;
1001
+ readonly maxRounds: number;
1002
+ readonly until: import("@fungi.computer/braid").Predicate;
1003
+ } | {
1004
+ readonly id: string;
1005
+ readonly kind: "wait";
1006
+ readonly for: number;
1007
+ } | {
1008
+ readonly id: string;
1009
+ readonly kind: "transform";
1010
+ readonly fields: {
1011
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1012
+ };
1013
+ })[];
1014
+ readonly edges: readonly {
1015
+ readonly from: {
1016
+ readonly node: string;
1017
+ readonly port: string;
1018
+ };
1019
+ readonly to: {
1020
+ readonly node: string;
1021
+ readonly port: string;
1022
+ };
1023
+ }[];
1024
+ readonly apps: {
1025
+ readonly [x: string]: {
1026
+ readonly appId: string;
1027
+ readonly role?: string;
1028
+ };
1029
+ };
1030
+ readonly description?: string;
1031
+ readonly subgraphs?: {
1032
+ readonly [x: string]: {
1033
+ readonly input: {
1034
+ readonly [x: string]: import("effect/Schema").Json;
1035
+ };
1036
+ readonly nodes: readonly ({
1037
+ readonly id: string;
1038
+ readonly kind: "code";
1039
+ readonly source: string;
1040
+ readonly input: {
1041
+ readonly [x: string]: import("effect/Schema").Json;
1042
+ };
1043
+ readonly output: {
1044
+ readonly [x: string]: import("effect/Schema").Json;
1045
+ };
1046
+ readonly values: {
1047
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1048
+ };
1049
+ } | {
1050
+ readonly values: {
1051
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1052
+ };
1053
+ readonly id: string;
1054
+ readonly method: string;
1055
+ readonly kind: "app";
1056
+ readonly app: string;
1057
+ readonly methodDigest: string;
1058
+ readonly gitAccess?: {
1059
+ binding: string;
1060
+ repository: string;
1061
+ branches: string[];
1062
+ } | {
1063
+ binding: string;
1064
+ repository: string;
1065
+ access: "read";
1066
+ };
1067
+ readonly retry?: {
1068
+ readonly attempts: number;
1069
+ };
1070
+ } | {
1071
+ readonly show: readonly {
1072
+ readonly node: string;
1073
+ readonly port: string;
1074
+ }[];
1075
+ readonly id: string;
1076
+ readonly title: string;
1077
+ readonly timeout: number;
1078
+ readonly kind: "review";
1079
+ readonly reviewers: "runner" | "owners";
1080
+ readonly detail?: string;
1081
+ readonly choices?: readonly {
1082
+ readonly id: string;
1083
+ readonly label: string;
1084
+ readonly description?: string;
1085
+ }[];
1086
+ } | {
1087
+ readonly id: string;
1088
+ readonly kind: "condition";
1089
+ readonly test: import("@fungi.computer/braid").Predicate;
1090
+ } | {
1091
+ readonly id: string;
1092
+ readonly kind: "map";
1093
+ readonly over: {
1094
+ readonly node: string;
1095
+ readonly port: string;
1096
+ };
1097
+ readonly body: string;
1098
+ readonly concurrency: number;
1099
+ readonly maxItems: number;
1100
+ } | {
1101
+ readonly id: string;
1102
+ readonly kind: "repeat";
1103
+ readonly body: string;
1104
+ readonly maxRounds: number;
1105
+ readonly until: import("@fungi.computer/braid").Predicate;
1106
+ } | {
1107
+ readonly id: string;
1108
+ readonly kind: "wait";
1109
+ readonly for: number;
1110
+ } | {
1111
+ readonly id: string;
1112
+ readonly kind: "transform";
1113
+ readonly fields: {
1114
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1115
+ };
1116
+ })[];
1117
+ readonly edges: readonly {
1118
+ readonly from: {
1119
+ readonly node: string;
1120
+ readonly port: string;
1121
+ };
1122
+ readonly to: {
1123
+ readonly node: string;
1124
+ readonly port: string;
1125
+ };
1126
+ }[];
1127
+ readonly output: {
1128
+ readonly [x: string]: {
1129
+ readonly node: string;
1130
+ readonly port: string;
1131
+ };
1132
+ };
1133
+ };
1134
+ };
1135
+ readonly triggers?: readonly ({
1136
+ readonly id: string;
1137
+ readonly on: "webhook";
1138
+ readonly input?: {
1139
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1140
+ };
1141
+ readonly title?: string;
1142
+ readonly when?: import("@fungi.computer/braid").Predicate;
1143
+ } | {
1144
+ readonly id: string;
1145
+ readonly on: "schedule";
1146
+ readonly cron: {
1147
+ readonly expression: string;
1148
+ readonly timeZone: string;
1149
+ };
1150
+ readonly input?: {
1151
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1152
+ };
1153
+ readonly title?: string;
1154
+ } | {
1155
+ readonly id: string;
1156
+ readonly on: "event";
1157
+ readonly event: string;
1158
+ readonly app: string;
1159
+ readonly eventDigest: string;
1160
+ readonly input?: {
1161
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1162
+ };
1163
+ readonly title?: string;
1164
+ readonly when?: import("@fungi.computer/braid").Predicate;
1165
+ readonly repository?: import("@fungi.computer/braid").Mapping;
1166
+ })[];
1167
+ };
1168
+ readonly catalog: {
1169
+ readonly [x: string]: {
1170
+ readonly methods: {
1171
+ readonly [x: string]: {
1172
+ readonly input: {
1173
+ readonly [x: string]: import("effect/Schema").Json;
1174
+ };
1175
+ readonly output: {
1176
+ readonly [x: string]: import("effect/Schema").Json;
1177
+ };
1178
+ readonly description: string;
1179
+ readonly requires: readonly string[];
1180
+ readonly effect: "write" | "external" | "read";
1181
+ readonly approval: "none" | "queue" | "simulate";
1182
+ readonly digest: string;
1183
+ readonly pending?: true;
1184
+ };
1185
+ };
1186
+ readonly events?: {
1187
+ readonly [x: string]: {
1188
+ readonly digest: string;
1189
+ readonly description: string;
1190
+ readonly payload: {
1191
+ readonly [x: string]: import("effect/Schema").Json;
1192
+ };
1193
+ };
1194
+ };
1195
+ };
1196
+ };
1197
+ readonly bindings: {
1198
+ readonly [x: string]: {
1199
+ kind: "team-source";
1200
+ } | {
1201
+ appId: string;
1202
+ installationId: string;
1203
+ };
1204
+ };
1205
+ readonly estimatedSteps: number;
1206
+ readonly requiredBindings: readonly {
1207
+ readonly input: {
1208
+ readonly [x: string]: import("effect/Schema").Json;
1209
+ };
1210
+ readonly output: {
1211
+ readonly [x: string]: import("effect/Schema").Json;
1212
+ };
1213
+ readonly method: string;
1214
+ readonly description: string;
1215
+ readonly requires: readonly string[];
1216
+ readonly effect: "write" | "external" | "read";
1217
+ readonly installationId: string;
1218
+ readonly app: string;
1219
+ readonly approval: "none" | "queue" | "simulate";
1220
+ readonly pending?: true;
1221
+ }[];
1222
+ };
1223
+ refusal: string | null;
1224
+ }[];
1225
+ refuse(binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger, reason: string): void;
1226
+ remove(binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger): void;
1227
+ invalidateInstallation(installationId: string): void;
1228
+ };
1229
+ startGraph(memberId: string, raw: import("@fungi.computer/braid/runtime").GraphStartRequest, computerId: string | null, libraryInstallationId?: string): Promise<Readonly<{
1230
+ kind: "invalid";
1231
+ issues: readonly import("@fungi.computer/braid").Issue[];
1232
+ }> | {
1233
+ kind: "conflict" | "started" | "replay";
1234
+ runId: string;
1235
+ planDigest: string;
1236
+ } | {
1237
+ kind: "invalid";
1238
+ issues: {
1239
+ code: string;
1240
+ message: string;
1241
+ }[];
1242
+ }>;
1243
+ startCachedGraph(binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger, started: Pick<import("@fungi.computer/braid/runtime").GraphStartRequest, "requestId" | "input"> & {
1244
+ triggerRepository?: string;
1245
+ }): Promise<{
1246
+ kind: "conflict" | "started" | "replay";
1247
+ runId: string;
1248
+ planDigest: string;
1249
+ } | {
1250
+ kind: "refused";
1251
+ reason: string;
1252
+ }>;
1253
+ callWorkflowApp: (memberId: string, call: import("@fungi.computer/braid/runtime").WorkflowAppCall) => Promise<import("@fungi.computer/braid/runtime").WorkflowAppCallResult>;
1254
+ admitDelivery: (memberId: string, delivery: import("@fungi.computer/braid/runtime").WorkflowRunDelivery) => Promise<boolean>;
1255
+ memberComputer: (memberId: string, computerId: string) => Promise<boolean>;
1256
+ catalog: (memberId: string) => Promise<readonly import("@fungi.computer/braid/runtime").WorkflowCatalogEntry[]>;
1257
+ reviewer: (memberId: string) => Promise<{
1258
+ isOwner: boolean;
1259
+ }>;
1260
+ member: (actorId: string) => Promise<{
1261
+ membershipVersion: number;
1262
+ }>;
1263
+ revokeMember(rawMemberId: string): void;
1264
+ revokeInstallationInMutation(rawInstallationId: string): void;
1265
+ revokeReleaseInMutation(appIds: readonly string[]): void;
1266
+ onLifecycle(status: "active" | "suspended"): void;
1267
+ reserveTriggerRun(raw: {
1268
+ scope: import("@fungi.computer/braid/runtime").TriggerRunScope;
1269
+ requestId: string;
1270
+ }): {
1271
+ kind: "reserved" | "replay";
1272
+ reservationId: string;
1273
+ runId: string | null;
1274
+ } | {
1275
+ kind: "refused";
1276
+ reason: "limit";
1277
+ };
1278
+ countActiveTriggerRuns(scope: import("@fungi.computer/braid/runtime").TriggerRunScope): number;
1279
+ releaseTriggerRun(rawReservationId: string): void;
1280
+ graph: {
1281
+ read: (runId: string) => import("@fungi.computer/braid/runtime").GraphRun | null;
1282
+ list(filter: {
1283
+ installationId: string;
1284
+ actorId?: string;
1285
+ workflowId?: string;
1286
+ }): readonly (import("@fungi.computer/braid/runtime").GraphRun & {
1287
+ startedAt: number;
1288
+ })[];
1289
+ active(): readonly import("@fungi.computer/braid/runtime").GraphRun[];
1290
+ outcome(runId: string): "active" | "terminal" | "cancelled" | null;
1291
+ markTerminal(runId: string, outcome?: "terminal" | "cancelled"): void;
1292
+ startCompiled: (input: import("@fungi.computer/braid/runtime").GraphRun) => "started" | "replay" | "conflict";
1293
+ start(input: import("@fungi.computer/braid/runtime").GraphRun): Promise<"started" | "replay" | "conflict">;
1294
+ recordEvent(input: import("@fungi.computer/braid").NodeEvent): void;
1295
+ events(runId: string): readonly import("@fungi.computer/braid").NodeEvent[];
1296
+ openReview(input: import("@fungi.computer/braid").GraphReview): number;
1297
+ reviews(runId: string): {
1298
+ review: {
1299
+ readonly show: readonly import("effect/Schema").Json[];
1300
+ readonly title: string;
1301
+ readonly timeout: number;
1302
+ readonly runId: string;
1303
+ readonly nodeId: string;
1304
+ readonly reviewers: "runner" | "owners";
1305
+ readonly iteration: string;
1306
+ readonly instanceId: string;
1307
+ readonly eventType: string;
1308
+ readonly position?: readonly {
1309
+ readonly node: string;
1310
+ readonly loop: "repeat" | "map";
1311
+ readonly index: number;
1312
+ readonly count: number;
1313
+ }[];
1314
+ readonly choices?: readonly string[];
1315
+ };
1316
+ status: "closed" | "pending" | "answered" | "delivered" | "timed_out";
1317
+ openedAt: number;
1318
+ expiresAt: number;
1319
+ }[];
1320
+ answerReview(key: Pick<import("@fungi.computer/braid").GraphReview, "runId" | "nodeId" | "iteration">, answer: {
1321
+ readonly approved: boolean;
1322
+ } | {
1323
+ readonly choice: string;
1324
+ readonly note?: string;
1325
+ }, reviewer: import("@fungi.computer/braid/runtime").GraphReviewer): "accepted" | "denied" | "not_waiting" | "invalid";
1326
+ pendingReviewDeliveries(runId: string): readonly import("@fungi.computer/braid/runtime").ReviewDelivery[];
1327
+ markReviewDelivered(delivery: import("@fungi.computer/braid/runtime").ReviewDelivery): void;
1328
+ };
1329
+ recheckGraphNode(raw: import("@fungi.computer/braid").NodeEvent): Promise<import("@fungi.computer/braid").NodeAdmissionResult>;
1330
+ startMemberGraph(memberId: string, raw: unknown, libraryInstallationId?: string): Promise<"conflict" | "started" | "replay">;
1331
+ };
1332
+ triggers: {
1333
+ arm: (armer: import("@fungi.computer/braid/runtime").WorkflowArmer, raw: import("@fungi.computer/braid/runtime").WorkflowTriggerTarget, computerId: string, rawAuthority: import("@fungi.computer/braid/runtime").WorkflowInstallationAuthority) => Promise<{
1334
+ kind: "refused";
1335
+ reason: string;
1336
+ } | {
1337
+ kind: "refused";
1338
+ reason: string;
1339
+ issues: readonly import("@fungi.computer/braid").Issue[];
1340
+ binding?: never;
1341
+ trigger?: never;
1342
+ definition?: never;
1343
+ } | {
1344
+ kind: "armed";
1345
+ binding: {
1346
+ installationId: string;
1347
+ workflowId: string;
1348
+ commit: string;
1349
+ digest: string & {
1350
+ readonly appReleaseKind: "Sha256Digest";
1351
+ };
1352
+ triggerId: string;
1353
+ bindings: Record<string, string | {
1354
+ kind: "team-source";
1355
+ }>;
1356
+ armedBy: string;
1357
+ armedVia: {
1358
+ kind: "connector";
1359
+ agentId: string;
1360
+ attachmentId: string;
1361
+ attachmentVersion: number;
1362
+ } | {
1363
+ kind: "policy";
1364
+ agentId: string;
1365
+ policyRevision: string;
1366
+ grantorMemberId: string;
1367
+ } | null;
1368
+ grantorMembershipVersion: number;
1369
+ installationAuthority: {
1370
+ selection: {
1371
+ instanceId: string;
1372
+ owner: {
1373
+ kind: "installation" | "deployment";
1374
+ id: string;
1375
+ };
1376
+ appId: string & {
1377
+ readonly appReleaseKind: "AppId";
1378
+ };
1379
+ releaseId: string & {
1380
+ readonly appReleaseKind: "ReleaseId";
1381
+ };
1382
+ authorityVersion: number;
1383
+ };
1384
+ artifactDigest: string & {
1385
+ readonly appReleaseKind: "Sha256Digest";
1386
+ };
1387
+ };
1388
+ computerId: string;
1389
+ delivery?: {
1390
+ readonly agentId: string;
1391
+ readonly sessionId: string;
1392
+ } | undefined;
1393
+ nodeGitAccess?: readonly {
1394
+ readonly nodeId: string;
1395
+ readonly gitAccess: {
1396
+ repository: {
1397
+ kind: "installation";
1398
+ installationId: string;
1399
+ repository: string;
1400
+ } | {
1401
+ kind: "team-source";
1402
+ repository: string;
1403
+ };
1404
+ branches: string[];
1405
+ } | {
1406
+ repository: {
1407
+ kind: "installation";
1408
+ installationId: string;
1409
+ repository: string;
1410
+ } | {
1411
+ kind: "team-source";
1412
+ repository: string;
1413
+ };
1414
+ access: "read";
1415
+ };
1416
+ readonly graphId?: string;
1417
+ }[] | undefined;
1418
+ };
1419
+ trigger: {
1420
+ readonly id: string;
1421
+ readonly on: "webhook";
1422
+ readonly input?: {
1423
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1424
+ };
1425
+ readonly title?: string;
1426
+ readonly when?: import("@fungi.computer/braid").Predicate;
1427
+ } | {
1428
+ readonly id: string;
1429
+ readonly on: "schedule";
1430
+ readonly cron: {
1431
+ readonly expression: string;
1432
+ readonly timeZone: string;
1433
+ };
1434
+ readonly input?: {
1435
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1436
+ };
1437
+ readonly title?: string;
1438
+ } | {
1439
+ readonly id: string;
1440
+ readonly on: "event";
1441
+ readonly event: string;
1442
+ readonly app: string;
1443
+ readonly eventDigest: string;
1444
+ readonly input?: {
1445
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1446
+ };
1447
+ readonly title?: string;
1448
+ readonly when?: import("@fungi.computer/braid").Predicate;
1449
+ readonly repository?: import("@fungi.computer/braid").Mapping;
1450
+ };
1451
+ definition: {
1452
+ readonly input: {
1453
+ readonly [x: string]: import("effect/Schema").Json;
1454
+ };
1455
+ readonly output: {
1456
+ readonly [x: string]: {
1457
+ readonly node: string;
1458
+ readonly port: string;
1459
+ };
1460
+ };
1461
+ readonly title: string;
1462
+ readonly format: "fungi.workflow/v1";
1463
+ readonly nodes: readonly ({
1464
+ readonly id: string;
1465
+ readonly kind: "code";
1466
+ readonly source: string;
1467
+ readonly input: {
1468
+ readonly [x: string]: import("effect/Schema").Json;
1469
+ };
1470
+ readonly output: {
1471
+ readonly [x: string]: import("effect/Schema").Json;
1472
+ };
1473
+ readonly values: {
1474
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1475
+ };
1476
+ } | {
1477
+ readonly values: {
1478
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1479
+ };
1480
+ readonly id: string;
1481
+ readonly method: string;
1482
+ readonly kind: "app";
1483
+ readonly app: string;
1484
+ readonly methodDigest: string;
1485
+ readonly gitAccess?: {
1486
+ binding: string;
1487
+ repository: string;
1488
+ branches: string[];
1489
+ } | {
1490
+ binding: string;
1491
+ repository: string;
1492
+ access: "read";
1493
+ };
1494
+ readonly retry?: {
1495
+ readonly attempts: number;
1496
+ };
1497
+ } | {
1498
+ readonly show: readonly {
1499
+ readonly node: string;
1500
+ readonly port: string;
1501
+ }[];
1502
+ readonly id: string;
1503
+ readonly title: string;
1504
+ readonly timeout: number;
1505
+ readonly kind: "review";
1506
+ readonly reviewers: "runner" | "owners";
1507
+ readonly detail?: string;
1508
+ readonly choices?: readonly {
1509
+ readonly id: string;
1510
+ readonly label: string;
1511
+ readonly description?: string;
1512
+ }[];
1513
+ } | {
1514
+ readonly id: string;
1515
+ readonly kind: "condition";
1516
+ readonly test: import("@fungi.computer/braid").Predicate;
1517
+ } | {
1518
+ readonly id: string;
1519
+ readonly kind: "map";
1520
+ readonly over: {
1521
+ readonly node: string;
1522
+ readonly port: string;
1523
+ };
1524
+ readonly body: string;
1525
+ readonly concurrency: number;
1526
+ readonly maxItems: number;
1527
+ } | {
1528
+ readonly id: string;
1529
+ readonly kind: "repeat";
1530
+ readonly body: string;
1531
+ readonly maxRounds: number;
1532
+ readonly until: import("@fungi.computer/braid").Predicate;
1533
+ } | {
1534
+ readonly id: string;
1535
+ readonly kind: "wait";
1536
+ readonly for: number;
1537
+ } | {
1538
+ readonly id: string;
1539
+ readonly kind: "transform";
1540
+ readonly fields: {
1541
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1542
+ };
1543
+ })[];
1544
+ readonly edges: readonly {
1545
+ readonly from: {
1546
+ readonly node: string;
1547
+ readonly port: string;
1548
+ };
1549
+ readonly to: {
1550
+ readonly node: string;
1551
+ readonly port: string;
1552
+ };
1553
+ }[];
1554
+ readonly apps: {
1555
+ readonly [x: string]: {
1556
+ readonly appId: string;
1557
+ readonly role?: string;
1558
+ };
1559
+ };
1560
+ readonly description?: string;
1561
+ readonly subgraphs?: {
1562
+ readonly [x: string]: {
1563
+ readonly input: {
1564
+ readonly [x: string]: import("effect/Schema").Json;
1565
+ };
1566
+ readonly nodes: readonly ({
1567
+ readonly id: string;
1568
+ readonly kind: "code";
1569
+ readonly source: string;
1570
+ readonly input: {
1571
+ readonly [x: string]: import("effect/Schema").Json;
1572
+ };
1573
+ readonly output: {
1574
+ readonly [x: string]: import("effect/Schema").Json;
1575
+ };
1576
+ readonly values: {
1577
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1578
+ };
1579
+ } | {
1580
+ readonly values: {
1581
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1582
+ };
1583
+ readonly id: string;
1584
+ readonly method: string;
1585
+ readonly kind: "app";
1586
+ readonly app: string;
1587
+ readonly methodDigest: string;
1588
+ readonly gitAccess?: {
1589
+ binding: string;
1590
+ repository: string;
1591
+ branches: string[];
1592
+ } | {
1593
+ binding: string;
1594
+ repository: string;
1595
+ access: "read";
1596
+ };
1597
+ readonly retry?: {
1598
+ readonly attempts: number;
1599
+ };
1600
+ } | {
1601
+ readonly show: readonly {
1602
+ readonly node: string;
1603
+ readonly port: string;
1604
+ }[];
1605
+ readonly id: string;
1606
+ readonly title: string;
1607
+ readonly timeout: number;
1608
+ readonly kind: "review";
1609
+ readonly reviewers: "runner" | "owners";
1610
+ readonly detail?: string;
1611
+ readonly choices?: readonly {
1612
+ readonly id: string;
1613
+ readonly label: string;
1614
+ readonly description?: string;
1615
+ }[];
1616
+ } | {
1617
+ readonly id: string;
1618
+ readonly kind: "condition";
1619
+ readonly test: import("@fungi.computer/braid").Predicate;
1620
+ } | {
1621
+ readonly id: string;
1622
+ readonly kind: "map";
1623
+ readonly over: {
1624
+ readonly node: string;
1625
+ readonly port: string;
1626
+ };
1627
+ readonly body: string;
1628
+ readonly concurrency: number;
1629
+ readonly maxItems: number;
1630
+ } | {
1631
+ readonly id: string;
1632
+ readonly kind: "repeat";
1633
+ readonly body: string;
1634
+ readonly maxRounds: number;
1635
+ readonly until: import("@fungi.computer/braid").Predicate;
1636
+ } | {
1637
+ readonly id: string;
1638
+ readonly kind: "wait";
1639
+ readonly for: number;
1640
+ } | {
1641
+ readonly id: string;
1642
+ readonly kind: "transform";
1643
+ readonly fields: {
1644
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1645
+ };
1646
+ })[];
1647
+ readonly edges: readonly {
1648
+ readonly from: {
1649
+ readonly node: string;
1650
+ readonly port: string;
1651
+ };
1652
+ readonly to: {
1653
+ readonly node: string;
1654
+ readonly port: string;
1655
+ };
1656
+ }[];
1657
+ readonly output: {
1658
+ readonly [x: string]: {
1659
+ readonly node: string;
1660
+ readonly port: string;
1661
+ };
1662
+ };
1663
+ };
1664
+ };
1665
+ readonly triggers?: readonly ({
1666
+ readonly id: string;
1667
+ readonly on: "webhook";
1668
+ readonly input?: {
1669
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1670
+ };
1671
+ readonly title?: string;
1672
+ readonly when?: import("@fungi.computer/braid").Predicate;
1673
+ } | {
1674
+ readonly id: string;
1675
+ readonly on: "schedule";
1676
+ readonly cron: {
1677
+ readonly expression: string;
1678
+ readonly timeZone: string;
1679
+ };
1680
+ readonly input?: {
1681
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1682
+ };
1683
+ readonly title?: string;
1684
+ } | {
1685
+ readonly id: string;
1686
+ readonly on: "event";
1687
+ readonly event: string;
1688
+ readonly app: string;
1689
+ readonly eventDigest: string;
1690
+ readonly input?: {
1691
+ readonly [x: string]: import("@fungi.computer/braid").Mapping;
1692
+ };
1693
+ readonly title?: string;
1694
+ readonly when?: import("@fungi.computer/braid").Predicate;
1695
+ readonly repository?: import("@fungi.computer/braid").Mapping;
1696
+ })[];
1697
+ };
1698
+ reason?: never;
1699
+ issues?: never;
1700
+ }>;
1701
+ disarm: (binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger) => void;
1702
+ refusal: (binding: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger) => string | null;
1703
+ invalidateInstallation: (installationId: string) => void;
1704
+ revalidatePublished(installationId: string, git: import("@fungi.computer/agar/git").GitBinding): Promise<void>;
1705
+ fire(raw: import("@fungi.computer/braid/runtime").ArmedWorkflowTrigger, scope: string, event: import("@fungi.computer/braid").TriggerEvent): Promise<Readonly<{
1706
+ kind: "ignored";
1707
+ }> | Readonly<{
1708
+ kind: "started" | "replay" | "conflict";
1709
+ runId: string;
1710
+ planDigest: string;
1711
+ }> | Readonly<{
1712
+ kind: "refused";
1713
+ reason: string;
1714
+ }>>;
1715
+ };
1716
+ };