@flowdrop/flowdrop 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/components/ConfigForm.svelte +1 -0
- package/dist/components/ConfigPanel.svelte +7 -1
- package/dist/components/NodeSwapPicker.svelte +5 -1
- package/dist/components/PipelineStatus.svelte +11 -2
- package/dist/components/SchemaForm.svelte +1 -0
- package/dist/components/SettingsPanel.svelte +5 -1
- package/dist/components/WorkflowEditor.svelte +5 -1
- package/dist/components/chat/AIChatPanel.svelte +1 -5
- package/dist/components/form/FormAutocomplete.svelte +69 -15
- package/dist/components/form/FormField.svelte +21 -0
- package/dist/components/form/FormFieldLight.svelte +1 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +5 -1
- package/dist/components/interrupt/InterruptBubble.svelte +75 -17
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
- package/dist/components/playground/ChatBubble.svelte +287 -0
- package/dist/components/playground/ChatBubble.svelte.d.ts +10 -0
- package/dist/components/playground/ChatInput.svelte +11 -5
- package/dist/components/playground/ControlPanel.svelte +42 -29
- package/dist/components/playground/ExecutionConsole.svelte +5 -1
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +2 -0
- package/dist/components/playground/ExecutionList.svelte +7 -2
- package/dist/components/playground/HierarchyTrail.svelte +88 -0
- package/dist/components/playground/HierarchyTrail.svelte.d.ts +7 -0
- package/dist/components/playground/LogRow.svelte +179 -0
- package/dist/components/playground/LogRow.svelte.d.ts +8 -0
- package/dist/components/playground/MessageBubble.stories.svelte +89 -0
- package/dist/components/playground/MessageBubble.svelte +23 -738
- package/dist/components/playground/MessageBubble.svelte.d.ts +3 -11
- package/dist/components/playground/MessageCard.svelte +107 -0
- package/dist/components/playground/MessageCard.svelte.d.ts +10 -0
- package/dist/components/playground/MessageMarkdown.svelte +170 -0
- package/dist/components/playground/MessageMarkdown.svelte.d.ts +7 -0
- package/dist/components/playground/MessageNotice.svelte +121 -0
- package/dist/components/playground/MessageNotice.svelte.d.ts +9 -0
- package/dist/components/playground/MessageStream.svelte +215 -10
- package/dist/components/playground/MessageStream.svelte.d.ts +5 -0
- package/dist/components/playground/MessageTagChip.svelte +117 -0
- package/dist/components/playground/MessageTagChip.svelte.d.ts +7 -0
- package/dist/components/playground/MessageTagStrip.svelte +37 -0
- package/dist/components/playground/MessageTagStrip.svelte.d.ts +7 -0
- package/dist/components/playground/PipelineKanbanView.svelte +40 -11
- package/dist/components/playground/PipelinePanel.svelte +5 -1
- package/dist/components/playground/PipelineTableView.svelte +20 -6
- package/dist/components/playground/Playground.svelte +84 -22
- package/dist/components/playground/PlaygroundStudio.svelte +99 -7
- package/dist/components/playground/messageDisplay.d.ts +19 -0
- package/dist/components/playground/messageDisplay.js +62 -0
- package/dist/components/playground/pipelineViewUtils.svelte.js +11 -4
- package/dist/form/autocomplete.d.ts +1 -0
- package/dist/form/autocomplete.js +1 -0
- package/dist/form/index.d.ts +17 -0
- package/dist/form/index.js +19 -0
- package/dist/messages/defaults.d.ts +5 -0
- package/dist/messages/defaults.js +6 -0
- package/dist/openapi/v1/openapi.yaml +6403 -0
- package/dist/schemas/v1/workflow.schema.json +46 -1
- package/dist/services/categoriesApi.d.ts +2 -1
- package/dist/services/categoriesApi.js +5 -3
- package/dist/services/playgroundService.d.ts +23 -4
- package/dist/services/playgroundService.js +22 -9
- package/dist/services/portConfigApi.d.ts +2 -1
- package/dist/services/portConfigApi.js +5 -3
- package/dist/stores/playgroundStore.svelte.d.ts +22 -1
- package/dist/stores/playgroundStore.svelte.js +109 -32
- package/dist/svelte-app.d.ts +1 -0
- package/dist/svelte-app.js +5 -5
- package/dist/types/index.d.ts +13 -0
- package/dist/types/playground.d.ts +112 -2
- package/dist/types/playground.js +14 -0
- package/package.json +12 -1
|
@@ -62,6 +62,14 @@ export interface PlaygroundExecution {
|
|
|
62
62
|
id: string;
|
|
63
63
|
startedAt: string;
|
|
64
64
|
status: 'running' | 'completed' | 'failed';
|
|
65
|
+
/**
|
|
66
|
+
* Client-derived flag: true when this run is a nested sub-flow rather than a
|
|
67
|
+
* main pipeline run. Inferred from its messages' `parentPipelineId` (with a
|
|
68
|
+
* `hierarchy` depth ≥ 2 fallback for legacy runs predating that field). Used
|
|
69
|
+
* to keep the sidebar on the main pipeline and hide sub-flows from the
|
|
70
|
+
* run-switcher. Not part of the wire contract — the server never sets this.
|
|
71
|
+
*/
|
|
72
|
+
isSubflow?: boolean;
|
|
65
73
|
}
|
|
66
74
|
/**
|
|
67
75
|
* Playground session representing a test conversation
|
|
@@ -94,7 +102,12 @@ export interface PlaygroundSession {
|
|
|
94
102
|
createdAt: string;
|
|
95
103
|
/** Last activity timestamp (ISO 8601) */
|
|
96
104
|
updatedAt: string;
|
|
97
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Main pipeline runs triggered within this session, ordered oldest-first.
|
|
107
|
+
* Sub-flow (nested) runs are excluded — they're surfaced only on individual
|
|
108
|
+
* messages via `parentPipelineId`. The run-switcher relies on this being
|
|
109
|
+
* main-runs-only; runs added from messages are classified client-side.
|
|
110
|
+
*/
|
|
98
111
|
executions?: PlaygroundExecution[];
|
|
99
112
|
/** Custom session metadata */
|
|
100
113
|
metadata?: Record<string, unknown>;
|
|
@@ -118,6 +131,65 @@ export interface PlaygroundMessageMetadata {
|
|
|
118
131
|
/** Allow additional properties */
|
|
119
132
|
[key: string]: unknown;
|
|
120
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* A node on the contextual tree the server attaches to a message
|
|
136
|
+
* (e.g. workflow > sub-workflow > iteration). Display-only — this is not a
|
|
137
|
+
* navigation breadcrumb; `href` is intentionally not part of the schema.
|
|
138
|
+
*/
|
|
139
|
+
export interface MessageHierarchyItem {
|
|
140
|
+
/** Stable identifier (for keying) */
|
|
141
|
+
id: string;
|
|
142
|
+
/** Display label */
|
|
143
|
+
label: string;
|
|
144
|
+
/** Optional iconify icon id (e.g. 'mdi:graph') */
|
|
145
|
+
icon?: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Semantic color hooks for a tag. Map to design tokens in the theme.
|
|
149
|
+
*/
|
|
150
|
+
export type MessageTagColor = 'muted' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
151
|
+
/**
|
|
152
|
+
* Visual emphasis for a tag.
|
|
153
|
+
*/
|
|
154
|
+
export type MessageTagVariant = 'solid' | 'outline' | 'subtle';
|
|
155
|
+
/**
|
|
156
|
+
* A server-emitted classification chip rendered alongside a message.
|
|
157
|
+
* Tags are unordered and replace any UI-side defaults.
|
|
158
|
+
*/
|
|
159
|
+
export interface MessageTag {
|
|
160
|
+
/** Stable identifier (for keying) */
|
|
161
|
+
id: string;
|
|
162
|
+
/** Display label */
|
|
163
|
+
label: string;
|
|
164
|
+
/** Optional iconify icon id */
|
|
165
|
+
icon?: string;
|
|
166
|
+
/** Semantic color hook; defaults to 'muted' if omitted */
|
|
167
|
+
color?: MessageTagColor;
|
|
168
|
+
/** Visual style; defaults to 'subtle' if omitted */
|
|
169
|
+
variant?: MessageTagVariant;
|
|
170
|
+
/** Free-form classifier the server may use for future grouping/filtering */
|
|
171
|
+
type?: string;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Rendering hint the server may set to choose a layout regardless of role.
|
|
175
|
+
*
|
|
176
|
+
* - `bubble`: chat bubble shape (default for user/assistant)
|
|
177
|
+
* - `log`: dense one-liner (default for log role)
|
|
178
|
+
* - `notice`: compact centered notice (default for system role with
|
|
179
|
+
* compactSystemMessages enabled)
|
|
180
|
+
* - `card`: vertical layout — breadcrumb (top), body (middle), tags (bottom)
|
|
181
|
+
*
|
|
182
|
+
* When omitted, the client falls back to the role-based default above.
|
|
183
|
+
*/
|
|
184
|
+
export type PlaygroundMessageDisplay = 'bubble' | 'log' | 'notice' | 'card';
|
|
185
|
+
/**
|
|
186
|
+
* Resolve the effective layout for a message. Server-supplied `display` wins;
|
|
187
|
+
* otherwise we fall back to a role-based default. Pure function so the
|
|
188
|
+
* dispatcher and tests can share it.
|
|
189
|
+
*/
|
|
190
|
+
export declare function resolveMessageDisplay(message: Pick<PlaygroundMessage, 'role' | 'display'>, options?: {
|
|
191
|
+
compactSystemMessages?: boolean;
|
|
192
|
+
}): PlaygroundMessageDisplay;
|
|
121
193
|
/**
|
|
122
194
|
* Message in a playground session
|
|
123
195
|
*
|
|
@@ -157,8 +229,38 @@ export interface PlaygroundMessage {
|
|
|
157
229
|
parentMessageId?: string;
|
|
158
230
|
/** Pipeline/execution ID that generated this message */
|
|
159
231
|
executionId?: string | null;
|
|
232
|
+
/**
|
|
233
|
+
* Execution ID of the parent pipeline when this message came from a nested
|
|
234
|
+
* sub-flow; `null`/absent for top-level (main pipeline) messages. Authoritative
|
|
235
|
+
* nesting signal (unlike the display-only `hierarchy`) — used to keep the main
|
|
236
|
+
* pipeline in focus and hide sub-flow runs from the run-switcher.
|
|
237
|
+
*/
|
|
238
|
+
parentPipelineId?: string | null;
|
|
239
|
+
/**
|
|
240
|
+
* Execution ID of the top-level pipeline this message ultimately belongs to.
|
|
241
|
+
* Equals `executionId` for main-pipeline messages; for sub-flow messages it
|
|
242
|
+
* points to the main run that triggered the sub-flow.
|
|
243
|
+
*/
|
|
244
|
+
rootPipelineId?: string | null;
|
|
160
245
|
/** Associated node ID (for log/assistant messages) */
|
|
161
246
|
nodeId?: string | null;
|
|
247
|
+
/**
|
|
248
|
+
* Ordered hierarchy path (e.g. workflow > sub-workflow > iteration).
|
|
249
|
+
* Rendered as a chevron-separated trail. Server-controlled — no
|
|
250
|
+
* client-side derivation.
|
|
251
|
+
*/
|
|
252
|
+
hierarchy?: MessageHierarchyItem[];
|
|
253
|
+
/**
|
|
254
|
+
* Server-emitted classification chips rendered with the message.
|
|
255
|
+
* Replace any client-side defaults entirely (no merge).
|
|
256
|
+
*/
|
|
257
|
+
tags?: MessageTag[];
|
|
258
|
+
/**
|
|
259
|
+
* Layout hint. When omitted, the client picks a default from the role:
|
|
260
|
+
* - log → 'log', system (when compactSystemMessages) → 'notice',
|
|
261
|
+
* user/assistant → 'bubble'.
|
|
262
|
+
*/
|
|
263
|
+
display?: PlaygroundMessageDisplay;
|
|
162
264
|
/** Additional message metadata */
|
|
163
265
|
metadata?: PlaygroundMessageMetadata;
|
|
164
266
|
}
|
|
@@ -225,6 +327,12 @@ export interface PlaygroundConfig {
|
|
|
225
327
|
pollingInterval?: number;
|
|
226
328
|
/** Maximum number of messages to display (default: 500) */
|
|
227
329
|
maxMessages?: number;
|
|
330
|
+
/**
|
|
331
|
+
* Number of messages to fetch per page (default: 50).
|
|
332
|
+
* The initial load fetches the most recent page; scrolling up loads
|
|
333
|
+
* older pages of this size on demand.
|
|
334
|
+
*/
|
|
335
|
+
messagePageSize?: number;
|
|
228
336
|
/** Auto-scroll to bottom on new messages (default: true) */
|
|
229
337
|
autoScroll?: boolean;
|
|
230
338
|
/** Show timestamps on messages (default: true) */
|
|
@@ -357,8 +465,10 @@ export type PlaygroundMessageResponse = PlaygroundApiResponse<PlaygroundMessage>
|
|
|
357
465
|
* Type alias for messages list response with polling metadata
|
|
358
466
|
*/
|
|
359
467
|
export interface PlaygroundMessagesApiResponse extends PlaygroundApiResponse<PlaygroundMessage[]> {
|
|
360
|
-
/** Whether
|
|
468
|
+
/** Whether more recent messages remain after this page (forward pagination via `since`) */
|
|
361
469
|
hasMore?: boolean;
|
|
470
|
+
/** Whether older messages exist before the first message in this page (backward pagination via `latest`/`before`) */
|
|
471
|
+
hasOlder?: boolean;
|
|
362
472
|
/** Current session status */
|
|
363
473
|
sessionStatus?: PlaygroundSessionStatus;
|
|
364
474
|
}
|
package/dist/types/playground.js
CHANGED
|
@@ -42,6 +42,20 @@ export function defaultShouldStopPolling(status) {
|
|
|
42
42
|
export function defaultIsTerminalStatus(status) {
|
|
43
43
|
return DEFAULT_TERMINAL_STATUSES.includes(status);
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Resolve the effective layout for a message. Server-supplied `display` wins;
|
|
47
|
+
* otherwise we fall back to a role-based default. Pure function so the
|
|
48
|
+
* dispatcher and tests can share it.
|
|
49
|
+
*/
|
|
50
|
+
export function resolveMessageDisplay(message, options = {}) {
|
|
51
|
+
if (message.display)
|
|
52
|
+
return message.display;
|
|
53
|
+
if (message.role === 'system' && options.compactSystemMessages !== false)
|
|
54
|
+
return 'notice';
|
|
55
|
+
if (message.role === 'log')
|
|
56
|
+
return 'log';
|
|
57
|
+
return 'bubble';
|
|
58
|
+
}
|
|
45
59
|
/**
|
|
46
60
|
* Metadata field to control Run button state from backend.
|
|
47
61
|
* When a message contains this field set to true, the Run button becomes enabled.
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A drop-in visual workflow editor for any web application. You own the backend. You own the data. You own the orchestration.",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.14.0",
|
|
7
7
|
"author": "Shibin Das (D34dMan)",
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://github.com/flowdrop-io/flowdrop/issues"
|
|
@@ -83,6 +83,11 @@
|
|
|
83
83
|
"svelte": "./dist/form/code.js",
|
|
84
84
|
"default": "./dist/form/code.js"
|
|
85
85
|
},
|
|
86
|
+
"./form/autocomplete": {
|
|
87
|
+
"types": "./dist/form/autocomplete.d.ts",
|
|
88
|
+
"svelte": "./dist/form/autocomplete.js",
|
|
89
|
+
"default": "./dist/form/autocomplete.js"
|
|
90
|
+
},
|
|
86
91
|
"./form/markdown": {
|
|
87
92
|
"types": "./dist/form/markdown.d.ts",
|
|
88
93
|
"svelte": "./dist/form/markdown.js",
|
|
@@ -120,6 +125,12 @@
|
|
|
120
125
|
},
|
|
121
126
|
"./schema/v1": {
|
|
122
127
|
"default": "./dist/schemas/v1/workflow.schema.json"
|
|
128
|
+
},
|
|
129
|
+
"./openapi": {
|
|
130
|
+
"default": "./dist/openapi/v1/openapi.yaml"
|
|
131
|
+
},
|
|
132
|
+
"./openapi/v1": {
|
|
133
|
+
"default": "./dist/openapi/v1/openapi.yaml"
|
|
123
134
|
}
|
|
124
135
|
},
|
|
125
136
|
"peerDependencies": {
|