@particle-academy/fancy-flow 0.2.2
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 +106 -0
- package/dist/chunk-BCXECQUC.js +110 -0
- package/dist/chunk-BCXECQUC.js.map +1 -0
- package/dist/chunk-JNYYJHNJ.js +247 -0
- package/dist/chunk-JNYYJHNJ.js.map +1 -0
- package/dist/chunk-WNVBXXOL.js +101 -0
- package/dist/chunk-WNVBXXOL.js.map +1 -0
- package/dist/chunk-XZEUFVJ2.js +507 -0
- package/dist/chunk-XZEUFVJ2.js.map +1 -0
- package/dist/index.cjs +1677 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +226 -0
- package/dist/index.d.ts +226 -0
- package/dist/index.js +705 -0
- package/dist/index.js.map +1 -0
- package/dist/registry/index.d.cts +170 -0
- package/dist/registry/index.d.ts +170 -0
- package/dist/registry.cjs +615 -0
- package/dist/registry.cjs.map +1 -0
- package/dist/registry.js +4 -0
- package/dist/registry.js.map +1 -0
- package/dist/runtime/index.d.cts +93 -0
- package/dist/runtime/index.d.ts +93 -0
- package/dist/runtime.cjs +252 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.js +3 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schema/index.d.cts +81 -0
- package/dist/schema/index.d.ts +81 -0
- package/dist/schema.cjs +170 -0
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.js +4 -0
- package/dist/schema.js.map +1 -0
- package/dist/styles.css +690 -0
- package/dist/styles.css.map +1 -0
- package/dist/types-TemTtb04.d.cts +103 -0
- package/dist/types-TemTtb04.d.ts +103 -0
- package/package.json +55 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/registry/registry.ts"],"names":[],"mappings":";AAEA,IAAM,KAAA,uBAAY,GAAA,EAA+C;AACjE,IAAM,SAAA,uBAAgB,GAAA,EAAgB;AAO/B,SAAS,iBACd,UAAA,EACY;AACZ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OAAO,SAAA;AAAA,IACvB,KAAK,IAAA;AAAW,MAAA,OAAO,SAAA;AAAA,IACvB,KAAK,IAAA;AAAW,MAAA,OAAO,SAAA;AAAA,IACvB,KAAK,OAAA;AAAW,MAAA,OAAO,SAAA;AAAA,IACvB,KAAK,QAAA;AAAW,MAAA,OAAO,SAAA;AAAA,IACvB;AAAgB,MAAA,OAAO,SAAA;AAAA;AAE3B","file":"chunk-WNVBXXOL.js","sourcesContent":["import type { ConfigField, NodeKindDefinition } from \"./types\";\n\nconst kinds = new Map<string, NodeKindDefinition<any, any, any>>();\nconst listeners = new Set<() => void>();\n\n/**\n * registerNodeKind — install a node kind in the global registry. Returns\n * an `unregister` function. Calling with the same name replaces the prior\n * registration (handy for HMR).\n */\nexport function registerNodeKind<TC = any, TI = any, TO = any>(\n definition: NodeKindDefinition<TC, TI, TO>,\n): () => void {\n kinds.set(definition.name, definition as NodeKindDefinition<any, any, any>);\n notify();\n return () => {\n if (kinds.get(definition.name) === (definition as any)) {\n kinds.delete(definition.name);\n notify();\n }\n };\n}\n\n/** Get a single kind by name, or null. */\nexport function getNodeKind(name: string): NodeKindDefinition | null {\n return (kinds.get(name) as NodeKindDefinition) ?? null;\n}\n\n/** List every registered kind, optionally filtered by category. */\nexport function listNodeKinds(category?: string): NodeKindDefinition[] {\n const all = Array.from(kinds.values()) as NodeKindDefinition[];\n return category ? all.filter((k) => k.category === category) : all;\n}\n\n/** Subscribe to registry changes. Returns an unsubscribe function. */\nexport function onNodeKindsChanged(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n\nfunction notify(): void {\n for (const l of listeners) l();\n}\n\n/** Fill in defaults from a kind's configSchema for newly-created nodes. */\nexport function defaultConfigFor(kind: NodeKindDefinition): Record<string, unknown> {\n const fromKind = kind.defaultConfig ? { ...(kind.defaultConfig as Record<string, unknown>) } : {};\n for (const field of kind.configSchema ?? []) {\n if (fromKind[field.key] !== undefined) continue;\n if (\"default\" in field && (field as any).default !== undefined) {\n fromKind[field.key] = (field as any).default;\n }\n }\n return fromKind;\n}\n\n/**\n * Validate a config object against a kind's schema. Returns an array of\n * issues (empty = valid). Validation is intentionally light — type\n * coercion + required-field checks. Hosts can layer Zod / Ajv on top.\n */\nexport function validateConfig(\n kind: NodeKindDefinition,\n config: Record<string, unknown>,\n): Array<{ key: string; message: string }> {\n const issues: Array<{ key: string; message: string }> = [];\n for (const field of kind.configSchema ?? []) {\n const value = config[field.key];\n if (field.required && (value === undefined || value === null || value === \"\")) {\n issues.push({ key: field.key, message: `${field.label} is required` });\n continue;\n }\n if (value === undefined || value === null) continue;\n const issue = validateField(field, value);\n if (issue) issues.push({ key: field.key, message: issue });\n }\n return issues;\n}\n\nfunction validateField(field: ConfigField, value: unknown): string | null {\n switch (field.type) {\n case \"text\":\n case \"textarea\":\n case \"expression\":\n case \"credential\":\n return typeof value === \"string\" ? null : `${field.label} must be a string`;\n case \"number\": {\n if (typeof value !== \"number\" || !Number.isFinite(value)) return `${field.label} must be a number`;\n if (field.min !== undefined && value < field.min) return `${field.label} must be >= ${field.min}`;\n if (field.max !== undefined && value > field.max) return `${field.label} must be <= ${field.max}`;\n return null;\n }\n case \"switch\":\n return typeof value === \"boolean\" ? null : `${field.label} must be a boolean`;\n case \"select\": {\n const allowed = field.options.map((o) => o.value);\n return allowed.includes(String(value)) ? null : `${field.label} must be one of ${allowed.join(\", \")}`;\n }\n case \"json\":\n return null; // permissive — just JSON-shaped\n default:\n return null;\n }\n}\n\n/** Default accents per category. */\nexport function categoryAccent(category: string): string {\n switch (category) {\n case \"trigger\": return \"#10b981\";\n case \"logic\": return \"#f59e0b\";\n case \"data\": return \"#0ea5e9\";\n case \"ai\": return \"#8b5cf6\";\n case \"io\": return \"#3b82f6\";\n case \"human\": return \"#ec4899\";\n case \"output\": return \"#a855f7\";\n default: return \"#71717a\";\n }\n}\n"]}
|
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { getNodeKind, categoryAccent, registerNodeKind, listNodeKinds } from './chunk-WNVBXXOL.js';
|
|
2
|
+
import { memo, useMemo } from 'react';
|
|
3
|
+
import { Handle, Position } from '@xyflow/react';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function RegistryNodeInner(props) {
|
|
7
|
+
const kindName = props.data.kind ?? props.type;
|
|
8
|
+
const kind = useMemo(() => getNodeKind(kindName), [kindName]);
|
|
9
|
+
if (!kind) {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", { className: "ff-node ff-node--unknown", children: [
|
|
11
|
+
/* @__PURE__ */ jsxs("div", { className: "ff-node__header", style: { background: "#71717a" }, children: [
|
|
12
|
+
/* @__PURE__ */ jsx("span", { className: "ff-node__tag", children: "UNKNOWN" }),
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: "ff-node__label", children: kindName })
|
|
14
|
+
] }),
|
|
15
|
+
/* @__PURE__ */ jsxs("p", { className: "ff-node__desc", children: [
|
|
16
|
+
'No registered kind for "',
|
|
17
|
+
kindName,
|
|
18
|
+
'".'
|
|
19
|
+
] })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
const data = props.data;
|
|
23
|
+
const status = data.status ?? "idle";
|
|
24
|
+
const accent = kind.accent ?? categoryAccent(kind.category);
|
|
25
|
+
const inputs = data.inputs ?? kind.inputs ?? defaultInputs(kind.category);
|
|
26
|
+
const outputs = data.outputs ?? kind.outputs ?? defaultOutputs(kind.category);
|
|
27
|
+
const config = data.config ?? {};
|
|
28
|
+
const label = data.label ?? kind.label;
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: [
|
|
33
|
+
"ff-node",
|
|
34
|
+
`ff-node--status-${status}`,
|
|
35
|
+
`ff-node--cat-${kind.category}`,
|
|
36
|
+
props.selected ? "ff-node--selected" : ""
|
|
37
|
+
].filter(Boolean).join(" "),
|
|
38
|
+
style: { borderColor: props.selected ? accent : void 0 },
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("header", { className: "ff-node__header", style: { background: accent }, children: [
|
|
41
|
+
kind.icon && /* @__PURE__ */ jsx("span", { className: "ff-node__icon", "aria-hidden": true, children: kind.icon }),
|
|
42
|
+
/* @__PURE__ */ jsx("span", { className: "ff-node__tag", children: kind.label.toUpperCase() }),
|
|
43
|
+
/* @__PURE__ */ jsx("span", { className: "ff-node__label", children: label }),
|
|
44
|
+
status !== "idle" && /* @__PURE__ */ jsx("span", { className: `ff-node__dot ff-node__dot--${status}`, "aria-label": `status ${status}` })
|
|
45
|
+
] }),
|
|
46
|
+
data.description && /* @__PURE__ */ jsx("p", { className: "ff-node__desc", children: data.description }),
|
|
47
|
+
/* @__PURE__ */ jsx("div", { className: "ff-node__body", children: kind.renderBody ? kind.renderBody({ nodeId: props.id, config, selected: props.selected ?? false }) : /* @__PURE__ */ jsx(DefaultBody, { config, kind: kind.configSchema }) }),
|
|
48
|
+
data.statusText && /* @__PURE__ */ jsx("p", { className: "ff-node__status-text", children: data.statusText }),
|
|
49
|
+
inputs.map((p, i) => /* @__PURE__ */ jsx(
|
|
50
|
+
Handle,
|
|
51
|
+
{
|
|
52
|
+
type: "target",
|
|
53
|
+
position: Position.Left,
|
|
54
|
+
id: p.id,
|
|
55
|
+
style: portStyle(i, inputs.length),
|
|
56
|
+
title: p.label ?? p.id
|
|
57
|
+
},
|
|
58
|
+
p.id
|
|
59
|
+
)),
|
|
60
|
+
outputs.map((p, i) => /* @__PURE__ */ jsx(
|
|
61
|
+
Handle,
|
|
62
|
+
{
|
|
63
|
+
type: "source",
|
|
64
|
+
position: Position.Right,
|
|
65
|
+
id: p.id,
|
|
66
|
+
style: portStyle(i, outputs.length),
|
|
67
|
+
title: p.label ?? p.id
|
|
68
|
+
},
|
|
69
|
+
p.id
|
|
70
|
+
))
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
var RegistryNode = memo(RegistryNodeInner);
|
|
76
|
+
function defaultInputs(category) {
|
|
77
|
+
return category === "trigger" ? [] : [{ id: "in" }];
|
|
78
|
+
}
|
|
79
|
+
function defaultOutputs(category) {
|
|
80
|
+
return category === "output" ? [] : [{ id: "out" }];
|
|
81
|
+
}
|
|
82
|
+
function portStyle(i, total) {
|
|
83
|
+
if (total <= 1) return {};
|
|
84
|
+
const slot = 100 / (total + 1) * (i + 1);
|
|
85
|
+
return { top: `${slot}%` };
|
|
86
|
+
}
|
|
87
|
+
function DefaultBody({ config, kind }) {
|
|
88
|
+
const fields = kind ?? [];
|
|
89
|
+
const visible = fields.map((f) => ({ field: f, value: config[f.key] })).filter(({ value }) => value !== void 0 && value !== "" && value !== null);
|
|
90
|
+
if (visible.length === 0) {
|
|
91
|
+
return /* @__PURE__ */ jsx("div", { className: "ff-node__body-empty", children: "\u2014 configure in the panel" });
|
|
92
|
+
}
|
|
93
|
+
return /* @__PURE__ */ jsxs("ul", { className: "ff-node__summary", children: [
|
|
94
|
+
visible.slice(0, 4).map(({ field, value }) => /* @__PURE__ */ jsxs("li", { children: [
|
|
95
|
+
/* @__PURE__ */ jsxs("span", { className: "ff-node__summary-key", children: [
|
|
96
|
+
field.label,
|
|
97
|
+
":"
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ jsx("span", { className: "ff-node__summary-value", children: previewValue(value) })
|
|
100
|
+
] }, field.key)),
|
|
101
|
+
visible.length > 4 && /* @__PURE__ */ jsxs("li", { className: "ff-node__summary-more", children: [
|
|
102
|
+
"+ ",
|
|
103
|
+
visible.length - 4,
|
|
104
|
+
" more"
|
|
105
|
+
] })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
function previewValue(v) {
|
|
109
|
+
if (typeof v === "string") return v.length > 30 ? v.slice(0, 27) + "\u2026" : v;
|
|
110
|
+
if (typeof v === "number" || typeof v === "boolean") return String(v);
|
|
111
|
+
try {
|
|
112
|
+
const j = JSON.stringify(v);
|
|
113
|
+
return j.length > 30 ? j.slice(0, 27) + "\u2026" : j;
|
|
114
|
+
} catch {
|
|
115
|
+
return "[object]";
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// src/registry/builtin.ts
|
|
120
|
+
var HTTP_METHODS = [
|
|
121
|
+
{ type: "select", key: "method", label: "Method", options: [
|
|
122
|
+
{ value: "GET", label: "GET" },
|
|
123
|
+
{ value: "POST", label: "POST" },
|
|
124
|
+
{ value: "PUT", label: "PUT" },
|
|
125
|
+
{ value: "PATCH", label: "PATCH" },
|
|
126
|
+
{ value: "DELETE", label: "DELETE" }
|
|
127
|
+
], default: "GET", required: true }
|
|
128
|
+
];
|
|
129
|
+
var KINDS = [
|
|
130
|
+
// ───────────── Triggers ─────────────
|
|
131
|
+
{
|
|
132
|
+
name: "manual_trigger",
|
|
133
|
+
category: "trigger",
|
|
134
|
+
label: "Manual",
|
|
135
|
+
description: "Entry point fired when the user clicks Run.",
|
|
136
|
+
icon: "\u26A1",
|
|
137
|
+
inputs: [],
|
|
138
|
+
outputs: [{ id: "out" }]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "webhook_trigger",
|
|
142
|
+
category: "trigger",
|
|
143
|
+
label: "Webhook",
|
|
144
|
+
description: "Triggered by an inbound HTTP request to a host-provided URL.",
|
|
145
|
+
icon: "\u{1F4E1}",
|
|
146
|
+
inputs: [],
|
|
147
|
+
outputs: [{ id: "out", label: "payload" }],
|
|
148
|
+
configSchema: [
|
|
149
|
+
{ type: "text", key: "path", label: "Path", placeholder: "/hooks/my-flow", required: true },
|
|
150
|
+
{ type: "select", key: "method", label: "Method", options: [
|
|
151
|
+
{ value: "POST", label: "POST" },
|
|
152
|
+
{ value: "GET", label: "GET" }
|
|
153
|
+
], default: "POST" },
|
|
154
|
+
{ type: "credential", key: "secret", label: "Verifying secret", credentialType: "webhook_secret" }
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "schedule_trigger",
|
|
159
|
+
category: "trigger",
|
|
160
|
+
label: "Schedule",
|
|
161
|
+
description: "Fires on a cron schedule (host-implemented).",
|
|
162
|
+
icon: "\u23F1",
|
|
163
|
+
inputs: [],
|
|
164
|
+
outputs: [{ id: "out" }],
|
|
165
|
+
configSchema: [
|
|
166
|
+
{
|
|
167
|
+
type: "text",
|
|
168
|
+
key: "cron",
|
|
169
|
+
label: "Cron",
|
|
170
|
+
placeholder: "*/5 * * * *",
|
|
171
|
+
required: true,
|
|
172
|
+
description: "Standard 5-field cron expression."
|
|
173
|
+
},
|
|
174
|
+
{ type: "text", key: "timezone", label: "Timezone", placeholder: "UTC", default: "UTC" }
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: "user_input",
|
|
179
|
+
category: "human",
|
|
180
|
+
label: "User Input",
|
|
181
|
+
description: "Pause the flow until the user submits the configured form.",
|
|
182
|
+
icon: "\u270E",
|
|
183
|
+
inputs: [{ id: "in" }],
|
|
184
|
+
outputs: [{ id: "out", label: "values" }],
|
|
185
|
+
configSchema: [
|
|
186
|
+
{ type: "text", key: "title", label: "Form title", default: "Need your input" },
|
|
187
|
+
{
|
|
188
|
+
type: "json",
|
|
189
|
+
key: "fields",
|
|
190
|
+
label: "Fields (JSON)",
|
|
191
|
+
language: "json",
|
|
192
|
+
rows: 6,
|
|
193
|
+
default: [{ key: "answer", label: "Your answer", type: "textarea" }]
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
// ───────────── Logic ─────────────
|
|
198
|
+
{
|
|
199
|
+
name: "branch",
|
|
200
|
+
category: "logic",
|
|
201
|
+
label: "Branch",
|
|
202
|
+
description: "Multi-way branch on a condition or value.",
|
|
203
|
+
icon: "\u25C7",
|
|
204
|
+
inputs: [{ id: "in" }],
|
|
205
|
+
outputs: [{ id: "true", label: "true" }, { id: "false", label: "false" }],
|
|
206
|
+
configSchema: [
|
|
207
|
+
{ type: "expression", key: "condition", label: "Condition", example: "{{ $json.active }}", required: true }
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "switch_case",
|
|
212
|
+
category: "logic",
|
|
213
|
+
label: "Switch",
|
|
214
|
+
description: "Route to one of N labelled outputs based on a key.",
|
|
215
|
+
icon: "\u2933",
|
|
216
|
+
inputs: [{ id: "in" }],
|
|
217
|
+
outputs: [{ id: "case_a", label: "a" }, { id: "case_b", label: "b" }, { id: "default", label: "default" }],
|
|
218
|
+
configSchema: [
|
|
219
|
+
{ type: "expression", key: "value", label: "Switch on", example: "{{ $json.kind }}", required: true },
|
|
220
|
+
{ type: "json", key: "cases", label: "Cases (JSON)", default: { a: "case_a", b: "case_b" } }
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "for_each",
|
|
225
|
+
category: "logic",
|
|
226
|
+
label: "For Each",
|
|
227
|
+
description: "Iterate over a list, emitting each item on `item`.",
|
|
228
|
+
icon: "\u21BB",
|
|
229
|
+
inputs: [{ id: "in" }],
|
|
230
|
+
outputs: [{ id: "item", label: "item" }, { id: "done", label: "done" }],
|
|
231
|
+
configSchema: [
|
|
232
|
+
{ type: "expression", key: "source", label: "List", example: "{{ $json.users }}", required: true },
|
|
233
|
+
{ type: "number", key: "concurrency", label: "Concurrency", default: 1, min: 1, max: 50 }
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "merge",
|
|
238
|
+
category: "logic",
|
|
239
|
+
label: "Merge",
|
|
240
|
+
description: "Combine multiple inputs into one object or array.",
|
|
241
|
+
icon: "\u2295",
|
|
242
|
+
inputs: [{ id: "a" }, { id: "b" }],
|
|
243
|
+
outputs: [{ id: "out" }],
|
|
244
|
+
configSchema: [
|
|
245
|
+
{
|
|
246
|
+
type: "select",
|
|
247
|
+
key: "mode",
|
|
248
|
+
label: "Mode",
|
|
249
|
+
default: "merge",
|
|
250
|
+
options: [{ value: "merge", label: "Object merge" }, { value: "concat", label: "Array concat" }]
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: "wait",
|
|
256
|
+
category: "logic",
|
|
257
|
+
label: "Wait",
|
|
258
|
+
description: "Sleep or wait for an external event.",
|
|
259
|
+
icon: "\u23F8",
|
|
260
|
+
configSchema: [
|
|
261
|
+
{
|
|
262
|
+
type: "select",
|
|
263
|
+
key: "mode",
|
|
264
|
+
label: "Mode",
|
|
265
|
+
default: "duration",
|
|
266
|
+
options: [{ value: "duration", label: "Duration" }, { value: "until", label: "Until timestamp" }, { value: "event", label: "External event" }]
|
|
267
|
+
},
|
|
268
|
+
{ type: "text", key: "duration", label: "Duration", placeholder: "5s, 10m, 1h", description: "Used when mode = duration." }
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: "transform",
|
|
273
|
+
category: "logic",
|
|
274
|
+
label: "Transform",
|
|
275
|
+
description: "Reshape data with an expression.",
|
|
276
|
+
icon: "\u0192",
|
|
277
|
+
configSchema: [
|
|
278
|
+
{
|
|
279
|
+
type: "expression",
|
|
280
|
+
key: "expression",
|
|
281
|
+
label: "Expression",
|
|
282
|
+
example: "{{ { id: $json.id, name: $json.first + ' ' + $json.last } }}",
|
|
283
|
+
required: true
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
// ───────────── Data ─────────────
|
|
288
|
+
{
|
|
289
|
+
name: "memory_store",
|
|
290
|
+
category: "data",
|
|
291
|
+
label: "Memory Store",
|
|
292
|
+
description: "Read or write per-conversation memory.",
|
|
293
|
+
icon: "\u{1F9E0}",
|
|
294
|
+
configSchema: [
|
|
295
|
+
{
|
|
296
|
+
type: "select",
|
|
297
|
+
key: "operation",
|
|
298
|
+
label: "Operation",
|
|
299
|
+
required: true,
|
|
300
|
+
default: "read",
|
|
301
|
+
options: [{ value: "read", label: "Read" }, { value: "write", label: "Write" }, { value: "append", label: "Append" }]
|
|
302
|
+
},
|
|
303
|
+
{ type: "text", key: "key", label: "Key", placeholder: "user.preferences", required: true },
|
|
304
|
+
{ type: "expression", key: "value", label: "Value (write/append only)", example: "{{ $json }}" },
|
|
305
|
+
{ type: "credential", key: "store", label: "Memory store", credentialType: "memory_store" }
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "data_store",
|
|
310
|
+
category: "data",
|
|
311
|
+
label: "Data Store",
|
|
312
|
+
description: "Key-value or table read/write against a host store.",
|
|
313
|
+
icon: "\u{1F5C3}",
|
|
314
|
+
configSchema: [
|
|
315
|
+
{
|
|
316
|
+
type: "select",
|
|
317
|
+
key: "operation",
|
|
318
|
+
label: "Operation",
|
|
319
|
+
required: true,
|
|
320
|
+
default: "get",
|
|
321
|
+
options: [
|
|
322
|
+
{ value: "get", label: "Get" },
|
|
323
|
+
{ value: "set", label: "Set" },
|
|
324
|
+
{ value: "delete", label: "Delete" },
|
|
325
|
+
{ value: "query", label: "Query" },
|
|
326
|
+
{ value: "list", label: "List" }
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
{ type: "text", key: "table", label: "Table / collection", required: true },
|
|
330
|
+
{ type: "text", key: "key", label: "Key" },
|
|
331
|
+
{ type: "json", key: "where", label: "Where (JSON)", description: "For query/list operations." },
|
|
332
|
+
{ type: "expression", key: "value", label: "Value (set only)", example: "{{ $json }}" },
|
|
333
|
+
{ type: "credential", key: "store", label: "Data store", credentialType: "data_store" }
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: "variable",
|
|
338
|
+
category: "data",
|
|
339
|
+
label: "Variable",
|
|
340
|
+
description: "Workflow-scoped value used by other nodes.",
|
|
341
|
+
icon: "\u{1D4CD}",
|
|
342
|
+
configSchema: [
|
|
343
|
+
{ type: "text", key: "name", label: "Name", required: true },
|
|
344
|
+
{ type: "expression", key: "value", label: "Value", required: true }
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
// ───────────── AI ─────────────
|
|
348
|
+
{
|
|
349
|
+
name: "llm_call",
|
|
350
|
+
category: "ai",
|
|
351
|
+
label: "LLM Call",
|
|
352
|
+
description: "Send a prompt + context to a model and receive a response.",
|
|
353
|
+
icon: "\u2726",
|
|
354
|
+
configSchema: [
|
|
355
|
+
{
|
|
356
|
+
type: "select",
|
|
357
|
+
key: "provider",
|
|
358
|
+
label: "Provider",
|
|
359
|
+
default: "anthropic",
|
|
360
|
+
options: [
|
|
361
|
+
{ value: "anthropic", label: "Anthropic" },
|
|
362
|
+
{ value: "openai", label: "OpenAI" },
|
|
363
|
+
{ value: "custom", label: "Custom" }
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
{ type: "text", key: "model", label: "Model", placeholder: "claude-sonnet-4-5", required: true },
|
|
367
|
+
{ type: "textarea", key: "system", label: "System prompt", rows: 4 },
|
|
368
|
+
{ type: "expression", key: "prompt", label: "User prompt", example: "{{ $json.question }}", required: true },
|
|
369
|
+
{ type: "number", key: "temperature", label: "Temperature", min: 0, max: 2, step: 0.1, default: 0.7 },
|
|
370
|
+
{ type: "number", key: "max_tokens", label: "Max tokens", min: 1, max: 8192, default: 1024 },
|
|
371
|
+
{ type: "json", key: "tools", label: "Tools (JSON)", description: "Optional Anthropic-style tool definitions." },
|
|
372
|
+
{ type: "credential", key: "credential", label: "API credential", credentialType: "llm_credential" }
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
name: "tool_use",
|
|
377
|
+
category: "ai",
|
|
378
|
+
label: "Tool Use",
|
|
379
|
+
description: "Hand control to a host-registered tool by name.",
|
|
380
|
+
icon: "\u{1F6E0}",
|
|
381
|
+
configSchema: [
|
|
382
|
+
{ type: "text", key: "tool", label: "Tool name", placeholder: "search_index", required: true },
|
|
383
|
+
{ type: "expression", key: "args", label: "Arguments", example: "{{ { query: $json.q } }}" }
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: "embed_search",
|
|
388
|
+
category: "ai",
|
|
389
|
+
label: "Embed & Search",
|
|
390
|
+
description: "Embed a query and search a vector store.",
|
|
391
|
+
icon: "\u273A",
|
|
392
|
+
configSchema: [
|
|
393
|
+
{ type: "expression", key: "query", label: "Query", required: true, example: "{{ $json.question }}" },
|
|
394
|
+
{ type: "number", key: "topK", label: "Top K", default: 5, min: 1, max: 50 },
|
|
395
|
+
{ type: "credential", key: "vectorStore", label: "Vector store", credentialType: "vector_store" }
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
// ───────────── IO ─────────────
|
|
399
|
+
{
|
|
400
|
+
name: "api_request",
|
|
401
|
+
category: "io",
|
|
402
|
+
label: "API Request",
|
|
403
|
+
description: "HTTP request to any URL.",
|
|
404
|
+
icon: "\u2194",
|
|
405
|
+
configSchema: [
|
|
406
|
+
...HTTP_METHODS,
|
|
407
|
+
{ type: "text", key: "url", label: "URL", placeholder: "https://api.example.com/...", required: true },
|
|
408
|
+
{ type: "json", key: "headers", label: "Headers", default: { "content-type": "application/json" } },
|
|
409
|
+
{ type: "json", key: "body", label: "Body" },
|
|
410
|
+
{ type: "credential", key: "auth", label: "Auth", credentialType: "api_credential" }
|
|
411
|
+
]
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
name: "webhook_out",
|
|
415
|
+
category: "io",
|
|
416
|
+
label: "Send Webhook",
|
|
417
|
+
description: "POST a payload to a configured URL.",
|
|
418
|
+
icon: "\u2197",
|
|
419
|
+
configSchema: [
|
|
420
|
+
{ type: "text", key: "url", label: "URL", required: true },
|
|
421
|
+
{ type: "json", key: "headers", label: "Headers" },
|
|
422
|
+
{ type: "expression", key: "payload", label: "Payload", required: true, example: "{{ $json }}" }
|
|
423
|
+
]
|
|
424
|
+
},
|
|
425
|
+
// ───────────── Human ─────────────
|
|
426
|
+
{
|
|
427
|
+
name: "human_approval",
|
|
428
|
+
category: "human",
|
|
429
|
+
label: "Human Approval",
|
|
430
|
+
description: "Pause until a human approves or denies.",
|
|
431
|
+
icon: "\u2713",
|
|
432
|
+
inputs: [{ id: "in" }],
|
|
433
|
+
outputs: [{ id: "approved", label: "approved" }, { id: "denied", label: "denied" }],
|
|
434
|
+
configSchema: [
|
|
435
|
+
{ type: "text", key: "title", label: "Approval title", default: "Approve action" },
|
|
436
|
+
{ type: "textarea", key: "description", label: "Description for approver", rows: 3 },
|
|
437
|
+
{ type: "credential", key: "channel", label: "Notify channel", credentialType: "notify_channel" }
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
name: "notify",
|
|
442
|
+
category: "human",
|
|
443
|
+
label: "Notify",
|
|
444
|
+
description: "Send a message via Slack / email / SMS / etc.",
|
|
445
|
+
icon: "\u{1F514}",
|
|
446
|
+
configSchema: [
|
|
447
|
+
{
|
|
448
|
+
type: "select",
|
|
449
|
+
key: "channel",
|
|
450
|
+
label: "Channel",
|
|
451
|
+
default: "slack",
|
|
452
|
+
options: [
|
|
453
|
+
{ value: "slack", label: "Slack" },
|
|
454
|
+
{ value: "email", label: "Email" },
|
|
455
|
+
{ value: "sms", label: "SMS" },
|
|
456
|
+
{ value: "discord", label: "Discord" }
|
|
457
|
+
]
|
|
458
|
+
},
|
|
459
|
+
{ type: "text", key: "to", label: "To", required: true },
|
|
460
|
+
{ type: "expression", key: "message", label: "Message", required: true, example: "{{ $json.summary }}" }
|
|
461
|
+
]
|
|
462
|
+
},
|
|
463
|
+
// ───────────── Output ─────────────
|
|
464
|
+
{
|
|
465
|
+
name: "output",
|
|
466
|
+
category: "output",
|
|
467
|
+
label: "Output",
|
|
468
|
+
description: "Terminal node \u2014 captures the workflow's result.",
|
|
469
|
+
icon: "\u25CF",
|
|
470
|
+
inputs: [{ id: "in" }],
|
|
471
|
+
outputs: []
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
name: "log",
|
|
475
|
+
category: "output",
|
|
476
|
+
label: "Log",
|
|
477
|
+
description: "Send to the run feed.",
|
|
478
|
+
icon: "\u2261",
|
|
479
|
+
inputs: [{ id: "in" }],
|
|
480
|
+
outputs: [],
|
|
481
|
+
configSchema: [
|
|
482
|
+
{
|
|
483
|
+
type: "select",
|
|
484
|
+
key: "level",
|
|
485
|
+
label: "Level",
|
|
486
|
+
default: "info",
|
|
487
|
+
options: [{ value: "info", label: "info" }, { value: "warn", label: "warn" }, { value: "error", label: "error" }]
|
|
488
|
+
},
|
|
489
|
+
{ type: "expression", key: "message", label: "Message", required: true, example: "{{ $json }}" }
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
];
|
|
493
|
+
function registerBuiltinKinds() {
|
|
494
|
+
for (const k of KINDS) registerNodeKind(k);
|
|
495
|
+
}
|
|
496
|
+
var BUILTIN_KINDS = KINDS;
|
|
497
|
+
|
|
498
|
+
// src/registry/index.ts
|
|
499
|
+
function buildNodeTypes() {
|
|
500
|
+
const map = {};
|
|
501
|
+
for (const k of listNodeKinds()) map[k.name] = RegistryNode;
|
|
502
|
+
return map;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export { BUILTIN_KINDS, RegistryNode, buildNodeTypes, registerBuiltinKinds };
|
|
506
|
+
//# sourceMappingURL=chunk-XZEUFVJ2.js.map
|
|
507
|
+
//# sourceMappingURL=chunk-XZEUFVJ2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/registry/RegistryNode.tsx","../src/registry/builtin.ts","../src/registry/index.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,kBAAkB,KAAA,EAA4B;AACrD,EAAA,MAAM,QAAA,GAAY,KAAA,CAAM,IAAA,CAAa,IAAA,IAAQ,KAAA,CAAM,IAAA;AACnD,EAAA,MAAM,IAAA,GAAO,QAAQ,MAAM,WAAA,CAAY,QAAQ,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AAE5D,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0BAAA,EACb,QAAA,EAAA;AAA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AAK,SAAA,EAAW,OAAO,SAAA,EAAW,QAAA,EAAU,IAAA,EAAM,OAAA,EAAS,aAAA;AAAc;AACjG;AAEJ,CAAA;AAGO,SAAS,oBAAA,GAA6B;AAC3C,EAAA,KAAA,MAAW,CAAA,IAAK,KAAA,EAAO,gBAAA,CAAiB,CAAC,CAAA;AAC3C;AAGO,IAAM,aAAA,GAAsC;;;AC3S5C,SAAS,cAAA,GAA4B;AAC1C,EAAA,MAAM,MAAiB,EAAC;AACxB,EAAA,KAAA,MAAW,KAAK,aAAA,EAAc,EAAG,GAAA,CAAI,CAAA,CAAE,IAAI,CAAA,GAAI,YAAA;AAC/C,EAAA,OAAO,GAAA;AACT","file":"chunk-XZEUFVJ2.js","sourcesContent":["import { memo, useMemo } from \"react\";\nimport { Handle, Position, type NodeProps } from \"@xyflow/react\";\nimport type { FlowNode, NodeRunStatus, PortDescriptor } from \"../types\";\nimport { categoryAccent, getNodeKind } from \"./registry\";\n\n/**\n * RegistryNode — generic node renderer that looks up the node's kind in\n * the registry and applies its `accent`/`label`/`icon`/`renderBody`. Used\n * as the xyflow node component for every registered kind.\n */\nfunction RegistryNodeInner(props: NodeProps<FlowNode>) {\n const kindName = (props.data as any).kind ?? props.type;\n const kind = useMemo(() => getNodeKind(kindName), [kindName]);\n\n if (!kind) {\n return (\n <div className=\"ff-node ff-node--unknown\">\n <div className=\"ff-node__header\" style={{ background: \"#71717a\" }}>\n <span className=\"ff-node__tag\">UNKNOWN</span>\n <span className=\"ff-node__label\">{kindName}</span>\n </div>\n <p className=\"ff-node__desc\">No registered kind for \"{kindName}\".</p>\n </div>\n );\n }\n\n const data = props.data;\n const status: NodeRunStatus = data.status ?? \"idle\";\n const accent = kind.accent ?? categoryAccent(kind.category);\n const inputs: PortDescriptor[] = data.inputs ?? kind.inputs ?? defaultInputs(kind.category);\n const outputs: PortDescriptor[] = data.outputs ?? kind.outputs ?? defaultOutputs(kind.category);\n const config = ((data as any).config ?? {}) as Record<string, unknown>;\n const label = data.label ?? kind.label;\n\n return (\n <div\n className={[\n \"ff-node\",\n `ff-node--status-${status}`,\n `ff-node--cat-${kind.category}`,\n props.selected ? \"ff-node--selected\" : \"\",\n ].filter(Boolean).join(\" \")}\n style={{ borderColor: props.selected ? accent : undefined }}\n >\n <header className=\"ff-node__header\" style={{ background: accent }}>\n {kind.icon && <span className=\"ff-node__icon\" aria-hidden>{kind.icon}</span>}\n <span className=\"ff-node__tag\">{kind.label.toUpperCase()}</span>\n <span className=\"ff-node__label\">{label}</span>\n {status !== \"idle\" && <span className={`ff-node__dot ff-node__dot--${status}`} aria-label={`status ${status}`} />}\n </header>\n\n {data.description && <p className=\"ff-node__desc\">{data.description}</p>}\n\n <div className=\"ff-node__body\">\n {kind.renderBody\n ? kind.renderBody({ nodeId: props.id, config: config as any, selected: props.selected ?? false })\n : <DefaultBody config={config} kind={kind.configSchema} />}\n </div>\n\n {data.statusText && <p className=\"ff-node__status-text\">{data.statusText}</p>}\n\n {inputs.map((p, i) => (\n <Handle\n key={p.id}\n type=\"target\"\n position={Position.Left}\n id={p.id}\n style={portStyle(i, inputs.length)}\n title={p.label ?? p.id}\n />\n ))}\n {outputs.map((p, i) => (\n <Handle\n key={p.id}\n type=\"source\"\n position={Position.Right}\n id={p.id}\n style={portStyle(i, outputs.length)}\n title={p.label ?? p.id}\n />\n ))}\n </div>\n );\n}\n\nexport const RegistryNode = memo(RegistryNodeInner);\n\nfunction defaultInputs(category: string): PortDescriptor[] {\n return category === \"trigger\" ? [] : [{ id: \"in\" }];\n}\nfunction defaultOutputs(category: string): PortDescriptor[] {\n return category === \"output\" ? [] : [{ id: \"out\" }];\n}\n\nfunction portStyle(i: number, total: number): React.CSSProperties {\n if (total <= 1) return {};\n const slot = (100 / (total + 1)) * (i + 1);\n return { top: `${slot}%` };\n}\n\n/**\n * DefaultBody — compact summary of the config values for nodes that\n * don't provide a custom renderBody. Skips fields that look empty.\n */\nfunction DefaultBody({ config, kind }: { config: Record<string, unknown>; kind?: import(\"./types\").ConfigField[] }) {\n const fields = kind ?? [];\n const visible = fields\n .map((f) => ({ field: f, value: config[f.key] }))\n .filter(({ value }) => value !== undefined && value !== \"\" && value !== null);\n if (visible.length === 0) {\n return <div className=\"ff-node__body-empty\">— configure in the panel</div>;\n }\n return (\n <ul className=\"ff-node__summary\">\n {visible.slice(0, 4).map(({ field, value }) => (\n <li key={field.key}>\n <span className=\"ff-node__summary-key\">{field.label}:</span>\n <span className=\"ff-node__summary-value\">{previewValue(value)}</span>\n </li>\n ))}\n {visible.length > 4 && <li className=\"ff-node__summary-more\">+ {visible.length - 4} more</li>}\n </ul>\n );\n}\n\nfunction previewValue(v: unknown): string {\n if (typeof v === \"string\") return v.length > 30 ? v.slice(0, 27) + \"…\" : v;\n if (typeof v === \"number\" || typeof v === \"boolean\") return String(v);\n try {\n const j = JSON.stringify(v);\n return j.length > 30 ? j.slice(0, 27) + \"…\" : j;\n } catch {\n return \"[object]\";\n }\n}\n","import { registerNodeKind } from \"./registry\";\nimport type { ConfigField, NodeKindDefinition } from \"./types\";\n\n/**\n * Built-in agentic node kit. Every kind ships with schema + UI but\n * NO executor — host apps wire executors per kind so they control where\n * memory, data, network, and AI calls actually go.\n */\n\nconst HTTP_METHODS: ConfigField[] = [\n { type: \"select\", key: \"method\", label: \"Method\", options: [\n { value: \"GET\", label: \"GET\" },\n { value: \"POST\", label: \"POST\" },\n { value: \"PUT\", label: \"PUT\" },\n { value: \"PATCH\", label: \"PATCH\" },\n { value: \"DELETE\", label: \"DELETE\" },\n ], default: \"GET\", required: true },\n];\n\nconst KINDS: NodeKindDefinition[] = [\n // ───────────── Triggers ─────────────\n {\n name: \"manual_trigger\",\n category: \"trigger\",\n label: \"Manual\",\n description: \"Entry point fired when the user clicks Run.\",\n icon: \"⚡\",\n inputs: [],\n outputs: [{ id: \"out\" }],\n },\n {\n name: \"webhook_trigger\",\n category: \"trigger\",\n label: \"Webhook\",\n description: \"Triggered by an inbound HTTP request to a host-provided URL.\",\n icon: \"📡\",\n inputs: [],\n outputs: [{ id: \"out\", label: \"payload\" }],\n configSchema: [\n { type: \"text\", key: \"path\", label: \"Path\", placeholder: \"/hooks/my-flow\", required: true },\n { type: \"select\", key: \"method\", label: \"Method\", options: [\n { value: \"POST\", label: \"POST\" }, { value: \"GET\", label: \"GET\" },\n ], default: \"POST\" },\n { type: \"credential\", key: \"secret\", label: \"Verifying secret\", credentialType: \"webhook_secret\" },\n ],\n },\n {\n name: \"schedule_trigger\",\n category: \"trigger\",\n label: \"Schedule\",\n description: \"Fires on a cron schedule (host-implemented).\",\n icon: \"⏱\",\n inputs: [],\n outputs: [{ id: \"out\" }],\n configSchema: [\n { type: \"text\", key: \"cron\", label: \"Cron\", placeholder: \"*/5 * * * *\", required: true,\n description: \"Standard 5-field cron expression.\" },\n { type: \"text\", key: \"timezone\", label: \"Timezone\", placeholder: \"UTC\", default: \"UTC\" },\n ],\n },\n {\n name: \"user_input\",\n category: \"human\",\n label: \"User Input\",\n description: \"Pause the flow until the user submits the configured form.\",\n icon: \"✎\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"out\", label: \"values\" }],\n configSchema: [\n { type: \"text\", key: \"title\", label: \"Form title\", default: \"Need your input\" },\n { type: \"json\", key: \"fields\", label: \"Fields (JSON)\", language: \"json\", rows: 6,\n default: [{ key: \"answer\", label: \"Your answer\", type: \"textarea\" }] },\n ],\n },\n\n // ───────────── Logic ─────────────\n {\n name: \"branch\",\n category: \"logic\",\n label: \"Branch\",\n description: \"Multi-way branch on a condition or value.\",\n icon: \"◇\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"true\", label: \"true\" }, { id: \"false\", label: \"false\" }],\n configSchema: [\n { type: \"expression\", key: \"condition\", label: \"Condition\", example: \"{{ $json.active }}\", required: true },\n ],\n },\n {\n name: \"switch_case\",\n category: \"logic\",\n label: \"Switch\",\n description: \"Route to one of N labelled outputs based on a key.\",\n icon: \"⤳\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"case_a\", label: \"a\" }, { id: \"case_b\", label: \"b\" }, { id: \"default\", label: \"default\" }],\n configSchema: [\n { type: \"expression\", key: \"value\", label: \"Switch on\", example: \"{{ $json.kind }}\", required: true },\n { type: \"json\", key: \"cases\", label: \"Cases (JSON)\", default: { a: \"case_a\", b: \"case_b\" } },\n ],\n },\n {\n name: \"for_each\",\n category: \"logic\",\n label: \"For Each\",\n description: \"Iterate over a list, emitting each item on `item`.\",\n icon: \"↻\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"item\", label: \"item\" }, { id: \"done\", label: \"done\" }],\n configSchema: [\n { type: \"expression\", key: \"source\", label: \"List\", example: \"{{ $json.users }}\", required: true },\n { type: \"number\", key: \"concurrency\", label: \"Concurrency\", default: 1, min: 1, max: 50 },\n ],\n },\n {\n name: \"merge\",\n category: \"logic\",\n label: \"Merge\",\n description: \"Combine multiple inputs into one object or array.\",\n icon: \"⊕\",\n inputs: [{ id: \"a\" }, { id: \"b\" }],\n outputs: [{ id: \"out\" }],\n configSchema: [\n { type: \"select\", key: \"mode\", label: \"Mode\", default: \"merge\",\n options: [{ value: \"merge\", label: \"Object merge\" }, { value: \"concat\", label: \"Array concat\" }] },\n ],\n },\n {\n name: \"wait\",\n category: \"logic\",\n label: \"Wait\",\n description: \"Sleep or wait for an external event.\",\n icon: \"⏸\",\n configSchema: [\n { type: \"select\", key: \"mode\", label: \"Mode\", default: \"duration\",\n options: [{ value: \"duration\", label: \"Duration\" }, { value: \"until\", label: \"Until timestamp\" }, { value: \"event\", label: \"External event\" }] },\n { type: \"text\", key: \"duration\", label: \"Duration\", placeholder: \"5s, 10m, 1h\", description: \"Used when mode = duration.\" },\n ],\n },\n {\n name: \"transform\",\n category: \"logic\",\n label: \"Transform\",\n description: \"Reshape data with an expression.\",\n icon: \"ƒ\",\n configSchema: [\n { type: \"expression\", key: \"expression\", label: \"Expression\",\n example: \"{{ { id: $json.id, name: $json.first + ' ' + $json.last } }}\", required: true },\n ],\n },\n\n // ───────────── Data ─────────────\n {\n name: \"memory_store\",\n category: \"data\",\n label: \"Memory Store\",\n description: \"Read or write per-conversation memory.\",\n icon: \"🧠\",\n configSchema: [\n { type: \"select\", key: \"operation\", label: \"Operation\", required: true, default: \"read\",\n options: [{ value: \"read\", label: \"Read\" }, { value: \"write\", label: \"Write\" }, { value: \"append\", label: \"Append\" }] },\n { type: \"text\", key: \"key\", label: \"Key\", placeholder: \"user.preferences\", required: true },\n { type: \"expression\", key: \"value\", label: \"Value (write/append only)\", example: \"{{ $json }}\" },\n { type: \"credential\", key: \"store\", label: \"Memory store\", credentialType: \"memory_store\" },\n ],\n },\n {\n name: \"data_store\",\n category: \"data\",\n label: \"Data Store\",\n description: \"Key-value or table read/write against a host store.\",\n icon: \"🗃\",\n configSchema: [\n { type: \"select\", key: \"operation\", label: \"Operation\", required: true, default: \"get\",\n options: [\n { value: \"get\", label: \"Get\" }, { value: \"set\", label: \"Set\" }, { value: \"delete\", label: \"Delete\" },\n { value: \"query\", label: \"Query\" }, { value: \"list\", label: \"List\" },\n ] },\n { type: \"text\", key: \"table\", label: \"Table / collection\", required: true },\n { type: \"text\", key: \"key\", label: \"Key\" },\n { type: \"json\", key: \"where\", label: \"Where (JSON)\", description: \"For query/list operations.\" },\n { type: \"expression\", key: \"value\", label: \"Value (set only)\", example: \"{{ $json }}\" },\n { type: \"credential\", key: \"store\", label: \"Data store\", credentialType: \"data_store\" },\n ],\n },\n {\n name: \"variable\",\n category: \"data\",\n label: \"Variable\",\n description: \"Workflow-scoped value used by other nodes.\",\n icon: \"𝓍\",\n configSchema: [\n { type: \"text\", key: \"name\", label: \"Name\", required: true },\n { type: \"expression\", key: \"value\", label: \"Value\", required: true },\n ],\n },\n\n // ───────────── AI ─────────────\n {\n name: \"llm_call\",\n category: \"ai\",\n label: \"LLM Call\",\n description: \"Send a prompt + context to a model and receive a response.\",\n icon: \"✦\",\n configSchema: [\n { type: \"select\", key: \"provider\", label: \"Provider\", default: \"anthropic\",\n options: [\n { value: \"anthropic\", label: \"Anthropic\" },\n { value: \"openai\", label: \"OpenAI\" },\n { value: \"custom\", label: \"Custom\" },\n ] },\n { type: \"text\", key: \"model\", label: \"Model\", placeholder: \"claude-sonnet-4-5\", required: true },\n { type: \"textarea\", key: \"system\", label: \"System prompt\", rows: 4 },\n { type: \"expression\", key: \"prompt\", label: \"User prompt\", example: \"{{ $json.question }}\", required: true },\n { type: \"number\", key: \"temperature\", label: \"Temperature\", min: 0, max: 2, step: 0.1, default: 0.7 },\n { type: \"number\", key: \"max_tokens\", label: \"Max tokens\", min: 1, max: 8192, default: 1024 },\n { type: \"json\", key: \"tools\", label: \"Tools (JSON)\", description: \"Optional Anthropic-style tool definitions.\" },\n { type: \"credential\", key: \"credential\", label: \"API credential\", credentialType: \"llm_credential\" },\n ],\n },\n {\n name: \"tool_use\",\n category: \"ai\",\n label: \"Tool Use\",\n description: \"Hand control to a host-registered tool by name.\",\n icon: \"🛠\",\n configSchema: [\n { type: \"text\", key: \"tool\", label: \"Tool name\", placeholder: \"search_index\", required: true },\n { type: \"expression\", key: \"args\", label: \"Arguments\", example: \"{{ { query: $json.q } }}\" },\n ],\n },\n {\n name: \"embed_search\",\n category: \"ai\",\n label: \"Embed & Search\",\n description: \"Embed a query and search a vector store.\",\n icon: \"✺\",\n configSchema: [\n { type: \"expression\", key: \"query\", label: \"Query\", required: true, example: \"{{ $json.question }}\" },\n { type: \"number\", key: \"topK\", label: \"Top K\", default: 5, min: 1, max: 50 },\n { type: \"credential\", key: \"vectorStore\", label: \"Vector store\", credentialType: \"vector_store\" },\n ],\n },\n\n // ───────────── IO ─────────────\n {\n name: \"api_request\",\n category: \"io\",\n label: \"API Request\",\n description: \"HTTP request to any URL.\",\n icon: \"↔\",\n configSchema: [\n ...HTTP_METHODS,\n { type: \"text\", key: \"url\", label: \"URL\", placeholder: \"https://api.example.com/...\", required: true },\n { type: \"json\", key: \"headers\", label: \"Headers\", default: { \"content-type\": \"application/json\" } },\n { type: \"json\", key: \"body\", label: \"Body\" },\n { type: \"credential\", key: \"auth\", label: \"Auth\", credentialType: \"api_credential\" },\n ],\n },\n {\n name: \"webhook_out\",\n category: \"io\",\n label: \"Send Webhook\",\n description: \"POST a payload to a configured URL.\",\n icon: \"↗\",\n configSchema: [\n { type: \"text\", key: \"url\", label: \"URL\", required: true },\n { type: \"json\", key: \"headers\", label: \"Headers\" },\n { type: \"expression\", key: \"payload\", label: \"Payload\", required: true, example: \"{{ $json }}\" },\n ],\n },\n\n // ───────────── Human ─────────────\n {\n name: \"human_approval\",\n category: \"human\",\n label: \"Human Approval\",\n description: \"Pause until a human approves or denies.\",\n icon: \"✓\",\n inputs: [{ id: \"in\" }],\n outputs: [{ id: \"approved\", label: \"approved\" }, { id: \"denied\", label: \"denied\" }],\n configSchema: [\n { type: \"text\", key: \"title\", label: \"Approval title\", default: \"Approve action\" },\n { type: \"textarea\", key: \"description\", label: \"Description for approver\", rows: 3 },\n { type: \"credential\", key: \"channel\", label: \"Notify channel\", credentialType: \"notify_channel\" },\n ],\n },\n {\n name: \"notify\",\n category: \"human\",\n label: \"Notify\",\n description: \"Send a message via Slack / email / SMS / etc.\",\n icon: \"🔔\",\n configSchema: [\n { type: \"select\", key: \"channel\", label: \"Channel\", default: \"slack\",\n options: [\n { value: \"slack\", label: \"Slack\" }, { value: \"email\", label: \"Email\" },\n { value: \"sms\", label: \"SMS\" }, { value: \"discord\", label: \"Discord\" },\n ] },\n { type: \"text\", key: \"to\", label: \"To\", required: true },\n { type: \"expression\", key: \"message\", label: \"Message\", required: true, example: \"{{ $json.summary }}\" },\n ],\n },\n\n // ───────────── Output ─────────────\n {\n name: \"output\",\n category: \"output\",\n label: \"Output\",\n description: \"Terminal node — captures the workflow's result.\",\n icon: \"●\",\n inputs: [{ id: \"in\" }],\n outputs: [],\n },\n {\n name: \"log\",\n category: \"output\",\n label: \"Log\",\n description: \"Send to the run feed.\",\n icon: \"≡\",\n inputs: [{ id: \"in\" }],\n outputs: [],\n configSchema: [\n { type: \"select\", key: \"level\", label: \"Level\", default: \"info\",\n options: [{ value: \"info\", label: \"info\" }, { value: \"warn\", label: \"warn\" }, { value: \"error\", label: \"error\" }] },\n { type: \"expression\", key: \"message\", label: \"Message\", required: true, example: \"{{ $json }}\" },\n ],\n },\n];\n\n/** Register every built-in kind. Idempotent via the registry. */\nexport function registerBuiltinKinds(): void {\n for (const k of KINDS) registerNodeKind(k);\n}\n\n/** Exported list for hosts that want to selectively re-register. */\nexport const BUILTIN_KINDS: NodeKindDefinition[] = KINDS;\n","export type {\n ConfigField,\n TextConfigField,\n TextareaConfigField,\n NumberConfigField,\n SelectConfigField,\n SwitchConfigField,\n JsonConfigField,\n ExpressionConfigField,\n CredentialConfigField,\n NodeCategory,\n NodeKindDefinition,\n RenderBodyContext,\n} from \"./types\";\n\nexport {\n registerNodeKind,\n getNodeKind,\n listNodeKinds,\n onNodeKindsChanged,\n defaultConfigFor,\n validateConfig,\n categoryAccent,\n} from \"./registry\";\n\nexport { RegistryNode } from \"./RegistryNode\";\nexport { registerBuiltinKinds, BUILTIN_KINDS } from \"./builtin\";\n\nimport type { NodeTypes } from \"@xyflow/react\";\nimport { RegistryNode } from \"./RegistryNode\";\nimport { listNodeKinds } from \"./registry\";\n\n/**\n * Build an xyflow `nodeTypes` map from the registry — every registered\n * kind gets `RegistryNode` as its renderer. Refresh manually via\n * `useNodeTypes()` (a hook that subscribes to registry changes).\n */\nexport function buildNodeTypes(): NodeTypes {\n const map: NodeTypes = {};\n for (const k of listNodeKinds()) map[k.name] = RegistryNode;\n return map;\n}\n"]}
|