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