@flowdrop/flowdrop 2.12.0 → 2.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.
- package/CHANGELOG.md +10 -0
- package/dist/components/App.svelte +10 -0
- package/dist/components/App.svelte.d.ts +8 -0
- package/dist/components/playground/DockedPlayground.svelte +8 -1
- package/dist/components/playground/DockedPlayground.svelte.d.ts +6 -0
- package/dist/editor/index.d.ts +1 -0
- package/dist/playground/index.d.ts +1 -1
- package/dist/svelte-app.d.ts +9 -0
- package/dist/svelte-app.js +2 -1
- package/dist/types/playground.d.ts +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.13.0] - 2026-10-14
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **`playground` mount option.** `mountFlowDropApp` (and the `App` component) take
|
|
13
|
+
`playground: { pollingInterval?, shouldStopPolling? }`, which configures the editor's docked Playground
|
|
14
|
+
(Test mode); it had no way to set them. A backend that leaves a session `completed` or `failed` after a
|
|
15
|
+
turn can now stop polling there; unset, the defaults are unchanged (1500 ms, stop on `idle` only). Type:
|
|
16
|
+
`EditorPlaygroundConfig`, exported from `@flowdrop/flowdrop/editor` and `/playground`. fdnpm#46.
|
|
17
|
+
|
|
8
18
|
## [2.12.0] - 2026-10-14
|
|
9
19
|
|
|
10
20
|
### Added
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
} from '../utils/inspectorSurface.js';
|
|
93
93
|
import { validateWorkflowData } from '../utils/validation.js';
|
|
94
94
|
import type { SettingsCategory, SurfacePlacement } from '../types/settings.js';
|
|
95
|
+
import type { EditorPlaygroundConfig } from '../types/playground.js';
|
|
95
96
|
import type { EditorMode } from '../stores/editorModeStore.svelte.js';
|
|
96
97
|
import { defaultMessages, mergeMessages, setMessages, m } from '../messages/index.js';
|
|
97
98
|
import type { MessagesOverride } from '../messages/index.js';
|
|
@@ -169,6 +170,13 @@
|
|
|
169
170
|
* initial value. A host uses it to keep its URL in step.
|
|
170
171
|
*/
|
|
171
172
|
onEditorModeChange?: (mode: EditorMode) => void;
|
|
173
|
+
/**
|
|
174
|
+
* How Test mode's Playground follows a run: `pollingInterval` (ms, default
|
|
175
|
+
* 1500) and `shouldStopPolling` (default: stop on `idle` only). A backend
|
|
176
|
+
* that leaves a session `completed` or `failed` after a turn sets
|
|
177
|
+
* `shouldStopPolling` here. Unset, nothing changes.
|
|
178
|
+
*/
|
|
179
|
+
playground?: EditorPlaygroundConfig;
|
|
172
180
|
/** Pipeline ID for fetching node execution info */
|
|
173
181
|
pipelineId?: string;
|
|
174
182
|
/** Increments to force a refresh of pipeline node status from the server */
|
|
@@ -287,6 +295,7 @@
|
|
|
287
295
|
workflowFormats,
|
|
288
296
|
messages: messagesOverride,
|
|
289
297
|
contextMenu,
|
|
298
|
+
playground,
|
|
290
299
|
instance
|
|
291
300
|
}: Props = $props();
|
|
292
301
|
|
|
@@ -2026,6 +2035,7 @@
|
|
|
2026
2035
|
{#if fd.workflow.current}
|
|
2027
2036
|
<DockedPlayground
|
|
2028
2037
|
workflow={fd.workflow.current}
|
|
2038
|
+
config={playground}
|
|
2029
2039
|
onSave={saveWorkflow}
|
|
2030
2040
|
onOpenSettings={fd.workflow.current.playground !== undefined
|
|
2031
2041
|
? openPlaygroundSettings
|
|
@@ -8,6 +8,7 @@ import type { FlowDropEventHandlers, FlowDropFeatures } from '../types/events.js
|
|
|
8
8
|
import type { FlowDropTheme, FlowDropThemeName } from '../types/theme.js';
|
|
9
9
|
import type { FlowDropInstance } from '../stores/instanceContainer.svelte.js';
|
|
10
10
|
import type { SettingsCategory, SurfacePlacement } from '../types/settings.js';
|
|
11
|
+
import type { EditorPlaygroundConfig } from '../types/playground.js';
|
|
11
12
|
import type { EditorMode } from '../stores/editorModeStore.svelte.js';
|
|
12
13
|
import type { MessagesOverride } from '../messages/index.js';
|
|
13
14
|
/**
|
|
@@ -83,6 +84,13 @@ interface Props {
|
|
|
83
84
|
* initial value. A host uses it to keep its URL in step.
|
|
84
85
|
*/
|
|
85
86
|
onEditorModeChange?: (mode: EditorMode) => void;
|
|
87
|
+
/**
|
|
88
|
+
* How Test mode's Playground follows a run: `pollingInterval` (ms, default
|
|
89
|
+
* 1500) and `shouldStopPolling` (default: stop on `idle` only). A backend
|
|
90
|
+
* that leaves a session `completed` or `failed` after a turn sets
|
|
91
|
+
* `shouldStopPolling` here. Unset, nothing changes.
|
|
92
|
+
*/
|
|
93
|
+
playground?: EditorPlaygroundConfig;
|
|
86
94
|
/** Pipeline ID for fetching node execution info */
|
|
87
95
|
pipelineId?: string;
|
|
88
96
|
/** Increments to force a refresh of pipeline node status from the server */
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import type { Snippet } from 'svelte';
|
|
18
18
|
import PlaygroundSurface from './PlaygroundSurface.svelte';
|
|
19
19
|
import type { Workflow } from '../../types/index.js';
|
|
20
|
+
import type { EditorPlaygroundConfig } from '../../types/playground.js';
|
|
20
21
|
|
|
21
22
|
interface Props {
|
|
22
23
|
/** The editor's workflow, live: its unsaved edits are what the next turn runs. */
|
|
@@ -34,9 +35,14 @@
|
|
|
34
35
|
* acting). The editor's own actions for a run go here.
|
|
35
36
|
*/
|
|
36
37
|
menuItems?: Snippet<[{ close: () => void }]>;
|
|
38
|
+
/**
|
|
39
|
+
* How the surface follows a run (`pollingInterval`, `shouldStopPolling`).
|
|
40
|
+
* Forwarded to PlaygroundSurface's `config`; unset, the defaults apply.
|
|
41
|
+
*/
|
|
42
|
+
config?: EditorPlaygroundConfig;
|
|
37
43
|
}
|
|
38
44
|
|
|
39
|
-
let { workflow, onOpenSettings, onSave, menuItems }: Props = $props();
|
|
45
|
+
let { workflow, onOpenSettings, onSave, menuItems, config }: Props = $props();
|
|
40
46
|
</script>
|
|
41
47
|
|
|
42
48
|
<div class="docked-playground" data-testid="docked-playground">
|
|
@@ -50,6 +56,7 @@
|
|
|
50
56
|
sessionOptional
|
|
51
57
|
playgroundSessionsOnly
|
|
52
58
|
historyHeader
|
|
59
|
+
{config}
|
|
53
60
|
{menuItems}
|
|
54
61
|
{onSave}
|
|
55
62
|
{onOpenSettings}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { Workflow } from '../../types/index.js';
|
|
3
|
+
import type { EditorPlaygroundConfig } from '../../types/playground.js';
|
|
3
4
|
interface Props {
|
|
4
5
|
/** The editor's workflow, live: its unsaved edits are what the next turn runs. */
|
|
5
6
|
workflow: Workflow;
|
|
@@ -18,6 +19,11 @@ interface Props {
|
|
|
18
19
|
menuItems?: Snippet<[{
|
|
19
20
|
close: () => void;
|
|
20
21
|
}]>;
|
|
22
|
+
/**
|
|
23
|
+
* How the surface follows a run (`pollingInterval`, `shouldStopPolling`).
|
|
24
|
+
* Forwarded to PlaygroundSurface's `config`; unset, the defaults apply.
|
|
25
|
+
*/
|
|
26
|
+
config?: EditorPlaygroundConfig;
|
|
21
27
|
}
|
|
22
28
|
declare const DockedPlayground: import("svelte").Component<Props, {}, "">;
|
|
23
29
|
type DockedPlayground = ReturnType<typeof DockedPlayground>;
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ export type { AuthProvider, StaticAuthConfig, CallbackAuthConfig } from '../type
|
|
|
98
98
|
export type { FlowDropEventHandlers, FlowDropFeatures, WorkflowChangeType } from '../types/events.js';
|
|
99
99
|
export type { EndpointConfig } from '../config/endpoints.js';
|
|
100
100
|
export type { UIAction } from '../commands/types.js';
|
|
101
|
+
export type { EditorPlaygroundConfig } from '../types/playground.js';
|
|
101
102
|
export type { FlowDropMountOptions, MountedFlowDropApp, NavbarAction, NavbarBranding } from '../svelte-app.js';
|
|
102
103
|
export type { ContextMenuActions, ContextMenuContext, ContextMenuEntry, ContextMenuOptions, ContextMenuTarget } from './contextMenu.js';
|
|
103
104
|
export type { NodeComponentProps, NodeComponentRegistration, FlowDropPluginConfig, PluginNodeDefinition } from '../registry/index.js';
|
|
@@ -167,7 +167,7 @@ export type { NodeStatusScope } from '../stores/playgroundStore.svelte.js';
|
|
|
167
167
|
* mode builds on.
|
|
168
168
|
*/
|
|
169
169
|
export { RunController, type RunControllerOptions, type RunControllerDeps } from '../stores/runController.svelte.js';
|
|
170
|
-
export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundTurnResult, PlaygroundTurnResponse, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundMessageDisplay, ResolvedMessageDisplay, PlaygroundMessageOrigin, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse, PlaygroundExecution, SessionRun, SessionRunsResult, SessionRunsResponse, SessionThirdPartySettings, VersionDivider, VersionDividerAnchor } from '../types/playground.js';
|
|
170
|
+
export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundTurnResult, PlaygroundTurnResponse, PlaygroundMessagesResult, PlaygroundConfig, EditorPlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundMessageDisplay, ResolvedMessageDisplay, PlaygroundMessageOrigin, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse, PlaygroundExecution, SessionRun, SessionRunsResult, SessionRunsResponse, SessionThirdPartySettings, VersionDivider, VersionDividerAnchor } from '../types/playground.js';
|
|
171
171
|
export { resolvePlaygroundInputMode, interfaceFormEntries, interfaceFormSchema, collectInterfaceInputs, playgroundChatIssues, type InterfaceInputsResult, type PlaygroundInputMode, type PlaygroundChatIssue, type PlaygroundChatInputKey } from '../utils/workflowInterface.js';
|
|
172
172
|
export { resolvePlaygroundChat, type ResolvedPlaygroundChat } from '../utils/playgroundChat.js';
|
|
173
173
|
export { PLAYGROUND_SESSION_MARK, isPlaygroundSession, playgroundSessionsOf, isRunStale, versionDividersFromRuns } from '../utils/sessionRuns.js';
|
package/dist/svelte-app.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { Workflow, NodeMetadata, PortConfig, CategoryDefinition } from './types/index.js';
|
|
10
10
|
import type { EndpointConfig } from './config/endpoints.js';
|
|
11
11
|
import type { AuthProvider } from './types/auth.js';
|
|
12
|
+
import type { EditorPlaygroundConfig } from './types/playground.js';
|
|
12
13
|
import type { FlowDropEventHandlers, FlowDropFeatures } from './types/events.js';
|
|
13
14
|
import type { FlowDropTheme, FlowDropThemeName } from './types/theme.js';
|
|
14
15
|
import type { WorkflowFormatAdapter } from './registry/workflowFormatRegistry.js';
|
|
@@ -81,6 +82,14 @@ export interface FlowDropMountOptions {
|
|
|
81
82
|
* its URL in step. Not called for the initial value.
|
|
82
83
|
*/
|
|
83
84
|
onEditorModeChange?: (mode: 'edit' | 'test') => void;
|
|
85
|
+
/**
|
|
86
|
+
* How Test mode's Playground follows a run: `pollingInterval` (ms, default
|
|
87
|
+
* 1500) and `shouldStopPolling` (default: stop on `idle` only, on purpose,
|
|
88
|
+
* since an async server may still emit messages). A backend that leaves a
|
|
89
|
+
* session `completed` or `failed` after a turn passes its own
|
|
90
|
+
* `shouldStopPolling` here. Unset, nothing changes.
|
|
91
|
+
*/
|
|
92
|
+
playground?: EditorPlaygroundConfig;
|
|
84
93
|
/** Pipeline ID for status display */
|
|
85
94
|
pipelineId?: string;
|
|
86
95
|
/** Custom navbar title */
|
package/dist/svelte-app.js
CHANGED
|
@@ -159,7 +159,7 @@ function attachWebMCPToMount(fd, options, isDestroyed) {
|
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
161
|
export async function mountFlowDropApp(container, options = {}) {
|
|
162
|
-
const { workflow, nodes, endpointConfig, portConfig, categories, height = '100vh', width = '100%', showNavbar = false, disableSidebar, configPlacement, consolePlacement, mode, editorMode, onEditorModeChange, pipelineId, navbarTitle, navbarActions, branding, showSettings, showStatus, authProvider, eventHandlers, features: userFeatures, settings: initialSettings, colorScheme, draftStorageKey: customDraftKey, draftStorage, formatAdapters, workflowFormats, theme, settingsCategories, showSettingsSyncButton, showSettingsResetButton, instanceId, webmcp, host, contextMenu } = options;
|
|
162
|
+
const { workflow, nodes, endpointConfig, portConfig, categories, height = '100vh', width = '100%', showNavbar = false, disableSidebar, configPlacement, consolePlacement, mode, editorMode, onEditorModeChange, playground, pipelineId, navbarTitle, navbarActions, branding, showSettings, showStatus, authProvider, eventHandlers, features: userFeatures, settings: initialSettings, colorScheme, draftStorageKey: customDraftKey, draftStorage, formatAdapters, workflowFormats, theme, settingsCategories, showSettingsSyncButton, showSettingsResetButton, instanceId, webmcp, host, contextMenu } = options;
|
|
163
163
|
// Per-instance state container — this is what allows multiple FlowDrop
|
|
164
164
|
// editors to coexist on one page without sharing workflow/history state.
|
|
165
165
|
const { fd, isDefault } = acquireInstance(instanceId);
|
|
@@ -221,6 +221,7 @@ export async function mountFlowDropApp(container, options = {}) {
|
|
|
221
221
|
mode,
|
|
222
222
|
editorMode,
|
|
223
223
|
onEditorModeChange,
|
|
224
|
+
playground,
|
|
224
225
|
pipelineId,
|
|
225
226
|
navbarTitle,
|
|
226
227
|
navbarActions,
|
|
@@ -556,6 +556,15 @@ export interface PlaygroundConfig {
|
|
|
556
556
|
*/
|
|
557
557
|
isTerminalStatus?: (status: PlaygroundSessionStatus) => boolean;
|
|
558
558
|
}
|
|
559
|
+
/**
|
|
560
|
+
* The part of {@link PlaygroundConfig} that steers how the editor's Test mode
|
|
561
|
+
* follows a run: how often it polls and when it stops. Passed to the editor as
|
|
562
|
+
* the `playground` mount option. Not set, the defaults apply (poll every 1500 ms, stop on
|
|
563
|
+
* `idle` only).
|
|
564
|
+
*
|
|
565
|
+
* `isTerminalStatus` is not offered: nothing in the editor reads it.
|
|
566
|
+
*/
|
|
567
|
+
export type EditorPlaygroundConfig = Pick<PlaygroundConfig, 'pollingInterval' | 'shouldStopPolling'>;
|
|
559
568
|
/**
|
|
560
569
|
* Metadata field to control Run button state from backend.
|
|
561
570
|
* 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": "2.
|
|
6
|
+
"version": "2.13.0",
|
|
7
7
|
"author": "Shibin Das (D34dMan)",
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://github.com/flowdrop-io/flowdrop/issues"
|