@atom-workflow-agent/contracts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +31 -0
- package/README.zh-CN.md +31 -0
- package/dist/atoms/agent.d.ts +29 -0
- package/dist/atoms/agent.d.ts.map +1 -0
- package/dist/atoms/agent.js +22 -0
- package/dist/atoms/agent.js.map +1 -0
- package/dist/atoms/descriptors.d.ts +88 -0
- package/dist/atoms/descriptors.d.ts.map +1 -0
- package/dist/atoms/descriptors.js +56 -0
- package/dist/atoms/descriptors.js.map +1 -0
- package/dist/atoms/host.d.ts +200 -0
- package/dist/atoms/host.d.ts.map +1 -0
- package/dist/atoms/host.js +109 -0
- package/dist/atoms/host.js.map +1 -0
- package/dist/atoms/lifecycle.d.ts +257 -0
- package/dist/atoms/lifecycle.d.ts.map +1 -0
- package/dist/atoms/lifecycle.js +201 -0
- package/dist/atoms/lifecycle.js.map +1 -0
- package/dist/atoms/manifest.d.ts +68 -0
- package/dist/atoms/manifest.d.ts.map +1 -0
- package/dist/atoms/manifest.js +144 -0
- package/dist/atoms/manifest.js.map +1 -0
- package/dist/atoms/package.d.ts +11 -0
- package/dist/atoms/package.d.ts.map +1 -0
- package/dist/atoms/package.js +11 -0
- package/dist/atoms/package.js.map +1 -0
- package/dist/errors/atom-workflow-error.d.ts +7 -0
- package/dist/errors/atom-workflow-error.d.ts.map +1 -0
- package/dist/errors/atom-workflow-error.js +21 -0
- package/dist/errors/atom-workflow-error.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/json-schema/validate-instance.d.ts +7 -0
- package/dist/json-schema/validate-instance.d.ts.map +1 -0
- package/dist/json-schema/validate-instance.js +186 -0
- package/dist/json-schema/validate-instance.js.map +1 -0
- package/dist/planner/plan-record.d.ts +194 -0
- package/dist/planner/plan-record.d.ts.map +1 -0
- package/dist/planner/plan-record.js +57 -0
- package/dist/planner/plan-record.js.map +1 -0
- package/dist/planner/planner-draft.d.ts +194 -0
- package/dist/planner/planner-draft.d.ts.map +1 -0
- package/dist/planner/planner-draft.js +102 -0
- package/dist/planner/planner-draft.js.map +1 -0
- package/dist/planner/planner-validation.d.ts +830 -0
- package/dist/planner/planner-validation.d.ts.map +1 -0
- package/dist/planner/planner-validation.js +52 -0
- package/dist/planner/planner-validation.js.map +1 -0
- package/dist/planner/planner.d.ts +456 -0
- package/dist/planner/planner.d.ts.map +1 -0
- package/dist/planner/planner.js +85 -0
- package/dist/planner/planner.js.map +1 -0
- package/dist/planner/planning-capability.d.ts +576 -0
- package/dist/planner/planning-capability.d.ts.map +1 -0
- package/dist/planner/planning-capability.js +105 -0
- package/dist/planner/planning-capability.js.map +1 -0
- package/dist/planner/planning-workspace.d.ts +1791 -0
- package/dist/planner/planning-workspace.d.ts.map +1 -0
- package/dist/planner/planning-workspace.js +279 -0
- package/dist/planner/planning-workspace.js.map +1 -0
- package/dist/runtime/diagnostics.d.ts +35 -0
- package/dist/runtime/diagnostics.d.ts.map +1 -0
- package/dist/runtime/diagnostics.js +22 -0
- package/dist/runtime/diagnostics.js.map +1 -0
- package/dist/runtime/machine.d.ts +52 -0
- package/dist/runtime/machine.d.ts.map +1 -0
- package/dist/runtime/machine.js +41 -0
- package/dist/runtime/machine.js.map +1 -0
- package/dist/runtime/records.d.ts +306 -0
- package/dist/runtime/records.d.ts.map +1 -0
- package/dist/runtime/records.js +213 -0
- package/dist/runtime/records.js.map +1 -0
- package/dist/runtime/resume.d.ts +32 -0
- package/dist/runtime/resume.d.ts.map +1 -0
- package/dist/runtime/resume.js +19 -0
- package/dist/runtime/resume.js.map +1 -0
- package/dist/workflows/ir.d.ts +117 -0
- package/dist/workflows/ir.d.ts.map +1 -0
- package/dist/workflows/ir.js +2 -0
- package/dist/workflows/ir.js.map +1 -0
- package/dist/workflows/policy.d.ts +22 -0
- package/dist/workflows/policy.d.ts.map +1 -0
- package/dist/workflows/policy.js +22 -0
- package/dist/workflows/policy.js.map +1 -0
- package/dist/workflows/revision.d.ts +187 -0
- package/dist/workflows/revision.d.ts.map +1 -0
- package/dist/workflows/revision.js +61 -0
- package/dist/workflows/revision.js.map +1 -0
- package/dist/workflows/spec.d.ts +427 -0
- package/dist/workflows/spec.d.ts.map +1 -0
- package/dist/workflows/spec.js +86 -0
- package/dist/workflows/spec.js.map +1 -0
- package/dist/workflows/topology.d.ts +58 -0
- package/dist/workflows/topology.d.ts.map +1 -0
- package/dist/workflows/topology.js +37 -0
- package/dist/workflows/topology.js.map +1 -0
- package/dist/workflows/validation.d.ts +247 -0
- package/dist/workflows/validation.d.ts.map +1 -0
- package/dist/workflows/validation.js +130 -0
- package/dist/workflows/validation.js.map +1 -0
- package/dist/workflows/visualization.d.ts +526 -0
- package/dist/workflows/visualization.d.ts.map +1 -0
- package/dist/workflows/visualization.js +132 -0
- package/dist/workflows/visualization.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type JsonValue } from "../atoms/manifest.js";
|
|
3
|
+
export declare const WorkflowNodeIdSchema: z.ZodString;
|
|
4
|
+
export declare const WorkflowBranchIdSchema: z.ZodString;
|
|
5
|
+
export declare const WorkflowAtomReferenceSchema: z.ZodString;
|
|
6
|
+
export declare const WorkflowReferenceSchema: z.ZodObject<{
|
|
7
|
+
$ref: z.ZodString;
|
|
8
|
+
}, z.core.$strict>;
|
|
9
|
+
export type WorkflowReference = z.infer<typeof WorkflowReferenceSchema>;
|
|
10
|
+
export type ReferenceLikeStringKind = "planner-draft" | "workflow";
|
|
11
|
+
/** Detect binding-shaped strings that must not silently become literals. */
|
|
12
|
+
export declare function classifyReferenceLikeString(value: string): ReferenceLikeStringKind | undefined;
|
|
13
|
+
export declare const WorkflowMapSchema: z.ZodObject<{
|
|
14
|
+
items: z.ZodObject<{
|
|
15
|
+
$ref: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
maxItems: z.ZodNumber;
|
|
18
|
+
maxConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
group: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export type WorkflowMap = z.infer<typeof WorkflowMapSchema>;
|
|
22
|
+
export declare const WorkflowTerminalSchema: z.ZodEnum<{
|
|
23
|
+
$end: "$end";
|
|
24
|
+
$failed: "$failed";
|
|
25
|
+
$cancelled: "$cancelled";
|
|
26
|
+
}>;
|
|
27
|
+
export type WorkflowTerminal = z.infer<typeof WorkflowTerminalSchema>;
|
|
28
|
+
/** A statically declared control edge. Runtime never accepts a target from Atom output. */
|
|
29
|
+
export declare const WorkflowTransitionSchema: z.ZodObject<{
|
|
30
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
31
|
+
$end: "$end";
|
|
32
|
+
$failed: "$failed";
|
|
33
|
+
$cancelled: "$cancelled";
|
|
34
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
35
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type WorkflowTransition = z.infer<typeof WorkflowTransitionSchema>;
|
|
39
|
+
export declare const WorkflowRetryOverrideSchema: z.ZodObject<{
|
|
40
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
fixed: "fixed";
|
|
43
|
+
exponential: "exponential";
|
|
44
|
+
}>>;
|
|
45
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const WorkflowCacheOverrideSchema: z.ZodObject<{
|
|
50
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
export declare const WorkflowNodePolicySchema: z.ZodObject<{
|
|
54
|
+
attemptTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
lifecycleTickTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
maxLifecycleTicks: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
fixed: "fixed";
|
|
61
|
+
exponential: "exponential";
|
|
62
|
+
}>>;
|
|
63
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
}, z.core.$strict>>;
|
|
67
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
}, z.core.$strict>>;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
export type WorkflowNodePolicy = z.infer<typeof WorkflowNodePolicySchema>;
|
|
73
|
+
export declare const WorkflowAtomNodeSpecSchema: z.ZodObject<{
|
|
74
|
+
next: z.ZodObject<{
|
|
75
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
76
|
+
$end: "$end";
|
|
77
|
+
$failed: "$failed";
|
|
78
|
+
$cancelled: "$cancelled";
|
|
79
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
80
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
atom: z.ZodString;
|
|
85
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
86
|
+
input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
87
|
+
map: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
items: z.ZodObject<{
|
|
89
|
+
$ref: z.ZodString;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
maxItems: z.ZodNumber;
|
|
92
|
+
maxConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
93
|
+
group: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strict>>;
|
|
95
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
attemptTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
97
|
+
lifecycleTickTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
maxLifecycleTicks: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
fixed: "fixed";
|
|
103
|
+
exponential: "exponential";
|
|
104
|
+
}>>;
|
|
105
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
}, z.core.$strict>>;
|
|
113
|
+
}, z.core.$strict>>;
|
|
114
|
+
kind: z.ZodLiteral<"atom">;
|
|
115
|
+
}, z.core.$strict>;
|
|
116
|
+
export type WorkflowAtomNodeSpec = z.infer<typeof WorkflowAtomNodeSpecSchema>;
|
|
117
|
+
export declare const WorkflowDecisionNodeSpecSchema: z.ZodObject<{
|
|
118
|
+
select: z.ZodObject<{
|
|
119
|
+
$ref: z.ZodString;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
branches: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
122
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
123
|
+
$end: "$end";
|
|
124
|
+
$failed: "$failed";
|
|
125
|
+
$cancelled: "$cancelled";
|
|
126
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
127
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
129
|
+
}, z.core.$strict>>;
|
|
130
|
+
default: z.ZodObject<{
|
|
131
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
132
|
+
$end: "$end";
|
|
133
|
+
$failed: "$failed";
|
|
134
|
+
$cancelled: "$cancelled";
|
|
135
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
136
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
id: z.ZodString;
|
|
140
|
+
atom: z.ZodString;
|
|
141
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
142
|
+
input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
143
|
+
map: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
items: z.ZodObject<{
|
|
145
|
+
$ref: z.ZodString;
|
|
146
|
+
}, z.core.$strict>;
|
|
147
|
+
maxItems: z.ZodNumber;
|
|
148
|
+
maxConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
149
|
+
group: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
attemptTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
lifecycleTickTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
maxLifecycleTicks: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
158
|
+
fixed: "fixed";
|
|
159
|
+
exponential: "exponential";
|
|
160
|
+
}>>;
|
|
161
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
}, z.core.$strict>>;
|
|
165
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strict>>;
|
|
169
|
+
}, z.core.$strict>>;
|
|
170
|
+
kind: z.ZodLiteral<"decision">;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
export type WorkflowDecisionNodeSpec = z.infer<typeof WorkflowDecisionNodeSpecSchema>;
|
|
173
|
+
/**
|
|
174
|
+
* Pure typed phi node. Exactly one mutually-exclusive incoming control path
|
|
175
|
+
* activates it; that edge supplies the complete output object through `with`.
|
|
176
|
+
*/
|
|
177
|
+
export declare const WorkflowMergeNodeSpecSchema: z.ZodObject<{
|
|
178
|
+
kind: z.ZodLiteral<"merge">;
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
181
|
+
outputSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
182
|
+
next: z.ZodObject<{
|
|
183
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
184
|
+
$end: "$end";
|
|
185
|
+
$failed: "$failed";
|
|
186
|
+
$cancelled: "$cancelled";
|
|
187
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
188
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
}, z.core.$strict>;
|
|
192
|
+
export type WorkflowMergeNodeSpec = z.infer<typeof WorkflowMergeNodeSpecSchema>;
|
|
193
|
+
export declare const WorkflowNodeSpecSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
194
|
+
next: z.ZodObject<{
|
|
195
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
196
|
+
$end: "$end";
|
|
197
|
+
$failed: "$failed";
|
|
198
|
+
$cancelled: "$cancelled";
|
|
199
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
200
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
id: z.ZodString;
|
|
204
|
+
atom: z.ZodString;
|
|
205
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
206
|
+
input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
207
|
+
map: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
items: z.ZodObject<{
|
|
209
|
+
$ref: z.ZodString;
|
|
210
|
+
}, z.core.$strict>;
|
|
211
|
+
maxItems: z.ZodNumber;
|
|
212
|
+
maxConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
213
|
+
group: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strict>>;
|
|
215
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
attemptTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
lifecycleTickTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
maxLifecycleTicks: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
222
|
+
fixed: "fixed";
|
|
223
|
+
exponential: "exponential";
|
|
224
|
+
}>>;
|
|
225
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
}, z.core.$strict>>;
|
|
229
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
231
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
}, z.core.$strict>>;
|
|
233
|
+
}, z.core.$strict>>;
|
|
234
|
+
kind: z.ZodLiteral<"atom">;
|
|
235
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
236
|
+
select: z.ZodObject<{
|
|
237
|
+
$ref: z.ZodString;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
branches: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
240
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
241
|
+
$end: "$end";
|
|
242
|
+
$failed: "$failed";
|
|
243
|
+
$cancelled: "$cancelled";
|
|
244
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
245
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
246
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
247
|
+
}, z.core.$strict>>;
|
|
248
|
+
default: z.ZodObject<{
|
|
249
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
250
|
+
$end: "$end";
|
|
251
|
+
$failed: "$failed";
|
|
252
|
+
$cancelled: "$cancelled";
|
|
253
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
254
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
256
|
+
}, z.core.$strict>;
|
|
257
|
+
id: z.ZodString;
|
|
258
|
+
atom: z.ZodString;
|
|
259
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
260
|
+
input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
261
|
+
map: z.ZodOptional<z.ZodObject<{
|
|
262
|
+
items: z.ZodObject<{
|
|
263
|
+
$ref: z.ZodString;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
maxItems: z.ZodNumber;
|
|
266
|
+
maxConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
267
|
+
group: z.ZodOptional<z.ZodString>;
|
|
268
|
+
}, z.core.$strict>>;
|
|
269
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
270
|
+
attemptTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
lifecycleTickTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
maxLifecycleTicks: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
276
|
+
fixed: "fixed";
|
|
277
|
+
exponential: "exponential";
|
|
278
|
+
}>>;
|
|
279
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
282
|
+
}, z.core.$strict>>;
|
|
283
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
285
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
286
|
+
}, z.core.$strict>>;
|
|
287
|
+
}, z.core.$strict>>;
|
|
288
|
+
kind: z.ZodLiteral<"decision">;
|
|
289
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
290
|
+
kind: z.ZodLiteral<"merge">;
|
|
291
|
+
id: z.ZodString;
|
|
292
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
293
|
+
outputSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
294
|
+
next: z.ZodObject<{
|
|
295
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
296
|
+
$end: "$end";
|
|
297
|
+
$failed: "$failed";
|
|
298
|
+
$cancelled: "$cancelled";
|
|
299
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
300
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
301
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
302
|
+
}, z.core.$strict>;
|
|
303
|
+
}, z.core.$strict>], "kind">;
|
|
304
|
+
export type WorkflowNodeSpec = z.infer<typeof WorkflowNodeSpecSchema>;
|
|
305
|
+
export declare const WorkflowSpecSchema: z.ZodObject<{
|
|
306
|
+
schemaVersion: z.ZodLiteral<"1.2">;
|
|
307
|
+
name: z.ZodString;
|
|
308
|
+
inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
309
|
+
entry: z.ZodArray<z.ZodString>;
|
|
310
|
+
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
311
|
+
next: z.ZodObject<{
|
|
312
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
313
|
+
$end: "$end";
|
|
314
|
+
$failed: "$failed";
|
|
315
|
+
$cancelled: "$cancelled";
|
|
316
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
317
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
318
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
319
|
+
}, z.core.$strict>;
|
|
320
|
+
id: z.ZodString;
|
|
321
|
+
atom: z.ZodString;
|
|
322
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
323
|
+
input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
324
|
+
map: z.ZodOptional<z.ZodObject<{
|
|
325
|
+
items: z.ZodObject<{
|
|
326
|
+
$ref: z.ZodString;
|
|
327
|
+
}, z.core.$strict>;
|
|
328
|
+
maxItems: z.ZodNumber;
|
|
329
|
+
maxConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
330
|
+
group: z.ZodOptional<z.ZodString>;
|
|
331
|
+
}, z.core.$strict>>;
|
|
332
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
attemptTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
lifecycleTickTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
maxLifecycleTicks: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
338
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
339
|
+
fixed: "fixed";
|
|
340
|
+
exponential: "exponential";
|
|
341
|
+
}>>;
|
|
342
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
345
|
+
}, z.core.$strict>>;
|
|
346
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
347
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
348
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
}, z.core.$strict>>;
|
|
350
|
+
}, z.core.$strict>>;
|
|
351
|
+
kind: z.ZodLiteral<"atom">;
|
|
352
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
353
|
+
select: z.ZodObject<{
|
|
354
|
+
$ref: z.ZodString;
|
|
355
|
+
}, z.core.$strict>;
|
|
356
|
+
branches: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
357
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
358
|
+
$end: "$end";
|
|
359
|
+
$failed: "$failed";
|
|
360
|
+
$cancelled: "$cancelled";
|
|
361
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
362
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
363
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
364
|
+
}, z.core.$strict>>;
|
|
365
|
+
default: z.ZodObject<{
|
|
366
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
367
|
+
$end: "$end";
|
|
368
|
+
$failed: "$failed";
|
|
369
|
+
$cancelled: "$cancelled";
|
|
370
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
371
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
372
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
373
|
+
}, z.core.$strict>;
|
|
374
|
+
id: z.ZodString;
|
|
375
|
+
atom: z.ZodString;
|
|
376
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
377
|
+
input: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
378
|
+
map: z.ZodOptional<z.ZodObject<{
|
|
379
|
+
items: z.ZodObject<{
|
|
380
|
+
$ref: z.ZodString;
|
|
381
|
+
}, z.core.$strict>;
|
|
382
|
+
maxItems: z.ZodNumber;
|
|
383
|
+
maxConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
384
|
+
group: z.ZodOptional<z.ZodString>;
|
|
385
|
+
}, z.core.$strict>>;
|
|
386
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
387
|
+
attemptTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
lifecycleTickTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
389
|
+
maxLifecycleTicks: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
391
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
393
|
+
fixed: "fixed";
|
|
394
|
+
exponential: "exponential";
|
|
395
|
+
}>>;
|
|
396
|
+
baseDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
397
|
+
maxDelayMs: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
jitter: z.ZodOptional<z.ZodBoolean>;
|
|
399
|
+
}, z.core.$strict>>;
|
|
400
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
401
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
402
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
}, z.core.$strict>>;
|
|
404
|
+
}, z.core.$strict>>;
|
|
405
|
+
kind: z.ZodLiteral<"decision">;
|
|
406
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
407
|
+
kind: z.ZodLiteral<"merge">;
|
|
408
|
+
id: z.ZodString;
|
|
409
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
410
|
+
outputSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
411
|
+
next: z.ZodObject<{
|
|
412
|
+
to: z.ZodUnion<readonly [z.ZodEnum<{
|
|
413
|
+
$end: "$end";
|
|
414
|
+
$failed: "$failed";
|
|
415
|
+
$cancelled: "$cancelled";
|
|
416
|
+
}>, z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
417
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
418
|
+
with: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
419
|
+
}, z.core.$strict>;
|
|
420
|
+
}, z.core.$strict>], "kind">>;
|
|
421
|
+
outputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
422
|
+
$ref: z.ZodString;
|
|
423
|
+
}, z.core.$strict>>>;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
export type WorkflowSpec = z.infer<typeof WorkflowSpecSchema>;
|
|
426
|
+
export type WorkflowInputValue = JsonValue;
|
|
427
|
+
//# sourceMappingUR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|
+
export const WorkflowNodeIdSchema = z.string().regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, "Workflow node id must be lowercase kebab-case");
|
|
4
|
+
export const WorkflowBranchIdSchema = z.string().regex(/^[a-z][a-z0-9]*(?:[-_][a-z0-9]+)*$/, "Decision branch id must be a lowercase identifier separated by hyphens or underscores");
|
|
5
|
+
export const WorkflowAtomReferenceSchema = z.string().regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*)+@(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/, "Atom reference must contain an exact semantic version, for example page.measure@1.0.0");
|
|
6
|
+
const REFERENCE_PATTERN = /^(workflow\.inputs(?:\.[A-Za-z0-9_-]+)*|dependencies\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*\.output(?:\.[A-Za-z0-9_-]+)*|map\.(?:item(?:\.[A-Za-z0-9_-]+)*|index)|node\.output(?:\.[A-Za-z0-9_-]+)*|nodes\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*\.activations\.lastSuccessful\.output(?:\.[A-Za-z0-9_-]+)*)$/;
|
|
7
|
+
export const WorkflowReferenceSchema = z.object({ $ref: z.string().regex(REFERENCE_PATTERN, "Invalid Workflow reference") }).strict();
|
|
8
|
+
/** Detect binding-shaped strings that must not silently become literals. */
|
|
9
|
+
export function classifyReferenceLikeString(value) {
|
|
10
|
+
const candidate = value.trim();
|
|
11
|
+
if (/^\$(?:input|output|item)(?:\.|\[|$)/.test(candidate)
|
|
12
|
+
|| /^\$index(?:\.|\[|$)/.test(candidate))
|
|
13
|
+
return "planner-draft";
|
|
14
|
+
if (/^\$ref(?:\.|:|\s|\[|$)/.test(candidate)
|
|
15
|
+
|| /^(?:workflow\.inputs|map\.(?:item|index)|node\.output)(?:\.|$)/.test(candidate)
|
|
16
|
+
|| /^dependencies\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*\.output(?:\.|$)/.test(candidate)
|
|
17
|
+
|| /^nodes\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*\.activations\.lastSuccessful\.output(?:\.|$)/.test(candidate)) {
|
|
18
|
+
return "workflow";
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
export const WorkflowMapSchema = z.object({
|
|
23
|
+
items: WorkflowReferenceSchema,
|
|
24
|
+
/** Collection cardinality safety bound. It does not control concurrency or truncate input. */
|
|
25
|
+
maxItems: z.number().int().min(1).max(10_000),
|
|
26
|
+
/** Maximum number of collection items with active processor subgraphs. */
|
|
27
|
+
maxConcurrency: z.number().int().min(1).max(1_000).default(8),
|
|
28
|
+
/** Nodes with the same group execute as one item-wise subgraph. */
|
|
29
|
+
group: WorkflowNodeIdSchema.optional(),
|
|
30
|
+
}).strict();
|
|
31
|
+
export const WorkflowTerminalSchema = z.enum(["$end", "$failed", "$cancelled"]);
|
|
32
|
+
/** A statically declared control edge. Runtime never accepts a target from Atom output. */
|
|
33
|
+
export const WorkflowTransitionSchema = z.object({
|
|
34
|
+
to: z.union([WorkflowTerminalSchema, WorkflowNodeIdSchema, z.array(WorkflowNodeIdSchema).min(1).max(64)]),
|
|
35
|
+
maxTraversals: z.number().int().min(1).max(10_000).optional(),
|
|
36
|
+
with: z.record(z.string(), JsonValueSchema).default({}),
|
|
37
|
+
}).strict();
|
|
38
|
+
export const WorkflowRetryOverrideSchema = z.object({
|
|
39
|
+
maxAttempts: z.number().int().min(1).max(11).optional(), strategy: z.enum(["fixed", "exponential"]).optional(),
|
|
40
|
+
baseDelayMs: z.number().int().nonnegative().optional(), maxDelayMs: z.number().int().nonnegative().optional(), jitter: z.boolean().optional(),
|
|
41
|
+
}).strict().refine((value) => Object.keys(value).length > 0, "Retry override must not be empty");
|
|
42
|
+
export const WorkflowCacheOverrideSchema = z.object({ enabled: z.boolean().optional(), ttlMs: z.number().int().positive().optional() })
|
|
43
|
+
.strict().refine((value) => Object.keys(value).length > 0, "Cache override must not be empty");
|
|
44
|
+
export const WorkflowNodePolicySchema = z.object({
|
|
45
|
+
attemptTimeoutMs: z.number().int().positive().max(86_400_000).optional(),
|
|
46
|
+
lifecycleTickTimeoutMs: z.number().int().positive().max(86_400_000).optional(),
|
|
47
|
+
maxLifecycleTicks: z.number().int().min(1).max(100_000).optional(), retry: WorkflowRetryOverrideSchema.optional(), cache: WorkflowCacheOverrideSchema.optional(),
|
|
48
|
+
}).strict();
|
|
49
|
+
const WorkflowNodeBaseShape = {
|
|
50
|
+
id: WorkflowNodeIdSchema, atom: WorkflowAtomReferenceSchema, dependsOn: z.array(WorkflowNodeIdSchema).default([]), input: JsonValueSchema,
|
|
51
|
+
map: WorkflowMapSchema.optional(), policy: WorkflowNodePolicySchema.optional(),
|
|
52
|
+
};
|
|
53
|
+
export const WorkflowAtomNodeSpecSchema = z.object({ kind: z.literal("atom"), ...WorkflowNodeBaseShape, next: WorkflowTransitionSchema }).strict();
|
|
54
|
+
export const WorkflowDecisionNodeSpecSchema = z.object({
|
|
55
|
+
kind: z.literal("decision"), ...WorkflowNodeBaseShape,
|
|
56
|
+
select: WorkflowReferenceSchema,
|
|
57
|
+
branches: z.record(WorkflowBranchIdSchema, WorkflowTransitionSchema)
|
|
58
|
+
.refine((branches) => Object.keys(branches).length > 0, "DecisionNode must declare at least one branch")
|
|
59
|
+
.refine((branches) => Object.keys(branches).length <= 64, "DecisionNode cannot declare more than 64 branches"),
|
|
60
|
+
default: WorkflowTransitionSchema,
|
|
61
|
+
}).strict().superRefine((node, context) => {
|
|
62
|
+
if (node.map)
|
|
63
|
+
context.addIssue({ code: "custom", path: ["map"], message: "DecisionNode cannot be a Map processor; select from one Atom activation" });
|
|
64
|
+
if (!(node.select.$ref === "node.output" || node.select.$ref.startsWith("node.output."))) {
|
|
65
|
+
context.addIssue({ code: "custom", path: ["select"], message: "DecisionNode select must reference its own node.output" });
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Pure typed phi node. Exactly one mutually-exclusive incoming control path
|
|
70
|
+
* activates it; that edge supplies the complete output object through `with`.
|
|
71
|
+
*/
|
|
72
|
+
export const WorkflowMergeNodeSpecSchema = z.object({
|
|
73
|
+
kind: z.literal("merge"),
|
|
74
|
+
id: WorkflowNodeIdSchema,
|
|
75
|
+
dependsOn: z.array(WorkflowNodeIdSchema).default([]),
|
|
76
|
+
outputSchema: JsonSchemaSchema,
|
|
77
|
+
next: WorkflowTransitionSchema,
|
|
78
|
+
}).strict();
|
|
79
|
+
export const WorkflowNodeSpecSchema = z.discriminatedUnion("kind", [WorkflowAtomNodeSpecSchema, WorkflowDecisionNodeSpecSchema, WorkflowMergeNodeSpecSchema]);
|
|
80
|
+
export const WorkflowSpecSchema = z.object({
|
|
81
|
+
schemaVersion: z.literal("1.2"),
|
|
82
|
+
name: z.string().regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, "Workflow name must be lowercase kebab-case"),
|
|
83
|
+
inputs: z.record(z.string(), JsonValueSchema).default({}), entry: z.array(WorkflowNodeIdSchema).min(1).max(128),
|
|
84
|
+
nodes: z.array(WorkflowNodeSpecSchema).min(1), outputs: z.record(z.string(), WorkflowReferenceSchema).default({}),
|
|
85
|
+
}).strict();
|
|
86
|
+
//# sourceMappingURL=spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../../src/workflows/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAkB,MAAM,sBAAsB,CAAC;AAEzF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,iCAAiC,EAAE,+CAA+C,CAAC,CAAC;AACzI,MAAM,CAAC,MAAM,s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,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC/G,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAClH,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const WorkflowTopologyViewSchema: z.ZodObject<{
|
|
3
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
4
|
+
workflowRevisionId: z.ZodString;
|
|
5
|
+
irHash: z.ZodString;
|
|
6
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
kind: z.ZodEnum<{
|
|
9
|
+
map: "map";
|
|
10
|
+
join: "join";
|
|
11
|
+
atom: "atom";
|
|
12
|
+
merge: "merge";
|
|
13
|
+
switch: "switch";
|
|
14
|
+
}>;
|
|
15
|
+
atom: z.ZodOptional<z.ZodString>;
|
|
16
|
+
mapScope: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strict>>;
|
|
18
|
+
controlEdges: z.ZodArray<z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
source: z.ZodString;
|
|
21
|
+
targets: z.ZodArray<z.ZodString>;
|
|
22
|
+
kind: z.ZodString;
|
|
23
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
24
|
+
terminal: z.ZodOptional<z.ZodString>;
|
|
25
|
+
backEdge: z.ZodBoolean;
|
|
26
|
+
maxTraversals: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
dataEdges: z.ZodArray<z.ZodObject<{
|
|
29
|
+
source: z.ZodString;
|
|
30
|
+
target: z.ZodString;
|
|
31
|
+
targetPath: z.ZodString;
|
|
32
|
+
reference: z.ZodString;
|
|
33
|
+
}, z.core.$strict>>;
|
|
34
|
+
groups: z.ZodObject<{
|
|
35
|
+
entries: z.ZodArray<z.ZodString>;
|
|
36
|
+
forks: z.ZodArray<z.ZodObject<{
|
|
37
|
+
edgeId: z.ZodString;
|
|
38
|
+
targets: z.ZodArray<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
joins: z.ZodArray<z.ZodObject<{
|
|
41
|
+
nodeId: z.ZodString;
|
|
42
|
+
dependencies: z.ZodArray<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>>;
|
|
44
|
+
maps: z.ZodArray<z.ZodObject<{
|
|
45
|
+
nodeId: z.ZodString;
|
|
46
|
+
maxItems: z.ZodNumber;
|
|
47
|
+
maxConcurrency: z.ZodNumber;
|
|
48
|
+
bodyNodeIds: z.ZodArray<z.ZodString>;
|
|
49
|
+
}, z.core.$strict>>;
|
|
50
|
+
switches: z.ZodArray<z.ZodObject<{
|
|
51
|
+
nodeId: z.ZodString;
|
|
52
|
+
cases: z.ZodArray<z.ZodString>;
|
|
53
|
+
hasDefault: z.ZodBoolean;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type WorkflowTopologyView = z.infer<typeof WorkflowTopologyViewSchema>;
|
|
58
|
+
//# sourceMappingURL=topology.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topology.d.ts","sourceRoot":"","sources":["../../src/workflows/topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiC5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const NodeIdSchema = z.string().trim().min(1);
|
|
3
|
+
export const WorkflowTopologyViewSchema = z.object({
|
|
4
|
+
schemaVersion: z.literal("1.0"),
|
|
5
|
+
workflowRevisionId: z.string().trim().min(1),
|
|
6
|
+
irHash: z.string().trim().min(1),
|
|
7
|
+
nodes: z.array(z.object({
|
|
8
|
+
id: NodeIdSchema,
|
|
9
|
+
kind: z.enum(["atom", "switch", "map", "join", "merge"]),
|
|
10
|
+
atom: z.string().trim().min(1).optional(),
|
|
11
|
+
mapScope: z.string().trim().min(1).optional(),
|
|
12
|
+
}).strict()),
|
|
13
|
+
controlEdges: z.array(z.object({
|
|
14
|
+
id: z.string().trim().min(1),
|
|
15
|
+
source: NodeIdSchema,
|
|
16
|
+
targets: z.array(NodeIdSchema),
|
|
17
|
+
kind: z.string().trim().min(1),
|
|
18
|
+
branch: z.string().trim().min(1).optional(),
|
|
19
|
+
terminal: z.string().trim().min(1).optional(),
|
|
20
|
+
backEdge: z.boolean(),
|
|
21
|
+
maxTraversals: z.number().int().positive().optional(),
|
|
22
|
+
}).strict()),
|
|
23
|
+
dataEdges: z.array(z.object({
|
|
24
|
+
source: z.string().trim().min(1),
|
|
25
|
+
target: NodeIdSchema,
|
|
26
|
+
targetPath: z.string().trim().min(1),
|
|
27
|
+
reference: z.string().trim().min(1),
|
|
28
|
+
}).strict()),
|
|
29
|
+
groups: z.object({
|
|
30
|
+
entries: z.array(NodeIdSchema),
|
|
31
|
+
forks: z.array(z.object({ edgeId: z.string().trim().min(1), targets: z.array(NodeIdSchema) }).strict()),
|
|
32
|
+
joins: z.array(z.object({ nodeId: NodeIdSchema, dependencies: z.array(NodeIdSchema) }).strict()),
|
|
33
|
+
maps: z.array(z.object({ nodeId: NodeIdSchema, maxItems: z.number().int().positive(), maxConcurrency: z.number().int().positive(), bodyNodeIds: z.array(NodeIdSchema) }).strict()),
|
|
34
|
+
switches: z.array(z.object({ nodeId: NodeIdSchema, cases: z.array(z.string()), hasDefault: z.boolean() }).strict()),
|
|
35
|
+
}).strict(),
|
|
36
|
+
}).strict();
|
|
37
|
+
//# sourceMappingURL=topology.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topology.js","sourceRoot":"","sources":["../../src/workflows/topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAE9C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAC/B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACtB,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACxD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAA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