@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/README.md
CHANGED
|
@@ -49,6 +49,67 @@ A diagnostic's `stage` says which step reported it: `mount` for an input that ca
|
|
|
49
49
|
|
|
50
50
|
`lowerSwirlsSources` is `lowerSwirlsMounts` over one mount, with the outputs in this shape.
|
|
51
51
|
|
|
52
|
+
## Fields written as code
|
|
53
|
+
|
|
54
|
+
In the definition, a node field written as `@ts { … }` or `@sql { … }` is a string like any literal: the body of the block. The node's `configValueKinds` records which fields were code, so a runtime evaluates by the kind and never by a list of fields it expects to be code. A field with no entry is the value as written.
|
|
55
|
+
|
|
56
|
+
| Field | Key in `configValueKinds` |
|
|
57
|
+
| --------------------------------------------------------------------------------------- | ------------------------------------- |
|
|
58
|
+
| A field of `config` (`code`, `url`, `headers`, `to`, …) | The field's name: `code`, `url`, … |
|
|
59
|
+
| `title`, `description`, `content`, `approvedOutput`, `rejectedOutput` of `reviewConfig` | `review.<field>`: `review.content`, … |
|
|
60
|
+
|
|
61
|
+
```swirls
|
|
62
|
+
node gate {
|
|
63
|
+
type: code
|
|
64
|
+
code: @ts { return {} }
|
|
65
|
+
review: {
|
|
66
|
+
title: "Approve the draft"
|
|
67
|
+
content: @ts { return { kind: "markdown", markdown: context.nodes.draft.output.body } }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
lowers to a node with `reviewConfig.title` and `reviewConfig.content` both strings and `configValueKinds: { code: 'ts', 'review.content': 'ts' }`. The title is a literal, so it has no entry. `content` written as code may return a string or a content envelope (`Content` in `@swirls/definition/schemas`); what is done with it is the runtime's part.
|
|
73
|
+
|
|
74
|
+
## AI nodes
|
|
75
|
+
|
|
76
|
+
An `ai` node lowers to a node whose `config` is `{ type: 'ai', kind, provider?, model?, prompt?, temperature?, maxTokens?, options? }`. `kind` fixes what the node outputs when it runs:
|
|
77
|
+
|
|
78
|
+
| `kind` | The node outputs |
|
|
79
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
80
|
+
| `text` | A string. |
|
|
81
|
+
| `object` | JSON matching the node's schema. |
|
|
82
|
+
| `image` | A stored file, as a file handle. A list of file handles when `options.n` is above 1. |
|
|
83
|
+
| `audio` | Speech synthesized from the prompt, which is the text to speak. One file handle. |
|
|
84
|
+
| `video` | One file handle. |
|
|
85
|
+
| `embed` | One vector (`number[]`) when `prompt` returns a string. A list of vectors (`number[][]`), in order, when `prompt` returns a list of strings. |
|
|
86
|
+
|
|
87
|
+
A file handle is `{ kind: 'swirls.file', id, mediaType, name, size, sha256? }`.
|
|
88
|
+
|
|
89
|
+
`options` holds the options specific to the kind, as written. Every option is optional. `text` and `object` take none. A key not listed for a kind is unknown for that kind.
|
|
90
|
+
|
|
91
|
+
| `kind` | Options |
|
|
92
|
+
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
93
|
+
| `image` | `n` (integer, 1 to 10), `size` (string: `"1024x1024"`, or a tier such as `"2K"`), `aspectRatio` (string: `"16:9"`), `resolution` (string: `"1K"`, `"2K"`), `quality` (string: `"low"`, `"medium"`, `"high"`), `format` (`"png"`, `"jpeg"` or `"webp"`), `background` (`"auto"`, `"transparent"` or `"opaque"`), `seed` (integer) |
|
|
94
|
+
| `audio` | `voice` (string; voices are specific to the model, and most models require one), `format` (`"mp3"` or `"wav"`; the default is `mp3`), `speed` (number), `instructions` (string: tone, pacing, emotion) |
|
|
95
|
+
| `video` | `duration` (integer, in seconds), `resolution` (string: `"720p"`), `aspectRatio` (string), `size` (string: `"WIDTHxHEIGHT"`), `audio` (boolean: generate a sound track), `seed` (integer) |
|
|
96
|
+
| `embed` | `dimensions` (integer) |
|
|
97
|
+
|
|
98
|
+
```swirls
|
|
99
|
+
node speak {
|
|
100
|
+
type: ai
|
|
101
|
+
label: "Speak"
|
|
102
|
+
kind: audio
|
|
103
|
+
model: "hexgrad/kokoro-82m"
|
|
104
|
+
prompt: @ts { return context.nodes.draft.output }
|
|
105
|
+
options: { voice: "af_heart" }
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
lowers to `config: { type: 'ai', kind: 'audio', model: 'hexgrad/kokoro-82m', prompt: ' return context.nodes.draft.output ', options: { voice: 'af_heart' } }` and `configValueKinds: { prompt: 'ts' }`.
|
|
110
|
+
|
|
111
|
+
Lowering refuses a `kind` that is not one of the six. It does not check `options`: an unknown option reaches the definition as written. The schemas of the options (`aiImageOptionsSchema`, `aiAudioOptionsSchema`, `aiVideoOptionsSchema`, `aiEmbedOptionsSchema`) are in `@swirls/definition/schemas`. This package does not export them.
|
|
112
|
+
|
|
52
113
|
## Several directories as one program
|
|
53
114
|
|
|
54
115
|
`lowerSwirlsMounts(mounts, options?)` lowers several directories, called mounts, into one definition. Each mount is `{ id, files, skillsRoot? }`:
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { z } from 'zod';
|
|
|
4
4
|
import fs from 'node:fs';
|
|
5
5
|
|
|
6
6
|
declare const goalOnViolationSchema: z.ZodEnum<{
|
|
7
|
-
block: "block";
|
|
8
7
|
review: "review";
|
|
8
|
+
block: "block";
|
|
9
9
|
}>;
|
|
10
10
|
type GoalOnViolation = z.infer<typeof goalOnViolationSchema>;
|
|
11
11
|
declare const goalBuiltInOptimizeMetricSchema: z.ZodEnum<{
|
|
@@ -33,8 +33,8 @@ declare const goalInvariantSchema: z.ZodObject<{
|
|
|
33
33
|
before: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
34
|
query: z.ZodOptional<z.ZodString>;
|
|
35
35
|
onViolation: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
block: "block";
|
|
37
36
|
review: "review";
|
|
37
|
+
block: "block";
|
|
38
38
|
}>>;
|
|
39
39
|
checkCode: z.ZodString;
|
|
40
40
|
}, z.core.$strip>;
|
|
@@ -74,8 +74,8 @@ declare const deploymentDefinitionGoalSchema: z.ZodObject<{
|
|
|
74
74
|
before: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
75
|
query: z.ZodOptional<z.ZodString>;
|
|
76
76
|
onViolation: z.ZodOptional<z.ZodEnum<{
|
|
77
|
-
block: "block";
|
|
78
77
|
review: "review";
|
|
78
|
+
block: "block";
|
|
79
79
|
}>>;
|
|
80
80
|
checkCode: z.ZodString;
|
|
81
81
|
}, z.core.$strip>>>;
|
|
@@ -217,6 +217,7 @@ declare const deploymentDefinitionSchema: z.ZodObject<{
|
|
|
217
217
|
text: "text";
|
|
218
218
|
image: "image";
|
|
219
219
|
video: "video";
|
|
220
|
+
audio: "audio";
|
|
220
221
|
embed: "embed";
|
|
221
222
|
}>;
|
|
222
223
|
provider: z.ZodOptional<z.ZodEnum<{
|
|
@@ -334,8 +335,8 @@ declare const deploymentDefinitionSchema: z.ZodObject<{
|
|
|
334
335
|
path: z.ZodOptional<z.ZodString>;
|
|
335
336
|
params: z.ZodOptional<z.ZodString>;
|
|
336
337
|
encoding: z.ZodOptional<z.ZodEnum<{
|
|
337
|
-
json: "json";
|
|
338
338
|
form: "form";
|
|
339
|
+
json: "json";
|
|
339
340
|
query: "query";
|
|
340
341
|
raw: "raw";
|
|
341
342
|
}>>;
|
|
@@ -484,10 +485,10 @@ declare const deploymentDefinitionSchema: z.ZodObject<{
|
|
|
484
485
|
type: z.ZodLiteral<"wait">;
|
|
485
486
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
486
487
|
unit: z.ZodOptional<z.ZodEnum<{
|
|
488
|
+
days: "days";
|
|
487
489
|
seconds: "seconds";
|
|
488
490
|
minutes: "minutes";
|
|
489
491
|
hours: "hours";
|
|
490
|
-
days: "days";
|
|
491
492
|
}>>;
|
|
492
493
|
secondsFromConfig: z.ZodOptional<z.ZodString>;
|
|
493
494
|
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
@@ -902,8 +903,8 @@ declare const deploymentDefinitionSchema: z.ZodObject<{
|
|
|
902
903
|
}>;
|
|
903
904
|
path: z.ZodString;
|
|
904
905
|
encoding: z.ZodOptional<z.ZodEnum<{
|
|
905
|
-
json: "json";
|
|
906
906
|
form: "form";
|
|
907
|
+
json: "json";
|
|
907
908
|
query: "query";
|
|
908
909
|
raw: "raw";
|
|
909
910
|
}>>;
|
|
@@ -1072,9 +1073,9 @@ declare const deploymentDefinitionSchema: z.ZodObject<{
|
|
|
1072
1073
|
shell: z.ZodOptional<z.ZodObject<{
|
|
1073
1074
|
preset: z.ZodOptional<z.ZodEnum<{
|
|
1074
1075
|
canvas: "canvas";
|
|
1076
|
+
chat: "chat";
|
|
1075
1077
|
sidebar: "sidebar";
|
|
1076
1078
|
topnav: "topnav";
|
|
1077
|
-
chat: "chat";
|
|
1078
1079
|
}>>;
|
|
1079
1080
|
regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1080
1081
|
name: z.ZodEnum<{
|
|
@@ -1181,8 +1182,8 @@ declare const deploymentDefinitionSchema: z.ZodObject<{
|
|
|
1181
1182
|
before: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1182
1183
|
query: z.ZodOptional<z.ZodString>;
|
|
1183
1184
|
onViolation: z.ZodOptional<z.ZodEnum<{
|
|
1184
|
-
block: "block";
|
|
1185
1185
|
review: "review";
|
|
1186
|
+
block: "block";
|
|
1186
1187
|
}>>;
|
|
1187
1188
|
checkCode: z.ZodString;
|
|
1188
1189
|
}, z.core.$strip>>>;
|
|
@@ -1320,7 +1321,7 @@ declare function parseDeploymentDefinition(data: unknown): z.ZodSafeParseResult<
|
|
|
1320
1321
|
scrapeFormats?: string[] | undefined;
|
|
1321
1322
|
} | {
|
|
1322
1323
|
type: "ai";
|
|
1323
|
-
kind: "object" | "text" | "image" | "video" | "embed";
|
|
1324
|
+
kind: "object" | "text" | "image" | "video" | "audio" | "embed";
|
|
1324
1325
|
provider?: "openrouter" | "anthropic" | "openai" | "google" | undefined;
|
|
1325
1326
|
model?: string | undefined;
|
|
1326
1327
|
prompt?: string | undefined;
|
|
@@ -1387,7 +1388,7 @@ declare function parseDeploymentDefinition(data: unknown): z.ZodSafeParseResult<
|
|
|
1387
1388
|
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | undefined;
|
|
1388
1389
|
path?: string | undefined;
|
|
1389
1390
|
params?: string | undefined;
|
|
1390
|
-
encoding?: "
|
|
1391
|
+
encoding?: "form" | "json" | "query" | "raw" | undefined;
|
|
1391
1392
|
actionInputSchema?: json_schema.JSONSchema7 | undefined;
|
|
1392
1393
|
actionOutputSchema?: json_schema.JSONSchema7 | undefined;
|
|
1393
1394
|
actionGraphqlDocument?: string | undefined;
|
|
@@ -1476,7 +1477,7 @@ declare function parseDeploymentDefinition(data: unknown): z.ZodSafeParseResult<
|
|
|
1476
1477
|
} | {
|
|
1477
1478
|
type: "wait";
|
|
1478
1479
|
amount?: number | undefined;
|
|
1479
|
-
unit?: "
|
|
1480
|
+
unit?: "days" | "seconds" | "minutes" | "hours" | undefined;
|
|
1480
1481
|
secondsFromConfig?: string | undefined;
|
|
1481
1482
|
}) & {
|
|
1482
1483
|
failurePolicy?: {
|
|
@@ -1825,7 +1826,7 @@ declare function parseDeploymentDefinition(data: unknown): z.ZodSafeParseResult<
|
|
|
1825
1826
|
path: string;
|
|
1826
1827
|
label?: string | undefined;
|
|
1827
1828
|
description?: string | undefined;
|
|
1828
|
-
encoding?: "
|
|
1829
|
+
encoding?: "form" | "json" | "query" | "raw" | undefined;
|
|
1829
1830
|
scopes?: string[] | undefined;
|
|
1830
1831
|
inputSchema?: json_schema.JSONSchema7 | undefined;
|
|
1831
1832
|
outputSchema?: json_schema.JSONSchema7 | undefined;
|
|
@@ -1965,7 +1966,7 @@ declare function parseDeploymentDefinition(data: unknown): z.ZodSafeParseResult<
|
|
|
1965
1966
|
denyDomains?: string[] | undefined;
|
|
1966
1967
|
} | undefined;
|
|
1967
1968
|
shell?: {
|
|
1968
|
-
preset?: "canvas" | "
|
|
1969
|
+
preset?: "canvas" | "chat" | "sidebar" | "topnav" | undefined;
|
|
1969
1970
|
regions?: {
|
|
1970
1971
|
name: "topbar" | "leftbar" | "rightbar";
|
|
1971
1972
|
props: Record<string, string | boolean | string[]>;
|
|
@@ -2047,7 +2048,7 @@ declare function parseDeploymentDefinition(data: unknown): z.ZodSafeParseResult<
|
|
|
2047
2048
|
checkCode: string;
|
|
2048
2049
|
before?: string[] | undefined;
|
|
2049
2050
|
query?: string | undefined;
|
|
2050
|
-
onViolation?: "
|
|
2051
|
+
onViolation?: "review" | "block" | undefined;
|
|
2051
2052
|
}[] | undefined;
|
|
2052
2053
|
optimize?: ({
|
|
2053
2054
|
direction: "minimize" | "maximize";
|
|
@@ -2089,6 +2090,7 @@ declare const deploymentSourceResourceKindSchema: z.ZodEnum<{
|
|
|
2089
2090
|
auth: "auth";
|
|
2090
2091
|
app: "app";
|
|
2091
2092
|
decision: "decision";
|
|
2093
|
+
form: "form";
|
|
2092
2094
|
workflow: "workflow";
|
|
2093
2095
|
postgres: "postgres";
|
|
2094
2096
|
database: "database";
|
|
@@ -2098,7 +2100,6 @@ declare const deploymentSourceResourceKindSchema: z.ZodEnum<{
|
|
|
2098
2100
|
network: "network";
|
|
2099
2101
|
connection: "connection";
|
|
2100
2102
|
action: "action";
|
|
2101
|
-
form: "form";
|
|
2102
2103
|
schema: "schema";
|
|
2103
2104
|
webhook: "webhook";
|
|
2104
2105
|
schedule: "schedule";
|
|
@@ -2125,6 +2126,7 @@ declare const deploymentSourceManifestSchema: z.ZodObject<{
|
|
|
2125
2126
|
auth: "auth";
|
|
2126
2127
|
app: "app";
|
|
2127
2128
|
decision: "decision";
|
|
2129
|
+
form: "form";
|
|
2128
2130
|
workflow: "workflow";
|
|
2129
2131
|
postgres: "postgres";
|
|
2130
2132
|
database: "database";
|
|
@@ -2134,7 +2136,6 @@ declare const deploymentSourceManifestSchema: z.ZodObject<{
|
|
|
2134
2136
|
network: "network";
|
|
2135
2137
|
connection: "connection";
|
|
2136
2138
|
action: "action";
|
|
2137
|
-
form: "form";
|
|
2138
2139
|
schema: "schema";
|
|
2139
2140
|
webhook: "webhook";
|
|
2140
2141
|
schedule: "schedule";
|
|
@@ -3352,6 +3353,9 @@ interface QueryDecl {
|
|
|
3352
3353
|
* File values: schema-marked fields whose runtime representation is a JSON-safe
|
|
3353
3354
|
* file handle (`kind: swirls.file`), never raw bytes. See
|
|
3354
3355
|
* `wiki/features/workflows/file-values/SPEC.md`.
|
|
3356
|
+
*
|
|
3357
|
+
* A node that makes a file returns a file blob (`kind: swirls.blob`) holding
|
|
3358
|
+
* the bytes; the runtime stores them and gives the handle in its place.
|
|
3355
3359
|
*/
|
|
3356
3360
|
|
|
3357
3361
|
/** `forever` or a day count from DSL `retention: 30d`. */
|
|
@@ -3585,6 +3589,8 @@ interface JsonBlockInfo {
|
|
|
3585
3589
|
}
|
|
3586
3590
|
/** Review config literal (enabled, title, description, actions, etc.). */
|
|
3587
3591
|
type ReviewConfigLiteral = Record<string, unknown>;
|
|
3592
|
+
/** How a review field written as code was fenced: `@ts { … }` or `@sql { … }`. */
|
|
3593
|
+
type ReviewConfigKind = 'ts' | 'sql';
|
|
3588
3594
|
type ConfigValue = {
|
|
3589
3595
|
kind: 'null';
|
|
3590
3596
|
value: null;
|
|
@@ -3758,6 +3764,13 @@ interface NodeDecl {
|
|
|
3758
3764
|
outputSchemaRef?: string;
|
|
3759
3765
|
outputSchemaRefRange?: SourceRange;
|
|
3760
3766
|
reviewConfig?: ReviewConfigLiteral;
|
|
3767
|
+
/**
|
|
3768
|
+
* Which `reviewConfig` fields were written as `@ts { … }` or `@sql { … }`,
|
|
3769
|
+
* by field name (`title`, `description`, `content`, `approvedOutput`,
|
|
3770
|
+
* `rejectedOutput`). A field with no entry is the value as written. Absent
|
|
3771
|
+
* when no review field is code.
|
|
3772
|
+
*/
|
|
3773
|
+
reviewConfigKinds?: Record<string, ReviewConfigKind>;
|
|
3761
3774
|
/**
|
|
3762
3775
|
* Declared secret block → var subsets exposed as `context.secrets.<block>.<var>`
|
|
3763
3776
|
* (DSL: `secrets: { blockName: [VAR1, VAR2] }`).
|
|
@@ -4597,30 +4610,6 @@ interface LowerMountsResult {
|
|
|
4597
4610
|
*/
|
|
4598
4611
|
declare function lowerSwirlsMounts(mounts: readonly SwirlsMount[], options?: LowerMountsOptions): LowerMountsResult;
|
|
4599
4612
|
|
|
4600
|
-
declare const nodeTypeMap: {
|
|
4601
|
-
readonly ai: "ai";
|
|
4602
|
-
readonly decision: "decision";
|
|
4603
|
-
readonly code: "code";
|
|
4604
|
-
readonly email: "email";
|
|
4605
|
-
readonly workflow: "workflow";
|
|
4606
|
-
readonly http: "http";
|
|
4607
|
-
readonly integration: "integration";
|
|
4608
|
-
readonly postgres: "postgres";
|
|
4609
|
-
readonly database: "database";
|
|
4610
|
-
readonly scrape: "scrape";
|
|
4611
|
-
readonly search: "search";
|
|
4612
|
-
readonly parallel: "parallel";
|
|
4613
|
-
readonly disk: "disk";
|
|
4614
|
-
readonly shell: "shell";
|
|
4615
|
-
readonly device: "device";
|
|
4616
|
-
readonly stream: "stream";
|
|
4617
|
-
readonly switch: "switch";
|
|
4618
|
-
readonly wait: "wait";
|
|
4619
|
-
readonly map: "map";
|
|
4620
|
-
readonly fanout: "fanout";
|
|
4621
|
-
readonly while: "while";
|
|
4622
|
-
readonly agent: "agent";
|
|
4623
|
-
};
|
|
4624
4613
|
/** How an executable config string was authored in the DSL (plain literal vs @ts/@sql). */
|
|
4625
4614
|
declare const configValueKindSchema: z.ZodEnum<{
|
|
4626
4615
|
literal: "literal";
|
|
@@ -4628,6 +4617,23 @@ declare const configValueKindSchema: z.ZodEnum<{
|
|
|
4628
4617
|
sql: "sql";
|
|
4629
4618
|
}>;
|
|
4630
4619
|
type ConfigValueKind = z.infer<typeof configValueKindSchema>;
|
|
4620
|
+
declare const reviewConfigSchema: z.ZodObject<{
|
|
4621
|
+
enabled: z.ZodBoolean;
|
|
4622
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4623
|
+
description: z.ZodOptional<z.ZodString>;
|
|
4624
|
+
content: z.ZodOptional<z.ZodString>;
|
|
4625
|
+
approvedOutput: z.ZodOptional<z.ZodString>;
|
|
4626
|
+
rejectedOutput: z.ZodOptional<z.ZodString>;
|
|
4627
|
+
schema: z.ZodNullable<z.ZodOptional<z.ZodType<JSONSchema7, JSONSchema7, z.core.$ZodTypeInternals<JSONSchema7, JSONSchema7>>>>;
|
|
4628
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4629
|
+
id: z.ZodString;
|
|
4630
|
+
label: z.ZodString;
|
|
4631
|
+
outcome: z.ZodEnum<{
|
|
4632
|
+
approve: "approve";
|
|
4633
|
+
reject: "reject";
|
|
4634
|
+
}>;
|
|
4635
|
+
}, z.core.$strip>>>;
|
|
4636
|
+
}, z.core.$strip>;
|
|
4631
4637
|
declare const workflowNodeConfigSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4632
4638
|
type: z.ZodLiteral<"ai">;
|
|
4633
4639
|
kind: z.ZodEnum<{
|
|
@@ -4635,6 +4641,7 @@ declare const workflowNodeConfigSchema: z.ZodIntersection<z.ZodDiscriminatedUnio
|
|
|
4635
4641
|
text: "text";
|
|
4636
4642
|
image: "image";
|
|
4637
4643
|
video: "video";
|
|
4644
|
+
audio: "audio";
|
|
4638
4645
|
embed: "embed";
|
|
4639
4646
|
}>;
|
|
4640
4647
|
provider: z.ZodOptional<z.ZodEnum<{
|
|
@@ -4752,8 +4759,8 @@ declare const workflowNodeConfigSchema: z.ZodIntersection<z.ZodDiscriminatedUnio
|
|
|
4752
4759
|
path: z.ZodOptional<z.ZodString>;
|
|
4753
4760
|
params: z.ZodOptional<z.ZodString>;
|
|
4754
4761
|
encoding: z.ZodOptional<z.ZodEnum<{
|
|
4755
|
-
json: "json";
|
|
4756
4762
|
form: "form";
|
|
4763
|
+
json: "json";
|
|
4757
4764
|
query: "query";
|
|
4758
4765
|
raw: "raw";
|
|
4759
4766
|
}>>;
|
|
@@ -4902,10 +4909,10 @@ declare const workflowNodeConfigSchema: z.ZodIntersection<z.ZodDiscriminatedUnio
|
|
|
4902
4909
|
type: z.ZodLiteral<"wait">;
|
|
4903
4910
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
4904
4911
|
unit: z.ZodOptional<z.ZodEnum<{
|
|
4912
|
+
days: "days";
|
|
4905
4913
|
seconds: "seconds";
|
|
4906
4914
|
minutes: "minutes";
|
|
4907
4915
|
hours: "hours";
|
|
4908
|
-
days: "days";
|
|
4909
4916
|
}>>;
|
|
4910
4917
|
secondsFromConfig: z.ZodOptional<z.ZodString>;
|
|
4911
4918
|
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
@@ -4921,21 +4928,32 @@ declare const workflowNodeConfigSchema: z.ZodIntersection<z.ZodDiscriminatedUnio
|
|
|
4921
4928
|
fallbackValue: z.ZodOptional<z.ZodUnknown>;
|
|
4922
4929
|
}, z.core.$strip>>;
|
|
4923
4930
|
}, z.core.$strip>>;
|
|
4924
|
-
type NodeType = keyof typeof nodeTypeMap;
|
|
4925
4931
|
type WorkflowNodeConfig = z.infer<typeof workflowNodeConfigSchema>;
|
|
4932
|
+
type ReviewConfig = z.infer<typeof reviewConfigSchema>;
|
|
4926
4933
|
|
|
4927
4934
|
/**
|
|
4928
|
-
*
|
|
4935
|
+
* Build the `configValueKinds` sidecar from a node's parsed `configFields`.
|
|
4929
4936
|
*
|
|
4930
|
-
*
|
|
4931
|
-
*
|
|
4932
|
-
*
|
|
4937
|
+
* After lowering, a field written as `@ts { … }` or `@sql { … }` is a string
|
|
4938
|
+
* like any literal, so the definition records which fields were code. Every
|
|
4939
|
+
* field of the persisted `config` written as `@ts` or `@sql` gets an entry,
|
|
4940
|
+
* whatever the node type and whatever its code returns (a url, a headers
|
|
4941
|
+
* object, a list of params): a runtime evaluates by the kind, never by a list
|
|
4942
|
+
* of fields it expects to be code. A field with no entry is the value as
|
|
4943
|
+
* written.
|
|
4944
|
+
*
|
|
4945
|
+
* The same holds for the node's `review:` block. Its `title`, `description`,
|
|
4946
|
+
* `content`, `approvedOutput` and `rejectedOutput` are recorded as
|
|
4947
|
+
* `review.<field>` when the field is in the lowered `reviewConfig` and was
|
|
4948
|
+
* written as code. A review field with no entry is the value as written.
|
|
4933
4949
|
*/
|
|
4934
|
-
declare const EXECUTABLE_STRING_FIELDS: Partial<Record<NodeType, readonly string[]>>;
|
|
4935
|
-
/** Build the `configValueKinds` sidecar from a node's parsed `configFields`. */
|
|
4936
4950
|
declare function buildConfigValueKindsFromNodeDecl(node: {
|
|
4937
|
-
type: string;
|
|
4938
4951
|
configFields: Record<string, ConfigValue>;
|
|
4952
|
+
config: WorkflowNodeConfig;
|
|
4953
|
+
/** The lowered review config, when the node has one. */
|
|
4954
|
+
reviewConfig?: ReviewConfig | null;
|
|
4955
|
+
/** How the parser saw each review field written (`NodeDecl.reviewConfigKinds`). */
|
|
4956
|
+
reviewConfigKinds?: Record<string, ReviewConfigKind>;
|
|
4939
4957
|
}): Record<string, ConfigValueKind> | undefined;
|
|
4940
4958
|
/** Build a node's `config` in the definition from its parsed declaration. */
|
|
4941
4959
|
declare function buildWorkflowNodeConfigFromNodeDecl(node: {
|
|
@@ -5059,4 +5077,4 @@ declare function buildDeploymentSourceManifest({ definition, ast, files, }: {
|
|
|
5059
5077
|
*/
|
|
5060
5078
|
declare function stripEditorMetadata(value: unknown): unknown;
|
|
5061
5079
|
|
|
5062
|
-
export { AGENTS_SKILLS_DIR, type BuildDefinitionOptions, COMPUTER_BASELINE_KIT, COMPUTER_BASELINE_PACKAGES, COMPUTER_HARNESS_RESOURCE_DEFAULTS, COMPUTER_HARNESS_RUNTIME, COMPUTER_MOUNT_KIT, COMPUTER_MOUNT_PACKAGES, COMPUTER_RESOURCE_DEFAULTS, type CompiledComputer, type CompiledComputerHarness, type ComputerHarnessBake, type ComputerHarnessInput, type ComputerRecipeInput, type DeployBundleDirent, type DeployBundleFs, type DeploymentDefinition, type DeploymentSkillFilePayload, type DeploymentSkillFilesBundle, type DeploymentSourceFileContent, type DeploymentSourceManifest, type DeploymentSourceManifestV2, type DeploymentSourceResourceKind, type DeploymentSourceResourceKindV2, type Diagnostic,
|
|
5080
|
+
export { AGENTS_SKILLS_DIR, type BuildDefinitionOptions, COMPUTER_BASELINE_KIT, COMPUTER_BASELINE_PACKAGES, COMPUTER_HARNESS_RESOURCE_DEFAULTS, COMPUTER_HARNESS_RUNTIME, COMPUTER_MOUNT_KIT, COMPUTER_MOUNT_PACKAGES, COMPUTER_RESOURCE_DEFAULTS, type CompiledComputer, type CompiledComputerHarness, type ComputerHarnessBake, type ComputerHarnessInput, type ComputerRecipeInput, type DeployBundleDirent, type DeployBundleFs, type DeploymentDefinition, type DeploymentSkillFilePayload, type DeploymentSkillFilesBundle, type DeploymentSourceFileContent, type DeploymentSourceManifest, type DeploymentSourceManifestV2, type DeploymentSourceResourceKind, type DeploymentSourceResourceKindV2, type Diagnostic, HARNESS_DEBIAN_STAGE_DIR, HARNESS_PROVIDERS, HARNESS_ROOT_DIR, type HarnessCatalog, type HarnessDebianPackage, type HarnessProvider, type HarnessRuntimePackage, type LanguageHost, type LowerDiagnostic, type LowerMountsOptions, type LowerMountsResult, type LowerOptions, type LowerResult, type LowerStage, MAX_SKILL_FILES, MAX_SKILL_FILE_BYTES, MAX_SKILL_TREE_BYTES, MOUNT_SKILLS_ROOT, type MergeProjectOptions, type MountDiagnostic, type MountFingerprint, type MountSite, type MountSkillFiles, type MountSourceFile, type OpenUiSupport, type ProviderCatalog, SKILL_MD_FILENAME, type SkillBlockRef, type SkillBundle, type SkillClassificationResult, type SkillDeployFs, type SkillDeployStat, type SkillFileEntry, type SkillMdFrontmatter, type SourceRange, type SwirlsFile, type SwirlsMount, type SwirlsMountFiles, type SwirlsSources, buildConfigValueKindsFromNodeDecl, buildDeploymentDefinitionPayload, buildDeploymentSourceManifest, buildWorkflowNodeConfigFromNodeDecl, canonicalizeForStableJson, classifySkillBundle, collectDeploymentSkillFiles, collectDeploymentSourceFiles, collectReferencedSkillBlocksFromAst, collectSwirlsFiles, combineDeploymentAndSourceFingerprints, compileComputerRecipe, compileGoalBlock, compileOperationBlock, computeDefinitionHash, computeDeploymentDefinitionFingerprint, computeDeploymentSourceFingerprint, computeGoalContractHash, computeSkillChecksum, computerHarnessBake, computerSnapshotName, createMemoryRepoFs, createNodeDeployBundleFs, daytonaSnapshotResources, deployBundleToSkillDeployFs, deployBundleToWorkspaceFileSystem, deploymentSourceManifestV2Schema, flattenArchivePathMap, flattenInlineSubgraphsInGraph, floxManifestToml, harnessPrepScript, harnessRuntimePackages, isHarnessProvider, isKnownScriptExtension, isScriptsOrBinDirectory, lowerSwirlsMounts, lowerSwirlsSources, mergeProjectSwirlsFiles, normalizeDeploymentSourcePath, operationScriptSha256, parseDeploymentDefinition, parseDeploymentSourceManifestV2, parseSkillMdFrontmatter, platformComputerSnapshotName, recipePackages, resolveSkillTree, sha256Hex, sliceRepoFilesToRoot, stripEditorMetadata, swirlsHost, uuidv7, validateDeploymentSourceInput, virtualRepoCwd };
|