@d34dman/flowdrop 0.0.58 → 0.0.59
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 +5 -4
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schemas/v1/workflow.schema.json +1078 -0
- package/package.json +232 -231
- package/schemas/v1/workflow.schema.json +0 -952
|
@@ -0,0 +1,1078 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://flowdrop.io/schemas/v1/workflow.schema.json",
|
|
4
|
+
"title": "FlowDrop Workflow",
|
|
5
|
+
"description": "Schema for a FlowDrop workflow document. Validates the structure of workflows created by the FlowDrop visual workflow editor.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"format": "uuid",
|
|
11
|
+
"description": "Workflow UUID"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Workflow name",
|
|
16
|
+
"maxLength": 200
|
|
17
|
+
},
|
|
18
|
+
"description": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Workflow description",
|
|
21
|
+
"maxLength": 1000
|
|
22
|
+
},
|
|
23
|
+
"nodes": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"$ref": "#/$defs/WorkflowNode"
|
|
27
|
+
},
|
|
28
|
+
"description": "Workflow nodes"
|
|
29
|
+
},
|
|
30
|
+
"edges": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"$ref": "#/$defs/WorkflowEdge"
|
|
34
|
+
},
|
|
35
|
+
"description": "Workflow edges"
|
|
36
|
+
},
|
|
37
|
+
"metadata": {
|
|
38
|
+
"$ref": "#/$defs/WorkflowMetadata"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": [
|
|
42
|
+
"id",
|
|
43
|
+
"name",
|
|
44
|
+
"nodes",
|
|
45
|
+
"edges",
|
|
46
|
+
"metadata"
|
|
47
|
+
],
|
|
48
|
+
"$defs": {
|
|
49
|
+
"AutocompleteConfig": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"description": "Configuration for autocomplete fields that fetch suggestions from a callback URL.\nUsed when format is \"autocomplete\".\n",
|
|
52
|
+
"properties": {
|
|
53
|
+
"url": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "The callback URL to fetch autocomplete suggestions from.\nCan be relative (resolved against API base URL) or absolute.\n"
|
|
56
|
+
},
|
|
57
|
+
"queryParam": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"default": "q",
|
|
60
|
+
"description": "Query parameter name to pass the search term"
|
|
61
|
+
},
|
|
62
|
+
"minChars": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"default": 0,
|
|
65
|
+
"description": "Minimum number of characters before fetching suggestions.\nSet to 0 to fetch immediately on focus (when fetchOnFocus is true).\n"
|
|
66
|
+
},
|
|
67
|
+
"debounceMs": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"default": 300,
|
|
70
|
+
"description": "Debounce delay in milliseconds before fetching suggestions"
|
|
71
|
+
},
|
|
72
|
+
"fetchOnFocus": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": false,
|
|
75
|
+
"description": "Whether to fetch all options when the field is focused"
|
|
76
|
+
},
|
|
77
|
+
"labelField": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"default": "label",
|
|
80
|
+
"description": "The field name in the response objects to use as the display label"
|
|
81
|
+
},
|
|
82
|
+
"valueField": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"default": "value",
|
|
85
|
+
"description": "The field name in the response objects to use as the stored value"
|
|
86
|
+
},
|
|
87
|
+
"allowFreeText": {
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"default": false,
|
|
90
|
+
"description": "Whether to allow values that are not in the suggestions list.\nWhen true, users can enter and submit any text.\n"
|
|
91
|
+
},
|
|
92
|
+
"multiple": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"default": false,
|
|
95
|
+
"description": "Whether to allow multiple selections.\nWhen true, users can select multiple values displayed as tags.\n"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"required": [
|
|
99
|
+
"url"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"Branch": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"description": "Branch configuration for gateway nodes.\nBranches define conditional output paths in gateway/switch nodes.\nEach branch creates an output handle that can be connected to downstream nodes.\n\nBranches are stored in `config.branches` array and support dynamic addition/removal\nthrough the node configuration panel.\n",
|
|
105
|
+
"properties": {
|
|
106
|
+
"name": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "Unique identifier for the branch (used as handle ID)"
|
|
109
|
+
},
|
|
110
|
+
"label": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Display label shown in the UI"
|
|
113
|
+
},
|
|
114
|
+
"description": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "Description of when this branch is activated"
|
|
117
|
+
},
|
|
118
|
+
"condition": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Optional condition expression for this branch"
|
|
121
|
+
},
|
|
122
|
+
"isDefault": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"default": false,
|
|
125
|
+
"description": "Whether this is the default/fallback branch"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"name",
|
|
130
|
+
"label"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"ConfigProperty": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"description": "JSON Schema property definition for node configuration.\nFollows JSON Schema draft-07 specification with FlowDrop extensions for UI rendering.\n\nFor select/dropdown fields, use standard JSON Schema patterns:\n- `enum` for simple value lists (no labels)\n- `oneOf` with `const`/`title` for labeled options\n",
|
|
136
|
+
"properties": {
|
|
137
|
+
"type": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"enum": [
|
|
140
|
+
"string",
|
|
141
|
+
"number",
|
|
142
|
+
"boolean",
|
|
143
|
+
"array",
|
|
144
|
+
"object",
|
|
145
|
+
"integer"
|
|
146
|
+
],
|
|
147
|
+
"description": "JSON Schema type"
|
|
148
|
+
},
|
|
149
|
+
"title": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Display title for the property"
|
|
152
|
+
},
|
|
153
|
+
"description": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "Property description"
|
|
156
|
+
},
|
|
157
|
+
"default": {
|
|
158
|
+
"description": "Default value for the property"
|
|
159
|
+
},
|
|
160
|
+
"enum": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": {},
|
|
163
|
+
"description": "Allowed values for enum properties (simple values without labels).\nFor labeled options, use `oneOf` with `const`/`title` instead.\n"
|
|
164
|
+
},
|
|
165
|
+
"oneOf": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"$ref": "#/$defs/OneOfItem"
|
|
169
|
+
},
|
|
170
|
+
"description": "JSON Schema oneOf for labeled options (standard approach).\nEach item should have `const` (value) and optionally `title` (label).\n\nExample:\n```json\n\"oneOf\": [\n { \"const\": \"draft\", \"title\": \"Draft\" },\n { \"const\": \"published\", \"title\": \"Published\" }\n]\n```\n"
|
|
171
|
+
},
|
|
172
|
+
"multiple": {
|
|
173
|
+
"type": "boolean",
|
|
174
|
+
"description": "For enum/oneOf fields, allows multiple selection (renders as checkbox group)"
|
|
175
|
+
},
|
|
176
|
+
"minimum": {
|
|
177
|
+
"type": "number",
|
|
178
|
+
"description": "Minimum value for numeric properties"
|
|
179
|
+
},
|
|
180
|
+
"maximum": {
|
|
181
|
+
"type": "number",
|
|
182
|
+
"description": "Maximum value for numeric properties"
|
|
183
|
+
},
|
|
184
|
+
"step": {
|
|
185
|
+
"type": "number",
|
|
186
|
+
"description": "Step increment for number/range inputs"
|
|
187
|
+
},
|
|
188
|
+
"minLength": {
|
|
189
|
+
"type": "integer",
|
|
190
|
+
"description": "Minimum length for string properties"
|
|
191
|
+
},
|
|
192
|
+
"maxLength": {
|
|
193
|
+
"type": "integer",
|
|
194
|
+
"description": "Maximum length for string properties"
|
|
195
|
+
},
|
|
196
|
+
"pattern": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"description": "Regex pattern for string validation"
|
|
199
|
+
},
|
|
200
|
+
"placeholder": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "Placeholder text for input fields"
|
|
203
|
+
},
|
|
204
|
+
"format": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "Special format hints for UI rendering:\n\n- `multiline`: Renders as textarea\n- `hidden`: Field is hidden from UI but included in form submission\n- `range`: Renders as range slider for numeric values\n- `json`: Renders as CodeMirror JSON editor\n- `code`: Alias for json, renders as CodeMirror editor\n- `markdown`: Renders as SimpleMDE Markdown editor\n- `template`: Template editor with variable autocomplete (see below)\n- `autocomplete`: Text input with callback URL suggestions\n- `email`, `uri`, `date`, `date-time`: Standard JSON Schema formats\n\n## Template Format Details\n\nThe `template` format renders a CodeMirror editor with:\n\n**Syntax highlighting** for Twig/Liquid-style `{{ variable }}` placeholders\n\n**Inline autocomplete** triggered by:\n- Typing `{{` - Shows available variables\n- Typing `.` after an object - Shows nested properties\n- Typing `[` after an array - Shows index suggestions\n\n**Variable patterns supported:**\n- `{{ user }}` - Simple variable\n- `{{ user.name }}` - Nested property access\n- `{{ user.address.city }}` - Deep nesting\n- `{{ items[0] }}` - Array index access\n- `{{ orders[0].product.name }}` - Combined patterns\n\n**Autocomplete source:**\nVariables are derived from connected upstream nodes that have output\nschemas defined. Use the `variables` property to configure which\ninput ports provide variables.\n",
|
|
207
|
+
"enum": [
|
|
208
|
+
"multiline",
|
|
209
|
+
"hidden",
|
|
210
|
+
"range",
|
|
211
|
+
"json",
|
|
212
|
+
"code",
|
|
213
|
+
"markdown",
|
|
214
|
+
"template",
|
|
215
|
+
"autocomplete",
|
|
216
|
+
"email",
|
|
217
|
+
"uri",
|
|
218
|
+
"date",
|
|
219
|
+
"date-time"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"variables": {
|
|
223
|
+
"allOf": [
|
|
224
|
+
{
|
|
225
|
+
"$ref": "#/$defs/TemplateVariablesConfig"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"description": "Configuration for template variable autocomplete.\nOnly applicable when `format: \"template\"`.\nSee TemplateVariablesConfig for full documentation.\n"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
"x-display-order": {
|
|
233
|
+
"type": "integer",
|
|
234
|
+
"description": "Controls the display order of fields in the configuration form.\nFields are sorted by this value in ascending order (lower values appear first).\n\nUse negative values to ensure fields appear at the top:\n- `-2` for `instanceTitle` (appears first)\n- `-1` for `instanceDescription` (appears second)\n- `0` or positive values for regular fields\n\nFields without `x-display-order` are sorted after fields with explicit ordering.\n"
|
|
235
|
+
},
|
|
236
|
+
"items": {
|
|
237
|
+
"allOf": [
|
|
238
|
+
{
|
|
239
|
+
"$ref": "#/$defs/ConfigProperty"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"description": "Schema for array items"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
"minItems": {
|
|
247
|
+
"type": "integer",
|
|
248
|
+
"description": "Minimum number of items for array fields"
|
|
249
|
+
},
|
|
250
|
+
"maxItems": {
|
|
251
|
+
"type": "integer",
|
|
252
|
+
"description": "Maximum number of items for array fields"
|
|
253
|
+
},
|
|
254
|
+
"properties": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"additionalProperties": {
|
|
257
|
+
"$ref": "#/$defs/ConfigProperty"
|
|
258
|
+
},
|
|
259
|
+
"description": "Property schemas for object fields"
|
|
260
|
+
},
|
|
261
|
+
"autocomplete": {
|
|
262
|
+
"allOf": [
|
|
263
|
+
{
|
|
264
|
+
"$ref": "#/$defs/AutocompleteConfig"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"description": "Configuration for autocomplete fields (when format is \"autocomplete\")"
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": [
|
|
273
|
+
"type"
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
"ConfigSchema": {
|
|
277
|
+
"type": "object",
|
|
278
|
+
"properties": {
|
|
279
|
+
"type": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"enum": [
|
|
282
|
+
"object"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"properties": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"additionalProperties": {
|
|
288
|
+
"$ref": "#/$defs/ConfigProperty"
|
|
289
|
+
},
|
|
290
|
+
"description": "Configuration properties"
|
|
291
|
+
},
|
|
292
|
+
"required": {
|
|
293
|
+
"type": "array",
|
|
294
|
+
"items": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
},
|
|
297
|
+
"description": "Required property names"
|
|
298
|
+
},
|
|
299
|
+
"additionalProperties": {
|
|
300
|
+
"type": "boolean",
|
|
301
|
+
"default": false
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"required": [
|
|
305
|
+
"type",
|
|
306
|
+
"properties"
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
"DynamicPort": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"description": "Dynamic port configuration for user-defined inputs/outputs.\nThese are defined in the node's config and allow users to create\ncustom input/output handles at runtime, similar to gateway branches.\n\nDynamic ports are stored in `config.dynamicInputs` and `config.dynamicOutputs`\narrays and are rendered alongside static ports defined in the node metadata.\n",
|
|
312
|
+
"properties": {
|
|
313
|
+
"name": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"description": "Unique identifier for the port (used for handle IDs and connections)"
|
|
316
|
+
},
|
|
317
|
+
"label": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"description": "Display label shown in the UI"
|
|
320
|
+
},
|
|
321
|
+
"description": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"description": "Description of what this port accepts/provides"
|
|
324
|
+
},
|
|
325
|
+
"dataType": {
|
|
326
|
+
"allOf": [
|
|
327
|
+
{
|
|
328
|
+
"$ref": "#/$defs/NodeDataType"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"description": "Data type for the port (affects color and connection validation)"
|
|
332
|
+
}
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
"required": {
|
|
336
|
+
"type": "boolean",
|
|
337
|
+
"default": false,
|
|
338
|
+
"description": "Whether this port is required for execution"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"required": [
|
|
342
|
+
"name",
|
|
343
|
+
"label",
|
|
344
|
+
"dataType"
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"NodeCategory": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "Node category for organizing nodes in the sidebar.\n\nAny string value is accepted, allowing custom categories.\nCustom categories can be defined via the `/categories` endpoint\nwith display labels, icons, and colors.\n\nBuilt-in categories with dedicated icons and colors:\ntriggers, inputs, outputs, prompts, models, processing,\nlogic, data, tools, helpers, vector stores, embeddings,\nmemories, agents, ai, interrupts, bundles\n"
|
|
350
|
+
},
|
|
351
|
+
"NodeConfig": {
|
|
352
|
+
"type": "object",
|
|
353
|
+
"description": "Node configuration values containing all user-configured settings for a node instance.\n\nThis object stores configuration based on the node type's `configSchema` and is used by\nthe backend to:\n- **Store and retrieve** node configuration persistently\n- **Pass values** to node processors during workflow execution\n- **Persist state** across sessions\n\n## Standard Properties\n\nAny property defined in the node's `configSchema` (e.g., model, temperature, apiKey).\nThe schema defines the type, validation rules, and default values for each property.\n\n## Reserved Property Names\n\nThese property names have special meaning and trigger automatic behaviors in FlowDrop:\n\n### Instance Display Overrides\n\n- **`instanceTitle`**: Per-instance title override (replaces the default `label` display)\n- **`instanceDescription`**: Per-instance description override (replaces `metadata.description` display)\n- **`instanceBadge`**: Per-instance badge label override (replaces the default `metadata.badge` or \"TOOL\" badge)\n\n### Visual Type Selection\n\n- **`nodeType`**: Changes the visual rendering type of the node (e.g., \"default\", \"simple\", \"square\")\n\n### Dynamic Ports\n\n- **`dynamicInputs`**: Array of DynamicPort for user-defined input handles\n- **`dynamicOutputs`**: Array of DynamicPort for user-defined output handles\n- **`branches`**: Array of Branch for gateway node conditional output paths\n\nThese dynamic configuration values generate additional handles on the node\nthat can be connected to other nodes in the workflow.\n",
|
|
354
|
+
"properties": {
|
|
355
|
+
"instanceTitle": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "Per-instance title override that replaces the default node label.\nUseful when you have multiple instances of the same node type and want\nto give each a meaningful name (e.g., \"Email Summarizer\" instead of \"LLM Processor\").\n\nFallback behavior:\n- If `instanceTitle` is set → displays `instanceTitle`\n- If not set → displays `label` (from node data)\n"
|
|
358
|
+
},
|
|
359
|
+
"instanceDescription": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"description": "Per-instance description override that replaces the default `metadata.description`.\nUseful for documenting what a specific node instance does within your workflow.\n\nFallback behavior:\n- If `instanceDescription` is set → displays `instanceDescription`\n- If not set → displays `metadata.description` (from node type definition)\n"
|
|
362
|
+
},
|
|
363
|
+
"instanceBadge": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"description": "Per-instance badge label override for tool nodes.\nReplaces the default badge text shown in the node header.\n\nFallback behavior:\n- If `instanceBadge` is set → displays `instanceBadge`\n- If not set → displays `metadata.badge` (from node type definition)\n- If neither set → displays \"TOOL\"\n"
|
|
366
|
+
},
|
|
367
|
+
"nodeType": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"description": "Changes how the node is visually rendered. This allows a single node definition\nto support multiple visual representations.\n\nAvailable built-in types:\n- `default`: Standard workflow node with full details\n- `simple`: Compact layout with minimal chrome\n- `square`: Geometric square layout (icon-only)\n- `tool`: Specialized style for agent tools\n- `gateway`: Branching control flow visualization\n- `terminal`: Start/end/exit node styling\n- `note`: Sticky note style for annotations\n\nThe node's `metadata.supportedTypes` defines which types are allowed.\nIf invalid or missing, falls back to `metadata.type` or \"default\".\n",
|
|
370
|
+
"enum": [
|
|
371
|
+
"default",
|
|
372
|
+
"simple",
|
|
373
|
+
"square",
|
|
374
|
+
"tool",
|
|
375
|
+
"gateway",
|
|
376
|
+
"terminal",
|
|
377
|
+
"note"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
"dynamicInputs": {
|
|
381
|
+
"type": "array",
|
|
382
|
+
"items": {
|
|
383
|
+
"$ref": "#/$defs/DynamicPort"
|
|
384
|
+
},
|
|
385
|
+
"description": "User-defined dynamic input ports that appear as additional input handles"
|
|
386
|
+
},
|
|
387
|
+
"dynamicOutputs": {
|
|
388
|
+
"type": "array",
|
|
389
|
+
"items": {
|
|
390
|
+
"$ref": "#/$defs/DynamicPort"
|
|
391
|
+
},
|
|
392
|
+
"description": "User-defined dynamic output ports that appear as additional output handles"
|
|
393
|
+
},
|
|
394
|
+
"branches": {
|
|
395
|
+
"type": "array",
|
|
396
|
+
"items": {
|
|
397
|
+
"$ref": "#/$defs/Branch"
|
|
398
|
+
},
|
|
399
|
+
"description": "Gateway node branches that define conditional output paths"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"additionalProperties": true
|
|
403
|
+
},
|
|
404
|
+
"NodeDataType": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"description": "Data type for node ports. The available data types are configured\ndynamically through the port configuration system.\n"
|
|
407
|
+
},
|
|
408
|
+
"NodeExecutionInfo": {
|
|
409
|
+
"type": "object",
|
|
410
|
+
"properties": {
|
|
411
|
+
"status": {
|
|
412
|
+
"$ref": "#/$defs/NodeExecutionStatus"
|
|
413
|
+
},
|
|
414
|
+
"executionCount": {
|
|
415
|
+
"type": "integer",
|
|
416
|
+
"description": "Total number of times this node has been executed"
|
|
417
|
+
},
|
|
418
|
+
"lastExecuted": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"format": "date-time",
|
|
421
|
+
"description": "Last execution timestamp"
|
|
422
|
+
},
|
|
423
|
+
"lastExecutionDuration": {
|
|
424
|
+
"type": "integer",
|
|
425
|
+
"description": "Last execution duration in milliseconds"
|
|
426
|
+
},
|
|
427
|
+
"lastError": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"description": "Last error message if execution failed"
|
|
430
|
+
},
|
|
431
|
+
"isExecuting": {
|
|
432
|
+
"type": "boolean",
|
|
433
|
+
"description": "Whether the node is currently being executed"
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"required": [
|
|
437
|
+
"status",
|
|
438
|
+
"executionCount",
|
|
439
|
+
"isExecuting"
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
"NodeExecutionStatus": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"enum": [
|
|
445
|
+
"idle",
|
|
446
|
+
"pending",
|
|
447
|
+
"running",
|
|
448
|
+
"completed",
|
|
449
|
+
"failed",
|
|
450
|
+
"cancelled",
|
|
451
|
+
"skipped"
|
|
452
|
+
],
|
|
453
|
+
"description": "Current execution status of a node"
|
|
454
|
+
},
|
|
455
|
+
"NodeExtensions": {
|
|
456
|
+
"type": "object",
|
|
457
|
+
"description": "Custom extension properties for 3rd party integrations.\nAllows storing additional configuration and UI state data.\n\nUse namespaced keys (e.g., \"myapp:analytics\", \"acme:settings\") to avoid conflicts\nbetween different integrations.\n\n## Reserved Extension Keys\n\n- `agentspec:component_type` — Stores the Oracle Open Agent Spec component type\n (e.g., \"llm_node\", \"branching_node\") for nodes imported from Agent Spec.\n Used for round-trip preservation during import/export.\n",
|
|
458
|
+
"properties": {
|
|
459
|
+
"ui": {
|
|
460
|
+
"$ref": "#/$defs/NodeUIExtensions"
|
|
461
|
+
},
|
|
462
|
+
"agentspec:component_type": {
|
|
463
|
+
"type": "string",
|
|
464
|
+
"description": "Agent Spec component type for round-trip preservation.\nSet automatically when importing from Agent Spec format.\n"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"additionalProperties": true
|
|
468
|
+
},
|
|
469
|
+
"NodeMetadata": {
|
|
470
|
+
"type": "object",
|
|
471
|
+
"description": "Complete metadata for a node type including ports, configuration schema, and extensions.\n\n## Dynamic Port Support\n\nNodes can support user-defined dynamic ports through their configSchema:\n- Add `dynamicInputs` array property to allow custom input handles\n- Add `dynamicOutputs` array property to allow custom output handles\n- Add `branches` array property for gateway nodes with conditional paths\n\n## Extensions Support\n\nThe `extensions` property allows storing UI settings and 3rd party data:\n- Use `extensions.ui.hideUnconnectedHandles` to hide unconnected ports by default\n- Use namespaced keys for custom integrations (e.g., \"myapp:settings\")\n",
|
|
472
|
+
"properties": {
|
|
473
|
+
"id": {
|
|
474
|
+
"type": "string",
|
|
475
|
+
"description": "Node type unique identifier"
|
|
476
|
+
},
|
|
477
|
+
"name": {
|
|
478
|
+
"type": "string",
|
|
479
|
+
"description": "Node type display name"
|
|
480
|
+
},
|
|
481
|
+
"type": {
|
|
482
|
+
"$ref": "#/$defs/NodeType"
|
|
483
|
+
},
|
|
484
|
+
"supportedTypes": {
|
|
485
|
+
"type": "array",
|
|
486
|
+
"items": {
|
|
487
|
+
"$ref": "#/$defs/NodeType"
|
|
488
|
+
},
|
|
489
|
+
"description": "Array of supported rendering types"
|
|
490
|
+
},
|
|
491
|
+
"description": {
|
|
492
|
+
"type": "string",
|
|
493
|
+
"description": "Node type description"
|
|
494
|
+
},
|
|
495
|
+
"category": {
|
|
496
|
+
"$ref": "#/$defs/NodeCategory"
|
|
497
|
+
},
|
|
498
|
+
"version": {
|
|
499
|
+
"type": "string",
|
|
500
|
+
"description": "Node type version"
|
|
501
|
+
},
|
|
502
|
+
"icon": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"description": "Icon identifier (Material Design Icons)"
|
|
505
|
+
},
|
|
506
|
+
"color": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"description": "Node color (CSS color value)"
|
|
509
|
+
},
|
|
510
|
+
"badge": {
|
|
511
|
+
"type": "string",
|
|
512
|
+
"description": "Default badge label displayed in the node header (e.g., \"TOOL\", \"API\", \"LLM\").\nCurrently used by tool nodes. Can be overridden per-instance via `config.instanceBadge`.\nDefaults to \"TOOL\" for tool nodes if not specified.\n"
|
|
513
|
+
},
|
|
514
|
+
"portDataType": {
|
|
515
|
+
"type": "string",
|
|
516
|
+
"description": "Port dataType to expose on tool nodes. Defaults to \"tool\".\nSet to another type (e.g., \"trigger\") to show that port type instead.\nThis allows repurposing the tool node with a custom badge and matching port type.\n"
|
|
517
|
+
},
|
|
518
|
+
"inputs": {
|
|
519
|
+
"type": "array",
|
|
520
|
+
"items": {
|
|
521
|
+
"$ref": "#/$defs/NodePort"
|
|
522
|
+
},
|
|
523
|
+
"description": "Static input ports defined by the node type.\nAdditional dynamic inputs can be added via config.dynamicInputs.\n"
|
|
524
|
+
},
|
|
525
|
+
"outputs": {
|
|
526
|
+
"type": "array",
|
|
527
|
+
"items": {
|
|
528
|
+
"$ref": "#/$defs/NodePort"
|
|
529
|
+
},
|
|
530
|
+
"description": "Static output ports defined by the node type.\nAdditional dynamic outputs can be added via config.dynamicOutputs.\nFor gateway nodes, branches create additional output handles.\n"
|
|
531
|
+
},
|
|
532
|
+
"configSchema": {
|
|
533
|
+
"$ref": "#/$defs/ConfigSchema"
|
|
534
|
+
},
|
|
535
|
+
"tags": {
|
|
536
|
+
"type": "array",
|
|
537
|
+
"items": {
|
|
538
|
+
"type": "string"
|
|
539
|
+
},
|
|
540
|
+
"description": "Node tags for search and filtering"
|
|
541
|
+
},
|
|
542
|
+
"formats": {
|
|
543
|
+
"type": "array",
|
|
544
|
+
"items": {
|
|
545
|
+
"type": "string"
|
|
546
|
+
},
|
|
547
|
+
"description": "Workflow formats this node is compatible with.\nWhen omitted, the node is universal (compatible with all formats).\nWhen specified, the node only appears in the sidebar for workflows\nmatching one of the listed formats.\n"
|
|
548
|
+
},
|
|
549
|
+
"extensions": {
|
|
550
|
+
"allOf": [
|
|
551
|
+
{
|
|
552
|
+
"$ref": "#/$defs/NodeExtensions"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"description": "Default extension properties for all instances of this node type.\nCan be overridden at the instance level via WorkflowNode.data.extensions.\n"
|
|
556
|
+
}
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"required": [
|
|
561
|
+
"id",
|
|
562
|
+
"name",
|
|
563
|
+
"description",
|
|
564
|
+
"category",
|
|
565
|
+
"version",
|
|
566
|
+
"inputs",
|
|
567
|
+
"outputs"
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
"NodePort": {
|
|
571
|
+
"type": "object",
|
|
572
|
+
"description": "Defines an input or output port on a node.\n\nPorts are connection points where data flows between nodes. Input ports\nreceive data from upstream nodes, and output ports send data to downstream nodes.\n\n## Template Variable Autocomplete\n\nOutput ports can include a `schema` property that describes the structure of\ntheir data. This schema is used by downstream nodes' template fields to provide\nautocomplete suggestions.\n\nWhen a template field is connected to a port with a schema, users get:\n- Autocomplete for top-level properties when typing `{{`\n- Nested property drilling when typing `.`\n- Array index suggestions when typing `[`\n",
|
|
573
|
+
"properties": {
|
|
574
|
+
"id": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"description": "Port unique identifier (used in handle IDs and variable names)"
|
|
577
|
+
},
|
|
578
|
+
"name": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"description": "Port display name shown in the UI"
|
|
581
|
+
},
|
|
582
|
+
"type": {
|
|
583
|
+
"type": "string",
|
|
584
|
+
"enum": [
|
|
585
|
+
"input",
|
|
586
|
+
"output",
|
|
587
|
+
"metadata"
|
|
588
|
+
],
|
|
589
|
+
"description": "Port direction (input receives data, output sends data)"
|
|
590
|
+
},
|
|
591
|
+
"dataType": {
|
|
592
|
+
"$ref": "#/$defs/NodeDataType"
|
|
593
|
+
},
|
|
594
|
+
"required": {
|
|
595
|
+
"type": "boolean",
|
|
596
|
+
"default": false,
|
|
597
|
+
"description": "Whether the port must be connected for the node to execute"
|
|
598
|
+
},
|
|
599
|
+
"description": {
|
|
600
|
+
"type": "string",
|
|
601
|
+
"description": "Help text describing what data the port expects or provides"
|
|
602
|
+
},
|
|
603
|
+
"defaultValue": {
|
|
604
|
+
"description": "Default value used when no connection provides data"
|
|
605
|
+
},
|
|
606
|
+
"schema": {
|
|
607
|
+
"allOf": [
|
|
608
|
+
{
|
|
609
|
+
"$ref": "#/$defs/PortDataSchema"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"description": "JSON Schema describing the structure of data on this output port.\n\n**Purpose:** Enables template variable autocomplete in downstream nodes.\nWhen a downstream node has a template field connected to this port,\nthe schema's properties become available as autocomplete suggestions.\n\n**How it works:**\n1. Define a schema with `properties` on an output port\n2. Connect this port to a downstream node's input\n3. In the downstream node's template field, typing `{{` shows the schema's properties\n\n**Example:**\n\n```yaml\noutputs:\n - id: json\n name: JSON Response\n type: output\n dataType: json\n schema:\n type: object\n properties:\n user:\n type: object\n properties:\n name: { type: string }\n email: { type: string }\n orders:\n type: array\n items:\n type: object\n properties:\n id: { type: string }\n total: { type: number }\n```\n\nThis enables autocomplete for:\n- `{{ user }}`, `{{ orders }}`\n- `{{ user.name }}`, `{{ user.email }}`\n- `{{ orders[0].id }}`, `{{ orders[0].total }}`\n"
|
|
613
|
+
}
|
|
614
|
+
]
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
"required": [
|
|
618
|
+
"id",
|
|
619
|
+
"name",
|
|
620
|
+
"type",
|
|
621
|
+
"dataType"
|
|
622
|
+
]
|
|
623
|
+
},
|
|
624
|
+
"NodeType": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"enum": [
|
|
627
|
+
"note",
|
|
628
|
+
"simple",
|
|
629
|
+
"square",
|
|
630
|
+
"tool",
|
|
631
|
+
"gateway",
|
|
632
|
+
"terminal",
|
|
633
|
+
"default"
|
|
634
|
+
],
|
|
635
|
+
"description": "Visual rendering type for the node.\n\nBuilt-in types:\n- `note` - Sticky note with markdown support\n- `simple` - Compact layout with header and description\n- `square` - Minimal square node with centered icon\n- `tool` - Specialized node for agent tools\n- `gateway` - Branching control flow with dynamic branches (uses config.branches)\n- `terminal` - Circular node for workflow start/end/exit points\n- `default` - Full-featured workflow node with dynamic port support\n\n## Dynamic Port Support\n\nThe `default` and `gateway` node types support dynamic ports:\n\n- **default**: Supports `config.dynamicInputs` and `config.dynamicOutputs`\n for user-defined input/output handles\n- **gateway**: Supports `config.branches` for conditional branching paths\n\n## UI Extensions\n\nAll node types support `extensions.ui.hideUnconnectedHandles` to control\nvisibility of unconnected ports.\n"
|
|
636
|
+
},
|
|
637
|
+
"NodeUIExtensions": {
|
|
638
|
+
"type": "object",
|
|
639
|
+
"description": "UI-related extension settings for nodes.\nUsed to control visual behavior in the workflow editor.\n\nThese settings can be defined at two levels:\n1. **Node Type Level** (`metadata.extensions.ui`): Default settings for all instances\n2. **Instance Level** (`data.extensions.ui`): Override for specific node instances\n\nInstance-level settings take precedence over type-level defaults.\n",
|
|
640
|
+
"properties": {
|
|
641
|
+
"hideUnconnectedHandles": {
|
|
642
|
+
"type": "boolean",
|
|
643
|
+
"description": "Show/hide unconnected handles (ports) to reduce visual noise.\nWhen true, only ports with active connections are displayed.\nUseful for nodes with many optional ports.\n"
|
|
644
|
+
},
|
|
645
|
+
"style": {
|
|
646
|
+
"type": "object",
|
|
647
|
+
"additionalProperties": true,
|
|
648
|
+
"description": "Custom styles or theme overrides"
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
"additionalProperties": true
|
|
652
|
+
},
|
|
653
|
+
"OneOfItem": {
|
|
654
|
+
"type": "object",
|
|
655
|
+
"description": "JSON Schema oneOf item for labeled options.\nThis is the standard JSON Schema way to define labeled select options.\n\nExample:\n```json\n{\n \"type\": \"string\",\n \"oneOf\": [\n { \"const\": \"draft\", \"title\": \"Draft\" },\n { \"const\": \"published\", \"title\": \"Published\" }\n ]\n}\n```\n",
|
|
656
|
+
"properties": {
|
|
657
|
+
"const": {
|
|
658
|
+
"oneOf": [
|
|
659
|
+
{
|
|
660
|
+
"type": "string"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"type": "number"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"type": "boolean"
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
"description": "The constant value for this option (JSON Schema `const` keyword)"
|
|
670
|
+
},
|
|
671
|
+
"title": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"description": "Human-readable label for this option"
|
|
674
|
+
},
|
|
675
|
+
"description": {
|
|
676
|
+
"type": "string",
|
|
677
|
+
"description": "Optional description for this option"
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
"required": [
|
|
681
|
+
"const"
|
|
682
|
+
]
|
|
683
|
+
},
|
|
684
|
+
"PortDataSchema": {
|
|
685
|
+
"type": "object",
|
|
686
|
+
"description": "JSON Schema describing the structure of data on an output port.\nFollows JSON Schema draft-07 specification.\n\n## Purpose\n\nEnables template variable autocomplete in downstream nodes by describing\nthe shape of data that flows through the port.\n\n## Supported Features\n\n- **Objects**: Define `properties` to enable dot notation drilling\n- **Arrays**: Define `items` to enable index access and item property drilling\n- **Nested structures**: Combine objects and arrays for deep drilling\n- **Metadata**: Use `title` and `description` for autocomplete tooltips\n\n## Example\n\nA schema describing an API response with user data and orders:\n\n```yaml\ntype: object\nproperties:\n user:\n type: object\n title: User\n description: The authenticated user\n properties:\n id: { type: integer }\n name: { type: string, description: \"User's full name\" }\n email: { type: string }\n address:\n type: object\n properties:\n city: { type: string }\n country: { type: string }\n orders:\n type: array\n title: Orders\n description: User's order history\n items:\n type: object\n properties:\n order_id: { type: string }\n total: { type: number }\n status: { type: string }\n```\n\nThis enables template patterns like:\n- `{{ user.name }}` - Access user's name\n- `{{ user.address.city }}` - Nested property access\n- `{{ orders[0].total }}` - First order's total\n- `{{ orders[0].status }}` - First order's status\n",
|
|
687
|
+
"properties": {
|
|
688
|
+
"type": {
|
|
689
|
+
"type": "string",
|
|
690
|
+
"enum": [
|
|
691
|
+
"object",
|
|
692
|
+
"array",
|
|
693
|
+
"string",
|
|
694
|
+
"number",
|
|
695
|
+
"integer",
|
|
696
|
+
"boolean"
|
|
697
|
+
],
|
|
698
|
+
"description": "The JSON Schema type. Use `object` for nested properties,\n`array` for lists with `items` schema.\n"
|
|
699
|
+
},
|
|
700
|
+
"title": {
|
|
701
|
+
"type": "string",
|
|
702
|
+
"description": "Human-readable title shown in autocomplete dropdown.\nIf not provided, the property name is used.\n"
|
|
703
|
+
},
|
|
704
|
+
"description": {
|
|
705
|
+
"type": "string",
|
|
706
|
+
"description": "Description shown as tooltip in autocomplete.\nHelps users understand what data the property contains.\n"
|
|
707
|
+
},
|
|
708
|
+
"properties": {
|
|
709
|
+
"type": "object",
|
|
710
|
+
"additionalProperties": {
|
|
711
|
+
"$ref": "#/$defs/PortDataSchema"
|
|
712
|
+
},
|
|
713
|
+
"description": "Property schemas for object types"
|
|
714
|
+
},
|
|
715
|
+
"items": {
|
|
716
|
+
"allOf": [
|
|
717
|
+
{
|
|
718
|
+
"$ref": "#/$defs/PortDataSchema"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"description": "Item schema for array types"
|
|
722
|
+
}
|
|
723
|
+
]
|
|
724
|
+
},
|
|
725
|
+
"required": {
|
|
726
|
+
"type": "array",
|
|
727
|
+
"items": {
|
|
728
|
+
"type": "string"
|
|
729
|
+
},
|
|
730
|
+
"description": "Required property names"
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"Position": {
|
|
735
|
+
"type": "object",
|
|
736
|
+
"properties": {
|
|
737
|
+
"x": {
|
|
738
|
+
"type": "number",
|
|
739
|
+
"description": "X coordinate"
|
|
740
|
+
},
|
|
741
|
+
"y": {
|
|
742
|
+
"type": "number",
|
|
743
|
+
"description": "Y coordinate"
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
"required": [
|
|
747
|
+
"x",
|
|
748
|
+
"y"
|
|
749
|
+
]
|
|
750
|
+
},
|
|
751
|
+
"TemplateVariable": {
|
|
752
|
+
"type": "object",
|
|
753
|
+
"description": "Represents a variable available for template interpolation.\nUsed by the template editor for autocomplete suggestions.\n\nSupports hierarchical drilling:\n- Objects have `properties` for dot notation (e.g., `user.name`)\n- Arrays have `items` for index access (e.g., `items[0].name`)\n",
|
|
754
|
+
"properties": {
|
|
755
|
+
"name": {
|
|
756
|
+
"type": "string",
|
|
757
|
+
"description": "Variable name (used in template as {{ name }})"
|
|
758
|
+
},
|
|
759
|
+
"label": {
|
|
760
|
+
"type": "string",
|
|
761
|
+
"description": "Display label for the variable in autocomplete dropdown"
|
|
762
|
+
},
|
|
763
|
+
"description": {
|
|
764
|
+
"type": "string",
|
|
765
|
+
"description": "Description shown in autocomplete tooltip"
|
|
766
|
+
},
|
|
767
|
+
"type": {
|
|
768
|
+
"type": "string",
|
|
769
|
+
"enum": [
|
|
770
|
+
"string",
|
|
771
|
+
"number",
|
|
772
|
+
"integer",
|
|
773
|
+
"boolean",
|
|
774
|
+
"array",
|
|
775
|
+
"object",
|
|
776
|
+
"float",
|
|
777
|
+
"mixed"
|
|
778
|
+
],
|
|
779
|
+
"description": "Data type of the variable"
|
|
780
|
+
},
|
|
781
|
+
"properties": {
|
|
782
|
+
"type": "object",
|
|
783
|
+
"additionalProperties": {
|
|
784
|
+
"$ref": "#/$defs/TemplateVariable"
|
|
785
|
+
},
|
|
786
|
+
"description": "For objects - child properties accessible via dot notation"
|
|
787
|
+
},
|
|
788
|
+
"items": {
|
|
789
|
+
"allOf": [
|
|
790
|
+
{
|
|
791
|
+
"$ref": "#/$defs/TemplateVariable"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"description": "For arrays - schema of array items accessible via index notation"
|
|
795
|
+
}
|
|
796
|
+
]
|
|
797
|
+
},
|
|
798
|
+
"sourcePort": {
|
|
799
|
+
"type": "string",
|
|
800
|
+
"description": "Source port ID this variable comes from"
|
|
801
|
+
},
|
|
802
|
+
"sourceNode": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"description": "Source node ID"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"required": [
|
|
808
|
+
"name",
|
|
809
|
+
"type"
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
"TemplateVariablesConfig": {
|
|
813
|
+
"type": "object",
|
|
814
|
+
"description": "Configuration for template variable autocomplete in template fields.\n\n## Overview\n\nWhen a template field is connected to upstream nodes that have output schemas,\nFlowDrop automatically derives available variables for autocomplete. This config\ncontrols which ports provide variables and how they are presented.\n\n## Variable Derivation\n\nVariables are derived from connected upstream nodes' **output port schemas**.\nWhen an output port has a `schema` property with `properties`, those properties\nbecome available as template variables.\n\n### Default Behavior (includePortName: false)\n\nSchema properties are **unpacked as top-level variables**:\n\n```\nHTTP Request node (output port \"json\" with schema):\n schema.properties: { user: {...}, orders: {...} }\n ↓\nTemplate variables: {{ user }}, {{ orders }}\n```\n\n### With includePortName: true\n\nVariables are **prefixed with the port name**:\n\n```\nSame schema as above:\n ↓\nTemplate variables: {{ data.user }}, {{ data.orders }}\n```\n\n## Nested Property Access\n\nThe autocomplete supports drilling into nested structures:\n\n- **Dot notation**: `{{ user.address.city }}`\n- **Array indices**: `{{ orders[0].product_name }}`\n- **Combined**: `{{ user.orders[0].items[1].price }}`\n",
|
|
815
|
+
"properties": {
|
|
816
|
+
"ports": {
|
|
817
|
+
"type": "array",
|
|
818
|
+
"items": {
|
|
819
|
+
"type": "string"
|
|
820
|
+
},
|
|
821
|
+
"description": "Specifies which input port IDs should provide variables for autocomplete.\nOnly connections to these ports will contribute variables.\n\n**Behavior:**\n- If not specified: All input ports with connections are used\n- If empty array `[]`: No variables derived from ports (use with `schema` for static variables)\n- If specified: Only the listed ports contribute variables\n\n**Example:** A node with inputs \"data\", \"context\", and \"trigger\":\n- `ports: [\"data\"]` - Only variables from the \"data\" connection\n- `ports: [\"data\", \"context\"]` - Variables from both connections\n- Not specified - Variables from all non-trigger connections\n"
|
|
822
|
+
},
|
|
823
|
+
"schema": {
|
|
824
|
+
"allOf": [
|
|
825
|
+
{
|
|
826
|
+
"$ref": "#/$defs/VariableSchema"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"description": "Pre-defined variable schema to provide static variables or override derived ones.\n\nWhen both `ports` and `schema` are specified, variables are **merged**:\n- Variables from connected ports are computed first\n- Static `schema` variables are added/override existing ones\n\n**Use cases:**\n- Provide variables that don't come from connections\n- Override labels or descriptions for derived variables\n- Add custom variables for specific use cases\n"
|
|
830
|
+
}
|
|
831
|
+
]
|
|
832
|
+
},
|
|
833
|
+
"includePortName": {
|
|
834
|
+
"type": "boolean",
|
|
835
|
+
"default": false,
|
|
836
|
+
"description": "Controls how variables are named when derived from port schemas.\n\n**When false (default):**\nSchema properties become top-level variables directly.\nA port with schema `{ user: {...}, orders: {...} }` produces:\n- `{{ user }}`\n- `{{ orders }}`\n\n**When true:**\nVariables are prefixed with the input port name.\nSame schema connected to input port \"data\" produces:\n- `{{ data.user }}`\n- `{{ data.orders }}`\n\n**When to use true:**\n- Multiple input ports with potentially overlapping property names\n- You want to be explicit about data sources in templates\n- Backward compatibility with existing templates\n"
|
|
837
|
+
},
|
|
838
|
+
"showHints": {
|
|
839
|
+
"type": "boolean",
|
|
840
|
+
"default": true,
|
|
841
|
+
"description": "Whether to display clickable variable hints below the editor.\n\nWhen enabled, shows a row of buttons for top-level variables that users\ncan click to insert `{{ variableName }}` at the cursor position.\n\nDisable if the variable list is too long or not useful.\n"
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"VariableSchema": {
|
|
846
|
+
"type": "object",
|
|
847
|
+
"description": "Schema passed to template editor for autocomplete functionality.\nContains all available variables derived from connected upstream nodes.\n\nThis is computed by the frontend based on:\n1. Finding all edges that connect to the current node's input ports\n2. Getting the output schemas from the source nodes' output ports\n3. Building a hierarchical variable structure for autocomplete\n",
|
|
848
|
+
"properties": {
|
|
849
|
+
"variables": {
|
|
850
|
+
"type": "object",
|
|
851
|
+
"additionalProperties": {
|
|
852
|
+
"$ref": "#/$defs/TemplateVariable"
|
|
853
|
+
},
|
|
854
|
+
"description": "Map of available variables keyed by variable name"
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
"required": [
|
|
858
|
+
"variables"
|
|
859
|
+
]
|
|
860
|
+
},
|
|
861
|
+
"WorkflowEdge": {
|
|
862
|
+
"type": "object",
|
|
863
|
+
"properties": {
|
|
864
|
+
"id": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"format": "uuid",
|
|
867
|
+
"description": "Edge UUID"
|
|
868
|
+
},
|
|
869
|
+
"source": {
|
|
870
|
+
"type": "string",
|
|
871
|
+
"format": "uuid",
|
|
872
|
+
"description": "Source node UUID"
|
|
873
|
+
},
|
|
874
|
+
"target": {
|
|
875
|
+
"type": "string",
|
|
876
|
+
"format": "uuid",
|
|
877
|
+
"description": "Target node UUID"
|
|
878
|
+
},
|
|
879
|
+
"sourceHandle": {
|
|
880
|
+
"type": "string",
|
|
881
|
+
"description": "Source port ID"
|
|
882
|
+
},
|
|
883
|
+
"targetHandle": {
|
|
884
|
+
"type": "string",
|
|
885
|
+
"description": "Target port ID"
|
|
886
|
+
},
|
|
887
|
+
"type": {
|
|
888
|
+
"type": "string",
|
|
889
|
+
"description": "Connection line type",
|
|
890
|
+
"enum": [
|
|
891
|
+
"default",
|
|
892
|
+
"straight",
|
|
893
|
+
"step",
|
|
894
|
+
"smoothstep"
|
|
895
|
+
]
|
|
896
|
+
},
|
|
897
|
+
"selectable": {
|
|
898
|
+
"type": "boolean",
|
|
899
|
+
"default": true
|
|
900
|
+
},
|
|
901
|
+
"deletable": {
|
|
902
|
+
"type": "boolean",
|
|
903
|
+
"default": true
|
|
904
|
+
},
|
|
905
|
+
"data": {
|
|
906
|
+
"type": "object",
|
|
907
|
+
"properties": {
|
|
908
|
+
"label": {
|
|
909
|
+
"type": "string",
|
|
910
|
+
"description": "Edge label"
|
|
911
|
+
},
|
|
912
|
+
"condition": {
|
|
913
|
+
"type": "string",
|
|
914
|
+
"description": "Conditional expression for conditional edges"
|
|
915
|
+
},
|
|
916
|
+
"metadata": {
|
|
917
|
+
"type": "object",
|
|
918
|
+
"description": "Edge metadata for API and persistence",
|
|
919
|
+
"properties": {
|
|
920
|
+
"edgeType": {
|
|
921
|
+
"type": "string",
|
|
922
|
+
"enum": [
|
|
923
|
+
"trigger",
|
|
924
|
+
"tool",
|
|
925
|
+
"data"
|
|
926
|
+
],
|
|
927
|
+
"description": "Edge type for visual styling"
|
|
928
|
+
},
|
|
929
|
+
"sourcePortDataType": {
|
|
930
|
+
"type": "string",
|
|
931
|
+
"description": "Data type of the source output port (e.g., tool, string, number)"
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"isToolConnection": {
|
|
936
|
+
"type": "boolean",
|
|
937
|
+
"description": "Whether this is a tool connection (deprecated, use metadata.edgeType instead)"
|
|
938
|
+
},
|
|
939
|
+
"targetNodeType": {
|
|
940
|
+
"type": "string",
|
|
941
|
+
"description": "Target node type"
|
|
942
|
+
},
|
|
943
|
+
"targetCategory": {
|
|
944
|
+
"type": "string",
|
|
945
|
+
"description": "Target node category"
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
"required": [
|
|
951
|
+
"id",
|
|
952
|
+
"source",
|
|
953
|
+
"target"
|
|
954
|
+
]
|
|
955
|
+
},
|
|
956
|
+
"WorkflowMetadata": {
|
|
957
|
+
"type": "object",
|
|
958
|
+
"properties": {
|
|
959
|
+
"version": {
|
|
960
|
+
"type": "string",
|
|
961
|
+
"description": "Workflow version"
|
|
962
|
+
},
|
|
963
|
+
"createdAt": {
|
|
964
|
+
"type": "string",
|
|
965
|
+
"format": "date-time",
|
|
966
|
+
"description": "Creation timestamp"
|
|
967
|
+
},
|
|
968
|
+
"updatedAt": {
|
|
969
|
+
"type": "string",
|
|
970
|
+
"format": "date-time",
|
|
971
|
+
"description": "Last update timestamp"
|
|
972
|
+
},
|
|
973
|
+
"author": {
|
|
974
|
+
"type": "string",
|
|
975
|
+
"description": "Workflow author"
|
|
976
|
+
},
|
|
977
|
+
"tags": {
|
|
978
|
+
"type": "array",
|
|
979
|
+
"items": {
|
|
980
|
+
"type": "string"
|
|
981
|
+
},
|
|
982
|
+
"description": "Workflow tags"
|
|
983
|
+
},
|
|
984
|
+
"versionId": {
|
|
985
|
+
"type": "string",
|
|
986
|
+
"description": "Version control ID"
|
|
987
|
+
},
|
|
988
|
+
"updateNumber": {
|
|
989
|
+
"type": "integer",
|
|
990
|
+
"description": "Update sequence number"
|
|
991
|
+
},
|
|
992
|
+
"format": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"description": "Workflow format identifier. Determines which node types are shown\nin the sidebar and how the workflow is exported.\nBuilt-in formats: 'flowdrop' (default), 'agentspec'.\nCustom formats can be registered via WorkflowFormatRegistry.\n",
|
|
995
|
+
"default": "flowdrop"
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
"required": [
|
|
999
|
+
"version",
|
|
1000
|
+
"createdAt",
|
|
1001
|
+
"updatedAt"
|
|
1002
|
+
]
|
|
1003
|
+
},
|
|
1004
|
+
"WorkflowNode": {
|
|
1005
|
+
"type": "object",
|
|
1006
|
+
"description": "Represents a node instance in a workflow.\n\nEach node instance contains:\n- Position on the canvas\n- Display data (label)\n- Configuration values (config) - user-defined settings\n- Metadata from the node type definition\n- Optional execution state and extensions\n",
|
|
1007
|
+
"properties": {
|
|
1008
|
+
"id": {
|
|
1009
|
+
"type": "string",
|
|
1010
|
+
"format": "uuid",
|
|
1011
|
+
"description": "Node instance UUID"
|
|
1012
|
+
},
|
|
1013
|
+
"type": {
|
|
1014
|
+
"type": "string",
|
|
1015
|
+
"description": "Node type ID (references NodeMetadata.id)"
|
|
1016
|
+
},
|
|
1017
|
+
"position": {
|
|
1018
|
+
"$ref": "#/$defs/Position"
|
|
1019
|
+
},
|
|
1020
|
+
"deletable": {
|
|
1021
|
+
"type": "boolean",
|
|
1022
|
+
"default": true
|
|
1023
|
+
},
|
|
1024
|
+
"data": {
|
|
1025
|
+
"type": "object",
|
|
1026
|
+
"properties": {
|
|
1027
|
+
"label": {
|
|
1028
|
+
"type": "string",
|
|
1029
|
+
"description": "Node instance label"
|
|
1030
|
+
},
|
|
1031
|
+
"config": {
|
|
1032
|
+
"$ref": "#/$defs/NodeConfig"
|
|
1033
|
+
},
|
|
1034
|
+
"metadata": {
|
|
1035
|
+
"$ref": "#/$defs/NodeMetadata"
|
|
1036
|
+
},
|
|
1037
|
+
"isProcessing": {
|
|
1038
|
+
"type": "boolean",
|
|
1039
|
+
"description": "Whether the node is currently processing"
|
|
1040
|
+
},
|
|
1041
|
+
"error": {
|
|
1042
|
+
"type": "string",
|
|
1043
|
+
"description": "Error message if node execution failed"
|
|
1044
|
+
},
|
|
1045
|
+
"nodeId": {
|
|
1046
|
+
"type": "string",
|
|
1047
|
+
"description": "Alternative node ID"
|
|
1048
|
+
},
|
|
1049
|
+
"executionInfo": {
|
|
1050
|
+
"$ref": "#/$defs/NodeExecutionInfo"
|
|
1051
|
+
},
|
|
1052
|
+
"extensions": {
|
|
1053
|
+
"allOf": [
|
|
1054
|
+
{
|
|
1055
|
+
"$ref": "#/$defs/NodeExtensions"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"description": "Per-instance extension properties for 3rd party integrations.\nOverrides or extends the node type extensions defined in metadata.extensions.\nUse for instance-specific UI states or custom data.\n\nCommon use cases:\n- `extensions.ui.hideUnconnectedHandles`: Hide ports without connections\n- `extensions.ui.style`: Custom styling for this node instance\n"
|
|
1059
|
+
}
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
"required": [
|
|
1064
|
+
"label",
|
|
1065
|
+
"config",
|
|
1066
|
+
"metadata"
|
|
1067
|
+
]
|
|
1068
|
+
}
|
|
1069
|
+
},
|
|
1070
|
+
"required": [
|
|
1071
|
+
"id",
|
|
1072
|
+
"type",
|
|
1073
|
+
"position",
|
|
1074
|
+
"data"
|
|
1075
|
+
]
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}
|