@flowdrop/flowdrop 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/commands/executor.js +4 -1
- package/dist/commands/types.d.ts +4 -0
- package/dist/components/App.svelte +122 -12
- package/dist/components/WorkflowInterfaceEditor.svelte +941 -0
- package/dist/components/WorkflowInterfaceEditor.svelte.d.ts +14 -0
- package/dist/components/form/FormPorts.svelte +34 -2
- package/dist/components/nodes/GatewayNode.svelte +13 -1
- package/dist/components/nodes/SimpleNode.svelte +11 -0
- package/dist/components/nodes/SquareNode.svelte +11 -0
- package/dist/components/nodes/TerminalNode.svelte +11 -0
- package/dist/components/nodes/WorkflowNode.svelte +11 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/messages/defaults.d.ts +42 -0
- package/dist/messages/defaults.js +34 -0
- package/dist/openapi/v1/openapi.yaml +105 -0
- package/dist/schemas/v1/workflow.schema.json +109 -0
- package/dist/services/workflowLaunchService.d.ts +13 -1
- package/dist/services/workflowLaunchService.js +8 -0
- package/dist/stores/workflowStore.svelte.d.ts +22 -0
- package/dist/stores/workflowStore.svelte.js +18 -0
- package/dist/styles/base.css +10 -0
- package/dist/types/index.d.ts +60 -6
- package/dist/types/index.js +1 -1
- package/dist/utils/colors.d.ts +1 -2
- package/dist/utils/colors.js +1 -2
- package/dist/utils/connections.d.ts +5 -0
- package/dist/utils/connections.js +1 -1
- package/dist/utils/nodeSwap.d.ts +9 -0
- package/dist/utils/nodeSwap.js +50 -2
- package/dist/utils/portUtils.d.ts +0 -2
- package/dist/utils/portUtils.js +0 -2
- package/dist/utils/workflowInterface.d.ts +199 -0
- package/dist/utils/workflowInterface.js +382 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PortDataTypeConfig, Workflow, WorkflowInterface } from '../types/index.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
workflow: Workflow;
|
|
4
|
+
onChange: (next: WorkflowInterface | undefined) => void;
|
|
5
|
+
/**
|
|
6
|
+
* The data-type vocabulary offered by the dataType picker — the host's
|
|
7
|
+
* live `PortConfig.dataTypes` (pass `portCompatibility.getEnabledDataTypes()`).
|
|
8
|
+
* The wire format stays an open string; this only constrains *authoring*.
|
|
9
|
+
*/
|
|
10
|
+
dataTypes?: PortDataTypeConfig[];
|
|
11
|
+
}
|
|
12
|
+
declare const WorkflowInterfaceEditor: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type WorkflowInterfaceEditor = ReturnType<typeof WorkflowInterfaceEditor>;
|
|
14
|
+
export default WorkflowInterfaceEditor;
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
(so order + exposure stay independent inside one positional array), and reset
|
|
15
15
|
to `undefined` when it lands back on the metadata default order with no
|
|
16
16
|
exposure override.
|
|
17
|
-
|
|
18
|
-
@see .claude/plans/exposed-ports.md
|
|
19
17
|
-->
|
|
20
18
|
|
|
21
19
|
<script lang="ts">
|
|
@@ -30,6 +28,8 @@
|
|
|
30
28
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
31
29
|
import { getPortColorToken, getPortBackgroundColorForPort } from '../../utils/colors.js';
|
|
32
30
|
import { byDefaultOrder, isPortExposed, orderPortsFor } from '../../utils/portUtils.js';
|
|
31
|
+
import { buildHandleId } from '../../utils/handleIds.js';
|
|
32
|
+
import { interfaceBoundTooltip } from '../../utils/workflowInterface.js';
|
|
33
33
|
import FormToggle from './FormToggle.svelte';
|
|
34
34
|
import Icon from '@iconify/svelte';
|
|
35
35
|
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
|
|
51
51
|
const portsConfig = $derived((value as PortsConfig | undefined) ?? {});
|
|
52
52
|
|
|
53
|
+
/** Handle ids bound to a `workflow.interface` entry — see workflowStore. */
|
|
54
|
+
const boundHandles = $derived(fd.workflow.interfaceBoundHandles);
|
|
55
|
+
|
|
53
56
|
// Mirror the canvas: static metadata ports plus user-defined dynamic ports.
|
|
54
57
|
const inputPorts = $derived<NodePort[]>([
|
|
55
58
|
...(node?.data.metadata?.inputs ?? []),
|
|
@@ -136,6 +139,11 @@
|
|
|
136
139
|
<ul class="fd-ports__list">
|
|
137
140
|
{#each ordered as port, i (port.id)}
|
|
138
141
|
{@const exposed = isPortExposed(port, portsConfig[direction])}
|
|
142
|
+
{@const boundEntry = node
|
|
143
|
+
? boundHandles.get(
|
|
144
|
+
buildHandleId(node.id, direction === 'inputs' ? 'input' : 'output', port.id)
|
|
145
|
+
)
|
|
146
|
+
: undefined}
|
|
139
147
|
<li class="fd-ports__item" class:fd-ports__item--hidden={!exposed}>
|
|
140
148
|
<div class="fd-ports__reorder">
|
|
141
149
|
<button
|
|
@@ -172,6 +180,15 @@
|
|
|
172
180
|
>
|
|
173
181
|
{port.dataType}
|
|
174
182
|
</span>
|
|
183
|
+
{#if boundEntry}
|
|
184
|
+
<span
|
|
185
|
+
class="fd-ports__bound"
|
|
186
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
187
|
+
aria-label={interfaceBoundTooltip(boundEntry)}
|
|
188
|
+
>
|
|
189
|
+
<Icon icon="heroicons:link" />
|
|
190
|
+
</span>
|
|
191
|
+
{/if}
|
|
175
192
|
<FormToggle
|
|
176
193
|
id={`${id}-${direction}-${port.id}`}
|
|
177
194
|
value={exposed}
|
|
@@ -277,4 +294,19 @@
|
|
|
277
294
|
overflow: hidden;
|
|
278
295
|
text-overflow: ellipsis;
|
|
279
296
|
}
|
|
297
|
+
|
|
298
|
+
/* Interface-bound marker: same --fd-ring token as the canvas handle ring
|
|
299
|
+
(see styles/base.css .flowdrop-handle--bound), so the two affordances
|
|
300
|
+
read as one system in both light and dark skins. */
|
|
301
|
+
.fd-ports__bound {
|
|
302
|
+
display: inline-flex;
|
|
303
|
+
align-items: center;
|
|
304
|
+
justify-content: center;
|
|
305
|
+
flex-shrink: 0;
|
|
306
|
+
width: 1.25em;
|
|
307
|
+
height: 1.25em;
|
|
308
|
+
border-radius: 50%;
|
|
309
|
+
color: var(--fd-ring);
|
|
310
|
+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--fd-ring) 55%, transparent);
|
|
311
|
+
}
|
|
280
312
|
</style>
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
} from '../../utils/colors.js';
|
|
24
24
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
25
25
|
import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
|
|
26
|
+
import { buildHandleId } from '../../utils/handleIds.js';
|
|
27
|
+
import { interfaceBoundTooltip } from '../../utils/workflowInterface.js';
|
|
26
28
|
import { m } from '../../messages/index.js';
|
|
27
29
|
|
|
28
30
|
interface Props {
|
|
@@ -38,6 +40,14 @@
|
|
|
38
40
|
const fd = getInstance();
|
|
39
41
|
const checker = fd.portCompatibility;
|
|
40
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Handle ids bound to a `workflow.interface` entry — see workflowStore.
|
|
45
|
+
* Only input ports can be bound here: a gateway's outputs are branches
|
|
46
|
+
* (authored control-flow paths), not `NodePort`s, so they can never be an
|
|
47
|
+
* interface binding's target.
|
|
48
|
+
*/
|
|
49
|
+
const boundHandles = $derived(fd.workflow.interfaceBoundHandles);
|
|
50
|
+
|
|
41
51
|
// Hoist the graph branch — three reads in the template, two inside
|
|
42
52
|
// {#each port} / {#each branch} loops. One getter walk per render.
|
|
43
53
|
const graph = $derived(m().nodes.graph);
|
|
@@ -147,13 +157,15 @@
|
|
|
147
157
|
<div class="flowdrop-workflow-node__ports">
|
|
148
158
|
<div class="flowdrop-workflow-node__ports-list">
|
|
149
159
|
{#each visibleInputPorts as port (port.id)}
|
|
160
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'input', port.id))}
|
|
150
161
|
<div class="flowdrop-workflow-node__port">
|
|
151
162
|
<!-- Input Handle: one grid row (20px) from the top so it aligns with the label, at node edge -->
|
|
152
163
|
<Handle
|
|
153
164
|
type="target"
|
|
154
165
|
position={Position.Left}
|
|
155
166
|
id={`${props.id}-input-${port.id}`}
|
|
156
|
-
class="flowdrop-workflow-node__handle"
|
|
167
|
+
class="flowdrop-workflow-node__handle {boundEntry ? 'flowdrop-handle--bound' : ''}"
|
|
168
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
157
169
|
style="top: var(--fd-node-port-row-height); transform: translateY(-50%); --fd-handle-fill: {getDataTypeColorToken(
|
|
158
170
|
checker,
|
|
159
171
|
port.dataType
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
import { getPortColorToken, getCategoryColorToken } from '../../utils/colors.js';
|
|
26
26
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
27
27
|
import { orderPortsFor, getPortTop, isPortVisible } from '../../utils/portUtils.js';
|
|
28
|
+
import { buildHandleId } from '../../utils/handleIds.js';
|
|
29
|
+
import { interfaceBoundTooltip } from '../../utils/workflowInterface.js';
|
|
28
30
|
import NodeConfigButton from './NodeConfigButton.svelte';
|
|
29
31
|
import AlertCircleIcon from '../icons/AlertCircleIcon.svelte';
|
|
30
32
|
|
|
@@ -51,6 +53,9 @@
|
|
|
51
53
|
const fd = getInstance();
|
|
52
54
|
const checker = fd.portCompatibility;
|
|
53
55
|
|
|
56
|
+
/** Handle ids bound to a `workflow.interface` entry — see workflowStore. */
|
|
57
|
+
const boundHandles = $derived(fd.workflow.interfaceBoundHandles);
|
|
58
|
+
|
|
54
59
|
/**
|
|
55
60
|
* Per-instance port order + exposure, in config. Order overrides the metadata
|
|
56
61
|
* default; exposure is semantic (a not-exposed port is hidden, not wireable,
|
|
@@ -145,9 +150,12 @@
|
|
|
145
150
|
|
|
146
151
|
<!-- Input Handles: 1 port centered at 40px; N ports at 20px start, 40px gap -->
|
|
147
152
|
{#each visibleInputPorts as port, index (port.id)}
|
|
153
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'input', port.id))}
|
|
148
154
|
<Handle
|
|
149
155
|
type="target"
|
|
150
156
|
position={Position.Left}
|
|
157
|
+
class={boundEntry ? 'flowdrop-handle--bound' : undefined}
|
|
158
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
151
159
|
style="--fd-handle-fill: var(--fd-port-skin-color, {getPortColorToken(
|
|
152
160
|
checker,
|
|
153
161
|
port
|
|
@@ -217,9 +225,12 @@
|
|
|
217
225
|
|
|
218
226
|
<!-- Output Handles: 1 port centered at 40px; N ports at 20px start, 40px gap -->
|
|
219
227
|
{#each visibleOutputPorts as port, index (port.id)}
|
|
228
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'output', port.id))}
|
|
220
229
|
<Handle
|
|
221
230
|
type="source"
|
|
222
231
|
position={Position.Right}
|
|
232
|
+
class={boundEntry ? 'flowdrop-handle--bound' : undefined}
|
|
233
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
223
234
|
style="--fd-handle-fill: var(--fd-port-skin-color, {getPortColorToken(
|
|
224
235
|
checker,
|
|
225
236
|
port
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
import { getNodeIcon } from '../../utils/icons.js';
|
|
27
27
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
28
28
|
import { orderPortsFor, getPortTop, isPortVisible } from '../../utils/portUtils.js';
|
|
29
|
+
import { buildHandleId } from '../../utils/handleIds.js';
|
|
30
|
+
import { interfaceBoundTooltip } from '../../utils/workflowInterface.js';
|
|
29
31
|
import NodeConfigButton from './NodeConfigButton.svelte';
|
|
30
32
|
import AlertCircleIcon from '../icons/AlertCircleIcon.svelte';
|
|
31
33
|
|
|
@@ -52,6 +54,9 @@
|
|
|
52
54
|
const fd = getInstance();
|
|
53
55
|
const checker = fd.portCompatibility;
|
|
54
56
|
|
|
57
|
+
/** Handle ids bound to a `workflow.interface` entry — see workflowStore. */
|
|
58
|
+
const boundHandles = $derived(fd.workflow.interfaceBoundHandles);
|
|
59
|
+
|
|
55
60
|
/**
|
|
56
61
|
* Per-instance port order + exposure, in config. Order overrides the metadata
|
|
57
62
|
* default; exposure is semantic (a not-exposed port is hidden, not wireable,
|
|
@@ -142,9 +147,12 @@
|
|
|
142
147
|
|
|
143
148
|
<!-- Input Handles: 1 port centered at 40px; N ports at 20px start, 40px gap -->
|
|
144
149
|
{#each visibleInputPorts as port, index (port.id)}
|
|
150
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'input', port.id))}
|
|
145
151
|
<Handle
|
|
146
152
|
type="target"
|
|
147
153
|
position={Position.Left}
|
|
154
|
+
class={boundEntry ? 'flowdrop-handle--bound' : undefined}
|
|
155
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
148
156
|
style="--fd-handle-fill: var(--fd-port-skin-color, {getPortColorToken(
|
|
149
157
|
checker,
|
|
150
158
|
port
|
|
@@ -208,9 +216,12 @@
|
|
|
208
216
|
|
|
209
217
|
<!-- Output Handles: 1 port centered at 40px; N ports at 20px start, 40px gap -->
|
|
210
218
|
{#each visibleOutputPorts as port, index (port.id)}
|
|
219
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'output', port.id))}
|
|
211
220
|
<Handle
|
|
212
221
|
type="source"
|
|
213
222
|
position={Position.Right}
|
|
223
|
+
class={boundEntry ? 'flowdrop-handle--bound' : undefined}
|
|
224
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
214
225
|
style="--fd-handle-fill: var(--fd-port-skin-color, {getPortColorToken(
|
|
215
226
|
checker,
|
|
216
227
|
port
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
import { getNodeIcon } from '../../utils/icons.js';
|
|
24
24
|
import { getCircleHandlePosition } from '../../utils/handlePositioning.js';
|
|
25
25
|
import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
|
|
26
|
+
import { buildHandleId } from '../../utils/handleIds.js';
|
|
27
|
+
import { interfaceBoundTooltip } from '../../utils/workflowInterface.js';
|
|
26
28
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -96,6 +98,9 @@
|
|
|
96
98
|
const fd = getInstance();
|
|
97
99
|
const checker = fd.portCompatibility;
|
|
98
100
|
|
|
101
|
+
/** Handle ids bound to a `workflow.interface` entry — see workflowStore. */
|
|
102
|
+
const boundHandles = $derived(fd.workflow.interfaceBoundHandles);
|
|
103
|
+
|
|
99
104
|
/**
|
|
100
105
|
* Determine terminal variant from config or metadata
|
|
101
106
|
* Priority: config.variant > metadata tag detection > default to "start"
|
|
@@ -335,9 +340,12 @@
|
|
|
335
340
|
{#if showInputs}
|
|
336
341
|
{#each visibleInputPorts as port, index (`${port.id}-${visibleInputPorts.length}`)}
|
|
337
342
|
{@const pos = getCircleHandlePosition(index, visibleInputPorts.length, 'left')}
|
|
343
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'input', port.id))}
|
|
338
344
|
<Handle
|
|
339
345
|
type="target"
|
|
340
346
|
position={Position.Left}
|
|
347
|
+
class={boundEntry ? 'flowdrop-handle--bound' : undefined}
|
|
348
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
341
349
|
style="--fd-handle-fill: {getPortColorToken(
|
|
342
350
|
checker,
|
|
343
351
|
port
|
|
@@ -358,10 +366,13 @@
|
|
|
358
366
|
{#if showOutputs}
|
|
359
367
|
{#each visibleOutputPorts as port, index (`${port.id}-${visibleOutputPorts.length}`)}
|
|
360
368
|
{@const pos = getCircleHandlePosition(index, visibleOutputPorts.length, 'right')}
|
|
369
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'output', port.id))}
|
|
361
370
|
<Handle
|
|
362
371
|
type="source"
|
|
363
372
|
position={Position.Right}
|
|
364
373
|
id={`${props.id}-output-${port.id}`}
|
|
374
|
+
class={boundEntry ? 'flowdrop-handle--bound' : undefined}
|
|
375
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
365
376
|
style="--fd-handle-fill: {getPortColorToken(
|
|
366
377
|
checker,
|
|
367
378
|
port
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
} from '../../utils/colors.js';
|
|
26
26
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
27
27
|
import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
|
|
28
|
+
import { buildHandleId } from '../../utils/handleIds.js';
|
|
29
|
+
import { interfaceBoundTooltip } from '../../utils/workflowInterface.js';
|
|
28
30
|
import { m } from '../../messages/index.js';
|
|
29
31
|
|
|
30
32
|
interface Props {
|
|
@@ -41,6 +43,9 @@
|
|
|
41
43
|
const fd = getInstance();
|
|
42
44
|
const checker = fd.portCompatibility;
|
|
43
45
|
|
|
46
|
+
/** Handle ids bound to a `workflow.interface` entry — see workflowStore. */
|
|
47
|
+
const boundHandles = $derived(fd.workflow.interfaceBoundHandles);
|
|
48
|
+
|
|
44
49
|
// Hoist the graph branch — three reads in the template, two of them inside
|
|
45
50
|
// {#each port} loops where N×M reads add up. One getter walk per render.
|
|
46
51
|
const graph = $derived(m().nodes.graph);
|
|
@@ -194,13 +199,15 @@
|
|
|
194
199
|
<div class="flowdrop-workflow-node__ports">
|
|
195
200
|
<div class="flowdrop-workflow-node__ports-list">
|
|
196
201
|
{#each visibleInputPorts as port (port.id)}
|
|
202
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'input', port.id))}
|
|
197
203
|
<div class="flowdrop-workflow-node__port">
|
|
198
204
|
<!-- Input Handle: one grid row (20px) from the top so it aligns with the label, at node edge -->
|
|
199
205
|
<Handle
|
|
200
206
|
type="target"
|
|
201
207
|
position={Position.Left}
|
|
202
208
|
id={`${props.id}-input-${port.id}`}
|
|
203
|
-
class="flowdrop-workflow-node__handle"
|
|
209
|
+
class="flowdrop-workflow-node__handle {boundEntry ? 'flowdrop-handle--bound' : ''}"
|
|
210
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
204
211
|
style="top: var(--fd-node-port-row-height); transform: translateY(-50%); --fd-handle-fill: var(--fd-port-skin-color, {getPortColorToken(
|
|
205
212
|
checker,
|
|
206
213
|
port
|
|
@@ -248,6 +255,7 @@
|
|
|
248
255
|
<div class="flowdrop-workflow-node__ports">
|
|
249
256
|
<div class="flowdrop-workflow-node__ports-list">
|
|
250
257
|
{#each visibleOutputPorts as port (port.id)}
|
|
258
|
+
{@const boundEntry = boundHandles.get(buildHandleId(props.id, 'output', port.id))}
|
|
251
259
|
<div class="flowdrop-workflow-node__port">
|
|
252
260
|
<!-- Port Info: padding lives here so handle position is simple -->
|
|
253
261
|
<div
|
|
@@ -281,7 +289,8 @@
|
|
|
281
289
|
type="source"
|
|
282
290
|
position={Position.Right}
|
|
283
291
|
id={`${props.id}-output-${port.id}`}
|
|
284
|
-
class="flowdrop-workflow-node__handle"
|
|
292
|
+
class="flowdrop-workflow-node__handle {boundEntry ? 'flowdrop-handle--bound' : ''}"
|
|
293
|
+
title={interfaceBoundTooltip(boundEntry)}
|
|
285
294
|
style="top: var(--fd-node-port-row-height); transform: translateY(-50%); --fd-handle-fill: var(--fd-port-skin-color, {getPortColorToken(
|
|
286
295
|
checker,
|
|
287
296
|
port
|
package/dist/core/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export type { WorkflowFormat, BuiltinWorkflowFormat } from '../types/index.js';
|
|
18
18
|
export { DEFAULT_WORKFLOW_FORMAT } from '../types/index.js';
|
|
19
|
-
export type { NodeCategory, BuiltinNodeCategory, CategoryDefinition, NodeDataType, NodePort, DynamicPort, Branch, NodeMetadata, NodeExtensions, NodeUIExtensions, PortsConfig, PortConfigEntry, ConfigValues, WorkflowNode, WorkflowEdge, Workflow, ApiResponse, NodesResponse, WorkflowResponse, WorkflowsResponse, ExecutionStatus, ExecutionResult, FlowDropConfig, WorkflowEvents, BuiltinNodeType, PortConfig, PortCompatibilityRule, ConfigSchema, ConfigProperty, HttpMethod, DynamicSchemaEndpoint, ExternalEditLink, ConfigEditOptions, EdgeCategory, UISchemaElementType, UISchemaElementBase, UISchemaControl, UISchemaVerticalLayout, UISchemaGroup, UISchemaElement } from '../types/index.js';
|
|
19
|
+
export type { NodeCategory, BuiltinNodeCategory, CategoryDefinition, NodeDataType, NodePort, DynamicPort, Branch, NodeMetadata, NodeExtensions, NodeUIExtensions, PortsConfig, PortConfigEntry, PortBinding, WorkflowInterface, WorkflowInterfaceEntry, ConfigValues, WorkflowNode, WorkflowEdge, Workflow, ApiResponse, NodesResponse, WorkflowResponse, WorkflowsResponse, ExecutionStatus, ExecutionResult, FlowDropConfig, WorkflowEvents, BuiltinNodeType, PortConfig, PortCompatibilityRule, ConfigSchema, ConfigProperty, HttpMethod, DynamicSchemaEndpoint, ExternalEditLink, ConfigEditOptions, EdgeCategory, UISchemaElementType, UISchemaElementBase, UISchemaControl, UISchemaVerticalLayout, UISchemaGroup, UISchemaElement } from '../types/index.js';
|
|
20
20
|
export { isUISchemaControl, isUISchemaVerticalLayout, isUISchemaGroup } from '../types/index.js';
|
|
21
21
|
export type { WorkflowEditorConfig, EditorFeatures, UIConfig, APIConfig, ExecutionConfig, StorageConfig } from '../types/config.js';
|
|
22
22
|
export type { AuthProvider, StaticAuthConfig, CallbackAuthConfig } from '../types/auth.js';
|
|
@@ -221,6 +221,7 @@ export declare const defaultMessages: {
|
|
|
221
221
|
readonly workflowSettings: "Workflow Settings";
|
|
222
222
|
readonly workflowSettingsPanelTitle: "Workflow Settings";
|
|
223
223
|
readonly workflowSettingsPanelSubtitle: "Settings";
|
|
224
|
+
readonly workflowSettingsInterfaceTab: "Interface";
|
|
224
225
|
readonly nodeConfigDescription: "Node configuration";
|
|
225
226
|
readonly closeSettings: "Close settings";
|
|
226
227
|
readonly closeConfigModal: "Close configuration modal";
|
|
@@ -517,4 +518,45 @@ export declare const defaultMessages: {
|
|
|
517
518
|
readonly historyLabel: "Runs:";
|
|
518
519
|
};
|
|
519
520
|
};
|
|
521
|
+
readonly workflowInterface: {
|
|
522
|
+
readonly inputsHeading: "Inputs";
|
|
523
|
+
readonly outputsHeading: "Outputs";
|
|
524
|
+
readonly addInput: "Add input";
|
|
525
|
+
readonly addOutput: "Add output";
|
|
526
|
+
readonly noInputs: "No inputs declared yet.";
|
|
527
|
+
readonly noOutputs: "No outputs declared yet.";
|
|
528
|
+
readonly idLabel: "ID";
|
|
529
|
+
readonly nameLabel: "Name";
|
|
530
|
+
readonly descriptionLabel: "Description";
|
|
531
|
+
readonly dataTypeLabel: "Data type";
|
|
532
|
+
readonly dataTypePlaceholder: "Select a data type…";
|
|
533
|
+
readonly namePlaceholder: "Defaults to ID";
|
|
534
|
+
readonly typeMismatchInline: ({ portType }: {
|
|
535
|
+
portType: string;
|
|
536
|
+
}) => string;
|
|
537
|
+
readonly useMatchPortType: "Use port type";
|
|
538
|
+
readonly alreadyConnectedInline: ({ source }: {
|
|
539
|
+
source: string;
|
|
540
|
+
}) => string;
|
|
541
|
+
readonly requiredLabel: "Required";
|
|
542
|
+
readonly defaultValueLabel: "Default value";
|
|
543
|
+
readonly examplesLabel: "Examples";
|
|
544
|
+
readonly addExample: "Add example";
|
|
545
|
+
readonly removeExample: "Remove example";
|
|
546
|
+
readonly bindingLabel: "Bound port";
|
|
547
|
+
readonly bindingUnbound: "Not bound";
|
|
548
|
+
readonly moreOptions: "More options";
|
|
549
|
+
readonly pullFromPort: "Pull from port";
|
|
550
|
+
readonly pullFromPortTitle: "Fill name, data type, description, required and default from the bound port's own declaration";
|
|
551
|
+
readonly removeEntry: ({ id }: {
|
|
552
|
+
id: string;
|
|
553
|
+
}) => string;
|
|
554
|
+
readonly moveUp: ({ id }: {
|
|
555
|
+
id: string;
|
|
556
|
+
}) => string;
|
|
557
|
+
readonly moveDown: ({ id }: {
|
|
558
|
+
id: string;
|
|
559
|
+
}) => string;
|
|
560
|
+
readonly metaDisclosure: "Server metadata (read-only)";
|
|
561
|
+
};
|
|
520
562
|
};
|
|
@@ -200,6 +200,7 @@ export const defaultMessages = {
|
|
|
200
200
|
// Right-sidebar workflow settings panel (distinct from the navbar action label above).
|
|
201
201
|
workflowSettingsPanelTitle: 'Workflow Settings',
|
|
202
202
|
workflowSettingsPanelSubtitle: 'Settings',
|
|
203
|
+
workflowSettingsInterfaceTab: 'Interface',
|
|
203
204
|
nodeConfigDescription: 'Node configuration',
|
|
204
205
|
closeSettings: 'Close settings',
|
|
205
206
|
closeConfigModal: 'Close configuration modal',
|
|
@@ -436,5 +437,38 @@ export const defaultMessages = {
|
|
|
436
437
|
errorLabel: 'Error:',
|
|
437
438
|
historyLabel: 'Runs:'
|
|
438
439
|
}
|
|
440
|
+
},
|
|
441
|
+
// WorkflowInterfaceEditor — the canonical panel for authoring a workflow's
|
|
442
|
+
// public contract (`Workflow.interface`). See `.claude/plans/workflow-interface.md`.
|
|
443
|
+
workflowInterface: {
|
|
444
|
+
inputsHeading: 'Inputs',
|
|
445
|
+
outputsHeading: 'Outputs',
|
|
446
|
+
addInput: 'Add input',
|
|
447
|
+
addOutput: 'Add output',
|
|
448
|
+
noInputs: 'No inputs declared yet.',
|
|
449
|
+
noOutputs: 'No outputs declared yet.',
|
|
450
|
+
idLabel: 'ID',
|
|
451
|
+
nameLabel: 'Name',
|
|
452
|
+
descriptionLabel: 'Description',
|
|
453
|
+
dataTypeLabel: 'Data type',
|
|
454
|
+
dataTypePlaceholder: 'Select a data type…',
|
|
455
|
+
namePlaceholder: 'Defaults to ID',
|
|
456
|
+
typeMismatchInline: ({ portType }) => `Doesn't match the bound port's type (${portType}).`,
|
|
457
|
+
useMatchPortType: 'Use port type',
|
|
458
|
+
alreadyConnectedInline: ({ source }) => `This port already receives a value from "${source}".`,
|
|
459
|
+
requiredLabel: 'Required',
|
|
460
|
+
defaultValueLabel: 'Default value',
|
|
461
|
+
examplesLabel: 'Examples',
|
|
462
|
+
addExample: 'Add example',
|
|
463
|
+
removeExample: 'Remove example',
|
|
464
|
+
bindingLabel: 'Bound port',
|
|
465
|
+
bindingUnbound: 'Not bound',
|
|
466
|
+
moreOptions: 'More options',
|
|
467
|
+
pullFromPort: 'Pull from port',
|
|
468
|
+
pullFromPortTitle: "Fill name, data type, description, required and default from the bound port's own declaration",
|
|
469
|
+
removeEntry: ({ id }) => `Remove interface entry "${id}"`,
|
|
470
|
+
moveUp: ({ id }) => `Move "${id}" up`,
|
|
471
|
+
moveDown: ({ id }) => `Move "${id}" down`,
|
|
472
|
+
metaDisclosure: 'Server metadata (read-only)'
|
|
439
473
|
}
|
|
440
474
|
};
|
|
@@ -3978,6 +3978,108 @@ components:
|
|
|
3978
3978
|
- schemaVersion
|
|
3979
3979
|
- createdAt
|
|
3980
3980
|
- updatedAt
|
|
3981
|
+
PortBinding:
|
|
3982
|
+
type: object
|
|
3983
|
+
description: |
|
|
3984
|
+
A resolved pointer to one inner node port, used by `WorkflowInterfaceEntry.bindings`.
|
|
3985
|
+
properties:
|
|
3986
|
+
nodeId:
|
|
3987
|
+
type: string
|
|
3988
|
+
format: uuid
|
|
3989
|
+
description: Node instance UUID (references `WorkflowNode.id`)
|
|
3990
|
+
portId:
|
|
3991
|
+
type: string
|
|
3992
|
+
description: Port ID on that node (references a `NodePort.id` in the node's metadata)
|
|
3993
|
+
required:
|
|
3994
|
+
- nodeId
|
|
3995
|
+
- portId
|
|
3996
|
+
WorkflowInterfaceEntry:
|
|
3997
|
+
type: object
|
|
3998
|
+
description: |
|
|
3999
|
+
One entry in a workflow's public contract (see `WorkflowInterface`). Owns its own
|
|
4000
|
+
identity: `id` is stable and unique within its direction (inputs and outputs are
|
|
4001
|
+
scoped separately), independent of whichever inner port it currently binds to —
|
|
4002
|
+
swapping or renaming a node does not silently break callers.
|
|
4003
|
+
|
|
4004
|
+
On export toward a server manifest the entry's `id` maps to the manifest's `name`
|
|
4005
|
+
— the server's wire identity. Renaming an `id` is therefore a breaking change for
|
|
4006
|
+
callers, not a cosmetic one.
|
|
4007
|
+
|
|
4008
|
+
Every entry — input or output — must resolve to exactly one binding; more than
|
|
4009
|
+
one is reported as `over-bound`. An empty `bindings` list is a valid *draft*
|
|
4010
|
+
state, reported as `unbound`.
|
|
4011
|
+
properties:
|
|
4012
|
+
id:
|
|
4013
|
+
type: string
|
|
4014
|
+
description: Stable public name. Unique within its direction (inputs vs outputs).
|
|
4015
|
+
example: customerName
|
|
4016
|
+
name:
|
|
4017
|
+
type: string
|
|
4018
|
+
description: Display label for callers and UI. Defaults to `id` when absent.
|
|
4019
|
+
description:
|
|
4020
|
+
type: string
|
|
4021
|
+
description: Help text describing what this entry represents to external callers.
|
|
4022
|
+
dataType:
|
|
4023
|
+
$ref: '#/components/schemas/NodeDataType'
|
|
4024
|
+
required:
|
|
4025
|
+
type: boolean
|
|
4026
|
+
description: Whether callers must supply a value. Inputs only; ignored on outputs.
|
|
4027
|
+
defaultValue:
|
|
4028
|
+
description: Default value used when no external value is supplied. Inputs only.
|
|
4029
|
+
examples:
|
|
4030
|
+
type: array
|
|
4031
|
+
items: {}
|
|
4032
|
+
description: |
|
|
4033
|
+
Example values a caller could supply — author metadata for documentation
|
|
4034
|
+
and launch forms, mirroring the server manifest's `examples`. Inputs
|
|
4035
|
+
only; ignored on outputs. Never validated against `schema`.
|
|
4036
|
+
schema:
|
|
4037
|
+
$ref: '#/components/schemas/PortDataSchema'
|
|
4038
|
+
description: JSON Schema describing the structure of data carried by this entry.
|
|
4039
|
+
bindings:
|
|
4040
|
+
type: array
|
|
4041
|
+
items:
|
|
4042
|
+
$ref: '#/components/schemas/PortBinding'
|
|
4043
|
+
description: |
|
|
4044
|
+
Inner ports this entry maps to. Every entry must resolve to exactly one
|
|
4045
|
+
binding; more than one is reported as `over-bound` (the list shape is kept
|
|
4046
|
+
so input fan-out can become additive later). An empty list is a valid
|
|
4047
|
+
draft state, reported as `unbound`. The bound port must also be
|
|
4048
|
+
canvas-exposed (see `NodePort.exposedByDefault` / `config.ports`) — a
|
|
4049
|
+
bound-but-hidden port is reported as `hidden`.
|
|
4050
|
+
meta:
|
|
4051
|
+
type: object
|
|
4052
|
+
additionalProperties: true
|
|
4053
|
+
description: |
|
|
4054
|
+
Opaque consumer metadata. The library never reads or interprets this field
|
|
4055
|
+
— it round-trips verbatim on every read/write. Servers use it to say what
|
|
4056
|
+
"external" means for them, e.g. `{"http": {"in": "query"}}` or
|
|
4057
|
+
`{"mcp": {"toolParam": true}}`.
|
|
4058
|
+
|
|
4059
|
+
Keys under the `fd.` prefix are reserved for future library use — consumers
|
|
4060
|
+
must not write keys starting with `fd.`.
|
|
4061
|
+
required:
|
|
4062
|
+
- id
|
|
4063
|
+
- dataType
|
|
4064
|
+
- bindings
|
|
4065
|
+
WorkflowInterface:
|
|
4066
|
+
type: object
|
|
4067
|
+
description: |
|
|
4068
|
+
A workflow's public contract: named inputs/outputs that external callers supply
|
|
4069
|
+
or receive, each pointing at an inner node port via a binding. Array order is
|
|
4070
|
+
the caller-facing order. Absent on a `Workflow` means the workflow declares no
|
|
4071
|
+
interface, not an empty one.
|
|
4072
|
+
properties:
|
|
4073
|
+
inputs:
|
|
4074
|
+
type: array
|
|
4075
|
+
items:
|
|
4076
|
+
$ref: '#/components/schemas/WorkflowInterfaceEntry'
|
|
4077
|
+
description: Named inputs external callers supply.
|
|
4078
|
+
outputs:
|
|
4079
|
+
type: array
|
|
4080
|
+
items:
|
|
4081
|
+
$ref: '#/components/schemas/WorkflowInterfaceEntry'
|
|
4082
|
+
description: Named outputs external callers receive.
|
|
3981
4083
|
Workflow:
|
|
3982
4084
|
type: object
|
|
3983
4085
|
properties:
|
|
@@ -4010,6 +4112,9 @@ components:
|
|
|
4010
4112
|
type: object
|
|
4011
4113
|
description: Custom workflow-level configuration values. Populated when a workflowSettingsSchema is provided to the editor.
|
|
4012
4114
|
additionalProperties: true
|
|
4115
|
+
interface:
|
|
4116
|
+
$ref: '#/components/schemas/WorkflowInterface'
|
|
4117
|
+
description: Public contract for callers. Absent = the workflow declares no interface.
|
|
4013
4118
|
required:
|
|
4014
4119
|
- id
|
|
4015
4120
|
- name
|