@intellia/workflow-sdk 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/README.md +66 -0
- package/dist/cjs/builder.js +336 -0
- package/dist/cjs/builder.js.map +1 -0
- package/dist/cjs/conditions.js +55 -0
- package/dist/cjs/conditions.js.map +1 -0
- package/dist/cjs/define-agent-ref.js +6 -0
- package/dist/cjs/define-agent-ref.js.map +1 -0
- package/dist/cjs/define-knowledge-base.js +6 -0
- package/dist/cjs/define-knowledge-base.js.map +1 -0
- package/dist/cjs/define-node.js +8 -0
- package/dist/cjs/define-node.js.map +1 -0
- package/dist/cjs/define-tool-workflow.js +34 -0
- package/dist/cjs/define-tool-workflow.js.map +1 -0
- package/dist/cjs/define-tool.js +6 -0
- package/dist/cjs/define-tool.js.map +1 -0
- package/dist/cjs/define-workflow.js +40 -0
- package/dist/cjs/define-workflow.js.map +1 -0
- package/dist/cjs/graph.js +3 -0
- package/dist/cjs/graph.js.map +1 -0
- package/dist/cjs/index.js +44 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/node-type-support.js +27 -0
- package/dist/cjs/node-type-support.js.map +1 -0
- package/dist/cjs/refs.js +52 -0
- package/dist/cjs/refs.js.map +1 -0
- package/dist/cjs/schema.js +67 -0
- package/dist/cjs/schema.js.map +1 -0
- package/dist/esm/builder.js +331 -0
- package/dist/esm/builder.js.map +1 -0
- package/dist/esm/conditions.js +43 -0
- package/dist/esm/conditions.js.map +1 -0
- package/dist/esm/define-agent-ref.js +2 -0
- package/dist/esm/define-agent-ref.js.map +1 -0
- package/dist/esm/define-knowledge-base.js +2 -0
- package/dist/esm/define-knowledge-base.js.map +1 -0
- package/dist/esm/define-node.js +3 -0
- package/dist/esm/define-node.js.map +1 -0
- package/dist/esm/define-tool-workflow.js +30 -0
- package/dist/esm/define-tool-workflow.js.map +1 -0
- package/dist/esm/define-tool.js +2 -0
- package/dist/esm/define-tool.js.map +1 -0
- package/dist/esm/define-workflow.js +36 -0
- package/dist/esm/define-workflow.js.map +1 -0
- package/dist/esm/graph.js +1 -0
- package/dist/esm/graph.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/node-type-support.js +24 -0
- package/dist/esm/node-type-support.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/refs.js +42 -0
- package/dist/esm/refs.js.map +1 -0
- package/dist/esm/schema.js +62 -0
- package/dist/esm/schema.js.map +1 -0
- package/dist/index.d.ts +524 -0
- package/package.json +44 -0
- package/tsconfig.base.json +12 -0
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# @intellia/workflow-sdk
|
|
2
|
+
|
|
3
|
+
TypeScript authoring surface for Hutly workflows. A workflow is written as
|
|
4
|
+
ordinary TypeScript — statement order is execution order, and a node's output is
|
|
5
|
+
a typed handle, so wiring is checked by `tsc` before anything is deployed.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @intellia/workflow-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## A node
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { defineFunction, z } from "@intellia/workflow-sdk";
|
|
15
|
+
|
|
16
|
+
export default defineFunction({
|
|
17
|
+
name: "Summarise",
|
|
18
|
+
input: z.object({ text: z.string().max(2000) }),
|
|
19
|
+
output: z.object({ wordCount: z.number(), preview: z.string().max(120) }),
|
|
20
|
+
async run({ text }) {
|
|
21
|
+
return {
|
|
22
|
+
wordCount: text.split(/\s+/).filter(Boolean).length,
|
|
23
|
+
preview: text.slice(0, 120),
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## A workflow
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { defineWorkflow, z } from "@intellia/workflow-sdk";
|
|
33
|
+
import summarise from "./nodes/summarise";
|
|
34
|
+
|
|
35
|
+
export default defineWorkflow({
|
|
36
|
+
name: "SDK smoke test",
|
|
37
|
+
slug: "sdk-smoke-test",
|
|
38
|
+
trigger: { type: "json", input: z.object({ text: z.string().max(2000) }) },
|
|
39
|
+
build(wf, trigger) {
|
|
40
|
+
const s = wf.function(summarise, { text: trigger.text });
|
|
41
|
+
return wf.output({ wordCount: s.wordCount, preview: s.preview });
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Compile it to deployable YAML with the Hutly CLI:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
hutly workflow build --entry workflow.ts
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`z` is re-exported from this package so a workflow's schemas and the SDK share
|
|
53
|
+
one zod instance.
|
|
54
|
+
|
|
55
|
+
## Typechecking
|
|
56
|
+
|
|
57
|
+
Zero-config `tsc` defaults to an ES3 target, which zod's own declarations do not
|
|
58
|
+
compile against. Extend the config this package ships:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{ "extends": "@intellia/workflow-sdk/tsconfig.base.json", "include": ["**/*.ts"] }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Builder = exports.IdAllocator = void 0;
|
|
4
|
+
const refs_1 = require("./refs");
|
|
5
|
+
class IdAllocator {
|
|
6
|
+
constructor() {
|
|
7
|
+
// "trigger" is a platform-reserved key (WorkflowDefinition always keys the
|
|
8
|
+
// trigger node under it) — never hand it out to a user-named node.
|
|
9
|
+
this.used = new Set(["trigger"]);
|
|
10
|
+
}
|
|
11
|
+
allocate(name) {
|
|
12
|
+
const base = name
|
|
13
|
+
.toLowerCase()
|
|
14
|
+
.replace(/[^a-z0-9]+/g, "_")
|
|
15
|
+
.replace(/^_+|_+$/g, "") || "node";
|
|
16
|
+
let candidate = base;
|
|
17
|
+
let n = 1;
|
|
18
|
+
while (this.used.has(candidate)) {
|
|
19
|
+
n += 1;
|
|
20
|
+
candidate = `${base}_${n}`;
|
|
21
|
+
}
|
|
22
|
+
this.used.add(candidate);
|
|
23
|
+
return candidate;
|
|
24
|
+
}
|
|
25
|
+
// An explicit id is taken verbatim — never slugified or lower-cased the way
|
|
26
|
+
// `allocate` normalises a name into one. Shares `allocate`'s `used` set: it
|
|
27
|
+
// must not collide with, or be silently reassigned by, any other id,
|
|
28
|
+
// explicit or auto-derived.
|
|
29
|
+
reserve(id) {
|
|
30
|
+
if (id.length === 0) {
|
|
31
|
+
throw new Error("Explicit node id must not be empty.");
|
|
32
|
+
}
|
|
33
|
+
if (this.used.has(id)) {
|
|
34
|
+
throw new Error(`Node id "${id}" is already in use — explicit ids must be unique within a workflow.`);
|
|
35
|
+
}
|
|
36
|
+
this.used.add(id);
|
|
37
|
+
return id;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.IdAllocator = IdAllocator;
|
|
41
|
+
class Builder {
|
|
42
|
+
constructor(ids) {
|
|
43
|
+
this.ids = ids;
|
|
44
|
+
this.scope = { nodes: [] };
|
|
45
|
+
}
|
|
46
|
+
push(node) {
|
|
47
|
+
this.scope.nodes.push(node);
|
|
48
|
+
return (0, refs_1.handleFor)(`$.results.${node.id}`);
|
|
49
|
+
}
|
|
50
|
+
// Reserves the literal string when given; otherwise falls back to the
|
|
51
|
+
// method's own auto-basis.
|
|
52
|
+
resolveId(explicit, autoBasis) {
|
|
53
|
+
return explicit !== undefined ? this.ids.reserve(explicit) : this.ids.allocate(autoBasis);
|
|
54
|
+
}
|
|
55
|
+
function(def, inputOrOpts, maybeOpts) {
|
|
56
|
+
var _a;
|
|
57
|
+
if ("input" in def) {
|
|
58
|
+
const input = inputOrOpts;
|
|
59
|
+
const opts = maybeOpts !== null && maybeOpts !== void 0 ? maybeOpts : {};
|
|
60
|
+
const id = this.resolveId(opts.id, def.name);
|
|
61
|
+
return this.push({
|
|
62
|
+
kind: "function",
|
|
63
|
+
id,
|
|
64
|
+
name: def.name,
|
|
65
|
+
def,
|
|
66
|
+
modulePath: "",
|
|
67
|
+
input: (0, refs_1.encodeValue)(input),
|
|
68
|
+
onFailure: this.resolveOnFailure(opts.onFailure),
|
|
69
|
+
onFailureRejoin: opts.onFailureRejoin,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
const opts = (_a = inputOrOpts) !== null && _a !== void 0 ? _a : {};
|
|
73
|
+
const id = this.resolveId(opts.id, def.name);
|
|
74
|
+
return this.push({
|
|
75
|
+
kind: "function",
|
|
76
|
+
id,
|
|
77
|
+
name: def.name,
|
|
78
|
+
def,
|
|
79
|
+
modulePath: "",
|
|
80
|
+
input: "whole-state",
|
|
81
|
+
onFailure: this.resolveOnFailure(opts.onFailure),
|
|
82
|
+
onFailureRejoin: opts.onFailureRejoin,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
bash(scriptPath, spec) {
|
|
86
|
+
const id = this.resolveId(spec.id, spec.name);
|
|
87
|
+
return this.push({
|
|
88
|
+
kind: "bash",
|
|
89
|
+
id,
|
|
90
|
+
name: spec.name,
|
|
91
|
+
scriptPath,
|
|
92
|
+
output: spec.output,
|
|
93
|
+
secrets: spec.secrets,
|
|
94
|
+
timeoutSeconds: spec.timeoutSeconds,
|
|
95
|
+
async: spec.async,
|
|
96
|
+
onFailure: this.resolveOnFailure(spec.onFailure),
|
|
97
|
+
onFailureRejoin: spec.onFailureRejoin,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
toolCall(tool, instanceName, spec) {
|
|
101
|
+
var _a;
|
|
102
|
+
const id = this.resolveId(spec.id, instanceName);
|
|
103
|
+
return this.push({
|
|
104
|
+
kind: "tool-call",
|
|
105
|
+
id,
|
|
106
|
+
name: (_a = spec.name) !== null && _a !== void 0 ? _a : instanceName,
|
|
107
|
+
tool,
|
|
108
|
+
toolName: instanceName,
|
|
109
|
+
input: (0, refs_1.encodeValue)(spec.input),
|
|
110
|
+
output: spec.output,
|
|
111
|
+
onFailure: this.resolveOnFailure(spec.onFailure),
|
|
112
|
+
onFailureRejoin: spec.onFailureRejoin,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
agent(spec) {
|
|
116
|
+
const id = this.resolveId(spec.id, spec.name);
|
|
117
|
+
return this.push({
|
|
118
|
+
kind: "agent",
|
|
119
|
+
id,
|
|
120
|
+
name: spec.name,
|
|
121
|
+
agentId: (0, refs_1.encodeValue)(spec.agentId),
|
|
122
|
+
instructions: (0, refs_1.encodeValue)(spec.instructions),
|
|
123
|
+
input: spec.input,
|
|
124
|
+
output: spec.output,
|
|
125
|
+
reasoning: spec.reasoning,
|
|
126
|
+
enabled: spec.enabled,
|
|
127
|
+
description: (0, refs_1.encodeValue)(spec.description),
|
|
128
|
+
showWholeChainState: spec.showWholeChainState,
|
|
129
|
+
failBeforeRunningIf: (0, refs_1.encodeValue)(spec.failBeforeRunningIf),
|
|
130
|
+
failAfterRunningIf: (0, refs_1.encodeValue)(spec.failAfterRunningIf),
|
|
131
|
+
toolChoice: (0, refs_1.encodeValue)(spec.toolChoice),
|
|
132
|
+
tools: spec.tools,
|
|
133
|
+
knowledgeBases: spec.knowledgeBases,
|
|
134
|
+
otherAgents: spec.otherAgents,
|
|
135
|
+
onFailure: this.resolveOnFailure(spec.onFailure),
|
|
136
|
+
onFailureRejoin: spec.onFailureRejoin,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
executeWorkflow(spec) {
|
|
140
|
+
const id = this.resolveId(spec.id, spec.name);
|
|
141
|
+
return this.push({
|
|
142
|
+
kind: "execute-workflow",
|
|
143
|
+
id,
|
|
144
|
+
name: spec.name,
|
|
145
|
+
workflow: spec.workflow,
|
|
146
|
+
// Stamped by execute.ts's stampModulePaths after record() returns —
|
|
147
|
+
// mirrors `function`'s own `modulePath: ""` placeholder above, keeping
|
|
148
|
+
// the bundler-specific stamping mechanism out of builder.ts.
|
|
149
|
+
modulePath: "",
|
|
150
|
+
organizationId: spec.organizationId,
|
|
151
|
+
// A bare Handle is a ref (encodeValue's isRef branch), so this honestly
|
|
152
|
+
// returns a string for the whole-value form and an object for the
|
|
153
|
+
// per-field form — matching what encodeValue actually does, not a
|
|
154
|
+
// narrower shape asserted over it.
|
|
155
|
+
input: (0, refs_1.encodeValue)(spec.input),
|
|
156
|
+
output: spec.output,
|
|
157
|
+
onFailure: this.resolveOnFailure(spec.onFailure),
|
|
158
|
+
onFailureRejoin: spec.onFailureRejoin,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
approval(spec) {
|
|
162
|
+
const id = this.resolveId(spec.id, spec.name);
|
|
163
|
+
return this.push({
|
|
164
|
+
kind: "approval",
|
|
165
|
+
id,
|
|
166
|
+
name: spec.name,
|
|
167
|
+
notificationType: spec.notificationType,
|
|
168
|
+
callbackURL: (0, refs_1.encodeValue)(spec.callbackURL),
|
|
169
|
+
emailAddress: (0, refs_1.encodeValue)(spec.emailAddress),
|
|
170
|
+
otherEmails: (0, refs_1.encodeValue)(spec.otherEmails),
|
|
171
|
+
phoneNumber: (0, refs_1.encodeValue)(spec.phoneNumber),
|
|
172
|
+
message: (0, refs_1.encodeValue)(spec.message),
|
|
173
|
+
output: spec.output,
|
|
174
|
+
defaultValues: (0, refs_1.encodeValue)(spec.defaultValues),
|
|
175
|
+
onFailure: this.resolveOnFailure(spec.onFailure),
|
|
176
|
+
onFailureRejoin: spec.onFailureRejoin,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
waitForCallback(spec) {
|
|
180
|
+
const id = this.resolveId(spec.id, spec.name);
|
|
181
|
+
return this.push({
|
|
182
|
+
kind: "wait-for-callback",
|
|
183
|
+
id,
|
|
184
|
+
name: spec.name,
|
|
185
|
+
output: spec.output,
|
|
186
|
+
timeoutSeconds: spec.timeoutSeconds,
|
|
187
|
+
resume: spec.resume
|
|
188
|
+
? {
|
|
189
|
+
namespace: (0, refs_1.encodeValue)(spec.resume.namespace),
|
|
190
|
+
lookupKey: (0, refs_1.encodeValue)(spec.resume.lookupKey),
|
|
191
|
+
metadata: (0, refs_1.encodeValue)(spec.resume.metadata),
|
|
192
|
+
by: spec.resume.by,
|
|
193
|
+
pendingFor: (0, refs_1.encodeValue)(spec.resume.pendingFor),
|
|
194
|
+
}
|
|
195
|
+
: undefined,
|
|
196
|
+
onFailure: this.resolveOnFailure(spec.onFailure),
|
|
197
|
+
onFailureRejoin: spec.onFailureRejoin,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
// Pure value transform, no scope side effect — the terminal-of-`build()`
|
|
201
|
+
// form (`return wf.output(shape)`). `setOutput` below is the statement
|
|
202
|
+
// form: a branch-local early return, distinct from this method's
|
|
203
|
+
// return-only contract.
|
|
204
|
+
output(shape) {
|
|
205
|
+
return (0, refs_1.encodeValue)(shape);
|
|
206
|
+
}
|
|
207
|
+
// Statement form of "set output and stop here". No `onFailure` option: a
|
|
208
|
+
// Pass state can't Catch. Terminates when it's the last statement of its
|
|
209
|
+
// scope; otherwise continues into whatever follows, output already set.
|
|
210
|
+
setOutput(shape, opts) {
|
|
211
|
+
var _a;
|
|
212
|
+
const id = this.resolveId(opts === null || opts === void 0 ? void 0 : opts.id, "set_output");
|
|
213
|
+
this.scope.nodes.push({
|
|
214
|
+
kind: "set-output",
|
|
215
|
+
id,
|
|
216
|
+
name: (_a = opts === null || opts === void 0 ? void 0 : opts.name) !== null && _a !== void 0 ? _a : "Set output",
|
|
217
|
+
output: (0, refs_1.encodeValue)(shape),
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
// Compiles to a Step Functions Pass state, which cannot Catch — so unlike
|
|
221
|
+
// every other builder method here, this one takes no `onFailure` of its own.
|
|
222
|
+
noop(name, opts) {
|
|
223
|
+
const id = this.resolveId(opts === null || opts === void 0 ? void 0 : opts.id, name);
|
|
224
|
+
this.scope.nodes.push({ kind: "noop", id, name });
|
|
225
|
+
}
|
|
226
|
+
if(cond, branches, opts) {
|
|
227
|
+
var _a, _b, _c;
|
|
228
|
+
const id = this.resolveId(opts === null || opts === void 0 ? void 0 : opts.id, "if");
|
|
229
|
+
const thenScope = (_a = this.recordBranch(branches.then)) !== null && _a !== void 0 ? _a : { nodes: [] };
|
|
230
|
+
if (thenScope.nodes.length === 0) {
|
|
231
|
+
throw new Error(`wf.if "then" branch is empty — a conditional's "then" branch must run at least one node.`);
|
|
232
|
+
}
|
|
233
|
+
const elseScope = this.recordBranch(branches.else);
|
|
234
|
+
this.scope.nodes.push({
|
|
235
|
+
kind: "conditional",
|
|
236
|
+
id,
|
|
237
|
+
name: (_b = opts === null || opts === void 0 ? void 0 : opts.name) !== null && _b !== void 0 ? _b : "If",
|
|
238
|
+
choices: [
|
|
239
|
+
Object.assign(Object.assign({ id: (_c = opts === null || opts === void 0 ? void 0 : opts.choiceId) !== null && _c !== void 0 ? _c : `${id}_then` }, ((opts === null || opts === void 0 ? void 0 : opts.choiceName) !== undefined ? { name: opts.choiceName } : {})), { cond, scope: thenScope }),
|
|
240
|
+
],
|
|
241
|
+
defaultPath: elseScope !== null && elseScope !== void 0 ? elseScope : { nodes: [] },
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
// The platform's `ConditionalNode.choices` is genuinely an array — a
|
|
245
|
+
// JSON-Schema-Choice-state switch with N mutually exclusive branches plus a
|
|
246
|
+
// default, not just "one condition plus an else" (see graph.ts's
|
|
247
|
+
// conditional NodeSpec comment and the real corpus switches this exists
|
|
248
|
+
// for, e.g. workflows/realflow/credit-assessment/subworkflows/
|
|
249
|
+
// notify-commission-decision.yaml's APPROVE/DECLINE/REFER routing). `wf.if`
|
|
250
|
+
// stays the ergonomic single-condition form; this is the literal multi-way
|
|
251
|
+
// form — each branch keeps its own `id` (defaulting to a stable
|
|
252
|
+
// `choice_<n>` when the author doesn't care) so a decompiled definition's
|
|
253
|
+
// original choice ids round-trip instead of being renumbered.
|
|
254
|
+
choice(branches, opts = {}) {
|
|
255
|
+
var _a;
|
|
256
|
+
if (branches.length < 2) {
|
|
257
|
+
throw new Error(`wf.choice requires at least 2 branches, got ${branches.length} — use wf.if() for one condition plus an else.`);
|
|
258
|
+
}
|
|
259
|
+
const choices = branches.map((branch, i) => {
|
|
260
|
+
var _a, _b, _c;
|
|
261
|
+
const scope = (_a = this.recordBranch(branch.then)) !== null && _a !== void 0 ? _a : { nodes: [] };
|
|
262
|
+
if (scope.nodes.length === 0) {
|
|
263
|
+
throw new Error(`wf.choice branch "${(_b = branch.id) !== null && _b !== void 0 ? _b : i}" is empty — a branch must run at least one node.`);
|
|
264
|
+
}
|
|
265
|
+
return Object.assign(Object.assign({ id: (_c = branch.id) !== null && _c !== void 0 ? _c : `choice_${i + 1}` }, (branch.name !== undefined ? { name: branch.name } : {})), { cond: branch.cond, scope });
|
|
266
|
+
});
|
|
267
|
+
const elseScope = this.recordBranch(opts.else);
|
|
268
|
+
this.scope.nodes.push({
|
|
269
|
+
kind: "conditional",
|
|
270
|
+
id: this.resolveId(opts.id, "choice"),
|
|
271
|
+
name: (_a = opts.name) !== null && _a !== void 0 ? _a : "Choice",
|
|
272
|
+
choices,
|
|
273
|
+
defaultPath: elseScope !== null && elseScope !== void 0 ? elseScope : { nodes: [] },
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
parallel(branches, opts) {
|
|
277
|
+
var _a;
|
|
278
|
+
const branchCount = Object.keys(branches).length;
|
|
279
|
+
if (branchCount < 2) {
|
|
280
|
+
throw new Error(`wf.parallel requires at least 2 branches, got ${branchCount}.`);
|
|
281
|
+
}
|
|
282
|
+
for (const key of Object.keys(branches)) {
|
|
283
|
+
if (String(Number(key)) === key) {
|
|
284
|
+
throw new Error(`parallel branch key "${key}" is numeric. JavaScript reorders integer-like keys, ` +
|
|
285
|
+
`which would silently change branch order. Use a descriptive name.`);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
const id = this.resolveId(opts === null || opts === void 0 ? void 0 : opts.id, "parallel");
|
|
289
|
+
const branchSpecs = Object.entries(branches).map(([branchId, fn]) => {
|
|
290
|
+
var _a;
|
|
291
|
+
const scope = (_a = this.recordBranch(fn)) !== null && _a !== void 0 ? _a : { nodes: [] };
|
|
292
|
+
if (scope.nodes.length === 0) {
|
|
293
|
+
throw new Error(`parallel branch "${branchId}" is empty — a branch must run at least one node.`);
|
|
294
|
+
}
|
|
295
|
+
return { id: branchId, scope };
|
|
296
|
+
});
|
|
297
|
+
this.scope.nodes.push({
|
|
298
|
+
kind: "parallel",
|
|
299
|
+
id,
|
|
300
|
+
name: (_a = opts === null || opts === void 0 ? void 0 : opts.name) !== null && _a !== void 0 ? _a : "Parallel",
|
|
301
|
+
branches: branchSpecs,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
forEach(items, body, opts) {
|
|
305
|
+
var _a, _b;
|
|
306
|
+
const id = this.resolveId(opts === null || opts === void 0 ? void 0 : opts.id, "for_each");
|
|
307
|
+
const scope = (_a = this.recordBranch(body)) !== null && _a !== void 0 ? _a : { nodes: [] };
|
|
308
|
+
if (scope.nodes.length === 0) {
|
|
309
|
+
throw new Error(`wf.forEach body is empty — a loop body must run at least one node.`);
|
|
310
|
+
}
|
|
311
|
+
this.scope.nodes.push({
|
|
312
|
+
kind: "repeat",
|
|
313
|
+
id,
|
|
314
|
+
name: (_b = opts === null || opts === void 0 ? void 0 : opts.name) !== null && _b !== void 0 ? _b : "For each",
|
|
315
|
+
numberOrList: ((0, refs_1.isRef)(items) ? (0, refs_1.refPath)(items) : items),
|
|
316
|
+
scope,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
recordBranch(fn) {
|
|
320
|
+
if (!fn)
|
|
321
|
+
return undefined;
|
|
322
|
+
const child = new Builder(this.ids);
|
|
323
|
+
fn(child);
|
|
324
|
+
return child.scope;
|
|
325
|
+
}
|
|
326
|
+
// `"continue"` passes straight through as the sentinel emit.ts reads
|
|
327
|
+
// (there is no scope to record — the whole point is there are no extra
|
|
328
|
+
// nodes); anything else is recorded exactly like every other branch.
|
|
329
|
+
resolveOnFailure(onFailure) {
|
|
330
|
+
if (onFailure === "continue")
|
|
331
|
+
return "continue";
|
|
332
|
+
return this.recordBranch(onFailure);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
exports.Builder = Builder;
|
|
336
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":";;;AAEA,iCAA2F;AA2O3F,MAAa,WAAW;IAAxB;QACE,2EAA2E;QAC3E,mEAAmE;QAC3D,SAAI,GAAG,IAAI,GAAG,CAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAgC9C,CAAC;IA9BC,QAAQ,CAAC,IAAY;QACnB,MAAM,IAAI,GACR,IAAI;aACD,WAAW,EAAE;aACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;aAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC;QACvC,IAAI,SAAS,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAChC,CAAC,IAAI,CAAC,CAAC;YACP,SAAS,GAAG,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACzB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,4EAA4E;IAC5E,4EAA4E;IAC5E,qEAAqE;IACrE,4BAA4B;IAC5B,OAAO,CAAC,EAAU;QAChB,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,CAA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AAS,CAAC,CAAC;IACtC,CAAC;CACF;AApWD,0BAoWC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.jsonata = exports.isPresent = exports.isNull = exports.contains = exports.lte = exports.lt = exports.gte = exports.gt = exports.eq = void 0;
|
|
4
|
+
const refs_1 = require("./refs");
|
|
5
|
+
const dataTypeOf = (v) => {
|
|
6
|
+
if (typeof v === "number")
|
|
7
|
+
return "Numeric";
|
|
8
|
+
if (typeof v === "boolean")
|
|
9
|
+
return "Boolean";
|
|
10
|
+
return "String";
|
|
11
|
+
};
|
|
12
|
+
const compare = (comparison, target, value) => ({
|
|
13
|
+
kind: "comparison",
|
|
14
|
+
condition: {
|
|
15
|
+
variable: (0, refs_1.refPath)(target),
|
|
16
|
+
comparison,
|
|
17
|
+
dataType: dataTypeOf(value),
|
|
18
|
+
value,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const eq = (t, v) => compare("Equals", t, v);
|
|
22
|
+
exports.eq = eq;
|
|
23
|
+
const gt = (t, v) => compare("GreaterThan", t, v);
|
|
24
|
+
exports.gt = gt;
|
|
25
|
+
const gte = (t, v) => compare("GreaterThanEquals", t, v);
|
|
26
|
+
exports.gte = gte;
|
|
27
|
+
const lt = (t, v) => compare("LessThan", t, v);
|
|
28
|
+
exports.lt = lt;
|
|
29
|
+
const lte = (t, v) => compare("LessThanEquals", t, v);
|
|
30
|
+
exports.lte = lte;
|
|
31
|
+
const contains = (t, v) => compare("Contains", t, v);
|
|
32
|
+
exports.contains = contains;
|
|
33
|
+
const isNull = (t) => compare("IsNull", t, true);
|
|
34
|
+
exports.isNull = isNull;
|
|
35
|
+
const isPresent = (t) => compare("IsPresent", t, true);
|
|
36
|
+
exports.isPresent = isPresent;
|
|
37
|
+
const jsonata = (strings, ...vals) => {
|
|
38
|
+
let expression = strings[0];
|
|
39
|
+
for (let i = 0; i < vals.length; i += 1) {
|
|
40
|
+
const v = vals[i];
|
|
41
|
+
if ((0, refs_1.isRef)(v)) {
|
|
42
|
+
// `$.results.x` becomes `$results.x`, not `results.x`: the translator
|
|
43
|
+
// rewrites `$results`/`$trigger` to `$states.input....`, and a bare path
|
|
44
|
+
// is left alone and resolves against nothing at runtime.
|
|
45
|
+
expression += (0, refs_1.refPath)(v).replace(/^\$\./, () => "$");
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
expression += typeof v === "string" ? JSON.stringify(v) : String(v);
|
|
49
|
+
}
|
|
50
|
+
expression += strings[i + 1];
|
|
51
|
+
}
|
|
52
|
+
return { kind: "jsonata", expression };
|
|
53
|
+
};
|
|
54
|
+
exports.jsonata = jsonata;
|
|
55
|
+
//# sourceMappingURL=conditions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditions.js","sourceRoot":"","sources":["../../src/conditions.ts"],"names":[],"mappings":";;;AACA,iCAAmE;AAMnE,MAAM,UAAU,GAAG,CAAC,CAA4B,EAAyB,EAAE;IACzE,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC5C,IAAI,OAAO,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CACd,UAAmC,EACnC,MAAe,EACf,KAAgC,EAC1B,EAAE,CAAC,CAAC;IACV,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE;QACT,QAAQ,EAAE,IAAA,cAAO,EAAC,MAAM,CAAC;QACzB,UAAU;QACV,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC;QAC3B,KAAK;KACN;CACF,CAAC,CAAC;AAEI,MAAM,EAAE,GAAG,CAAsC,CAAY,EAAE,CAAI,EAAQ,EAAE,CAClF,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AADb,QAAA,EAAE,MACW;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AAC,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,IAAA,YAAK,EAAC,CAAC,CAAC,EAAE,CAAC;YACb,sEAAsE;YACtE,yEAAyE;YACzE,yDAAyD;YACzD,UAAU,IAAI,IAAA,cAAO,EAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,UAAU,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACtE,CAAC;QACD,UAAU,IAAI,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AACzC,CAAC,CAAC;AAfW,QAAA,OAAO,WAelB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-agent-ref.js","sourceRoot":"","sources":["../../src/define-agent-ref.ts"],"names":[],"mappings":";;;AAgBO,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAe,EAAE,CAAC,IAAI,CAAC;AAA1D,QAAA,cAAc,kBAA4C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-knowledge-base.js","sourceRoot":"","sources":["../../src/define-knowledge-base.ts"],"names":[],"mappings":";;;AAcO,MAAM,mBAAmB,GAAG,CAAC,IAAsB,EAAoB,EAAE,CAAC,IAAI,CAAC;AAAzE,QAAA,mBAAmB,uBAAsD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineWholeStateFunction = exports.defineFunction = void 0;
|
|
4
|
+
const defineFunction = (spec) => spec;
|
|
5
|
+
exports.defineFunction = defineFunction;
|
|
6
|
+
const defineWholeStateFunction = (spec) => spec;
|
|
7
|
+
exports.defineWholeStateFunction = defineWholeStateFunction;
|
|
8
|
+
//# sourceMappingURL=define-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-node.js","sourceRoot":"","sources":["../../src/define-node.ts"],"names":[],"mappings":";;;AAYO,MAAM,cAAc,GAAG,CAAO,IAAuB,EAAqB,EAAE,CAAC,IAAI,CAAC;AAA5E,QAAA,cAAc,kBAA8D;AAiBlF,MAAM,wBAAwB,GAAG,CAAI,IAA8B,EAA4B,EAAE,CAAC,IAAI,CAAC;AAAjG,QAAA,wBAAwB,4BAAyE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineToolWorkflow = void 0;
|
|
4
|
+
const builder_1 = require("./builder");
|
|
5
|
+
const refs_1 = require("./refs");
|
|
6
|
+
const defineToolWorkflow = (spec) => ({
|
|
7
|
+
record() {
|
|
8
|
+
var _a;
|
|
9
|
+
const ids = new builder_1.IdAllocator();
|
|
10
|
+
if (typeof spec.endNodeId === "string")
|
|
11
|
+
ids.reserve(spec.endNodeId);
|
|
12
|
+
if (spec.outputNodeId !== undefined)
|
|
13
|
+
ids.reserve(spec.outputNodeId);
|
|
14
|
+
const root = new builder_1.Builder(ids);
|
|
15
|
+
const output = spec.build(root, (0, refs_1.handleFor)("$.results.trigger"));
|
|
16
|
+
return {
|
|
17
|
+
name: spec.name,
|
|
18
|
+
description: (_a = spec.description) !== null && _a !== void 0 ? _a : spec.name,
|
|
19
|
+
slug: spec.slug,
|
|
20
|
+
kind: "tool",
|
|
21
|
+
trigger: { type: "json", name: spec.triggerName, input: spec.input },
|
|
22
|
+
scope: root.scope,
|
|
23
|
+
output,
|
|
24
|
+
outputSchema: spec.output,
|
|
25
|
+
ids,
|
|
26
|
+
endNodeId: spec.endNodeId,
|
|
27
|
+
endNodeName: spec.endNodeName,
|
|
28
|
+
outputNodeId: spec.outputNodeId,
|
|
29
|
+
outputNodeName: spec.outputNodeName,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
exports.defineToolWorkflow = defineToolWorkflow;
|
|
34
|
+
//# sourceMappingURL=define-tool-workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-tool-workflow.js","sourceRoot":"","sources":["../../src/define-tool-workflow.ts"],"names":[],"mappings":";;;AACA,uCAAiD;AACjD,iCAAgD;AAuBzC,MAAM,kBAAkB,GAAG,CAChC,IAAuC,EACvB,EAAE,CAAC,CAAC;IACpB,MAAM;;QACJ,MAAM,GAAG,GAAG,IAAI,qBAAW,EAAE,CAAC;QAC9B,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ;YAAE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS;YAAE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpE,MAAM,IAAI,GAAG,IAAI,iBAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAA,gBAAS,EAAS,mBAAmB,CAAC,CAAC,CAAC;QAExE,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,MAAA,IAAI,CAAC,WAAW,mCAAI,IAAI,CAAC,IAAI;YAC1C,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;YACpE,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM;YACN,YAAY,EAAE,IAAI,CAAC,MAAM;YACzB,GAAG;YACH,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AA1BU,QAAA,kBAAkB,sBA0B5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-tool.js","sourceRoot":"","sources":["../../src/define-tool.ts"],"names":[],"mappings":";;;AA8CO,MAAM,UAAU,GAAG,CAAyC,IAKlE,EAAe,EAAE,CAAC,IAAI,CAAC;AALX,QAAA,UAAU,cAKC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineWorkflow = void 0;
|
|
4
|
+
const builder_1 = require("./builder");
|
|
5
|
+
const refs_1 = require("./refs");
|
|
6
|
+
const defineWorkflow = (spec) => ({
|
|
7
|
+
record() {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const ids = new builder_1.IdAllocator();
|
|
10
|
+
// Reserved before `build()` runs, so a body node's auto-derived id
|
|
11
|
+
// yields to it (via allocate()'s suffixing) rather than claiming it
|
|
12
|
+
// first and making this throw.
|
|
13
|
+
if (typeof spec.endNodeId === "string")
|
|
14
|
+
ids.reserve(spec.endNodeId);
|
|
15
|
+
if (spec.outputNodeId !== undefined)
|
|
16
|
+
ids.reserve(spec.outputNodeId);
|
|
17
|
+
const root = new builder_1.Builder(ids);
|
|
18
|
+
const trigger = (0, refs_1.handleFor)("$.results.trigger");
|
|
19
|
+
const output = (_a = spec.build(root, trigger)) !== null && _a !== void 0 ? _a : undefined;
|
|
20
|
+
const failureScope = root.recordBranch(spec.onFailure);
|
|
21
|
+
const triggerSpec = { type: spec.trigger.type, name: spec.trigger.name, input: spec.trigger.input };
|
|
22
|
+
return {
|
|
23
|
+
name: spec.name,
|
|
24
|
+
description: (_b = spec.description) !== null && _b !== void 0 ? _b : spec.name,
|
|
25
|
+
slug: spec.slug,
|
|
26
|
+
kind: "standard",
|
|
27
|
+
trigger: triggerSpec,
|
|
28
|
+
scope: root.scope,
|
|
29
|
+
output,
|
|
30
|
+
onFailure: failureScope,
|
|
31
|
+
ids,
|
|
32
|
+
endNodeId: spec.endNodeId,
|
|
33
|
+
endNodeName: spec.endNodeName,
|
|
34
|
+
outputNodeId: spec.outputNodeId,
|
|
35
|
+
outputNodeName: spec.outputNodeName,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
exports.defineWorkflow = defineWorkflow;
|
|
40
|
+
//# sourceMappingURL=define-workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-workflow.js","sourceRoot":"","sources":["../../src/define-workflow.ts"],"names":[],"mappings":";;;AACA,uCAAiD;AACjD,iCAAgD;AAmBzC,MAAM,cAAc,GAAG,CAAS,IAA0B,EAAkB,EAAE,CAAC,CAAC;IACrF,MAAM;;QACJ,MAAM,GAAG,GAAG,IAAI,qBAAW,EAAE,CAAC;QAC9B,mEAAmE;QACnE,oEAAoE;QACpE,+BAA+B;QAC/B,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ;YAAE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS;YAAE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpE,MAAM,IAAI,GAAG,IAAI,iBAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAA,gBAAS,EAAS,mBAAmB,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,mCAAI,SAAS,CA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