@flowdrop/flowdrop 1.14.0 → 2.0.0-beta.1
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 +475 -0
- package/MIGRATION-2.0.md +472 -0
- package/README.md +23 -23
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +14 -8
- package/dist/adapters/agentspec/AgentSpecAdapter.js +7 -7
- package/dist/chat/batchFeedback.d.ts +39 -0
- package/dist/chat/batchFeedback.js +51 -0
- package/dist/commands/executor.js +15 -1
- package/dist/commands/storeIntegration.svelte.d.ts +4 -1
- package/dist/commands/storeIntegration.svelte.js +26 -21
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/App.svelte +162 -192
- package/dist/components/App.svelte.d.ts +47 -8
- package/dist/components/ConfigForm.svelte +110 -66
- package/dist/components/ConfigModal.svelte +7 -2
- package/dist/components/ConnectionLine.svelte +4 -2
- package/dist/components/Navbar.svelte +61 -1
- package/dist/components/NodeSidebar.svelte +27 -45
- package/dist/components/NodeStatusOverlay.svelte +94 -6
- package/dist/components/NodeSwapPicker.svelte +10 -8
- package/dist/components/PipelineStatus.svelte +16 -67
- package/dist/components/PortCoordinateTracker.svelte +5 -6
- package/dist/components/SchemaForm.stories.svelte +1 -3
- package/dist/components/SchemaForm.svelte +45 -40
- package/dist/components/SchemaForm.svelte.d.ts +0 -8
- package/dist/components/SettingsModal.svelte +8 -3
- package/dist/components/SettingsPanel.svelte +20 -4
- package/dist/components/SwapMappingEditor.svelte +67 -49
- package/dist/components/SwapMappingEditor.svelte.d.ts +0 -2
- package/dist/components/UniversalNode.svelte +9 -7
- package/dist/components/WorkflowEditor.svelte +118 -111
- package/dist/components/WorkflowEditor.svelte.d.ts +18 -10
- package/dist/components/chat/AIChatPanel.svelte +93 -89
- package/dist/components/chat/AIChatPanel.svelte.d.ts +0 -4
- package/dist/components/chat/CommandPreview.svelte +2 -1
- package/dist/components/console/CommandConsole.svelte +7 -5
- package/dist/components/console/ConsoleAutocomplete.svelte +10 -11
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleInput.svelte +15 -6
- package/dist/components/console/ConsoleOutput.svelte +2 -1
- package/dist/components/form/FormArray.svelte +5 -9
- package/dist/components/form/FormArray.svelte.d.ts +2 -1
- package/dist/components/form/FormAutocomplete.svelte +29 -13
- package/dist/components/form/FormField.svelte +4 -2
- package/dist/components/form/FormFieldLight.svelte +4 -2
- package/dist/components/form/FormMarkdownEditor.svelte +9 -4
- package/dist/components/form/FormRangeField.svelte +1 -0
- package/dist/components/form/FormTemplateEditor.svelte +11 -3
- package/dist/components/form/FormToggle.svelte +5 -12
- package/dist/components/form/FormToggle.svelte.d.ts +4 -2
- package/dist/components/form/templateAutocomplete.js +1 -5
- package/dist/components/form/types.d.ts +1 -14
- package/dist/components/interrupt/FormPrompt.svelte +3 -2
- package/dist/components/interrupt/InterruptBubble.svelte +16 -17
- package/dist/components/interrupt/ReviewPrompt.svelte +10 -3
- package/dist/components/interrupt/TextInputPrompt.svelte +2 -1
- package/dist/components/layouts/MainLayout.svelte +20 -13
- package/dist/components/layouts/MainLayout.svelte.d.ts +4 -0
- package/dist/components/nodes/AtomNode.svelte +292 -0
- package/dist/components/nodes/AtomNode.svelte.d.ts +26 -0
- package/dist/components/nodes/GatewayNode.svelte +19 -10
- package/dist/components/nodes/IdeaNode.svelte +7 -0
- package/dist/components/nodes/SimpleNode.svelte +11 -6
- package/dist/components/nodes/SquareNode.svelte +15 -8
- package/dist/components/nodes/TerminalNode.svelte +9 -4
- package/dist/components/nodes/ToolNode.svelte +7 -1
- package/dist/components/nodes/WorkflowNode.svelte +16 -7
- package/dist/components/playground/ChatInput.svelte +11 -14
- package/dist/components/playground/ChatPanel.svelte +6 -49
- package/dist/components/playground/ChatPanel.svelte.d.ts +0 -14
- package/dist/components/playground/ControlPanel.svelte +134 -123
- package/dist/components/playground/ControlPanel.svelte.d.ts +3 -0
- package/dist/components/playground/ExecutionLogs.svelte +11 -9
- package/dist/components/playground/InputCollector.svelte +11 -9
- package/dist/components/playground/MessageStream.svelte +17 -23
- package/dist/components/playground/PipelineKanbanView.svelte +65 -6
- package/dist/components/playground/PipelinePanel.svelte +11 -5
- package/dist/components/playground/PipelineTableView.svelte +186 -44
- package/dist/components/playground/Playground.svelte +95 -92
- package/dist/components/playground/Playground.svelte.d.ts +2 -0
- package/dist/components/playground/PlaygroundApp.svelte +6 -1
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundModal.svelte +13 -3
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundStudio.svelte +34 -32
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +3 -0
- package/dist/components/playground/SessionManager.svelte +9 -12
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +28 -0
- package/dist/components/playground/pipelineViewUtils.svelte.js +38 -1
- package/dist/config/endpoints.d.ts +0 -7
- package/dist/config/endpoints.js +2 -10
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +6 -6
- package/dist/display/index.d.ts +0 -2
- package/dist/display/index.js +0 -6
- package/dist/editor/index.d.ts +19 -20
- package/dist/editor/index.js +25 -35
- package/dist/form/code.d.ts +25 -15
- package/dist/form/code.js +44 -41
- package/dist/form/fieldRegistry.d.ts +17 -13
- package/dist/form/fieldRegistry.js +32 -12
- package/dist/form/full.d.ts +17 -13
- package/dist/form/full.js +22 -27
- package/dist/form/index.d.ts +3 -3
- package/dist/form/index.js +3 -3
- package/dist/form/markdown.d.ts +13 -8
- package/dist/form/markdown.js +22 -23
- package/dist/helpers/proximityConnect.d.ts +7 -3
- package/dist/helpers/proximityConnect.js +19 -6
- package/dist/helpers/workflowEditorHelper.d.ts +12 -5
- package/dist/helpers/workflowEditorHelper.js +27 -25
- package/dist/index.d.ts +28 -24
- package/dist/index.js +27 -50
- package/dist/messages/defaults.d.ts +2 -5
- package/dist/messages/defaults.js +3 -6
- package/dist/messages/index.d.ts +0 -1
- package/dist/messages/index.js +0 -1
- package/dist/mocks/app-forms.d.ts +6 -2
- package/dist/mocks/app-forms.js +11 -4
- package/dist/openapi/v1/openapi.yaml +227 -164
- package/dist/playground/index.d.ts +2 -3
- package/dist/playground/index.js +2 -30
- package/dist/playground/mount.d.ts +15 -0
- package/dist/playground/mount.js +46 -20
- package/dist/registry/{BaseRegistry.d.ts → BaseRegistry.svelte.d.ts} +22 -1
- package/dist/registry/{BaseRegistry.js → BaseRegistry.svelte.js} +37 -1
- package/dist/registry/builtinFormats.d.ts +9 -18
- package/dist/registry/builtinFormats.js +9 -39
- package/dist/registry/builtinNodes.d.ts +1 -26
- package/dist/registry/builtinNodes.js +14 -50
- package/dist/registry/index.d.ts +3 -4
- package/dist/registry/index.js +4 -6
- package/dist/registry/nodeComponentRegistry.d.ts +182 -15
- package/dist/registry/nodeComponentRegistry.js +235 -17
- package/dist/registry/workflowFormatRegistry.d.ts +14 -9
- package/dist/registry/workflowFormatRegistry.js +24 -8
- package/dist/{schema → schemas}/index.d.ts +2 -2
- package/dist/{schema → schemas}/index.js +2 -2
- package/dist/schemas/v1/workflow.schema.json +53 -6
- package/dist/services/agentSpecExecutionService.js +0 -1
- package/dist/services/apiVariableService.d.ts +2 -1
- package/dist/services/apiVariableService.js +5 -22
- package/dist/services/autoSaveService.d.ts +7 -0
- package/dist/services/autoSaveService.js +6 -4
- package/dist/services/chatService.d.ts +8 -4
- package/dist/services/chatService.js +15 -15
- package/dist/services/draftStorage.d.ts +129 -13
- package/dist/services/draftStorage.js +185 -37
- package/dist/services/dynamicSchemaService.d.ts +2 -1
- package/dist/services/dynamicSchemaService.js +5 -22
- package/dist/services/globalSave.d.ts +13 -12
- package/dist/services/globalSave.js +29 -51
- package/dist/services/historyService.d.ts +9 -3
- package/dist/services/historyService.js +9 -3
- package/dist/services/interruptService.d.ts +14 -9
- package/dist/services/interruptService.js +27 -27
- package/dist/services/nodeExecutionService.d.ts +18 -3
- package/dist/services/nodeExecutionService.js +71 -45
- package/dist/services/playgroundService.d.ts +14 -9
- package/dist/services/playgroundService.js +31 -30
- package/dist/services/variableService.d.ts +2 -1
- package/dist/services/variableService.js +2 -2
- package/dist/services/workflowStorage.js +6 -6
- package/dist/stores/apiContext.d.ts +45 -0
- package/dist/stores/apiContext.js +65 -0
- package/dist/stores/categoriesStore.svelte.d.ts +28 -23
- package/dist/stores/categoriesStore.svelte.js +70 -64
- package/dist/stores/getInstance.svelte.d.ts +39 -0
- package/dist/stores/getInstance.svelte.js +65 -0
- package/dist/stores/historyStore.svelte.d.ts +77 -93
- package/dist/stores/historyStore.svelte.js +134 -160
- package/dist/stores/instanceContainer.svelte.d.ts +111 -0
- package/dist/stores/instanceContainer.svelte.js +114 -0
- package/dist/stores/interruptStore.svelte.d.ts +112 -82
- package/dist/stores/interruptStore.svelte.js +253 -226
- package/dist/stores/pipelinePanelStore.svelte.d.ts +27 -3
- package/dist/stores/pipelinePanelStore.svelte.js +61 -14
- package/dist/stores/playgroundStore.svelte.d.ts +169 -216
- package/dist/stores/playgroundStore.svelte.js +515 -572
- package/dist/stores/portCoordinateStore.svelte.d.ts +57 -51
- package/dist/stores/portCoordinateStore.svelte.js +109 -98
- package/dist/stores/settingsStore.svelte.d.ts +4 -1
- package/dist/stores/settingsStore.svelte.js +47 -12
- package/dist/stores/workflowStore.svelte.d.ts +178 -213
- package/dist/stores/workflowStore.svelte.js +449 -501
- package/dist/stories/EdgeDecorator.svelte +5 -2
- package/dist/stories/NodeDecorator.svelte +5 -3
- package/dist/svelte-app.d.ts +60 -10
- package/dist/svelte-app.js +157 -53
- package/dist/types/events.d.ts +6 -3
- package/dist/types/index.d.ts +71 -6
- package/dist/types/navbar.d.ts +7 -0
- package/dist/types/playground.d.ts +18 -3
- package/dist/types/settings.d.ts +13 -0
- package/dist/types/settings.js +1 -0
- package/dist/utils/colors.d.ts +47 -21
- package/dist/utils/colors.js +69 -68
- package/dist/utils/connections.d.ts +9 -15
- package/dist/utils/connections.js +13 -32
- package/dist/utils/duration.d.ts +13 -0
- package/dist/utils/duration.js +45 -0
- package/dist/utils/formMerge.d.ts +36 -0
- package/dist/utils/formMerge.js +70 -0
- package/dist/utils/icons.d.ts +5 -2
- package/dist/utils/icons.js +6 -5
- package/dist/utils/nodeSwap.d.ts +6 -2
- package/dist/utils/nodeSwap.js +62 -126
- package/dist/utils/nodeTypes.d.ts +17 -8
- package/dist/utils/nodeTypes.js +27 -19
- package/dist/utils/performanceUtils.js +7 -0
- package/package.json +6 -5
- package/dist/messages/deprecation.d.ts +0 -20
- package/dist/messages/deprecation.js +0 -33
- package/dist/registry/plugin.d.ts +0 -215
- package/dist/registry/plugin.js +0 -249
- package/dist/services/api.d.ts +0 -129
- package/dist/services/api.js +0 -217
|
@@ -2522,9 +2522,11 @@ components:
|
|
|
2522
2522
|
- note
|
|
2523
2523
|
- simple
|
|
2524
2524
|
- square
|
|
2525
|
+
- atom
|
|
2525
2526
|
- tool
|
|
2526
2527
|
- gateway
|
|
2527
2528
|
- terminal
|
|
2529
|
+
- idea
|
|
2528
2530
|
- default
|
|
2529
2531
|
description: |
|
|
2530
2532
|
Visual rendering type for the node.
|
|
@@ -2533,9 +2535,11 @@ components:
|
|
|
2533
2535
|
- `note` - Sticky note with markdown support
|
|
2534
2536
|
- `simple` - Compact layout with header and description
|
|
2535
2537
|
- `square` - Minimal square node with centered icon
|
|
2538
|
+
- `atom` - Minimal label-only pill/rectangle for value/transform nodes (uses extensions.ui.atom)
|
|
2536
2539
|
- `tool` - Specialized node for agent tools
|
|
2537
2540
|
- `gateway` - Branching control flow with dynamic branches (uses config.branches)
|
|
2538
2541
|
- `terminal` - Circular node for workflow start/end/exit points
|
|
2542
|
+
- `idea` - Conceptual idea node for BPMN-like flow diagrams
|
|
2539
2543
|
- `default` - Full-featured workflow node with dynamic port support
|
|
2540
2544
|
|
|
2541
2545
|
## Dynamic Port Support
|
|
@@ -3047,6 +3051,122 @@ components:
|
|
|
3047
3051
|
required:
|
|
3048
3052
|
- type
|
|
3049
3053
|
- properties
|
|
3054
|
+
TemplateVariablesConfig:
|
|
3055
|
+
type: object
|
|
3056
|
+
description: |
|
|
3057
|
+
Configuration for template variable autocomplete in template fields.
|
|
3058
|
+
|
|
3059
|
+
## Overview
|
|
3060
|
+
|
|
3061
|
+
When a template field is connected to upstream nodes that have output schemas,
|
|
3062
|
+
FlowDrop automatically derives available variables for autocomplete. This config
|
|
3063
|
+
controls which ports provide variables and how they are presented.
|
|
3064
|
+
|
|
3065
|
+
## Variable Derivation
|
|
3066
|
+
|
|
3067
|
+
Variables are derived from connected upstream nodes' **output port schemas**.
|
|
3068
|
+
When an output port has a `schema` property with `properties`, those properties
|
|
3069
|
+
become available as template variables.
|
|
3070
|
+
|
|
3071
|
+
### Default Behavior (includePortName: false)
|
|
3072
|
+
|
|
3073
|
+
Schema properties are **unpacked as top-level variables**:
|
|
3074
|
+
|
|
3075
|
+
```
|
|
3076
|
+
HTTP Request node (output port "json" with schema):
|
|
3077
|
+
schema.properties: { user: {...}, orders: {...} }
|
|
3078
|
+
↓
|
|
3079
|
+
Template variables: {{ user }}, {{ orders }}
|
|
3080
|
+
```
|
|
3081
|
+
|
|
3082
|
+
### With includePortName: true
|
|
3083
|
+
|
|
3084
|
+
Variables are **prefixed with the port name**:
|
|
3085
|
+
|
|
3086
|
+
```
|
|
3087
|
+
Same schema as above:
|
|
3088
|
+
↓
|
|
3089
|
+
Template variables: {{ data.user }}, {{ data.orders }}
|
|
3090
|
+
```
|
|
3091
|
+
|
|
3092
|
+
## Nested Property Access
|
|
3093
|
+
|
|
3094
|
+
The autocomplete supports drilling into nested structures:
|
|
3095
|
+
|
|
3096
|
+
- **Dot notation**: `{{ user.address.city }}`
|
|
3097
|
+
- **Array indices**: `{{ orders[0].product_name }}`
|
|
3098
|
+
- **Combined**: `{{ user.orders[0].items[1].price }}`
|
|
3099
|
+
properties:
|
|
3100
|
+
ports:
|
|
3101
|
+
type: array
|
|
3102
|
+
items:
|
|
3103
|
+
type: string
|
|
3104
|
+
description: |
|
|
3105
|
+
Specifies which input port IDs should provide variables for autocomplete.
|
|
3106
|
+
Only connections to these ports will contribute variables.
|
|
3107
|
+
|
|
3108
|
+
**Behavior:**
|
|
3109
|
+
- If not specified: All input ports with connections are used
|
|
3110
|
+
- If empty array `[]`: No variables derived from ports (use with `schema` for static variables)
|
|
3111
|
+
- If specified: Only the listed ports contribute variables
|
|
3112
|
+
|
|
3113
|
+
**Example:** A node with inputs "data", "context", and "trigger":
|
|
3114
|
+
- `ports: ["data"]` - Only variables from the "data" connection
|
|
3115
|
+
- `ports: ["data", "context"]` - Variables from both connections
|
|
3116
|
+
- Not specified - Variables from all non-trigger connections
|
|
3117
|
+
example:
|
|
3118
|
+
- data
|
|
3119
|
+
- context
|
|
3120
|
+
schema:
|
|
3121
|
+
$ref: '#/components/schemas/VariableSchema'
|
|
3122
|
+
description: |
|
|
3123
|
+
Pre-defined variable schema to provide static variables or override derived ones.
|
|
3124
|
+
|
|
3125
|
+
When both `ports` and `schema` are specified, variables are **merged**:
|
|
3126
|
+
- Variables from connected ports are computed first
|
|
3127
|
+
- Static `schema` variables are added/override existing ones
|
|
3128
|
+
|
|
3129
|
+
**Use cases:**
|
|
3130
|
+
- Provide variables that don't come from connections
|
|
3131
|
+
- Override labels or descriptions for derived variables
|
|
3132
|
+
- Add custom variables for specific use cases
|
|
3133
|
+
includePortName:
|
|
3134
|
+
type: boolean
|
|
3135
|
+
default: false
|
|
3136
|
+
description: |
|
|
3137
|
+
Controls how variables are named when derived from port schemas.
|
|
3138
|
+
|
|
3139
|
+
**When false (default):**
|
|
3140
|
+
Schema properties become top-level variables directly.
|
|
3141
|
+
A port with schema `{ user: {...}, orders: {...} }` produces:
|
|
3142
|
+
- `{{ user }}`
|
|
3143
|
+
- `{{ orders }}`
|
|
3144
|
+
|
|
3145
|
+
**When true:**
|
|
3146
|
+
Variables are prefixed with the input port name.
|
|
3147
|
+
Same schema connected to input port "data" produces:
|
|
3148
|
+
- `{{ data.user }}`
|
|
3149
|
+
- `{{ data.orders }}`
|
|
3150
|
+
|
|
3151
|
+
**When to use true:**
|
|
3152
|
+
- Multiple input ports with potentially overlapping property names
|
|
3153
|
+
- You want to be explicit about data sources in templates
|
|
3154
|
+
- Backward compatibility with existing templates
|
|
3155
|
+
showHints:
|
|
3156
|
+
type: boolean
|
|
3157
|
+
default: true
|
|
3158
|
+
description: |
|
|
3159
|
+
Whether to display clickable variable hints below the editor.
|
|
3160
|
+
|
|
3161
|
+
When enabled, shows a row of buttons for top-level variables that users
|
|
3162
|
+
can click to insert `{{ variableName }}` at the cursor position.
|
|
3163
|
+
|
|
3164
|
+
Disable if the variable list is too long or not useful.
|
|
3165
|
+
example:
|
|
3166
|
+
ports:
|
|
3167
|
+
- data
|
|
3168
|
+
showHints: true
|
|
3169
|
+
includePortName: false
|
|
3050
3170
|
NodePort:
|
|
3051
3171
|
type: object
|
|
3052
3172
|
description: |
|
|
@@ -3141,6 +3261,51 @@ components:
|
|
|
3141
3261
|
- name
|
|
3142
3262
|
- type
|
|
3143
3263
|
- dataType
|
|
3264
|
+
VariableSchema:
|
|
3265
|
+
type: object
|
|
3266
|
+
description: |
|
|
3267
|
+
Schema passed to template editor for autocomplete functionality.
|
|
3268
|
+
Contains all available variables derived from connected upstream nodes.
|
|
3269
|
+
|
|
3270
|
+
This is computed by the frontend based on:
|
|
3271
|
+
1. Finding all edges that connect to the current node's input ports
|
|
3272
|
+
2. Getting the output schemas from the source nodes' output ports
|
|
3273
|
+
3. Building a hierarchical variable structure for autocomplete
|
|
3274
|
+
properties:
|
|
3275
|
+
variables:
|
|
3276
|
+
type: object
|
|
3277
|
+
additionalProperties:
|
|
3278
|
+
$ref: '#/components/schemas/TemplateVariable'
|
|
3279
|
+
description: Map of available variables keyed by variable name
|
|
3280
|
+
required:
|
|
3281
|
+
- variables
|
|
3282
|
+
example:
|
|
3283
|
+
variables:
|
|
3284
|
+
user:
|
|
3285
|
+
name: user
|
|
3286
|
+
type: object
|
|
3287
|
+
label: User Data
|
|
3288
|
+
properties:
|
|
3289
|
+
name:
|
|
3290
|
+
name: name
|
|
3291
|
+
type: string
|
|
3292
|
+
email:
|
|
3293
|
+
name: email
|
|
3294
|
+
type: string
|
|
3295
|
+
items:
|
|
3296
|
+
name: items
|
|
3297
|
+
type: array
|
|
3298
|
+
label: Order Items
|
|
3299
|
+
items:
|
|
3300
|
+
name: item
|
|
3301
|
+
type: object
|
|
3302
|
+
properties:
|
|
3303
|
+
product_name:
|
|
3304
|
+
name: product_name
|
|
3305
|
+
type: string
|
|
3306
|
+
price:
|
|
3307
|
+
name: price
|
|
3308
|
+
type: number
|
|
3144
3309
|
DynamicPort:
|
|
3145
3310
|
type: object
|
|
3146
3311
|
description: |
|
|
@@ -3219,6 +3384,59 @@ components:
|
|
|
3219
3384
|
description: Route for high priority items
|
|
3220
3385
|
condition: priority === 'high'
|
|
3221
3386
|
isDefault: false
|
|
3387
|
+
AtomUIConfig:
|
|
3388
|
+
type: object
|
|
3389
|
+
description: |
|
|
3390
|
+
Display/behaviour settings for minimalist `atom` nodes (e.g. Constant, Cast).
|
|
3391
|
+
Lives under `extensions.ui.atom`. The atom renderer reads these to decide what
|
|
3392
|
+
to show, and `valueTypeKey` drives the bound output port's `dataType` from
|
|
3393
|
+
config so connection validation matches the type the user picked.
|
|
3394
|
+
|
|
3395
|
+
All fields are optional — an empty object renders a label-only pill using the
|
|
3396
|
+
node's `label`.
|
|
3397
|
+
properties:
|
|
3398
|
+
valueKey:
|
|
3399
|
+
type: string
|
|
3400
|
+
description: |
|
|
3401
|
+
Config key whose value becomes the node body text.
|
|
3402
|
+
Falls back to the node `label` when unset or empty.
|
|
3403
|
+
example: value
|
|
3404
|
+
valueTypeKey:
|
|
3405
|
+
type: string
|
|
3406
|
+
description: |
|
|
3407
|
+
Config key holding the selected value's type (a port dataType id).
|
|
3408
|
+
The bound output port adopts this dataType.
|
|
3409
|
+
example: valueType
|
|
3410
|
+
outputPortId:
|
|
3411
|
+
type: string
|
|
3412
|
+
description: |
|
|
3413
|
+
Output port id driven by `valueTypeKey`.
|
|
3414
|
+
Defaults to the first output port when unset.
|
|
3415
|
+
example: value
|
|
3416
|
+
shape:
|
|
3417
|
+
type: string
|
|
3418
|
+
enum:
|
|
3419
|
+
- pill
|
|
3420
|
+
- rectangle
|
|
3421
|
+
default: pill
|
|
3422
|
+
description: |
|
|
3423
|
+
Body shape. `pill` (default) is fully rounded; `rectangle` is lightly rounded.
|
|
3424
|
+
example: rectangle
|
|
3425
|
+
prefix:
|
|
3426
|
+
type: string
|
|
3427
|
+
description: |
|
|
3428
|
+
Dimmed affordance rendered before the body (e.g. `"→ "` to mark a transform).
|
|
3429
|
+
Stays visible while the body value ellipsizes. Hidden in the empty state.
|
|
3430
|
+
example: '→ '
|
|
3431
|
+
placeholder:
|
|
3432
|
+
type: string
|
|
3433
|
+
description: Text shown (dimmed) when the resolved body value is empty/unset.
|
|
3434
|
+
example: empty
|
|
3435
|
+
maxWidth:
|
|
3436
|
+
type: integer
|
|
3437
|
+
description: Max body width in px before the label ellipsizes.
|
|
3438
|
+
example: 200
|
|
3439
|
+
additionalProperties: false
|
|
3222
3440
|
NodeUIExtensions:
|
|
3223
3441
|
type: object
|
|
3224
3442
|
description: |
|
|
@@ -3238,6 +3456,8 @@ components:
|
|
|
3238
3456
|
When true, only ports with active connections are displayed.
|
|
3239
3457
|
Useful for nodes with many optional ports.
|
|
3240
3458
|
example: true
|
|
3459
|
+
atom:
|
|
3460
|
+
$ref: '#/components/schemas/AtomUIConfig'
|
|
3241
3461
|
style:
|
|
3242
3462
|
type: object
|
|
3243
3463
|
additionalProperties: true
|
|
@@ -3475,10 +3695,12 @@ components:
|
|
|
3475
3695
|
- `default`: Standard workflow node with full details
|
|
3476
3696
|
- `simple`: Compact layout with minimal chrome
|
|
3477
3697
|
- `square`: Geometric square layout (icon-only)
|
|
3698
|
+
- `atom`: Minimal label-only pill/rectangle (uses extensions.ui.atom)
|
|
3478
3699
|
- `tool`: Specialized style for agent tools
|
|
3479
3700
|
- `gateway`: Branching control flow visualization
|
|
3480
3701
|
- `terminal`: Start/end/exit node styling
|
|
3481
3702
|
- `note`: Sticky note style for annotations
|
|
3703
|
+
- `idea`: Conceptual idea node for BPMN-like flow diagrams
|
|
3482
3704
|
|
|
3483
3705
|
The node's `metadata.supportedTypes` defines which types are allowed.
|
|
3484
3706
|
If invalid or missing, falls back to `metadata.type` or "default".
|
|
@@ -3486,10 +3708,12 @@ components:
|
|
|
3486
3708
|
- default
|
|
3487
3709
|
- simple
|
|
3488
3710
|
- square
|
|
3711
|
+
- atom
|
|
3489
3712
|
- tool
|
|
3490
3713
|
- gateway
|
|
3491
3714
|
- terminal
|
|
3492
3715
|
- note
|
|
3716
|
+
- idea
|
|
3493
3717
|
example: simple
|
|
3494
3718
|
dynamicInputs:
|
|
3495
3719
|
type: array
|
|
@@ -3699,9 +3923,9 @@ components:
|
|
|
3699
3923
|
WorkflowMetadata:
|
|
3700
3924
|
type: object
|
|
3701
3925
|
properties:
|
|
3702
|
-
|
|
3926
|
+
schemaVersion:
|
|
3703
3927
|
type: string
|
|
3704
|
-
description: Workflow version
|
|
3928
|
+
description: Workflow schema format version — identifies the document format, not the workflow's own revision.
|
|
3705
3929
|
example: 1.0.0
|
|
3706
3930
|
createdAt:
|
|
3707
3931
|
type: string
|
|
@@ -3739,7 +3963,7 @@ components:
|
|
|
3739
3963
|
example: flowdrop
|
|
3740
3964
|
default: flowdrop
|
|
3741
3965
|
required:
|
|
3742
|
-
-
|
|
3966
|
+
- schemaVersion
|
|
3743
3967
|
- createdAt
|
|
3744
3968
|
- updatedAt
|
|
3745
3969
|
Workflow:
|
|
@@ -5942,167 +6166,6 @@ components:
|
|
|
5942
6166
|
name: country
|
|
5943
6167
|
type: string
|
|
5944
6168
|
label: Country
|
|
5945
|
-
VariableSchema:
|
|
5946
|
-
type: object
|
|
5947
|
-
description: |
|
|
5948
|
-
Schema passed to template editor for autocomplete functionality.
|
|
5949
|
-
Contains all available variables derived from connected upstream nodes.
|
|
5950
|
-
|
|
5951
|
-
This is computed by the frontend based on:
|
|
5952
|
-
1. Finding all edges that connect to the current node's input ports
|
|
5953
|
-
2. Getting the output schemas from the source nodes' output ports
|
|
5954
|
-
3. Building a hierarchical variable structure for autocomplete
|
|
5955
|
-
properties:
|
|
5956
|
-
variables:
|
|
5957
|
-
type: object
|
|
5958
|
-
additionalProperties:
|
|
5959
|
-
$ref: '#/components/schemas/TemplateVariable'
|
|
5960
|
-
description: Map of available variables keyed by variable name
|
|
5961
|
-
required:
|
|
5962
|
-
- variables
|
|
5963
|
-
example:
|
|
5964
|
-
variables:
|
|
5965
|
-
user:
|
|
5966
|
-
name: user
|
|
5967
|
-
type: object
|
|
5968
|
-
label: User Data
|
|
5969
|
-
properties:
|
|
5970
|
-
name:
|
|
5971
|
-
name: name
|
|
5972
|
-
type: string
|
|
5973
|
-
email:
|
|
5974
|
-
name: email
|
|
5975
|
-
type: string
|
|
5976
|
-
items:
|
|
5977
|
-
name: items
|
|
5978
|
-
type: array
|
|
5979
|
-
label: Order Items
|
|
5980
|
-
items:
|
|
5981
|
-
name: item
|
|
5982
|
-
type: object
|
|
5983
|
-
properties:
|
|
5984
|
-
product_name:
|
|
5985
|
-
name: product_name
|
|
5986
|
-
type: string
|
|
5987
|
-
price:
|
|
5988
|
-
name: price
|
|
5989
|
-
type: number
|
|
5990
|
-
TemplateVariablesConfig:
|
|
5991
|
-
type: object
|
|
5992
|
-
description: |
|
|
5993
|
-
Configuration for template variable autocomplete in template fields.
|
|
5994
|
-
|
|
5995
|
-
## Overview
|
|
5996
|
-
|
|
5997
|
-
When a template field is connected to upstream nodes that have output schemas,
|
|
5998
|
-
FlowDrop automatically derives available variables for autocomplete. This config
|
|
5999
|
-
controls which ports provide variables and how they are presented.
|
|
6000
|
-
|
|
6001
|
-
## Variable Derivation
|
|
6002
|
-
|
|
6003
|
-
Variables are derived from connected upstream nodes' **output port schemas**.
|
|
6004
|
-
When an output port has a `schema` property with `properties`, those properties
|
|
6005
|
-
become available as template variables.
|
|
6006
|
-
|
|
6007
|
-
### Default Behavior (includePortName: false)
|
|
6008
|
-
|
|
6009
|
-
Schema properties are **unpacked as top-level variables**:
|
|
6010
|
-
|
|
6011
|
-
```
|
|
6012
|
-
HTTP Request node (output port "json" with schema):
|
|
6013
|
-
schema.properties: { user: {...}, orders: {...} }
|
|
6014
|
-
↓
|
|
6015
|
-
Template variables: {{ user }}, {{ orders }}
|
|
6016
|
-
```
|
|
6017
|
-
|
|
6018
|
-
### With includePortName: true
|
|
6019
|
-
|
|
6020
|
-
Variables are **prefixed with the port name**:
|
|
6021
|
-
|
|
6022
|
-
```
|
|
6023
|
-
Same schema as above:
|
|
6024
|
-
↓
|
|
6025
|
-
Template variables: {{ data.user }}, {{ data.orders }}
|
|
6026
|
-
```
|
|
6027
|
-
|
|
6028
|
-
## Nested Property Access
|
|
6029
|
-
|
|
6030
|
-
The autocomplete supports drilling into nested structures:
|
|
6031
|
-
|
|
6032
|
-
- **Dot notation**: `{{ user.address.city }}`
|
|
6033
|
-
- **Array indices**: `{{ orders[0].product_name }}`
|
|
6034
|
-
- **Combined**: `{{ user.orders[0].items[1].price }}`
|
|
6035
|
-
properties:
|
|
6036
|
-
ports:
|
|
6037
|
-
type: array
|
|
6038
|
-
items:
|
|
6039
|
-
type: string
|
|
6040
|
-
description: |
|
|
6041
|
-
Specifies which input port IDs should provide variables for autocomplete.
|
|
6042
|
-
Only connections to these ports will contribute variables.
|
|
6043
|
-
|
|
6044
|
-
**Behavior:**
|
|
6045
|
-
- If not specified: All input ports with connections are used
|
|
6046
|
-
- If empty array `[]`: No variables derived from ports (use with `schema` for static variables)
|
|
6047
|
-
- If specified: Only the listed ports contribute variables
|
|
6048
|
-
|
|
6049
|
-
**Example:** A node with inputs "data", "context", and "trigger":
|
|
6050
|
-
- `ports: ["data"]` - Only variables from the "data" connection
|
|
6051
|
-
- `ports: ["data", "context"]` - Variables from both connections
|
|
6052
|
-
- Not specified - Variables from all non-trigger connections
|
|
6053
|
-
example:
|
|
6054
|
-
- data
|
|
6055
|
-
- context
|
|
6056
|
-
schema:
|
|
6057
|
-
$ref: '#/components/schemas/VariableSchema'
|
|
6058
|
-
description: |
|
|
6059
|
-
Pre-defined variable schema to provide static variables or override derived ones.
|
|
6060
|
-
|
|
6061
|
-
When both `ports` and `schema` are specified, variables are **merged**:
|
|
6062
|
-
- Variables from connected ports are computed first
|
|
6063
|
-
- Static `schema` variables are added/override existing ones
|
|
6064
|
-
|
|
6065
|
-
**Use cases:**
|
|
6066
|
-
- Provide variables that don't come from connections
|
|
6067
|
-
- Override labels or descriptions for derived variables
|
|
6068
|
-
- Add custom variables for specific use cases
|
|
6069
|
-
includePortName:
|
|
6070
|
-
type: boolean
|
|
6071
|
-
default: false
|
|
6072
|
-
description: |
|
|
6073
|
-
Controls how variables are named when derived from port schemas.
|
|
6074
|
-
|
|
6075
|
-
**When false (default):**
|
|
6076
|
-
Schema properties become top-level variables directly.
|
|
6077
|
-
A port with schema `{ user: {...}, orders: {...} }` produces:
|
|
6078
|
-
- `{{ user }}`
|
|
6079
|
-
- `{{ orders }}`
|
|
6080
|
-
|
|
6081
|
-
**When true:**
|
|
6082
|
-
Variables are prefixed with the input port name.
|
|
6083
|
-
Same schema connected to input port "data" produces:
|
|
6084
|
-
- `{{ data.user }}`
|
|
6085
|
-
- `{{ data.orders }}`
|
|
6086
|
-
|
|
6087
|
-
**When to use true:**
|
|
6088
|
-
- Multiple input ports with potentially overlapping property names
|
|
6089
|
-
- You want to be explicit about data sources in templates
|
|
6090
|
-
- Backward compatibility with existing templates
|
|
6091
|
-
showHints:
|
|
6092
|
-
type: boolean
|
|
6093
|
-
default: true
|
|
6094
|
-
description: |
|
|
6095
|
-
Whether to display clickable variable hints below the editor.
|
|
6096
|
-
|
|
6097
|
-
When enabled, shows a row of buttons for top-level variables that users
|
|
6098
|
-
can click to insert `{{ variableName }}` at the cursor position.
|
|
6099
|
-
|
|
6100
|
-
Disable if the variable list is too long or not useful.
|
|
6101
|
-
example:
|
|
6102
|
-
ports:
|
|
6103
|
-
- data
|
|
6104
|
-
showHints: true
|
|
6105
|
-
includePortName: false
|
|
6106
6169
|
KanbanColumnDef:
|
|
6107
6170
|
type: object
|
|
6108
6171
|
properties:
|
|
@@ -128,13 +128,12 @@ export { default as MessageBubble } from '../components/playground/MessageBubble
|
|
|
128
128
|
export { InterruptBubble, ConfirmationPrompt, ChoicePrompt, TextInputPrompt, FormPrompt, ReviewPrompt } from '../components/interrupt/index.js';
|
|
129
129
|
export { PlaygroundService, playgroundService } from '../services/playgroundService.js';
|
|
130
130
|
export { InterruptService, interruptService } from '../services/interruptService.js';
|
|
131
|
-
export {
|
|
132
|
-
export { getPipelinePanelOpen, pipelinePanelActions } from '../stores/pipelinePanelStore.svelte.js';
|
|
131
|
+
export { PlaygroundStore } from '../stores/playgroundStore.svelte.js';
|
|
133
132
|
export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse, PlaygroundExecution } from '../types/playground.js';
|
|
134
133
|
export { isChatInputNode, CHAT_INPUT_PATTERNS, defaultShouldStopPolling, defaultIsTerminalStatus, DEFAULT_STOP_POLLING_STATUSES, DEFAULT_TERMINAL_STATUSES } from '../types/playground.js';
|
|
135
134
|
export type { InterruptType, InterruptStatus, Interrupt, InterruptChoice, InterruptConfig, ConfirmationConfig, ChoiceConfig, TextConfig, FormConfig, ReviewConfig, ReviewChange, ReviewFieldDecision, ReviewResolution, InterruptResolution, InterruptApiResponse, InterruptListResponse, InterruptResponse, InterruptMessageMetadata, InterruptPollingConfig } from '../types/interrupt.js';
|
|
136
135
|
export { isInterruptMetadata, extractInterruptMetadata, metadataToInterrupt, defaultInterruptPollingConfig } from '../types/interrupt.js';
|
|
137
|
-
export {
|
|
136
|
+
export { InterruptStore } from '../stores/interruptStore.svelte.js';
|
|
138
137
|
export type { InterruptWithState } from '../stores/interruptStore.svelte.js';
|
|
139
138
|
export { mountPlayground, unmountPlayground, mountPlaygroundStudio, mountPlaygroundApp, type PlaygroundMountOptions, type PlaygroundStudioMountOptions, type PlaygroundAppMountOptions, type MountedPlayground } from './mount.js';
|
|
140
139
|
export type { PipelineViewDef, PipelineViewProps } from '../types/index.js';
|
package/dist/playground/index.js
CHANGED
|
@@ -143,41 +143,13 @@ export { InterruptService, interruptService } from '../services/interruptService
|
|
|
143
143
|
// ============================================================================
|
|
144
144
|
// Playground Store
|
|
145
145
|
// ============================================================================
|
|
146
|
-
export {
|
|
147
|
-
// Core state getters
|
|
148
|
-
getCurrentSession, getSessions, getMessages, getIsExecuting, getCanSendMessage, getIsLoading, getError as getPlaygroundError, getCurrentWorkflow, getLastPollSequenceNumber,
|
|
149
|
-
// Derived getters
|
|
150
|
-
getSessionStatus, getMessageCount, getChatMessages, getLogMessages, getLatestMessage, getInputFields, getHasChatInput, getSessionCount,
|
|
151
|
-
// Execution getters (used with PipelinePanel / PlaygroundSplit)
|
|
152
|
-
getActiveExecutionId, getPinnedExecutionId, getLatestExecutionId,
|
|
153
|
-
// UI state
|
|
154
|
-
getShowLogs,
|
|
155
|
-
// Actions
|
|
156
|
-
playgroundActions,
|
|
157
|
-
// Server response application (single update path)
|
|
158
|
-
applyServerResponse,
|
|
159
|
-
// Subscription utility
|
|
160
|
-
subscribeToSessionStatus,
|
|
161
|
-
// Utilities
|
|
162
|
-
getCurrentSessionId, isSessionSelected, getMessagesSnapshot, getLatestSequenceNumber } from '../stores/playgroundStore.svelte.js';
|
|
163
|
-
// ============================================================================
|
|
164
|
-
// Pipeline Panel Store (open/close state, persisted to localStorage)
|
|
165
|
-
// ============================================================================
|
|
166
|
-
export { getPipelinePanelOpen, pipelinePanelActions } from '../stores/pipelinePanelStore.svelte.js';
|
|
146
|
+
export { PlaygroundStore } from '../stores/playgroundStore.svelte.js';
|
|
167
147
|
export { isChatInputNode, CHAT_INPUT_PATTERNS, defaultShouldStopPolling, defaultIsTerminalStatus, DEFAULT_STOP_POLLING_STATUSES, DEFAULT_TERMINAL_STATUSES } from '../types/playground.js';
|
|
168
148
|
export { isInterruptMetadata, extractInterruptMetadata, metadataToInterrupt, defaultInterruptPollingConfig } from '../types/interrupt.js';
|
|
169
149
|
// ============================================================================
|
|
170
150
|
// Interrupt Store (Human-in-the-Loop)
|
|
171
151
|
// ============================================================================
|
|
172
|
-
export {
|
|
173
|
-
// Core state accessor
|
|
174
|
-
getInterruptsMap,
|
|
175
|
-
// Getter functions (replace derived stores)
|
|
176
|
-
getPendingInterruptIds, getPendingInterrupts, getPendingInterruptCount, getResolvedInterrupts, getIsAnySubmitting,
|
|
177
|
-
// Actions
|
|
178
|
-
interruptActions,
|
|
179
|
-
// Utilities
|
|
180
|
-
getInterrupt, isInterruptPending, isInterruptSubmitting, getInterruptError, getInterruptByMessageId, interruptHasError } from '../stores/interruptStore.svelte.js';
|
|
152
|
+
export { InterruptStore } from '../stores/interruptStore.svelte.js';
|
|
181
153
|
// ============================================================================
|
|
182
154
|
// Playground Mount Functions (for vanilla JS / Drupal / IIFE integration)
|
|
183
155
|
// ============================================================================
|
|
@@ -114,6 +114,21 @@ export interface PlaygroundMountOptions {
|
|
|
114
114
|
* `settings` option.
|
|
115
115
|
*/
|
|
116
116
|
settings?: PartialSettings;
|
|
117
|
+
/**
|
|
118
|
+
* Identifier for this playground's FlowDrop instance.
|
|
119
|
+
*
|
|
120
|
+
* When omitted, the playground uses the page-default instance — matching
|
|
121
|
+
* the legacy behavior where all playground mounts (and the editor's
|
|
122
|
+
* built-in playground) shared one session/message store. Pass an explicit
|
|
123
|
+
* id to isolate this playground's session/message *state* from other
|
|
124
|
+
* FlowDrop instances on the page.
|
|
125
|
+
*
|
|
126
|
+
* Note: live polling is NOT isolated — `playgroundService` keeps one
|
|
127
|
+
* page-global polling timer, so only one playground can actively poll at
|
|
128
|
+
* a time regardless of instance. Use `pushMessages()` with your own
|
|
129
|
+
* transport if two playgrounds need concurrent live updates.
|
|
130
|
+
*/
|
|
131
|
+
instanceId?: string;
|
|
117
132
|
}
|
|
118
133
|
/**
|
|
119
134
|
* Return type for mounted Playground instance
|