@swirls/deploy 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/dist/index.d.ts +69 -51
- package/dist/index.js +910 -824
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../definition/src/deployment-definition.ts
|
|
2
|
-
import { z as
|
|
2
|
+
import { z as z9 } from "zod";
|
|
3
3
|
|
|
4
4
|
// ../definition/src/app-audience.ts
|
|
5
5
|
import { z } from "zod";
|
|
@@ -320,47 +320,121 @@ var deviceSelectorSchema = z5.strictObject({
|
|
|
320
320
|
);
|
|
321
321
|
|
|
322
322
|
// ../definition/src/goal.ts
|
|
323
|
-
import { z as
|
|
323
|
+
import { z as z8 } from "zod";
|
|
324
324
|
|
|
325
|
-
// ../definition/src/
|
|
325
|
+
// ../definition/src/file-values.ts
|
|
326
326
|
import { z as z6 } from "zod";
|
|
327
|
-
var
|
|
328
|
-
var
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
327
|
+
var FILE_HANDLE_KIND = "swirls.file";
|
|
328
|
+
var FILE_VALUE_MAX_BYTES = 25 * 1024 * 1024;
|
|
329
|
+
var FILE_GRANT_MAX_BYTES = 100 * 1024 * 1024;
|
|
330
|
+
var FILE_PROJECT_MAX_BYTES = 1024 * 1024 * 1024;
|
|
331
|
+
var fileUploadGrantPurposeSchema = z6.enum([
|
|
332
|
+
"workflow_input",
|
|
333
|
+
"review",
|
|
334
|
+
"form",
|
|
335
|
+
"cli",
|
|
336
|
+
"chat",
|
|
337
|
+
"execution"
|
|
338
|
+
]);
|
|
339
|
+
var TEXT_PRESENTABLE_MEDIA_TYPES = ["text/plain", "text/html", "text/markdown"];
|
|
340
|
+
var textPresentableMediaTypeSet = new Set(TEXT_PRESENTABLE_MEDIA_TYPES);
|
|
341
|
+
var fileHandleSchema = z6.object({
|
|
342
|
+
kind: z6.literal(FILE_HANDLE_KIND),
|
|
343
|
+
id: z6.string().min(1),
|
|
344
|
+
mediaType: z6.string().min(1),
|
|
345
|
+
name: z6.string().min(1),
|
|
346
|
+
size: z6.number().int().nonnegative(),
|
|
347
|
+
sha256: z6.string().min(1).optional()
|
|
348
|
+
}).strict();
|
|
349
|
+
var FILE_BLOB_KIND = "swirls.blob";
|
|
350
|
+
var fileBlobFields = {
|
|
351
|
+
kind: z6.literal(FILE_BLOB_KIND),
|
|
352
|
+
mediaType: z6.string().min(1),
|
|
353
|
+
name: z6.string().min(1)
|
|
354
|
+
};
|
|
355
|
+
var fileBlobSchema = z6.union([
|
|
356
|
+
z6.object({ ...fileBlobFields, base64: z6.string() }).strict(),
|
|
357
|
+
z6.object({ ...fileBlobFields, text: z6.string() }).strict()
|
|
358
|
+
]);
|
|
359
|
+
var fileObjectStatusSchema = z6.enum(["pending", "ready"]);
|
|
360
|
+
var fileRetentionSchema = z6.discriminatedUnion("mode", [
|
|
361
|
+
z6.object({ mode: z6.literal("forever") }),
|
|
362
|
+
z6.object({ mode: z6.literal("days"), days: z6.number().int().positive() })
|
|
363
|
+
]);
|
|
364
|
+
var RETENTION_DAYS_PATTERN = /^([0-9]+)d$/;
|
|
365
|
+
function parseFileRetentionLiteral(literal) {
|
|
366
|
+
const trimmed = literal.trim();
|
|
367
|
+
if (trimmed === "forever") {
|
|
368
|
+
return { mode: "forever" };
|
|
369
|
+
}
|
|
370
|
+
const match = RETENTION_DAYS_PATTERN.exec(trimmed);
|
|
371
|
+
const daysText = match?.[1];
|
|
372
|
+
if (daysText === void 0) {
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
const days = Number(daysText);
|
|
376
|
+
if (!Number.isSafeInteger(days) || days <= 0) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
return { mode: "days", days };
|
|
380
|
+
}
|
|
381
|
+
var FILE_RETENTION_SYNTAX_HINT = "retention must be forever or a day count like 30d";
|
|
382
|
+
var fileUploadGrantResponseSchema = z6.object({
|
|
383
|
+
id: z6.uuid(),
|
|
384
|
+
projectId: z6.uuid(),
|
|
385
|
+
expiresAt: z6.string(),
|
|
386
|
+
maxBytes: z6.number().int().positive(),
|
|
387
|
+
maxFiles: z6.number().int().positive()
|
|
388
|
+
});
|
|
389
|
+
var initFileUploadResponseSchema = z6.object({
|
|
390
|
+
objectId: z6.uuid(),
|
|
391
|
+
uploadUrl: z6.url(),
|
|
392
|
+
expiresAt: z6.string()
|
|
393
|
+
});
|
|
394
|
+
var previewFileResponseSchema = z6.object({
|
|
395
|
+
url: z6.url(),
|
|
396
|
+
expiresAt: z6.string()
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
// ../definition/src/schemas.ts
|
|
400
|
+
import { z as z7 } from "zod";
|
|
401
|
+
var positionSchema = z7.object({ x: z7.number(), y: z7.number() });
|
|
402
|
+
var jsonSchemaSchema = z7.lazy(
|
|
403
|
+
() => z7.object({
|
|
404
|
+
$schema: z7.string().optional(),
|
|
405
|
+
$id: z7.string().optional(),
|
|
406
|
+
$ref: z7.string().optional(),
|
|
407
|
+
$defs: z7.record(z7.string(), jsonSchemaSchema).optional(),
|
|
408
|
+
type: z7.union([z7.custom(), z7.array(z7.custom())]).optional(),
|
|
409
|
+
properties: z7.record(z7.string(), jsonSchemaSchema).optional(),
|
|
410
|
+
required: z7.array(z7.string()).optional(),
|
|
411
|
+
title: z7.string().optional(),
|
|
412
|
+
description: z7.string().optional(),
|
|
413
|
+
default: z7.custom().optional(),
|
|
414
|
+
examples: z7.array(z7.custom()).optional(),
|
|
415
|
+
items: z7.union([jsonSchemaSchema, z7.array(jsonSchemaSchema)]).optional(),
|
|
416
|
+
additionalProperties: z7.union([z7.boolean(), jsonSchemaSchema]).optional(),
|
|
417
|
+
patternProperties: z7.record(z7.string(), jsonSchemaSchema).optional(),
|
|
344
418
|
// General validations
|
|
345
|
-
enum:
|
|
346
|
-
const:
|
|
419
|
+
enum: z7.array(z7.custom()).optional(),
|
|
420
|
+
const: z7.custom().optional(),
|
|
347
421
|
// Number validations
|
|
348
|
-
minimum:
|
|
349
|
-
maximum:
|
|
422
|
+
minimum: z7.number().optional(),
|
|
423
|
+
maximum: z7.number().optional(),
|
|
350
424
|
// String validations
|
|
351
|
-
minLength:
|
|
352
|
-
maxLength:
|
|
353
|
-
pattern:
|
|
425
|
+
minLength: z7.number().optional(),
|
|
426
|
+
maxLength: z7.number().optional(),
|
|
427
|
+
pattern: z7.string().optional(),
|
|
354
428
|
/** RFC draft: hint for string encoding (e.g. text/markdown for markdown projection). */
|
|
355
|
-
contentMediaType:
|
|
429
|
+
contentMediaType: z7.string().optional(),
|
|
356
430
|
// Array validations
|
|
357
|
-
minItems:
|
|
358
|
-
maxItems:
|
|
359
|
-
uniqueItems:
|
|
431
|
+
minItems: z7.number().optional(),
|
|
432
|
+
maxItems: z7.number().optional(),
|
|
433
|
+
uniqueItems: z7.boolean().optional(),
|
|
360
434
|
// Composition
|
|
361
|
-
allOf:
|
|
362
|
-
anyOf:
|
|
363
|
-
oneOf:
|
|
435
|
+
allOf: z7.array(jsonSchemaSchema).optional(),
|
|
436
|
+
anyOf: z7.array(jsonSchemaSchema).optional(),
|
|
437
|
+
oneOf: z7.array(jsonSchemaSchema).optional(),
|
|
364
438
|
not: jsonSchemaSchema.optional(),
|
|
365
439
|
if: jsonSchemaSchema.optional(),
|
|
366
440
|
else: jsonSchemaSchema.optional(),
|
|
@@ -392,8 +466,8 @@ var nodeTypeMap = {
|
|
|
392
466
|
while: "while",
|
|
393
467
|
agent: "agent"
|
|
394
468
|
};
|
|
395
|
-
var nodeTypeSchema =
|
|
396
|
-
var outputFormatSchema =
|
|
469
|
+
var nodeTypeSchema = z7.union([z7.enum(Object.values(nodeTypeMap)), z7.literal("graph")]).transform((v) => v === "graph" ? nodeTypeMap.workflow : v);
|
|
470
|
+
var outputFormatSchema = z7.enum([
|
|
397
471
|
"markdown",
|
|
398
472
|
"html",
|
|
399
473
|
"text",
|
|
@@ -403,202 +477,256 @@ var outputFormatSchema = z6.enum([
|
|
|
403
477
|
"mixed",
|
|
404
478
|
"json"
|
|
405
479
|
]);
|
|
406
|
-
var configValueKindSchema =
|
|
407
|
-
var
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
480
|
+
var configValueKindSchema = z7.enum(["literal", "ts", "sql"]);
|
|
481
|
+
var emailContentSchema = z7.object({
|
|
482
|
+
kind: z7.literal("email"),
|
|
483
|
+
from: z7.string().optional(),
|
|
484
|
+
to: z7.string(),
|
|
485
|
+
cc: z7.string().optional(),
|
|
486
|
+
bcc: z7.string().optional(),
|
|
487
|
+
replyTo: z7.string().optional(),
|
|
488
|
+
subject: z7.string(),
|
|
489
|
+
text: z7.string().optional(),
|
|
490
|
+
html: z7.string().optional()
|
|
491
|
+
});
|
|
492
|
+
var fileContentSchema = z7.object({
|
|
493
|
+
kind: z7.literal("file"),
|
|
494
|
+
file: fileHandleSchema,
|
|
495
|
+
alt: z7.string().optional()
|
|
496
|
+
});
|
|
497
|
+
var contentSchema = z7.lazy(
|
|
498
|
+
() => z7.union([
|
|
499
|
+
z7.object({
|
|
500
|
+
kind: z7.literal("text"),
|
|
501
|
+
text: z7.string(),
|
|
502
|
+
data: z7.unknown().optional()
|
|
413
503
|
}),
|
|
414
|
-
|
|
415
|
-
kind:
|
|
416
|
-
markdown:
|
|
417
|
-
data:
|
|
504
|
+
z7.object({
|
|
505
|
+
kind: z7.literal("markdown"),
|
|
506
|
+
markdown: z7.string(),
|
|
507
|
+
data: z7.unknown().optional()
|
|
418
508
|
}),
|
|
419
|
-
|
|
420
|
-
kind:
|
|
421
|
-
html:
|
|
422
|
-
data:
|
|
509
|
+
z7.object({
|
|
510
|
+
kind: z7.literal("html"),
|
|
511
|
+
html: z7.string(),
|
|
512
|
+
data: z7.unknown().optional()
|
|
423
513
|
}),
|
|
424
|
-
|
|
425
|
-
kind:
|
|
426
|
-
url:
|
|
427
|
-
mime:
|
|
428
|
-
alt:
|
|
429
|
-
data:
|
|
514
|
+
z7.object({
|
|
515
|
+
kind: z7.literal("image"),
|
|
516
|
+
url: z7.string(),
|
|
517
|
+
mime: z7.string().optional(),
|
|
518
|
+
alt: z7.string().optional(),
|
|
519
|
+
data: z7.unknown().optional()
|
|
430
520
|
}),
|
|
431
|
-
|
|
432
|
-
kind:
|
|
433
|
-
url:
|
|
434
|
-
mime:
|
|
435
|
-
poster:
|
|
436
|
-
data:
|
|
521
|
+
z7.object({
|
|
522
|
+
kind: z7.literal("video"),
|
|
523
|
+
url: z7.string(),
|
|
524
|
+
mime: z7.string().optional(),
|
|
525
|
+
poster: z7.string().optional(),
|
|
526
|
+
data: z7.unknown().optional()
|
|
437
527
|
}),
|
|
438
|
-
|
|
439
|
-
kind:
|
|
440
|
-
url:
|
|
441
|
-
mime:
|
|
442
|
-
data:
|
|
528
|
+
z7.object({
|
|
529
|
+
kind: z7.literal("audio"),
|
|
530
|
+
url: z7.string(),
|
|
531
|
+
mime: z7.string().optional(),
|
|
532
|
+
data: z7.unknown().optional()
|
|
443
533
|
}),
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
534
|
+
emailContentSchema,
|
|
535
|
+
fileContentSchema,
|
|
536
|
+
z7.object({
|
|
537
|
+
kind: z7.literal("json"),
|
|
538
|
+
value: z7.unknown()
|
|
447
539
|
}),
|
|
448
|
-
|
|
449
|
-
kind:
|
|
450
|
-
parts:
|
|
540
|
+
z7.object({
|
|
541
|
+
kind: z7.literal("mixed"),
|
|
542
|
+
parts: z7.array(contentSchema)
|
|
451
543
|
})
|
|
452
544
|
])
|
|
453
545
|
);
|
|
454
|
-
var aiKindSchema =
|
|
455
|
-
var aiProviderSchema =
|
|
456
|
-
var aiImageOptionsSchema =
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
546
|
+
var aiKindSchema = z7.enum(["text", "object", "image", "audio", "video", "embed"]);
|
|
547
|
+
var aiProviderSchema = z7.enum(["openrouter", "anthropic", "openai", "google"]);
|
|
548
|
+
var aiImageOptionsSchema = z7.object({
|
|
549
|
+
/** How many images to make. Above 1, the node outputs a list of file handles. */
|
|
550
|
+
n: z7.number().int().min(1).max(10).optional(),
|
|
551
|
+
/** Pixel size (`"1024x1024"`) or a tier (`"2K"`). */
|
|
552
|
+
size: z7.string().optional(),
|
|
553
|
+
/** For example `"16:9"`. */
|
|
554
|
+
aspectRatio: z7.string().optional(),
|
|
555
|
+
/** For example `"1K"` or `"2K"`. */
|
|
556
|
+
resolution: z7.string().optional(),
|
|
557
|
+
/** For example `"low"`, `"medium"` or `"high"`. */
|
|
558
|
+
quality: z7.string().optional(),
|
|
559
|
+
format: z7.enum(["png", "jpeg", "webp"]).optional(),
|
|
560
|
+
background: z7.enum(["auto", "transparent", "opaque"]).optional(),
|
|
561
|
+
seed: z7.number().int().optional()
|
|
562
|
+
}).strict();
|
|
563
|
+
var aiAudioOptionsSchema = z7.object({
|
|
564
|
+
/** Voices are specific to the model. Most models require one. */
|
|
565
|
+
voice: z7.string().optional(),
|
|
566
|
+
/** The default is `mp3`. */
|
|
567
|
+
format: z7.enum(["mp3", "wav"]).optional(),
|
|
568
|
+
speed: z7.number().optional(),
|
|
569
|
+
/** Tone, pacing, emotion. */
|
|
570
|
+
instructions: z7.string().optional()
|
|
571
|
+
}).strict();
|
|
572
|
+
var aiVideoOptionsSchema = z7.object({
|
|
573
|
+
/** Length in seconds. */
|
|
574
|
+
duration: z7.number().int().optional(),
|
|
575
|
+
/** For example `"720p"`. */
|
|
576
|
+
resolution: z7.string().optional(),
|
|
577
|
+
/** For example `"16:9"`. */
|
|
578
|
+
aspectRatio: z7.string().optional(),
|
|
579
|
+
/** `"WIDTHxHEIGHT"`. */
|
|
580
|
+
size: z7.string().optional(),
|
|
581
|
+
/** Generate a sound track. */
|
|
582
|
+
audio: z7.boolean().optional(),
|
|
583
|
+
seed: z7.number().int().optional()
|
|
584
|
+
}).strict();
|
|
585
|
+
var aiEmbedOptionsSchema = z7.object({
|
|
586
|
+
/** Length of each vector. */
|
|
587
|
+
dimensions: z7.number().int().optional()
|
|
588
|
+
}).strict();
|
|
589
|
+
var aiNodeConfigSchema = z7.object({
|
|
590
|
+
type: z7.literal(nodeTypeMap.ai),
|
|
463
591
|
kind: aiKindSchema,
|
|
464
592
|
/** Which upstream API to call for this node (defaults to openrouter). */
|
|
465
593
|
provider: aiProviderSchema.optional(),
|
|
466
594
|
/** Shared across kinds; at root. */
|
|
467
|
-
model:
|
|
468
|
-
prompt:
|
|
469
|
-
temperature:
|
|
470
|
-
maxTokens:
|
|
471
|
-
/** Kind-specific options only
|
|
472
|
-
options:
|
|
595
|
+
model: z7.string().optional(),
|
|
596
|
+
prompt: z7.string().optional(),
|
|
597
|
+
temperature: z7.number().optional(),
|
|
598
|
+
maxTokens: z7.number().optional(),
|
|
599
|
+
/** Kind-specific options only: see the `ai*OptionsSchema` of the node's kind. */
|
|
600
|
+
options: z7.record(z7.string(), z7.unknown()).optional()
|
|
473
601
|
});
|
|
474
|
-
var codeNodeConfigSchema =
|
|
475
|
-
type:
|
|
476
|
-
code:
|
|
602
|
+
var codeNodeConfigSchema = z7.object({
|
|
603
|
+
type: z7.literal(nodeTypeMap.code),
|
|
604
|
+
code: z7.string().optional()
|
|
477
605
|
});
|
|
478
|
-
var httpNodeConfigSchema =
|
|
479
|
-
type:
|
|
480
|
-
url:
|
|
481
|
-
method:
|
|
482
|
-
headers:
|
|
483
|
-
body:
|
|
606
|
+
var httpNodeConfigSchema = z7.object({
|
|
607
|
+
type: z7.literal(nodeTypeMap.http),
|
|
608
|
+
url: z7.string().optional(),
|
|
609
|
+
method: z7.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional(),
|
|
610
|
+
headers: z7.string().optional(),
|
|
611
|
+
body: z7.string().optional(),
|
|
484
612
|
/** Private connectivity realm selected by the authoring declaration. */
|
|
485
|
-
network:
|
|
613
|
+
network: z7.string().optional()
|
|
486
614
|
});
|
|
487
|
-
var integrationNodeConfigSchema =
|
|
488
|
-
type:
|
|
489
|
-
connection:
|
|
490
|
-
action:
|
|
491
|
-
method:
|
|
492
|
-
path:
|
|
493
|
-
params:
|
|
494
|
-
encoding:
|
|
615
|
+
var integrationNodeConfigSchema = z7.object({
|
|
616
|
+
type: z7.literal(nodeTypeMap.integration),
|
|
617
|
+
connection: z7.string().optional(),
|
|
618
|
+
action: z7.string().optional(),
|
|
619
|
+
method: z7.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional(),
|
|
620
|
+
path: z7.string().optional(),
|
|
621
|
+
params: z7.string().optional(),
|
|
622
|
+
encoding: z7.enum(["json", "form", "query", "raw"]).optional(),
|
|
495
623
|
/** Resolved at deploy from the referenced action block's input schema. */
|
|
496
624
|
actionInputSchema: jsonSchemaSchema.optional(),
|
|
497
625
|
/** Resolved at deploy from the referenced action block's output schema. */
|
|
498
626
|
actionOutputSchema: jsonSchemaSchema.optional(),
|
|
499
627
|
/** Resolved at deploy from the referenced action block's GraphQL document. */
|
|
500
|
-
actionGraphqlDocument:
|
|
628
|
+
actionGraphqlDocument: z7.string().optional()
|
|
501
629
|
});
|
|
502
|
-
var streamNodeConfigSchema =
|
|
503
|
-
type:
|
|
630
|
+
var streamNodeConfigSchema = z7.object({
|
|
631
|
+
type: z7.literal(nodeTypeMap.stream),
|
|
504
632
|
/** Stream block name in the same .swirls file. */
|
|
505
|
-
stream:
|
|
633
|
+
stream: z7.string(),
|
|
506
634
|
/** Persisted-schema version pin (reads versioned stream table). */
|
|
507
|
-
version:
|
|
635
|
+
version: z7.string(),
|
|
508
636
|
/** @ts code (evaluated at runtime) returning a StreamFilter object. */
|
|
509
|
-
filter:
|
|
637
|
+
filter: z7.string()
|
|
510
638
|
});
|
|
511
|
-
var emailNodeConfigSchema =
|
|
512
|
-
type:
|
|
513
|
-
from:
|
|
514
|
-
to:
|
|
515
|
-
subject:
|
|
516
|
-
text:
|
|
517
|
-
html:
|
|
518
|
-
replyTo:
|
|
639
|
+
var emailNodeConfigSchema = z7.object({
|
|
640
|
+
type: z7.literal(nodeTypeMap.email),
|
|
641
|
+
from: z7.string().optional(),
|
|
642
|
+
to: z7.string().optional(),
|
|
643
|
+
subject: z7.string().optional(),
|
|
644
|
+
text: z7.string().optional(),
|
|
645
|
+
html: z7.string().optional(),
|
|
646
|
+
replyTo: z7.string().optional()
|
|
519
647
|
});
|
|
520
|
-
var postgresNodeConfigSchema =
|
|
521
|
-
type:
|
|
522
|
-
postgres:
|
|
523
|
-
select:
|
|
524
|
-
insert:
|
|
525
|
-
update:
|
|
526
|
-
delete:
|
|
527
|
-
params:
|
|
528
|
-
condition:
|
|
648
|
+
var postgresNodeConfigSchema = z7.object({
|
|
649
|
+
type: z7.literal(nodeTypeMap.postgres),
|
|
650
|
+
postgres: z7.string().optional(),
|
|
651
|
+
select: z7.string().optional(),
|
|
652
|
+
insert: z7.string().optional(),
|
|
653
|
+
update: z7.string().optional(),
|
|
654
|
+
delete: z7.string().optional(),
|
|
655
|
+
params: z7.string().optional(),
|
|
656
|
+
condition: z7.string().optional()
|
|
529
657
|
});
|
|
530
|
-
var databaseOperationSchema =
|
|
658
|
+
var databaseOperationSchema = z7.enum([
|
|
531
659
|
"query",
|
|
532
660
|
"insert",
|
|
533
661
|
"update",
|
|
534
662
|
"delete",
|
|
535
663
|
"transaction"
|
|
536
664
|
]);
|
|
537
|
-
var databaseNodeConfigSchema =
|
|
538
|
-
type:
|
|
539
|
-
database:
|
|
665
|
+
var databaseNodeConfigSchema = z7.object({
|
|
666
|
+
type: z7.literal(nodeTypeMap.database),
|
|
667
|
+
database: z7.string(),
|
|
540
668
|
operation: databaseOperationSchema,
|
|
541
|
-
condition:
|
|
542
|
-
run:
|
|
669
|
+
condition: z7.string().optional(),
|
|
670
|
+
run: z7.string()
|
|
543
671
|
});
|
|
544
|
-
var shellNodeConfigSchema =
|
|
545
|
-
type:
|
|
672
|
+
var shellNodeConfigSchema = z7.object({
|
|
673
|
+
type: z7.literal(nodeTypeMap.shell),
|
|
546
674
|
/** DSL name of a top-level `computer` block. */
|
|
547
|
-
computer:
|
|
675
|
+
computer: z7.string(),
|
|
548
676
|
/** Bash command (@ts snippet or quoted string). */
|
|
549
|
-
command:
|
|
677
|
+
command: z7.string()
|
|
550
678
|
});
|
|
551
679
|
var DEVICE_NODE_WAIT_SECONDS_MAX = 3600;
|
|
552
|
-
var deviceNodeConfigSchema =
|
|
553
|
-
type:
|
|
680
|
+
var deviceNodeConfigSchema = z7.object({
|
|
681
|
+
type: z7.literal(nodeTypeMap.device),
|
|
554
682
|
/** DSL name of a top-level `operation` block. */
|
|
555
|
-
operation:
|
|
683
|
+
operation: z7.string(),
|
|
556
684
|
/** Id of one enrolled device (@ts snippet or quoted string). */
|
|
557
|
-
device:
|
|
685
|
+
device: z7.string().optional(),
|
|
558
686
|
/** Every active device with all of these tags and, when set, this os. */
|
|
559
687
|
devices: deviceSelectorSchema.optional(),
|
|
560
688
|
/** The operation's input: an object literal, or @ts returning an object. */
|
|
561
|
-
input:
|
|
689
|
+
input: z7.union([z7.string(), z7.record(z7.string(), z7.unknown())]).optional(),
|
|
562
690
|
/** Seconds to wait for a device to collect the run before giving up on it. */
|
|
563
|
-
waitSeconds:
|
|
691
|
+
waitSeconds: z7.number().int().min(30).max(DEVICE_NODE_WAIT_SECONDS_MAX).optional()
|
|
564
692
|
});
|
|
565
|
-
var diskNodeConfigSchema =
|
|
566
|
-
type:
|
|
567
|
-
operation:
|
|
693
|
+
var diskNodeConfigSchema = z7.object({
|
|
694
|
+
type: z7.literal(nodeTypeMap.disk),
|
|
695
|
+
operation: z7.enum(["exec", "copy_file"]).optional(),
|
|
568
696
|
/** DSL name of a top-level `disk` block. */
|
|
569
|
-
disk:
|
|
697
|
+
disk: z7.string(),
|
|
570
698
|
/** Bash command (@ts snippet or inlined string body) for exec. */
|
|
571
|
-
command:
|
|
699
|
+
command: z7.string().optional(),
|
|
572
700
|
/** Relative destination path for copy_file. */
|
|
573
|
-
path:
|
|
701
|
+
path: z7.string().optional(),
|
|
574
702
|
/** @ts snippet or literal resolving to a ready file handle for copy_file. */
|
|
575
|
-
file:
|
|
576
|
-
overwrite:
|
|
703
|
+
file: z7.string().optional(),
|
|
704
|
+
overwrite: z7.literal("replace").optional()
|
|
577
705
|
});
|
|
578
|
-
var agentNodeConfigSchema =
|
|
579
|
-
type:
|
|
706
|
+
var agentNodeConfigSchema = z7.object({
|
|
707
|
+
type: z7.literal(nodeTypeMap.agent),
|
|
580
708
|
/** DSL name of a top-level `agent` block (deployment `agentBlocks`). */
|
|
581
|
-
agent:
|
|
582
|
-
model:
|
|
709
|
+
agent: z7.string(),
|
|
710
|
+
model: z7.string().optional(),
|
|
583
711
|
/** Inlined @ts prompt body */
|
|
584
|
-
prompt:
|
|
712
|
+
prompt: z7.string().optional(),
|
|
585
713
|
/** Capability profile to narrow the agent's tools/sandbox for this node. */
|
|
586
|
-
profile:
|
|
714
|
+
profile: z7.string().optional(),
|
|
587
715
|
/** Legacy name for `profile`, still read from older deployment snapshots. */
|
|
588
|
-
role:
|
|
589
|
-
tools:
|
|
716
|
+
role: z7.string().optional(),
|
|
717
|
+
tools: z7.array(z7.string()).optional(),
|
|
590
718
|
/** Per-call system prompt @ts override (optional). */
|
|
591
|
-
system:
|
|
719
|
+
system: z7.string().optional()
|
|
592
720
|
});
|
|
593
|
-
var scrapeNodeConfigSchema =
|
|
594
|
-
type:
|
|
595
|
-
url:
|
|
596
|
-
onlyMainContent:
|
|
597
|
-
formats:
|
|
598
|
-
maxAge:
|
|
599
|
-
parsers:
|
|
721
|
+
var scrapeNodeConfigSchema = z7.object({
|
|
722
|
+
type: z7.literal(nodeTypeMap.scrape),
|
|
723
|
+
url: z7.string().optional(),
|
|
724
|
+
onlyMainContent: z7.boolean().optional(),
|
|
725
|
+
formats: z7.array(z7.string()).optional(),
|
|
726
|
+
maxAge: z7.number().optional(),
|
|
727
|
+
parsers: z7.array(z7.string()).optional()
|
|
600
728
|
});
|
|
601
|
-
var searchProviderSchema =
|
|
729
|
+
var searchProviderSchema = z7.enum(["firecrawl", "telem"]);
|
|
602
730
|
var TELEM_UNSUPPORTED_SEARCH_FIELDS = [
|
|
603
731
|
"categories",
|
|
604
732
|
"location",
|
|
@@ -608,25 +736,25 @@ var TELEM_UNSUPPORTED_SEARCH_FIELDS = [
|
|
|
608
736
|
"excludeDomains",
|
|
609
737
|
"scrapeFormats"
|
|
610
738
|
];
|
|
611
|
-
var searchNodeConfigSchema =
|
|
612
|
-
type:
|
|
739
|
+
var searchNodeConfigSchema = z7.object({
|
|
740
|
+
type: z7.literal(nodeTypeMap.search),
|
|
613
741
|
provider: searchProviderSchema.optional(),
|
|
614
742
|
/** Search query (literal or @ts returning string). */
|
|
615
|
-
query:
|
|
743
|
+
query: z7.string().optional(),
|
|
616
744
|
/** Firecrawl: per source; Telem: total unique results (default 5, max 20). */
|
|
617
|
-
limit:
|
|
745
|
+
limit: z7.number().optional(),
|
|
618
746
|
/** Result source types: web, news, images. */
|
|
619
|
-
sources:
|
|
747
|
+
sources: z7.array(z7.enum(["web", "news", "images"])).optional(),
|
|
620
748
|
/** Category filters: github, research, pdf. */
|
|
621
|
-
categories:
|
|
622
|
-
location:
|
|
623
|
-
country:
|
|
749
|
+
categories: z7.array(z7.enum(["github", "research", "pdf"])).optional(),
|
|
750
|
+
location: z7.string().optional(),
|
|
751
|
+
country: z7.string().optional(),
|
|
624
752
|
/** Time-based search (e.g. `qdr:w`); applies to web results. */
|
|
625
|
-
tbs:
|
|
626
|
-
includeDomains:
|
|
627
|
-
excludeDomains:
|
|
753
|
+
tbs: z7.string().optional(),
|
|
754
|
+
includeDomains: z7.array(z7.string()).optional(),
|
|
755
|
+
excludeDomains: z7.array(z7.string()).optional(),
|
|
628
756
|
/** When set, pass `scrapeOptions.formats` so results include page content. */
|
|
629
|
-
scrapeFormats:
|
|
757
|
+
scrapeFormats: z7.array(z7.string()).optional()
|
|
630
758
|
}).superRefine((config, ctx) => {
|
|
631
759
|
if (config.provider !== "telem") {
|
|
632
760
|
return;
|
|
@@ -648,114 +776,114 @@ var searchNodeConfigSchema = z6.object({
|
|
|
648
776
|
});
|
|
649
777
|
}
|
|
650
778
|
});
|
|
651
|
-
var parallelNodeConfigSchema =
|
|
652
|
-
type:
|
|
653
|
-
operation:
|
|
654
|
-
objective:
|
|
655
|
-
urls:
|
|
656
|
-
searchQueries:
|
|
657
|
-
mode:
|
|
779
|
+
var parallelNodeConfigSchema = z7.object({
|
|
780
|
+
type: z7.literal(nodeTypeMap.parallel),
|
|
781
|
+
operation: z7.enum(["search", "extract", "findall"]),
|
|
782
|
+
objective: z7.string().optional(),
|
|
783
|
+
urls: z7.string().optional(),
|
|
784
|
+
searchQueries: z7.string().optional(),
|
|
785
|
+
mode: z7.enum(["one-shot", "agentic", "fast"]).optional(),
|
|
658
786
|
/** Search: maps to API `excerpts.max_chars_per_result`. */
|
|
659
|
-
excerptsMaxCharsPerResult:
|
|
787
|
+
excerptsMaxCharsPerResult: z7.number().optional(),
|
|
660
788
|
/** Search: maps to API `excerpts.max_chars_total`. */
|
|
661
|
-
excerptsMaxCharsTotal:
|
|
789
|
+
excerptsMaxCharsTotal: z7.number().optional(),
|
|
662
790
|
/** Extract: include relevant excerpts per URL. */
|
|
663
|
-
excerpts:
|
|
791
|
+
excerpts: z7.boolean().optional(),
|
|
664
792
|
/** Extract: include full page content. */
|
|
665
|
-
fullContent:
|
|
793
|
+
fullContent: z7.boolean().optional(),
|
|
666
794
|
/** FindAll: entity type string (@ts). */
|
|
667
|
-
entityType:
|
|
795
|
+
entityType: z7.string().optional(),
|
|
668
796
|
/** FindAll: generator tier. */
|
|
669
|
-
generator:
|
|
797
|
+
generator: z7.enum(["base", "core", "pro", "preview"]).optional(),
|
|
670
798
|
/** FindAll: match conditions (@ts). */
|
|
671
|
-
matchConditions:
|
|
799
|
+
matchConditions: z7.string().optional(),
|
|
672
800
|
/** FindAll: match limit (API requires 5–1000). */
|
|
673
|
-
matchLimit:
|
|
801
|
+
matchLimit: z7.number().optional(),
|
|
674
802
|
/** FindAll: exclude list (@ts). */
|
|
675
|
-
excludeList:
|
|
803
|
+
excludeList: z7.string().optional(),
|
|
676
804
|
/** FindAll: seconds between status polls (default 30). */
|
|
677
|
-
pollInterval:
|
|
678
|
-
pollIntervalUnit:
|
|
805
|
+
pollInterval: z7.number().optional(),
|
|
806
|
+
pollIntervalUnit: z7.enum(["seconds", "minutes"]).optional(),
|
|
679
807
|
/** FindAll: max wall time before giving up (default 600). */
|
|
680
|
-
pollTimeout:
|
|
681
|
-
pollTimeoutUnit:
|
|
808
|
+
pollTimeout: z7.number().optional(),
|
|
809
|
+
pollTimeoutUnit: z7.enum(["seconds", "minutes"]).optional()
|
|
682
810
|
});
|
|
683
|
-
var waitNodeConfigSchema =
|
|
684
|
-
type:
|
|
685
|
-
amount:
|
|
686
|
-
unit:
|
|
687
|
-
secondsFromConfig:
|
|
811
|
+
var waitNodeConfigSchema = z7.object({
|
|
812
|
+
type: z7.literal(nodeTypeMap.wait),
|
|
813
|
+
amount: z7.number().optional(),
|
|
814
|
+
unit: z7.enum(["seconds", "minutes", "hours", "days"]).optional(),
|
|
815
|
+
secondsFromConfig: z7.string().optional()
|
|
688
816
|
});
|
|
689
|
-
var workflowNodeTypeSchema =
|
|
690
|
-
var subgraphNodeConfigSchema =
|
|
817
|
+
var workflowNodeTypeSchema = z7.union([z7.literal(nodeTypeMap.workflow), z7.literal("graph")]);
|
|
818
|
+
var subgraphNodeConfigSchema = z7.object({
|
|
691
819
|
type: workflowNodeTypeSchema,
|
|
692
|
-
workflowId:
|
|
693
|
-
workflow:
|
|
694
|
-
graphId:
|
|
695
|
-
graph:
|
|
696
|
-
input:
|
|
820
|
+
workflowId: z7.uuid().optional(),
|
|
821
|
+
workflow: z7.string().optional(),
|
|
822
|
+
graphId: z7.uuid().optional(),
|
|
823
|
+
graph: z7.string().optional(),
|
|
824
|
+
input: z7.string().optional()
|
|
697
825
|
});
|
|
698
|
-
var mapNodeConfigSchema =
|
|
699
|
-
type:
|
|
700
|
-
items:
|
|
701
|
-
maxItems:
|
|
702
|
-
concurrency:
|
|
703
|
-
workflowId:
|
|
704
|
-
workflow:
|
|
705
|
-
graphId:
|
|
706
|
-
graph:
|
|
826
|
+
var mapNodeConfigSchema = z7.object({
|
|
827
|
+
type: z7.literal(nodeTypeMap.map),
|
|
828
|
+
items: z7.string().optional(),
|
|
829
|
+
maxItems: z7.number().optional(),
|
|
830
|
+
concurrency: z7.number().optional(),
|
|
831
|
+
workflowId: z7.uuid().optional(),
|
|
832
|
+
workflow: z7.string().optional(),
|
|
833
|
+
graphId: z7.uuid().optional(),
|
|
834
|
+
graph: z7.string().optional()
|
|
707
835
|
});
|
|
708
|
-
var fanoutNodeConfigSchema =
|
|
709
|
-
type:
|
|
710
|
-
items:
|
|
711
|
-
maxItems:
|
|
712
|
-
concurrency:
|
|
713
|
-
workflowId:
|
|
714
|
-
workflow:
|
|
715
|
-
graphId:
|
|
716
|
-
graph:
|
|
836
|
+
var fanoutNodeConfigSchema = z7.object({
|
|
837
|
+
type: z7.literal(nodeTypeMap.fanout),
|
|
838
|
+
items: z7.string().optional(),
|
|
839
|
+
maxItems: z7.number().optional(),
|
|
840
|
+
concurrency: z7.number().optional(),
|
|
841
|
+
workflowId: z7.uuid().optional(),
|
|
842
|
+
workflow: z7.string().optional(),
|
|
843
|
+
graphId: z7.uuid().optional(),
|
|
844
|
+
graph: z7.string().optional()
|
|
717
845
|
});
|
|
718
|
-
var whileNodeConfigSchema =
|
|
719
|
-
type:
|
|
720
|
-
input:
|
|
721
|
-
condition:
|
|
722
|
-
update:
|
|
723
|
-
maxIterations:
|
|
724
|
-
workflowId:
|
|
725
|
-
workflow:
|
|
726
|
-
graphId:
|
|
727
|
-
graph:
|
|
846
|
+
var whileNodeConfigSchema = z7.object({
|
|
847
|
+
type: z7.literal(nodeTypeMap.while),
|
|
848
|
+
input: z7.string().optional(),
|
|
849
|
+
condition: z7.string().optional(),
|
|
850
|
+
update: z7.string().optional(),
|
|
851
|
+
maxIterations: z7.number().optional(),
|
|
852
|
+
workflowId: z7.uuid().optional(),
|
|
853
|
+
workflow: z7.string().optional(),
|
|
854
|
+
graphId: z7.uuid().optional(),
|
|
855
|
+
graph: z7.string().optional()
|
|
728
856
|
});
|
|
729
|
-
var switchNodeConfigSchema =
|
|
730
|
-
type:
|
|
731
|
-
cases:
|
|
732
|
-
|
|
857
|
+
var switchNodeConfigSchema = z7.object({
|
|
858
|
+
type: z7.literal(nodeTypeMap.switch),
|
|
859
|
+
cases: z7.array(
|
|
860
|
+
z7.string().min(1, "Case name is required").regex(/^[a-zA-Z0-9_]+$/, "Case must contain only letters, numbers, and underscores")
|
|
733
861
|
).min(1, "At least one case is required"),
|
|
734
|
-
router:
|
|
862
|
+
router: z7.string().optional()
|
|
735
863
|
});
|
|
736
|
-
var reviewActionSchema =
|
|
737
|
-
id:
|
|
738
|
-
label:
|
|
739
|
-
outcome:
|
|
864
|
+
var reviewActionSchema = z7.object({
|
|
865
|
+
id: z7.string().regex(/^[a-zA-Z0-9_]+$/, "Action id must contain only letters, numbers, and underscores"),
|
|
866
|
+
label: z7.string().min(1, "Label is required"),
|
|
867
|
+
outcome: z7.enum(["approve", "reject"])
|
|
740
868
|
});
|
|
741
|
-
var reviewConfigSchema =
|
|
742
|
-
enabled:
|
|
743
|
-
title:
|
|
744
|
-
description:
|
|
745
|
-
content:
|
|
746
|
-
approvedOutput:
|
|
747
|
-
rejectedOutput:
|
|
869
|
+
var reviewConfigSchema = z7.object({
|
|
870
|
+
enabled: z7.boolean(),
|
|
871
|
+
title: z7.string().optional(),
|
|
872
|
+
description: z7.string().optional(),
|
|
873
|
+
content: z7.string().optional(),
|
|
874
|
+
approvedOutput: z7.string().optional(),
|
|
875
|
+
rejectedOutput: z7.string().optional(),
|
|
748
876
|
schema: jsonSchemaSchema.optional().nullable(),
|
|
749
|
-
actions:
|
|
877
|
+
actions: z7.array(reviewActionSchema).optional()
|
|
750
878
|
});
|
|
751
|
-
var failurePolicySchema =
|
|
752
|
-
strategy:
|
|
753
|
-
maxRetries:
|
|
754
|
-
backoffMs:
|
|
755
|
-
fallbackValue:
|
|
879
|
+
var failurePolicySchema = z7.object({
|
|
880
|
+
strategy: z7.enum(["fail", "retry", "skip", "fallback"]),
|
|
881
|
+
maxRetries: z7.number().optional(),
|
|
882
|
+
backoffMs: z7.number().optional(),
|
|
883
|
+
fallbackValue: z7.unknown().optional()
|
|
756
884
|
});
|
|
757
|
-
var workflowNodeConfigSchema =
|
|
758
|
-
|
|
885
|
+
var workflowNodeConfigSchema = z7.intersection(
|
|
886
|
+
z7.discriminatedUnion("type", [
|
|
759
887
|
aiNodeConfigSchema,
|
|
760
888
|
decisionNodeConfigSchema,
|
|
761
889
|
codeNodeConfigSchema,
|
|
@@ -779,7 +907,7 @@ var workflowNodeConfigSchema = z6.intersection(
|
|
|
779
907
|
switchNodeConfigSchema,
|
|
780
908
|
waitNodeConfigSchema
|
|
781
909
|
]),
|
|
782
|
-
|
|
910
|
+
z7.object({
|
|
783
911
|
failurePolicy: failurePolicySchema.optional()
|
|
784
912
|
})
|
|
785
913
|
);
|
|
@@ -788,98 +916,98 @@ var triggerTypeMap = {
|
|
|
788
916
|
webhook: "webhook",
|
|
789
917
|
schedule: "schedule"
|
|
790
918
|
};
|
|
791
|
-
var triggerTypeSchema =
|
|
792
|
-
var formTriggerConfigSchema =
|
|
793
|
-
type:
|
|
919
|
+
var triggerTypeSchema = z7.enum(Object.values(triggerTypeMap));
|
|
920
|
+
var formTriggerConfigSchema = z7.object({
|
|
921
|
+
type: z7.literal(triggerTypeMap.form)
|
|
794
922
|
});
|
|
795
|
-
var webhookTriggerConfigSchema =
|
|
796
|
-
type:
|
|
923
|
+
var webhookTriggerConfigSchema = z7.object({
|
|
924
|
+
type: z7.literal(triggerTypeMap.webhook)
|
|
797
925
|
});
|
|
798
|
-
var scheduleTriggerConfigSchema =
|
|
799
|
-
type:
|
|
800
|
-
cron:
|
|
801
|
-
timezone:
|
|
926
|
+
var scheduleTriggerConfigSchema = z7.object({
|
|
927
|
+
type: z7.literal(triggerTypeMap.schedule),
|
|
928
|
+
cron: z7.string(),
|
|
929
|
+
timezone: z7.string().optional()
|
|
802
930
|
});
|
|
803
|
-
var triggerConfigSchema =
|
|
931
|
+
var triggerConfigSchema = z7.discriminatedUnion("type", [
|
|
804
932
|
formTriggerConfigSchema,
|
|
805
933
|
webhookTriggerConfigSchema,
|
|
806
934
|
scheduleTriggerConfigSchema
|
|
807
935
|
]);
|
|
808
|
-
var resourceNameSchema =
|
|
809
|
-
var formSubmissionResponseSchema =
|
|
810
|
-
message:
|
|
811
|
-
executionIds:
|
|
936
|
+
var resourceNameSchema = z7.string().min(1, "Name is required").regex(/^[a-zA-Z0-9_]+$/, "Name must contain only letters, numbers, and underscores");
|
|
937
|
+
var formSubmissionResponseSchema = z7.object({
|
|
938
|
+
message: z7.string(),
|
|
939
|
+
executionIds: z7.array(z7.string())
|
|
812
940
|
});
|
|
813
941
|
|
|
814
942
|
// ../definition/src/goal.ts
|
|
815
|
-
var uuidLike =
|
|
816
|
-
var goalOnViolationSchema =
|
|
817
|
-
var goalExecutorKindSchema =
|
|
818
|
-
var goalBuiltInOptimizeMetricSchema =
|
|
943
|
+
var uuidLike = z8.uuid();
|
|
944
|
+
var goalOnViolationSchema = z8.enum(["block", "review"]);
|
|
945
|
+
var goalExecutorKindSchema = z8.enum(["workflow", "agent"]);
|
|
946
|
+
var goalBuiltInOptimizeMetricSchema = z8.enum([
|
|
819
947
|
"cost",
|
|
820
948
|
"duration",
|
|
821
949
|
"interventions",
|
|
822
950
|
"tokens"
|
|
823
951
|
]);
|
|
824
|
-
var goalOptimizeDirectionSchema =
|
|
825
|
-
var goalCheckSchema =
|
|
952
|
+
var goalOptimizeDirectionSchema = z8.enum(["minimize", "maximize"]);
|
|
953
|
+
var goalCheckSchema = z8.object({
|
|
826
954
|
name: resourceNameSchema,
|
|
827
955
|
/** Optional `query` block name whose rows are injected as `context.rows`. */
|
|
828
|
-
query:
|
|
956
|
+
query: z8.string().min(1).optional(),
|
|
829
957
|
/** `@ts` predicate body returning `boolean | { pass, reason?, evidence? }`. */
|
|
830
|
-
checkCode:
|
|
958
|
+
checkCode: z8.string().min(1)
|
|
831
959
|
});
|
|
832
|
-
var goalInvariantSchema =
|
|
960
|
+
var goalInvariantSchema = z8.object({
|
|
833
961
|
name: resourceNameSchema,
|
|
834
962
|
/** Actions or tools guarded synchronously before committing side effects. */
|
|
835
|
-
before:
|
|
963
|
+
before: z8.array(z8.string().min(1)).min(1).optional(),
|
|
836
964
|
/** Optional `query` block name whose rows are injected as `context.rows`. */
|
|
837
|
-
query:
|
|
965
|
+
query: z8.string().min(1).optional(),
|
|
838
966
|
/** How a synchronous violation is handled at runtime (default: `block`). */
|
|
839
967
|
onViolation: goalOnViolationSchema.optional(),
|
|
840
968
|
/** `@ts` predicate body returning `boolean | { pass, reason?, evidence? }`. */
|
|
841
|
-
checkCode:
|
|
969
|
+
checkCode: z8.string().min(1)
|
|
842
970
|
});
|
|
843
|
-
var goalOptimizeObjectiveSchema =
|
|
844
|
-
|
|
971
|
+
var goalOptimizeObjectiveSchema = z8.union([
|
|
972
|
+
z8.object({
|
|
845
973
|
direction: goalOptimizeDirectionSchema,
|
|
846
974
|
metric: goalBuiltInOptimizeMetricSchema,
|
|
847
|
-
name:
|
|
848
|
-
scoreCode:
|
|
975
|
+
name: z8.never().optional(),
|
|
976
|
+
scoreCode: z8.never().optional()
|
|
849
977
|
}),
|
|
850
|
-
|
|
978
|
+
z8.object({
|
|
851
979
|
direction: goalOptimizeDirectionSchema,
|
|
852
980
|
name: resourceNameSchema,
|
|
853
|
-
scoreCode:
|
|
854
|
-
metric:
|
|
981
|
+
scoreCode: z8.string().min(1),
|
|
982
|
+
metric: z8.never().optional()
|
|
855
983
|
})
|
|
856
984
|
]);
|
|
857
|
-
var goalBudgetSchema =
|
|
985
|
+
var goalBudgetSchema = z8.object({
|
|
858
986
|
/** Maximum execution cost in USD. */
|
|
859
|
-
cost:
|
|
987
|
+
cost: z8.number().positive().optional(),
|
|
860
988
|
/** Maximum total tokens across attempts. */
|
|
861
|
-
tokens:
|
|
989
|
+
tokens: z8.number().int().positive().optional(),
|
|
862
990
|
/** Maximum wall-clock duration in whole seconds. */
|
|
863
|
-
durationSeconds:
|
|
991
|
+
durationSeconds: z8.number().int().positive().optional(),
|
|
864
992
|
/** Maximum executor attempts when `ensure` fails. */
|
|
865
|
-
attempts:
|
|
993
|
+
attempts: z8.number().int().positive().optional()
|
|
866
994
|
});
|
|
867
|
-
var deploymentDefinitionGoalSchema =
|
|
995
|
+
var deploymentDefinitionGoalSchema = z8.object({
|
|
868
996
|
id: uuidLike,
|
|
869
997
|
name: resourceNameSchema,
|
|
870
|
-
label:
|
|
871
|
-
description:
|
|
872
|
-
objective:
|
|
998
|
+
label: z8.string(),
|
|
999
|
+
description: z8.string().optional(),
|
|
1000
|
+
objective: z8.string().optional(),
|
|
873
1001
|
inputSchema: jsonSchemaSchema.optional(),
|
|
874
1002
|
outputSchema: jsonSchemaSchema.optional(),
|
|
875
1003
|
executorKind: goalExecutorKindSchema,
|
|
876
|
-
executorName:
|
|
1004
|
+
executorName: z8.string().min(1),
|
|
877
1005
|
executorId: uuidLike,
|
|
878
|
-
invariants:
|
|
879
|
-
ensure:
|
|
880
|
-
optimize:
|
|
1006
|
+
invariants: z8.array(goalInvariantSchema).optional(),
|
|
1007
|
+
ensure: z8.array(goalCheckSchema).min(1),
|
|
1008
|
+
optimize: z8.array(goalOptimizeObjectiveSchema).optional(),
|
|
881
1009
|
budget: goalBudgetSchema.optional(),
|
|
882
|
-
contractHash:
|
|
1010
|
+
contractHash: z8.string().regex(/^[0-9a-f]{64}$/)
|
|
883
1011
|
}).superRefine((goal, ctx) => {
|
|
884
1012
|
const invariantNames = /* @__PURE__ */ new Set();
|
|
885
1013
|
for (const [index, inv] of (goal.invariants ?? []).entries()) {
|
|
@@ -906,176 +1034,176 @@ var deploymentDefinitionGoalSchema = z7.object({
|
|
|
906
1034
|
});
|
|
907
1035
|
|
|
908
1036
|
// ../definition/src/deployment-definition.ts
|
|
909
|
-
var uuidLike2 =
|
|
910
|
-
var deploymentDefinitionNamedSchemaSchema =
|
|
1037
|
+
var uuidLike2 = z9.uuid();
|
|
1038
|
+
var deploymentDefinitionNamedSchemaSchema = z9.object({
|
|
911
1039
|
id: uuidLike2,
|
|
912
|
-
name:
|
|
913
|
-
label:
|
|
914
|
-
description:
|
|
1040
|
+
name: z9.string(),
|
|
1041
|
+
label: z9.string(),
|
|
1042
|
+
description: z9.string().optional(),
|
|
915
1043
|
schema: jsonSchemaSchema
|
|
916
1044
|
});
|
|
917
|
-
var deploymentDefinitionFormSchema =
|
|
1045
|
+
var deploymentDefinitionFormSchema = z9.object({
|
|
918
1046
|
id: uuidLike2,
|
|
919
|
-
name:
|
|
920
|
-
label:
|
|
921
|
-
description:
|
|
1047
|
+
name: z9.string(),
|
|
1048
|
+
label: z9.string(),
|
|
1049
|
+
description: z9.string().optional(),
|
|
922
1050
|
schema: jsonSchemaSchema.optional().nullable(),
|
|
923
|
-
enabled:
|
|
1051
|
+
enabled: z9.boolean().optional(),
|
|
924
1052
|
/**
|
|
925
1053
|
* Triggers exposure for this form. Defaults to `'internal'` when reading
|
|
926
1054
|
* older deployment snapshots that pre-date the visibility feature, so the
|
|
927
1055
|
* field is forward-compatible without requiring a snapshot rewrite.
|
|
928
1056
|
*/
|
|
929
|
-
visibility:
|
|
1057
|
+
visibility: z9.enum(["public", "internal"]).default("internal"),
|
|
930
1058
|
/**
|
|
931
1059
|
* Optional HTTP Basic auth gate. Names a top-level DSL `auth` block of
|
|
932
1060
|
* `type: basic`; Triggers loads the matching `auth_snapshots` row at
|
|
933
1061
|
* request time and resolves `username`/`password` vars from the linked
|
|
934
1062
|
* secret block. Absent (undefined) when the form has no auth gate.
|
|
935
1063
|
*/
|
|
936
|
-
authName:
|
|
1064
|
+
authName: z9.string().optional()
|
|
937
1065
|
});
|
|
938
|
-
var agentWalletCadenceSchema =
|
|
939
|
-
var deploymentDefinitionAgentWalletSchema =
|
|
940
|
-
budget:
|
|
1066
|
+
var agentWalletCadenceSchema = z9.enum(["daily", "weekly", "monthly"]);
|
|
1067
|
+
var deploymentDefinitionAgentWalletSchema = z9.object({
|
|
1068
|
+
budget: z9.number(),
|
|
941
1069
|
cadence: agentWalletCadenceSchema,
|
|
942
|
-
maxPerCall:
|
|
1070
|
+
maxPerCall: z9.number().optional()
|
|
943
1071
|
});
|
|
944
|
-
var agentCacheRetentionSchema =
|
|
945
|
-
var deploymentDefinitionAgentContextSchema =
|
|
1072
|
+
var agentCacheRetentionSchema = z9.enum(["none", "short", "long"]);
|
|
1073
|
+
var deploymentDefinitionAgentContextSchema = z9.object({
|
|
946
1074
|
/** Working-set token cap for a turn; default derives from the model window. */
|
|
947
|
-
budget:
|
|
1075
|
+
budget: z9.number().int().positive().optional(),
|
|
948
1076
|
/** Fraction of the budget at which compaction runs. */
|
|
949
|
-
compactAt:
|
|
1077
|
+
compactAt: z9.number().gt(0).max(1).optional(),
|
|
950
1078
|
/** Turns kept verbatim on the far side of a compaction checkpoint. */
|
|
951
|
-
keepRecentTurns:
|
|
1079
|
+
keepRecentTurns: z9.number().int().nonnegative().optional(),
|
|
952
1080
|
/** Tool results older than this many tool uses are pruned to pointers. */
|
|
953
|
-
pruneToolResultsAfter:
|
|
1081
|
+
pruneToolResultsAfter: z9.number().int().min(1).optional(),
|
|
954
1082
|
/** Prompt-cache retention tier applied to the session's model calls. */
|
|
955
1083
|
cacheRetention: agentCacheRetentionSchema.optional()
|
|
956
1084
|
});
|
|
957
|
-
var deploymentDefinitionAgentSandboxSchema =
|
|
958
|
-
cpus:
|
|
959
|
-
memoryMiB:
|
|
960
|
-
diskGiB:
|
|
961
|
-
autoStopMinutes:
|
|
962
|
-
autoArchiveMinutes:
|
|
963
|
-
autoDeleteMinutes:
|
|
964
|
-
ephemeral:
|
|
1085
|
+
var deploymentDefinitionAgentSandboxSchema = z9.object({
|
|
1086
|
+
cpus: z9.number().optional(),
|
|
1087
|
+
memoryMiB: z9.number().optional(),
|
|
1088
|
+
diskGiB: z9.number().optional(),
|
|
1089
|
+
autoStopMinutes: z9.number().optional(),
|
|
1090
|
+
autoArchiveMinutes: z9.number().optional(),
|
|
1091
|
+
autoDeleteMinutes: z9.number().optional(),
|
|
1092
|
+
ephemeral: z9.boolean().optional()
|
|
965
1093
|
});
|
|
966
|
-
var deploymentDefinitionSkillReferenceSchema =
|
|
1094
|
+
var deploymentDefinitionSkillReferenceSchema = z9.object({
|
|
967
1095
|
/** Swirls `skill` block handle (for profile narrowing). */
|
|
968
|
-
blockName:
|
|
1096
|
+
blockName: z9.string(),
|
|
969
1097
|
/** On-disk slug under `.agents/skills/<name>/`. */
|
|
970
|
-
name:
|
|
971
|
-
checksum:
|
|
972
|
-
kind:
|
|
973
|
-
description:
|
|
974
|
-
skillMdPath:
|
|
975
|
-
files:
|
|
976
|
-
|
|
977
|
-
path:
|
|
978
|
-
size:
|
|
1098
|
+
name: z9.string(),
|
|
1099
|
+
checksum: z9.string().length(64),
|
|
1100
|
+
kind: z9.literal("knowledge"),
|
|
1101
|
+
description: z9.string().optional(),
|
|
1102
|
+
skillMdPath: z9.string(),
|
|
1103
|
+
files: z9.array(
|
|
1104
|
+
z9.object({
|
|
1105
|
+
path: z9.string(),
|
|
1106
|
+
size: z9.number().int().nonnegative()
|
|
979
1107
|
})
|
|
980
1108
|
)
|
|
981
1109
|
});
|
|
982
|
-
var deploymentDefinitionSkillRefOrBlockNameSchema =
|
|
983
|
-
|
|
1110
|
+
var deploymentDefinitionSkillRefOrBlockNameSchema = z9.union([
|
|
1111
|
+
z9.string(),
|
|
984
1112
|
deploymentDefinitionSkillReferenceSchema
|
|
985
1113
|
]);
|
|
986
|
-
var deploymentDefinitionAgentRoleSchema =
|
|
987
|
-
name:
|
|
988
|
-
description:
|
|
989
|
-
systemCode:
|
|
990
|
-
tools:
|
|
1114
|
+
var deploymentDefinitionAgentRoleSchema = z9.object({
|
|
1115
|
+
name: z9.string(),
|
|
1116
|
+
description: z9.string().optional(),
|
|
1117
|
+
systemCode: z9.string().optional(),
|
|
1118
|
+
tools: z9.array(z9.string()).optional(),
|
|
991
1119
|
/** Skill block handles at bundle time; resolved references after deploy ingest. */
|
|
992
|
-
skills:
|
|
1120
|
+
skills: z9.array(deploymentDefinitionSkillRefOrBlockNameSchema).optional(),
|
|
993
1121
|
/** MCP block handles bound to server URLs and credentials in Cloud. */
|
|
994
|
-
mcp:
|
|
1122
|
+
mcp: z9.array(z9.string()).optional(),
|
|
995
1123
|
sandbox: deploymentDefinitionAgentSandboxSchema.optional()
|
|
996
1124
|
});
|
|
997
|
-
var deploymentDefinitionSkillBlockSchema =
|
|
1125
|
+
var deploymentDefinitionSkillBlockSchema = z9.object({
|
|
998
1126
|
id: uuidLike2,
|
|
999
|
-
name:
|
|
1000
|
-
skillName:
|
|
1127
|
+
name: z9.string(),
|
|
1128
|
+
skillName: z9.string()
|
|
1001
1129
|
});
|
|
1002
1130
|
var AGENT_SUGGESTION_LIMITS = {
|
|
1003
1131
|
maxCount: 6,
|
|
1004
1132
|
maxLabelLength: 40,
|
|
1005
1133
|
maxMessageLength: 500
|
|
1006
1134
|
};
|
|
1007
|
-
var deploymentDefinitionAgentSuggestionSchema =
|
|
1008
|
-
label:
|
|
1009
|
-
message:
|
|
1135
|
+
var deploymentDefinitionAgentSuggestionSchema = z9.object({
|
|
1136
|
+
label: z9.string().min(1).max(AGENT_SUGGESTION_LIMITS.maxLabelLength),
|
|
1137
|
+
message: z9.string().min(1).max(AGENT_SUGGESTION_LIMITS.maxMessageLength)
|
|
1010
1138
|
});
|
|
1011
|
-
var deploymentDefinitionAgentBlockSchema =
|
|
1139
|
+
var deploymentDefinitionAgentBlockSchema = z9.object({
|
|
1012
1140
|
id: uuidLike2,
|
|
1013
|
-
name:
|
|
1014
|
-
label:
|
|
1015
|
-
description:
|
|
1141
|
+
name: z9.string(),
|
|
1142
|
+
label: z9.string().optional(),
|
|
1143
|
+
description: z9.string().optional(),
|
|
1016
1144
|
provider: aiProviderSchema,
|
|
1017
|
-
model:
|
|
1018
|
-
secretsRef:
|
|
1145
|
+
model: z9.string(),
|
|
1146
|
+
secretsRef: z9.string().optional(),
|
|
1019
1147
|
/** Vars from the referenced secret block at bundle time (for runtime vault keys). */
|
|
1020
|
-
secretVars:
|
|
1021
|
-
defaultSystemCode:
|
|
1022
|
-
temperature:
|
|
1023
|
-
maxTokens:
|
|
1024
|
-
maxSteps:
|
|
1025
|
-
tools:
|
|
1026
|
-
team:
|
|
1148
|
+
secretVars: z9.array(z9.string()).optional(),
|
|
1149
|
+
defaultSystemCode: z9.string().optional(),
|
|
1150
|
+
temperature: z9.number().optional(),
|
|
1151
|
+
maxTokens: z9.number().optional(),
|
|
1152
|
+
maxSteps: z9.number().optional(),
|
|
1153
|
+
tools: z9.array(z9.string()).optional(),
|
|
1154
|
+
team: z9.array(z9.string()).optional(),
|
|
1027
1155
|
/** Skill block handles at bundle time; resolved references after deploy ingest. */
|
|
1028
|
-
skills:
|
|
1156
|
+
skills: z9.array(deploymentDefinitionSkillRefOrBlockNameSchema).optional(),
|
|
1029
1157
|
/** MCP block handles bound to server URLs and credentials in Cloud. */
|
|
1030
|
-
mcp:
|
|
1158
|
+
mcp: z9.array(z9.string()).optional(),
|
|
1031
1159
|
/** Top-level `computer` block whose guest runs this agent's workspace tools. Exclusive with `disks` and `sandbox`. */
|
|
1032
|
-
computer:
|
|
1160
|
+
computer: z9.string().optional(),
|
|
1033
1161
|
/** Top-level shared `disk` block names mounted into this agent's sandbox. */
|
|
1034
|
-
disks:
|
|
1162
|
+
disks: z9.array(z9.string()).optional(),
|
|
1035
1163
|
sandbox: deploymentDefinitionAgentSandboxSchema.optional(),
|
|
1036
1164
|
wallet: deploymentDefinitionAgentWalletSchema.optional(),
|
|
1037
1165
|
/** Context-engine overrides; absent means the managed defaults apply. */
|
|
1038
1166
|
context: deploymentDefinitionAgentContextSchema.optional(),
|
|
1039
|
-
roles:
|
|
1040
|
-
suggestions:
|
|
1167
|
+
roles: z9.array(deploymentDefinitionAgentRoleSchema).optional(),
|
|
1168
|
+
suggestions: z9.array(deploymentDefinitionAgentSuggestionSchema).max(AGENT_SUGGESTION_LIMITS.maxCount).optional(),
|
|
1041
1169
|
/** Optional `goal` block name this agent conforms to (`achieves: <goal>`). */
|
|
1042
|
-
achieves:
|
|
1170
|
+
achieves: z9.string().min(1).optional()
|
|
1043
1171
|
});
|
|
1044
|
-
var channelModeSchema =
|
|
1172
|
+
var channelModeSchema = z9.enum(["mention", "dm", "all", "ambient"]);
|
|
1045
1173
|
var CHANNEL_RESPONSE_POLICY_LIMITS = {
|
|
1046
1174
|
maxEngagementTimeoutSeconds: 24 * 60 * 60,
|
|
1047
1175
|
maxCooldownSeconds: 24 * 60 * 60
|
|
1048
1176
|
};
|
|
1049
|
-
var channelPlatformSchema =
|
|
1050
|
-
var deploymentDefinitionChannelBlockSchema =
|
|
1177
|
+
var channelPlatformSchema = z9.enum(["slack", "linear", "discord", "web", "mcp", "swirls"]);
|
|
1178
|
+
var deploymentDefinitionChannelBlockSchema = z9.object({
|
|
1051
1179
|
id: uuidLike2,
|
|
1052
|
-
name:
|
|
1053
|
-
label:
|
|
1054
|
-
description:
|
|
1055
|
-
platform:
|
|
1180
|
+
name: z9.string(),
|
|
1181
|
+
label: z9.string(),
|
|
1182
|
+
description: z9.string().optional(),
|
|
1183
|
+
platform: z9.preprocess(
|
|
1056
1184
|
(value) => value === "portal" ? "swirls" : value,
|
|
1057
1185
|
channelPlatformSchema
|
|
1058
1186
|
),
|
|
1059
|
-
agent:
|
|
1060
|
-
workflows:
|
|
1061
|
-
enabled:
|
|
1187
|
+
agent: z9.string().optional(),
|
|
1188
|
+
workflows: z9.array(z9.string().min(1)).optional(),
|
|
1189
|
+
enabled: z9.boolean().optional(),
|
|
1062
1190
|
/** Name of a top-level `connection` block supplying the OAuth credential. */
|
|
1063
|
-
connectionRef:
|
|
1191
|
+
connectionRef: z9.string().optional(),
|
|
1064
1192
|
/**
|
|
1065
1193
|
* Name of a top-level `connector` block (inbound OAuth application). Set on
|
|
1066
1194
|
* `platform: mcp` channels; the inbound counterpart to `connectionRef`.
|
|
1067
1195
|
*/
|
|
1068
|
-
connectorRef:
|
|
1196
|
+
connectorRef: z9.string().optional(),
|
|
1069
1197
|
mode: channelModeSchema.optional(),
|
|
1070
1198
|
/**
|
|
1071
1199
|
* Response-policy overrides (RFC 0021), normalized from the DSL's duration
|
|
1072
1200
|
* literals to whole seconds at bundle time so the engine never re-parses
|
|
1073
1201
|
* surface syntax. Absent means the managed default applies.
|
|
1074
1202
|
*/
|
|
1075
|
-
engagementTimeoutSeconds:
|
|
1076
|
-
cooldownSeconds:
|
|
1203
|
+
engagementTimeoutSeconds: z9.number().int().positive().max(CHANNEL_RESPONSE_POLICY_LIMITS.maxEngagementTimeoutSeconds).optional(),
|
|
1204
|
+
cooldownSeconds: z9.number().int().nonnegative().max(CHANNEL_RESPONSE_POLICY_LIMITS.maxCooldownSeconds).optional(),
|
|
1077
1205
|
/** Ceiling on posts made without being addressed; `0` silences them entirely. */
|
|
1078
|
-
maxUnpromptedPerHour:
|
|
1206
|
+
maxUnpromptedPerHour: z9.number().int().nonnegative().optional()
|
|
1079
1207
|
}).superRefine((channel, ctx) => {
|
|
1080
1208
|
if (channel.platform === "mcp") {
|
|
1081
1209
|
if (!channel.agent && !channel.workflows?.length) {
|
|
@@ -1110,214 +1238,216 @@ var deploymentDefinitionChannelBlockSchema = z8.object({
|
|
|
1110
1238
|
});
|
|
1111
1239
|
}
|
|
1112
1240
|
});
|
|
1113
|
-
var deploymentDefinitionConnectionBlockSchema =
|
|
1241
|
+
var deploymentDefinitionConnectionBlockSchema = z9.object({
|
|
1114
1242
|
id: uuidLike2,
|
|
1115
|
-
name:
|
|
1116
|
-
label:
|
|
1117
|
-
description:
|
|
1243
|
+
name: z9.string(),
|
|
1244
|
+
label: z9.string().optional(),
|
|
1245
|
+
description: z9.string().optional(),
|
|
1118
1246
|
/** OAuth provider this connection brokers (slack, linear, ...). */
|
|
1119
|
-
provider:
|
|
1247
|
+
provider: z9.string(),
|
|
1120
1248
|
/**
|
|
1121
1249
|
* Self-managed mode: absolute API origin. Must be set together with
|
|
1122
1250
|
* `authRef`. When present, credentials come from the vault auth profile
|
|
1123
1251
|
* instead of Fabric-brokered OAuth.
|
|
1124
1252
|
*/
|
|
1125
|
-
baseUrl:
|
|
1253
|
+
baseUrl: z9.url().optional(),
|
|
1126
1254
|
/** Self-managed mode: name of a deployment `auth` block. */
|
|
1127
|
-
authRef:
|
|
1255
|
+
authRef: z9.string().min(1).optional(),
|
|
1128
1256
|
/** Optional private connectivity realm for the self-managed origin. */
|
|
1129
|
-
networkRef:
|
|
1257
|
+
networkRef: z9.string().min(1).optional()
|
|
1130
1258
|
}).superRefine((block, ctx) => {
|
|
1131
1259
|
const message = connectionModePairError(block.name, block.baseUrl, block.authRef);
|
|
1132
1260
|
if (message) {
|
|
1133
1261
|
ctx.addIssue({ code: "custom", message });
|
|
1134
1262
|
}
|
|
1135
1263
|
});
|
|
1136
|
-
var deploymentDefinitionMcpBlockSchema =
|
|
1264
|
+
var deploymentDefinitionMcpBlockSchema = z9.object({
|
|
1137
1265
|
id: uuidLike2,
|
|
1138
|
-
name:
|
|
1139
|
-
label:
|
|
1140
|
-
description:
|
|
1266
|
+
name: z9.string(),
|
|
1267
|
+
label: z9.string().optional(),
|
|
1268
|
+
description: z9.string().optional(),
|
|
1141
1269
|
/** Declared in DSL on new deployments; absent on older snapshots. */
|
|
1142
|
-
url:
|
|
1270
|
+
url: z9.string().optional(),
|
|
1143
1271
|
/**
|
|
1144
1272
|
* Credential acquisition. New bundles always emit `static` | `interactive`.
|
|
1145
1273
|
* Absent on legacy snapshots → treat as static at runtime.
|
|
1146
1274
|
*/
|
|
1147
|
-
auth:
|
|
1275
|
+
auth: z9.enum(["static", "interactive"]).optional(),
|
|
1148
1276
|
/** Optional private connectivity realm for the remote MCP server. */
|
|
1149
|
-
networkRef:
|
|
1277
|
+
networkRef: z9.string().min(1).optional()
|
|
1150
1278
|
});
|
|
1151
|
-
var deploymentDefinitionNetworkDatabaseExposureSchema =
|
|
1152
|
-
database:
|
|
1153
|
-
connections:
|
|
1279
|
+
var deploymentDefinitionNetworkDatabaseExposureSchema = z9.object({
|
|
1280
|
+
database: z9.string().min(1),
|
|
1281
|
+
connections: z9.array(z9.string().min(1)).min(1)
|
|
1154
1282
|
});
|
|
1155
|
-
var deploymentDefinitionNetworkBlockSchema =
|
|
1283
|
+
var deploymentDefinitionNetworkBlockSchema = z9.object({
|
|
1156
1284
|
id: uuidLike2,
|
|
1157
|
-
name:
|
|
1158
|
-
label:
|
|
1159
|
-
description:
|
|
1160
|
-
expose:
|
|
1161
|
-
apps:
|
|
1162
|
-
channels:
|
|
1163
|
-
forms:
|
|
1164
|
-
webhooks:
|
|
1165
|
-
services:
|
|
1166
|
-
databases:
|
|
1285
|
+
name: z9.string().min(1),
|
|
1286
|
+
label: z9.string().optional(),
|
|
1287
|
+
description: z9.string().optional(),
|
|
1288
|
+
expose: z9.object({
|
|
1289
|
+
apps: z9.array(z9.string().min(1)),
|
|
1290
|
+
channels: z9.array(z9.string().min(1)),
|
|
1291
|
+
forms: z9.array(z9.string().min(1)),
|
|
1292
|
+
webhooks: z9.array(z9.string().min(1)),
|
|
1293
|
+
services: z9.array(z9.string().min(1)),
|
|
1294
|
+
databases: z9.array(deploymentDefinitionNetworkDatabaseExposureSchema)
|
|
1167
1295
|
})
|
|
1168
1296
|
});
|
|
1169
|
-
var deploymentDefinitionConnectorBlockSchema =
|
|
1297
|
+
var deploymentDefinitionConnectorBlockSchema = z9.object({
|
|
1170
1298
|
id: uuidLike2,
|
|
1171
|
-
name:
|
|
1172
|
-
label:
|
|
1173
|
-
description:
|
|
1299
|
+
name: z9.string(),
|
|
1300
|
+
label: z9.string().optional(),
|
|
1301
|
+
description: z9.string().optional()
|
|
1174
1302
|
});
|
|
1175
|
-
var deploymentDefinitionActionBlockSchema =
|
|
1303
|
+
var deploymentDefinitionActionBlockSchema = z9.object({
|
|
1176
1304
|
id: uuidLike2,
|
|
1177
|
-
name:
|
|
1178
|
-
label:
|
|
1179
|
-
description:
|
|
1180
|
-
provider:
|
|
1181
|
-
method:
|
|
1182
|
-
path:
|
|
1183
|
-
encoding:
|
|
1184
|
-
scopes:
|
|
1305
|
+
name: z9.string(),
|
|
1306
|
+
label: z9.string().optional(),
|
|
1307
|
+
description: z9.string().optional(),
|
|
1308
|
+
provider: z9.string(),
|
|
1309
|
+
method: z9.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]),
|
|
1310
|
+
path: z9.string(),
|
|
1311
|
+
encoding: z9.enum(["json", "form", "query", "raw"]).optional(),
|
|
1312
|
+
scopes: z9.array(z9.string()).optional(),
|
|
1185
1313
|
inputSchema: jsonSchemaSchema.optional(),
|
|
1186
1314
|
outputSchema: jsonSchemaSchema.optional()
|
|
1187
1315
|
});
|
|
1188
|
-
var deploymentDefinitionWebhookSchema =
|
|
1316
|
+
var deploymentDefinitionWebhookSchema = z9.object({
|
|
1189
1317
|
id: uuidLike2,
|
|
1190
|
-
name:
|
|
1191
|
-
label:
|
|
1192
|
-
description:
|
|
1318
|
+
name: z9.string(),
|
|
1319
|
+
label: z9.string(),
|
|
1320
|
+
description: z9.string().optional(),
|
|
1193
1321
|
schema: jsonSchemaSchema.optional().nullable(),
|
|
1194
|
-
enabled:
|
|
1195
|
-
secretRefBlock:
|
|
1196
|
-
secretRefVar:
|
|
1197
|
-
headerName:
|
|
1322
|
+
enabled: z9.boolean().optional(),
|
|
1323
|
+
secretRefBlock: z9.string().optional(),
|
|
1324
|
+
secretRefVar: z9.string().optional(),
|
|
1325
|
+
headerName: z9.string().optional()
|
|
1198
1326
|
});
|
|
1199
|
-
var deploymentDefinitionScheduleSchema =
|
|
1327
|
+
var deploymentDefinitionScheduleSchema = z9.object({
|
|
1200
1328
|
id: uuidLike2,
|
|
1201
|
-
name:
|
|
1202
|
-
label:
|
|
1203
|
-
description:
|
|
1204
|
-
cron:
|
|
1205
|
-
timezone:
|
|
1206
|
-
enabled:
|
|
1329
|
+
name: z9.string(),
|
|
1330
|
+
label: z9.string(),
|
|
1331
|
+
description: z9.string().optional(),
|
|
1332
|
+
cron: z9.string(),
|
|
1333
|
+
timezone: z9.string().optional(),
|
|
1334
|
+
enabled: z9.boolean().optional()
|
|
1207
1335
|
});
|
|
1208
|
-
var deploymentDefinitionNodeSchema =
|
|
1336
|
+
var deploymentDefinitionNodeSchema = z9.object({
|
|
1209
1337
|
id: uuidLike2,
|
|
1210
|
-
name:
|
|
1211
|
-
type:
|
|
1212
|
-
label:
|
|
1213
|
-
description:
|
|
1214
|
-
isRoot:
|
|
1338
|
+
name: z9.string(),
|
|
1339
|
+
type: z9.string(),
|
|
1340
|
+
label: z9.string(),
|
|
1341
|
+
description: z9.string().optional(),
|
|
1342
|
+
isRoot: z9.boolean().optional(),
|
|
1215
1343
|
config: workflowNodeConfigSchema,
|
|
1216
1344
|
reviewConfig: reviewConfigSchema.nullable().optional(),
|
|
1217
1345
|
inputSchema: jsonSchemaSchema.nullable().optional(),
|
|
1218
1346
|
outputSchema: jsonSchemaSchema.nullable().optional(),
|
|
1219
|
-
secretsMap:
|
|
1347
|
+
secretsMap: z9.record(z9.string(), z9.array(z9.string())).optional(),
|
|
1220
1348
|
/** HTTP node: top-level `auth` block name from DSL. */
|
|
1221
|
-
authRef:
|
|
1349
|
+
authRef: z9.string().optional(),
|
|
1222
1350
|
/** HTTP node: top-level `connection` block name from DSL (Swirls-brokered OAuth). */
|
|
1223
|
-
connectionRef:
|
|
1351
|
+
connectionRef: z9.string().optional(),
|
|
1224
1352
|
/** Integration node: top-level `action` block name from DSL. */
|
|
1225
|
-
actionRef:
|
|
1353
|
+
actionRef: z9.string().optional(),
|
|
1226
1354
|
/** Presentation format for leaf outputs (`format:` in .swirls). */
|
|
1227
1355
|
outputFormat: outputFormatSchema.optional(),
|
|
1228
1356
|
/**
|
|
1229
1357
|
* Per-field DSL value kind for executable string fields (`command`, `url`, …).
|
|
1230
1358
|
* When `literal`, runtime uses the stored string as-is; `ts`/`sql` run the sandbox.
|
|
1359
|
+
* A `reviewConfig` field written as code is recorded as `review.<field>`
|
|
1360
|
+
* (`review.content`, `review.title`, …).
|
|
1231
1361
|
*/
|
|
1232
|
-
configValueKinds:
|
|
1233
|
-
position:
|
|
1362
|
+
configValueKinds: z9.record(z9.string(), configValueKindSchema).optional(),
|
|
1363
|
+
position: z9.object({ x: z9.number(), y: z9.number() }).optional()
|
|
1234
1364
|
});
|
|
1235
|
-
var deploymentDefinitionSecretBlockSchema =
|
|
1365
|
+
var deploymentDefinitionSecretBlockSchema = z9.object({
|
|
1236
1366
|
id: uuidLike2,
|
|
1237
|
-
name:
|
|
1238
|
-
label:
|
|
1239
|
-
description:
|
|
1367
|
+
name: z9.string(),
|
|
1368
|
+
label: z9.string(),
|
|
1369
|
+
description: z9.string().optional(),
|
|
1240
1370
|
/** When `managed`, platform supplies values (Enterprise); omit for user vault. */
|
|
1241
|
-
type:
|
|
1242
|
-
vars:
|
|
1371
|
+
type: z9.literal("managed").optional(),
|
|
1372
|
+
vars: z9.array(z9.string())
|
|
1243
1373
|
});
|
|
1244
|
-
var deploymentDefinitionAuthBlockSchema =
|
|
1374
|
+
var deploymentDefinitionAuthBlockSchema = z9.object({
|
|
1245
1375
|
id: uuidLike2,
|
|
1246
|
-
name:
|
|
1247
|
-
label:
|
|
1248
|
-
description:
|
|
1249
|
-
authType:
|
|
1250
|
-
secretBlockName:
|
|
1376
|
+
name: z9.string(),
|
|
1377
|
+
label: z9.string(),
|
|
1378
|
+
description: z9.string().optional(),
|
|
1379
|
+
authType: z9.string(),
|
|
1380
|
+
secretBlockName: z9.string().optional(),
|
|
1251
1381
|
/** String fields from the auth block (token_url, grant_type, header, etc.). */
|
|
1252
|
-
config:
|
|
1382
|
+
config: z9.record(z9.string(), z9.string())
|
|
1253
1383
|
});
|
|
1254
|
-
var deploymentDefinitionPostgresBlockSchema =
|
|
1384
|
+
var deploymentDefinitionPostgresBlockSchema = z9.object({
|
|
1255
1385
|
id: uuidLike2,
|
|
1256
|
-
name:
|
|
1257
|
-
secretsRef:
|
|
1258
|
-
connection:
|
|
1259
|
-
connectionIsLiteral:
|
|
1386
|
+
name: z9.string(),
|
|
1387
|
+
secretsRef: z9.string().optional(),
|
|
1388
|
+
connection: z9.string(),
|
|
1389
|
+
connectionIsLiteral: z9.boolean(),
|
|
1260
1390
|
/** Optional private connectivity realm for this external database. */
|
|
1261
|
-
networkRef:
|
|
1262
|
-
tables:
|
|
1263
|
-
|
|
1264
|
-
name:
|
|
1265
|
-
schema:
|
|
1391
|
+
networkRef: z9.string().min(1).optional(),
|
|
1392
|
+
tables: z9.array(
|
|
1393
|
+
z9.object({
|
|
1394
|
+
name: z9.string(),
|
|
1395
|
+
schema: z9.record(z9.string(), z9.unknown())
|
|
1266
1396
|
})
|
|
1267
1397
|
)
|
|
1268
1398
|
});
|
|
1269
|
-
var deploymentDefinitionDatabaseConnectionSchema =
|
|
1399
|
+
var deploymentDefinitionDatabaseConnectionSchema = z9.object({
|
|
1270
1400
|
id: uuidLike2,
|
|
1271
|
-
name:
|
|
1272
|
-
label:
|
|
1273
|
-
description:
|
|
1401
|
+
name: z9.string(),
|
|
1402
|
+
label: z9.string().optional(),
|
|
1403
|
+
description: z9.string().optional()
|
|
1274
1404
|
});
|
|
1275
|
-
var deploymentDefinitionDatabaseBlockSchema =
|
|
1405
|
+
var deploymentDefinitionDatabaseBlockSchema = z9.object({
|
|
1276
1406
|
id: uuidLike2,
|
|
1277
|
-
name:
|
|
1278
|
-
label:
|
|
1279
|
-
description:
|
|
1407
|
+
name: z9.string(),
|
|
1408
|
+
label: z9.string().optional(),
|
|
1409
|
+
description: z9.string().optional(),
|
|
1280
1410
|
/** `@prisma` island source, verbatim. */
|
|
1281
|
-
schema:
|
|
1411
|
+
schema: z9.string(),
|
|
1282
1412
|
/** sha256 hex of the schema text. */
|
|
1283
|
-
schemaChecksum:
|
|
1413
|
+
schemaChecksum: z9.string(),
|
|
1284
1414
|
/** Declared named connections for direct application access. */
|
|
1285
|
-
connections:
|
|
1415
|
+
connections: z9.array(deploymentDefinitionDatabaseConnectionSchema).default([])
|
|
1286
1416
|
});
|
|
1287
|
-
var deploymentDefinitionDatabaseMigrationSchema =
|
|
1417
|
+
var deploymentDefinitionDatabaseMigrationSchema = z9.object({
|
|
1288
1418
|
id: uuidLike2,
|
|
1289
|
-
name:
|
|
1419
|
+
name: z9.string(),
|
|
1290
1420
|
/** Name of the `database` block this migration targets. */
|
|
1291
|
-
database:
|
|
1292
|
-
order:
|
|
1421
|
+
database: z9.string(),
|
|
1422
|
+
order: z9.number().int().nonnegative(),
|
|
1293
1423
|
/** `@ts` data-migration body. */
|
|
1294
|
-
operationCode:
|
|
1424
|
+
operationCode: z9.string()
|
|
1295
1425
|
});
|
|
1296
|
-
var deploymentDefinitionDiskBlockSchema =
|
|
1426
|
+
var deploymentDefinitionDiskBlockSchema = z9.object({
|
|
1297
1427
|
id: uuidLike2,
|
|
1298
|
-
name:
|
|
1299
|
-
label:
|
|
1300
|
-
region:
|
|
1428
|
+
name: z9.string(),
|
|
1429
|
+
label: z9.string().optional(),
|
|
1430
|
+
region: z9.string().optional()
|
|
1301
1431
|
});
|
|
1302
|
-
var deploymentDefinitionComputerHarnessSchema =
|
|
1303
|
-
type:
|
|
1304
|
-
provider:
|
|
1305
|
-
runtime:
|
|
1432
|
+
var deploymentDefinitionComputerHarnessSchema = z9.object({
|
|
1433
|
+
type: z9.string(),
|
|
1434
|
+
provider: z9.string(),
|
|
1435
|
+
runtime: z9.string()
|
|
1306
1436
|
});
|
|
1307
|
-
var deploymentDefinitionComputerBlockSchema =
|
|
1437
|
+
var deploymentDefinitionComputerBlockSchema = z9.object({
|
|
1308
1438
|
id: uuidLike2,
|
|
1309
|
-
name:
|
|
1310
|
-
label:
|
|
1311
|
-
description:
|
|
1439
|
+
name: z9.string(),
|
|
1440
|
+
label: z9.string(),
|
|
1441
|
+
description: z9.string().optional(),
|
|
1312
1442
|
/** Author `software:` pins. Baseline packages are not listed. */
|
|
1313
|
-
software:
|
|
1314
|
-
disks:
|
|
1315
|
-
resources:
|
|
1316
|
-
cpus:
|
|
1317
|
-
memoryMiB:
|
|
1318
|
-
diskGiB:
|
|
1443
|
+
software: z9.record(z9.string(), z9.string()),
|
|
1444
|
+
disks: z9.array(z9.string()),
|
|
1445
|
+
resources: z9.object({
|
|
1446
|
+
cpus: z9.number(),
|
|
1447
|
+
memoryMiB: z9.number(),
|
|
1448
|
+
diskGiB: z9.number().optional()
|
|
1319
1449
|
}),
|
|
1320
|
-
needsMountTooling:
|
|
1450
|
+
needsMountTooling: z9.boolean(),
|
|
1321
1451
|
/**
|
|
1322
1452
|
* The `harness: { type, provider }` block plus the base-image runtime the
|
|
1323
1453
|
* recipe was compiled for. Absent on computers without a harness. Names are
|
|
@@ -1325,20 +1455,20 @@ var deploymentDefinitionComputerBlockSchema = z8.object({
|
|
|
1325
1455
|
* checks them against it and recomputes the recipe hash on ingest.
|
|
1326
1456
|
*/
|
|
1327
1457
|
harness: deploymentDefinitionComputerHarnessSchema.optional(),
|
|
1328
|
-
recipeHash:
|
|
1458
|
+
recipeHash: z9.string()
|
|
1329
1459
|
});
|
|
1330
|
-
var deploymentDefinitionOperationBlockSchema =
|
|
1460
|
+
var deploymentDefinitionOperationBlockSchema = z9.object({
|
|
1331
1461
|
id: uuidLike2,
|
|
1332
1462
|
/** Travels inside the signed dispatch, so it follows the wire id rule. */
|
|
1333
|
-
name:
|
|
1334
|
-
label:
|
|
1335
|
-
description:
|
|
1336
|
-
interpreter:
|
|
1463
|
+
name: z9.string().regex(/^[A-Za-z0-9._-]{1,128}$/, "must be 1-128 characters of A-Za-z0-9._-"),
|
|
1464
|
+
label: z9.string(),
|
|
1465
|
+
description: z9.string().optional(),
|
|
1466
|
+
interpreter: z9.enum(["powershell", "sh"]),
|
|
1337
1467
|
/** When set, the operation only runs on devices with this system. */
|
|
1338
1468
|
platform: deviceOsSchema.optional(),
|
|
1339
|
-
runAs:
|
|
1340
|
-
script:
|
|
1341
|
-
scriptSha256:
|
|
1469
|
+
runAs: z9.enum(["system", "signed_in_user"]),
|
|
1470
|
+
script: z9.string().min(1).max(512e3).refine((value) => !value.includes("\0"), "must not contain NUL"),
|
|
1471
|
+
scriptSha256: z9.string().regex(/^[0-9a-f]{64}$/),
|
|
1342
1472
|
/** Validated against the node's input before anything is signed. */
|
|
1343
1473
|
inputSchema: jsonSchemaSchema.optional(),
|
|
1344
1474
|
/**
|
|
@@ -1346,181 +1476,181 @@ var deploymentDefinitionOperationBlockSchema = z8.object({
|
|
|
1346
1476
|
* against this schema, and returned as the run's `result`.
|
|
1347
1477
|
*/
|
|
1348
1478
|
outputSchema: jsonSchemaSchema.optional(),
|
|
1349
|
-
timeoutSeconds:
|
|
1479
|
+
timeoutSeconds: z9.number().int().min(1).max(3600)
|
|
1350
1480
|
});
|
|
1351
|
-
var deploymentDefinitionStreamVersionSchema =
|
|
1481
|
+
var deploymentDefinitionStreamVersionSchema = z9.object({
|
|
1352
1482
|
schema: jsonSchemaSchema,
|
|
1353
|
-
conditionCode:
|
|
1354
|
-
prepareCode:
|
|
1483
|
+
conditionCode: z9.string().optional(),
|
|
1484
|
+
prepareCode: z9.string()
|
|
1355
1485
|
});
|
|
1356
|
-
var deploymentDefinitionStreamSchema =
|
|
1486
|
+
var deploymentDefinitionStreamSchema = z9.object({
|
|
1357
1487
|
id: uuidLike2,
|
|
1358
|
-
name:
|
|
1359
|
-
label:
|
|
1360
|
-
description:
|
|
1361
|
-
enabled:
|
|
1362
|
-
workflowName:
|
|
1488
|
+
name: z9.string(),
|
|
1489
|
+
label: z9.string(),
|
|
1490
|
+
description: z9.string().optional(),
|
|
1491
|
+
enabled: z9.boolean().optional(),
|
|
1492
|
+
workflowName: z9.string(),
|
|
1363
1493
|
/** Active writer version (must exist as key in versions). */
|
|
1364
|
-
version:
|
|
1365
|
-
versions:
|
|
1494
|
+
version: z9.string(),
|
|
1495
|
+
versions: z9.record(z9.string(), deploymentDefinitionStreamVersionSchema)
|
|
1366
1496
|
});
|
|
1367
|
-
var deploymentDefinitionViewComputedColumnSchema =
|
|
1368
|
-
name:
|
|
1497
|
+
var deploymentDefinitionViewComputedColumnSchema = z9.object({
|
|
1498
|
+
name: z9.string(),
|
|
1369
1499
|
/** Workflow (graph) executed to compute this column. */
|
|
1370
|
-
workflowName:
|
|
1500
|
+
workflowName: z9.string(),
|
|
1371
1501
|
/** @ts body mapping the view row into the graph trigger input. */
|
|
1372
|
-
inputCode:
|
|
1502
|
+
inputCode: z9.string(),
|
|
1373
1503
|
/** Optional @ts body mapping the graph output into the cell value. */
|
|
1374
|
-
outputCode:
|
|
1504
|
+
outputCode: z9.string().optional()
|
|
1375
1505
|
});
|
|
1376
|
-
var deploymentDefinitionQueryBlockSchema =
|
|
1506
|
+
var deploymentDefinitionQueryBlockSchema = z9.object({
|
|
1377
1507
|
id: uuidLike2,
|
|
1378
|
-
name:
|
|
1379
|
-
label:
|
|
1380
|
-
description:
|
|
1381
|
-
enabled:
|
|
1382
|
-
database:
|
|
1383
|
-
sql:
|
|
1508
|
+
name: z9.string(),
|
|
1509
|
+
label: z9.string(),
|
|
1510
|
+
description: z9.string().optional(),
|
|
1511
|
+
enabled: z9.boolean().optional(),
|
|
1512
|
+
database: z9.string(),
|
|
1513
|
+
sql: z9.string(),
|
|
1384
1514
|
/** Ordered unique `{{name}}` placeholders from the SQL body. */
|
|
1385
|
-
params:
|
|
1515
|
+
params: z9.array(z9.string())
|
|
1386
1516
|
});
|
|
1387
|
-
var deploymentDefinitionViewSchema =
|
|
1517
|
+
var deploymentDefinitionViewSchema = z9.object({
|
|
1388
1518
|
id: uuidLike2,
|
|
1389
|
-
name:
|
|
1390
|
-
label:
|
|
1391
|
-
description:
|
|
1392
|
-
enabled:
|
|
1519
|
+
name: z9.string(),
|
|
1520
|
+
label: z9.string(),
|
|
1521
|
+
description: z9.string().optional(),
|
|
1522
|
+
enabled: z9.boolean().optional(),
|
|
1393
1523
|
/** Stream names composed by this view (exposed as context.streams.<name> in columnsCode). */
|
|
1394
|
-
streams:
|
|
1524
|
+
streams: z9.array(z9.string()),
|
|
1395
1525
|
/** JSON Schema for the mapped (non-computed) row shape. */
|
|
1396
1526
|
schema: jsonSchemaSchema,
|
|
1397
1527
|
/** @ts body mapping stream rows into row values. */
|
|
1398
|
-
columnsCode:
|
|
1399
|
-
computed:
|
|
1528
|
+
columnsCode: z9.string(),
|
|
1529
|
+
computed: z9.array(deploymentDefinitionViewComputedColumnSchema).optional()
|
|
1400
1530
|
});
|
|
1401
|
-
var deploymentDefinitionAppPageSchema =
|
|
1402
|
-
name:
|
|
1403
|
-
label:
|
|
1531
|
+
var deploymentDefinitionAppPageSchema = z9.object({
|
|
1532
|
+
name: z9.string(),
|
|
1533
|
+
label: z9.string().optional(),
|
|
1404
1534
|
/** Curated icon name rendered by app navigation. */
|
|
1405
|
-
icon:
|
|
1535
|
+
icon: z9.string().optional(),
|
|
1406
1536
|
/** Remove page chrome and let OpenUI own the full main viewport. */
|
|
1407
|
-
viewport:
|
|
1537
|
+
viewport: z9.literal("full").optional(),
|
|
1408
1538
|
/** Authoring-time OpenUI Lang source (deterministic; no LLM at runtime). */
|
|
1409
|
-
openui:
|
|
1539
|
+
openui: z9.string().optional(),
|
|
1410
1540
|
/** Portal channel for a full-viewport room chat page (exclusive with openui). */
|
|
1411
|
-
channel:
|
|
1541
|
+
channel: z9.string().optional(),
|
|
1412
1542
|
/** Agent backing the channel page, resolved at deploy from the channel block. */
|
|
1413
|
-
agent:
|
|
1543
|
+
agent: z9.string().optional(),
|
|
1414
1544
|
/** Portal channels for an app-wide thread center page. */
|
|
1415
|
-
threads:
|
|
1545
|
+
threads: z9.array(z9.string()).min(1).optional(),
|
|
1416
1546
|
/** Workflows whose pending reviews are shown on this page. */
|
|
1417
|
-
reviews:
|
|
1547
|
+
reviews: z9.array(z9.string()).min(1).optional()
|
|
1418
1548
|
}).refine(
|
|
1419
1549
|
(page) => [page.openui, page.channel, page.threads, page.reviews].filter((body) => body !== void 0).length === 1,
|
|
1420
1550
|
{
|
|
1421
1551
|
message: "App page must declare exactly one of openui, channel, threads, or reviews"
|
|
1422
1552
|
}
|
|
1423
1553
|
);
|
|
1424
|
-
var deploymentDefinitionAppNavSectionSchema =
|
|
1425
|
-
title:
|
|
1426
|
-
entries:
|
|
1427
|
-
|
|
1428
|
-
pageName:
|
|
1429
|
-
label:
|
|
1554
|
+
var deploymentDefinitionAppNavSectionSchema = z9.object({
|
|
1555
|
+
title: z9.string(),
|
|
1556
|
+
entries: z9.array(
|
|
1557
|
+
z9.object({
|
|
1558
|
+
pageName: z9.string(),
|
|
1559
|
+
label: z9.string().optional()
|
|
1430
1560
|
})
|
|
1431
1561
|
)
|
|
1432
1562
|
});
|
|
1433
|
-
var deploymentDefinitionAppShellRegionSchema =
|
|
1434
|
-
name:
|
|
1435
|
-
props:
|
|
1563
|
+
var deploymentDefinitionAppShellRegionSchema = z9.object({
|
|
1564
|
+
name: z9.enum(["topbar", "leftbar", "rightbar"]),
|
|
1565
|
+
props: z9.record(z9.string(), z9.union([z9.string(), z9.boolean(), z9.array(z9.string())]))
|
|
1436
1566
|
});
|
|
1437
|
-
var deploymentDefinitionAppLandingDiscoverSchema =
|
|
1438
|
-
index:
|
|
1439
|
-
metaTitle:
|
|
1440
|
-
metaDescription:
|
|
1441
|
-
keywords:
|
|
1442
|
-
ogImage:
|
|
1443
|
-
canonical:
|
|
1444
|
-
locale:
|
|
1445
|
-
summary:
|
|
1446
|
-
audience:
|
|
1447
|
-
capabilities:
|
|
1448
|
-
faq:
|
|
1449
|
-
|
|
1450
|
-
question:
|
|
1451
|
-
answer:
|
|
1567
|
+
var deploymentDefinitionAppLandingDiscoverSchema = z9.object({
|
|
1568
|
+
index: z9.boolean().optional(),
|
|
1569
|
+
metaTitle: z9.string().optional(),
|
|
1570
|
+
metaDescription: z9.string().optional(),
|
|
1571
|
+
keywords: z9.array(z9.string()).optional(),
|
|
1572
|
+
ogImage: z9.string().optional(),
|
|
1573
|
+
canonical: z9.string().optional(),
|
|
1574
|
+
locale: z9.string().optional(),
|
|
1575
|
+
summary: z9.string().optional(),
|
|
1576
|
+
audience: z9.string().optional(),
|
|
1577
|
+
capabilities: z9.array(z9.string()).optional(),
|
|
1578
|
+
faq: z9.array(
|
|
1579
|
+
z9.object({
|
|
1580
|
+
question: z9.string(),
|
|
1581
|
+
answer: z9.string()
|
|
1452
1582
|
})
|
|
1453
1583
|
).optional(),
|
|
1454
|
-
organization:
|
|
1455
|
-
organizationUrl:
|
|
1456
|
-
applicationCategory:
|
|
1584
|
+
organization: z9.string().optional(),
|
|
1585
|
+
organizationUrl: z9.string().optional(),
|
|
1586
|
+
applicationCategory: z9.string().optional()
|
|
1457
1587
|
});
|
|
1458
|
-
var deploymentDefinitionAppLandingSchema =
|
|
1459
|
-
layout:
|
|
1460
|
-
image:
|
|
1461
|
-
title:
|
|
1462
|
-
subtitle:
|
|
1463
|
-
signInTitle:
|
|
1464
|
-
signInHint:
|
|
1465
|
-
footer:
|
|
1588
|
+
var deploymentDefinitionAppLandingSchema = z9.object({
|
|
1589
|
+
layout: z9.enum(["centered", "split", "cover"]).optional(),
|
|
1590
|
+
image: z9.string().optional(),
|
|
1591
|
+
title: z9.string().optional(),
|
|
1592
|
+
subtitle: z9.string().optional(),
|
|
1593
|
+
signInTitle: z9.string().optional(),
|
|
1594
|
+
signInHint: z9.string().optional(),
|
|
1595
|
+
footer: z9.string().optional(),
|
|
1466
1596
|
discover: deploymentDefinitionAppLandingDiscoverSchema.optional()
|
|
1467
1597
|
});
|
|
1468
|
-
var deploymentDefinitionAppSchema =
|
|
1598
|
+
var deploymentDefinitionAppSchema = z9.object({
|
|
1469
1599
|
id: uuidLike2,
|
|
1470
|
-
name:
|
|
1471
|
-
label:
|
|
1472
|
-
description:
|
|
1473
|
-
icon:
|
|
1474
|
-
brand:
|
|
1475
|
-
accent:
|
|
1476
|
-
logo:
|
|
1477
|
-
theme:
|
|
1600
|
+
name: z9.string(),
|
|
1601
|
+
label: z9.string(),
|
|
1602
|
+
description: z9.string().optional(),
|
|
1603
|
+
icon: z9.string().optional(),
|
|
1604
|
+
brand: z9.object({
|
|
1605
|
+
accent: z9.string().optional(),
|
|
1606
|
+
logo: z9.string().optional(),
|
|
1607
|
+
theme: z9.enum(APP_THEMES).optional(),
|
|
1478
1608
|
tokens: appBrandTokensSchema.optional(),
|
|
1479
1609
|
avatar: appAvatarSchema.optional()
|
|
1480
1610
|
}).optional(),
|
|
1481
1611
|
landing: deploymentDefinitionAppLandingSchema.optional(),
|
|
1482
1612
|
audience: appAudiencePolicySchema.optional(),
|
|
1483
|
-
shell:
|
|
1484
|
-
preset:
|
|
1485
|
-
regions:
|
|
1613
|
+
shell: z9.object({
|
|
1614
|
+
preset: z9.enum(["sidebar", "topnav", "chat", "canvas"]).optional(),
|
|
1615
|
+
regions: z9.array(deploymentDefinitionAppShellRegionSchema).optional()
|
|
1486
1616
|
}).optional(),
|
|
1487
|
-
nav:
|
|
1488
|
-
sections:
|
|
1617
|
+
nav: z9.object({
|
|
1618
|
+
sections: z9.array(deploymentDefinitionAppNavSectionSchema)
|
|
1489
1619
|
}).optional(),
|
|
1490
|
-
pages:
|
|
1620
|
+
pages: z9.array(deploymentDefinitionAppPageSchema)
|
|
1491
1621
|
});
|
|
1492
|
-
var deploymentDefinitionEdgeSchema =
|
|
1622
|
+
var deploymentDefinitionEdgeSchema = z9.object({
|
|
1493
1623
|
id: uuidLike2,
|
|
1494
1624
|
sourceNodeId: uuidLike2,
|
|
1495
1625
|
targetNodeId: uuidLike2,
|
|
1496
|
-
label:
|
|
1626
|
+
label: z9.string().optional()
|
|
1497
1627
|
});
|
|
1498
|
-
var deploymentDefinitionWorkflowSchema =
|
|
1628
|
+
var deploymentDefinitionWorkflowSchema = z9.object({
|
|
1499
1629
|
id: uuidLike2,
|
|
1500
|
-
name:
|
|
1501
|
-
label:
|
|
1502
|
-
description:
|
|
1503
|
-
concurrency:
|
|
1504
|
-
executionTokenTtlSeconds:
|
|
1505
|
-
nodes:
|
|
1506
|
-
edges:
|
|
1630
|
+
name: z9.string(),
|
|
1631
|
+
label: z9.string(),
|
|
1632
|
+
description: z9.string().optional(),
|
|
1633
|
+
concurrency: z9.number().int().min(1).max(64).optional(),
|
|
1634
|
+
executionTokenTtlSeconds: z9.number().int().min(300).max(86400).optional(),
|
|
1635
|
+
nodes: z9.array(deploymentDefinitionNodeSchema),
|
|
1636
|
+
edges: z9.array(deploymentDefinitionEdgeSchema),
|
|
1507
1637
|
/**
|
|
1508
1638
|
* Set on graphs synthesized from inline `map`/`fanout`/`while` subgraphs. These are
|
|
1509
1639
|
* resolved at runtime via `preloadedWorkflows` and are NOT persisted as
|
|
1510
1640
|
* workflow snapshots, so they never appear in the workflow list / UI.
|
|
1511
1641
|
*/
|
|
1512
|
-
synthetic:
|
|
1642
|
+
synthetic: z9.boolean().optional(),
|
|
1513
1643
|
/** Optional `goal` block name this workflow conforms to (`achieves: <goal>`). */
|
|
1514
|
-
achieves:
|
|
1644
|
+
achieves: z9.string().min(1).optional()
|
|
1515
1645
|
});
|
|
1516
|
-
var deploymentDefinitionTriggerSchema =
|
|
1646
|
+
var deploymentDefinitionTriggerSchema = z9.object({
|
|
1517
1647
|
id: uuidLike2,
|
|
1518
|
-
name:
|
|
1648
|
+
name: z9.string(),
|
|
1519
1649
|
resourceType: triggerTypeSchema,
|
|
1520
1650
|
resourceId: uuidLike2,
|
|
1521
1651
|
workflowId: uuidLike2.optional(),
|
|
1522
1652
|
goalId: uuidLike2.optional(),
|
|
1523
|
-
enabled:
|
|
1653
|
+
enabled: z9.boolean().optional()
|
|
1524
1654
|
}).superRefine((trigger, ctx) => {
|
|
1525
1655
|
if (trigger.workflowId === void 0 === (trigger.goalId === void 0)) {
|
|
1526
1656
|
ctx.addIssue({
|
|
@@ -1529,107 +1659,107 @@ var deploymentDefinitionTriggerSchema = z8.object({
|
|
|
1529
1659
|
});
|
|
1530
1660
|
}
|
|
1531
1661
|
});
|
|
1532
|
-
var deploymentDefinitionClaimConditionSchema =
|
|
1533
|
-
claim:
|
|
1534
|
-
op:
|
|
1535
|
-
values:
|
|
1662
|
+
var deploymentDefinitionClaimConditionSchema = z9.object({
|
|
1663
|
+
claim: z9.string(),
|
|
1664
|
+
op: z9.enum(["eq", "in"]),
|
|
1665
|
+
values: z9.array(z9.string())
|
|
1536
1666
|
});
|
|
1537
|
-
var deploymentDefinitionRoleSchema =
|
|
1538
|
-
name:
|
|
1539
|
-
description:
|
|
1540
|
-
match:
|
|
1667
|
+
var deploymentDefinitionRoleSchema = z9.object({
|
|
1668
|
+
name: z9.string(),
|
|
1669
|
+
description: z9.string().optional(),
|
|
1670
|
+
match: z9.array(deploymentDefinitionClaimConditionSchema)
|
|
1541
1671
|
});
|
|
1542
|
-
var policyGrantBase =
|
|
1543
|
-
effect:
|
|
1544
|
-
role:
|
|
1672
|
+
var policyGrantBase = z9.object({
|
|
1673
|
+
effect: z9.enum(["allow", "deny"]),
|
|
1674
|
+
role: z9.string()
|
|
1545
1675
|
});
|
|
1546
|
-
var deploymentDefinitionPolicyGrantSchema =
|
|
1676
|
+
var deploymentDefinitionPolicyGrantSchema = z9.union([
|
|
1547
1677
|
policyGrantBase.extend({
|
|
1548
|
-
agent:
|
|
1549
|
-
workflow:
|
|
1550
|
-
goal:
|
|
1551
|
-
workflows:
|
|
1552
|
-
tools:
|
|
1678
|
+
agent: z9.string(),
|
|
1679
|
+
workflow: z9.never().optional(),
|
|
1680
|
+
goal: z9.never().optional(),
|
|
1681
|
+
workflows: z9.array(z9.string()).optional(),
|
|
1682
|
+
tools: z9.array(z9.string()).optional()
|
|
1553
1683
|
}),
|
|
1554
1684
|
policyGrantBase.extend({
|
|
1555
|
-
workflow:
|
|
1556
|
-
agent:
|
|
1557
|
-
goal:
|
|
1558
|
-
workflows:
|
|
1559
|
-
tools:
|
|
1685
|
+
workflow: z9.string().min(1).refine((name) => name !== "*"),
|
|
1686
|
+
agent: z9.never().optional(),
|
|
1687
|
+
goal: z9.never().optional(),
|
|
1688
|
+
workflows: z9.never().optional(),
|
|
1689
|
+
tools: z9.never().optional()
|
|
1560
1690
|
}),
|
|
1561
1691
|
policyGrantBase.extend({
|
|
1562
|
-
goal:
|
|
1563
|
-
agent:
|
|
1564
|
-
workflow:
|
|
1565
|
-
workflows:
|
|
1566
|
-
tools:
|
|
1692
|
+
goal: z9.string().min(1).refine((name) => name !== "*"),
|
|
1693
|
+
agent: z9.never().optional(),
|
|
1694
|
+
workflow: z9.never().optional(),
|
|
1695
|
+
workflows: z9.never().optional(),
|
|
1696
|
+
tools: z9.never().optional()
|
|
1567
1697
|
})
|
|
1568
1698
|
]);
|
|
1569
|
-
var deploymentDefinitionFilePolicySchema =
|
|
1570
|
-
retention:
|
|
1571
|
-
|
|
1572
|
-
|
|
1699
|
+
var deploymentDefinitionFilePolicySchema = z9.object({
|
|
1700
|
+
retention: z9.discriminatedUnion("mode", [
|
|
1701
|
+
z9.object({ mode: z9.literal("forever") }),
|
|
1702
|
+
z9.object({ mode: z9.literal("days"), days: z9.number().int().positive() })
|
|
1573
1703
|
])
|
|
1574
1704
|
});
|
|
1575
|
-
var deploymentDefinitionPolicySchema =
|
|
1576
|
-
grants:
|
|
1705
|
+
var deploymentDefinitionPolicySchema = z9.object({
|
|
1706
|
+
grants: z9.array(deploymentDefinitionPolicyGrantSchema),
|
|
1577
1707
|
files: deploymentDefinitionFilePolicySchema.optional()
|
|
1578
1708
|
});
|
|
1579
|
-
var deploymentDefinitionTestBlockSchema =
|
|
1709
|
+
var deploymentDefinitionTestBlockSchema = z9.object({
|
|
1580
1710
|
id: uuidLike2,
|
|
1581
|
-
name:
|
|
1711
|
+
name: z9.string()
|
|
1582
1712
|
}).loose();
|
|
1583
1713
|
var deploymentDefinitionMockBlockSchema = deploymentDefinitionTestBlockSchema;
|
|
1584
1714
|
var deploymentDefinitionPlaybookBlockSchema = deploymentDefinitionTestBlockSchema;
|
|
1585
|
-
var deploymentDefinitionSchema =
|
|
1586
|
-
version:
|
|
1587
|
-
forms:
|
|
1588
|
-
webhooks:
|
|
1589
|
-
schedules:
|
|
1590
|
-
workflows:
|
|
1591
|
-
schemas:
|
|
1592
|
-
triggers:
|
|
1593
|
-
secretBlocks:
|
|
1594
|
-
authBlocks:
|
|
1595
|
-
postgresBlocks:
|
|
1715
|
+
var deploymentDefinitionSchema = z9.object({
|
|
1716
|
+
version: z9.number().optional(),
|
|
1717
|
+
forms: z9.array(deploymentDefinitionFormSchema).optional(),
|
|
1718
|
+
webhooks: z9.array(deploymentDefinitionWebhookSchema).optional(),
|
|
1719
|
+
schedules: z9.array(deploymentDefinitionScheduleSchema).optional(),
|
|
1720
|
+
workflows: z9.array(deploymentDefinitionWorkflowSchema).optional(),
|
|
1721
|
+
schemas: z9.array(deploymentDefinitionNamedSchemaSchema).optional(),
|
|
1722
|
+
triggers: z9.array(deploymentDefinitionTriggerSchema).optional(),
|
|
1723
|
+
secretBlocks: z9.array(deploymentDefinitionSecretBlockSchema).optional(),
|
|
1724
|
+
authBlocks: z9.array(deploymentDefinitionAuthBlockSchema).optional(),
|
|
1725
|
+
postgresBlocks: z9.array(deploymentDefinitionPostgresBlockSchema).optional(),
|
|
1596
1726
|
/** Swirls-managed Postgres databases (`database name { schema: @prisma … }`). */
|
|
1597
|
-
databaseBlocks:
|
|
1727
|
+
databaseBlocks: z9.array(deploymentDefinitionDatabaseBlockSchema).optional(),
|
|
1598
1728
|
/** Declared data migrations for managed databases (`migration name { … }`). */
|
|
1599
|
-
databaseMigrations:
|
|
1600
|
-
diskBlocks:
|
|
1601
|
-
computerBlocks:
|
|
1729
|
+
databaseMigrations: z9.array(deploymentDefinitionDatabaseMigrationSchema).optional(),
|
|
1730
|
+
diskBlocks: z9.array(deploymentDefinitionDiskBlockSchema).optional(),
|
|
1731
|
+
computerBlocks: z9.array(deploymentDefinitionComputerBlockSchema).optional(),
|
|
1602
1732
|
/** Scripts that run on enrolled devices (`operation name { … }`). */
|
|
1603
|
-
operationBlocks:
|
|
1604
|
-
skillBlocks:
|
|
1605
|
-
decisionBlocks:
|
|
1606
|
-
agentBlocks:
|
|
1607
|
-
channelBlocks:
|
|
1608
|
-
queryBlocks:
|
|
1609
|
-
connectionBlocks:
|
|
1610
|
-
mcpBlocks:
|
|
1611
|
-
networkBlocks:
|
|
1612
|
-
connectorBlocks:
|
|
1613
|
-
actionBlocks:
|
|
1614
|
-
streams:
|
|
1733
|
+
operationBlocks: z9.array(deploymentDefinitionOperationBlockSchema).optional(),
|
|
1734
|
+
skillBlocks: z9.array(deploymentDefinitionSkillBlockSchema).optional(),
|
|
1735
|
+
decisionBlocks: z9.array(decisionDefinitionSchema.extend({ id: z9.uuid() })).optional(),
|
|
1736
|
+
agentBlocks: z9.array(deploymentDefinitionAgentBlockSchema).optional(),
|
|
1737
|
+
channelBlocks: z9.array(deploymentDefinitionChannelBlockSchema).optional(),
|
|
1738
|
+
queryBlocks: z9.array(deploymentDefinitionQueryBlockSchema).optional(),
|
|
1739
|
+
connectionBlocks: z9.array(deploymentDefinitionConnectionBlockSchema).optional(),
|
|
1740
|
+
mcpBlocks: z9.array(deploymentDefinitionMcpBlockSchema).optional(),
|
|
1741
|
+
networkBlocks: z9.array(deploymentDefinitionNetworkBlockSchema).optional(),
|
|
1742
|
+
connectorBlocks: z9.array(deploymentDefinitionConnectorBlockSchema).optional(),
|
|
1743
|
+
actionBlocks: z9.array(deploymentDefinitionActionBlockSchema).optional(),
|
|
1744
|
+
streams: z9.array(deploymentDefinitionStreamSchema).optional(),
|
|
1615
1745
|
/** Spreadsheet-like stream compositions (`view name { … }`). */
|
|
1616
|
-
views:
|
|
1746
|
+
views: z9.array(deploymentDefinitionViewSchema).optional(),
|
|
1617
1747
|
/**
|
|
1618
1748
|
* Bespoke OpenUI-backed interfaces (`app name { shell, nav, page … }`,
|
|
1619
1749
|
* RFC 0022). Distinct from the retired RFC 0015 generative `app`.
|
|
1620
1750
|
*/
|
|
1621
|
-
apps:
|
|
1751
|
+
apps: z9.array(deploymentDefinitionAppSchema).optional(),
|
|
1622
1752
|
/** Identity-scoped access roles (`role name { match { … } }`). */
|
|
1623
|
-
roles:
|
|
1753
|
+
roles: z9.array(deploymentDefinitionRoleSchema).optional(),
|
|
1624
1754
|
/** Role-to-agent grants (`policy { allow <role> -> agent … }`). Grants
|
|
1625
1755
|
* present opts the deployment into deny-by-default enforcement. */
|
|
1626
|
-
policies:
|
|
1756
|
+
policies: z9.array(deploymentDefinitionPolicySchema).optional(),
|
|
1627
1757
|
/** Operational goal contracts (`goal name { … }`). */
|
|
1628
|
-
goals:
|
|
1758
|
+
goals: z9.array(deploymentDefinitionGoalSchema).optional(),
|
|
1629
1759
|
/** Hosted test harness mock declarations, retained as jsonb-friendly data. */
|
|
1630
|
-
mockBlocks:
|
|
1760
|
+
mockBlocks: z9.array(deploymentDefinitionMockBlockSchema).optional(),
|
|
1631
1761
|
/** Hosted test harness playbook declarations, retained as jsonb-friendly data. */
|
|
1632
|
-
playbookBlocks:
|
|
1762
|
+
playbookBlocks: z9.array(deploymentDefinitionPlaybookBlockSchema).optional()
|
|
1633
1763
|
}).superRefine((val, ctx) => {
|
|
1634
1764
|
const workflows = val.workflows ?? [];
|
|
1635
1765
|
const primitiveCount = workflows.length + (val.forms?.length ?? 0) + (val.webhooks?.length ?? 0) + (val.schedules?.length ?? 0) + (val.triggers?.length ?? 0) + (val.secretBlocks?.length ?? 0) + (val.authBlocks?.length ?? 0) + (val.postgresBlocks?.length ?? 0) + (val.databaseBlocks?.length ?? 0) + (val.databaseMigrations?.length ?? 0) + (val.diskBlocks?.length ?? 0) + (val.computerBlocks?.length ?? 0) + (val.operationBlocks?.length ?? 0) + (val.skillBlocks?.length ?? 0) + (val.agentBlocks?.length ?? 0) + (val.decisionBlocks?.length ?? 0) + (val.channelBlocks?.length ?? 0) + (val.queryBlocks?.length ?? 0) + (val.connectionBlocks?.length ?? 0) + (val.mcpBlocks?.length ?? 0) + (val.networkBlocks?.length ?? 0) + (val.connectorBlocks?.length ?? 0) + (val.actionBlocks?.length ?? 0) + (val.streams?.length ?? 0) + (val.views?.length ?? 0) + (val.apps?.length ?? 0) + (val.roles?.length ?? 0) + (val.policies?.length ?? 0) + (val.goals?.length ?? 0) + (val.mockBlocks?.length ?? 0) + (val.playbookBlocks?.length ?? 0);
|
|
@@ -5696,6 +5826,27 @@ function parseAppBlock(d, docComment) {
|
|
|
5696
5826
|
};
|
|
5697
5827
|
}
|
|
5698
5828
|
|
|
5829
|
+
// ../language/src/goal/ast.ts
|
|
5830
|
+
var GOAL_BUILTIN_OPTIMIZE_METRICS = [
|
|
5831
|
+
"cost",
|
|
5832
|
+
"duration",
|
|
5833
|
+
"interventions",
|
|
5834
|
+
"tokens"
|
|
5835
|
+
];
|
|
5836
|
+
|
|
5837
|
+
// ../language/src/ast.ts
|
|
5838
|
+
var REVIEW_CODE_FIELDS = [
|
|
5839
|
+
"title",
|
|
5840
|
+
"description",
|
|
5841
|
+
"content",
|
|
5842
|
+
"approvedOutput",
|
|
5843
|
+
"rejectedOutput"
|
|
5844
|
+
];
|
|
5845
|
+
var reviewCodeFields = new Set(REVIEW_CODE_FIELDS);
|
|
5846
|
+
function isReviewCodeField(key) {
|
|
5847
|
+
return reviewCodeFields.has(key);
|
|
5848
|
+
}
|
|
5849
|
+
|
|
5699
5850
|
// ../language/src/duration.ts
|
|
5700
5851
|
var DURATION_UNIT_SECONDS = {
|
|
5701
5852
|
s: 1,
|
|
@@ -6959,14 +7110,6 @@ function parseDiskBlock(d, docComment) {
|
|
|
6959
7110
|
};
|
|
6960
7111
|
}
|
|
6961
7112
|
|
|
6962
|
-
// ../language/src/goal/ast.ts
|
|
6963
|
-
var GOAL_BUILTIN_OPTIMIZE_METRICS = [
|
|
6964
|
-
"cost",
|
|
6965
|
-
"duration",
|
|
6966
|
-
"interventions",
|
|
6967
|
-
"tokens"
|
|
6968
|
-
];
|
|
6969
|
-
|
|
6970
7113
|
// ../language/src/goal/parser.ts
|
|
6971
7114
|
var BUILTIN_METRIC_SET = new Set(GOAL_BUILTIN_OPTIMIZE_METRICS);
|
|
6972
7115
|
function rangeFromTokens10(start, end) {
|
|
@@ -10570,70 +10713,6 @@ function parseQueryBlock(d, docComment) {
|
|
|
10570
10713
|
};
|
|
10571
10714
|
}
|
|
10572
10715
|
|
|
10573
|
-
// ../definition/src/file-values.ts
|
|
10574
|
-
import { z as z9 } from "zod";
|
|
10575
|
-
var FILE_HANDLE_KIND = "swirls.file";
|
|
10576
|
-
var FILE_VALUE_MAX_BYTES = 25 * 1024 * 1024;
|
|
10577
|
-
var FILE_GRANT_MAX_BYTES = 100 * 1024 * 1024;
|
|
10578
|
-
var FILE_PROJECT_MAX_BYTES = 1024 * 1024 * 1024;
|
|
10579
|
-
var fileUploadGrantPurposeSchema = z9.enum([
|
|
10580
|
-
"workflow_input",
|
|
10581
|
-
"review",
|
|
10582
|
-
"form",
|
|
10583
|
-
"cli",
|
|
10584
|
-
"chat",
|
|
10585
|
-
"execution"
|
|
10586
|
-
]);
|
|
10587
|
-
var TEXT_PRESENTABLE_MEDIA_TYPES = ["text/plain", "text/html", "text/markdown"];
|
|
10588
|
-
var textPresentableMediaTypeSet = new Set(TEXT_PRESENTABLE_MEDIA_TYPES);
|
|
10589
|
-
var fileHandleSchema = z9.object({
|
|
10590
|
-
kind: z9.literal(FILE_HANDLE_KIND),
|
|
10591
|
-
id: z9.string().min(1),
|
|
10592
|
-
mediaType: z9.string().min(1),
|
|
10593
|
-
name: z9.string().min(1),
|
|
10594
|
-
size: z9.number().int().nonnegative(),
|
|
10595
|
-
sha256: z9.string().min(1).optional()
|
|
10596
|
-
}).strict();
|
|
10597
|
-
var fileObjectStatusSchema = z9.enum(["pending", "ready"]);
|
|
10598
|
-
var fileRetentionSchema = z9.discriminatedUnion("mode", [
|
|
10599
|
-
z9.object({ mode: z9.literal("forever") }),
|
|
10600
|
-
z9.object({ mode: z9.literal("days"), days: z9.number().int().positive() })
|
|
10601
|
-
]);
|
|
10602
|
-
var RETENTION_DAYS_PATTERN = /^([0-9]+)d$/;
|
|
10603
|
-
function parseFileRetentionLiteral(literal) {
|
|
10604
|
-
const trimmed = literal.trim();
|
|
10605
|
-
if (trimmed === "forever") {
|
|
10606
|
-
return { mode: "forever" };
|
|
10607
|
-
}
|
|
10608
|
-
const match = RETENTION_DAYS_PATTERN.exec(trimmed);
|
|
10609
|
-
const daysText = match?.[1];
|
|
10610
|
-
if (daysText === void 0) {
|
|
10611
|
-
return null;
|
|
10612
|
-
}
|
|
10613
|
-
const days = Number(daysText);
|
|
10614
|
-
if (!Number.isSafeInteger(days) || days <= 0) {
|
|
10615
|
-
return null;
|
|
10616
|
-
}
|
|
10617
|
-
return { mode: "days", days };
|
|
10618
|
-
}
|
|
10619
|
-
var FILE_RETENTION_SYNTAX_HINT = "retention must be forever or a day count like 30d";
|
|
10620
|
-
var fileUploadGrantResponseSchema = z9.object({
|
|
10621
|
-
id: z9.uuid(),
|
|
10622
|
-
projectId: z9.uuid(),
|
|
10623
|
-
expiresAt: z9.string(),
|
|
10624
|
-
maxBytes: z9.number().int().positive(),
|
|
10625
|
-
maxFiles: z9.number().int().positive()
|
|
10626
|
-
});
|
|
10627
|
-
var initFileUploadResponseSchema = z9.object({
|
|
10628
|
-
objectId: z9.uuid(),
|
|
10629
|
-
uploadUrl: z9.url(),
|
|
10630
|
-
expiresAt: z9.string()
|
|
10631
|
-
});
|
|
10632
|
-
var previewFileResponseSchema = z9.object({
|
|
10633
|
-
url: z9.url(),
|
|
10634
|
-
expiresAt: z9.string()
|
|
10635
|
-
});
|
|
10636
|
-
|
|
10637
10716
|
// ../language/src/rbac/parser.ts
|
|
10638
10717
|
function rangeFromTokens18(start, end) {
|
|
10639
10718
|
return {
|
|
@@ -12942,12 +13021,16 @@ var Parser = class {
|
|
|
12942
13021
|
/**
|
|
12943
13022
|
* Parse a review config object `{ enabled?, title?, description?, content?, schema?, actions?, ... }`.
|
|
12944
13023
|
* Supports schema as @json { } block (parsed as object); other values via parseValue().
|
|
13024
|
+
*
|
|
13025
|
+
* `parseValue()` gives the body of an `@ts { }` or `@sql { }` block as a
|
|
13026
|
+
* plain string, so `kinds` records which of the code fields were fenced.
|
|
12945
13027
|
*/
|
|
12946
13028
|
parseReviewConfigObject() {
|
|
12947
13029
|
if (!this.expect("lbrace")) {
|
|
12948
13030
|
return void 0;
|
|
12949
13031
|
}
|
|
12950
13032
|
const out = {};
|
|
13033
|
+
const kinds = /* @__PURE__ */ new Map();
|
|
12951
13034
|
let schemaRefRange;
|
|
12952
13035
|
while (!this.eof()) {
|
|
12953
13036
|
const t = this.peek();
|
|
@@ -12996,9 +13079,14 @@ var Parser = class {
|
|
|
12996
13079
|
}
|
|
12997
13080
|
continue;
|
|
12998
13081
|
}
|
|
13082
|
+
const valueTok = this.peek();
|
|
12999
13083
|
const value = this.parseValue();
|
|
13000
13084
|
if (value !== void 0) {
|
|
13001
13085
|
out[key] = value;
|
|
13086
|
+
kinds.delete(key);
|
|
13087
|
+
if (isReviewCodeField(key) && valueTok?.kind === "fenced_block" && (valueTok.fencedLang === "ts" || valueTok.fencedLang === "sql")) {
|
|
13088
|
+
kinds.set(key, valueTok.fencedLang);
|
|
13089
|
+
}
|
|
13002
13090
|
}
|
|
13003
13091
|
if (this.peek()?.kind === "rbrace") {
|
|
13004
13092
|
break;
|
|
@@ -13008,7 +13096,11 @@ var Parser = class {
|
|
|
13008
13096
|
}
|
|
13009
13097
|
}
|
|
13010
13098
|
this.expect("rbrace");
|
|
13011
|
-
return {
|
|
13099
|
+
return {
|
|
13100
|
+
config: out,
|
|
13101
|
+
kinds: kinds.size > 0 ? Object.fromEntries(kinds) : void 0,
|
|
13102
|
+
schemaRefRange
|
|
13103
|
+
};
|
|
13012
13104
|
}
|
|
13013
13105
|
parseArrayLiteral() {
|
|
13014
13106
|
if (!this.expect("lbracket")) {
|
|
@@ -13472,6 +13564,7 @@ var Parser = class {
|
|
|
13472
13564
|
let outputSchemaRef;
|
|
13473
13565
|
let outputSchemaRefRange;
|
|
13474
13566
|
let reviewConfig;
|
|
13567
|
+
let reviewConfigKinds;
|
|
13475
13568
|
let reviewSchemaRefRange;
|
|
13476
13569
|
let outputFormatVal;
|
|
13477
13570
|
let secretsMap;
|
|
@@ -13607,6 +13700,7 @@ var Parser = class {
|
|
|
13607
13700
|
...obj,
|
|
13608
13701
|
enabled: obj.enabled !== void 0 ? obj.enabled : true
|
|
13609
13702
|
};
|
|
13703
|
+
reviewConfigKinds = parsedReview.kinds;
|
|
13610
13704
|
reviewSchemaRefRange = parsedReview.schemaRefRange;
|
|
13611
13705
|
}
|
|
13612
13706
|
} else {
|
|
@@ -13647,6 +13741,7 @@ var Parser = class {
|
|
|
13647
13741
|
outputSchemaRef,
|
|
13648
13742
|
outputSchemaRefRange,
|
|
13649
13743
|
reviewConfig,
|
|
13744
|
+
reviewConfigKinds,
|
|
13650
13745
|
reviewSchemaRefRange,
|
|
13651
13746
|
secretsMap,
|
|
13652
13747
|
secretsMapBlockRanges,
|
|
@@ -13682,6 +13777,7 @@ var Parser = class {
|
|
|
13682
13777
|
let outputSchemaRef;
|
|
13683
13778
|
let outputSchemaRefRange;
|
|
13684
13779
|
let reviewConfig;
|
|
13780
|
+
let reviewConfigKinds;
|
|
13685
13781
|
let reviewSchemaRefRange;
|
|
13686
13782
|
let outputFormatVal;
|
|
13687
13783
|
let secretsMap;
|
|
@@ -13819,6 +13915,7 @@ var Parser = class {
|
|
|
13819
13915
|
...obj,
|
|
13820
13916
|
enabled: obj.enabled !== void 0 ? obj.enabled : true
|
|
13821
13917
|
};
|
|
13918
|
+
reviewConfigKinds = parsedReview.kinds;
|
|
13822
13919
|
reviewSchemaRefRange = parsedReview.schemaRefRange;
|
|
13823
13920
|
}
|
|
13824
13921
|
} else {
|
|
@@ -13854,6 +13951,7 @@ var Parser = class {
|
|
|
13854
13951
|
outputSchemaRef,
|
|
13855
13952
|
outputSchemaRefRange,
|
|
13856
13953
|
reviewConfig,
|
|
13954
|
+
reviewConfigKinds,
|
|
13857
13955
|
reviewSchemaRefRange,
|
|
13858
13956
|
secretsMap,
|
|
13859
13957
|
secretsMapBlockRanges,
|
|
@@ -20248,7 +20346,7 @@ function validate(ast, options) {
|
|
|
20248
20346
|
const range2 = kindCv.range;
|
|
20249
20347
|
out.push(
|
|
20250
20348
|
diag25(
|
|
20251
|
-
`Invalid ai kind "${kindVal}". Must be one of:
|
|
20349
|
+
`Invalid ai kind "${kindVal}". Must be one of: ${aiKindSchema.options.join(", ")}`,
|
|
20252
20350
|
range2
|
|
20253
20351
|
)
|
|
20254
20352
|
);
|
|
@@ -21206,23 +21304,8 @@ function inlineIntegrationActionConfig(config, ctx) {
|
|
|
21206
21304
|
}
|
|
21207
21305
|
|
|
21208
21306
|
// src/node-config.ts
|
|
21209
|
-
|
|
21210
|
-
disk: ["command", "path", "file"],
|
|
21211
|
-
shell: ["command"],
|
|
21212
|
-
device: ["device", "input"],
|
|
21213
|
-
http: ["url", "body"],
|
|
21214
|
-
email: ["from", "to", "subject", "text", "html", "replyTo"],
|
|
21215
|
-
scrape: ["url"],
|
|
21216
|
-
search: ["query", "location", "country", "tbs"],
|
|
21217
|
-
ai: ["prompt", "model"],
|
|
21218
|
-
agent: ["prompt", "system", "model"],
|
|
21219
|
-
decision: ["state", "model"],
|
|
21220
|
-
parallel: ["objective", "entityType"]
|
|
21221
|
-
};
|
|
21222
|
-
function configValueKindFromCv(cv) {
|
|
21307
|
+
function codeKindFromCv(cv) {
|
|
21223
21308
|
switch (cv.kind) {
|
|
21224
|
-
case "string":
|
|
21225
|
-
return "literal";
|
|
21226
21309
|
case "ts_block":
|
|
21227
21310
|
case "ts_file_ref":
|
|
21228
21311
|
return "ts";
|
|
@@ -21232,23 +21315,25 @@ function configValueKindFromCv(cv) {
|
|
|
21232
21315
|
return void 0;
|
|
21233
21316
|
}
|
|
21234
21317
|
}
|
|
21318
|
+
function reviewKindKey(field) {
|
|
21319
|
+
return `review.${field}`;
|
|
21320
|
+
}
|
|
21235
21321
|
function buildConfigValueKindsFromNodeDecl(node) {
|
|
21236
|
-
const nodeType = nodeTypeSchema.parse(node.type);
|
|
21237
|
-
const fields = EXECUTABLE_STRING_FIELDS[nodeType];
|
|
21238
|
-
if (!fields) {
|
|
21239
|
-
return void 0;
|
|
21240
|
-
}
|
|
21241
21322
|
const kinds = {};
|
|
21242
|
-
for (const key of
|
|
21243
|
-
const
|
|
21244
|
-
if (
|
|
21245
|
-
continue;
|
|
21246
|
-
}
|
|
21247
|
-
const kind = configValueKindFromCv(cv);
|
|
21248
|
-
if (kind) {
|
|
21323
|
+
for (const [key, cv] of Object.entries(node.configFields)) {
|
|
21324
|
+
const kind = codeKindFromCv(cv);
|
|
21325
|
+
if (kind && key in node.config) {
|
|
21249
21326
|
kinds[key] = kind;
|
|
21250
21327
|
}
|
|
21251
21328
|
}
|
|
21329
|
+
if (node.reviewConfig && node.reviewConfigKinds) {
|
|
21330
|
+
for (const field of REVIEW_CODE_FIELDS) {
|
|
21331
|
+
const kind = node.reviewConfigKinds[field];
|
|
21332
|
+
if (kind !== void 0 && node.reviewConfig[field] !== void 0) {
|
|
21333
|
+
kinds[reviewKindKey(field)] = kind;
|
|
21334
|
+
}
|
|
21335
|
+
}
|
|
21336
|
+
}
|
|
21252
21337
|
return Object.keys(kinds).length > 0 ? kinds : void 0;
|
|
21253
21338
|
}
|
|
21254
21339
|
function unwrapConfigValue(cv) {
|
|
@@ -21746,8 +21831,10 @@ ${z10.prettifyError(r.error)}`
|
|
|
21746
21831
|
}
|
|
21747
21832
|
}
|
|
21748
21833
|
const configValueKinds = buildConfigValueKindsFromNodeDecl({
|
|
21749
|
-
|
|
21750
|
-
|
|
21834
|
+
configFields: omitCredentialFieldsFromConfigFields(n.configFields),
|
|
21835
|
+
config: persistConfig,
|
|
21836
|
+
reviewConfig: reviewParsed,
|
|
21837
|
+
reviewConfigKinds: n.reviewConfigKinds
|
|
21751
21838
|
});
|
|
21752
21839
|
let secretsMapPayload = n.secretsMap;
|
|
21753
21840
|
if (persistConfig.type === "decision" && persistConfig.definition) {
|
|
@@ -24367,7 +24454,6 @@ export {
|
|
|
24367
24454
|
COMPUTER_MOUNT_KIT,
|
|
24368
24455
|
COMPUTER_MOUNT_PACKAGES,
|
|
24369
24456
|
COMPUTER_RESOURCE_DEFAULTS,
|
|
24370
|
-
EXECUTABLE_STRING_FIELDS,
|
|
24371
24457
|
HARNESS_DEBIAN_STAGE_DIR,
|
|
24372
24458
|
HARNESS_PROVIDERS,
|
|
24373
24459
|
HARNESS_ROOT_DIR,
|