@flowdrop/flowdrop 1.11.0 → 1.13.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.
Files changed (84) hide show
  1. package/dist/api/enhanced-client.d.ts +29 -16
  2. package/dist/api/enhanced-client.js +0 -14
  3. package/dist/components/ConfigForm.svelte +1 -0
  4. package/dist/components/PipelineStatus.svelte +9 -12
  5. package/dist/components/SchemaForm.svelte +1 -0
  6. package/dist/components/WorkflowEditor.svelte +3 -0
  7. package/dist/components/form/FormAutocomplete.svelte +67 -10
  8. package/dist/components/form/FormField.svelte +21 -0
  9. package/dist/components/form/FormFieldLight.svelte +1 -0
  10. package/dist/components/interrupt/ChoicePrompt.svelte +24 -5
  11. package/dist/components/interrupt/ConfirmationPrompt.svelte +5 -0
  12. package/dist/components/interrupt/InterruptBubble.svelte +88 -17
  13. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
  14. package/dist/components/interrupt/ReviewPrompt.svelte +20 -0
  15. package/dist/components/interrupt/TextInputPrompt.svelte +5 -0
  16. package/dist/components/nodes/GatewayNode.svelte +2 -6
  17. package/dist/components/nodes/WorkflowNode.svelte +2 -6
  18. package/dist/components/playground/ChatBubble.svelte +289 -0
  19. package/dist/components/playground/ChatBubble.svelte.d.ts +10 -0
  20. package/dist/components/playground/ChatInput.svelte +359 -0
  21. package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
  22. package/dist/components/playground/ChatPanel.svelte +100 -724
  23. package/dist/components/playground/ChatPanel.svelte.d.ts +9 -26
  24. package/dist/components/playground/ControlPanel.svelte +496 -0
  25. package/dist/components/playground/ControlPanel.svelte.d.ts +20 -0
  26. package/dist/components/playground/ExecutionConsole.svelte +163 -0
  27. package/dist/components/playground/ExecutionConsole.svelte.d.ts +14 -0
  28. package/dist/components/playground/HierarchyTrail.svelte +88 -0
  29. package/dist/components/playground/HierarchyTrail.svelte.d.ts +7 -0
  30. package/dist/components/playground/LogRow.svelte +178 -0
  31. package/dist/components/playground/LogRow.svelte.d.ts +8 -0
  32. package/dist/components/playground/MessageBubble.stories.svelte +89 -0
  33. package/dist/components/playground/MessageBubble.svelte +25 -737
  34. package/dist/components/playground/MessageBubble.svelte.d.ts +3 -11
  35. package/dist/components/playground/MessageCard.svelte +106 -0
  36. package/dist/components/playground/MessageCard.svelte.d.ts +10 -0
  37. package/dist/components/playground/MessageMarkdown.svelte +160 -0
  38. package/dist/components/playground/MessageMarkdown.svelte.d.ts +7 -0
  39. package/dist/components/playground/MessageNotice.svelte +120 -0
  40. package/dist/components/playground/MessageNotice.svelte.d.ts +9 -0
  41. package/dist/components/playground/MessageStream.svelte +367 -0
  42. package/dist/components/playground/MessageStream.svelte.d.ts +27 -0
  43. package/dist/components/playground/MessageTagChip.svelte +99 -0
  44. package/dist/components/playground/MessageTagChip.svelte.d.ts +7 -0
  45. package/dist/components/playground/MessageTagStrip.svelte +37 -0
  46. package/dist/components/playground/MessageTagStrip.svelte.d.ts +7 -0
  47. package/dist/components/playground/PipelineKanbanView.svelte +284 -0
  48. package/dist/components/playground/PipelineKanbanView.svelte.d.ts +11 -0
  49. package/dist/components/playground/PipelinePanel.svelte +204 -65
  50. package/dist/components/playground/PipelinePanel.svelte.d.ts +3 -1
  51. package/dist/components/playground/PipelineTableView.svelte +376 -0
  52. package/dist/components/playground/PipelineTableView.svelte.d.ts +11 -0
  53. package/dist/components/playground/Playground.svelte +262 -1200
  54. package/dist/components/playground/Playground.svelte.d.ts +0 -13
  55. package/dist/components/playground/PlaygroundStudio.svelte +113 -61
  56. package/dist/components/playground/PlaygroundStudio.svelte.d.ts +3 -1
  57. package/dist/components/playground/messageDisplay.d.ts +19 -0
  58. package/dist/components/playground/messageDisplay.js +62 -0
  59. package/dist/components/playground/pipelineViewUtils.svelte.d.ts +22 -0
  60. package/dist/components/playground/pipelineViewUtils.svelte.js +77 -0
  61. package/dist/form/autocomplete.d.ts +1 -0
  62. package/dist/form/autocomplete.js +1 -0
  63. package/dist/form/index.d.ts +17 -0
  64. package/dist/form/index.js +19 -0
  65. package/dist/messages/defaults.d.ts +29 -0
  66. package/dist/messages/defaults.js +30 -0
  67. package/dist/playground/index.d.ts +6 -1
  68. package/dist/playground/index.js +6 -0
  69. package/dist/playground/mount.d.ts +3 -0
  70. package/dist/playground/mount.js +3 -2
  71. package/dist/schemas/v1/workflow.schema.json +10 -1
  72. package/dist/services/categoriesApi.d.ts +2 -1
  73. package/dist/services/categoriesApi.js +5 -3
  74. package/dist/services/portConfigApi.d.ts +2 -1
  75. package/dist/services/portConfigApi.js +5 -3
  76. package/dist/stores/playgroundStore.svelte.d.ts +6 -0
  77. package/dist/stores/playgroundStore.svelte.js +21 -1
  78. package/dist/svelte-app.d.ts +1 -0
  79. package/dist/svelte-app.js +5 -5
  80. package/dist/types/index.d.ts +41 -2
  81. package/dist/types/playground.d.ts +81 -2
  82. package/dist/types/playground.js +19 -7
  83. package/dist/utils/nodeStatus.js +15 -5
  84. package/package.json +6 -1
@@ -115,6 +115,10 @@ export { default as PlaygroundStudio } from '../components/playground/Playground
115
115
  export { default as PlaygroundApp } from '../components/playground/PlaygroundApp.svelte';
116
116
  export { default as PlaygroundModal } from '../components/playground/PlaygroundModal.svelte';
117
117
  export { default as ChatPanel } from '../components/playground/ChatPanel.svelte';
118
+ export { default as MessageStream } from '../components/playground/MessageStream.svelte';
119
+ export { default as ChatInput } from '../components/playground/ChatInput.svelte';
120
+ export { default as ExecutionConsole } from '../components/playground/ExecutionConsole.svelte';
121
+ export { default as ControlPanel } from '../components/playground/ControlPanel.svelte';
118
122
  export { default as PipelinePanel } from '../components/playground/PipelinePanel.svelte';
119
123
  export { default as ExecutionList } from '../components/playground/ExecutionList.svelte';
120
124
  export { default as SessionManager } from '../components/playground/SessionManager.svelte';
@@ -124,7 +128,7 @@ export { default as MessageBubble } from '../components/playground/MessageBubble
124
128
  export { InterruptBubble, ConfirmationPrompt, ChoicePrompt, TextInputPrompt, FormPrompt, ReviewPrompt } from '../components/interrupt/index.js';
125
129
  export { PlaygroundService, playgroundService } from '../services/playgroundService.js';
126
130
  export { InterruptService, interruptService } from '../services/interruptService.js';
127
- export { getCurrentSession, getSessions, getMessages, getIsExecuting, getCanSendMessage, getIsLoading, getError as getPlaygroundError, getCurrentWorkflow, getLastPollSequenceNumber, getSessionStatus, getMessageCount, getChatMessages, getLogMessages, getLatestMessage, getInputFields, getHasChatInput, getSessionCount, getActiveExecutionId, getPinnedExecutionId, getLatestExecutionId, playgroundActions, applyServerResponse, subscribeToSessionStatus, getCurrentSessionId, isSessionSelected, getMessagesSnapshot, getLatestSequenceNumber } from '../stores/playgroundStore.svelte.js';
131
+ export { getCurrentSession, getSessions, getMessages, getIsExecuting, getCanSendMessage, getIsLoading, getError as getPlaygroundError, getCurrentWorkflow, getLastPollSequenceNumber, getSessionStatus, getMessageCount, getChatMessages, getLogMessages, getLatestMessage, getInputFields, getHasChatInput, getSessionCount, getActiveExecutionId, getPinnedExecutionId, getLatestExecutionId, getShowLogs, playgroundActions, applyServerResponse, subscribeToSessionStatus, getCurrentSessionId, isSessionSelected, getMessagesSnapshot, getLatestSequenceNumber } from '../stores/playgroundStore.svelte.js';
128
132
  export { getPipelinePanelOpen, pipelinePanelActions } from '../stores/pipelinePanelStore.svelte.js';
129
133
  export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse, PlaygroundExecution } from '../types/playground.js';
130
134
  export { isChatInputNode, CHAT_INPUT_PATTERNS, defaultShouldStopPolling, defaultIsTerminalStatus, DEFAULT_STOP_POLLING_STATUSES, DEFAULT_TERMINAL_STATUSES } from '../types/playground.js';
@@ -133,4 +137,5 @@ export { isInterruptMetadata, extractInterruptMetadata, metadataToInterrupt, def
133
137
  export { getInterruptsMap, getPendingInterruptIds, getPendingInterrupts, getPendingInterruptCount, getResolvedInterrupts, getIsAnySubmitting, interruptActions, getInterrupt, isInterruptPending, isInterruptSubmitting, getInterruptError, getInterruptByMessageId, interruptHasError } from '../stores/interruptStore.svelte.js';
134
138
  export type { InterruptWithState } from '../stores/interruptStore.svelte.js';
135
139
  export { mountPlayground, unmountPlayground, mountPlaygroundStudio, mountPlaygroundApp, type PlaygroundMountOptions, type PlaygroundStudioMountOptions, type PlaygroundAppMountOptions, type MountedPlayground } from './mount.js';
140
+ export type { PipelineViewDef, PipelineViewProps } from '../types/index.js';
136
141
  export { createEndpointConfig, defaultEndpointConfig, buildEndpointUrl, type EndpointConfig } from '../config/endpoints.js';
@@ -118,6 +118,10 @@ export { default as PlaygroundStudio } from '../components/playground/Playground
118
118
  export { default as PlaygroundApp } from '../components/playground/PlaygroundApp.svelte';
119
119
  export { default as PlaygroundModal } from '../components/playground/PlaygroundModal.svelte';
120
120
  export { default as ChatPanel } from '../components/playground/ChatPanel.svelte';
121
+ export { default as MessageStream } from '../components/playground/MessageStream.svelte';
122
+ export { default as ChatInput } from '../components/playground/ChatInput.svelte';
123
+ export { default as ExecutionConsole } from '../components/playground/ExecutionConsole.svelte';
124
+ export { default as ControlPanel } from '../components/playground/ControlPanel.svelte';
121
125
  export { default as PipelinePanel } from '../components/playground/PipelinePanel.svelte';
122
126
  export { default as ExecutionList } from '../components/playground/ExecutionList.svelte';
123
127
  export { default as SessionManager } from '../components/playground/SessionManager.svelte';
@@ -146,6 +150,8 @@ getCurrentSession, getSessions, getMessages, getIsExecuting, getCanSendMessage,
146
150
  getSessionStatus, getMessageCount, getChatMessages, getLogMessages, getLatestMessage, getInputFields, getHasChatInput, getSessionCount,
147
151
  // Execution getters (used with PipelinePanel / PlaygroundSplit)
148
152
  getActiveExecutionId, getPinnedExecutionId, getLatestExecutionId,
153
+ // UI state
154
+ getShowLogs,
149
155
  // Actions
150
156
  playgroundActions,
151
157
  // Server response application (single update path)
@@ -48,6 +48,7 @@ import type { EndpointConfig } from '../config/endpoints.js';
48
48
  import type { PlaygroundMode, PlaygroundConfig, PlaygroundSession, PlaygroundMessagesApiResponse, PlaygroundSessionStatus } from '../types/playground.js';
49
49
  import type { PartialSettings, SettingsCategory } from '../types/settings.js';
50
50
  import type { NavbarAction } from '../types/navbar.js';
51
+ import type { PipelineViewDef } from '../types/index.js';
51
52
  /**
52
53
  * Mount options for Playground component
53
54
  */
@@ -216,6 +217,8 @@ export interface PlaygroundStudioMountOptions extends PlaygroundMountOptions {
216
217
  minChatWidth?: number;
217
218
  initialPipelineWidth?: number;
218
219
  onSessionNavigate?: (sessionId: string) => void;
220
+ /** Additional pipeline views injected into the view switcher */
221
+ pipelineViews?: PipelineViewDef[];
219
222
  }
220
223
  export declare function mountPlaygroundStudio(container: HTMLElement, options: PlaygroundStudioMountOptions): Promise<MountedPlayground>;
221
224
  export interface PlaygroundAppMountOptions extends Omit<PlaygroundStudioMountOptions, 'mode'> {
@@ -225,7 +225,7 @@ export function unmountPlayground(app) {
225
225
  }
226
226
  }
227
227
  export async function mountPlaygroundStudio(container, options) {
228
- const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, config = {}, height, width, initialPipelineOpen, minChatWidth, initialPipelineWidth, settings: initialSettings, onClose, onSessionNavigate, onSessionStatusChange } = options;
228
+ const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, config = {}, height, width, initialPipelineOpen, minChatWidth, initialPipelineWidth, settings: initialSettings, onClose, onSessionNavigate, onSessionStatusChange, pipelineViews } = options;
229
229
  if (!workflowId) {
230
230
  throw new Error('workflowId is required for mountPlaygroundStudio()');
231
231
  }
@@ -253,7 +253,8 @@ export async function mountPlaygroundStudio(container, options) {
253
253
  onSessionNavigate,
254
254
  initialPipelineOpen,
255
255
  minChatWidth,
256
- initialPipelineWidth
256
+ initialPipelineWidth,
257
+ extraPipelineViews: pipelineViews
257
258
  }
258
259
  });
259
260
  return buildMountedPlayground(svelteApp, workflowId, config, onSessionStatusChange);
@@ -98,6 +98,13 @@
98
98
  "type": "boolean",
99
99
  "default": false,
100
100
  "description": "Whether to allow multiple selections.\nWhen true, users can select multiple values displayed as tags.\n"
101
+ },
102
+ "params": {
103
+ "type": "object",
104
+ "additionalProperties": {
105
+ "type": "string"
106
+ },
107
+ "description": "Map of URL query parameter names to sibling form field names.\nWhen fetching autocomplete options, the current value of each\nreferenced sibling field is appended as a query parameter.\nWhen any dependency field changes, the autocomplete clears its\ncurrent value and invalidates the suggestion cache.\n"
101
108
  }
102
109
  },
103
110
  "required": [
@@ -453,7 +460,9 @@
453
460
  "completed",
454
461
  "failed",
455
462
  "cancelled",
456
- "skipped"
463
+ "skipped",
464
+ "paused",
465
+ "interrupted"
457
466
  ],
458
467
  "description": "Current execution status of a node"
459
468
  },
@@ -4,10 +4,11 @@
4
4
  */
5
5
  import type { CategoryDefinition } from '../types/index.js';
6
6
  import type { EndpointConfig } from '../config/endpoints.js';
7
+ import type { AuthProvider } from '../types/auth.js';
7
8
  /**
8
9
  * Fetch category definitions from API
9
10
  */
10
- export declare function fetchCategories(endpointConfig: EndpointConfig): Promise<CategoryDefinition[]>;
11
+ export declare function fetchCategories(endpointConfig: EndpointConfig, authProvider?: AuthProvider): Promise<CategoryDefinition[]>;
11
12
  /**
12
13
  * Validate category definitions structure
13
14
  */
@@ -2,17 +2,19 @@
2
2
  * Categories API Service
3
3
  * Handles fetching category definitions from the backend
4
4
  */
5
- import { buildEndpointUrl } from '../config/endpoints.js';
5
+ import { buildEndpointUrl, getEndpointHeaders } from '../config/endpoints.js';
6
6
  import { DEFAULT_CATEGORIES } from '../config/defaultCategories.js';
7
7
  import { logger } from '../utils/logger.js';
8
8
  /**
9
9
  * Fetch category definitions from API
10
10
  */
11
- export async function fetchCategories(endpointConfig) {
11
+ export async function fetchCategories(endpointConfig, authProvider) {
12
12
  try {
13
13
  const url = buildEndpointUrl(endpointConfig, endpointConfig.endpoints.categories);
14
+ const configHeaders = getEndpointHeaders(endpointConfig, 'categories');
15
+ const authHeaders = authProvider ? await authProvider.getAuthHeaders() : {};
14
16
  const response = await fetch(url, {
15
- headers: { 'Content-Type': 'application/json' }
17
+ headers: { ...configHeaders, ...authHeaders }
16
18
  });
17
19
  if (!response.ok) {
18
20
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
@@ -4,10 +4,11 @@
4
4
  */
5
5
  import type { PortConfig } from '../types/index.js';
6
6
  import type { EndpointConfig } from '../config/endpoints.js';
7
+ import type { AuthProvider } from '../types/auth.js';
7
8
  /**
8
9
  * Fetch port configuration from API
9
10
  */
10
- export declare function fetchPortConfig(endpointConfig: EndpointConfig): Promise<PortConfig>;
11
+ export declare function fetchPortConfig(endpointConfig: EndpointConfig, authProvider?: AuthProvider): Promise<PortConfig>;
11
12
  /**
12
13
  * Validate port configuration structure
13
14
  */
@@ -2,17 +2,19 @@
2
2
  * Port Configuration API Service
3
3
  * Handles fetching port configuration from the backend
4
4
  */
5
- import { buildEndpointUrl } from '../config/endpoints.js';
5
+ import { buildEndpointUrl, getEndpointHeaders } from '../config/endpoints.js';
6
6
  import { DEFAULT_PORT_CONFIG } from '../config/defaultPortConfig.js';
7
7
  import { logger } from '../utils/logger.js';
8
8
  /**
9
9
  * Fetch port configuration from API
10
10
  */
11
- export async function fetchPortConfig(endpointConfig) {
11
+ export async function fetchPortConfig(endpointConfig, authProvider) {
12
12
  try {
13
13
  const url = buildEndpointUrl(endpointConfig, endpointConfig.endpoints.portConfig);
14
+ const configHeaders = getEndpointHeaders(endpointConfig, 'portConfig');
15
+ const authHeaders = authProvider ? await authProvider.getAuthHeaders() : {};
14
16
  const response = await fetch(url, {
15
- headers: { 'Content-Type': 'application/json' }
17
+ headers: { ...configHeaders, ...authHeaders }
16
18
  });
17
19
  if (!response.ok) {
18
20
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
@@ -89,6 +89,10 @@ export declare function getActiveExecutionId(): string | null;
89
89
  * Pass to PipelinePanel's refreshTrigger prop.
90
90
  */
91
91
  export declare function getPipelineRefreshTrigger(): number;
92
+ /**
93
+ * Whether log messages should be shown in the execution console
94
+ */
95
+ export declare function getShowLogs(): boolean;
92
96
  /**
93
97
  * Playground store actions for modifying state
94
98
  */
@@ -183,6 +187,8 @@ export declare const playgroundActions: {
183
187
  */
184
188
  switchSession: (sessionId: string) => void;
185
189
  pinExecution(executionId: string | null): void;
190
+ setShowLogs(value: boolean): void;
191
+ toggleShowLogs(): void;
186
192
  };
187
193
  /**
188
194
  * Apply a server response to the store. All message and status updates from
@@ -43,6 +43,8 @@ let _lastPollSequenceNumber = $state(null);
43
43
  let _pinnedExecutionId = $state(null);
44
44
  /** Incremented on every message batch that should trigger a pipeline re-fetch */
45
45
  let _pipelineRefreshTrigger = $state(0);
46
+ /** Whether log messages are visible in the execution console */
47
+ let _showLogs = $state(true);
46
48
  /** Latest execution ID derived from current session's executions list */
47
49
  const _latestExecutionId = $derived(_currentSession?.executions?.at(-1)?.id ?? null);
48
50
  /** Active execution: pinned if set, otherwise latest */
@@ -237,6 +239,12 @@ export function getActiveExecutionId() {
237
239
  export function getPipelineRefreshTrigger() {
238
240
  return _pipelineRefreshTrigger;
239
241
  }
242
+ /**
243
+ * Whether log messages should be shown in the execution console
244
+ */
245
+ export function getShowLogs() {
246
+ return _showLogs;
247
+ }
240
248
  // =========================================================================
241
249
  // Helper Functions
242
250
  // =========================================================================
@@ -345,7 +353,11 @@ export const playgroundActions = {
345
353
  // so we only need to check and update the tail entry.
346
354
  // 'idle' means the run finished normally (server returns 'idle' post-completion,
347
355
  // not 'completed'), so map it to 'completed' for the execution entry.
348
- const terminalExecutionStatus = status === 'failed' ? 'failed' : status === 'completed' || status === 'idle' ? 'completed' : null;
356
+ const terminalExecutionStatus = status === 'failed'
357
+ ? 'failed'
358
+ : status === 'completed' || status === 'idle'
359
+ ? 'completed'
360
+ : null;
349
361
  if (terminalExecutionStatus && _currentSession?.executions?.length) {
350
362
  const execs = [..._currentSession.executions];
351
363
  const last = execs[execs.length - 1];
@@ -405,6 +417,8 @@ export const playgroundActions = {
405
417
  * @param message - The message to add
406
418
  */
407
419
  addMessage: (message) => {
420
+ if (_messages.some(m => m.id === message.id))
421
+ return;
408
422
  const seq = message.sequenceNumber ?? 0;
409
423
  let lo = 0, hi = _messages.length;
410
424
  while (lo < hi) {
@@ -500,6 +514,12 @@ export const playgroundActions = {
500
514
  },
501
515
  pinExecution(executionId) {
502
516
  _pinnedExecutionId = executionId;
517
+ },
518
+ setShowLogs(value) {
519
+ _showLogs = value;
520
+ },
521
+ toggleShowLogs() {
522
+ _showLogs = !_showLogs;
503
523
  }
504
524
  };
505
525
  // =========================================================================
@@ -153,6 +153,7 @@ export declare function mountWorkflowEditor(container: HTMLElement, options?: {
153
153
  endpointConfig?: EndpointConfig;
154
154
  portConfig?: PortConfig;
155
155
  categories?: CategoryDefinition[];
156
+ authProvider?: AuthProvider;
156
157
  }): Promise<MountedFlowDropApp>;
157
158
  /**
158
159
  * Unmount a FlowDrop app
@@ -84,7 +84,7 @@ export async function mountFlowDropApp(container, options = {}) {
84
84
  if (!finalPortConfig && config) {
85
85
  // Try to fetch port configuration from API
86
86
  try {
87
- finalPortConfig = await fetchPortConfig(config);
87
+ finalPortConfig = await fetchPortConfig(config, authProvider);
88
88
  }
89
89
  catch (error) {
90
90
  logger.warn('Failed to fetch port config from API, using default:', error);
@@ -101,7 +101,7 @@ export async function mountFlowDropApp(container, options = {}) {
101
101
  }
102
102
  else if (config) {
103
103
  try {
104
- const fetchedCategories = await fetchCategories(config);
104
+ const fetchedCategories = await fetchCategories(config, authProvider);
105
105
  initializeCategories(fetchedCategories);
106
106
  }
107
107
  catch (error) {
@@ -244,7 +244,7 @@ export async function mountFlowDropApp(container, options = {}) {
244
244
  * @returns Promise resolving to a MountedFlowDropApp instance
245
245
  */
246
246
  export async function mountWorkflowEditor(container, options = {}) {
247
- const { nodes = [], endpointConfig, portConfig, categories } = options;
247
+ const { nodes = [], endpointConfig, portConfig, categories, authProvider } = options;
248
248
  // Create endpoint configuration
249
249
  let config;
250
250
  if (endpointConfig) {
@@ -269,7 +269,7 @@ export async function mountWorkflowEditor(container, options = {}) {
269
269
  if (!finalPortConfig && config) {
270
270
  // Try to fetch port configuration from API
271
271
  try {
272
- finalPortConfig = await fetchPortConfig(config);
272
+ finalPortConfig = await fetchPortConfig(config, authProvider);
273
273
  }
274
274
  catch (error) {
275
275
  logger.warn('Failed to fetch port config from API, using default:', error);
@@ -286,7 +286,7 @@ export async function mountWorkflowEditor(container, options = {}) {
286
286
  }
287
287
  else if (config) {
288
288
  try {
289
- const fetchedCategories = await fetchCategories(config);
289
+ const fetchedCategories = await fetchCategories(config, authProvider);
290
290
  initializeCategories(fetchedCategories);
291
291
  }
292
292
  catch (error) {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Core types for the Workflow Library
3
3
  */
4
+ import type { Component } from 'svelte';
4
5
  import type { Node, Edge, XYPosition } from '@xyflow/svelte';
5
6
  import { ConnectionLineType } from '@xyflow/svelte';
6
7
  import type { EndpointConfig } from '../config/endpoints.js';
@@ -296,6 +297,19 @@ export interface AutocompleteConfig {
296
297
  * @default false
297
298
  */
298
299
  multiple?: boolean;
300
+ /**
301
+ * Map of URL query parameter names to sibling form field names.
302
+ * When fetching autocomplete options, the current value of each
303
+ * referenced sibling field is appended as a query parameter.
304
+ *
305
+ * Example: { "account": "account", "project": "project" }
306
+ * If the "account" field currently holds "my-jira", the URL becomes:
307
+ * /api/jira/issue-types?account=my-jira&q=...
308
+ *
309
+ * When any dependency field changes, the autocomplete clears its
310
+ * current value and invalidates the suggestion cache.
311
+ */
312
+ params?: Record<string, string>;
299
313
  }
300
314
  /**
301
315
  * Dynamic schema endpoint configuration
@@ -1168,7 +1182,32 @@ export type WorkflowsResponse = ApiResponse<Workflow[]>;
1168
1182
  /**
1169
1183
  * Node execution status enum
1170
1184
  */
1171
- export type NodeExecutionStatus = 'idle' | 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'skipped';
1185
+ export type NodeExecutionStatus = 'idle' | 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'skipped' | 'paused' | 'interrupted';
1186
+ export interface KanbanColumnDef {
1187
+ key: string;
1188
+ label: string;
1189
+ statuses: NodeExecutionStatus[];
1190
+ icon?: string;
1191
+ color?: string;
1192
+ }
1193
+ /** Props passed to every pipeline view component, built-in or custom. */
1194
+ export interface PipelineViewProps {
1195
+ pipelineId: string | null;
1196
+ workflow: Workflow;
1197
+ endpointConfig: EndpointConfig;
1198
+ refreshTrigger?: number;
1199
+ }
1200
+ /** A custom view injected into the PipelinePanel view switcher. */
1201
+ export interface PipelineViewDef {
1202
+ /** Unique key — must not clash with built-ins: 'graph' | 'kanban' | 'table' */
1203
+ key: string;
1204
+ /** Label shown in the toggle button tooltip */
1205
+ label: string;
1206
+ /** Iconify icon name, e.g. 'mdi:chart-bar' */
1207
+ icon: string;
1208
+ /** Svelte component that receives PipelineViewProps */
1209
+ component: Component<PipelineViewProps>;
1210
+ }
1172
1211
  /**
1173
1212
  * Node execution tracking information
1174
1213
  */
@@ -1191,7 +1230,7 @@ export interface NodeExecutionInfo {
1191
1230
  /**
1192
1231
  * Workflow execution status
1193
1232
  */
1194
- export type ExecutionStatus = 'idle' | 'running' | 'completed' | 'failed' | 'cancelled';
1233
+ export type ExecutionStatus = 'idle' | 'running' | 'completed' | 'failed' | 'cancelled' | 'paused' | 'interrupted';
1195
1234
  /**
1196
1235
  * Workflow execution result
1197
1236
  */
@@ -12,7 +12,10 @@ import type { ConfigProperty } from './index.js';
12
12
  */
13
13
  export type PlaygroundSessionStatus = 'idle' | 'running' | 'awaiting_input' | 'completed' | 'failed';
14
14
  /**
15
- * Statuses that stop polling by default (resource efficiency)
15
+ * Statuses that stop polling by default.
16
+ * Only truly-dormant sessions stop polling — completed/failed/awaiting_input
17
+ * sessions on async servers can still generate messages after the status change,
18
+ * so polling continues until the session is explicitly idle.
16
19
  */
17
20
  export declare const DEFAULT_STOP_POLLING_STATUSES: PlaygroundSessionStatus[];
18
21
  /**
@@ -115,6 +118,65 @@ export interface PlaygroundMessageMetadata {
115
118
  /** Allow additional properties */
116
119
  [key: string]: unknown;
117
120
  }
121
+ /**
122
+ * A node on the contextual tree the server attaches to a message
123
+ * (e.g. workflow > sub-workflow > iteration). Display-only — this is not a
124
+ * navigation breadcrumb; `href` is intentionally not part of the schema.
125
+ */
126
+ export interface MessageHierarchyItem {
127
+ /** Stable identifier (for keying) */
128
+ id: string;
129
+ /** Display label */
130
+ label: string;
131
+ /** Optional iconify icon id (e.g. 'mdi:graph') */
132
+ icon?: string;
133
+ }
134
+ /**
135
+ * Semantic color hooks for a tag. Map to design tokens in the theme.
136
+ */
137
+ export type MessageTagColor = 'muted' | 'primary' | 'success' | 'warning' | 'error' | 'info';
138
+ /**
139
+ * Visual emphasis for a tag.
140
+ */
141
+ export type MessageTagVariant = 'solid' | 'outline' | 'subtle';
142
+ /**
143
+ * A server-emitted classification chip rendered alongside a message.
144
+ * Tags are unordered and replace any UI-side defaults.
145
+ */
146
+ export interface MessageTag {
147
+ /** Stable identifier (for keying) */
148
+ id: string;
149
+ /** Display label */
150
+ label: string;
151
+ /** Optional iconify icon id */
152
+ icon?: string;
153
+ /** Semantic color hook; defaults to 'muted' if omitted */
154
+ color?: MessageTagColor;
155
+ /** Visual style; defaults to 'subtle' if omitted */
156
+ variant?: MessageTagVariant;
157
+ /** Free-form classifier the server may use for future grouping/filtering */
158
+ type?: string;
159
+ }
160
+ /**
161
+ * Rendering hint the server may set to choose a layout regardless of role.
162
+ *
163
+ * - `bubble`: chat bubble shape (default for user/assistant)
164
+ * - `log`: dense one-liner (default for log role)
165
+ * - `notice`: compact centered notice (default for system role with
166
+ * compactSystemMessages enabled)
167
+ * - `card`: vertical layout — breadcrumb (top), body (middle), tags (bottom)
168
+ *
169
+ * When omitted, the client falls back to the role-based default above.
170
+ */
171
+ export type PlaygroundMessageDisplay = 'bubble' | 'log' | 'notice' | 'card';
172
+ /**
173
+ * Resolve the effective layout for a message. Server-supplied `display` wins;
174
+ * otherwise we fall back to a role-based default. Pure function so the
175
+ * dispatcher and tests can share it.
176
+ */
177
+ export declare function resolveMessageDisplay(message: Pick<PlaygroundMessage, 'role' | 'display'>, options?: {
178
+ compactSystemMessages?: boolean;
179
+ }): PlaygroundMessageDisplay;
118
180
  /**
119
181
  * Message in a playground session
120
182
  *
@@ -156,6 +218,23 @@ export interface PlaygroundMessage {
156
218
  executionId?: string | null;
157
219
  /** Associated node ID (for log/assistant messages) */
158
220
  nodeId?: string | null;
221
+ /**
222
+ * Ordered hierarchy path (e.g. workflow > sub-workflow > iteration).
223
+ * Rendered as a chevron-separated trail. Server-controlled — no
224
+ * client-side derivation.
225
+ */
226
+ hierarchy?: MessageHierarchyItem[];
227
+ /**
228
+ * Server-emitted classification chips rendered with the message.
229
+ * Replace any client-side defaults entirely (no merge).
230
+ */
231
+ tags?: MessageTag[];
232
+ /**
233
+ * Layout hint. When omitted, the client picks a default from the role:
234
+ * - log → 'log', system (when compactSystemMessages) → 'notice',
235
+ * user/assistant → 'bubble'.
236
+ */
237
+ display?: PlaygroundMessageDisplay;
159
238
  /** Additional message metadata */
160
239
  metadata?: PlaygroundMessageMetadata;
161
240
  }
@@ -273,7 +352,7 @@ export interface PlaygroundConfig {
273
352
  /**
274
353
  * Determines if polling should stop for a given session status.
275
354
  * Override to customize which statuses pause polling.
276
- * @default defaultShouldStopPolling (stops on idle, completed, failed, awaiting_input)
355
+ * @default defaultShouldStopPolling (stops only on idle)
277
356
  */
278
357
  shouldStopPolling?: (status: PlaygroundSessionStatus) => boolean;
279
358
  /**
@@ -7,14 +7,12 @@
7
7
  * @module types/playground
8
8
  */
9
9
  /**
10
- * Statuses that stop polling by default (resource efficiency)
10
+ * Statuses that stop polling by default.
11
+ * Only truly-dormant sessions stop polling — completed/failed/awaiting_input
12
+ * sessions on async servers can still generate messages after the status change,
13
+ * so polling continues until the session is explicitly idle.
11
14
  */
12
- export const DEFAULT_STOP_POLLING_STATUSES = [
13
- 'idle',
14
- 'completed',
15
- 'failed',
16
- 'awaiting_input'
17
- ];
15
+ export const DEFAULT_STOP_POLLING_STATUSES = ['idle'];
18
16
  /**
19
17
  * Statuses that are considered terminal by default (clears isExecuting)
20
18
  */
@@ -44,6 +42,20 @@ export function defaultShouldStopPolling(status) {
44
42
  export function defaultIsTerminalStatus(status) {
45
43
  return DEFAULT_TERMINAL_STATUSES.includes(status);
46
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
+ }
47
59
  /**
48
60
  * Metadata field to control Run button state from backend.
49
61
  * When a message contains this field set to true, the Run button becomes enabled.
@@ -13,7 +13,9 @@ export function getStatusColor(status) {
13
13
  completed: '#10b981', // emerald
14
14
  failed: '#ef4444', // red
15
15
  cancelled: '#6b7280', // gray
16
- skipped: '#8b5cf6' // violet
16
+ skipped: '#8b5cf6', // violet
17
+ paused: '#f97316', // orange
18
+ interrupted: '#06b6d4' // cyan
17
19
  };
18
20
  return statusColors[status] || statusColors.idle;
19
21
  }
@@ -28,7 +30,9 @@ export function getStatusIcon(status) {
28
30
  completed: 'mdi:check-circle',
29
31
  failed: 'mdi:alert-circle',
30
32
  cancelled: 'mdi:cancel',
31
- skipped: 'mdi:skip-next'
33
+ skipped: 'mdi:skip-next',
34
+ paused: 'mdi:pause-circle-outline',
35
+ interrupted: 'mdi:account-clock-outline'
32
36
  };
33
37
  return statusIcons[status] || statusIcons.idle;
34
38
  }
@@ -43,7 +47,9 @@ export function getStatusLabel(status) {
43
47
  completed: 'Completed',
44
48
  failed: 'Failed',
45
49
  cancelled: 'Cancelled',
46
- skipped: 'Skipped'
50
+ skipped: 'Skipped',
51
+ paused: 'Paused',
52
+ interrupted: 'Waiting'
47
53
  };
48
54
  return statusLabels[status] || statusLabels.idle;
49
55
  }
@@ -58,7 +64,9 @@ export function getStatusBackgroundColor(status) {
58
64
  completed: '#d1fae5', // light emerald
59
65
  failed: '#fee2e2', // light red
60
66
  cancelled: '#f3f4f6', // light gray
61
- skipped: '#ede9fe' // light violet
67
+ skipped: '#ede9fe', // light violet
68
+ paused: '#ffedd5', // light orange
69
+ interrupted: '#cffafe' // light cyan
62
70
  };
63
71
  return statusBackgroundColors[status] || statusBackgroundColors.idle;
64
72
  }
@@ -73,7 +81,9 @@ export function getStatusTextColor(status) {
73
81
  completed: '#059669', // emerald
74
82
  failed: '#dc2626', // red
75
83
  cancelled: '#6b7280', // gray
76
- skipped: '#7c3aed' // violet
84
+ skipped: '#7c3aed', // violet
85
+ paused: '#ea580c', // orange
86
+ interrupted: '#0891b2' // cyan
77
87
  };
78
88
  return statusTextColors[status] || statusTextColors.idle;
79
89
  }
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.11.0",
6
+ "version": "1.13.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",