@swirls/deploy 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4697 @@
1
+ import * as json_schema from 'json-schema';
2
+ import { JSONSchema7 } from 'json-schema';
3
+ import { z } from 'zod';
4
+ import fs from 'node:fs';
5
+
6
+ /**
7
+ * Where a channel can be bound. Part of the definition, so the language reads
8
+ * its platform list from here instead of keeping a copy.
9
+ */
10
+ declare const channelPlatformSchema: z.ZodEnum<{
11
+ web: "web";
12
+ mcp: "mcp";
13
+ slack: "slack";
14
+ linear: "linear";
15
+ discord: "discord";
16
+ swirls: "swirls";
17
+ }>;
18
+ type ChannelPlatform = z.infer<typeof channelPlatformSchema>;
19
+ /**
20
+ * A script that runs on an enrolled device (`operation name { … }`).
21
+ *
22
+ * `script` is the exact text a reviewer saw in source, and `scriptSha256` is
23
+ * the hash of its UTF-8 bytes. The API recomputes the hash on ingest, and the
24
+ * same hash is what each signed dispatch commits to, so the bytes a device
25
+ * runs are the bytes that were deployed.
26
+ */
27
+ declare const deploymentDefinitionOperationBlockSchema: z.ZodObject<{
28
+ id: z.ZodUUID;
29
+ name: z.ZodString;
30
+ label: z.ZodString;
31
+ description: z.ZodOptional<z.ZodString>;
32
+ interpreter: z.ZodEnum<{
33
+ powershell: "powershell";
34
+ sh: "sh";
35
+ }>;
36
+ platform: z.ZodOptional<z.ZodEnum<{
37
+ windows: "windows";
38
+ linux: "linux";
39
+ macos: "macos";
40
+ }>>;
41
+ runAs: z.ZodEnum<{
42
+ system: "system";
43
+ signed_in_user: "signed_in_user";
44
+ }>;
45
+ script: z.ZodString;
46
+ scriptSha256: z.ZodString;
47
+ inputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
48
+ outputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
49
+ timeoutSeconds: z.ZodNumber;
50
+ }, z.core.$strip>;
51
+ declare const deploymentDefinitionSchema: z.ZodObject<{
52
+ version: z.ZodOptional<z.ZodNumber>;
53
+ forms: z.ZodOptional<z.ZodArray<z.ZodObject<{
54
+ id: z.ZodUUID;
55
+ name: z.ZodString;
56
+ label: z.ZodString;
57
+ description: z.ZodOptional<z.ZodString>;
58
+ schema: z.ZodNullable<z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>>;
59
+ enabled: z.ZodOptional<z.ZodBoolean>;
60
+ visibility: z.ZodDefault<z.ZodEnum<{
61
+ public: "public";
62
+ internal: "internal";
63
+ }>>;
64
+ authName: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>>>;
66
+ webhooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
+ id: z.ZodUUID;
68
+ name: z.ZodString;
69
+ label: z.ZodString;
70
+ description: z.ZodOptional<z.ZodString>;
71
+ schema: z.ZodNullable<z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>>;
72
+ enabled: z.ZodOptional<z.ZodBoolean>;
73
+ secretRefBlock: z.ZodOptional<z.ZodString>;
74
+ secretRefVar: z.ZodOptional<z.ZodString>;
75
+ headerName: z.ZodOptional<z.ZodString>;
76
+ }, z.core.$strip>>>;
77
+ schedules: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
+ id: z.ZodUUID;
79
+ name: z.ZodString;
80
+ label: z.ZodString;
81
+ description: z.ZodOptional<z.ZodString>;
82
+ cron: z.ZodString;
83
+ timezone: z.ZodOptional<z.ZodString>;
84
+ enabled: z.ZodOptional<z.ZodBoolean>;
85
+ }, z.core.$strip>>>;
86
+ workflows: z.ZodOptional<z.ZodArray<z.ZodObject<{
87
+ id: z.ZodUUID;
88
+ name: z.ZodString;
89
+ label: z.ZodString;
90
+ description: z.ZodOptional<z.ZodString>;
91
+ concurrency: z.ZodOptional<z.ZodNumber>;
92
+ executionTokenTtlSeconds: z.ZodOptional<z.ZodNumber>;
93
+ nodes: z.ZodArray<z.ZodObject<{
94
+ id: z.ZodUUID;
95
+ name: z.ZodString;
96
+ type: z.ZodString;
97
+ label: z.ZodString;
98
+ description: z.ZodOptional<z.ZodString>;
99
+ isRoot: z.ZodOptional<z.ZodBoolean>;
100
+ config: z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
101
+ type: z.ZodLiteral<"ai">;
102
+ kind: z.ZodEnum<{
103
+ object: "object";
104
+ text: "text";
105
+ image: "image";
106
+ video: "video";
107
+ embed: "embed";
108
+ }>;
109
+ provider: z.ZodOptional<z.ZodEnum<{
110
+ openrouter: "openrouter";
111
+ anthropic: "anthropic";
112
+ openai: "openai";
113
+ google: "google";
114
+ }>>;
115
+ model: z.ZodOptional<z.ZodString>;
116
+ prompt: z.ZodOptional<z.ZodString>;
117
+ temperature: z.ZodOptional<z.ZodNumber>;
118
+ maxTokens: z.ZodOptional<z.ZodNumber>;
119
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ type: z.ZodLiteral<"decision">;
122
+ failurePolicy: z.ZodOptional<z.ZodUnknown>;
123
+ decision: z.ZodString;
124
+ state: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
125
+ model: z.ZodOptional<z.ZodString>;
126
+ definition: z.ZodOptional<z.ZodObject<{
127
+ name: z.ZodString;
128
+ label: z.ZodOptional<z.ZodString>;
129
+ description: z.ZodOptional<z.ZodString>;
130
+ provider: z.ZodLiteral<"typesafe">;
131
+ model: z.ZodString;
132
+ secrets: z.ZodString;
133
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
134
+ questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
135
+ type: z.ZodLiteral<"choice">;
136
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
137
+ criteria: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
138
+ }, z.core.$strict>, z.ZodObject<{
139
+ type: z.ZodLiteral<"score">;
140
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
141
+ criteria: z.ZodArray<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
142
+ }, z.core.$strict>, z.ZodObject<{
143
+ type: z.ZodLiteral<"noul">;
144
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
145
+ criteria: z.ZodOptional<z.ZodObject<{
146
+ true: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
147
+ false: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
148
+ }, z.core.$strict>>;
149
+ }, z.core.$strict>], "type">>;
150
+ }, z.core.$strict>>;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ type: z.ZodLiteral<"code">;
153
+ code: z.ZodOptional<z.ZodString>;
154
+ }, z.core.$strip>, z.ZodObject<{
155
+ type: z.ZodLiteral<"email">;
156
+ from: z.ZodOptional<z.ZodString>;
157
+ to: z.ZodOptional<z.ZodString>;
158
+ subject: z.ZodOptional<z.ZodString>;
159
+ text: z.ZodOptional<z.ZodString>;
160
+ html: z.ZodOptional<z.ZodString>;
161
+ replyTo: z.ZodOptional<z.ZodString>;
162
+ }, z.core.$strip>, z.ZodObject<{
163
+ type: z.ZodUnion<readonly [z.ZodLiteral<"workflow">, z.ZodLiteral<"graph">]>;
164
+ workflowId: z.ZodOptional<z.ZodUUID>;
165
+ workflow: z.ZodOptional<z.ZodString>;
166
+ graphId: z.ZodOptional<z.ZodUUID>;
167
+ graph: z.ZodOptional<z.ZodString>;
168
+ input: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strip>, z.ZodObject<{
170
+ type: z.ZodLiteral<"map">;
171
+ items: z.ZodOptional<z.ZodString>;
172
+ maxItems: z.ZodOptional<z.ZodNumber>;
173
+ concurrency: z.ZodOptional<z.ZodNumber>;
174
+ workflowId: z.ZodOptional<z.ZodUUID>;
175
+ workflow: z.ZodOptional<z.ZodString>;
176
+ graphId: z.ZodOptional<z.ZodUUID>;
177
+ graph: z.ZodOptional<z.ZodString>;
178
+ }, z.core.$strip>, z.ZodObject<{
179
+ type: z.ZodLiteral<"fanout">;
180
+ items: z.ZodOptional<z.ZodString>;
181
+ maxItems: z.ZodOptional<z.ZodNumber>;
182
+ concurrency: z.ZodOptional<z.ZodNumber>;
183
+ workflowId: z.ZodOptional<z.ZodUUID>;
184
+ workflow: z.ZodOptional<z.ZodString>;
185
+ graphId: z.ZodOptional<z.ZodUUID>;
186
+ graph: z.ZodOptional<z.ZodString>;
187
+ }, z.core.$strip>, z.ZodObject<{
188
+ type: z.ZodLiteral<"while">;
189
+ input: z.ZodOptional<z.ZodString>;
190
+ condition: z.ZodOptional<z.ZodString>;
191
+ update: z.ZodOptional<z.ZodString>;
192
+ maxIterations: z.ZodOptional<z.ZodNumber>;
193
+ workflowId: z.ZodOptional<z.ZodUUID>;
194
+ workflow: z.ZodOptional<z.ZodString>;
195
+ graphId: z.ZodOptional<z.ZodUUID>;
196
+ graph: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ type: z.ZodLiteral<"http">;
199
+ url: z.ZodOptional<z.ZodString>;
200
+ method: z.ZodOptional<z.ZodEnum<{
201
+ GET: "GET";
202
+ POST: "POST";
203
+ PUT: "PUT";
204
+ DELETE: "DELETE";
205
+ PATCH: "PATCH";
206
+ }>>;
207
+ headers: z.ZodOptional<z.ZodString>;
208
+ body: z.ZodOptional<z.ZodString>;
209
+ network: z.ZodOptional<z.ZodString>;
210
+ }, z.core.$strip>, z.ZodObject<{
211
+ type: z.ZodLiteral<"integration">;
212
+ connection: z.ZodOptional<z.ZodString>;
213
+ action: z.ZodOptional<z.ZodString>;
214
+ method: z.ZodOptional<z.ZodEnum<{
215
+ GET: "GET";
216
+ POST: "POST";
217
+ PUT: "PUT";
218
+ DELETE: "DELETE";
219
+ PATCH: "PATCH";
220
+ }>>;
221
+ path: z.ZodOptional<z.ZodString>;
222
+ params: z.ZodOptional<z.ZodString>;
223
+ encoding: z.ZodOptional<z.ZodEnum<{
224
+ json: "json";
225
+ form: "form";
226
+ query: "query";
227
+ raw: "raw";
228
+ }>>;
229
+ actionInputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
230
+ actionOutputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
231
+ actionGraphqlDocument: z.ZodOptional<z.ZodString>;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ type: z.ZodLiteral<"postgres">;
234
+ postgres: z.ZodOptional<z.ZodString>;
235
+ select: z.ZodOptional<z.ZodString>;
236
+ insert: z.ZodOptional<z.ZodString>;
237
+ update: z.ZodOptional<z.ZodString>;
238
+ delete: z.ZodOptional<z.ZodString>;
239
+ params: z.ZodOptional<z.ZodString>;
240
+ condition: z.ZodOptional<z.ZodString>;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ type: z.ZodLiteral<"database">;
243
+ database: z.ZodString;
244
+ operation: z.ZodEnum<{
245
+ query: "query";
246
+ insert: "insert";
247
+ update: "update";
248
+ delete: "delete";
249
+ transaction: "transaction";
250
+ }>;
251
+ condition: z.ZodOptional<z.ZodString>;
252
+ run: z.ZodString;
253
+ }, z.core.$strip>, z.ZodObject<{
254
+ type: z.ZodLiteral<"disk">;
255
+ operation: z.ZodOptional<z.ZodEnum<{
256
+ exec: "exec";
257
+ copy_file: "copy_file";
258
+ }>>;
259
+ disk: z.ZodString;
260
+ command: z.ZodOptional<z.ZodString>;
261
+ path: z.ZodOptional<z.ZodString>;
262
+ file: z.ZodOptional<z.ZodString>;
263
+ overwrite: z.ZodOptional<z.ZodLiteral<"replace">>;
264
+ }, z.core.$strip>, z.ZodObject<{
265
+ type: z.ZodLiteral<"shell">;
266
+ computer: z.ZodString;
267
+ command: z.ZodString;
268
+ }, z.core.$strip>, z.ZodObject<{
269
+ type: z.ZodLiteral<"device">;
270
+ operation: z.ZodString;
271
+ device: z.ZodOptional<z.ZodString>;
272
+ devices: z.ZodOptional<z.ZodObject<{
273
+ tags: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
274
+ os: z.ZodOptional<z.ZodEnum<{
275
+ windows: "windows";
276
+ linux: "linux";
277
+ macos: "macos";
278
+ }>>;
279
+ }, z.core.$strict>>;
280
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
281
+ waitSeconds: z.ZodOptional<z.ZodNumber>;
282
+ }, z.core.$strip>, z.ZodObject<{
283
+ type: z.ZodLiteral<"agent">;
284
+ agent: z.ZodString;
285
+ model: z.ZodOptional<z.ZodString>;
286
+ prompt: z.ZodOptional<z.ZodString>;
287
+ profile: z.ZodOptional<z.ZodString>;
288
+ role: z.ZodOptional<z.ZodString>;
289
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
290
+ system: z.ZodOptional<z.ZodString>;
291
+ }, z.core.$strip>, z.ZodObject<{
292
+ type: z.ZodLiteral<"scrape">;
293
+ url: z.ZodOptional<z.ZodString>;
294
+ onlyMainContent: z.ZodOptional<z.ZodBoolean>;
295
+ formats: z.ZodOptional<z.ZodArray<z.ZodString>>;
296
+ maxAge: z.ZodOptional<z.ZodNumber>;
297
+ parsers: z.ZodOptional<z.ZodArray<z.ZodString>>;
298
+ }, z.core.$strip>, z.ZodObject<{
299
+ type: z.ZodLiteral<"search">;
300
+ provider: z.ZodOptional<z.ZodEnum<{
301
+ firecrawl: "firecrawl";
302
+ telem: "telem";
303
+ }>>;
304
+ query: z.ZodOptional<z.ZodString>;
305
+ limit: z.ZodOptional<z.ZodNumber>;
306
+ sources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
307
+ web: "web";
308
+ news: "news";
309
+ images: "images";
310
+ }>>>;
311
+ categories: z.ZodOptional<z.ZodArray<z.ZodEnum<{
312
+ github: "github";
313
+ research: "research";
314
+ pdf: "pdf";
315
+ }>>>;
316
+ location: z.ZodOptional<z.ZodString>;
317
+ country: z.ZodOptional<z.ZodString>;
318
+ tbs: z.ZodOptional<z.ZodString>;
319
+ includeDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
320
+ excludeDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
321
+ scrapeFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
322
+ }, z.core.$strip>, z.ZodObject<{
323
+ type: z.ZodLiteral<"parallel">;
324
+ operation: z.ZodEnum<{
325
+ search: "search";
326
+ extract: "extract";
327
+ findall: "findall";
328
+ }>;
329
+ objective: z.ZodOptional<z.ZodString>;
330
+ urls: z.ZodOptional<z.ZodString>;
331
+ searchQueries: z.ZodOptional<z.ZodString>;
332
+ mode: z.ZodOptional<z.ZodEnum<{
333
+ "one-shot": "one-shot";
334
+ agentic: "agentic";
335
+ fast: "fast";
336
+ }>>;
337
+ excerptsMaxCharsPerResult: z.ZodOptional<z.ZodNumber>;
338
+ excerptsMaxCharsTotal: z.ZodOptional<z.ZodNumber>;
339
+ excerpts: z.ZodOptional<z.ZodBoolean>;
340
+ fullContent: z.ZodOptional<z.ZodBoolean>;
341
+ entityType: z.ZodOptional<z.ZodString>;
342
+ generator: z.ZodOptional<z.ZodEnum<{
343
+ base: "base";
344
+ core: "core";
345
+ pro: "pro";
346
+ preview: "preview";
347
+ }>>;
348
+ matchConditions: z.ZodOptional<z.ZodString>;
349
+ matchLimit: z.ZodOptional<z.ZodNumber>;
350
+ excludeList: z.ZodOptional<z.ZodString>;
351
+ pollInterval: z.ZodOptional<z.ZodNumber>;
352
+ pollIntervalUnit: z.ZodOptional<z.ZodEnum<{
353
+ seconds: "seconds";
354
+ minutes: "minutes";
355
+ }>>;
356
+ pollTimeout: z.ZodOptional<z.ZodNumber>;
357
+ pollTimeoutUnit: z.ZodOptional<z.ZodEnum<{
358
+ seconds: "seconds";
359
+ minutes: "minutes";
360
+ }>>;
361
+ }, z.core.$strip>, z.ZodObject<{
362
+ type: z.ZodLiteral<"stream">;
363
+ stream: z.ZodString;
364
+ version: z.ZodString;
365
+ filter: z.ZodString;
366
+ }, z.core.$strip>, z.ZodObject<{
367
+ type: z.ZodLiteral<"switch">;
368
+ cases: z.ZodArray<z.ZodString>;
369
+ router: z.ZodOptional<z.ZodString>;
370
+ }, z.core.$strip>, z.ZodObject<{
371
+ type: z.ZodLiteral<"wait">;
372
+ amount: z.ZodOptional<z.ZodNumber>;
373
+ unit: z.ZodOptional<z.ZodEnum<{
374
+ seconds: "seconds";
375
+ minutes: "minutes";
376
+ hours: "hours";
377
+ days: "days";
378
+ }>>;
379
+ secondsFromConfig: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strip>], "type">, z.ZodObject<{
381
+ failurePolicy: z.ZodOptional<z.ZodObject<{
382
+ strategy: z.ZodEnum<{
383
+ fail: "fail";
384
+ retry: "retry";
385
+ skip: "skip";
386
+ fallback: "fallback";
387
+ }>;
388
+ maxRetries: z.ZodOptional<z.ZodNumber>;
389
+ backoffMs: z.ZodOptional<z.ZodNumber>;
390
+ fallbackValue: z.ZodOptional<z.ZodUnknown>;
391
+ }, z.core.$strip>>;
392
+ }, z.core.$strip>>;
393
+ reviewConfig: z.ZodOptional<z.ZodNullable<z.ZodObject<{
394
+ enabled: z.ZodBoolean;
395
+ title: z.ZodOptional<z.ZodString>;
396
+ description: z.ZodOptional<z.ZodString>;
397
+ content: z.ZodOptional<z.ZodString>;
398
+ approvedOutput: z.ZodOptional<z.ZodString>;
399
+ rejectedOutput: z.ZodOptional<z.ZodString>;
400
+ schema: z.ZodNullable<z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>>;
401
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
402
+ id: z.ZodString;
403
+ label: z.ZodString;
404
+ outcome: z.ZodEnum<{
405
+ approve: "approve";
406
+ reject: "reject";
407
+ }>;
408
+ }, z.core.$strip>>>;
409
+ }, z.core.$strip>>>;
410
+ inputSchema: z.ZodOptional<z.ZodNullable<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>>;
411
+ outputSchema: z.ZodOptional<z.ZodNullable<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>>;
412
+ secretsMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
413
+ authRef: z.ZodOptional<z.ZodString>;
414
+ connectionRef: z.ZodOptional<z.ZodString>;
415
+ actionRef: z.ZodOptional<z.ZodString>;
416
+ outputFormat: z.ZodOptional<z.ZodEnum<{
417
+ text: "text";
418
+ markdown: "markdown";
419
+ html: "html";
420
+ image: "image";
421
+ video: "video";
422
+ audio: "audio";
423
+ mixed: "mixed";
424
+ json: "json";
425
+ }>>;
426
+ configValueKinds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
427
+ literal: "literal";
428
+ ts: "ts";
429
+ sql: "sql";
430
+ }>>>;
431
+ position: z.ZodOptional<z.ZodObject<{
432
+ x: z.ZodNumber;
433
+ y: z.ZodNumber;
434
+ }, z.core.$strip>>;
435
+ }, z.core.$strip>>;
436
+ edges: z.ZodArray<z.ZodObject<{
437
+ id: z.ZodUUID;
438
+ sourceNodeId: z.ZodUUID;
439
+ targetNodeId: z.ZodUUID;
440
+ label: z.ZodOptional<z.ZodString>;
441
+ }, z.core.$strip>>;
442
+ synthetic: z.ZodOptional<z.ZodBoolean>;
443
+ }, z.core.$strip>>>;
444
+ schemas: z.ZodOptional<z.ZodArray<z.ZodObject<{
445
+ id: z.ZodUUID;
446
+ name: z.ZodString;
447
+ label: z.ZodString;
448
+ description: z.ZodOptional<z.ZodString>;
449
+ schema: z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>;
450
+ }, z.core.$strip>>>;
451
+ triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
452
+ id: z.ZodUUID;
453
+ name: z.ZodString;
454
+ resourceType: z.ZodEnum<{
455
+ form: "form";
456
+ webhook: "webhook";
457
+ schedule: "schedule";
458
+ }>;
459
+ resourceId: z.ZodUUID;
460
+ workflowId: z.ZodUUID;
461
+ enabled: z.ZodOptional<z.ZodBoolean>;
462
+ }, z.core.$strip>>>;
463
+ secretBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
464
+ id: z.ZodUUID;
465
+ name: z.ZodString;
466
+ label: z.ZodString;
467
+ description: z.ZodOptional<z.ZodString>;
468
+ type: z.ZodOptional<z.ZodLiteral<"managed">>;
469
+ vars: z.ZodArray<z.ZodString>;
470
+ }, z.core.$strip>>>;
471
+ authBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
472
+ id: z.ZodUUID;
473
+ name: z.ZodString;
474
+ label: z.ZodString;
475
+ description: z.ZodOptional<z.ZodString>;
476
+ authType: z.ZodString;
477
+ secretBlockName: z.ZodOptional<z.ZodString>;
478
+ config: z.ZodRecord<z.ZodString, z.ZodString>;
479
+ }, z.core.$strip>>>;
480
+ postgresBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
481
+ id: z.ZodUUID;
482
+ name: z.ZodString;
483
+ secretsRef: z.ZodOptional<z.ZodString>;
484
+ connection: z.ZodString;
485
+ connectionIsLiteral: z.ZodBoolean;
486
+ networkRef: z.ZodOptional<z.ZodString>;
487
+ tables: z.ZodArray<z.ZodObject<{
488
+ name: z.ZodString;
489
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
490
+ }, z.core.$strip>>;
491
+ }, z.core.$strip>>>;
492
+ databaseBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
493
+ id: z.ZodUUID;
494
+ name: z.ZodString;
495
+ label: z.ZodOptional<z.ZodString>;
496
+ description: z.ZodOptional<z.ZodString>;
497
+ schema: z.ZodString;
498
+ schemaChecksum: z.ZodString;
499
+ connections: z.ZodDefault<z.ZodArray<z.ZodObject<{
500
+ id: z.ZodUUID;
501
+ name: z.ZodString;
502
+ label: z.ZodOptional<z.ZodString>;
503
+ description: z.ZodOptional<z.ZodString>;
504
+ }, z.core.$strip>>>;
505
+ }, z.core.$strip>>>;
506
+ databaseMigrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
507
+ id: z.ZodUUID;
508
+ name: z.ZodString;
509
+ database: z.ZodString;
510
+ order: z.ZodNumber;
511
+ operationCode: z.ZodString;
512
+ }, z.core.$strip>>>;
513
+ diskBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
514
+ id: z.ZodUUID;
515
+ name: z.ZodString;
516
+ label: z.ZodOptional<z.ZodString>;
517
+ region: z.ZodOptional<z.ZodString>;
518
+ }, z.core.$strip>>>;
519
+ computerBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
520
+ id: z.ZodUUID;
521
+ name: z.ZodString;
522
+ label: z.ZodString;
523
+ description: z.ZodOptional<z.ZodString>;
524
+ software: z.ZodRecord<z.ZodString, z.ZodString>;
525
+ disks: z.ZodArray<z.ZodString>;
526
+ resources: z.ZodObject<{
527
+ cpus: z.ZodNumber;
528
+ memoryMiB: z.ZodNumber;
529
+ diskGiB: z.ZodOptional<z.ZodNumber>;
530
+ }, z.core.$strip>;
531
+ needsMountTooling: z.ZodBoolean;
532
+ harness: z.ZodOptional<z.ZodObject<{
533
+ type: z.ZodString;
534
+ provider: z.ZodString;
535
+ runtime: z.ZodString;
536
+ }, z.core.$strip>>;
537
+ recipeHash: z.ZodString;
538
+ }, z.core.$strip>>>;
539
+ operationBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
540
+ id: z.ZodUUID;
541
+ name: z.ZodString;
542
+ label: z.ZodString;
543
+ description: z.ZodOptional<z.ZodString>;
544
+ interpreter: z.ZodEnum<{
545
+ powershell: "powershell";
546
+ sh: "sh";
547
+ }>;
548
+ platform: z.ZodOptional<z.ZodEnum<{
549
+ windows: "windows";
550
+ linux: "linux";
551
+ macos: "macos";
552
+ }>>;
553
+ runAs: z.ZodEnum<{
554
+ system: "system";
555
+ signed_in_user: "signed_in_user";
556
+ }>;
557
+ script: z.ZodString;
558
+ scriptSha256: z.ZodString;
559
+ inputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
560
+ outputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
561
+ timeoutSeconds: z.ZodNumber;
562
+ }, z.core.$strip>>>;
563
+ skillBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
564
+ id: z.ZodUUID;
565
+ name: z.ZodString;
566
+ skillName: z.ZodString;
567
+ }, z.core.$strip>>>;
568
+ decisionBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
569
+ name: z.ZodString;
570
+ label: z.ZodOptional<z.ZodString>;
571
+ description: z.ZodOptional<z.ZodString>;
572
+ provider: z.ZodLiteral<"typesafe">;
573
+ model: z.ZodString;
574
+ secrets: z.ZodString;
575
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
576
+ questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
577
+ type: z.ZodLiteral<"choice">;
578
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
579
+ criteria: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
580
+ }, z.core.$strict>, z.ZodObject<{
581
+ type: z.ZodLiteral<"score">;
582
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
583
+ criteria: z.ZodArray<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
584
+ }, z.core.$strict>, z.ZodObject<{
585
+ type: z.ZodLiteral<"noul">;
586
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
587
+ criteria: z.ZodOptional<z.ZodObject<{
588
+ true: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
589
+ false: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
590
+ }, z.core.$strict>>;
591
+ }, z.core.$strict>], "type">>;
592
+ id: z.ZodUUID;
593
+ }, z.core.$strict>>>;
594
+ agentBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
595
+ id: z.ZodUUID;
596
+ name: z.ZodString;
597
+ label: z.ZodOptional<z.ZodString>;
598
+ description: z.ZodOptional<z.ZodString>;
599
+ provider: z.ZodEnum<{
600
+ openrouter: "openrouter";
601
+ anthropic: "anthropic";
602
+ openai: "openai";
603
+ google: "google";
604
+ }>;
605
+ model: z.ZodString;
606
+ secretsRef: z.ZodOptional<z.ZodString>;
607
+ secretVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
608
+ defaultSystemCode: z.ZodOptional<z.ZodString>;
609
+ temperature: z.ZodOptional<z.ZodNumber>;
610
+ maxTokens: z.ZodOptional<z.ZodNumber>;
611
+ maxSteps: z.ZodOptional<z.ZodNumber>;
612
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
613
+ team: z.ZodOptional<z.ZodArray<z.ZodString>>;
614
+ skills: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
615
+ blockName: z.ZodString;
616
+ name: z.ZodString;
617
+ checksum: z.ZodString;
618
+ kind: z.ZodLiteral<"knowledge">;
619
+ description: z.ZodOptional<z.ZodString>;
620
+ skillMdPath: z.ZodString;
621
+ files: z.ZodArray<z.ZodObject<{
622
+ path: z.ZodString;
623
+ size: z.ZodNumber;
624
+ }, z.core.$strip>>;
625
+ }, z.core.$strip>]>>>;
626
+ mcp: z.ZodOptional<z.ZodArray<z.ZodString>>;
627
+ computer: z.ZodOptional<z.ZodString>;
628
+ disks: z.ZodOptional<z.ZodArray<z.ZodString>>;
629
+ sandbox: z.ZodOptional<z.ZodObject<{
630
+ cpus: z.ZodOptional<z.ZodNumber>;
631
+ memoryMiB: z.ZodOptional<z.ZodNumber>;
632
+ diskGiB: z.ZodOptional<z.ZodNumber>;
633
+ autoStopMinutes: z.ZodOptional<z.ZodNumber>;
634
+ autoArchiveMinutes: z.ZodOptional<z.ZodNumber>;
635
+ autoDeleteMinutes: z.ZodOptional<z.ZodNumber>;
636
+ ephemeral: z.ZodOptional<z.ZodBoolean>;
637
+ }, z.core.$strip>>;
638
+ wallet: z.ZodOptional<z.ZodObject<{
639
+ budget: z.ZodNumber;
640
+ cadence: z.ZodEnum<{
641
+ daily: "daily";
642
+ weekly: "weekly";
643
+ monthly: "monthly";
644
+ }>;
645
+ maxPerCall: z.ZodOptional<z.ZodNumber>;
646
+ }, z.core.$strip>>;
647
+ context: z.ZodOptional<z.ZodObject<{
648
+ budget: z.ZodOptional<z.ZodNumber>;
649
+ compactAt: z.ZodOptional<z.ZodNumber>;
650
+ keepRecentTurns: z.ZodOptional<z.ZodNumber>;
651
+ pruneToolResultsAfter: z.ZodOptional<z.ZodNumber>;
652
+ cacheRetention: z.ZodOptional<z.ZodEnum<{
653
+ none: "none";
654
+ short: "short";
655
+ long: "long";
656
+ }>>;
657
+ }, z.core.$strip>>;
658
+ roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
659
+ name: z.ZodString;
660
+ description: z.ZodOptional<z.ZodString>;
661
+ systemCode: z.ZodOptional<z.ZodString>;
662
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
663
+ skills: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
664
+ blockName: z.ZodString;
665
+ name: z.ZodString;
666
+ checksum: z.ZodString;
667
+ kind: z.ZodLiteral<"knowledge">;
668
+ description: z.ZodOptional<z.ZodString>;
669
+ skillMdPath: z.ZodString;
670
+ files: z.ZodArray<z.ZodObject<{
671
+ path: z.ZodString;
672
+ size: z.ZodNumber;
673
+ }, z.core.$strip>>;
674
+ }, z.core.$strip>]>>>;
675
+ mcp: z.ZodOptional<z.ZodArray<z.ZodString>>;
676
+ sandbox: z.ZodOptional<z.ZodObject<{
677
+ cpus: z.ZodOptional<z.ZodNumber>;
678
+ memoryMiB: z.ZodOptional<z.ZodNumber>;
679
+ diskGiB: z.ZodOptional<z.ZodNumber>;
680
+ autoStopMinutes: z.ZodOptional<z.ZodNumber>;
681
+ autoArchiveMinutes: z.ZodOptional<z.ZodNumber>;
682
+ autoDeleteMinutes: z.ZodOptional<z.ZodNumber>;
683
+ ephemeral: z.ZodOptional<z.ZodBoolean>;
684
+ }, z.core.$strip>>;
685
+ }, z.core.$strip>>>;
686
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
687
+ label: z.ZodString;
688
+ message: z.ZodString;
689
+ }, z.core.$strip>>>;
690
+ }, z.core.$strip>>>;
691
+ channelBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
692
+ id: z.ZodUUID;
693
+ name: z.ZodString;
694
+ label: z.ZodString;
695
+ description: z.ZodOptional<z.ZodString>;
696
+ platform: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<{
697
+ web: "web";
698
+ mcp: "mcp";
699
+ slack: "slack";
700
+ linear: "linear";
701
+ discord: "discord";
702
+ swirls: "swirls";
703
+ }>>;
704
+ agent: z.ZodOptional<z.ZodString>;
705
+ workflows: z.ZodOptional<z.ZodArray<z.ZodString>>;
706
+ enabled: z.ZodOptional<z.ZodBoolean>;
707
+ connectionRef: z.ZodOptional<z.ZodString>;
708
+ connectorRef: z.ZodOptional<z.ZodString>;
709
+ mode: z.ZodOptional<z.ZodEnum<{
710
+ mention: "mention";
711
+ dm: "dm";
712
+ all: "all";
713
+ ambient: "ambient";
714
+ }>>;
715
+ engagementTimeoutSeconds: z.ZodOptional<z.ZodNumber>;
716
+ cooldownSeconds: z.ZodOptional<z.ZodNumber>;
717
+ maxUnpromptedPerHour: z.ZodOptional<z.ZodNumber>;
718
+ }, z.core.$strip>>>;
719
+ queryBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
720
+ id: z.ZodUUID;
721
+ name: z.ZodString;
722
+ label: z.ZodString;
723
+ description: z.ZodOptional<z.ZodString>;
724
+ enabled: z.ZodOptional<z.ZodBoolean>;
725
+ database: z.ZodString;
726
+ sql: z.ZodString;
727
+ params: z.ZodArray<z.ZodString>;
728
+ }, z.core.$strip>>>;
729
+ connectionBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
730
+ id: z.ZodUUID;
731
+ name: z.ZodString;
732
+ label: z.ZodOptional<z.ZodString>;
733
+ description: z.ZodOptional<z.ZodString>;
734
+ provider: z.ZodString;
735
+ baseUrl: z.ZodOptional<z.ZodURL>;
736
+ authRef: z.ZodOptional<z.ZodString>;
737
+ networkRef: z.ZodOptional<z.ZodString>;
738
+ }, z.core.$strip>>>;
739
+ mcpBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
740
+ id: z.ZodUUID;
741
+ name: z.ZodString;
742
+ label: z.ZodOptional<z.ZodString>;
743
+ description: z.ZodOptional<z.ZodString>;
744
+ url: z.ZodOptional<z.ZodString>;
745
+ auth: z.ZodOptional<z.ZodEnum<{
746
+ static: "static";
747
+ interactive: "interactive";
748
+ }>>;
749
+ networkRef: z.ZodOptional<z.ZodString>;
750
+ }, z.core.$strip>>>;
751
+ networkBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
752
+ id: z.ZodUUID;
753
+ name: z.ZodString;
754
+ label: z.ZodOptional<z.ZodString>;
755
+ description: z.ZodOptional<z.ZodString>;
756
+ expose: z.ZodObject<{
757
+ apps: z.ZodArray<z.ZodString>;
758
+ channels: z.ZodArray<z.ZodString>;
759
+ forms: z.ZodArray<z.ZodString>;
760
+ webhooks: z.ZodArray<z.ZodString>;
761
+ services: z.ZodArray<z.ZodString>;
762
+ databases: z.ZodArray<z.ZodObject<{
763
+ database: z.ZodString;
764
+ connections: z.ZodArray<z.ZodString>;
765
+ }, z.core.$strip>>;
766
+ }, z.core.$strip>;
767
+ }, z.core.$strip>>>;
768
+ connectorBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
769
+ id: z.ZodUUID;
770
+ name: z.ZodString;
771
+ label: z.ZodOptional<z.ZodString>;
772
+ description: z.ZodOptional<z.ZodString>;
773
+ }, z.core.$strip>>>;
774
+ actionBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
775
+ id: z.ZodUUID;
776
+ name: z.ZodString;
777
+ label: z.ZodOptional<z.ZodString>;
778
+ description: z.ZodOptional<z.ZodString>;
779
+ provider: z.ZodString;
780
+ method: z.ZodEnum<{
781
+ GET: "GET";
782
+ POST: "POST";
783
+ PUT: "PUT";
784
+ DELETE: "DELETE";
785
+ PATCH: "PATCH";
786
+ }>;
787
+ path: z.ZodString;
788
+ encoding: z.ZodOptional<z.ZodEnum<{
789
+ json: "json";
790
+ form: "form";
791
+ query: "query";
792
+ raw: "raw";
793
+ }>>;
794
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
795
+ inputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
796
+ outputSchema: z.ZodOptional<z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>>;
797
+ }, z.core.$strip>>>;
798
+ streams: z.ZodOptional<z.ZodArray<z.ZodObject<{
799
+ id: z.ZodUUID;
800
+ name: z.ZodString;
801
+ label: z.ZodString;
802
+ description: z.ZodOptional<z.ZodString>;
803
+ enabled: z.ZodOptional<z.ZodBoolean>;
804
+ workflowName: z.ZodString;
805
+ version: z.ZodString;
806
+ versions: z.ZodRecord<z.ZodString, z.ZodObject<{
807
+ schema: z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>;
808
+ conditionCode: z.ZodOptional<z.ZodString>;
809
+ prepareCode: z.ZodString;
810
+ }, z.core.$strip>>;
811
+ }, z.core.$strip>>>;
812
+ views: z.ZodOptional<z.ZodArray<z.ZodObject<{
813
+ id: z.ZodUUID;
814
+ name: z.ZodString;
815
+ label: z.ZodString;
816
+ description: z.ZodOptional<z.ZodString>;
817
+ enabled: z.ZodOptional<z.ZodBoolean>;
818
+ streams: z.ZodArray<z.ZodString>;
819
+ schema: z.ZodType<json_schema.JSONSchema7, json_schema.JSONSchema7, z.core.$ZodTypeInternals<json_schema.JSONSchema7, json_schema.JSONSchema7>>;
820
+ columnsCode: z.ZodString;
821
+ computed: z.ZodOptional<z.ZodArray<z.ZodObject<{
822
+ name: z.ZodString;
823
+ workflowName: z.ZodString;
824
+ inputCode: z.ZodString;
825
+ outputCode: z.ZodOptional<z.ZodString>;
826
+ }, z.core.$strip>>>;
827
+ }, z.core.$strip>>>;
828
+ apps: z.ZodOptional<z.ZodArray<z.ZodObject<{
829
+ id: z.ZodUUID;
830
+ name: z.ZodString;
831
+ label: z.ZodString;
832
+ description: z.ZodOptional<z.ZodString>;
833
+ icon: z.ZodOptional<z.ZodString>;
834
+ brand: z.ZodOptional<z.ZodObject<{
835
+ accent: z.ZodOptional<z.ZodString>;
836
+ logo: z.ZodOptional<z.ZodString>;
837
+ theme: z.ZodOptional<z.ZodEnum<{
838
+ "swirls-light": "swirls-light";
839
+ "swirls-dark": "swirls-dark";
840
+ "github-light": "github-light";
841
+ "github-dark": "github-dark";
842
+ "catppuccin-latte": "catppuccin-latte";
843
+ "catppuccin-macchiato": "catppuccin-macchiato";
844
+ "tokyo-night": "tokyo-night";
845
+ nord: "nord";
846
+ "gruvbox-light": "gruvbox-light";
847
+ "gruvbox-dark": "gruvbox-dark";
848
+ "rose-pine": "rose-pine";
849
+ dracula: "dracula";
850
+ }>>;
851
+ tokens: z.ZodOptional<z.ZodObject<{
852
+ light: z.ZodOptional<z.ZodObject<{
853
+ active: z.ZodOptional<z.ZodString>;
854
+ success: z.ZodOptional<z.ZodString>;
855
+ surface: z.ZodOptional<z.ZodString>;
856
+ canvas: z.ZodOptional<z.ZodString>;
857
+ text: z.ZodOptional<z.ZodString>;
858
+ text_muted: z.ZodOptional<z.ZodString>;
859
+ text_dim: z.ZodOptional<z.ZodString>;
860
+ viewport: z.ZodOptional<z.ZodString>;
861
+ raised: z.ZodOptional<z.ZodString>;
862
+ field: z.ZodOptional<z.ZodString>;
863
+ border: z.ZodOptional<z.ZodString>;
864
+ brand: z.ZodOptional<z.ZodString>;
865
+ brand_foreground: z.ZodOptional<z.ZodString>;
866
+ brand_soft: z.ZodOptional<z.ZodString>;
867
+ warning: z.ZodOptional<z.ZodString>;
868
+ info: z.ZodOptional<z.ZodString>;
869
+ danger: z.ZodOptional<z.ZodString>;
870
+ radius: z.ZodOptional<z.ZodString>;
871
+ }, z.core.$strict>>;
872
+ dark: z.ZodOptional<z.ZodObject<{
873
+ active: z.ZodOptional<z.ZodString>;
874
+ success: z.ZodOptional<z.ZodString>;
875
+ surface: z.ZodOptional<z.ZodString>;
876
+ canvas: z.ZodOptional<z.ZodString>;
877
+ text: z.ZodOptional<z.ZodString>;
878
+ text_muted: z.ZodOptional<z.ZodString>;
879
+ text_dim: z.ZodOptional<z.ZodString>;
880
+ viewport: z.ZodOptional<z.ZodString>;
881
+ raised: z.ZodOptional<z.ZodString>;
882
+ field: z.ZodOptional<z.ZodString>;
883
+ border: z.ZodOptional<z.ZodString>;
884
+ brand: z.ZodOptional<z.ZodString>;
885
+ brand_foreground: z.ZodOptional<z.ZodString>;
886
+ brand_soft: z.ZodOptional<z.ZodString>;
887
+ warning: z.ZodOptional<z.ZodString>;
888
+ info: z.ZodOptional<z.ZodString>;
889
+ danger: z.ZodOptional<z.ZodString>;
890
+ radius: z.ZodOptional<z.ZodString>;
891
+ }, z.core.$strict>>;
892
+ }, z.core.$strict>>;
893
+ avatar: z.ZodOptional<z.ZodObject<{
894
+ variant: z.ZodOptional<z.ZodEnum<{
895
+ beam: "beam";
896
+ marble: "marble";
897
+ bauhaus: "bauhaus";
898
+ pixel: "pixel";
899
+ sunset: "sunset";
900
+ ring: "ring";
901
+ }>>;
902
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
903
+ shape: z.ZodOptional<z.ZodEnum<{
904
+ square: "square";
905
+ circle: "circle";
906
+ }>>;
907
+ }, z.core.$strip>>;
908
+ }, z.core.$strip>>;
909
+ landing: z.ZodOptional<z.ZodObject<{
910
+ layout: z.ZodOptional<z.ZodEnum<{
911
+ split: "split";
912
+ centered: "centered";
913
+ cover: "cover";
914
+ }>>;
915
+ image: z.ZodOptional<z.ZodString>;
916
+ title: z.ZodOptional<z.ZodString>;
917
+ subtitle: z.ZodOptional<z.ZodString>;
918
+ signInTitle: z.ZodOptional<z.ZodString>;
919
+ signInHint: z.ZodOptional<z.ZodString>;
920
+ footer: z.ZodOptional<z.ZodString>;
921
+ discover: z.ZodOptional<z.ZodObject<{
922
+ index: z.ZodOptional<z.ZodBoolean>;
923
+ metaTitle: z.ZodOptional<z.ZodString>;
924
+ metaDescription: z.ZodOptional<z.ZodString>;
925
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
926
+ ogImage: z.ZodOptional<z.ZodString>;
927
+ canonical: z.ZodOptional<z.ZodString>;
928
+ locale: z.ZodOptional<z.ZodString>;
929
+ summary: z.ZodOptional<z.ZodString>;
930
+ audience: z.ZodOptional<z.ZodString>;
931
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
932
+ faq: z.ZodOptional<z.ZodArray<z.ZodObject<{
933
+ question: z.ZodString;
934
+ answer: z.ZodString;
935
+ }, z.core.$strip>>>;
936
+ organization: z.ZodOptional<z.ZodString>;
937
+ organizationUrl: z.ZodOptional<z.ZodString>;
938
+ applicationCategory: z.ZodOptional<z.ZodString>;
939
+ }, z.core.$strip>>;
940
+ }, z.core.$strip>>;
941
+ audience: z.ZodOptional<z.ZodObject<{
942
+ admission: z.ZodEnum<{
943
+ invite: "invite";
944
+ domain: "domain";
945
+ invite_or_domain: "invite_or_domain";
946
+ public: "public";
947
+ }>;
948
+ auth: z.ZodOptional<z.ZodEnum<{
949
+ email_otp: "email_otp";
950
+ oidc: "oidc";
951
+ }>>;
952
+ idp: z.ZodOptional<z.ZodString>;
953
+ allowDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
954
+ denyDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
955
+ }, z.core.$strip>>;
956
+ shell: z.ZodOptional<z.ZodObject<{
957
+ preset: z.ZodOptional<z.ZodEnum<{
958
+ canvas: "canvas";
959
+ sidebar: "sidebar";
960
+ topnav: "topnav";
961
+ chat: "chat";
962
+ }>>;
963
+ regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
964
+ name: z.ZodEnum<{
965
+ topbar: "topbar";
966
+ leftbar: "leftbar";
967
+ rightbar: "rightbar";
968
+ }>;
969
+ props: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
970
+ }, z.core.$strip>>>;
971
+ }, z.core.$strip>>;
972
+ nav: z.ZodOptional<z.ZodObject<{
973
+ sections: z.ZodArray<z.ZodObject<{
974
+ title: z.ZodString;
975
+ entries: z.ZodArray<z.ZodObject<{
976
+ pageName: z.ZodString;
977
+ label: z.ZodOptional<z.ZodString>;
978
+ }, z.core.$strip>>;
979
+ }, z.core.$strip>>;
980
+ }, z.core.$strip>>;
981
+ pages: z.ZodArray<z.ZodObject<{
982
+ name: z.ZodString;
983
+ label: z.ZodOptional<z.ZodString>;
984
+ icon: z.ZodOptional<z.ZodString>;
985
+ viewport: z.ZodOptional<z.ZodLiteral<"full">>;
986
+ openui: z.ZodOptional<z.ZodString>;
987
+ channel: z.ZodOptional<z.ZodString>;
988
+ agent: z.ZodOptional<z.ZodString>;
989
+ threads: z.ZodOptional<z.ZodArray<z.ZodString>>;
990
+ reviews: z.ZodOptional<z.ZodArray<z.ZodString>>;
991
+ }, z.core.$strip>>;
992
+ }, z.core.$strip>>>;
993
+ roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
994
+ name: z.ZodString;
995
+ description: z.ZodOptional<z.ZodString>;
996
+ match: z.ZodArray<z.ZodObject<{
997
+ claim: z.ZodString;
998
+ op: z.ZodEnum<{
999
+ in: "in";
1000
+ eq: "eq";
1001
+ }>;
1002
+ values: z.ZodArray<z.ZodString>;
1003
+ }, z.core.$strip>>;
1004
+ }, z.core.$strip>>>;
1005
+ policies: z.ZodOptional<z.ZodArray<z.ZodObject<{
1006
+ grants: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1007
+ effect: z.ZodEnum<{
1008
+ allow: "allow";
1009
+ deny: "deny";
1010
+ }>;
1011
+ role: z.ZodString;
1012
+ agent: z.ZodString;
1013
+ workflow: z.ZodOptional<z.ZodNever>;
1014
+ workflows: z.ZodOptional<z.ZodArray<z.ZodString>>;
1015
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1016
+ }, z.core.$strip>, z.ZodObject<{
1017
+ effect: z.ZodEnum<{
1018
+ allow: "allow";
1019
+ deny: "deny";
1020
+ }>;
1021
+ role: z.ZodString;
1022
+ workflow: z.ZodString;
1023
+ agent: z.ZodOptional<z.ZodNever>;
1024
+ workflows: z.ZodOptional<z.ZodNever>;
1025
+ tools: z.ZodOptional<z.ZodNever>;
1026
+ }, z.core.$strip>]>>;
1027
+ files: z.ZodOptional<z.ZodObject<{
1028
+ retention: z.ZodDiscriminatedUnion<[z.ZodObject<{
1029
+ mode: z.ZodLiteral<"forever">;
1030
+ }, z.core.$strip>, z.ZodObject<{
1031
+ mode: z.ZodLiteral<"days">;
1032
+ days: z.ZodNumber;
1033
+ }, z.core.$strip>], "mode">;
1034
+ }, z.core.$strip>>;
1035
+ }, z.core.$strip>>>;
1036
+ mockBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1037
+ id: z.ZodUUID;
1038
+ name: z.ZodString;
1039
+ }, z.core.$loose>>>;
1040
+ playbookBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1041
+ id: z.ZodUUID;
1042
+ name: z.ZodString;
1043
+ }, z.core.$loose>>>;
1044
+ }, z.core.$strip>;
1045
+ type DeploymentDefinition = z.infer<typeof deploymentDefinitionSchema>;
1046
+ type DeploymentDefinitionOperationBlock = z.infer<typeof deploymentDefinitionOperationBlockSchema>;
1047
+ declare function parseDeploymentDefinition(data: unknown): z.ZodSafeParseResult<{
1048
+ version?: number | undefined;
1049
+ forms?: {
1050
+ id: string;
1051
+ name: string;
1052
+ label: string;
1053
+ visibility: "public" | "internal";
1054
+ description?: string | undefined;
1055
+ schema?: json_schema.JSONSchema7 | null | undefined;
1056
+ enabled?: boolean | undefined;
1057
+ authName?: string | undefined;
1058
+ }[] | undefined;
1059
+ webhooks?: {
1060
+ id: string;
1061
+ name: string;
1062
+ label: string;
1063
+ description?: string | undefined;
1064
+ schema?: json_schema.JSONSchema7 | null | undefined;
1065
+ enabled?: boolean | undefined;
1066
+ secretRefBlock?: string | undefined;
1067
+ secretRefVar?: string | undefined;
1068
+ headerName?: string | undefined;
1069
+ }[] | undefined;
1070
+ schedules?: {
1071
+ id: string;
1072
+ name: string;
1073
+ label: string;
1074
+ cron: string;
1075
+ description?: string | undefined;
1076
+ timezone?: string | undefined;
1077
+ enabled?: boolean | undefined;
1078
+ }[] | undefined;
1079
+ workflows?: {
1080
+ id: string;
1081
+ name: string;
1082
+ label: string;
1083
+ nodes: {
1084
+ id: string;
1085
+ name: string;
1086
+ type: string;
1087
+ label: string;
1088
+ config: ({
1089
+ type: "decision";
1090
+ decision: string;
1091
+ state: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[];
1092
+ failurePolicy?: unknown;
1093
+ model?: string | undefined;
1094
+ definition?: {
1095
+ name: string;
1096
+ provider: "typesafe";
1097
+ model: string;
1098
+ secrets: string;
1099
+ inputSchema: Record<string, unknown>;
1100
+ questions: Record<string, {
1101
+ type: "choice";
1102
+ instructions: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[];
1103
+ criteria: Record<string, string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null>;
1104
+ } | {
1105
+ type: "score";
1106
+ instructions: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[];
1107
+ criteria: (string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null)[];
1108
+ } | {
1109
+ type: "noul";
1110
+ instructions: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[];
1111
+ criteria?: {
1112
+ true?: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null | undefined;
1113
+ false?: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null | undefined;
1114
+ } | undefined;
1115
+ }>;
1116
+ label?: string | undefined;
1117
+ description?: string | undefined;
1118
+ } | undefined;
1119
+ } | {
1120
+ type: "search";
1121
+ provider?: "firecrawl" | "telem" | undefined;
1122
+ query?: string | undefined;
1123
+ limit?: number | undefined;
1124
+ sources?: ("web" | "news" | "images")[] | undefined;
1125
+ categories?: ("github" | "research" | "pdf")[] | undefined;
1126
+ location?: string | undefined;
1127
+ country?: string | undefined;
1128
+ tbs?: string | undefined;
1129
+ includeDomains?: string[] | undefined;
1130
+ excludeDomains?: string[] | undefined;
1131
+ scrapeFormats?: string[] | undefined;
1132
+ } | {
1133
+ type: "ai";
1134
+ kind: "object" | "text" | "image" | "video" | "embed";
1135
+ provider?: "openrouter" | "anthropic" | "openai" | "google" | undefined;
1136
+ model?: string | undefined;
1137
+ prompt?: string | undefined;
1138
+ temperature?: number | undefined;
1139
+ maxTokens?: number | undefined;
1140
+ options?: Record<string, unknown> | undefined;
1141
+ } | {
1142
+ type: "code";
1143
+ code?: string | undefined;
1144
+ } | {
1145
+ type: "email";
1146
+ from?: string | undefined;
1147
+ to?: string | undefined;
1148
+ subject?: string | undefined;
1149
+ text?: string | undefined;
1150
+ html?: string | undefined;
1151
+ replyTo?: string | undefined;
1152
+ } | {
1153
+ type: "workflow" | "graph";
1154
+ workflowId?: string | undefined;
1155
+ workflow?: string | undefined;
1156
+ graphId?: string | undefined;
1157
+ graph?: string | undefined;
1158
+ input?: string | undefined;
1159
+ } | {
1160
+ type: "map";
1161
+ items?: string | undefined;
1162
+ maxItems?: number | undefined;
1163
+ concurrency?: number | undefined;
1164
+ workflowId?: string | undefined;
1165
+ workflow?: string | undefined;
1166
+ graphId?: string | undefined;
1167
+ graph?: string | undefined;
1168
+ } | {
1169
+ type: "fanout";
1170
+ items?: string | undefined;
1171
+ maxItems?: number | undefined;
1172
+ concurrency?: number | undefined;
1173
+ workflowId?: string | undefined;
1174
+ workflow?: string | undefined;
1175
+ graphId?: string | undefined;
1176
+ graph?: string | undefined;
1177
+ } | {
1178
+ type: "while";
1179
+ input?: string | undefined;
1180
+ condition?: string | undefined;
1181
+ update?: string | undefined;
1182
+ maxIterations?: number | undefined;
1183
+ workflowId?: string | undefined;
1184
+ workflow?: string | undefined;
1185
+ graphId?: string | undefined;
1186
+ graph?: string | undefined;
1187
+ } | {
1188
+ type: "http";
1189
+ url?: string | undefined;
1190
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
1191
+ headers?: string | undefined;
1192
+ body?: string | undefined;
1193
+ network?: string | undefined;
1194
+ } | {
1195
+ type: "integration";
1196
+ connection?: string | undefined;
1197
+ action?: string | undefined;
1198
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
1199
+ path?: string | undefined;
1200
+ params?: string | undefined;
1201
+ encoding?: "json" | "form" | "query" | "raw" | undefined;
1202
+ actionInputSchema?: json_schema.JSONSchema7 | undefined;
1203
+ actionOutputSchema?: json_schema.JSONSchema7 | undefined;
1204
+ actionGraphqlDocument?: string | undefined;
1205
+ } | {
1206
+ type: "postgres";
1207
+ postgres?: string | undefined;
1208
+ select?: string | undefined;
1209
+ insert?: string | undefined;
1210
+ update?: string | undefined;
1211
+ delete?: string | undefined;
1212
+ params?: string | undefined;
1213
+ condition?: string | undefined;
1214
+ } | {
1215
+ type: "database";
1216
+ database: string;
1217
+ operation: "query" | "insert" | "update" | "delete" | "transaction";
1218
+ run: string;
1219
+ condition?: string | undefined;
1220
+ } | {
1221
+ type: "disk";
1222
+ disk: string;
1223
+ operation?: "exec" | "copy_file" | undefined;
1224
+ command?: string | undefined;
1225
+ path?: string | undefined;
1226
+ file?: string | undefined;
1227
+ overwrite?: "replace" | undefined;
1228
+ } | {
1229
+ type: "shell";
1230
+ computer: string;
1231
+ command: string;
1232
+ } | {
1233
+ type: "device";
1234
+ operation: string;
1235
+ device?: string | undefined;
1236
+ devices?: {
1237
+ tags?: string[] | undefined;
1238
+ os?: "windows" | "linux" | "macos" | undefined;
1239
+ } | undefined;
1240
+ input?: string | Record<string, unknown> | undefined;
1241
+ waitSeconds?: number | undefined;
1242
+ } | {
1243
+ type: "agent";
1244
+ agent: string;
1245
+ model?: string | undefined;
1246
+ prompt?: string | undefined;
1247
+ profile?: string | undefined;
1248
+ role?: string | undefined;
1249
+ tools?: string[] | undefined;
1250
+ system?: string | undefined;
1251
+ } | {
1252
+ type: "scrape";
1253
+ url?: string | undefined;
1254
+ onlyMainContent?: boolean | undefined;
1255
+ formats?: string[] | undefined;
1256
+ maxAge?: number | undefined;
1257
+ parsers?: string[] | undefined;
1258
+ } | {
1259
+ type: "parallel";
1260
+ operation: "search" | "extract" | "findall";
1261
+ objective?: string | undefined;
1262
+ urls?: string | undefined;
1263
+ searchQueries?: string | undefined;
1264
+ mode?: "one-shot" | "agentic" | "fast" | undefined;
1265
+ excerptsMaxCharsPerResult?: number | undefined;
1266
+ excerptsMaxCharsTotal?: number | undefined;
1267
+ excerpts?: boolean | undefined;
1268
+ fullContent?: boolean | undefined;
1269
+ entityType?: string | undefined;
1270
+ generator?: "base" | "core" | "pro" | "preview" | undefined;
1271
+ matchConditions?: string | undefined;
1272
+ matchLimit?: number | undefined;
1273
+ excludeList?: string | undefined;
1274
+ pollInterval?: number | undefined;
1275
+ pollIntervalUnit?: "seconds" | "minutes" | undefined;
1276
+ pollTimeout?: number | undefined;
1277
+ pollTimeoutUnit?: "seconds" | "minutes" | undefined;
1278
+ } | {
1279
+ type: "stream";
1280
+ stream: string;
1281
+ version: string;
1282
+ filter: string;
1283
+ } | {
1284
+ type: "switch";
1285
+ cases: string[];
1286
+ router?: string | undefined;
1287
+ } | {
1288
+ type: "wait";
1289
+ amount?: number | undefined;
1290
+ unit?: "seconds" | "minutes" | "hours" | "days" | undefined;
1291
+ secondsFromConfig?: string | undefined;
1292
+ }) & {
1293
+ failurePolicy?: {
1294
+ strategy: "fail" | "retry" | "skip" | "fallback";
1295
+ maxRetries?: number | undefined;
1296
+ backoffMs?: number | undefined;
1297
+ fallbackValue?: unknown;
1298
+ } | undefined;
1299
+ };
1300
+ description?: string | undefined;
1301
+ isRoot?: boolean | undefined;
1302
+ reviewConfig?: {
1303
+ enabled: boolean;
1304
+ title?: string | undefined;
1305
+ description?: string | undefined;
1306
+ content?: string | undefined;
1307
+ approvedOutput?: string | undefined;
1308
+ rejectedOutput?: string | undefined;
1309
+ schema?: json_schema.JSONSchema7 | null | undefined;
1310
+ actions?: {
1311
+ id: string;
1312
+ label: string;
1313
+ outcome: "approve" | "reject";
1314
+ }[] | undefined;
1315
+ } | null | undefined;
1316
+ inputSchema?: json_schema.JSONSchema7 | null | undefined;
1317
+ outputSchema?: json_schema.JSONSchema7 | null | undefined;
1318
+ secretsMap?: Record<string, string[]> | undefined;
1319
+ authRef?: string | undefined;
1320
+ connectionRef?: string | undefined;
1321
+ actionRef?: string | undefined;
1322
+ outputFormat?: "text" | "markdown" | "html" | "image" | "video" | "audio" | "mixed" | "json" | undefined;
1323
+ configValueKinds?: Record<string, "literal" | "ts" | "sql"> | undefined;
1324
+ position?: {
1325
+ x: number;
1326
+ y: number;
1327
+ } | undefined;
1328
+ }[];
1329
+ edges: {
1330
+ id: string;
1331
+ sourceNodeId: string;
1332
+ targetNodeId: string;
1333
+ label?: string | undefined;
1334
+ }[];
1335
+ description?: string | undefined;
1336
+ concurrency?: number | undefined;
1337
+ executionTokenTtlSeconds?: number | undefined;
1338
+ synthetic?: boolean | undefined;
1339
+ }[] | undefined;
1340
+ schemas?: {
1341
+ id: string;
1342
+ name: string;
1343
+ label: string;
1344
+ schema: json_schema.JSONSchema7;
1345
+ description?: string | undefined;
1346
+ }[] | undefined;
1347
+ triggers?: {
1348
+ id: string;
1349
+ name: string;
1350
+ resourceType: "form" | "webhook" | "schedule";
1351
+ resourceId: string;
1352
+ workflowId: string;
1353
+ enabled?: boolean | undefined;
1354
+ }[] | undefined;
1355
+ secretBlocks?: {
1356
+ id: string;
1357
+ name: string;
1358
+ label: string;
1359
+ vars: string[];
1360
+ description?: string | undefined;
1361
+ type?: "managed" | undefined;
1362
+ }[] | undefined;
1363
+ authBlocks?: {
1364
+ id: string;
1365
+ name: string;
1366
+ label: string;
1367
+ authType: string;
1368
+ config: Record<string, string>;
1369
+ description?: string | undefined;
1370
+ secretBlockName?: string | undefined;
1371
+ }[] | undefined;
1372
+ postgresBlocks?: {
1373
+ id: string;
1374
+ name: string;
1375
+ connection: string;
1376
+ connectionIsLiteral: boolean;
1377
+ tables: {
1378
+ name: string;
1379
+ schema: Record<string, unknown>;
1380
+ }[];
1381
+ secretsRef?: string | undefined;
1382
+ networkRef?: string | undefined;
1383
+ }[] | undefined;
1384
+ databaseBlocks?: {
1385
+ id: string;
1386
+ name: string;
1387
+ schema: string;
1388
+ schemaChecksum: string;
1389
+ connections: {
1390
+ id: string;
1391
+ name: string;
1392
+ label?: string | undefined;
1393
+ description?: string | undefined;
1394
+ }[];
1395
+ label?: string | undefined;
1396
+ description?: string | undefined;
1397
+ }[] | undefined;
1398
+ databaseMigrations?: {
1399
+ id: string;
1400
+ name: string;
1401
+ database: string;
1402
+ order: number;
1403
+ operationCode: string;
1404
+ }[] | undefined;
1405
+ diskBlocks?: {
1406
+ id: string;
1407
+ name: string;
1408
+ label?: string | undefined;
1409
+ region?: string | undefined;
1410
+ }[] | undefined;
1411
+ computerBlocks?: {
1412
+ id: string;
1413
+ name: string;
1414
+ label: string;
1415
+ software: Record<string, string>;
1416
+ disks: string[];
1417
+ resources: {
1418
+ cpus: number;
1419
+ memoryMiB: number;
1420
+ diskGiB?: number | undefined;
1421
+ };
1422
+ needsMountTooling: boolean;
1423
+ recipeHash: string;
1424
+ description?: string | undefined;
1425
+ harness?: {
1426
+ type: string;
1427
+ provider: string;
1428
+ runtime: string;
1429
+ } | undefined;
1430
+ }[] | undefined;
1431
+ operationBlocks?: {
1432
+ id: string;
1433
+ name: string;
1434
+ label: string;
1435
+ interpreter: "powershell" | "sh";
1436
+ runAs: "system" | "signed_in_user";
1437
+ script: string;
1438
+ scriptSha256: string;
1439
+ timeoutSeconds: number;
1440
+ description?: string | undefined;
1441
+ platform?: "windows" | "linux" | "macos" | undefined;
1442
+ inputSchema?: json_schema.JSONSchema7 | undefined;
1443
+ outputSchema?: json_schema.JSONSchema7 | undefined;
1444
+ }[] | undefined;
1445
+ skillBlocks?: {
1446
+ id: string;
1447
+ name: string;
1448
+ skillName: string;
1449
+ }[] | undefined;
1450
+ decisionBlocks?: {
1451
+ name: string;
1452
+ provider: "typesafe";
1453
+ model: string;
1454
+ secrets: string;
1455
+ inputSchema: Record<string, unknown>;
1456
+ questions: Record<string, {
1457
+ type: "choice";
1458
+ instructions: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[];
1459
+ criteria: Record<string, string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null>;
1460
+ } | {
1461
+ type: "score";
1462
+ instructions: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[];
1463
+ criteria: (string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null)[];
1464
+ } | {
1465
+ type: "noul";
1466
+ instructions: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[];
1467
+ criteria?: {
1468
+ true?: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null | undefined;
1469
+ false?: string | Record<string, z.core.util.JSONType> | z.core.util.JSONType[] | null | undefined;
1470
+ } | undefined;
1471
+ }>;
1472
+ id: string;
1473
+ label?: string | undefined;
1474
+ description?: string | undefined;
1475
+ }[] | undefined;
1476
+ agentBlocks?: {
1477
+ id: string;
1478
+ name: string;
1479
+ provider: "openrouter" | "anthropic" | "openai" | "google";
1480
+ model: string;
1481
+ label?: string | undefined;
1482
+ description?: string | undefined;
1483
+ secretsRef?: string | undefined;
1484
+ secretVars?: string[] | undefined;
1485
+ defaultSystemCode?: string | undefined;
1486
+ temperature?: number | undefined;
1487
+ maxTokens?: number | undefined;
1488
+ maxSteps?: number | undefined;
1489
+ tools?: string[] | undefined;
1490
+ team?: string[] | undefined;
1491
+ skills?: (string | {
1492
+ blockName: string;
1493
+ name: string;
1494
+ checksum: string;
1495
+ kind: "knowledge";
1496
+ skillMdPath: string;
1497
+ files: {
1498
+ path: string;
1499
+ size: number;
1500
+ }[];
1501
+ description?: string | undefined;
1502
+ })[] | undefined;
1503
+ mcp?: string[] | undefined;
1504
+ computer?: string | undefined;
1505
+ disks?: string[] | undefined;
1506
+ sandbox?: {
1507
+ cpus?: number | undefined;
1508
+ memoryMiB?: number | undefined;
1509
+ diskGiB?: number | undefined;
1510
+ autoStopMinutes?: number | undefined;
1511
+ autoArchiveMinutes?: number | undefined;
1512
+ autoDeleteMinutes?: number | undefined;
1513
+ ephemeral?: boolean | undefined;
1514
+ } | undefined;
1515
+ wallet?: {
1516
+ budget: number;
1517
+ cadence: "daily" | "weekly" | "monthly";
1518
+ maxPerCall?: number | undefined;
1519
+ } | undefined;
1520
+ context?: {
1521
+ budget?: number | undefined;
1522
+ compactAt?: number | undefined;
1523
+ keepRecentTurns?: number | undefined;
1524
+ pruneToolResultsAfter?: number | undefined;
1525
+ cacheRetention?: "none" | "short" | "long" | undefined;
1526
+ } | undefined;
1527
+ roles?: {
1528
+ name: string;
1529
+ description?: string | undefined;
1530
+ systemCode?: string | undefined;
1531
+ tools?: string[] | undefined;
1532
+ skills?: (string | {
1533
+ blockName: string;
1534
+ name: string;
1535
+ checksum: string;
1536
+ kind: "knowledge";
1537
+ skillMdPath: string;
1538
+ files: {
1539
+ path: string;
1540
+ size: number;
1541
+ }[];
1542
+ description?: string | undefined;
1543
+ })[] | undefined;
1544
+ mcp?: string[] | undefined;
1545
+ sandbox?: {
1546
+ cpus?: number | undefined;
1547
+ memoryMiB?: number | undefined;
1548
+ diskGiB?: number | undefined;
1549
+ autoStopMinutes?: number | undefined;
1550
+ autoArchiveMinutes?: number | undefined;
1551
+ autoDeleteMinutes?: number | undefined;
1552
+ ephemeral?: boolean | undefined;
1553
+ } | undefined;
1554
+ }[] | undefined;
1555
+ suggestions?: {
1556
+ label: string;
1557
+ message: string;
1558
+ }[] | undefined;
1559
+ }[] | undefined;
1560
+ channelBlocks?: {
1561
+ id: string;
1562
+ name: string;
1563
+ label: string;
1564
+ platform: "web" | "mcp" | "slack" | "linear" | "discord" | "swirls";
1565
+ description?: string | undefined;
1566
+ agent?: string | undefined;
1567
+ workflows?: string[] | undefined;
1568
+ enabled?: boolean | undefined;
1569
+ connectionRef?: string | undefined;
1570
+ connectorRef?: string | undefined;
1571
+ mode?: "mention" | "dm" | "all" | "ambient" | undefined;
1572
+ engagementTimeoutSeconds?: number | undefined;
1573
+ cooldownSeconds?: number | undefined;
1574
+ maxUnpromptedPerHour?: number | undefined;
1575
+ }[] | undefined;
1576
+ queryBlocks?: {
1577
+ id: string;
1578
+ name: string;
1579
+ label: string;
1580
+ database: string;
1581
+ sql: string;
1582
+ params: string[];
1583
+ description?: string | undefined;
1584
+ enabled?: boolean | undefined;
1585
+ }[] | undefined;
1586
+ connectionBlocks?: {
1587
+ id: string;
1588
+ name: string;
1589
+ provider: string;
1590
+ label?: string | undefined;
1591
+ description?: string | undefined;
1592
+ baseUrl?: string | undefined;
1593
+ authRef?: string | undefined;
1594
+ networkRef?: string | undefined;
1595
+ }[] | undefined;
1596
+ mcpBlocks?: {
1597
+ id: string;
1598
+ name: string;
1599
+ label?: string | undefined;
1600
+ description?: string | undefined;
1601
+ url?: string | undefined;
1602
+ auth?: "static" | "interactive" | undefined;
1603
+ networkRef?: string | undefined;
1604
+ }[] | undefined;
1605
+ networkBlocks?: {
1606
+ id: string;
1607
+ name: string;
1608
+ expose: {
1609
+ apps: string[];
1610
+ channels: string[];
1611
+ forms: string[];
1612
+ webhooks: string[];
1613
+ services: string[];
1614
+ databases: {
1615
+ database: string;
1616
+ connections: string[];
1617
+ }[];
1618
+ };
1619
+ label?: string | undefined;
1620
+ description?: string | undefined;
1621
+ }[] | undefined;
1622
+ connectorBlocks?: {
1623
+ id: string;
1624
+ name: string;
1625
+ label?: string | undefined;
1626
+ description?: string | undefined;
1627
+ }[] | undefined;
1628
+ actionBlocks?: {
1629
+ id: string;
1630
+ name: string;
1631
+ provider: string;
1632
+ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
1633
+ path: string;
1634
+ label?: string | undefined;
1635
+ description?: string | undefined;
1636
+ encoding?: "json" | "form" | "query" | "raw" | undefined;
1637
+ scopes?: string[] | undefined;
1638
+ inputSchema?: json_schema.JSONSchema7 | undefined;
1639
+ outputSchema?: json_schema.JSONSchema7 | undefined;
1640
+ }[] | undefined;
1641
+ streams?: {
1642
+ id: string;
1643
+ name: string;
1644
+ label: string;
1645
+ workflowName: string;
1646
+ version: string;
1647
+ versions: Record<string, {
1648
+ schema: json_schema.JSONSchema7;
1649
+ prepareCode: string;
1650
+ conditionCode?: string | undefined;
1651
+ }>;
1652
+ description?: string | undefined;
1653
+ enabled?: boolean | undefined;
1654
+ }[] | undefined;
1655
+ views?: {
1656
+ id: string;
1657
+ name: string;
1658
+ label: string;
1659
+ streams: string[];
1660
+ schema: json_schema.JSONSchema7;
1661
+ columnsCode: string;
1662
+ description?: string | undefined;
1663
+ enabled?: boolean | undefined;
1664
+ computed?: {
1665
+ name: string;
1666
+ workflowName: string;
1667
+ inputCode: string;
1668
+ outputCode?: string | undefined;
1669
+ }[] | undefined;
1670
+ }[] | undefined;
1671
+ apps?: {
1672
+ id: string;
1673
+ name: string;
1674
+ label: string;
1675
+ pages: {
1676
+ name: string;
1677
+ label?: string | undefined;
1678
+ icon?: string | undefined;
1679
+ viewport?: "full" | undefined;
1680
+ openui?: string | undefined;
1681
+ channel?: string | undefined;
1682
+ agent?: string | undefined;
1683
+ threads?: string[] | undefined;
1684
+ reviews?: string[] | undefined;
1685
+ }[];
1686
+ description?: string | undefined;
1687
+ icon?: string | undefined;
1688
+ brand?: {
1689
+ accent?: string | undefined;
1690
+ logo?: string | undefined;
1691
+ theme?: "swirls-light" | "swirls-dark" | "github-light" | "github-dark" | "catppuccin-latte" | "catppuccin-macchiato" | "tokyo-night" | "nord" | "gruvbox-light" | "gruvbox-dark" | "rose-pine" | "dracula" | undefined;
1692
+ tokens?: {
1693
+ light?: {
1694
+ active?: string | undefined;
1695
+ success?: string | undefined;
1696
+ surface?: string | undefined;
1697
+ canvas?: string | undefined;
1698
+ text?: string | undefined;
1699
+ text_muted?: string | undefined;
1700
+ text_dim?: string | undefined;
1701
+ viewport?: string | undefined;
1702
+ raised?: string | undefined;
1703
+ field?: string | undefined;
1704
+ border?: string | undefined;
1705
+ brand?: string | undefined;
1706
+ brand_foreground?: string | undefined;
1707
+ brand_soft?: string | undefined;
1708
+ warning?: string | undefined;
1709
+ info?: string | undefined;
1710
+ danger?: string | undefined;
1711
+ radius?: string | undefined;
1712
+ } | undefined;
1713
+ dark?: {
1714
+ active?: string | undefined;
1715
+ success?: string | undefined;
1716
+ surface?: string | undefined;
1717
+ canvas?: string | undefined;
1718
+ text?: string | undefined;
1719
+ text_muted?: string | undefined;
1720
+ text_dim?: string | undefined;
1721
+ viewport?: string | undefined;
1722
+ raised?: string | undefined;
1723
+ field?: string | undefined;
1724
+ border?: string | undefined;
1725
+ brand?: string | undefined;
1726
+ brand_foreground?: string | undefined;
1727
+ brand_soft?: string | undefined;
1728
+ warning?: string | undefined;
1729
+ info?: string | undefined;
1730
+ danger?: string | undefined;
1731
+ radius?: string | undefined;
1732
+ } | undefined;
1733
+ } | undefined;
1734
+ avatar?: {
1735
+ variant?: "beam" | "marble" | "bauhaus" | "pixel" | "sunset" | "ring" | undefined;
1736
+ colors?: string[] | undefined;
1737
+ shape?: "square" | "circle" | undefined;
1738
+ } | undefined;
1739
+ } | undefined;
1740
+ landing?: {
1741
+ layout?: "split" | "centered" | "cover" | undefined;
1742
+ image?: string | undefined;
1743
+ title?: string | undefined;
1744
+ subtitle?: string | undefined;
1745
+ signInTitle?: string | undefined;
1746
+ signInHint?: string | undefined;
1747
+ footer?: string | undefined;
1748
+ discover?: {
1749
+ index?: boolean | undefined;
1750
+ metaTitle?: string | undefined;
1751
+ metaDescription?: string | undefined;
1752
+ keywords?: string[] | undefined;
1753
+ ogImage?: string | undefined;
1754
+ canonical?: string | undefined;
1755
+ locale?: string | undefined;
1756
+ summary?: string | undefined;
1757
+ audience?: string | undefined;
1758
+ capabilities?: string[] | undefined;
1759
+ faq?: {
1760
+ question: string;
1761
+ answer: string;
1762
+ }[] | undefined;
1763
+ organization?: string | undefined;
1764
+ organizationUrl?: string | undefined;
1765
+ applicationCategory?: string | undefined;
1766
+ } | undefined;
1767
+ } | undefined;
1768
+ audience?: {
1769
+ admission: "invite" | "domain" | "invite_or_domain" | "public";
1770
+ auth?: "email_otp" | "oidc" | undefined;
1771
+ idp?: string | undefined;
1772
+ allowDomains?: string[] | undefined;
1773
+ denyDomains?: string[] | undefined;
1774
+ } | undefined;
1775
+ shell?: {
1776
+ preset?: "canvas" | "sidebar" | "topnav" | "chat" | undefined;
1777
+ regions?: {
1778
+ name: "topbar" | "leftbar" | "rightbar";
1779
+ props: Record<string, string | boolean | string[]>;
1780
+ }[] | undefined;
1781
+ } | undefined;
1782
+ nav?: {
1783
+ sections: {
1784
+ title: string;
1785
+ entries: {
1786
+ pageName: string;
1787
+ label?: string | undefined;
1788
+ }[];
1789
+ }[];
1790
+ } | undefined;
1791
+ }[] | undefined;
1792
+ roles?: {
1793
+ name: string;
1794
+ match: {
1795
+ claim: string;
1796
+ op: "in" | "eq";
1797
+ values: string[];
1798
+ }[];
1799
+ description?: string | undefined;
1800
+ }[] | undefined;
1801
+ policies?: {
1802
+ grants: ({
1803
+ effect: "allow" | "deny";
1804
+ role: string;
1805
+ agent: string;
1806
+ workflow?: undefined;
1807
+ workflows?: string[] | undefined;
1808
+ tools?: string[] | undefined;
1809
+ } | {
1810
+ effect: "allow" | "deny";
1811
+ role: string;
1812
+ workflow: string;
1813
+ agent?: undefined;
1814
+ workflows?: undefined;
1815
+ tools?: undefined;
1816
+ })[];
1817
+ files?: {
1818
+ retention: {
1819
+ mode: "forever";
1820
+ } | {
1821
+ mode: "days";
1822
+ days: number;
1823
+ };
1824
+ } | undefined;
1825
+ }[] | undefined;
1826
+ mockBlocks?: {
1827
+ [x: string]: unknown;
1828
+ id: string;
1829
+ name: string;
1830
+ }[] | undefined;
1831
+ playbookBlocks?: {
1832
+ [x: string]: unknown;
1833
+ id: string;
1834
+ name: string;
1835
+ }[] | undefined;
1836
+ }>;
1837
+
1838
+ declare const deploymentSourceFileContentSchema: z.ZodObject<{
1839
+ path: z.ZodString;
1840
+ content: z.ZodString;
1841
+ size: z.ZodNumber;
1842
+ sha256: z.ZodString;
1843
+ }, z.core.$strip>;
1844
+ declare const deploymentSourceResourceKindSchema: z.ZodEnum<{
1845
+ auth: "auth";
1846
+ app: "app";
1847
+ decision: "decision";
1848
+ workflow: "workflow";
1849
+ postgres: "postgres";
1850
+ database: "database";
1851
+ disk: "disk";
1852
+ stream: "stream";
1853
+ agent: "agent";
1854
+ network: "network";
1855
+ connection: "connection";
1856
+ action: "action";
1857
+ form: "form";
1858
+ schema: "schema";
1859
+ webhook: "webhook";
1860
+ schedule: "schedule";
1861
+ mcp: "mcp";
1862
+ channel: "channel";
1863
+ view: "view";
1864
+ trigger: "trigger";
1865
+ secret: "secret";
1866
+ migration: "migration";
1867
+ skill: "skill";
1868
+ connector: "connector";
1869
+ }>;
1870
+ declare const deploymentSourceManifestSchema: z.ZodObject<{
1871
+ version: z.ZodLiteral<1>;
1872
+ files: z.ZodArray<z.ZodObject<{
1873
+ path: z.ZodString;
1874
+ size: z.ZodNumber;
1875
+ sha256: z.ZodString;
1876
+ r2Key: z.ZodOptional<z.ZodString>;
1877
+ }, z.core.$strip>>;
1878
+ resources: z.ZodArray<z.ZodObject<{
1879
+ kind: z.ZodEnum<{
1880
+ auth: "auth";
1881
+ app: "app";
1882
+ decision: "decision";
1883
+ workflow: "workflow";
1884
+ postgres: "postgres";
1885
+ database: "database";
1886
+ disk: "disk";
1887
+ stream: "stream";
1888
+ agent: "agent";
1889
+ network: "network";
1890
+ connection: "connection";
1891
+ action: "action";
1892
+ form: "form";
1893
+ schema: "schema";
1894
+ webhook: "webhook";
1895
+ schedule: "schedule";
1896
+ mcp: "mcp";
1897
+ channel: "channel";
1898
+ view: "view";
1899
+ trigger: "trigger";
1900
+ secret: "secret";
1901
+ migration: "migration";
1902
+ skill: "skill";
1903
+ connector: "connector";
1904
+ }>;
1905
+ id: z.ZodUUID;
1906
+ name: z.ZodString;
1907
+ path: z.ZodString;
1908
+ range: z.ZodObject<{
1909
+ start: z.ZodObject<{
1910
+ line: z.ZodNumber;
1911
+ column: z.ZodNumber;
1912
+ offset: z.ZodNumber;
1913
+ }, z.core.$strip>;
1914
+ end: z.ZodObject<{
1915
+ line: z.ZodNumber;
1916
+ column: z.ZodNumber;
1917
+ offset: z.ZodNumber;
1918
+ }, z.core.$strip>;
1919
+ }, z.core.$strip>;
1920
+ }, z.core.$strip>>;
1921
+ nodes: z.ZodArray<z.ZodObject<{
1922
+ workflowId: z.ZodUUID;
1923
+ workflowName: z.ZodString;
1924
+ nodeId: z.ZodUUID;
1925
+ nodeName: z.ZodString;
1926
+ path: z.ZodString;
1927
+ range: z.ZodObject<{
1928
+ start: z.ZodObject<{
1929
+ line: z.ZodNumber;
1930
+ column: z.ZodNumber;
1931
+ offset: z.ZodNumber;
1932
+ }, z.core.$strip>;
1933
+ end: z.ZodObject<{
1934
+ line: z.ZodNumber;
1935
+ column: z.ZodNumber;
1936
+ offset: z.ZodNumber;
1937
+ }, z.core.$strip>;
1938
+ }, z.core.$strip>;
1939
+ }, z.core.$strip>>;
1940
+ sourceFingerprint: z.ZodString;
1941
+ }, z.core.$strip>;
1942
+ type DeploymentSourceFileContent = z.infer<typeof deploymentSourceFileContentSchema>;
1943
+ type DeploymentSourceManifest = z.infer<typeof deploymentSourceManifestSchema>;
1944
+ type DeploymentSourceResourceKind = z.infer<typeof deploymentSourceResourceKindSchema>;
1945
+
1946
+ /**
1947
+ * AST types for top-level `action name { … }` blocks.
1948
+ *
1949
+ * An action declares a typed integration operation: provider, HTTP transport,
1950
+ * and optional input/output JSON schemas. Integration nodes reference actions
1951
+ * by bare identifier.
1952
+ */
1953
+
1954
+ interface ActionDecl {
1955
+ /** Set by deploy bundle / tooling; not produced by the parser. */
1956
+ id?: string;
1957
+ name: string;
1958
+ label: string;
1959
+ description?: string;
1960
+ /** Doc comment immediately above this declaration. */
1961
+ docComment?: string;
1962
+ provider: string;
1963
+ providerRange?: SourceRange;
1964
+ method: string;
1965
+ methodRange?: SourceRange;
1966
+ path: string;
1967
+ pathRange?: SourceRange;
1968
+ encoding?: string;
1969
+ encodingRange?: SourceRange;
1970
+ scopes?: string[];
1971
+ scopesRange?: SourceRange;
1972
+ input?: JsonSchemaLiteral;
1973
+ inputBlock?: JsonBlockInfo;
1974
+ /** `input: schema_name` reference to a top-level `schema` block. */
1975
+ inputRef?: string;
1976
+ inputRefRange?: SourceRange;
1977
+ output?: JsonSchemaLiteral;
1978
+ outputBlock?: JsonBlockInfo;
1979
+ /** `output: schema_name` reference to a top-level `schema` block. */
1980
+ outputRef?: string;
1981
+ outputRefRange?: SourceRange;
1982
+ /** GraphQL query/mutation document for GraphQL-backed actions. */
1983
+ graphqlDocument?: string;
1984
+ graphqlDocumentRange?: SourceRange;
1985
+ range: SourceRange;
1986
+ }
1987
+
1988
+ /**
1989
+ * AST types for top-level `agent name { … }` blocks referenced by `type: agent` nodes.
1990
+ */
1991
+
1992
+ interface AgentSandboxDecl {
1993
+ /** CPU cores allocated to the sandbox VM. */
1994
+ cpus?: number;
1995
+ cpusRange?: SourceRange;
1996
+ /** Memory allocated to the sandbox VM in MiB. */
1997
+ memoryMiB?: number;
1998
+ memoryMiBRange?: SourceRange;
1999
+ /** Persistent disk allocated to the sandbox VM in GiB. */
2000
+ diskGiB?: number;
2001
+ diskGiBRange?: SourceRange;
2002
+ /** Minutes of SDK inactivity before the sandbox stops (`0` disables). */
2003
+ autoStopMinutes?: number;
2004
+ autoStopMinutesRange?: SourceRange;
2005
+ /** Minutes before a stopped sandbox is archived (`-1` disables when supported by Daytona). Omit to disable auto-archive in Swirls. */
2006
+ autoArchiveMinutes?: number;
2007
+ autoArchiveMinutesRange?: SourceRange;
2008
+ /** Minutes before a stopped sandbox is deleted. */
2009
+ autoDeleteMinutes?: number;
2010
+ autoDeleteMinutesRange?: SourceRange;
2011
+ /** When true, sandbox state is discarded on stop. */
2012
+ ephemeral?: boolean;
2013
+ ephemeralRange?: SourceRange;
2014
+ range: SourceRange;
2015
+ }
2016
+ interface AgentWalletDecl {
2017
+ /** USD budget per cadence window. */
2018
+ budget?: number;
2019
+ budgetRange?: SourceRange;
2020
+ /** Reset window: daily, weekly, or monthly (UTC). */
2021
+ cadence?: string;
2022
+ cadenceRange?: SourceRange;
2023
+ /** Optional per-call ceiling in USD (maps to Zero maxPay). */
2024
+ maxPerCall?: number;
2025
+ maxPerCallRange?: SourceRange;
2026
+ range: SourceRange;
2027
+ }
2028
+ /**
2029
+ * Context-engine overrides (RFC 0021). Every knob is optional and every one of
2030
+ * them overrides a managed default, so an absent block and an empty block mean
2031
+ * the same thing: let the engine decide. Declaring nothing is the expected
2032
+ * case; these exist for the deployment that has measured a reason to differ.
2033
+ */
2034
+ interface AgentContextDecl {
2035
+ /** Working-set token cap for a turn (`budget:`); default derives from the model window. */
2036
+ budget?: number;
2037
+ budgetRange?: SourceRange;
2038
+ /** Fraction of the budget, in (0, 1], at which compaction runs (`compact_at:`). */
2039
+ compactAt?: number;
2040
+ compactAtRange?: SourceRange;
2041
+ /** Turns kept verbatim on the far side of a compaction checkpoint (`keep_recent_turns:`). */
2042
+ keepRecentTurns?: number;
2043
+ keepRecentTurnsRange?: SourceRange;
2044
+ /** Tool results older than this many tool uses are pruned to pointers (`prune_tool_results_after:`). */
2045
+ pruneToolResultsAfter?: number;
2046
+ pruneToolResultsAfterRange?: SourceRange;
2047
+ /** Prompt-cache retention tier: `none`, `short`, or `long` (`cache_retention:`). */
2048
+ cacheRetention?: string;
2049
+ cacheRetentionRange?: SourceRange;
2050
+ range: SourceRange;
2051
+ }
2052
+ interface AgentSuggestionDecl {
2053
+ label: string;
2054
+ labelRange?: SourceRange;
2055
+ message: string;
2056
+ messageRange?: SourceRange;
2057
+ range: SourceRange;
2058
+ }
2059
+ interface AgentProfileDecl {
2060
+ name: string;
2061
+ description?: string;
2062
+ descriptionRange?: SourceRange;
2063
+ /** Inlined `@ts { … }` body for optional profile system prompt override. */
2064
+ systemCode?: string;
2065
+ systemCodeRange?: SourceRange;
2066
+ /** Graph names the model may call when using this profile (subset of agent tools). */
2067
+ tools?: string[];
2068
+ toolsRanges?: SourceRange[];
2069
+ /** Skill block names available when using this profile (subset of agent skills). */
2070
+ skills?: string[];
2071
+ skillsRanges?: SourceRange[];
2072
+ /** MCP block names available when using this profile (subset of agent mcp). */
2073
+ mcp?: string[];
2074
+ mcpRanges?: SourceRange[];
2075
+ sandbox?: AgentSandboxDecl;
2076
+ /**
2077
+ * Parsed only so validation can reject it. Profiles cannot name a computer;
2078
+ * the agent's `computer:` applies to every profile. Empty string means the
2079
+ * key was present without a usable name.
2080
+ */
2081
+ computer?: string;
2082
+ computerRange?: SourceRange;
2083
+ docComment?: string;
2084
+ range: SourceRange;
2085
+ }
2086
+ interface AgentDecl {
2087
+ name: string;
2088
+ label?: string;
2089
+ description?: string;
2090
+ /**
2091
+ * Model vendor. Omitted `provider:` is `openrouter`
2092
+ * (`DEFAULT_AGENT_PROVIDER`). `providerRange` is set only when the field is
2093
+ * written with a non-blank value.
2094
+ */
2095
+ provider: string;
2096
+ providerRange?: SourceRange;
2097
+ model: string;
2098
+ modelRange: SourceRange;
2099
+ /** Reference to a top-level `secret` block name. */
2100
+ secretsRef?: string;
2101
+ secretsRefRange?: SourceRange;
2102
+ /** Default system prompt as inlined `@ts { … }`. */
2103
+ systemCode?: string;
2104
+ systemCodeRange?: SourceRange;
2105
+ temperature?: number;
2106
+ temperatureRange?: SourceRange;
2107
+ maxTokens?: number;
2108
+ maxTokensRange?: SourceRange;
2109
+ maxSteps?: number;
2110
+ maxStepsRange?: SourceRange;
2111
+ /** Graph names exposed as LLM-callable tools. */
2112
+ tools?: string[];
2113
+ toolsRanges?: SourceRange[];
2114
+ /** Top-level skill block names for knowledge skills. */
2115
+ skills?: string[];
2116
+ skillsRanges?: SourceRange[];
2117
+ /** Top-level MCP block names exposed to this agent as tool servers. */
2118
+ mcp?: string[];
2119
+ mcpRanges?: SourceRange[];
2120
+ /** Other agent block names this agent may delegate to as subagents. */
2121
+ team?: string[];
2122
+ teamRanges?: SourceRange[];
2123
+ /** Top-level shared `disk` block names mounted into this agent's sandbox. */
2124
+ disks?: string[];
2125
+ disksRanges?: SourceRange[];
2126
+ /** Source range of the `disks:` list, including an empty `[]`. */
2127
+ disksRange?: SourceRange;
2128
+ /** Optional sandbox resource and lifecycle overrides. Cannot be combined with `computer:`. */
2129
+ sandbox?: AgentSandboxDecl;
2130
+ /**
2131
+ * Bare name of one top-level `computer` block whose guest runs this agent's
2132
+ * workspace tools. Empty string means the key was present without a usable
2133
+ * name. Cannot be combined with `sandbox:` or `disks:`.
2134
+ */
2135
+ computer?: string;
2136
+ /** Source range of the computer name (diagnostics and go-to-definition). */
2137
+ computerRange?: SourceRange;
2138
+ /** Optional Zero tool-spend budget (enables zero_search / zero_fetch tools). */
2139
+ wallet?: AgentWalletDecl;
2140
+ /** Optional context-engine overrides (budgets, compaction, pruning, cache retention). */
2141
+ context?: AgentContextDecl;
2142
+ /** Optional starter prompts shown in Cloud agent chat zero state. */
2143
+ suggestions?: AgentSuggestionDecl[];
2144
+ profiles: AgentProfileDecl[];
2145
+ docComment?: string;
2146
+ range: SourceRange;
2147
+ }
2148
+
2149
+ /**
2150
+ * Sparse `app … { brand { tokens { light { } dark { } } } }` overlay keys.
2151
+ *
2152
+ * Authors name Swirls roles (canvas, brand, …), not raw shadcn variables. The
2153
+ * mapper expands each key into the CSS custom properties `@swirls/ui` reads.
2154
+ * Lives in `@swirls/definition` so the DSL validator, deployment definition, and
2155
+ * Surface runtime share one list — `@swirls/language` already depends here.
2156
+ */
2157
+
2158
+ declare const APP_BRAND_TOKEN_KEYS: readonly ["canvas", "text", "text_muted", "text_dim", "surface", "viewport", "raised", "active", "field", "border", "brand", "brand_foreground", "brand_soft", "warning", "success", "info", "danger", "radius"];
2159
+ type AppBrandTokenKey = (typeof APP_BRAND_TOKEN_KEYS)[number];
2160
+
2161
+ /**
2162
+ * AST types for top-level `app name { … }` blocks (RFC 0022).
2163
+ *
2164
+ * An `app` declares a bespoke consumption surface: shell layout (presets +
2165
+ * optional region overrides), navigation, and pages that bind to views,
2166
+ * workflows, Surface `platform: swirls` channels, or authoring-time `@openui` layouts.
2167
+ * The union of everything reachable from pages is the authority boundary.
2168
+ */
2169
+
2170
+ /**
2171
+ * Top-level / nested fields reserved for later phases. Parsed for forward
2172
+ * compat so files written against later RFCs fail with one pointed diagnostic.
2173
+ */
2174
+ type AppReservedFieldName = 'domain' | 'slot' | 'split' | 'table';
2175
+ /** External audience admission policy declared in the DSL (RFC 0016). */
2176
+ interface AppAudience {
2177
+ admission: string;
2178
+ admissionRange?: SourceRange;
2179
+ auth?: string;
2180
+ authRange?: SourceRange;
2181
+ idp?: string;
2182
+ idpRange?: SourceRange;
2183
+ allowDomains?: string[];
2184
+ allowDomainsRange?: SourceRange;
2185
+ denyDomains?: string[];
2186
+ denyDomainsRange?: SourceRange;
2187
+ range: SourceRange;
2188
+ }
2189
+ /** `brand { avatar { variant, colors, shape } }` — boring-avatars config for Surface. */
2190
+ interface AppBrandAvatar {
2191
+ variant?: string;
2192
+ variantRange?: SourceRange;
2193
+ colors?: string[];
2194
+ colorsRange?: SourceRange;
2195
+ shape?: string;
2196
+ shapeRange?: SourceRange;
2197
+ range: SourceRange;
2198
+ }
2199
+ /** `brand { accent, logo, theme, tokens, avatar }` — tokens overlay Surface design tokens. */
2200
+ interface AppBrand {
2201
+ accent?: string;
2202
+ accentRange?: SourceRange;
2203
+ logo?: string;
2204
+ logoRange?: SourceRange;
2205
+ theme?: string;
2206
+ themeRange?: SourceRange;
2207
+ tokens?: AppBrandTokens;
2208
+ avatar?: AppBrandAvatar;
2209
+ range: SourceRange;
2210
+ }
2211
+ interface AppBrandTokenEntry {
2212
+ value: string;
2213
+ range: SourceRange;
2214
+ }
2215
+ type AppBrandTokenMap = Partial<Record<AppBrandTokenKey, AppBrandTokenEntry>>;
2216
+ interface AppBrandTokens {
2217
+ light?: AppBrandTokenMap;
2218
+ dark?: AppBrandTokenMap;
2219
+ range: SourceRange;
2220
+ }
2221
+ /** One FAQ pair inside `landing.discover.faq`. */
2222
+ interface AppLandingFaqItem {
2223
+ question: string;
2224
+ questionRange?: SourceRange;
2225
+ answer: string;
2226
+ answerRange?: SourceRange;
2227
+ range: SourceRange;
2228
+ }
2229
+ /** `faq { item { question, answer } }` inside `landing.discover`. */
2230
+ interface AppLandingFaq {
2231
+ items: AppLandingFaqItem[];
2232
+ range: SourceRange;
2233
+ }
2234
+ /** `discover { index, meta_title, … }` — SEO/AEO/GEO metadata for app landings. */
2235
+ interface AppLandingDiscover {
2236
+ index?: boolean;
2237
+ indexRange?: SourceRange;
2238
+ metaTitle?: string;
2239
+ metaTitleRange?: SourceRange;
2240
+ metaDescription?: string;
2241
+ metaDescriptionRange?: SourceRange;
2242
+ keywords?: string[];
2243
+ keywordsRange?: SourceRange;
2244
+ ogImage?: string;
2245
+ ogImageRange?: SourceRange;
2246
+ canonical?: string;
2247
+ canonicalRange?: SourceRange;
2248
+ locale?: string;
2249
+ localeRange?: SourceRange;
2250
+ summary?: string;
2251
+ summaryRange?: SourceRange;
2252
+ audience?: string;
2253
+ audienceRange?: SourceRange;
2254
+ capabilities?: string[];
2255
+ capabilitiesRange?: SourceRange;
2256
+ faq?: AppLandingFaq;
2257
+ organization?: string;
2258
+ organizationRange?: SourceRange;
2259
+ organizationUrl?: string;
2260
+ organizationUrlRange?: SourceRange;
2261
+ applicationCategory?: string;
2262
+ applicationCategoryRange?: SourceRange;
2263
+ range: SourceRange;
2264
+ }
2265
+ /** `landing { layout, image, title, … }` — branded sign-in when opening a specific app. */
2266
+ interface AppLanding {
2267
+ layout?: string;
2268
+ layoutRange?: SourceRange;
2269
+ image?: string;
2270
+ imageRange?: SourceRange;
2271
+ title?: string;
2272
+ titleRange?: SourceRange;
2273
+ subtitle?: string;
2274
+ subtitleRange?: SourceRange;
2275
+ signInTitle?: string;
2276
+ signInTitleRange?: SourceRange;
2277
+ signInHint?: string;
2278
+ signInHintRange?: SourceRange;
2279
+ footer?: string;
2280
+ footerRange?: SourceRange;
2281
+ discover?: AppLandingDiscover;
2282
+ range: SourceRange;
2283
+ }
2284
+ /** One shell region override (`topbar`, `leftbar`, `rightbar`). */
2285
+ interface AppShellRegion {
2286
+ name: 'topbar' | 'leftbar' | 'rightbar';
2287
+ /** Raw property bag for Phase 0 (height, width, defaultState, etc.). */
2288
+ props: Record<string, string | boolean | string[]>;
2289
+ range: SourceRange;
2290
+ }
2291
+ /** `shell { preset: …; topbar { … } }` */
2292
+ interface AppShell {
2293
+ preset?: string;
2294
+ presetRange?: SourceRange;
2295
+ regions: AppShellRegion[];
2296
+ range: SourceRange;
2297
+ }
2298
+ /** `page: name` or `page: name { label: "…" }` inside `nav { section … }`. */
2299
+ interface AppNavEntry {
2300
+ pageName: string;
2301
+ pageNameRange: SourceRange;
2302
+ label?: string;
2303
+ labelRange?: SourceRange;
2304
+ range: SourceRange;
2305
+ }
2306
+ /** `section "Title" { page: … }` inside `nav`. */
2307
+ interface AppNavSection {
2308
+ title: string;
2309
+ titleRange: SourceRange;
2310
+ entries: AppNavEntry[];
2311
+ range: SourceRange;
2312
+ }
2313
+ /** `nav { section … }` */
2314
+ interface AppNav {
2315
+ sections: AppNavSection[];
2316
+ range: SourceRange;
2317
+ }
2318
+ /** Authoring-time OpenUI Lang island on a page. */
2319
+ interface AppOpenUiBlock {
2320
+ content: string;
2321
+ contentRange: SourceRange;
2322
+ range: SourceRange;
2323
+ }
2324
+ /**
2325
+ * Page body: exactly one of `render: @openui { … }`,
2326
+ * `channel: <channel>`, `threads: [channel, …]`, or `reviews: [workflow, …]`.
2327
+ */
2328
+ interface AppPage {
2329
+ name: string;
2330
+ nameRange: SourceRange;
2331
+ label?: string;
2332
+ labelRange?: SourceRange;
2333
+ /** Optional curated icon name used by app navigation. */
2334
+ icon?: string;
2335
+ iconRange?: SourceRange;
2336
+ /** `full` removes page chrome and gives OpenUI the whole main viewport. */
2337
+ viewport?: string;
2338
+ viewportRange?: SourceRange;
2339
+ /** Portal channel name for a full-viewport room chat page. */
2340
+ channel?: string;
2341
+ channelRange?: SourceRange;
2342
+ /** Portal channels surfaced on an app-wide thread center page. */
2343
+ threads?: string[];
2344
+ threadsRanges?: SourceRange[];
2345
+ /** Workflows whose pending reviews are shown on this page. */
2346
+ reviews?: string[];
2347
+ reviewsRanges?: SourceRange[];
2348
+ render?: AppOpenUiBlock;
2349
+ range: SourceRange;
2350
+ }
2351
+ interface AppReservedField {
2352
+ name: AppReservedFieldName;
2353
+ range: SourceRange;
2354
+ }
2355
+ /** Top-level `app name { … }` block. */
2356
+ interface AppDecl {
2357
+ id?: string;
2358
+ name: string;
2359
+ label?: string;
2360
+ description?: string;
2361
+ icon?: string;
2362
+ docComment?: string;
2363
+ brand?: AppBrand;
2364
+ audience?: AppAudience;
2365
+ landing?: AppLanding;
2366
+ shell?: AppShell;
2367
+ nav?: AppNav;
2368
+ pages: AppPage[];
2369
+ reserved: AppReservedField[];
2370
+ range: SourceRange;
2371
+ }
2372
+
2373
+ /** How inbound events are routed to the bound agent. */
2374
+ type ChannelMode = 'mention' | 'dm' | 'all' | 'ambient';
2375
+ interface ChannelDecl {
2376
+ id?: string;
2377
+ name: string;
2378
+ label: string;
2379
+ description?: string;
2380
+ docComment?: string;
2381
+ platform: ChannelPlatform;
2382
+ platformRange?: SourceRange;
2383
+ agent?: string;
2384
+ agentRange?: SourceRange;
2385
+ /** Workflows published as individual tools, only on MCP channels. */
2386
+ workflows?: string[];
2387
+ workflowsRange?: SourceRange;
2388
+ workflowsRanges?: SourceRange[];
2389
+ enabled?: boolean;
2390
+ /**
2391
+ * Name of a top-level `connection` block supplying the OAuth credential for
2392
+ * this channel. When set, the connection's provider must match `platform`.
2393
+ * Preferred over the implicit platform→credential mapping; lets a project
2394
+ * bind multiple connections of the same provider.
2395
+ */
2396
+ connection?: string;
2397
+ connectionRange?: SourceRange;
2398
+ /**
2399
+ * Name of a top-level `connector` block (the Swirls-managed inbound OAuth
2400
+ * application) fronting this channel. Required when `platform` is `mcp`,
2401
+ * forbidden otherwise. Inbound counterpart to `connection`.
2402
+ */
2403
+ connector?: string;
2404
+ connectorRange?: SourceRange;
2405
+ /**
2406
+ * When the bound agent takes a turn. Defaults to `mention`. `dm` is a routing
2407
+ * mode on third-party platforms and is rejected for Surface rooms
2408
+ * (`platform: swirls`), where direct messages are a surface of the shell
2409
+ * rather than a declared channel. `ambient` hands
2410
+ * the decision to the context engine's gate and ships for Surface rooms first.
2411
+ */
2412
+ mode: ChannelMode;
2413
+ modeRange?: SourceRange;
2414
+ /** How long a thread engagement survives without being addressed (`engagement_timeout:`). */
2415
+ engagementTimeout?: string;
2416
+ engagementTimeoutRange?: SourceRange;
2417
+ /** Minimum quiet period between the agent's posts in this channel (`cooldown:`). */
2418
+ cooldown?: string;
2419
+ cooldownRange?: SourceRange;
2420
+ /** Ceiling on posts the agent makes without being addressed; `0` silences them entirely. */
2421
+ maxUnpromptedPerHour?: number;
2422
+ maxUnpromptedPerHourRange?: SourceRange;
2423
+ range: SourceRange;
2424
+ }
2425
+
2426
+ /**
2427
+ * AST types for top-level `computer name { }` blocks bound by `type: shell` nodes.
2428
+ * Runtime nouns (Flox, Daytona, snapshot) are not authored in the DSL.
2429
+ */
2430
+
2431
+ interface ComputerSoftwarePin {
2432
+ packageName: string;
2433
+ /** Quoted catalog pin. Empty string is a validator error. */
2434
+ pin: string;
2435
+ range: SourceRange;
2436
+ }
2437
+ interface ComputerResourcesDecl {
2438
+ cpus?: number;
2439
+ cpusRange?: SourceRange;
2440
+ memoryMiB?: number;
2441
+ memoryMiBRange?: SourceRange;
2442
+ diskGiB?: number;
2443
+ diskGiBRange?: SourceRange;
2444
+ range: SourceRange;
2445
+ }
2446
+ /** `harness: { type: coding, provider: codex }`. At most one per computer. */
2447
+ interface ComputerHarnessDecl {
2448
+ /** Any bare name; the host's harness catalog decides which are valid. */
2449
+ type: string;
2450
+ typeRange: SourceRange;
2451
+ provider: string;
2452
+ providerRange: SourceRange;
2453
+ /** From the `harness` key through the closing brace. */
2454
+ range: SourceRange;
2455
+ }
2456
+ interface ComputerDecl {
2457
+ name: string;
2458
+ label?: string;
2459
+ description?: string;
2460
+ software?: ComputerSoftwarePin[];
2461
+ disks?: string[];
2462
+ disksRanges?: SourceRange[];
2463
+ resources?: ComputerResourcesDecl;
2464
+ harness?: ComputerHarnessDecl;
2465
+ docComment?: string;
2466
+ range: SourceRange;
2467
+ }
2468
+
2469
+ /**
2470
+ * AST types for top-level `connection name { … }` blocks.
2471
+ *
2472
+ * A connection is a named, project-scoped credential slot for outbound API
2473
+ * calls. Two modes:
2474
+ *
2475
+ * - **Managed** — `provider` is in the Swirls integration catalog. A human
2476
+ * authorizes the grant in the project's Connections UI; Swirls brokers a
2477
+ * short-lived token at execution time. No credentials live in the file.
2478
+ * - **Self-managed** — `base_url:` and `auth:` are set together. Credentials
2479
+ * come from the referenced auth block (and its secret block) in the project
2480
+ * vault; the runtime calls `base_url` + action path with the resolved
2481
+ * profile. No Fabric binding or catalog entry is required.
2482
+ *
2483
+ * Nodes, channels, and agents reference a connection by name via a
2484
+ * `connection:` field. Actions stay credential-free and match the connection
2485
+ * by `provider`.
2486
+ */
2487
+
2488
+ interface ConnectionDecl {
2489
+ /** Set by deploy bundle / tooling; not produced by the parser. */
2490
+ id?: string;
2491
+ name: string;
2492
+ label: string;
2493
+ description?: string;
2494
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
2495
+ docComment?: string;
2496
+ provider: string;
2497
+ providerRange?: SourceRange;
2498
+ /**
2499
+ * Self-managed mode: absolute API origin (e.g. `https://api.example.com`).
2500
+ * Must be set together with `authRef`.
2501
+ */
2502
+ baseUrl?: string;
2503
+ baseUrlRange?: SourceRange;
2504
+ /**
2505
+ * Self-managed mode: bare identifier naming a top-level `auth` block.
2506
+ * Must be set together with `baseUrl`.
2507
+ */
2508
+ authRef?: string;
2509
+ authRefRange?: SourceRange;
2510
+ /** Optional private connectivity realm used to dial this self-managed origin. */
2511
+ networkRef?: string;
2512
+ networkRefRange?: SourceRange;
2513
+ range: SourceRange;
2514
+ }
2515
+
2516
+ /**
2517
+ * AST types for top-level `connector name { … }` blocks referenced by
2518
+ * `channel.connector:`.
2519
+ *
2520
+ * A `connector` block is a named, project-scoped inbound OAuth application slot:
2521
+ * the Swirls-managed OAuth application external MCP clients (ChatGPT, Claude
2522
+ * Desktop, Claude Code) authenticate against. The DSL declares the slot by
2523
+ * handle and carries only display metadata (label, description); the OAuth
2524
+ * application and per-end-client credentials are provisioned in Cloud later. No
2525
+ * secrets live in the file.
2526
+ *
2527
+ * This is the inbound counterpart to `connection`, which is outbound OAuth to a
2528
+ * third party. `platform: mcp` channels reference a connector by name via a
2529
+ * `connector:` field.
2530
+ */
2531
+
2532
+ interface ConnectorDecl {
2533
+ /** Set by deploy bundle / tooling; not produced by the parser. */
2534
+ id?: string;
2535
+ name: string;
2536
+ /** Optional human-facing label; the MCP server's advertised identity. */
2537
+ label?: string;
2538
+ labelRange?: SourceRange;
2539
+ /** Optional description of the connector application. */
2540
+ description?: string;
2541
+ descriptionRange?: SourceRange;
2542
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
2543
+ docComment?: string;
2544
+ range: SourceRange;
2545
+ }
2546
+
2547
+ /**
2548
+ * AST types for `database` and `migration` blocks and the `@prisma` island.
2549
+ * Re-exported from the main ast.ts module.
2550
+ */
2551
+
2552
+ /**
2553
+ * Info for the `@prisma { ... }` island (for LSP forwarding into the Prisma
2554
+ * schema language). Mirrors {@link import('../ast').JsonBlockInfo} but keeps the
2555
+ * Prisma content and its inner range so tooling can hand the exact text to
2556
+ * Prisma's own toolchain without re-lexing.
2557
+ */
2558
+ interface PrismaBlockInfo {
2559
+ content: string;
2560
+ contentRange: SourceRange;
2561
+ }
2562
+ /**
2563
+ * Nested `connection <name> { … }` inside a `database` block. Declares a named
2564
+ * connection string Swirls provisions for direct application access.
2565
+ */
2566
+ interface DatabaseConnectionDecl {
2567
+ name: string;
2568
+ /** Optional human-readable label. */
2569
+ label?: string;
2570
+ /** Optional description. */
2571
+ description?: string;
2572
+ docComment?: string;
2573
+ range: SourceRange;
2574
+ }
2575
+ /**
2576
+ * Top-level `database` block: a Swirls-managed Postgres whose schema is declared
2577
+ * in the Prisma schema language inside an `@prisma` island. Distinct from the
2578
+ * `postgres` block, which is a bring-your-own database the customer operates.
2579
+ */
2580
+ interface DatabaseDecl {
2581
+ /** Set by deploy bundle / tooling; not produced by the parser. */
2582
+ id?: string;
2583
+ name: string;
2584
+ /** Optional human-readable label. */
2585
+ label?: string;
2586
+ description?: string;
2587
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
2588
+ docComment?: string;
2589
+ /** Raw Prisma schema text from the `schema: @prisma { ... }` island. */
2590
+ schemaSource: string;
2591
+ /** Set when the schema was defined via an `@prisma { }` block (for LSP). */
2592
+ schemaBlock?: PrismaBlockInfo;
2593
+ /** Nested named connections declared inside this database block. */
2594
+ connections: DatabaseConnectionDecl[];
2595
+ range: SourceRange;
2596
+ }
2597
+ /**
2598
+ * Top-level `migration` block: a data transform a schema diff cannot express,
2599
+ * run in `order` against a declared `database` via typed Prisma query-builder
2600
+ * code in the `operation` @ts island.
2601
+ */
2602
+ interface MigrationDecl {
2603
+ /** Set by deploy bundle / tooling; not produced by the parser. */
2604
+ id?: string;
2605
+ name: string;
2606
+ /** Name of the `database` block this migration targets. */
2607
+ database: string;
2608
+ /** Range of the database name after `database:` (for LSP navigation). */
2609
+ databaseRange: SourceRange;
2610
+ /** Run order within the target database (non-negative integer, unique per database). */
2611
+ order: number;
2612
+ /** @ts island holding the typed Prisma data-migration body (validated after parse). */
2613
+ operation?: ConfigValue;
2614
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
2615
+ docComment?: string;
2616
+ range: SourceRange;
2617
+ }
2618
+
2619
+ /**
2620
+ * AST types for top-level `disk name { }` blocks referenced by `type: disk` nodes.
2621
+ * Archil disk IDs are provisioned by the platform at deploy time — not authored in DSL.
2622
+ */
2623
+
2624
+ interface DiskDecl {
2625
+ name: string;
2626
+ label?: string;
2627
+ region?: string;
2628
+ regionRange?: SourceRange;
2629
+ docComment?: string;
2630
+ range: SourceRange;
2631
+ }
2632
+
2633
+ /**
2634
+ * AST types for top-level `mcp name { … }` blocks referenced by `agent.mcp:`.
2635
+ *
2636
+ * An `mcp` block is a named, project-scoped MCP server slot. The DSL declares
2637
+ * the slot handle, display metadata, remote server URL, and how credentials are
2638
+ * obtained (`auth: static` | `auth: interactive`). Secrets never live in git.
2639
+ */
2640
+
2641
+ /** How Cloud obtains credentials for this MCP slot. */
2642
+ type McpAuthMode = 'static' | 'interactive';
2643
+ interface McpDecl {
2644
+ /** Set by deploy bundle / tooling; not produced by the parser. */
2645
+ id?: string;
2646
+ name: string;
2647
+ /** Optional human-facing label. */
2648
+ label?: string;
2649
+ labelRange?: SourceRange;
2650
+ /** Optional description of what the server exposes. */
2651
+ description?: string;
2652
+ descriptionRange?: SourceRange;
2653
+ /** Required remote MCP server URL (https). */
2654
+ url: string;
2655
+ urlRange?: SourceRange;
2656
+ /**
2657
+ * Credential acquisition. Required by doctor for new authoring; may be
2658
+ * absent on legacy AST fixtures until updated.
2659
+ */
2660
+ auth?: McpAuthMode;
2661
+ authRange?: SourceRange;
2662
+ /** Optional private connectivity realm used to dial this MCP server. */
2663
+ networkRef?: string;
2664
+ networkRefRange?: SourceRange;
2665
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
2666
+ docComment?: string;
2667
+ range: SourceRange;
2668
+ }
2669
+
2670
+ /**
2671
+ * AST for top-level `mock` blocks (playbook side-effect stubs).
2672
+ */
2673
+
2674
+ type MockMode = 'all' | 'off' | 'selective';
2675
+ interface MockAiConfig {
2676
+ provider?: string;
2677
+ model?: string;
2678
+ instructions?: string;
2679
+ range?: SourceRange;
2680
+ }
2681
+ interface MockReviewConfig {
2682
+ auto: 'approve' | 'reject';
2683
+ formData?: JsonBlockInfo;
2684
+ formDataLiteral?: Record<string, unknown>;
2685
+ range: SourceRange;
2686
+ }
2687
+ /** Top-level `mock <name> { … }` — defaults or named action/node/review stub. */
2688
+ interface MockDecl {
2689
+ name: string;
2690
+ docComment?: string;
2691
+ /** Playbook-default mock policy (`mock defaults`). */
2692
+ mode?: MockMode;
2693
+ only?: string[];
2694
+ except?: string[];
2695
+ ai?: MockAiConfig;
2696
+ /** Action name this mock intercepts. */
2697
+ action?: string;
2698
+ actionRange?: SourceRange;
2699
+ /** Workflow that owns the mocked node (required with `node:`). */
2700
+ workflow?: string;
2701
+ workflowRange?: SourceRange;
2702
+ /** Node name this mock intercepts. */
2703
+ node?: string;
2704
+ nodeRange?: SourceRange;
2705
+ /** Static output (@json). */
2706
+ output?: JsonBlockInfo;
2707
+ outputLiteral?: Record<string, unknown>;
2708
+ /** LLM-generated stub; true or inline ai config. */
2709
+ generate?: boolean | MockAiConfig;
2710
+ review?: MockReviewConfig;
2711
+ range: SourceRange;
2712
+ }
2713
+
2714
+ /**
2715
+ * AST types for top-level `network name { … }` declarations.
2716
+ *
2717
+ * A network is a provider-neutral private connectivity requirement. Outbound
2718
+ * consumers reference it by name; its `expose: { }` field is the centralized
2719
+ * allowlist of addressable interfaces admitted to private ingress.
2720
+ */
2721
+
2722
+ interface NetworkNamedExposureRef {
2723
+ name: string;
2724
+ range: SourceRange;
2725
+ }
2726
+ interface NetworkDatabaseExposureDecl {
2727
+ database: string;
2728
+ databaseRange?: SourceRange;
2729
+ connections: NetworkNamedExposureRef[];
2730
+ range: SourceRange;
2731
+ }
2732
+ interface NetworkExposeDecl {
2733
+ apps: NetworkNamedExposureRef[];
2734
+ channels: NetworkNamedExposureRef[];
2735
+ forms: NetworkNamedExposureRef[];
2736
+ webhooks: NetworkNamedExposureRef[];
2737
+ /**
2738
+ * Reserved for the service primitive. The parser preserves the intended
2739
+ * shape, while validation fails closed until that primitive is available.
2740
+ */
2741
+ services: NetworkNamedExposureRef[];
2742
+ databases: NetworkDatabaseExposureDecl[];
2743
+ range: SourceRange;
2744
+ }
2745
+ interface NetworkDecl {
2746
+ /** Set by deploy bundle / tooling; not produced by the parser. */
2747
+ id?: string;
2748
+ name: string;
2749
+ label?: string;
2750
+ labelRange?: SourceRange;
2751
+ description?: string;
2752
+ descriptionRange?: SourceRange;
2753
+ expose?: NetworkExposeDecl;
2754
+ /** Doc comment immediately above this declaration; shown on hover. */
2755
+ docComment?: string;
2756
+ range: SourceRange;
2757
+ }
2758
+
2759
+ /**
2760
+ * Lexer for the .swirls DSL. Produces tokens with source positions for parser and LSP.
2761
+ */
2762
+
2763
+ /** The fenced languages that hold a device script: PowerShell and sh. */
2764
+ type ScriptBlockLang = 'ps' | 'sh';
2765
+
2766
+ /**
2767
+ * AST types for top-level `operation name { }` blocks, which `type: device`
2768
+ * nodes run on enrolled devices. Devices themselves are never declared in
2769
+ * source: a machine is enrolled through the API, and a node names it at run
2770
+ * time by id or by selector.
2771
+ */
2772
+
2773
+ /**
2774
+ * The script an operation runs: an inline `@ps { }` or `@sh { }` block, or a
2775
+ * `@ps "file.ps1"` or `@sh "file.sh"` reference that is read at deploy.
2776
+ */
2777
+ interface OperationCommandDecl {
2778
+ lang: ScriptBlockLang;
2779
+ /** The script text. Absent for a file reference that has not been read. */
2780
+ script?: string;
2781
+ /** Path of the script file, relative to the authoring `.swirls` file. */
2782
+ path?: string;
2783
+ range: SourceRange;
2784
+ }
2785
+ interface OperationDecl {
2786
+ name: string;
2787
+ nameRange: SourceRange;
2788
+ label?: string;
2789
+ description?: string;
2790
+ /** `windows`, `linux` or `macos`. When set, only those devices run it. */
2791
+ platform?: string;
2792
+ platformRange?: SourceRange;
2793
+ /** `system` or `signed_in_user`. Defaults to `system`. */
2794
+ runAs?: string;
2795
+ runAsRange?: SourceRange;
2796
+ /** Seconds the script may run before the daemon stops it. */
2797
+ timeout?: number;
2798
+ timeoutRange?: SourceRange;
2799
+ inputSchema?: JsonSchemaLiteral;
2800
+ outputSchema?: JsonSchemaLiteral;
2801
+ command?: OperationCommandDecl;
2802
+ docComment?: string;
2803
+ range: SourceRange;
2804
+ }
2805
+
2806
+ /**
2807
+ * AST for top-level `playbook` blocks (hosted test suites).
2808
+ */
2809
+
2810
+ type AssertionSeverity = 'soft' | 'gate';
2811
+ type ExpectStatus = 'completed' | 'failed' | 'waiting';
2812
+ type ExpectAssertion = {
2813
+ kind: 'status';
2814
+ status: ExpectStatus;
2815
+ severity?: AssertionSeverity;
2816
+ label?: string;
2817
+ range: SourceRange;
2818
+ } | {
2819
+ kind: 'duration';
2820
+ max: string;
2821
+ maxSeconds?: number;
2822
+ severity?: AssertionSeverity;
2823
+ label?: string;
2824
+ range: SourceRange;
2825
+ } | {
2826
+ kind: 'output';
2827
+ value?: JsonBlockInfo;
2828
+ literal?: Record<string, unknown>;
2829
+ severity?: AssertionSeverity;
2830
+ label?: string;
2831
+ range: SourceRange;
2832
+ } | {
2833
+ kind: 'nodeOutput';
2834
+ node: string;
2835
+ value?: JsonBlockInfo;
2836
+ literal?: Record<string, unknown>;
2837
+ severity?: AssertionSeverity;
2838
+ label?: string;
2839
+ range: SourceRange;
2840
+ } | {
2841
+ kind: 'nodeStatus';
2842
+ node: string;
2843
+ status: ExpectStatus;
2844
+ severity?: AssertionSeverity;
2845
+ label?: string;
2846
+ range: SourceRange;
2847
+ } | {
2848
+ kind: 'includes';
2849
+ value: string;
2850
+ on?: string;
2851
+ severity?: AssertionSeverity;
2852
+ label?: string;
2853
+ range: SourceRange;
2854
+ } | {
2855
+ kind: 'matches';
2856
+ value: string;
2857
+ on?: string;
2858
+ severity?: AssertionSeverity;
2859
+ label?: string;
2860
+ range: SourceRange;
2861
+ } | {
2862
+ kind: 'equals';
2863
+ value?: JsonBlockInfo;
2864
+ literal?: unknown;
2865
+ severity?: AssertionSeverity;
2866
+ label?: string;
2867
+ range: SourceRange;
2868
+ } | {
2869
+ kind: 'similar';
2870
+ to: string;
2871
+ min: number;
2872
+ severity?: AssertionSeverity;
2873
+ label?: string;
2874
+ range: SourceRange;
2875
+ } | {
2876
+ kind: 'events';
2877
+ events: string[];
2878
+ severity?: AssertionSeverity;
2879
+ label?: string;
2880
+ range: SourceRange;
2881
+ } | {
2882
+ kind: 'called';
2883
+ names: string[];
2884
+ severity?: AssertionSeverity;
2885
+ label?: string;
2886
+ range: SourceRange;
2887
+ } | {
2888
+ kind: 'notCalled';
2889
+ names: string[];
2890
+ severity?: AssertionSeverity;
2891
+ label?: string;
2892
+ range: SourceRange;
2893
+ } | {
2894
+ kind: 'order';
2895
+ names: string[];
2896
+ severity?: AssertionSeverity;
2897
+ label?: string;
2898
+ range: SourceRange;
2899
+ } | {
2900
+ kind: 'path';
2901
+ names: string[];
2902
+ severity?: AssertionSeverity;
2903
+ label?: string;
2904
+ range: SourceRange;
2905
+ } | {
2906
+ kind: 'budget';
2907
+ duration?: string;
2908
+ durationSeconds?: number;
2909
+ tokens?: number;
2910
+ cost?: number;
2911
+ severity?: AssertionSeverity;
2912
+ label?: string;
2913
+ range: SourceRange;
2914
+ };
2915
+ interface ExpectDecl {
2916
+ assertions: ExpectAssertion[];
2917
+ range: SourceRange;
2918
+ }
2919
+ interface PlaybookCaseDecl {
2920
+ name: string;
2921
+ workflow: string;
2922
+ workflowRange?: SourceRange;
2923
+ input?: JsonBlockInfo;
2924
+ inputLiteral?: Record<string, unknown>;
2925
+ dataset?: JsonBlockInfo;
2926
+ timeout?: string;
2927
+ timeoutSeconds?: number;
2928
+ tags?: string[];
2929
+ skip?: string;
2930
+ expect?: ExpectDecl;
2931
+ range: SourceRange;
2932
+ }
2933
+ interface JudgeDecl {
2934
+ rubric?: string;
2935
+ criteria?: string;
2936
+ minScore?: number;
2937
+ severity?: AssertionSeverity;
2938
+ label?: string;
2939
+ model?: string;
2940
+ /** Deterministic @ts scorer over execution outputs. */
2941
+ ts?: ConfigValue;
2942
+ range: SourceRange;
2943
+ }
2944
+ interface PlaybookEvalDecl {
2945
+ name: string;
2946
+ workflow: string;
2947
+ workflowRange?: SourceRange;
2948
+ input?: JsonBlockInfo;
2949
+ inputLiteral?: Record<string, unknown>;
2950
+ dataset?: JsonBlockInfo;
2951
+ timeout?: string;
2952
+ timeoutSeconds?: number;
2953
+ retries?: number;
2954
+ tags?: string[];
2955
+ skip?: string;
2956
+ judge?: JudgeDecl;
2957
+ expect?: ExpectDecl;
2958
+ range: SourceRange;
2959
+ }
2960
+ /** Top-level `playbook <name> { … }` suite. */
2961
+ interface PlaybookDecl {
2962
+ name: string;
2963
+ label?: string;
2964
+ description?: string;
2965
+ docComment?: string;
2966
+ /** Reference to a `mock` block name. */
2967
+ mocks?: string;
2968
+ mocksRange?: SourceRange;
2969
+ tags?: string[];
2970
+ cases: PlaybookCaseDecl[];
2971
+ evals: PlaybookEvalDecl[];
2972
+ range: SourceRange;
2973
+ }
2974
+
2975
+ /**
2976
+ * AST types for postgres blocks and type: postgres nodes.
2977
+ * Re-exported from the main ast.ts module.
2978
+ */
2979
+
2980
+ interface PostgresTableDecl {
2981
+ name: string;
2982
+ schema: JsonSchemaLiteral;
2983
+ schemaBlock?: JsonBlockInfo;
2984
+ range: SourceRange;
2985
+ }
2986
+ interface PostgresDecl {
2987
+ name: string;
2988
+ /** Reference to a top-level `secret` block name (like auth blocks). */
2989
+ secretsRef?: string;
2990
+ /** Range of the secret block identifier after `secrets:` (for LSP navigation). */
2991
+ secretsRefRange?: SourceRange;
2992
+ /** Connection credential value (secret var name or literal string). */
2993
+ connection: string;
2994
+ /** True when connection was a quoted string literal (not a secret reference). */
2995
+ connectionIsLiteral: boolean;
2996
+ connectionRange: SourceRange;
2997
+ /** Optional private connectivity realm used to dial this database. */
2998
+ networkRef?: string;
2999
+ networkRefRange?: SourceRange;
3000
+ tables: PostgresTableDecl[];
3001
+ docComment?: string;
3002
+ /** Optional human-readable label. */
3003
+ label?: string;
3004
+ range: SourceRange;
3005
+ }
3006
+
3007
+ /** Top-level `query` block: read-only SQL against a managed database. */
3008
+ interface QueryDecl {
3009
+ /** Set by deploy bundle / tooling; not produced by the parser. */
3010
+ id?: string;
3011
+ name: string;
3012
+ label: string;
3013
+ description?: string;
3014
+ docComment?: string;
3015
+ enabled?: boolean;
3016
+ /** Managed database block this query runs against. */
3017
+ database: string;
3018
+ databaseRange?: SourceRange;
3019
+ /** @sql block body executed at query time. */
3020
+ sql?: ConfigValue;
3021
+ range: SourceRange;
3022
+ }
3023
+
3024
+ /**
3025
+ * File values: schema-marked fields whose runtime representation is a JSON-safe
3026
+ * file handle (`kind: swirls.file`), never raw bytes. See
3027
+ * `wiki/features/workflows/file-values/SPEC.md`.
3028
+ */
3029
+
3030
+ /** `forever` or a day count from DSL `retention: 30d`. */
3031
+ declare const fileRetentionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3032
+ mode: z.ZodLiteral<"forever">;
3033
+ }, z.core.$strip>, z.ZodObject<{
3034
+ mode: z.ZodLiteral<"days">;
3035
+ days: z.ZodNumber;
3036
+ }, z.core.$strip>], "mode">;
3037
+ type FileRetention = z.infer<typeof fileRetentionSchema>;
3038
+
3039
+ /**
3040
+ * AST types for identity-scoped access control: top-level `role` and `policy`
3041
+ * blocks. Declaring a policy with grants opts the deployment into
3042
+ * deny-by-default enforcement; without one, access stays open within the org.
3043
+ */
3044
+
3045
+ /**
3046
+ * One condition inside a role's `match { }` block. A scalar value is an
3047
+ * equality test (`op: 'eq'`); a list value is a membership test (`op: 'in'`).
3048
+ * Values are normalized to strings to mirror how they are compared as macaroon
3049
+ * caveats at execution-token mint time.
3050
+ */
3051
+ interface ClaimCondition {
3052
+ /** Verified principal attribute key, e.g. `department` or `org_role`. */
3053
+ claim: string;
3054
+ claimRange: SourceRange;
3055
+ op: 'eq' | 'in';
3056
+ /** Single value for `eq`; the allowed set for `in`. */
3057
+ values: string[];
3058
+ valueRange: SourceRange;
3059
+ range: SourceRange;
3060
+ }
3061
+ /**
3062
+ * `role <name> { match { <claim>: <value> } }` — derives a named role from
3063
+ * verified principal attributes. The claim keys referenced across all role
3064
+ * `match` blocks are the only attributes the policy engine ever reads.
3065
+ */
3066
+ interface RoleDecl {
3067
+ name: string;
3068
+ description?: string;
3069
+ descriptionRange?: SourceRange;
3070
+ /** Conditions AND together. A role with no conditions matches no one. */
3071
+ match: ClaimCondition[];
3072
+ docComment?: string;
3073
+ range: SourceRange;
3074
+ }
3075
+ /**
3076
+ * `allow|deny <role> -> agent <name>|*` grant inside a `policy { }` block. The
3077
+ * grant attaches to a role name; the target is a declared agent block, or `*`
3078
+ * for every agent (expanded to concrete names at mint time). An omitted body
3079
+ * grants all of the agent's workflows and tools; `workflows`/`tools` narrow it.
3080
+ */
3081
+ interface PolicyGrantBase {
3082
+ effect: 'allow' | 'deny';
3083
+ effectRange: SourceRange;
3084
+ /** Name of a `role` block this grant applies to. */
3085
+ role: string;
3086
+ roleRange: SourceRange;
3087
+ agentRange: SourceRange;
3088
+ /** Subset of the agent's workflows; undefined grants all. */
3089
+ workflows?: string[];
3090
+ workflowsRanges?: SourceRange[];
3091
+ /** Further narrowing within the granted workflows; undefined grants all. */
3092
+ tools?: string[];
3093
+ toolsRanges?: SourceRange[];
3094
+ range: SourceRange;
3095
+ }
3096
+ type PolicyGrant = PolicyGrantBase & ({
3097
+ agent: string;
3098
+ workflow?: never;
3099
+ } | {
3100
+ workflow: string;
3101
+ agent?: never;
3102
+ });
3103
+ /** File retention settings inside `policy { files { … } }`. */
3104
+ interface FilePolicySettings {
3105
+ retention: FileRetention;
3106
+ retentionRange: SourceRange;
3107
+ range: SourceRange;
3108
+ }
3109
+ /** `policy { allow <role> -> agent <name> { … } }` — grants attached to roles. */
3110
+ interface PolicyDecl {
3111
+ grants: PolicyGrant[];
3112
+ /** Workspace file-value settings (`files { retention: … }`). */
3113
+ files?: FilePolicySettings;
3114
+ docComment?: string;
3115
+ range: SourceRange;
3116
+ }
3117
+
3118
+ /**
3119
+ * AST types for top-level `skill name { }` blocks referenced by `agent.skills:`.
3120
+ */
3121
+
3122
+ interface SkillDecl {
3123
+ /** Swirls block handle (`^[a-zA-Z0-9_]+$`). */
3124
+ name: string;
3125
+ /** On-disk skill slug under `.agents/skills/<skillName>/`. */
3126
+ skillName: string;
3127
+ skillNameRange: SourceRange;
3128
+ docComment?: string;
3129
+ range: SourceRange;
3130
+ }
3131
+
3132
+ /**
3133
+ * AST types for stream blocks.
3134
+ * Re-exported from the main ast.ts module.
3135
+ */
3136
+
3137
+ /** One version entry under `versions { vN { ... } }`. */
3138
+ interface StreamVersionDecl {
3139
+ /** Matches {@link STREAM_VERSION_ID_PATTERN}, e.g. `v1`. */
3140
+ key: string;
3141
+ range: SourceRange;
3142
+ schema?: JsonSchemaLiteral;
3143
+ /** Set when schema was defined via @json { } block (for LSP). */
3144
+ schemaBlock?: JsonBlockInfo;
3145
+ /** `schema: some_name` reference to a top-level `schema` block. */
3146
+ schemaRef?: string;
3147
+ schemaRefRange?: SourceRange;
3148
+ /** Optional @ts predicate: return true to persist this execution's output. */
3149
+ condition?: ConfigValue;
3150
+ /** @ts block that maps execution output into the schema shape (required; validated after parse). */
3151
+ prepare?: ConfigValue;
3152
+ }
3153
+ /** Top-level `stream` block: persisted output mapping for a graph (name matches DSL identifier). */
3154
+ interface StreamDecl {
3155
+ /** Set by deploy bundle / tooling; not produced by the parser. */
3156
+ id?: string;
3157
+ name: string;
3158
+ label: string;
3159
+ description?: string;
3160
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3161
+ docComment?: string;
3162
+ enabled?: boolean;
3163
+ /**
3164
+ * Active writer version (`v1`, `v2`, …). Rows are written using `versions[this]`.
3165
+ * Must match a key in {@link StreamDecl.versions}.
3166
+ */
3167
+ version: string;
3168
+ /** Range of the `version:` value token (for tooling). */
3169
+ versionRange?: SourceRange;
3170
+ /** Per-version schema, condition, and prepare definitions. */
3171
+ versions: StreamVersionDecl[];
3172
+ /** Name of the workflow whose output this stream captures (same file). */
3173
+ workflowName: string;
3174
+ /** Range of the workflow name in `workflow: name` (for LSP navigation). */
3175
+ workflowNameRange?: SourceRange;
3176
+ range: SourceRange;
3177
+ }
3178
+
3179
+ /**
3180
+ * AST types for view blocks.
3181
+ * Re-exported from the main ast.ts module.
3182
+ */
3183
+
3184
+ /** One stream reference in `streams: [a, b]`. */
3185
+ interface ViewStreamRef {
3186
+ name: string;
3187
+ range: SourceRange;
3188
+ }
3189
+ /**
3190
+ * One computed column under `computed { <name> { graph, input, output? } }`.
3191
+ * Each row of the view runs `graph` with the value produced by `input`
3192
+ * (a @ts mapping over the row), and the cell value is the graph output,
3193
+ * optionally reshaped by `output`.
3194
+ */
3195
+ interface ViewComputedColumnDecl {
3196
+ name: string;
3197
+ range: SourceRange;
3198
+ /** Name of the workflow (graph) executed to compute this column. */
3199
+ workflowName: string;
3200
+ /** Range of the workflow name in `graph: name` (for LSP navigation). */
3201
+ workflowNameRange?: SourceRange;
3202
+ /** @ts block mapping the view row into the graph's trigger input (required; validated after parse). */
3203
+ input?: ConfigValue;
3204
+ /** Optional @ts block mapping the graph output into the cell value. */
3205
+ output?: ConfigValue;
3206
+ }
3207
+ /** Top-level `view` block: a spreadsheet-like composition of stream rows (name matches DSL identifier). */
3208
+ interface ViewDecl {
3209
+ /** Set by deploy bundle / tooling; not produced by the parser. */
3210
+ id?: string;
3211
+ name: string;
3212
+ label: string;
3213
+ description?: string;
3214
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3215
+ docComment?: string;
3216
+ enabled?: boolean;
3217
+ /** Streams composed by this view, exposed as `context.streams.<name>` in `columns`. */
3218
+ streams: ViewStreamRef[];
3219
+ /** JSON Schema describing the mapped (non-computed) row shape. */
3220
+ schema?: JsonSchemaLiteral;
3221
+ /** Set when schema was defined via @json { } block (for LSP). */
3222
+ schemaBlock?: JsonBlockInfo;
3223
+ /** `schema: some_name` reference to a top-level `schema` block. */
3224
+ schemaRef?: string;
3225
+ schemaRefRange?: SourceRange;
3226
+ /** @ts block mapping stream rows into the row shape (required; validated after parse). */
3227
+ columns?: ConfigValue;
3228
+ /** Computed columns executed via graphs. */
3229
+ computed: ViewComputedColumnDecl[];
3230
+ range: SourceRange;
3231
+ }
3232
+
3233
+ /**
3234
+ * AST types for the .swirls DSL. All nodes carry source ranges for LSP diagnostics and navigation.
3235
+ */
3236
+
3237
+ interface SourcePosition {
3238
+ line: number;
3239
+ column: number;
3240
+ offset: number;
3241
+ }
3242
+ interface SourceRange {
3243
+ start: SourcePosition;
3244
+ end: SourcePosition;
3245
+ }
3246
+ /** JSON Schema–like object literal (type, properties, required, items, etc.). */
3247
+ type JsonSchemaLiteral = Record<string, unknown>;
3248
+ /** Info for a schema defined via @json { } block (for LSP forwarding). */
3249
+ interface JsonBlockInfo {
3250
+ code: string;
3251
+ innerRange: SourceRange;
3252
+ }
3253
+ /** Review config literal (enabled, title, description, actions, etc.). */
3254
+ type ReviewConfigLiteral = Record<string, unknown>;
3255
+ type ConfigValue = {
3256
+ kind: 'null';
3257
+ value: null;
3258
+ range: SourceRange;
3259
+ } | {
3260
+ kind: 'string';
3261
+ value: string;
3262
+ range: SourceRange;
3263
+ } | {
3264
+ kind: 'number';
3265
+ value: number;
3266
+ range: SourceRange;
3267
+ } | {
3268
+ kind: 'boolean';
3269
+ value: boolean;
3270
+ range: SourceRange;
3271
+ } | {
3272
+ kind: 'object';
3273
+ value: Record<string, ConfigValue>;
3274
+ range: SourceRange;
3275
+ } | {
3276
+ kind: 'array';
3277
+ value: ConfigValue[];
3278
+ range: SourceRange;
3279
+ } | {
3280
+ kind: 'ts_block';
3281
+ code: string;
3282
+ range: SourceRange;
3283
+ innerRange: SourceRange;
3284
+ } | {
3285
+ kind: 'sql_block';
3286
+ code: string;
3287
+ range: SourceRange;
3288
+ innerRange: SourceRange;
3289
+ } | {
3290
+ kind: 'ts_file_ref';
3291
+ path: string;
3292
+ range: SourceRange;
3293
+ /** Range of the path characters inside the quotes (for go-to-definition). */
3294
+ pathRange: SourceRange;
3295
+ };
3296
+ /** Top-level reusable JSON Schema (`schema name { label, description, schema: ... }`). */
3297
+ interface SchemaDecl {
3298
+ name: string;
3299
+ label: string;
3300
+ description?: string;
3301
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3302
+ docComment?: string;
3303
+ /** Inline JSON Schema literal (when not using `schemaRef`). */
3304
+ schema?: JsonSchemaLiteral;
3305
+ /** Set when schema was defined via @json { } block (for LSP). */
3306
+ schemaBlock?: JsonBlockInfo;
3307
+ /** Body used `schema: other_name` instead of inline JSON. */
3308
+ schemaRef?: string;
3309
+ schemaRefRange?: SourceRange;
3310
+ range: SourceRange;
3311
+ }
3312
+ /**
3313
+ * Whether a `form` block is publicly addressable through Triggers.
3314
+ *
3315
+ * - `public`: served by Triggers at `/triggers/forms/:projectId/:formName`.
3316
+ * - `internal`: not served by Triggers. The web/cloud dashboard can still
3317
+ * read/edit the form, but Triggers refuses to render or accept submissions
3318
+ * (returns 404 with the same body as form-not-found, no existence leak).
3319
+ *
3320
+ * The AST field is required: parsers default to `'internal'` when the keyword
3321
+ * is absent so that no code past the parser ever has to handle `undefined`.
3322
+ */
3323
+ type FormVisibility = 'public' | 'internal';
3324
+ interface FormDecl {
3325
+ id?: string;
3326
+ name: string;
3327
+ label: string;
3328
+ description?: string;
3329
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3330
+ docComment?: string;
3331
+ enabled?: boolean;
3332
+ schema?: JsonSchemaLiteral;
3333
+ /** Set when schema was defined via @json { } block (for LSP). */
3334
+ schemaBlock?: JsonBlockInfo;
3335
+ /** `schema: some_name` reference to a top-level `schema` block. */
3336
+ schemaRef?: string;
3337
+ schemaRefRange?: SourceRange;
3338
+ /**
3339
+ * Triggers exposure for this form. Required at the AST layer; the parser
3340
+ * fills `'internal'` (the secure default) when no `visibility` keyword is
3341
+ * present in the source.
3342
+ */
3343
+ visibility: FormVisibility;
3344
+ /** Source range of the visibility value token (for LSP); absent when defaulted. */
3345
+ visibilityRange?: SourceRange;
3346
+ /**
3347
+ * Optional HTTP Basic auth gate enforced by the Triggers service. References
3348
+ * a top-level `auth` block by name (DSL: `auth: portal`). The referenced
3349
+ * block must have `type: basic` and supply `username` / `password` vars from
3350
+ * a secret block; the Triggers form GET and POST handlers require an
3351
+ * `Authorization: Basic` header whose decoded `user:pass` matches the
3352
+ * decrypted secret values, returning 401 with
3353
+ * `WWW-Authenticate: Basic realm="<label>"` on miss. Visibility is enforced
3354
+ * first, so `auth:` is dead config on internal forms (which 404 before any
3355
+ * auth check runs).
3356
+ */
3357
+ authRef?: {
3358
+ name: string;
3359
+ range: SourceRange;
3360
+ };
3361
+ range: SourceRange;
3362
+ }
3363
+ interface WebhookDecl {
3364
+ id?: string;
3365
+ name: string;
3366
+ label: string;
3367
+ description?: string;
3368
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3369
+ docComment?: string;
3370
+ enabled?: boolean;
3371
+ schema?: JsonSchemaLiteral;
3372
+ /** Set when schema was defined via @json { } block (for LSP). */
3373
+ schemaBlock?: JsonBlockInfo;
3374
+ /** `schema: some_name` reference to a top-level `schema` block. */
3375
+ schemaRef?: string;
3376
+ schemaRefRange?: SourceRange;
3377
+ /** `secret: blockName.VAR` cross-reference to a project secret block var. */
3378
+ secretRef?: {
3379
+ blockName: string;
3380
+ varName: string;
3381
+ range: SourceRange;
3382
+ };
3383
+ /** `header: "Name"` inbound HTTP header carrying the shared secret value. */
3384
+ header?: {
3385
+ value: string;
3386
+ range: SourceRange;
3387
+ };
3388
+ range: SourceRange;
3389
+ }
3390
+
3391
+ interface ScheduleDecl {
3392
+ id?: string;
3393
+ name: string;
3394
+ label: string;
3395
+ description?: string;
3396
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3397
+ docComment?: string;
3398
+ cron: string;
3399
+ timezone?: string;
3400
+ enabled?: boolean;
3401
+ range: SourceRange;
3402
+ }
3403
+ interface NodeDecl {
3404
+ /** Set by deploy bundle / tooling; not produced by the parser. */
3405
+ id?: string;
3406
+ name: string;
3407
+ type: string;
3408
+ label: string;
3409
+ description?: string;
3410
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3411
+ docComment?: string;
3412
+ /** True when this node was defined with root { } syntax. */
3413
+ isRoot?: boolean;
3414
+ configFields: Record<string, ConfigValue>;
3415
+ inputSchema?: JsonSchemaLiteral;
3416
+ outputSchema?: JsonSchemaLiteral;
3417
+ /** Set when inputSchema was defined via @json { } block (for LSP). */
3418
+ inputSchemaBlock?: JsonBlockInfo;
3419
+ /** Set when outputSchema was defined via @json { } block (for LSP). */
3420
+ outputSchemaBlock?: JsonBlockInfo;
3421
+ /** `inputSchema: some_name` reference to a top-level `schema` block. */
3422
+ inputSchemaRef?: string;
3423
+ inputSchemaRefRange?: SourceRange;
3424
+ /** `schema:` / `outputSchema:` reference to a top-level `schema` block (node output schema). */
3425
+ outputSchemaRef?: string;
3426
+ outputSchemaRefRange?: SourceRange;
3427
+ reviewConfig?: ReviewConfigLiteral;
3428
+ /**
3429
+ * Declared secret block → var subsets exposed as `context.secrets.<block>.<var>`
3430
+ * (DSL: `secrets: { blockName: [VAR1, VAR2] }`).
3431
+ */
3432
+ secretsMap?: Record<string, string[]>;
3433
+ /**
3434
+ * Source range of each secret block name key in `secrets: { blockName: [...] }` (for LSP).
3435
+ */
3436
+ secretsMapBlockRanges?: {
3437
+ blockName: string;
3438
+ range: SourceRange;
3439
+ }[];
3440
+ /** Range of the standalone schema name in `review: { schema: name }` (for LSP). */
3441
+ reviewSchemaRefRange?: SourceRange;
3442
+ /** Presentation format for leaf outputs (`format: markdown`, etc.). */
3443
+ outputFormat?: string;
3444
+ /**
3445
+ * Inline subgraph for `map` / `while` nodes: same structure as a graph body
3446
+ * (root, node, flow) without the outer `graph name { label }` wrapper.
3447
+ */
3448
+ subgraph?: {
3449
+ nodes: NodeDecl[];
3450
+ edges: EdgeDecl[];
3451
+ flowRange?: SourceRange;
3452
+ range: SourceRange;
3453
+ };
3454
+ range: SourceRange;
3455
+ }
3456
+ interface EdgeDecl {
3457
+ source: string;
3458
+ target: string;
3459
+ /** When set (deploy bundle), edge endpoints are these UUIDs instead of `source`/`target` names. */
3460
+ sourceNodeId?: string;
3461
+ targetNodeId?: string;
3462
+ /** Set by deploy bundle / tooling; not produced by the parser. */
3463
+ id?: string;
3464
+ label?: string;
3465
+ range: SourceRange;
3466
+ }
3467
+ interface WorkflowDecl {
3468
+ /** Set by deploy bundle / tooling; not produced by the parser. */
3469
+ id?: string;
3470
+ name: string;
3471
+ label: string;
3472
+ description?: string;
3473
+ concurrency?: number;
3474
+ /** Lifetime of the execution authorization token (`executionTokenTtl:`). */
3475
+ executionTokenTtl?: string;
3476
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3477
+ docComment?: string;
3478
+ nodes: NodeDecl[];
3479
+ edges: EdgeDecl[];
3480
+ /** Source range of the flow { ... } block when present (for LSP). */
3481
+ flowRange?: SourceRange;
3482
+ range: SourceRange;
3483
+ }
3484
+ type TriggerType = 'form' | 'webhook' | 'schedule';
3485
+ interface TriggerDecl {
3486
+ id?: string;
3487
+ name: string;
3488
+ resourceType: TriggerType;
3489
+ resourceName: string;
3490
+ workflowName: string;
3491
+ /** Resolved UUIDs for deploy payloads; not produced by the parser. */
3492
+ resourceId?: string;
3493
+ workflowId?: string;
3494
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3495
+ docComment?: string;
3496
+ enabled?: boolean;
3497
+ range: SourceRange;
3498
+ }
3499
+ /** DSL `secret` block `type:` — `managed` means platform supplies values (enterprise). */
3500
+ type SecretBlockType = 'managed';
3501
+ /** Top-level named group of secret key identifiers (`secret name { vars: [KEY, ...] }`). */
3502
+ interface SecretsDecl {
3503
+ name: string;
3504
+ label: string;
3505
+ description?: string;
3506
+ /**
3507
+ * When `managed`, values come from the platform (Enterprise `platform_keys`);
3508
+ * omit for user-provided vault values.
3509
+ */
3510
+ type?: SecretBlockType;
3511
+ vars: string[];
3512
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3513
+ docComment?: string;
3514
+ range: SourceRange;
3515
+ }
3516
+ /** Top-level auth configuration referencing a `secret` block (`auth name { type: ..., secrets: blockName, ... }`). */
3517
+ interface AuthDecl {
3518
+ name: string;
3519
+ label: string;
3520
+ description?: string;
3521
+ authType: string;
3522
+ /** Reference to a top-level `secret` block name. */
3523
+ secretsRef?: string;
3524
+ /** Range of the secret block identifier after `secrets:` (for LSP navigation). */
3525
+ secretsRefRange?: SourceRange;
3526
+ configFields: Record<string, ConfigValue>;
3527
+ /** Doc comment (block-comment style) immediately above this declaration; shown on hover. */
3528
+ docComment?: string;
3529
+ range: SourceRange;
3530
+ }
3531
+ interface SwirlsFile {
3532
+ decisions?: DecisionDecl[];
3533
+ version?: number;
3534
+ schemas: SchemaDecl[];
3535
+ forms: FormDecl[];
3536
+ webhooks: WebhookDecl[];
3537
+ schedules: ScheduleDecl[];
3538
+ workflows: WorkflowDecl[];
3539
+ streams: StreamDecl[];
3540
+ /** Spreadsheet-like stream compositions (`view name { streams, columns, computed }`). */
3541
+ views: ViewDecl[];
3542
+ triggers: TriggerDecl[];
3543
+ secrets: SecretsDecl[];
3544
+ auths: AuthDecl[];
3545
+ postgres: PostgresDecl[];
3546
+ /** Swirls-managed Postgres databases declared with an `@prisma` schema island. */
3547
+ databases: DatabaseDecl[];
3548
+ /** Data-migration transforms run in order against a managed `database`. */
3549
+ migrations: MigrationDecl[];
3550
+ disk: DiskDecl[];
3551
+ /** Named Linux guest (`computer name { software, disks, resources }`). */
3552
+ computer: ComputerDecl[];
3553
+ /** Script that runs on an enrolled device (`operation name { command }`). */
3554
+ operations: OperationDecl[];
3555
+ /** Top-level knowledge skill declarations (`skill name { name: "…" }`). */
3556
+ skill: SkillDecl[];
3557
+ /** Top-level autonomous agent definitions (`agent name { … }`). */
3558
+ agent: AgentDecl[];
3559
+ /** Top-level MCP server slots (`mcp name { label, description }`). */
3560
+ mcp: McpDecl[];
3561
+ /** Project-scoped private connectivity requirements and ingress allowlists. */
3562
+ networks?: NetworkDecl[];
3563
+ /** Top-level chat platform bindings (`channel name { … }`). */
3564
+ channels: ChannelDecl[];
3565
+ /** Read-only SQL queries against managed databases (`query name { … }`). */
3566
+ queries: QueryDecl[];
3567
+ /** Top-level outbound OAuth connection slots (`connection name { provider: … }`). */
3568
+ connections: ConnectionDecl[];
3569
+ /** Top-level inbound OAuth application slots (`connector name { label, description }`). */
3570
+ connector: ConnectorDecl[];
3571
+ /** Top-level integration actions (`action name { provider, method, path, … }`). */
3572
+ actions: ActionDecl[];
3573
+ /** Identity-scoped access roles (`role name { match { … } }`). */
3574
+ roles: RoleDecl[];
3575
+ /** Role-to-resource grants (`policy { allow <role> -> agent … }`). A policy
3576
+ * with grants opts the deployment into deny-by-default enforcement. */
3577
+ policies: PolicyDecl[];
3578
+ /** Bespoke OpenUI-backed interfaces (`app name { shell, nav, page … }`). */
3579
+ apps: AppDecl[];
3580
+ /** Side-effect stubs for playbook runs (`mock name { … }`). */
3581
+ mocks: MockDecl[];
3582
+ /** Hosted test suites (`playbook name { case / eval … }`). */
3583
+ playbooks: PlaybookDecl[];
3584
+ }
3585
+ interface Diagnostic {
3586
+ message: string;
3587
+ range: SourceRange;
3588
+ severity?: 'error' | 'warning';
3589
+ }
3590
+
3591
+ /** Minimal directory entry for `.swirls` discovery (compatible with Node `Dirent` and deploy `DeployBundleDirent`). */
3592
+ interface SwirlsWorkspaceDirent {
3593
+ name: string;
3594
+ isDirectory(): boolean;
3595
+ isFile(): boolean;
3596
+ }
3597
+ /**
3598
+ * Filesystem surface required to discover and resolve `.swirls` files on disk or in a virtual tree.
3599
+ * Callers pass a plain object (e.g. `node:fs` or deploy `DeployBundleFs` + `existsSync` shim).
3600
+ */
3601
+ interface SwirlsWorkspaceFileSystem {
3602
+ readdirSync(path: string, options: {
3603
+ withFileTypes: true;
3604
+ }): SwirlsWorkspaceDirent[];
3605
+ readFileSync(path: string, encoding: 'utf-8'): string;
3606
+ existsSync(path: string): boolean;
3607
+ }
3608
+
3609
+ interface DecisionDecl {
3610
+ name: string;
3611
+ fields: Record<string, unknown>;
3612
+ fieldRanges: Record<string, SourceRange>;
3613
+ range: SourceRange;
3614
+ docComment?: string;
3615
+ }
3616
+
3617
+ /**
3618
+ * What the embedding runtime tells the language about itself.
3619
+ *
3620
+ * The language knows the syntax, the rules that hold for every runtime, and
3621
+ * the vocabulary the deployment definition fixes (AI providers, search
3622
+ * providers, channel platforms: those live in `@swirls/definition`). Three
3623
+ * things are the runtime's to decide, so they come in through this interface
3624
+ * instead of being compiled into the package:
3625
+ *
3626
+ * - which integration providers it can broker a connection to,
3627
+ * - how to check the body of an `@openui { … }` block, and
3628
+ * - which coding harnesses it can deliver into a `computer`.
3629
+ *
3630
+ * With no host those checks are skipped: a provider or harness name only has
3631
+ * to be well formed, and an `@openui` body only has to be non-empty.
3632
+ * `swirlsHost` (`@swirls/language/hosts/swirls`) carries the catalog of the
3633
+ * hosted Swirls runtime for callers that want its rules.
3634
+ */
3635
+ interface LanguageHost {
3636
+ readonly providers?: ProviderCatalog;
3637
+ readonly openui?: OpenUiSupport;
3638
+ readonly harnesses?: HarnessCatalog;
3639
+ }
3640
+ /** One harness type or provider a runtime offers. */
3641
+ interface HarnessEntry {
3642
+ readonly name: string;
3643
+ /** One line for editor hover and completion. */
3644
+ readonly description?: string;
3645
+ /**
3646
+ * Providers only: the package the runtime installs for this harness. A
3647
+ * computer may not pin it in `software:`, because the runtime owns its
3648
+ * version.
3649
+ */
3650
+ readonly package?: string;
3651
+ }
3652
+ /** The `harness: { type, provider }` values a runtime accepts. */
3653
+ interface HarnessCatalog {
3654
+ readonly types: readonly HarnessEntry[];
3655
+ readonly providers: readonly HarnessEntry[];
3656
+ }
3657
+ /** The integration providers a runtime supports. */
3658
+ interface ProviderCatalog {
3659
+ has(provider: string): boolean;
3660
+ }
3661
+ /** Resource names an `@openui` artifact binds to, by kind. */
3662
+ interface OpenUiBindings {
3663
+ readonly agents: readonly string[];
3664
+ readonly channels: readonly string[];
3665
+ readonly workflows: readonly string[];
3666
+ readonly views: readonly string[];
3667
+ readonly streams: readonly string[];
3668
+ readonly datastores: readonly string[];
3669
+ readonly queries: readonly string[];
3670
+ readonly disks: readonly string[];
3671
+ }
3672
+ /** Resource names in scope for an `@openui` artifact, by kind. */
3673
+ interface OpenUiExpose {
3674
+ readonly agents: readonly string[];
3675
+ readonly channels: readonly string[];
3676
+ readonly workflows: readonly string[];
3677
+ readonly views: readonly string[];
3678
+ readonly streams: readonly string[];
3679
+ readonly databases: readonly string[];
3680
+ readonly postgres: readonly string[];
3681
+ readonly queries: readonly string[];
3682
+ readonly disks: readonly string[];
3683
+ }
3684
+ type OpenUiValidationResult = {
3685
+ readonly ok: true;
3686
+ } | {
3687
+ readonly ok: false;
3688
+ readonly errors: readonly string[];
3689
+ };
3690
+ /** Parses and checks the body of an `@openui { … }` block. */
3691
+ interface OpenUiSupport {
3692
+ extractBindings(source: string): OpenUiBindings;
3693
+ validate(source: string, options: {
3694
+ readonly expose: OpenUiExpose;
3695
+ }): OpenUiValidationResult;
3696
+ }
3697
+
3698
+ /**
3699
+ * The catalog of the hosted Swirls runtime, for callers that want its rules:
3700
+ * `validate(ast, { host: swirlsHost })`.
3701
+ *
3702
+ * It does not include the integration provider catalog or the `@openui`
3703
+ * checker. Those are large and change with the runtime, so the runtime
3704
+ * supplies them: `{ ...swirlsHost, providers, openui }`.
3705
+ */
3706
+
3707
+ declare const swirlsHost: LanguageHost;
3708
+
3709
+ /** Minimal filesystem surface for scanning and reading `.swirls` sources. */
3710
+ interface DeployBundleDirent {
3711
+ name: string;
3712
+ isDirectory(): boolean;
3713
+ isFile(): boolean;
3714
+ }
3715
+ interface DeployBundleFs {
3716
+ readdirSync(path: string, options: {
3717
+ withFileTypes: true;
3718
+ }): DeployBundleDirent[];
3719
+ readFileSync(path: string, encoding: 'utf-8'): string;
3720
+ }
3721
+ /**
3722
+ * Adapts {@link DeployBundleFs} to {@link SwirlsWorkspaceFileSystem} for shared workspace helpers.
3723
+ */
3724
+ declare function deployBundleToWorkspaceFileSystem(fs: DeployBundleFs): SwirlsWorkspaceFileSystem;
3725
+
3726
+ interface MergeProjectOptions {
3727
+ /**
3728
+ * The runtime's provider catalog, `@openui` checker and harness catalog.
3729
+ * Without it those runtime-specific checks are skipped.
3730
+ */
3731
+ host?: LanguageHost;
3732
+ }
3733
+ interface BuildDefinitionOptions {
3734
+ /** Makes the id of every resource and node. Defaults to a UUIDv7. */
3735
+ newId?: () => string;
3736
+ }
3737
+ /**
3738
+ * Parse every `.swirls` file under `cwd` and merge into a single bundle.
3739
+ * Throws on the first problem: a file that cannot be parsed, or a resource name
3740
+ * of one kind declared in two places (the message names both files).
3741
+ */
3742
+ declare function mergeProjectSwirlsFiles(fs: DeployBundleFs, cwd: string, options?: MergeProjectOptions): SwirlsFile;
3743
+ /**
3744
+ * Strip editor metadata, assign stable UUIDs, and build the API deployment definition shape.
3745
+ */
3746
+ declare function buildDeploymentDefinitionPayload(merged: SwirlsFile, options?: BuildDefinitionOptions): {
3747
+ definition: Record<string, unknown>;
3748
+ parseError: z.ZodError | null;
3749
+ };
3750
+
3751
+ /**
3752
+ * Recursively sort object keys for deterministic JSON serialization.
3753
+ * Arrays preserve element order (callers pre-sort when order is not semantic).
3754
+ */
3755
+ declare function canonicalizeForStableJson(value: unknown): unknown;
3756
+
3757
+ /**
3758
+ * Recursively find all `.swirls` files under `dir`, returning relative paths from `cwd`.
3759
+ */
3760
+ declare function collectSwirlsFiles(fs: DeployBundleFs, cwd: string, dir?: string, acc?: string[]): string[];
3761
+
3762
+ /**
3763
+ * Version of the base-image runtime a harness computer is baked with (system
3764
+ * libraries, Node, the harness directory on PATH). Never a harness version:
3765
+ * those are delivered at boot. Bump when a provider's base image runtime
3766
+ * changes, so every harness computer re-bakes on its next deploy. Part of the
3767
+ * recipe hash only for computers with a `harness` block.
3768
+ */
3769
+ declare const COMPUTER_HARNESS_RUNTIME = "v1";
3770
+ /**
3771
+ * Harness providers this runtime can bake. The language checks authored names
3772
+ * against the host's harness catalog; this is the same list seen from the
3773
+ * image side, and a test holds the two together.
3774
+ */
3775
+ declare const HARNESS_PROVIDERS: readonly ["claude", "codex", "pi", "hermes"];
3776
+ type HarnessProvider = (typeof HARNESS_PROVIDERS)[number];
3777
+ /** Narrow a stored or authored string to a provider this runtime bakes. */
3778
+ declare function isHarnessProvider(value: string): value is HarnessProvider;
3779
+ /** A Flox catalog package the runtime adds to the image. */
3780
+ type HarnessRuntimePackage = {
3781
+ name: string;
3782
+ /** A Flox version or semver range; null takes the catalog's latest. */
3783
+ version: string | null;
3784
+ /** Flox file-conflict priority; lower wins. Omitted means Flox's default 5. */
3785
+ priority?: number;
3786
+ };
3787
+ /**
3788
+ * A Debian binary package fetched from an immutable source, checked against
3789
+ * its pinned size and sha256 before it is unpacked.
3790
+ */
3791
+ type HarnessDebianPackage = {
3792
+ name: string;
3793
+ version: string;
3794
+ sha256: string;
3795
+ size: number;
3796
+ /** Tried in order. The hash, not the host, is what is trusted. */
3797
+ urls: readonly string[];
3798
+ };
3799
+ /** Where the bake worker mounts the unpacked Debian packages, read-only. */
3800
+ declare const HARNESS_DEBIAN_STAGE_DIR = "/opt/stage/harness-root";
3801
+ /** Writable by the guest user; boot delivery unpacks kits here. */
3802
+ declare const HARNESS_ROOT_DIR = "/opt/swirls/harness";
3803
+ /** Flox packages the runtime adds for a provider, before author pins. */
3804
+ declare function harnessRuntimePackages(provider: string): readonly HarnessRuntimePackage[];
3805
+ /** What the bake worker needs to add a provider's runtime to the image. */
3806
+ type ComputerHarnessBake = {
3807
+ provider: HarnessProvider;
3808
+ runtime: string;
3809
+ /** Fetched, verified, and unpacked at `HARNESS_DEBIAN_STAGE_DIR`. */
3810
+ debianPackages: HarnessDebianPackage[];
3811
+ /** Set as image `ENV` when the guest image is committed. */
3812
+ env: Record<string, string>;
3813
+ /** Run as root in the guest image after the user and mount tooling steps. */
3814
+ prepScript: string;
3815
+ };
3816
+ /**
3817
+ * Root script that adds the runtime to the guest image. It runs after the
3818
+ * mount tooling install, because that install copies its own loader to
3819
+ * `/lib64`; running last leaves one consistent glibc set from the pinned deb.
3820
+ * The Claude binary is never patched or started through the loader.
3821
+ */
3822
+ declare function harnessPrepScript(provider: string): string;
3823
+ /** The bake request's harness part, from the provider and runtime alone. */
3824
+ declare function computerHarnessBake(harness: {
3825
+ provider: HarnessProvider;
3826
+ runtime: string;
3827
+ }): ComputerHarnessBake;
3828
+
3829
+ /**
3830
+ * Flox catalog packages that provide the promised PATH baseline.
3831
+ * Command names (`ls`, `grep`, …) are not package names.
3832
+ * `cacert` is the Mozilla CA bundle, not a command. Guest prep copies it
3833
+ * onto the standard certificate paths.
3834
+ */
3835
+ declare const COMPUTER_BASELINE_PACKAGES: readonly ["bash", "cacert", "coreutils", "findutils", "gawk", "gnugrep", "gnused", "gnutar", "gzip"];
3836
+ /**
3837
+ * Added to the Flox recipe when `disks:` is non-empty or any agent in the
3838
+ * deployment binds this computer. The recipe hash covers the package set, so
3839
+ * the binding itself is not hashed.
3840
+ */
3841
+ declare const COMPUTER_MOUNT_PACKAGES: readonly ["fuse", "sudo"];
3842
+ /**
3843
+ * Vendored mount tooling (Archil client and sudoers). Bump to re-bake those
3844
+ * snapshots. Hashed only when mount tooling is baked, so a shell-only
3845
+ * computer with no disks and no agent binding does not re-bake.
3846
+ * `COMPUTER_BASELINE_KIT` and `COMPUTER_GUEST_IMAGE` re-bake every computer.
3847
+ */
3848
+ declare const COMPUTER_MOUNT_KIT = "v3";
3849
+ /**
3850
+ * Bump when the baseline package set or the guest CA bundle changes so
3851
+ * existing snapshots re-bake. `v2` adds `cacert` and the TLS env.
3852
+ */
3853
+ declare const COMPUTER_BASELINE_KIT = "v2";
3854
+ declare const COMPUTER_RESOURCE_DEFAULTS: {
3855
+ readonly cpus: 2;
3856
+ readonly memoryMiB: 1024;
3857
+ };
3858
+ /** Vendor minimums for coding harnesses start at 4 GB. */
3859
+ declare const COMPUTER_HARNESS_RESOURCE_DEFAULTS: {
3860
+ readonly cpus: 2;
3861
+ readonly memoryMiB: 4096;
3862
+ };
3863
+ /** The authored `harness: { type, provider }` block. */
3864
+ type ComputerHarnessInput = {
3865
+ type: string;
3866
+ provider: string;
3867
+ };
3868
+ /** A compiled harness carries the runtime its base image was baked for. */
3869
+ type CompiledComputerHarness = ComputerHarnessInput & {
3870
+ runtime: string;
3871
+ };
3872
+ type ComputerRecipeInput = {
3873
+ name: string;
3874
+ label?: string;
3875
+ description?: string;
3876
+ software?: ReadonlyArray<{
3877
+ packageName: string;
3878
+ pin: string;
3879
+ }>;
3880
+ disks?: readonly string[];
3881
+ resources?: {
3882
+ cpus?: number;
3883
+ memoryMiB?: number;
3884
+ diskGiB?: number;
3885
+ };
3886
+ harness?: ComputerHarnessInput;
3887
+ /**
3888
+ * True when any agent in this deployment names the computer. A second agent
3889
+ * does not change the baked packages, and neither does this flag when
3890
+ * `disks:` is already non-empty.
3891
+ */
3892
+ boundByAgent?: boolean;
3893
+ };
3894
+ type CompiledComputerResources = {
3895
+ cpus: number;
3896
+ memoryMiB: number;
3897
+ diskGiB?: number;
3898
+ };
3899
+ type CompiledComputer = {
3900
+ name: string;
3901
+ label: string;
3902
+ description?: string;
3903
+ /** Author pins only. Baseline packages are not listed here. */
3904
+ software: Record<string, string>;
3905
+ disks: string[];
3906
+ resources: CompiledComputerResources;
3907
+ needsMountTooling: boolean;
3908
+ /** Present only when the computer declares a `harness` block. */
3909
+ harness?: CompiledComputerHarness;
3910
+ recipeHash: string;
3911
+ };
3912
+ type PackagePin = {
3913
+ name: string;
3914
+ version: string | null;
3915
+ /** Flox file-conflict priority. Only harness runtime packages set one. */
3916
+ priority?: number;
3917
+ };
3918
+ declare function compileComputerRecipe(input: ComputerRecipeInput): CompiledComputer;
3919
+ /**
3920
+ * Catalog packages in the image, author pin winning over the baseline and the
3921
+ * harness runtime. A pin replaces only the version; a runtime package keeps
3922
+ * its file-conflict priority.
3923
+ */
3924
+ declare function recipePackages(software: Record<string, string>, needsMountTooling: boolean, harness?: Pick<CompiledComputerHarness, 'provider'>): PackagePin[];
3925
+ /**
3926
+ * Org-scoped Daytona snapshot name. Includes the project so two projects
3927
+ * cannot collide, and the recipe hash so a superseded snapshot can coexist
3928
+ * with the new one.
3929
+ */
3930
+ declare function computerSnapshotName(projectId: string, computerName: string, recipeHash: string): string;
3931
+ /**
3932
+ * Daytona snapshot name for a computer the platform owns, such as the harness
3933
+ * release smoke test's guests. It follows `computerSnapshotName`, but the
3934
+ * `swirls-p-` prefix replaces the customer `swirls-c-<project>` prefix, so a
3935
+ * platform snapshot can never collide with a project's or be collected by a
3936
+ * project's snapshot GC.
3937
+ */
3938
+ declare function platformComputerSnapshotName(computerName: string, recipeHash: string): string;
3939
+ /** Transient Flox manifest. One pkg-group per package so tight pins can lock. */
3940
+ declare function floxManifestToml(computer: CompiledComputer): string;
3941
+ /** Daytona snapshot resources. Memory is GiB; omitted disk stays omitted. */
3942
+ declare function daytonaSnapshotResources(resources: CompiledComputerResources): {
3943
+ cpu: number;
3944
+ memory: number;
3945
+ disk?: number;
3946
+ };
3947
+
3948
+ /**
3949
+ * SHA-256 hex digest of the stripped Swirls AST (post-`stripEditorMetadata`),
3950
+ * before UUID assignment in `buildDeploymentDefinitionPayload`.
3951
+ * Identical `.swirls` semantics produce the same hash.
3952
+ */
3953
+ declare function computeDefinitionHash(stripped: SwirlsFile): string;
3954
+
3955
+ /**
3956
+ * Semantic fingerprint of a validated deployment definition: ignores all UUIDs
3957
+ * and resolves edge/trigger references to stable names so two builds of the same
3958
+ * project produce the same hash even when `buildDeploymentDefinitionPayload` assigns
3959
+ * new ids.
3960
+ */
3961
+ declare function computeDeploymentDefinitionFingerprint(def: DeploymentDefinition): string;
3962
+
3963
+ /**
3964
+ * A UUIDv7 (RFC 9562): 48 bits of Unix time in milliseconds, then random bits.
3965
+ * Ids made later sort later, which keeps stored definitions in creation order.
3966
+ * Uses Web Crypto, so it runs on Node, Bun, Deno and Workers alike.
3967
+ */
3968
+ declare function uuidv7(now?: number): string;
3969
+
3970
+ interface SkillFileEntry {
3971
+ /** Path relative to the skill root, posix separators. */
3972
+ path: string;
3973
+ bytes: Uint8Array;
3974
+ }
3975
+ interface SkillBundle {
3976
+ /** On-disk skill slug (directory name under `.agents/skills/`). */
3977
+ skillName: string;
3978
+ files: SkillFileEntry[];
3979
+ }
3980
+ type SkillClassificationResult = {
3981
+ kind: 'knowledge';
3982
+ } | {
3983
+ kind: 'executable';
3984
+ triggerFile: string;
3985
+ };
3986
+ interface SkillMdFrontmatter {
3987
+ name?: string;
3988
+ description?: string;
3989
+ }
3990
+ interface DeploymentSkillFilePayload {
3991
+ path: string;
3992
+ contentBase64: string;
3993
+ size: number;
3994
+ }
3995
+ interface DeploymentSkillFilesBundle {
3996
+ /** Swirls `skill` block handle. */
3997
+ blockName: string;
3998
+ skillName: string;
3999
+ files: DeploymentSkillFilePayload[];
4000
+ }
4001
+ interface SkillBlockRef {
4002
+ /** Swirls block handle (`skill <name>`). */
4003
+ name: string;
4004
+ /** On-disk slug under `.agents/skills/<skillName>/`. */
4005
+ skillName: string;
4006
+ /** The mount that declares the block, when it was merged from several mounts. */
4007
+ sourceMount?: string;
4008
+ }
4009
+
4010
+ /** Source files of one project: posix path relative to the project root, to text. */
4011
+ type SwirlsSources = ReadonlyMap<string, string> | Readonly<Record<string, string>>;
4012
+ interface LowerOptions {
4013
+ /**
4014
+ * The runtime's provider catalog, `@openui` checker and harness catalog.
4015
+ * Without it those runtime-specific checks are skipped.
4016
+ */
4017
+ host?: LanguageHost;
4018
+ /** Makes the id of every resource and node. Defaults to a UUIDv7. */
4019
+ newId?: () => string;
4020
+ }
4021
+ /**
4022
+ * Which step reported a diagnostic: checking the inputs (`mount`: a path that
4023
+ * cannot be used), reading one file (`parse`, `validate`), combining the files
4024
+ * (`merge`: a name declared twice, versions that disagree), building the
4025
+ * definition (`lower`), or checking the built definition against its schema
4026
+ * (`definition`).
4027
+ */
4028
+ type LowerStage = 'mount' | 'parse' | 'validate' | 'merge' | 'lower' | 'definition';
4029
+ interface LowerDiagnostic {
4030
+ severity: 'error' | 'warning';
4031
+ stage: LowerStage;
4032
+ message: string;
4033
+ /** The source file, when the diagnostic belongs to one. */
4034
+ path?: string;
4035
+ /** Where in `path`; lines and columns as the language reports them. */
4036
+ range?: SourceRange;
4037
+ /** Other places the same problem is at: every other declaration of a duplicate name. */
4038
+ related?: {
4039
+ path: string;
4040
+ range?: SourceRange;
4041
+ }[];
4042
+ }
4043
+ interface LowerResult {
4044
+ /** True when a definition was built. Warnings do not make this false. */
4045
+ ok: boolean;
4046
+ /**
4047
+ * The deployment definition as a JSON document, or null when `ok` is false.
4048
+ * It has passed `parseDeploymentDefinition`; call that for the typed value.
4049
+ */
4050
+ definition: Record<string, unknown> | null;
4051
+ diagnostics: LowerDiagnostic[];
4052
+ /** Every `.swirls` file given, with its size and SHA-256, sorted by path. */
4053
+ sourceFiles: DeploymentSourceFileContent[];
4054
+ /** A stable hash of `sourceFiles`; the same sources always give the same value. */
4055
+ sourceFingerprint: string;
4056
+ /** Files of each skill an agent uses, read from `.agents/skills/<name>/`. */
4057
+ skillFiles: DeploymentSkillFilesBundle[];
4058
+ /** The merged syntax tree the definition was built from, or null when `ok` is false. */
4059
+ ast: SwirlsFile | null;
4060
+ }
4061
+ /**
4062
+ * Lower the source files of one project into a deployment definition.
4063
+ *
4064
+ * Nothing is read from disk or from the environment: the files given are the
4065
+ * whole project. A problem in the sources is returned as a diagnostic, not
4066
+ * thrown, so a caller can show every problem in every file at once.
4067
+ *
4068
+ * Besides `.swirls` files, pass the `.ts.swirls` files they reference and the
4069
+ * `.agents/skills/<name>/` files of any skill an agent uses.
4070
+ *
4071
+ * This is `lowerSwirlsMounts` over one mount.
4072
+ */
4073
+ declare function lowerSwirlsSources(files: SwirlsSources, options?: LowerOptions): LowerResult;
4074
+
4075
+ /**
4076
+ * Source manifest version 2: where every named block of a definition built
4077
+ * from several mounts is declared. Version 1 (`buildDeploymentSourceManifest`)
4078
+ * stays as it is for a single directory.
4079
+ */
4080
+
4081
+ type DeploymentSourceResourceKindV2 = DeploymentSourceResourceKind | 'computer' | 'query' | 'operation' | 'role' | 'mock' | 'playbook';
4082
+ interface DeploymentSourceManifestV2 {
4083
+ version: 2;
4084
+ mounts: {
4085
+ id: string;
4086
+ sources: string;
4087
+ skills: string;
4088
+ }[];
4089
+ files: {
4090
+ mount: string;
4091
+ path: string;
4092
+ size: number;
4093
+ sha256: string;
4094
+ }[];
4095
+ /**
4096
+ * Every named block of the definition. `id` is absent for a role, which has
4097
+ * none. Policies have no name and are not listed.
4098
+ */
4099
+ resources: {
4100
+ mount: string;
4101
+ kind: DeploymentSourceResourceKindV2;
4102
+ id?: string;
4103
+ name: string;
4104
+ path: string;
4105
+ range: SourceRange;
4106
+ }[];
4107
+ nodes: {
4108
+ mount: string;
4109
+ workflowId: string;
4110
+ workflowName: string;
4111
+ nodeId: string;
4112
+ nodeName: string;
4113
+ path: string;
4114
+ range: SourceRange;
4115
+ }[];
4116
+ fingerprint: string;
4117
+ }
4118
+ /** The schema of {@link DeploymentSourceManifestV2}. */
4119
+ declare const deploymentSourceManifestV2Schema: z.ZodType<DeploymentSourceManifestV2>;
4120
+ declare function parseDeploymentSourceManifestV2(input: unknown): z.ZodSafeParseResult<DeploymentSourceManifestV2>;
4121
+
4122
+ /**
4123
+ * Build a virtual FS from a flat map of **posix** paths relative to the repo root
4124
+ * (e.g. `packages/app/graph.swirls` → file contents). Used with GitHub archive trees.
4125
+ *
4126
+ * @param files — keys must not start with `/`; use forward slashes only.
4127
+ * @param virtualRoot — absolute-style posix root for `cwd`, e.g. `/repo`
4128
+ */
4129
+ declare function createMemoryRepoFs(files: Map<string, string>, virtualRoot: string): DeployBundleFs;
4130
+ /**
4131
+ * Strip a single top-level directory prefix from archive paths (e.g. `owner-repo-sha/...`).
4132
+ * Returns a new map suitable for {@link createMemoryRepoFs}.
4133
+ */
4134
+ declare function flattenArchivePathMap(paths: Map<string, string>): Map<string, string>;
4135
+ /** Join virtual root with a relative posix path. */
4136
+ declare function virtualRepoCwd(virtualRoot: string): string;
4137
+ /**
4138
+ * Keep only files under `rootPath` (posix, no leading slash) and strip that prefix
4139
+ * from keys. Used for monorepo subdirectory links.
4140
+ */
4141
+ declare function sliceRepoFilesToRoot(files: Map<string, string>, rootPath: string): Map<string, string>;
4142
+
4143
+ /** The default skills root of a mount: `<root>/<skill>/SKILL.md`. */
4144
+ declare const MOUNT_SKILLS_ROOT = ".agents/skills";
4145
+ /** A mount's files: posix path relative to the mount, to text or bytes. */
4146
+ type SwirlsMountFiles = ReadonlyMap<string, string | Uint8Array> | Readonly<Record<string, string | Uint8Array>>;
4147
+ interface SwirlsMount {
4148
+ /**
4149
+ * Chosen by the host, unique among the mounts of one call, at least one character.
4150
+ * It names the mount in every output and never appears in the definition.
4151
+ */
4152
+ readonly id: string;
4153
+ /**
4154
+ * Every file of the mount the lowering may read: `.swirls` files, the `.ts.swirls`
4155
+ * files and operation scripts they reference, and the files under `skillsRoot`.
4156
+ * `.swirls`, `.ts.swirls` and operation scripts must be UTF-8 text; given as bytes
4157
+ * they are decoded strictly. Skill files are kept byte for byte.
4158
+ */
4159
+ readonly files: SwirlsMountFiles;
4160
+ /** Mount-relative directory holding the mount's skills. Defaults to `MOUNT_SKILLS_ROOT`. */
4161
+ readonly skillsRoot?: string;
4162
+ }
4163
+ interface LowerMountsOptions {
4164
+ /** As `LowerOptions.host`. */
4165
+ readonly host?: LanguageHost;
4166
+ /**
4167
+ * Makes the id of every resource, node, edge and connection. `site` names what the id
4168
+ * is for and is unique within one call; `mount` is the mount that declares it.
4169
+ * Defaults to a UUIDv7 that ignores both. Every id must be a UUID.
4170
+ */
4171
+ readonly newId?: (site: string, mount: string) => string;
4172
+ }
4173
+ /** A place in one mount. */
4174
+ interface MountSite {
4175
+ readonly mount: string;
4176
+ readonly path: string;
4177
+ readonly range?: SourceRange;
4178
+ }
4179
+ interface MountDiagnostic {
4180
+ readonly severity: 'error' | 'warning';
4181
+ readonly stage: LowerStage;
4182
+ readonly message: string;
4183
+ /** The mount, when the diagnostic belongs to one. */
4184
+ readonly mount?: string;
4185
+ /** Mount-relative. */
4186
+ readonly path?: string;
4187
+ readonly range?: SourceRange;
4188
+ /** Other places the same problem is at: every other declaration of a duplicate name. */
4189
+ readonly related?: readonly MountSite[];
4190
+ }
4191
+ interface MountSourceFile extends DeploymentSourceFileContent {
4192
+ readonly mount: string;
4193
+ }
4194
+ interface MountSkillFiles extends DeploymentSkillFilesBundle {
4195
+ /** The mount whose skills root the files were read from: the mount that declares the skill block. */
4196
+ readonly mount: string;
4197
+ }
4198
+ interface MountFingerprint {
4199
+ readonly mount: string;
4200
+ /** SHA-256 over the mount's `.swirls` and `.ts.swirls` files. */
4201
+ readonly sources: string;
4202
+ /** SHA-256 over every file under the mount's skills root. */
4203
+ readonly skills: string;
4204
+ }
4205
+ interface LowerMountsResult {
4206
+ readonly ok: boolean;
4207
+ /** As `LowerResult.definition`. Carries no mount id and no path. */
4208
+ readonly definition: Record<string, unknown> | null;
4209
+ readonly diagnostics: MountDiagnostic[];
4210
+ /** Every `.swirls` and `.ts.swirls` file of every mount, sorted by mount id then path. */
4211
+ readonly sourceFiles: MountSourceFile[];
4212
+ /** Files of each skill an agent uses, by skill block, sorted by block name. */
4213
+ readonly skillFiles: MountSkillFiles[];
4214
+ /** Null when `ok` is false. */
4215
+ readonly manifest: DeploymentSourceManifestV2 | null;
4216
+ /** SHA-256 over every mount's id, sources and skills. Filled when `ok` is false too. */
4217
+ readonly fingerprint: string;
4218
+ /** Sorted by mount id. */
4219
+ readonly mounts: MountFingerprint[];
4220
+ readonly ast: SwirlsFile | null;
4221
+ }
4222
+ /**
4223
+ * Lower several directories into one deployment definition.
4224
+ *
4225
+ * The mounts are one program: a name is unique per kind across every mount,
4226
+ * and a block may reference a block of another mount by name. A file may read
4227
+ * only files of its own mount (`@ts` files, operation scripts), and each skill
4228
+ * is read from the skills root of the mount that declares its `skill` block.
4229
+ *
4230
+ * Nothing is read from disk or from the environment, and nothing is thrown for
4231
+ * a problem in the inputs: every problem is a diagnostic that names its mount.
4232
+ */
4233
+ declare function lowerSwirlsMounts(mounts: readonly SwirlsMount[], options?: LowerMountsOptions): LowerMountsResult;
4234
+
4235
+ declare const nodeTypeMap: {
4236
+ readonly ai: "ai";
4237
+ readonly decision: "decision";
4238
+ readonly code: "code";
4239
+ readonly email: "email";
4240
+ readonly workflow: "workflow";
4241
+ readonly http: "http";
4242
+ readonly integration: "integration";
4243
+ readonly postgres: "postgres";
4244
+ readonly database: "database";
4245
+ readonly scrape: "scrape";
4246
+ readonly search: "search";
4247
+ readonly parallel: "parallel";
4248
+ readonly disk: "disk";
4249
+ readonly shell: "shell";
4250
+ readonly device: "device";
4251
+ readonly stream: "stream";
4252
+ readonly switch: "switch";
4253
+ readonly wait: "wait";
4254
+ readonly map: "map";
4255
+ readonly fanout: "fanout";
4256
+ readonly while: "while";
4257
+ readonly agent: "agent";
4258
+ };
4259
+ /** How an executable config string was authored in the DSL (plain literal vs @ts/@sql). */
4260
+ declare const configValueKindSchema: z.ZodEnum<{
4261
+ literal: "literal";
4262
+ ts: "ts";
4263
+ sql: "sql";
4264
+ }>;
4265
+ type ConfigValueKind = z.infer<typeof configValueKindSchema>;
4266
+ declare const workflowNodeConfigSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
4267
+ type: z.ZodLiteral<"ai">;
4268
+ kind: z.ZodEnum<{
4269
+ object: "object";
4270
+ text: "text";
4271
+ image: "image";
4272
+ video: "video";
4273
+ embed: "embed";
4274
+ }>;
4275
+ provider: z.ZodOptional<z.ZodEnum<{
4276
+ openrouter: "openrouter";
4277
+ anthropic: "anthropic";
4278
+ openai: "openai";
4279
+ google: "google";
4280
+ }>>;
4281
+ model: z.ZodOptional<z.ZodString>;
4282
+ prompt: z.ZodOptional<z.ZodString>;
4283
+ temperature: z.ZodOptional<z.ZodNumber>;
4284
+ maxTokens: z.ZodOptional<z.ZodNumber>;
4285
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4286
+ }, z.core.$strip>, z.ZodObject<{
4287
+ type: z.ZodLiteral<"decision">;
4288
+ failurePolicy: z.ZodOptional<z.ZodUnknown>;
4289
+ decision: z.ZodString;
4290
+ state: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
4291
+ model: z.ZodOptional<z.ZodString>;
4292
+ definition: z.ZodOptional<z.ZodObject<{
4293
+ name: z.ZodString;
4294
+ label: z.ZodOptional<z.ZodString>;
4295
+ description: z.ZodOptional<z.ZodString>;
4296
+ provider: z.ZodLiteral<"typesafe">;
4297
+ model: z.ZodString;
4298
+ secrets: z.ZodString;
4299
+ inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4300
+ questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
4301
+ type: z.ZodLiteral<"choice">;
4302
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
4303
+ criteria: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
4304
+ }, z.core.$strict>, z.ZodObject<{
4305
+ type: z.ZodLiteral<"score">;
4306
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
4307
+ criteria: z.ZodArray<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
4308
+ }, z.core.$strict>, z.ZodObject<{
4309
+ type: z.ZodLiteral<"noul">;
4310
+ instructions: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>;
4311
+ criteria: z.ZodOptional<z.ZodObject<{
4312
+ true: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
4313
+ false: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>, z.ZodArray<z.ZodJSONSchema>]>>>;
4314
+ }, z.core.$strict>>;
4315
+ }, z.core.$strict>], "type">>;
4316
+ }, z.core.$strict>>;
4317
+ }, z.core.$strict>, z.ZodObject<{
4318
+ type: z.ZodLiteral<"code">;
4319
+ code: z.ZodOptional<z.ZodString>;
4320
+ }, z.core.$strip>, z.ZodObject<{
4321
+ type: z.ZodLiteral<"email">;
4322
+ from: z.ZodOptional<z.ZodString>;
4323
+ to: z.ZodOptional<z.ZodString>;
4324
+ subject: z.ZodOptional<z.ZodString>;
4325
+ text: z.ZodOptional<z.ZodString>;
4326
+ html: z.ZodOptional<z.ZodString>;
4327
+ replyTo: z.ZodOptional<z.ZodString>;
4328
+ }, z.core.$strip>, z.ZodObject<{
4329
+ type: z.ZodUnion<readonly [z.ZodLiteral<"workflow">, z.ZodLiteral<"graph">]>;
4330
+ workflowId: z.ZodOptional<z.ZodUUID>;
4331
+ workflow: z.ZodOptional<z.ZodString>;
4332
+ graphId: z.ZodOptional<z.ZodUUID>;
4333
+ graph: z.ZodOptional<z.ZodString>;
4334
+ input: z.ZodOptional<z.ZodString>;
4335
+ }, z.core.$strip>, z.ZodObject<{
4336
+ type: z.ZodLiteral<"map">;
4337
+ items: z.ZodOptional<z.ZodString>;
4338
+ maxItems: z.ZodOptional<z.ZodNumber>;
4339
+ concurrency: z.ZodOptional<z.ZodNumber>;
4340
+ workflowId: z.ZodOptional<z.ZodUUID>;
4341
+ workflow: z.ZodOptional<z.ZodString>;
4342
+ graphId: z.ZodOptional<z.ZodUUID>;
4343
+ graph: z.ZodOptional<z.ZodString>;
4344
+ }, z.core.$strip>, z.ZodObject<{
4345
+ type: z.ZodLiteral<"fanout">;
4346
+ items: z.ZodOptional<z.ZodString>;
4347
+ maxItems: z.ZodOptional<z.ZodNumber>;
4348
+ concurrency: z.ZodOptional<z.ZodNumber>;
4349
+ workflowId: z.ZodOptional<z.ZodUUID>;
4350
+ workflow: z.ZodOptional<z.ZodString>;
4351
+ graphId: z.ZodOptional<z.ZodUUID>;
4352
+ graph: z.ZodOptional<z.ZodString>;
4353
+ }, z.core.$strip>, z.ZodObject<{
4354
+ type: z.ZodLiteral<"while">;
4355
+ input: z.ZodOptional<z.ZodString>;
4356
+ condition: z.ZodOptional<z.ZodString>;
4357
+ update: z.ZodOptional<z.ZodString>;
4358
+ maxIterations: z.ZodOptional<z.ZodNumber>;
4359
+ workflowId: z.ZodOptional<z.ZodUUID>;
4360
+ workflow: z.ZodOptional<z.ZodString>;
4361
+ graphId: z.ZodOptional<z.ZodUUID>;
4362
+ graph: z.ZodOptional<z.ZodString>;
4363
+ }, z.core.$strip>, z.ZodObject<{
4364
+ type: z.ZodLiteral<"http">;
4365
+ url: z.ZodOptional<z.ZodString>;
4366
+ method: z.ZodOptional<z.ZodEnum<{
4367
+ GET: "GET";
4368
+ POST: "POST";
4369
+ PUT: "PUT";
4370
+ DELETE: "DELETE";
4371
+ PATCH: "PATCH";
4372
+ }>>;
4373
+ headers: z.ZodOptional<z.ZodString>;
4374
+ body: z.ZodOptional<z.ZodString>;
4375
+ network: z.ZodOptional<z.ZodString>;
4376
+ }, z.core.$strip>, z.ZodObject<{
4377
+ type: z.ZodLiteral<"integration">;
4378
+ connection: z.ZodOptional<z.ZodString>;
4379
+ action: z.ZodOptional<z.ZodString>;
4380
+ method: z.ZodOptional<z.ZodEnum<{
4381
+ GET: "GET";
4382
+ POST: "POST";
4383
+ PUT: "PUT";
4384
+ DELETE: "DELETE";
4385
+ PATCH: "PATCH";
4386
+ }>>;
4387
+ path: z.ZodOptional<z.ZodString>;
4388
+ params: z.ZodOptional<z.ZodString>;
4389
+ encoding: z.ZodOptional<z.ZodEnum<{
4390
+ json: "json";
4391
+ form: "form";
4392
+ query: "query";
4393
+ raw: "raw";
4394
+ }>>;
4395
+ actionInputSchema: z.ZodOptional<z.ZodType<JSONSchema7, JSONSchema7, z.core.$ZodTypeInternals<JSONSchema7, JSONSchema7>>>;
4396
+ actionOutputSchema: z.ZodOptional<z.ZodType<JSONSchema7, JSONSchema7, z.core.$ZodTypeInternals<JSONSchema7, JSONSchema7>>>;
4397
+ actionGraphqlDocument: z.ZodOptional<z.ZodString>;
4398
+ }, z.core.$strip>, z.ZodObject<{
4399
+ type: z.ZodLiteral<"postgres">;
4400
+ postgres: z.ZodOptional<z.ZodString>;
4401
+ select: z.ZodOptional<z.ZodString>;
4402
+ insert: z.ZodOptional<z.ZodString>;
4403
+ update: z.ZodOptional<z.ZodString>;
4404
+ delete: z.ZodOptional<z.ZodString>;
4405
+ params: z.ZodOptional<z.ZodString>;
4406
+ condition: z.ZodOptional<z.ZodString>;
4407
+ }, z.core.$strip>, z.ZodObject<{
4408
+ type: z.ZodLiteral<"database">;
4409
+ database: z.ZodString;
4410
+ operation: z.ZodEnum<{
4411
+ query: "query";
4412
+ insert: "insert";
4413
+ update: "update";
4414
+ delete: "delete";
4415
+ transaction: "transaction";
4416
+ }>;
4417
+ condition: z.ZodOptional<z.ZodString>;
4418
+ run: z.ZodString;
4419
+ }, z.core.$strip>, z.ZodObject<{
4420
+ type: z.ZodLiteral<"disk">;
4421
+ operation: z.ZodOptional<z.ZodEnum<{
4422
+ exec: "exec";
4423
+ copy_file: "copy_file";
4424
+ }>>;
4425
+ disk: z.ZodString;
4426
+ command: z.ZodOptional<z.ZodString>;
4427
+ path: z.ZodOptional<z.ZodString>;
4428
+ file: z.ZodOptional<z.ZodString>;
4429
+ overwrite: z.ZodOptional<z.ZodLiteral<"replace">>;
4430
+ }, z.core.$strip>, z.ZodObject<{
4431
+ type: z.ZodLiteral<"shell">;
4432
+ computer: z.ZodString;
4433
+ command: z.ZodString;
4434
+ }, z.core.$strip>, z.ZodObject<{
4435
+ type: z.ZodLiteral<"device">;
4436
+ operation: z.ZodString;
4437
+ device: z.ZodOptional<z.ZodString>;
4438
+ devices: z.ZodOptional<z.ZodObject<{
4439
+ tags: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
4440
+ os: z.ZodOptional<z.ZodEnum<{
4441
+ windows: "windows";
4442
+ linux: "linux";
4443
+ macos: "macos";
4444
+ }>>;
4445
+ }, z.core.$strict>>;
4446
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
4447
+ waitSeconds: z.ZodOptional<z.ZodNumber>;
4448
+ }, z.core.$strip>, z.ZodObject<{
4449
+ type: z.ZodLiteral<"agent">;
4450
+ agent: z.ZodString;
4451
+ model: z.ZodOptional<z.ZodString>;
4452
+ prompt: z.ZodOptional<z.ZodString>;
4453
+ profile: z.ZodOptional<z.ZodString>;
4454
+ role: z.ZodOptional<z.ZodString>;
4455
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
4456
+ system: z.ZodOptional<z.ZodString>;
4457
+ }, z.core.$strip>, z.ZodObject<{
4458
+ type: z.ZodLiteral<"scrape">;
4459
+ url: z.ZodOptional<z.ZodString>;
4460
+ onlyMainContent: z.ZodOptional<z.ZodBoolean>;
4461
+ formats: z.ZodOptional<z.ZodArray<z.ZodString>>;
4462
+ maxAge: z.ZodOptional<z.ZodNumber>;
4463
+ parsers: z.ZodOptional<z.ZodArray<z.ZodString>>;
4464
+ }, z.core.$strip>, z.ZodObject<{
4465
+ type: z.ZodLiteral<"search">;
4466
+ provider: z.ZodOptional<z.ZodEnum<{
4467
+ firecrawl: "firecrawl";
4468
+ telem: "telem";
4469
+ }>>;
4470
+ query: z.ZodOptional<z.ZodString>;
4471
+ limit: z.ZodOptional<z.ZodNumber>;
4472
+ sources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
4473
+ web: "web";
4474
+ news: "news";
4475
+ images: "images";
4476
+ }>>>;
4477
+ categories: z.ZodOptional<z.ZodArray<z.ZodEnum<{
4478
+ github: "github";
4479
+ research: "research";
4480
+ pdf: "pdf";
4481
+ }>>>;
4482
+ location: z.ZodOptional<z.ZodString>;
4483
+ country: z.ZodOptional<z.ZodString>;
4484
+ tbs: z.ZodOptional<z.ZodString>;
4485
+ includeDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
4486
+ excludeDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
4487
+ scrapeFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
4488
+ }, z.core.$strip>, z.ZodObject<{
4489
+ type: z.ZodLiteral<"parallel">;
4490
+ operation: z.ZodEnum<{
4491
+ search: "search";
4492
+ extract: "extract";
4493
+ findall: "findall";
4494
+ }>;
4495
+ objective: z.ZodOptional<z.ZodString>;
4496
+ urls: z.ZodOptional<z.ZodString>;
4497
+ searchQueries: z.ZodOptional<z.ZodString>;
4498
+ mode: z.ZodOptional<z.ZodEnum<{
4499
+ "one-shot": "one-shot";
4500
+ agentic: "agentic";
4501
+ fast: "fast";
4502
+ }>>;
4503
+ excerptsMaxCharsPerResult: z.ZodOptional<z.ZodNumber>;
4504
+ excerptsMaxCharsTotal: z.ZodOptional<z.ZodNumber>;
4505
+ excerpts: z.ZodOptional<z.ZodBoolean>;
4506
+ fullContent: z.ZodOptional<z.ZodBoolean>;
4507
+ entityType: z.ZodOptional<z.ZodString>;
4508
+ generator: z.ZodOptional<z.ZodEnum<{
4509
+ base: "base";
4510
+ core: "core";
4511
+ pro: "pro";
4512
+ preview: "preview";
4513
+ }>>;
4514
+ matchConditions: z.ZodOptional<z.ZodString>;
4515
+ matchLimit: z.ZodOptional<z.ZodNumber>;
4516
+ excludeList: z.ZodOptional<z.ZodString>;
4517
+ pollInterval: z.ZodOptional<z.ZodNumber>;
4518
+ pollIntervalUnit: z.ZodOptional<z.ZodEnum<{
4519
+ seconds: "seconds";
4520
+ minutes: "minutes";
4521
+ }>>;
4522
+ pollTimeout: z.ZodOptional<z.ZodNumber>;
4523
+ pollTimeoutUnit: z.ZodOptional<z.ZodEnum<{
4524
+ seconds: "seconds";
4525
+ minutes: "minutes";
4526
+ }>>;
4527
+ }, z.core.$strip>, z.ZodObject<{
4528
+ type: z.ZodLiteral<"stream">;
4529
+ stream: z.ZodString;
4530
+ version: z.ZodString;
4531
+ filter: z.ZodString;
4532
+ }, z.core.$strip>, z.ZodObject<{
4533
+ type: z.ZodLiteral<"switch">;
4534
+ cases: z.ZodArray<z.ZodString>;
4535
+ router: z.ZodOptional<z.ZodString>;
4536
+ }, z.core.$strip>, z.ZodObject<{
4537
+ type: z.ZodLiteral<"wait">;
4538
+ amount: z.ZodOptional<z.ZodNumber>;
4539
+ unit: z.ZodOptional<z.ZodEnum<{
4540
+ seconds: "seconds";
4541
+ minutes: "minutes";
4542
+ hours: "hours";
4543
+ days: "days";
4544
+ }>>;
4545
+ secondsFromConfig: z.ZodOptional<z.ZodString>;
4546
+ }, z.core.$strip>], "type">, z.ZodObject<{
4547
+ failurePolicy: z.ZodOptional<z.ZodObject<{
4548
+ strategy: z.ZodEnum<{
4549
+ fail: "fail";
4550
+ retry: "retry";
4551
+ skip: "skip";
4552
+ fallback: "fallback";
4553
+ }>;
4554
+ maxRetries: z.ZodOptional<z.ZodNumber>;
4555
+ backoffMs: z.ZodOptional<z.ZodNumber>;
4556
+ fallbackValue: z.ZodOptional<z.ZodUnknown>;
4557
+ }, z.core.$strip>>;
4558
+ }, z.core.$strip>>;
4559
+ type NodeType = keyof typeof nodeTypeMap;
4560
+ type WorkflowNodeConfig = z.infer<typeof workflowNodeConfigSchema>;
4561
+
4562
+ /**
4563
+ * Executable config fields that may be a plain string or `@ts` / `@sql`.
4564
+ *
4565
+ * A runtime resolves these fields at execution time, so the definition records
4566
+ * which form each one was written in. Fields that must return non-strings
4567
+ * (objects, arrays) or that are code-only by design stay off this list.
4568
+ */
4569
+ declare const EXECUTABLE_STRING_FIELDS: Partial<Record<NodeType, readonly string[]>>;
4570
+ /** Build the `configValueKinds` sidecar from a node's parsed `configFields`. */
4571
+ declare function buildConfigValueKindsFromNodeDecl(node: {
4572
+ type: string;
4573
+ configFields: Record<string, ConfigValue>;
4574
+ }): Record<string, ConfigValueKind> | undefined;
4575
+ /** Build a node's `config` in the definition from its parsed declaration. */
4576
+ declare function buildWorkflowNodeConfigFromNodeDecl(node: {
4577
+ type: string;
4578
+ configFields: Record<string, ConfigValue>;
4579
+ }): WorkflowNodeConfig;
4580
+ /** Replace inline subgraphs with synthetic workflow declarations. */
4581
+ declare function flattenInlineSubgraphsInGraph(graph: WorkflowDecl): {
4582
+ graph: WorkflowDecl;
4583
+ synthesizedGraphs: WorkflowDecl[];
4584
+ };
4585
+
4586
+ interface SkillDeployStat {
4587
+ isSymbolicLink: boolean;
4588
+ isFile: boolean;
4589
+ isDirectory: boolean;
4590
+ mode?: number;
4591
+ }
4592
+ /** Filesystem surface for resolving local skill trees at deploy time. */
4593
+ interface SkillDeployFs extends DeployBundleFs {
4594
+ readFileBuffer(path: string): Uint8Array;
4595
+ lstatSync(path: string): SkillDeployStat;
4596
+ }
4597
+ /** Adapt a text-only {@link DeployBundleFs} for skill resolution in tests/archives. */
4598
+ declare function deployBundleToSkillDeployFs(fs: DeployBundleFs): SkillDeployFs;
4599
+
4600
+ declare function createNodeDeployBundleFs(nodeFs: typeof fs): SkillDeployFs;
4601
+
4602
+ /**
4603
+ * The hash a signed dispatch commits to: SHA-256 of the script's UTF-8
4604
+ * bytes. The API recomputes this on ingest and the daemon recomputes it
4605
+ * before running, so all three sides hash the same bytes.
4606
+ */
4607
+ declare function operationScriptSha256(script: string): string;
4608
+ /**
4609
+ * Turn a parsed `operation` block into what a deployment carries. The script
4610
+ * is taken as written (an inline block already has its indentation removed,
4611
+ * a file is read byte for byte) and hashed here.
4612
+ */
4613
+ declare function compileOperationBlock(operation: OperationDecl): Omit<DeploymentDefinitionOperationBlock, 'id'>;
4614
+
4615
+ /**
4616
+ * SHA-256 hex digest of `data`. Strings are hashed as UTF-8 (Node's default), so
4617
+ * this matches every hashing site in this package that previously inlined
4618
+ * `createHash('sha256')`. The single content-addressing primitive for deploy.
4619
+ */
4620
+ declare function sha256Hex(data: Uint8Array | string): string;
4621
+
4622
+ /**
4623
+ * Content-addressed checksum: sha256 over sorted `(relativePath, sha256(bytes))`
4624
+ * lines. File mode is excluded.
4625
+ */
4626
+ declare function computeSkillChecksum(files: SkillFileEntry[]): string;
4627
+
4628
+ /**
4629
+ * Classify a resolved skill tree as knowledge-only or executable.
4630
+ * Deterministic signals: shebang, script extension, scripts/bin path segment.
4631
+ * File mode bits are intentionally excluded for cross-OS consistency.
4632
+ */
4633
+ declare function classifySkillBundle(files: SkillFileEntry[]): SkillClassificationResult;
4634
+
4635
+ /**
4636
+ * Resolve each referenced skill block to its local tree for the deploy payload.
4637
+ * Does not compute checksums — the server content-addresses received bytes.
4638
+ */
4639
+ declare function collectDeploymentSkillFiles(fs: SkillDeployFs, cwd: string, skillBlocks: SkillBlockRef[]): DeploymentSkillFilesBundle[];
4640
+ declare function collectReferencedSkillBlocksFromAst(ast: {
4641
+ skill?: SkillBlockRef[];
4642
+ agent?: Array<{
4643
+ skills?: string[];
4644
+ profiles?: Array<{
4645
+ skills?: string[];
4646
+ }>;
4647
+ }>;
4648
+ }): SkillBlockRef[];
4649
+
4650
+ /** Canonical skills root relative to the project directory. */
4651
+ declare const AGENTS_SKILLS_DIR = ".agents/skills";
4652
+ declare const SKILL_MD_FILENAME = "SKILL.md";
4653
+ /** ≤ 1 MB per file. */
4654
+ declare const MAX_SKILL_FILE_BYTES: number;
4655
+ /** ≤ 5 MB per skill tree. */
4656
+ declare const MAX_SKILL_TREE_BYTES: number;
4657
+ /** ≤ 200 files per skill tree. */
4658
+ declare const MAX_SKILL_FILES = 200;
4659
+ declare function isKnownScriptExtension(relativePath: string): boolean;
4660
+ declare function isScriptsOrBinDirectory(relativePath: string): boolean;
4661
+
4662
+ /**
4663
+ * Read optional `name` and `description` from SKILL.md YAML frontmatter.
4664
+ */
4665
+ declare function parseSkillMdFrontmatter(input: Uint8Array | string): SkillMdFrontmatter;
4666
+
4667
+ /**
4668
+ * Walk `<skillsRoot>/<skillName>/` under `projectRoot` (`.agents/skills` by
4669
+ * default), require `SKILL.md`, reject symlinks and path escape, and enforce
4670
+ * size/file-count caps. Files are read as bytes.
4671
+ */
4672
+ declare function resolveSkillTree(fs: SkillDeployFs, projectRoot: string, skillName: string, skillsRoot?: string): SkillFileEntry[];
4673
+
4674
+ declare function normalizeDeploymentSourcePath(path: string): string;
4675
+ declare function collectDeploymentSourceFiles(fs: DeployBundleFs, cwd: string): DeploymentSourceFileContent[];
4676
+ declare function computeDeploymentSourceFingerprint(files: Array<Pick<DeploymentSourceFileContent, 'path' | 'sha256'>>): string;
4677
+ /**
4678
+ * Combined fingerprint uses persisted sourceFingerprint when available.
4679
+ * Deployments without a source row treat source as null (pre-source deployments).
4680
+ */
4681
+ declare function combineDeploymentAndSourceFingerprints(definitionFingerprint: string, sourceFingerprint: string | null | undefined): string;
4682
+ declare function validateDeploymentSourceInput(files: DeploymentSourceFileContent[] | undefined, manifest: DeploymentSourceManifest | undefined): void;
4683
+ declare function buildDeploymentSourceManifest({ definition, ast, files, }: {
4684
+ definition: DeploymentDefinition;
4685
+ ast: SwirlsFile;
4686
+ files: DeploymentSourceFileContent[];
4687
+ }): DeploymentSourceManifest;
4688
+
4689
+ /**
4690
+ * Recursively strip `range`, `innerRange`, `flowRange`, `inputSchemaBlock`,
4691
+ * `outputSchemaBlock`, `schemaBlock`, and `docComment` fields from an AST value,
4692
+ * and the `sourcePath` and `sourceMount` marks merging adds to each declaration.
4693
+ * These are editor/LSP-only metadata and not meaningful for deployment.
4694
+ */
4695
+ declare function stripEditorMetadata(value: unknown): unknown;
4696
+
4697
+ export { AGENTS_SKILLS_DIR, type BuildDefinitionOptions, COMPUTER_BASELINE_KIT, COMPUTER_BASELINE_PACKAGES, COMPUTER_HARNESS_RESOURCE_DEFAULTS, COMPUTER_HARNESS_RUNTIME, COMPUTER_MOUNT_KIT, COMPUTER_MOUNT_PACKAGES, COMPUTER_RESOURCE_DEFAULTS, type CompiledComputer, type CompiledComputerHarness, type ComputerHarnessBake, type ComputerHarnessInput, type ComputerRecipeInput, type DeployBundleDirent, type DeployBundleFs, type DeploymentDefinition, type DeploymentSkillFilePayload, type DeploymentSkillFilesBundle, type DeploymentSourceFileContent, type DeploymentSourceManifest, type DeploymentSourceManifestV2, type DeploymentSourceResourceKind, type DeploymentSourceResourceKindV2, type Diagnostic, EXECUTABLE_STRING_FIELDS, HARNESS_DEBIAN_STAGE_DIR, HARNESS_PROVIDERS, HARNESS_ROOT_DIR, type HarnessCatalog, type HarnessDebianPackage, type HarnessProvider, type HarnessRuntimePackage, type LanguageHost, type LowerDiagnostic, type LowerMountsOptions, type LowerMountsResult, type LowerOptions, type LowerResult, type LowerStage, MAX_SKILL_FILES, MAX_SKILL_FILE_BYTES, MAX_SKILL_TREE_BYTES, MOUNT_SKILLS_ROOT, type MergeProjectOptions, type MountDiagnostic, type MountFingerprint, type MountSite, type MountSkillFiles, type MountSourceFile, type OpenUiSupport, type ProviderCatalog, SKILL_MD_FILENAME, type SkillBlockRef, type SkillBundle, type SkillClassificationResult, type SkillDeployFs, type SkillDeployStat, type SkillFileEntry, type SkillMdFrontmatter, type SourceRange, type SwirlsFile, type SwirlsMount, type SwirlsMountFiles, type SwirlsSources, buildConfigValueKindsFromNodeDecl, buildDeploymentDefinitionPayload, buildDeploymentSourceManifest, buildWorkflowNodeConfigFromNodeDecl, canonicalizeForStableJson, classifySkillBundle, collectDeploymentSkillFiles, collectDeploymentSourceFiles, collectReferencedSkillBlocksFromAst, collectSwirlsFiles, combineDeploymentAndSourceFingerprints, compileComputerRecipe, compileOperationBlock, computeDefinitionHash, computeDeploymentDefinitionFingerprint, computeDeploymentSourceFingerprint, computeSkillChecksum, computerHarnessBake, computerSnapshotName, createMemoryRepoFs, createNodeDeployBundleFs, daytonaSnapshotResources, deployBundleToSkillDeployFs, deployBundleToWorkspaceFileSystem, deploymentSourceManifestV2Schema, flattenArchivePathMap, flattenInlineSubgraphsInGraph, floxManifestToml, harnessPrepScript, harnessRuntimePackages, isHarnessProvider, isKnownScriptExtension, isScriptsOrBinDirectory, lowerSwirlsMounts, lowerSwirlsSources, mergeProjectSwirlsFiles, normalizeDeploymentSourcePath, operationScriptSha256, parseDeploymentDefinition, parseDeploymentSourceManifestV2, parseSkillMdFrontmatter, platformComputerSnapshotName, recipePackages, resolveSkillTree, sha256Hex, sliceRepoFilesToRoot, stripEditorMetadata, swirlsHost, uuidv7, validateDeploymentSourceInput, virtualRepoCwd };