@fungi.computer/braid 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +550 -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 +43 -0
- package/dist/compile.js +248 -0
- package/dist/execution.d.ts +194 -0
- package/dist/execution.js +130 -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 +9 -0
- package/dist/index.js +9 -0
- package/dist/ports.d.ts +58 -0
- package/dist/ports.js +256 -0
- package/dist/review-text.d.ts +15 -0
- package/dist/review-text.js +40 -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 +788 -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 +79 -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 +156 -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 +1650 -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 +594 -0
- package/dist/runtime/trigger-owner.js +280 -0
- package/dist/runtime/trigger-plans.d.ts +774 -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 +1183 -0
- package/dist/schema.js +239 -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 +686 -0
- package/dist/workflow-id.d.ts +3 -0
- package/dist/workflow-id.js +3 -0
- package/package.json +96 -3
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
import * as S from "effect/Schema";
|
|
2
|
+
/** Provenance supplied only by the admitted published-Workflow trigger owner. */
|
|
3
|
+
export declare const graphTriggerProvenanceSchema: S.Struct<{
|
|
4
|
+
readonly libraryInstallationId: S.String;
|
|
5
|
+
readonly workflowId: S.declare<string, unknown>;
|
|
6
|
+
readonly commit: S.declare<string, unknown>;
|
|
7
|
+
readonly triggerId: S.String;
|
|
8
|
+
readonly armedBy: S.String;
|
|
9
|
+
readonly nodeGitAccess: S.optionalKey<S.$Array<S.Struct<{
|
|
10
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
11
|
+
readonly nodeId: S.String;
|
|
12
|
+
readonly gitAccess: S.declare<{
|
|
13
|
+
repository: {
|
|
14
|
+
kind: "installation";
|
|
15
|
+
installationId: string;
|
|
16
|
+
repository: string;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "team-source";
|
|
19
|
+
repository: string;
|
|
20
|
+
};
|
|
21
|
+
branches: string[];
|
|
22
|
+
} | {
|
|
23
|
+
repository: {
|
|
24
|
+
kind: "installation";
|
|
25
|
+
installationId: string;
|
|
26
|
+
repository: string;
|
|
27
|
+
} | {
|
|
28
|
+
kind: "team-source";
|
|
29
|
+
repository: string;
|
|
30
|
+
};
|
|
31
|
+
access: "read";
|
|
32
|
+
}, {
|
|
33
|
+
repository: {
|
|
34
|
+
kind: "installation";
|
|
35
|
+
installationId: string;
|
|
36
|
+
repository: string;
|
|
37
|
+
} | {
|
|
38
|
+
kind: "team-source";
|
|
39
|
+
repository: string;
|
|
40
|
+
};
|
|
41
|
+
branches: string[];
|
|
42
|
+
} | {
|
|
43
|
+
repository: {
|
|
44
|
+
kind: "installation";
|
|
45
|
+
installationId: string;
|
|
46
|
+
repository: string;
|
|
47
|
+
} | {
|
|
48
|
+
kind: "team-source";
|
|
49
|
+
repository: string;
|
|
50
|
+
};
|
|
51
|
+
access: "read";
|
|
52
|
+
}>;
|
|
53
|
+
}>>>;
|
|
54
|
+
/** The firing event's repository, resolving `$trigger.repository`. */
|
|
55
|
+
readonly repository: S.optionalKey<S.declare<string, string>>;
|
|
56
|
+
}>;
|
|
57
|
+
export type GraphTriggerProvenance = typeof graphTriggerProvenanceSchema.Type;
|
|
58
|
+
declare const graphPublicationSchema: S.Struct<{
|
|
59
|
+
readonly installationId: S.String;
|
|
60
|
+
readonly workflowId: S.declare<string, unknown>;
|
|
61
|
+
readonly commit: S.declare<string, unknown>;
|
|
62
|
+
readonly digest: S.declare<string, unknown>;
|
|
63
|
+
readonly armedBy: S.declare<{
|
|
64
|
+
kind: "member";
|
|
65
|
+
memberId: string;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "agent";
|
|
68
|
+
agentId: string;
|
|
69
|
+
} | {
|
|
70
|
+
kind: "team-key";
|
|
71
|
+
keyId: string;
|
|
72
|
+
}, unknown>;
|
|
73
|
+
}>;
|
|
74
|
+
export type GraphPublication = typeof graphPublicationSchema.Type;
|
|
75
|
+
/**
|
|
76
|
+
* The run's declared delivery: the Agent Session that receives its ending,
|
|
77
|
+
* whoever started it. Declared at start or arming, never by a node.
|
|
78
|
+
*/
|
|
79
|
+
export declare const workflowRunDeliverySchema: S.Struct<{
|
|
80
|
+
readonly agentId: S.String;
|
|
81
|
+
readonly sessionId: S.String;
|
|
82
|
+
}>;
|
|
83
|
+
export type WorkflowRunDelivery = typeof workflowRunDeliverySchema.Type;
|
|
84
|
+
/** The member who started or armed the run, or the Agent Session that did. */
|
|
85
|
+
export declare const workflowMemberInitiatorSchema: S.Struct<{
|
|
86
|
+
readonly kind: S.Literal<"member">;
|
|
87
|
+
readonly memberId: S.String;
|
|
88
|
+
}>;
|
|
89
|
+
export type WorkflowMemberInitiator = typeof workflowMemberInitiatorSchema.Type;
|
|
90
|
+
/** Trusted acquisition identity, never Workflow arguments or an Agent creator. */
|
|
91
|
+
export declare const workflowAgentInitiatorSchema: S.Struct<{
|
|
92
|
+
readonly kind: S.Literal<"agent">;
|
|
93
|
+
readonly agentId: S.String;
|
|
94
|
+
readonly sessionId: S.String;
|
|
95
|
+
readonly grantorMemberId: S.String;
|
|
96
|
+
}>;
|
|
97
|
+
export type WorkflowAgentInitiator = typeof workflowAgentInitiatorSchema.Type;
|
|
98
|
+
/** A key never becomes a principal of its own; the run always acts as its grantor. */
|
|
99
|
+
export declare const workflowKeyInitiatorSchema: S.Struct<{
|
|
100
|
+
readonly kind: S.Literal<"key">;
|
|
101
|
+
readonly keyId: S.String;
|
|
102
|
+
readonly grantorMemberId: S.String;
|
|
103
|
+
}>;
|
|
104
|
+
export type WorkflowKeyInitiator = typeof workflowKeyInitiatorSchema.Type;
|
|
105
|
+
export declare const workflowRunInitiatorSchema: S.Union<readonly [S.Struct<{
|
|
106
|
+
readonly kind: S.Literal<"member">;
|
|
107
|
+
readonly memberId: S.String;
|
|
108
|
+
}>, S.Struct<{
|
|
109
|
+
readonly kind: S.Literal<"agent">;
|
|
110
|
+
readonly agentId: S.String;
|
|
111
|
+
readonly sessionId: S.String;
|
|
112
|
+
readonly grantorMemberId: S.String;
|
|
113
|
+
}>, S.Struct<{
|
|
114
|
+
readonly kind: S.Literal<"key">;
|
|
115
|
+
readonly keyId: S.String;
|
|
116
|
+
readonly grantorMemberId: S.String;
|
|
117
|
+
}>]>;
|
|
118
|
+
export type WorkflowRunInitiator = typeof workflowRunInitiatorSchema.Type;
|
|
119
|
+
/** The Agent Session stays host-side; a listing names only the Agent/key and its grantor. */
|
|
120
|
+
export declare function wireRunInitiator(initiatedBy: WorkflowRunInitiator): Readonly<{
|
|
121
|
+
kind: "member";
|
|
122
|
+
memberId: string;
|
|
123
|
+
}> | Readonly<{
|
|
124
|
+
kind: "agent";
|
|
125
|
+
agentId: string;
|
|
126
|
+
grantorMemberId: string;
|
|
127
|
+
}> | Readonly<{
|
|
128
|
+
kind: "key";
|
|
129
|
+
keyId: string;
|
|
130
|
+
grantorMemberId: string;
|
|
131
|
+
}>;
|
|
132
|
+
export declare const workflowRunSourceValues: readonly ["manual", "schedule", "event", "agent", "key"];
|
|
133
|
+
export declare const workflowRunSourceSchema: S.Literals<readonly ["manual", "schedule", "event", "agent", "key"]>;
|
|
134
|
+
export type WorkflowRunSource = typeof workflowRunSourceSchema.Type;
|
|
135
|
+
export declare const graphRunSchema: S.Struct<{
|
|
136
|
+
readonly teamId: S.String;
|
|
137
|
+
readonly runId: S.String;
|
|
138
|
+
readonly requestId: S.String;
|
|
139
|
+
readonly actorId: S.String;
|
|
140
|
+
/** Host-bound library for raw as well as published App starts; never guest input. */
|
|
141
|
+
readonly libraryInstallationId: S.optionalKey<S.String>;
|
|
142
|
+
/** The Computer the starting member pinned; `computer.*` work runs only there. */
|
|
143
|
+
readonly computerId: S.NullOr<S.String>;
|
|
144
|
+
readonly plan: S.Struct<{
|
|
145
|
+
readonly planDigest: S.String;
|
|
146
|
+
readonly definition: S.Struct<{
|
|
147
|
+
readonly format: S.Literal<"fungi.workflow/v1">;
|
|
148
|
+
readonly title: S.String;
|
|
149
|
+
readonly description: S.optionalKey<S.String>;
|
|
150
|
+
readonly apps: S.$Record<S.String, S.Struct<{
|
|
151
|
+
readonly appId: S.String;
|
|
152
|
+
readonly role: S.optionalKey<S.String>;
|
|
153
|
+
}>>;
|
|
154
|
+
readonly subgraphs: S.optionalKey<S.$Record<S.String, S.Struct<{
|
|
155
|
+
readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
156
|
+
readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
|
|
157
|
+
readonly id: S.String;
|
|
158
|
+
readonly kind: S.Literal<"code">;
|
|
159
|
+
readonly source: S.String;
|
|
160
|
+
readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
161
|
+
readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
162
|
+
readonly values: S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>;
|
|
163
|
+
}>, S.Struct<{
|
|
164
|
+
readonly id: S.String;
|
|
165
|
+
readonly kind: S.Literal<"app">;
|
|
166
|
+
readonly app: S.String;
|
|
167
|
+
readonly method: S.String;
|
|
168
|
+
readonly methodDigest: S.String;
|
|
169
|
+
readonly values: S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>;
|
|
170
|
+
readonly gitAccess: S.optionalKey<S.declare<{
|
|
171
|
+
binding: string;
|
|
172
|
+
repository: string;
|
|
173
|
+
branches: string[];
|
|
174
|
+
} | {
|
|
175
|
+
binding: string;
|
|
176
|
+
repository: string;
|
|
177
|
+
access: "read";
|
|
178
|
+
}, {
|
|
179
|
+
binding: string;
|
|
180
|
+
repository: string;
|
|
181
|
+
branches: string[];
|
|
182
|
+
} | {
|
|
183
|
+
binding: string;
|
|
184
|
+
repository: string;
|
|
185
|
+
access: "read";
|
|
186
|
+
}>>;
|
|
187
|
+
readonly retry: S.optionalKey<S.Struct<{
|
|
188
|
+
readonly attempts: S.Number;
|
|
189
|
+
}>>;
|
|
190
|
+
}>, S.Struct<{
|
|
191
|
+
readonly id: S.String;
|
|
192
|
+
readonly kind: S.Literal<"review">;
|
|
193
|
+
readonly title: S.String;
|
|
194
|
+
readonly detail: S.optionalKey<S.String>;
|
|
195
|
+
readonly show: S.$Array<S.Struct<{
|
|
196
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
197
|
+
readonly port: S.String;
|
|
198
|
+
}>>;
|
|
199
|
+
readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
|
|
200
|
+
readonly timeout: S.Number;
|
|
201
|
+
readonly choices: S.optionalKey<S.$Array<S.Struct<{
|
|
202
|
+
readonly id: S.String;
|
|
203
|
+
readonly label: S.String;
|
|
204
|
+
readonly description: S.optionalKey<S.String>;
|
|
205
|
+
}>>>;
|
|
206
|
+
}>, S.Struct<{
|
|
207
|
+
readonly id: S.String;
|
|
208
|
+
readonly kind: S.Literal<"condition">;
|
|
209
|
+
readonly test: S.Codec<import("../schema.js").Predicate, import("../schema.js").Predicate, never, never>;
|
|
210
|
+
}>, S.Struct<{
|
|
211
|
+
readonly id: S.String;
|
|
212
|
+
readonly kind: S.Literal<"map">;
|
|
213
|
+
readonly over: S.Struct<{
|
|
214
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
215
|
+
readonly port: S.String;
|
|
216
|
+
}>;
|
|
217
|
+
readonly body: S.String;
|
|
218
|
+
readonly concurrency: S.Number;
|
|
219
|
+
readonly maxItems: S.Number;
|
|
220
|
+
}>, S.Struct<{
|
|
221
|
+
readonly id: S.String;
|
|
222
|
+
readonly kind: S.Literal<"repeat">;
|
|
223
|
+
readonly body: S.String;
|
|
224
|
+
readonly maxRounds: S.Number;
|
|
225
|
+
readonly until: S.Codec<import("../schema.js").Predicate, import("../schema.js").Predicate, never, never>;
|
|
226
|
+
}>, S.Struct<{
|
|
227
|
+
readonly id: S.String;
|
|
228
|
+
readonly kind: S.Literal<"wait">;
|
|
229
|
+
readonly for: S.Number;
|
|
230
|
+
}>, S.Struct<{
|
|
231
|
+
readonly id: S.String;
|
|
232
|
+
readonly kind: S.Literal<"transform">;
|
|
233
|
+
readonly fields: S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>;
|
|
234
|
+
}>]>>;
|
|
235
|
+
readonly edges: S.$Array<S.Struct<{
|
|
236
|
+
readonly from: S.Struct<{
|
|
237
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
238
|
+
readonly port: S.String;
|
|
239
|
+
}>;
|
|
240
|
+
readonly to: S.Struct<{
|
|
241
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
242
|
+
readonly port: S.String;
|
|
243
|
+
}>;
|
|
244
|
+
}>>;
|
|
245
|
+
readonly output: S.$Record<S.String, S.Struct<{
|
|
246
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
247
|
+
readonly port: S.String;
|
|
248
|
+
}>>;
|
|
249
|
+
}>>>;
|
|
250
|
+
readonly triggers: S.optionalKey<S.$Array<S.Union<readonly [S.Struct<{
|
|
251
|
+
readonly id: S.String;
|
|
252
|
+
readonly on: S.Literal<"webhook">;
|
|
253
|
+
readonly title: S.optionalKey<S.String>;
|
|
254
|
+
readonly when: S.optionalKey<S.Codec<import("../schema.js").Predicate, import("../schema.js").Predicate, never, never>>;
|
|
255
|
+
readonly input: S.optionalKey<S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>>;
|
|
256
|
+
}>, S.Struct<{
|
|
257
|
+
readonly id: S.String;
|
|
258
|
+
readonly on: S.Literal<"schedule">;
|
|
259
|
+
readonly title: S.optionalKey<S.String>;
|
|
260
|
+
readonly cron: S.Struct<{
|
|
261
|
+
readonly expression: S.String;
|
|
262
|
+
readonly timeZone: S.String;
|
|
263
|
+
}>;
|
|
264
|
+
readonly input: S.optionalKey<S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>>;
|
|
265
|
+
}>, S.Struct<{
|
|
266
|
+
readonly id: S.String;
|
|
267
|
+
readonly on: S.Literal<"event">;
|
|
268
|
+
readonly title: S.optionalKey<S.String>;
|
|
269
|
+
readonly app: S.String;
|
|
270
|
+
readonly event: S.String;
|
|
271
|
+
readonly eventDigest: S.String;
|
|
272
|
+
readonly when: S.optionalKey<S.Codec<import("../schema.js").Predicate, import("../schema.js").Predicate, never, never>>;
|
|
273
|
+
readonly input: S.optionalKey<S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>>;
|
|
274
|
+
readonly repository: S.optionalKey<S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>;
|
|
275
|
+
}>]>>>;
|
|
276
|
+
readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
277
|
+
readonly nodes: S.$Array<S.Union<readonly [S.Struct<{
|
|
278
|
+
readonly id: S.String;
|
|
279
|
+
readonly kind: S.Literal<"code">;
|
|
280
|
+
readonly source: S.String;
|
|
281
|
+
readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
282
|
+
readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
283
|
+
readonly values: S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>;
|
|
284
|
+
}>, S.Struct<{
|
|
285
|
+
readonly id: S.String;
|
|
286
|
+
readonly kind: S.Literal<"app">;
|
|
287
|
+
readonly app: S.String;
|
|
288
|
+
readonly method: S.String;
|
|
289
|
+
readonly methodDigest: S.String;
|
|
290
|
+
readonly values: S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>;
|
|
291
|
+
readonly gitAccess: S.optionalKey<S.declare<{
|
|
292
|
+
binding: string;
|
|
293
|
+
repository: string;
|
|
294
|
+
branches: string[];
|
|
295
|
+
} | {
|
|
296
|
+
binding: string;
|
|
297
|
+
repository: string;
|
|
298
|
+
access: "read";
|
|
299
|
+
}, {
|
|
300
|
+
binding: string;
|
|
301
|
+
repository: string;
|
|
302
|
+
branches: string[];
|
|
303
|
+
} | {
|
|
304
|
+
binding: string;
|
|
305
|
+
repository: string;
|
|
306
|
+
access: "read";
|
|
307
|
+
}>>;
|
|
308
|
+
readonly retry: S.optionalKey<S.Struct<{
|
|
309
|
+
readonly attempts: S.Number;
|
|
310
|
+
}>>;
|
|
311
|
+
}>, S.Struct<{
|
|
312
|
+
readonly id: S.String;
|
|
313
|
+
readonly kind: S.Literal<"review">;
|
|
314
|
+
readonly title: S.String;
|
|
315
|
+
readonly detail: S.optionalKey<S.String>;
|
|
316
|
+
readonly show: S.$Array<S.Struct<{
|
|
317
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
318
|
+
readonly port: S.String;
|
|
319
|
+
}>>;
|
|
320
|
+
readonly reviewers: S.Literals<readonly ["runner", "owners"]>;
|
|
321
|
+
readonly timeout: S.Number;
|
|
322
|
+
readonly choices: S.optionalKey<S.$Array<S.Struct<{
|
|
323
|
+
readonly id: S.String;
|
|
324
|
+
readonly label: S.String;
|
|
325
|
+
readonly description: S.optionalKey<S.String>;
|
|
326
|
+
}>>>;
|
|
327
|
+
}>, S.Struct<{
|
|
328
|
+
readonly id: S.String;
|
|
329
|
+
readonly kind: S.Literal<"condition">;
|
|
330
|
+
readonly test: S.Codec<import("../schema.js").Predicate, import("../schema.js").Predicate, never, never>;
|
|
331
|
+
}>, S.Struct<{
|
|
332
|
+
readonly id: S.String;
|
|
333
|
+
readonly kind: S.Literal<"map">;
|
|
334
|
+
readonly over: S.Struct<{
|
|
335
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
336
|
+
readonly port: S.String;
|
|
337
|
+
}>;
|
|
338
|
+
readonly body: S.String;
|
|
339
|
+
readonly concurrency: S.Number;
|
|
340
|
+
readonly maxItems: S.Number;
|
|
341
|
+
}>, S.Struct<{
|
|
342
|
+
readonly id: S.String;
|
|
343
|
+
readonly kind: S.Literal<"repeat">;
|
|
344
|
+
readonly body: S.String;
|
|
345
|
+
readonly maxRounds: S.Number;
|
|
346
|
+
readonly until: S.Codec<import("../schema.js").Predicate, import("../schema.js").Predicate, never, never>;
|
|
347
|
+
}>, S.Struct<{
|
|
348
|
+
readonly id: S.String;
|
|
349
|
+
readonly kind: S.Literal<"wait">;
|
|
350
|
+
readonly for: S.Number;
|
|
351
|
+
}>, S.Struct<{
|
|
352
|
+
readonly id: S.String;
|
|
353
|
+
readonly kind: S.Literal<"transform">;
|
|
354
|
+
readonly fields: S.$Record<S.String, S.Codec<import("../schema.js").Mapping, import("../schema.js").Mapping, never, never>>;
|
|
355
|
+
}>]>>;
|
|
356
|
+
readonly edges: S.$Array<S.Struct<{
|
|
357
|
+
readonly from: S.Struct<{
|
|
358
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
359
|
+
readonly port: S.String;
|
|
360
|
+
}>;
|
|
361
|
+
readonly to: S.Struct<{
|
|
362
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
363
|
+
readonly port: S.String;
|
|
364
|
+
}>;
|
|
365
|
+
}>>;
|
|
366
|
+
readonly output: S.$Record<S.String, S.Struct<{
|
|
367
|
+
readonly node: S.Union<readonly [S.String, S.Literals<readonly ["$input", "$item"]>]>;
|
|
368
|
+
readonly port: S.String;
|
|
369
|
+
}>>;
|
|
370
|
+
}>;
|
|
371
|
+
readonly catalog: S.$Record<S.String, S.Struct<{
|
|
372
|
+
readonly methods: S.$Record<S.String, S.Struct<{
|
|
373
|
+
readonly digest: S.String;
|
|
374
|
+
readonly pending: S.optionalKey<S.Literal<true>>;
|
|
375
|
+
readonly description: S.String;
|
|
376
|
+
readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
377
|
+
readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
378
|
+
readonly effect: S.Literals<readonly ["read", "write", "external"]>;
|
|
379
|
+
readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
|
|
380
|
+
readonly requires: S.$Array<S.String>;
|
|
381
|
+
}>>;
|
|
382
|
+
readonly events: S.optionalKey<S.$Record<S.String, S.Struct<{
|
|
383
|
+
readonly digest: S.String;
|
|
384
|
+
readonly description: S.String;
|
|
385
|
+
readonly payload: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
386
|
+
}>>>;
|
|
387
|
+
}>>;
|
|
388
|
+
readonly bindings: S.$Record<S.String, S.declare<{
|
|
389
|
+
kind: "team-source";
|
|
390
|
+
} | {
|
|
391
|
+
appId: string;
|
|
392
|
+
installationId: string;
|
|
393
|
+
}, {
|
|
394
|
+
kind: "team-source";
|
|
395
|
+
} | {
|
|
396
|
+
appId: string;
|
|
397
|
+
installationId: string;
|
|
398
|
+
}>>;
|
|
399
|
+
readonly estimatedSteps: S.Number;
|
|
400
|
+
readonly requiredBindings: S.$Array<S.Struct<{
|
|
401
|
+
readonly pending: S.optionalKey<S.Literal<true>>;
|
|
402
|
+
readonly description: S.String;
|
|
403
|
+
readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
404
|
+
readonly output: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
405
|
+
readonly effect: S.Literals<readonly ["read", "write", "external"]>;
|
|
406
|
+
readonly approval: S.Literals<readonly ["none", "queue", "simulate"]>;
|
|
407
|
+
readonly requires: S.$Array<S.String>;
|
|
408
|
+
readonly app: S.String;
|
|
409
|
+
readonly installationId: S.String;
|
|
410
|
+
readonly method: S.String;
|
|
411
|
+
}>>;
|
|
412
|
+
}>;
|
|
413
|
+
readonly input: S.$Record<S.String, S.Codec<S.Json, S.Json, never, never>>;
|
|
414
|
+
readonly ceiling: S.Struct<{
|
|
415
|
+
readonly nodes: S.$Array<S.Struct<{
|
|
416
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
417
|
+
readonly nodeId: S.String;
|
|
418
|
+
readonly level: S.Literals<readonly ["read", "write"]>;
|
|
419
|
+
readonly capabilities: S.$Array<S.Literals<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"]>>;
|
|
420
|
+
readonly bindings: S.$Array<S.Union<S.Struct<{
|
|
421
|
+
readonly name: S.Literal<"BACKGROUND" | "GIT" | "EVENTS" | "APPS" | "WORKFLOWS" | "APP_STORAGE" | "MEDIA" | "COMPUTER" | "INBOX" | "AGENTS">;
|
|
422
|
+
readonly operations: S.$Array<S.Literals<string[]>>;
|
|
423
|
+
}>[]>>;
|
|
424
|
+
}>>;
|
|
425
|
+
readonly nodeGitAccess: S.$Array<S.Struct<{
|
|
426
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
427
|
+
readonly nodeId: S.String;
|
|
428
|
+
readonly gitAccess: S.declare<{
|
|
429
|
+
repository: {
|
|
430
|
+
kind: "installation";
|
|
431
|
+
installationId: string;
|
|
432
|
+
repository: string;
|
|
433
|
+
} | {
|
|
434
|
+
kind: "team-source";
|
|
435
|
+
repository: string;
|
|
436
|
+
};
|
|
437
|
+
branches: string[];
|
|
438
|
+
} | {
|
|
439
|
+
repository: {
|
|
440
|
+
kind: "installation";
|
|
441
|
+
installationId: string;
|
|
442
|
+
repository: string;
|
|
443
|
+
} | {
|
|
444
|
+
kind: "team-source";
|
|
445
|
+
repository: string;
|
|
446
|
+
};
|
|
447
|
+
access: "read";
|
|
448
|
+
}, {
|
|
449
|
+
repository: {
|
|
450
|
+
kind: "installation";
|
|
451
|
+
installationId: string;
|
|
452
|
+
repository: string;
|
|
453
|
+
} | {
|
|
454
|
+
kind: "team-source";
|
|
455
|
+
repository: string;
|
|
456
|
+
};
|
|
457
|
+
branches: string[];
|
|
458
|
+
} | {
|
|
459
|
+
repository: {
|
|
460
|
+
kind: "installation";
|
|
461
|
+
installationId: string;
|
|
462
|
+
repository: string;
|
|
463
|
+
} | {
|
|
464
|
+
kind: "team-source";
|
|
465
|
+
repository: string;
|
|
466
|
+
};
|
|
467
|
+
access: "read";
|
|
468
|
+
}>;
|
|
469
|
+
}>>;
|
|
470
|
+
}>;
|
|
471
|
+
readonly trigger: S.optionalKey<S.Struct<{
|
|
472
|
+
readonly libraryInstallationId: S.String;
|
|
473
|
+
readonly workflowId: S.declare<string, unknown>;
|
|
474
|
+
readonly commit: S.declare<string, unknown>;
|
|
475
|
+
readonly triggerId: S.String;
|
|
476
|
+
readonly armedBy: S.String;
|
|
477
|
+
readonly nodeGitAccess: S.optionalKey<S.$Array<S.Struct<{
|
|
478
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
479
|
+
readonly nodeId: S.String;
|
|
480
|
+
readonly gitAccess: S.declare<{
|
|
481
|
+
repository: {
|
|
482
|
+
kind: "installation";
|
|
483
|
+
installationId: string;
|
|
484
|
+
repository: string;
|
|
485
|
+
} | {
|
|
486
|
+
kind: "team-source";
|
|
487
|
+
repository: string;
|
|
488
|
+
};
|
|
489
|
+
branches: string[];
|
|
490
|
+
} | {
|
|
491
|
+
repository: {
|
|
492
|
+
kind: "installation";
|
|
493
|
+
installationId: string;
|
|
494
|
+
repository: string;
|
|
495
|
+
} | {
|
|
496
|
+
kind: "team-source";
|
|
497
|
+
repository: string;
|
|
498
|
+
};
|
|
499
|
+
access: "read";
|
|
500
|
+
}, {
|
|
501
|
+
repository: {
|
|
502
|
+
kind: "installation";
|
|
503
|
+
installationId: string;
|
|
504
|
+
repository: string;
|
|
505
|
+
} | {
|
|
506
|
+
kind: "team-source";
|
|
507
|
+
repository: string;
|
|
508
|
+
};
|
|
509
|
+
branches: string[];
|
|
510
|
+
} | {
|
|
511
|
+
repository: {
|
|
512
|
+
kind: "installation";
|
|
513
|
+
installationId: string;
|
|
514
|
+
repository: string;
|
|
515
|
+
} | {
|
|
516
|
+
kind: "team-source";
|
|
517
|
+
repository: string;
|
|
518
|
+
};
|
|
519
|
+
access: "read";
|
|
520
|
+
}>;
|
|
521
|
+
}>>>;
|
|
522
|
+
/** The firing event's repository, resolving `$trigger.repository`. */
|
|
523
|
+
readonly repository: S.optionalKey<S.declare<string, string>>;
|
|
524
|
+
}>>;
|
|
525
|
+
readonly publication: S.optionalKey<S.Struct<{
|
|
526
|
+
readonly installationId: S.String;
|
|
527
|
+
readonly workflowId: S.declare<string, unknown>;
|
|
528
|
+
readonly commit: S.declare<string, unknown>;
|
|
529
|
+
readonly digest: S.declare<string, unknown>;
|
|
530
|
+
readonly armedBy: S.declare<{
|
|
531
|
+
kind: "member";
|
|
532
|
+
memberId: string;
|
|
533
|
+
} | {
|
|
534
|
+
kind: "agent";
|
|
535
|
+
agentId: string;
|
|
536
|
+
} | {
|
|
537
|
+
kind: "team-key";
|
|
538
|
+
keyId: string;
|
|
539
|
+
}, unknown>;
|
|
540
|
+
}>>;
|
|
541
|
+
readonly delivery: S.optionalKey<S.Struct<{
|
|
542
|
+
readonly agentId: S.String;
|
|
543
|
+
readonly sessionId: S.String;
|
|
544
|
+
}>>;
|
|
545
|
+
/** Recorded once, from the admitted preparation; never recomputed later. */
|
|
546
|
+
readonly source: S.Literals<readonly ["manual", "schedule", "event", "agent", "key"]>;
|
|
547
|
+
readonly initiatedBy: S.Union<readonly [S.Struct<{
|
|
548
|
+
readonly kind: S.Literal<"member">;
|
|
549
|
+
readonly memberId: S.String;
|
|
550
|
+
}>, S.Struct<{
|
|
551
|
+
readonly kind: S.Literal<"agent">;
|
|
552
|
+
readonly agentId: S.String;
|
|
553
|
+
readonly sessionId: S.String;
|
|
554
|
+
readonly grantorMemberId: S.String;
|
|
555
|
+
}>, S.Struct<{
|
|
556
|
+
readonly kind: S.Literal<"key">;
|
|
557
|
+
readonly keyId: S.String;
|
|
558
|
+
readonly grantorMemberId: S.String;
|
|
559
|
+
}>]>;
|
|
560
|
+
}>;
|
|
561
|
+
export type GraphRun = typeof graphRunSchema.Type;
|
|
562
|
+
/** Host-owned identity of one App node execution within a graph run. */
|
|
563
|
+
export declare const graphNodeContextSchema: S.Struct<{
|
|
564
|
+
readonly runId: S.String;
|
|
565
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
566
|
+
readonly nodeId: S.String;
|
|
567
|
+
readonly iteration: S.String;
|
|
568
|
+
/** Pending-call poll identity, separate from retries of the same poll. */
|
|
569
|
+
readonly poll: S.optionalKey<S.Number>;
|
|
570
|
+
/** Opaque engine retry identity, never parsed as authority. */
|
|
571
|
+
readonly idempotencyKey: S.String;
|
|
572
|
+
readonly trigger: S.optionalKey<S.Struct<{
|
|
573
|
+
readonly libraryInstallationId: S.String;
|
|
574
|
+
readonly workflowId: S.declare<string, unknown>;
|
|
575
|
+
readonly commit: S.declare<string, unknown>;
|
|
576
|
+
readonly triggerId: S.String;
|
|
577
|
+
readonly armedBy: S.String;
|
|
578
|
+
readonly nodeGitAccess: S.optionalKey<S.$Array<S.Struct<{
|
|
579
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
580
|
+
readonly nodeId: S.String;
|
|
581
|
+
readonly gitAccess: S.declare<{
|
|
582
|
+
repository: {
|
|
583
|
+
kind: "installation";
|
|
584
|
+
installationId: string;
|
|
585
|
+
repository: string;
|
|
586
|
+
} | {
|
|
587
|
+
kind: "team-source";
|
|
588
|
+
repository: string;
|
|
589
|
+
};
|
|
590
|
+
branches: string[];
|
|
591
|
+
} | {
|
|
592
|
+
repository: {
|
|
593
|
+
kind: "installation";
|
|
594
|
+
installationId: string;
|
|
595
|
+
repository: string;
|
|
596
|
+
} | {
|
|
597
|
+
kind: "team-source";
|
|
598
|
+
repository: string;
|
|
599
|
+
};
|
|
600
|
+
access: "read";
|
|
601
|
+
}, {
|
|
602
|
+
repository: {
|
|
603
|
+
kind: "installation";
|
|
604
|
+
installationId: string;
|
|
605
|
+
repository: string;
|
|
606
|
+
} | {
|
|
607
|
+
kind: "team-source";
|
|
608
|
+
repository: string;
|
|
609
|
+
};
|
|
610
|
+
branches: string[];
|
|
611
|
+
} | {
|
|
612
|
+
repository: {
|
|
613
|
+
kind: "installation";
|
|
614
|
+
installationId: string;
|
|
615
|
+
repository: string;
|
|
616
|
+
} | {
|
|
617
|
+
kind: "team-source";
|
|
618
|
+
repository: string;
|
|
619
|
+
};
|
|
620
|
+
access: "read";
|
|
621
|
+
}>;
|
|
622
|
+
}>>>;
|
|
623
|
+
/** The firing event's repository, resolving `$trigger.repository`. */
|
|
624
|
+
readonly repository: S.optionalKey<S.declare<string, string>>;
|
|
625
|
+
}>>;
|
|
626
|
+
readonly gitAccess: S.optionalKey<S.declare<{
|
|
627
|
+
repository: {
|
|
628
|
+
kind: "installation";
|
|
629
|
+
installationId: string;
|
|
630
|
+
repository: string;
|
|
631
|
+
} | {
|
|
632
|
+
kind: "team-source";
|
|
633
|
+
repository: string;
|
|
634
|
+
};
|
|
635
|
+
branches: string[];
|
|
636
|
+
} | {
|
|
637
|
+
repository: {
|
|
638
|
+
kind: "installation";
|
|
639
|
+
installationId: string;
|
|
640
|
+
repository: string;
|
|
641
|
+
} | {
|
|
642
|
+
kind: "team-source";
|
|
643
|
+
repository: string;
|
|
644
|
+
};
|
|
645
|
+
access: "read";
|
|
646
|
+
}, {
|
|
647
|
+
repository: {
|
|
648
|
+
kind: "installation";
|
|
649
|
+
installationId: string;
|
|
650
|
+
repository: string;
|
|
651
|
+
} | {
|
|
652
|
+
kind: "team-source";
|
|
653
|
+
repository: string;
|
|
654
|
+
};
|
|
655
|
+
branches: string[];
|
|
656
|
+
} | {
|
|
657
|
+
repository: {
|
|
658
|
+
kind: "installation";
|
|
659
|
+
installationId: string;
|
|
660
|
+
repository: string;
|
|
661
|
+
} | {
|
|
662
|
+
kind: "team-source";
|
|
663
|
+
repository: string;
|
|
664
|
+
};
|
|
665
|
+
access: "read";
|
|
666
|
+
}>>;
|
|
667
|
+
}>;
|
|
668
|
+
/** Execution coordinates alone do not attest a published Workflow. */
|
|
669
|
+
export type GraphNodeContext = typeof graphNodeContextSchema.Type;
|
|
670
|
+
/** Publication attribution from an admitted publisher App or trigger owner. */
|
|
671
|
+
export declare const workflowRunContextSchema: S.Struct<{
|
|
672
|
+
readonly workflowId: S.declare<string, unknown>;
|
|
673
|
+
readonly armedBy: S.declare<{
|
|
674
|
+
kind: "member";
|
|
675
|
+
memberId: string;
|
|
676
|
+
} | {
|
|
677
|
+
kind: "agent";
|
|
678
|
+
agentId: string;
|
|
679
|
+
} | {
|
|
680
|
+
kind: "team-key";
|
|
681
|
+
keyId: string;
|
|
682
|
+
}, unknown>;
|
|
683
|
+
readonly runId: S.String;
|
|
684
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
685
|
+
readonly nodeId: S.String;
|
|
686
|
+
readonly iteration: S.String;
|
|
687
|
+
/** Pending-call poll identity, separate from retries of the same poll. */
|
|
688
|
+
readonly poll: S.optionalKey<S.Number>;
|
|
689
|
+
/** Opaque engine retry identity, never parsed as authority. */
|
|
690
|
+
readonly idempotencyKey: S.String;
|
|
691
|
+
readonly trigger: S.optionalKey<S.Struct<{
|
|
692
|
+
readonly libraryInstallationId: S.String;
|
|
693
|
+
readonly workflowId: S.declare<string, unknown>;
|
|
694
|
+
readonly commit: S.declare<string, unknown>;
|
|
695
|
+
readonly triggerId: S.String;
|
|
696
|
+
readonly armedBy: S.String;
|
|
697
|
+
readonly nodeGitAccess: S.optionalKey<S.$Array<S.Struct<{
|
|
698
|
+
readonly graphId: S.optionalKey<S.String>;
|
|
699
|
+
readonly nodeId: S.String;
|
|
700
|
+
readonly gitAccess: S.declare<{
|
|
701
|
+
repository: {
|
|
702
|
+
kind: "installation";
|
|
703
|
+
installationId: string;
|
|
704
|
+
repository: string;
|
|
705
|
+
} | {
|
|
706
|
+
kind: "team-source";
|
|
707
|
+
repository: string;
|
|
708
|
+
};
|
|
709
|
+
branches: string[];
|
|
710
|
+
} | {
|
|
711
|
+
repository: {
|
|
712
|
+
kind: "installation";
|
|
713
|
+
installationId: string;
|
|
714
|
+
repository: string;
|
|
715
|
+
} | {
|
|
716
|
+
kind: "team-source";
|
|
717
|
+
repository: string;
|
|
718
|
+
};
|
|
719
|
+
access: "read";
|
|
720
|
+
}, {
|
|
721
|
+
repository: {
|
|
722
|
+
kind: "installation";
|
|
723
|
+
installationId: string;
|
|
724
|
+
repository: string;
|
|
725
|
+
} | {
|
|
726
|
+
kind: "team-source";
|
|
727
|
+
repository: string;
|
|
728
|
+
};
|
|
729
|
+
branches: string[];
|
|
730
|
+
} | {
|
|
731
|
+
repository: {
|
|
732
|
+
kind: "installation";
|
|
733
|
+
installationId: string;
|
|
734
|
+
repository: string;
|
|
735
|
+
} | {
|
|
736
|
+
kind: "team-source";
|
|
737
|
+
repository: string;
|
|
738
|
+
};
|
|
739
|
+
access: "read";
|
|
740
|
+
}>;
|
|
741
|
+
}>>>;
|
|
742
|
+
/** The firing event's repository, resolving `$trigger.repository`. */
|
|
743
|
+
readonly repository: S.optionalKey<S.declare<string, string>>;
|
|
744
|
+
}>>;
|
|
745
|
+
readonly gitAccess: S.optionalKey<S.declare<{
|
|
746
|
+
repository: {
|
|
747
|
+
kind: "installation";
|
|
748
|
+
installationId: string;
|
|
749
|
+
repository: string;
|
|
750
|
+
} | {
|
|
751
|
+
kind: "team-source";
|
|
752
|
+
repository: string;
|
|
753
|
+
};
|
|
754
|
+
branches: string[];
|
|
755
|
+
} | {
|
|
756
|
+
repository: {
|
|
757
|
+
kind: "installation";
|
|
758
|
+
installationId: string;
|
|
759
|
+
repository: string;
|
|
760
|
+
} | {
|
|
761
|
+
kind: "team-source";
|
|
762
|
+
repository: string;
|
|
763
|
+
};
|
|
764
|
+
access: "read";
|
|
765
|
+
}, {
|
|
766
|
+
repository: {
|
|
767
|
+
kind: "installation";
|
|
768
|
+
installationId: string;
|
|
769
|
+
repository: string;
|
|
770
|
+
} | {
|
|
771
|
+
kind: "team-source";
|
|
772
|
+
repository: string;
|
|
773
|
+
};
|
|
774
|
+
branches: string[];
|
|
775
|
+
} | {
|
|
776
|
+
repository: {
|
|
777
|
+
kind: "installation";
|
|
778
|
+
installationId: string;
|
|
779
|
+
repository: string;
|
|
780
|
+
} | {
|
|
781
|
+
kind: "team-source";
|
|
782
|
+
repository: string;
|
|
783
|
+
};
|
|
784
|
+
access: "read";
|
|
785
|
+
}>>;
|
|
786
|
+
}>;
|
|
787
|
+
export type WorkflowRunContext = typeof workflowRunContextSchema.Type;
|
|
788
|
+
export {};
|