@d34dman/flowdrop 0.0.61 → 0.0.62
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 +6 -0
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/agentspec/AgentSpecAdapter.js +3 -1
- package/dist/api/client.d.ts +4 -0
- package/dist/api/client.js +6 -1
- package/dist/api/enhanced-client.js +7 -6
- package/dist/components/App.svelte +143 -219
- package/dist/components/CanvasBanner.stories.svelte +25 -0
- package/dist/components/CanvasBanner.stories.svelte.d.ts +27 -0
- package/dist/components/CanvasBanner.svelte +2 -2
- package/dist/components/ConfigForm.svelte +37 -36
- package/dist/components/ConfigPanel.stories.svelte +38 -0
- package/dist/components/ConfigPanel.stories.svelte.d.ts +27 -0
- package/dist/components/ConfigPanel.svelte +2 -2
- package/dist/components/ConnectionLine.svelte +2 -2
- package/dist/components/FlowDropZone.svelte +18 -2
- package/dist/components/FlowDropZone.svelte.d.ts +2 -0
- package/dist/components/LoadingSpinner.stories.svelte +30 -0
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +27 -0
- package/dist/components/Logo.stories.svelte +22 -0
- package/dist/components/Logo.stories.svelte.d.ts +27 -0
- package/dist/components/Logo.svelte +33 -13
- package/dist/components/Logo.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +21 -0
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +27 -0
- package/dist/components/MarkdownDisplay.svelte +4 -3
- package/dist/components/Navbar.stories.svelte +41 -0
- package/dist/components/Navbar.stories.svelte.d.ts +27 -0
- package/dist/components/Navbar.svelte +4 -4
- package/dist/components/NodeSidebar.svelte +12 -12
- package/dist/components/NodeStatusOverlay.stories.svelte +74 -0
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +27 -0
- package/dist/components/PipelineStatus.svelte +11 -4
- package/dist/components/PortCoordinateTracker.svelte +1 -1
- package/dist/components/SchemaForm.stories.svelte +101 -0
- package/dist/components/SchemaForm.stories.svelte.d.ts +27 -0
- package/dist/components/SchemaForm.svelte +17 -12
- package/dist/components/SettingsModal.svelte +3 -3
- package/dist/components/SettingsPanel.svelte +23 -22
- package/dist/components/StatusIcon.stories.svelte +60 -0
- package/dist/components/StatusIcon.stories.svelte.d.ts +27 -0
- package/dist/components/StatusIcon.svelte +7 -0
- package/dist/components/StatusLabel.stories.svelte +17 -0
- package/dist/components/StatusLabel.stories.svelte.d.ts +27 -0
- package/dist/components/ThemeToggle.stories.svelte +25 -0
- package/dist/components/ThemeToggle.stories.svelte.d.ts +27 -0
- package/dist/components/ThemeToggle.svelte +8 -8
- package/dist/components/UniversalNode.svelte +1 -1
- package/dist/components/WorkflowEditor.svelte +298 -294
- package/dist/components/form/FormAutocomplete.svelte +20 -19
- package/dist/components/form/FormCheckboxGroup.stories.svelte +28 -0
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormField.svelte +3 -3
- package/dist/components/form/FormFieldLight.svelte +2 -2
- package/dist/components/form/FormFieldWrapper.stories.svelte +31 -0
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormFieldset.svelte +7 -7
- package/dist/components/form/FormNumberField.stories.svelte +33 -0
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormRangeField.stories.svelte +31 -0
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormSelect.stories.svelte +50 -0
- package/dist/components/form/FormSelect.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTemplateEditor.svelte +2 -1
- package/dist/components/form/FormTextField.stories.svelte +30 -0
- package/dist/components/form/FormTextField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTextarea.stories.svelte +31 -0
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormToggle.stories.svelte +30 -0
- package/dist/components/form/FormToggle.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +1 -1
- package/dist/components/form/types.d.ts +15 -47
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +43 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +24 -24
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +49 -0
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +19 -19
- package/dist/components/interrupt/FormPrompt.svelte +15 -15
- package/dist/components/interrupt/InterruptBubble.svelte +202 -236
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +46 -0
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +842 -0
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +34 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +21 -21
- package/dist/components/nodes/GatewayNode.stories.svelte +76 -0
- package/dist/components/nodes/GatewayNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/GatewayNode.svelte +19 -17
- package/dist/components/nodes/IdeaNode.stories.svelte +48 -0
- package/dist/components/nodes/IdeaNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/IdeaNode.svelte +10 -26
- package/dist/components/nodes/NotesNode.stories.svelte +69 -0
- package/dist/components/nodes/NotesNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/NotesNode.svelte +8 -8
- package/dist/components/nodes/SimpleNode.stories.svelte +101 -0
- package/dist/components/nodes/SimpleNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SimpleNode.svelte +16 -24
- package/dist/components/nodes/SquareNode.stories.svelte +56 -0
- package/dist/components/nodes/SquareNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SquareNode.svelte +13 -21
- package/dist/components/nodes/TerminalNode.stories.svelte +25 -0
- package/dist/components/nodes/TerminalNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/TerminalNode.svelte +6 -6
- package/dist/components/nodes/ToolNode.stories.svelte +71 -0
- package/dist/components/nodes/ToolNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/ToolNode.svelte +7 -15
- package/dist/components/nodes/WorkflowNode.stories.svelte +50 -0
- package/dist/components/nodes/WorkflowNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/WorkflowNode.svelte +13 -13
- package/dist/components/playground/ChatPanel.svelte +48 -48
- package/dist/components/playground/ExecutionLogs.svelte +23 -23
- package/dist/components/playground/InputCollector.svelte +24 -24
- package/dist/components/playground/MessageBubble.stories.svelte +49 -0
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +27 -0
- package/dist/components/playground/MessageBubble.svelte +49 -46
- package/dist/components/playground/Playground.svelte +194 -129
- package/dist/components/playground/PlaygroundModal.svelte +5 -5
- package/dist/components/playground/SessionManager.svelte +26 -26
- package/dist/config/constants.d.ts +22 -0
- package/dist/config/constants.js +22 -0
- package/dist/config/endpoints.d.ts +19 -0
- package/dist/config/runtimeConfig.js +2 -1
- package/dist/core/index.d.ts +5 -2
- package/dist/core/index.js +9 -1
- package/dist/editor/index.d.ts +13 -9
- package/dist/editor/index.js +15 -11
- package/dist/form/code.d.ts +2 -1
- package/dist/form/code.js +1 -3
- package/dist/form/markdown.d.ts +2 -1
- package/dist/form/markdown.js +1 -3
- package/dist/helpers/workflowEditorHelper.js +13 -9
- package/dist/mocks/app-forms.js +1 -0
- package/dist/mocks/app-navigation.js +3 -1
- package/dist/mocks/app-stores.d.ts +4 -4
- package/dist/playground/index.d.ts +4 -3
- package/dist/playground/index.js +12 -10
- package/dist/playground/mount.js +6 -13
- package/dist/services/agentSpecExecutionService.js +2 -1
- package/dist/services/api.js +10 -18
- package/dist/services/apiVariableService.js +2 -1
- package/dist/services/autoSaveService.d.ts +3 -3
- package/dist/services/autoSaveService.js +21 -17
- package/dist/services/categoriesApi.js +13 -5
- package/dist/services/draftStorage.js +5 -4
- package/dist/services/dynamicSchemaService.js +4 -4
- package/dist/services/globalSave.d.ts +60 -11
- package/dist/services/globalSave.js +160 -83
- package/dist/services/historyService.d.ts +2 -1
- package/dist/services/historyService.js +7 -3
- package/dist/services/interruptService.js +9 -8
- package/dist/services/nodeExecutionService.js +14 -6
- package/dist/services/playgroundService.js +2 -1
- package/dist/services/portConfigApi.js +11 -7
- package/dist/services/toastService.d.ts +1 -1
- package/dist/services/toastService.js +6 -5
- package/dist/services/variableService.js +3 -2
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.js +1 -1
- package/dist/stores/{categoriesStore.d.ts → categoriesStore.svelte.d.ts} +3 -3
- package/dist/stores/{categoriesStore.js → categoriesStore.svelte.js} +15 -18
- package/dist/stores/editorStateMachine.svelte.d.ts +42 -0
- package/dist/stores/editorStateMachine.svelte.js +132 -0
- package/dist/stores/{historyStore.d.ts → historyStore.svelte.d.ts} +18 -15
- package/dist/stores/{historyStore.js → historyStore.svelte.js} +40 -21
- package/dist/stores/{interruptStore.d.ts → interruptStore.svelte.d.ts} +16 -15
- package/dist/stores/{interruptStore.js → interruptStore.svelte.js} +85 -94
- package/dist/stores/{playgroundStore.d.ts → playgroundStore.svelte.d.ts} +41 -33
- package/dist/stores/{playgroundStore.js → playgroundStore.svelte.js} +164 -84
- package/dist/stores/{portCoordinateStore.d.ts → portCoordinateStore.svelte.d.ts} +10 -4
- package/dist/stores/{portCoordinateStore.js → portCoordinateStore.svelte.js} +38 -35
- package/dist/stores/{settingsStore.d.ts → settingsStore.svelte.d.ts} +45 -28
- package/dist/stores/{settingsStore.js → settingsStore.svelte.js} +169 -128
- package/dist/stores/{workflowStore.d.ts → workflowStore.svelte.d.ts} +101 -65
- package/dist/stores/{workflowStore.js → workflowStore.svelte.js} +285 -239
- package/dist/stories/CanvasDecorator.svelte +50 -0
- package/dist/stories/CanvasDecorator.svelte.d.ts +8 -0
- package/dist/stories/NodeDecorator.svelte +74 -0
- package/dist/stories/NodeDecorator.svelte.d.ts +8 -0
- package/dist/stories/utils.d.ts +93 -0
- package/dist/stories/utils.js +122 -0
- package/dist/styles/base.css +114 -61
- package/dist/styles/toast.css +2 -2
- package/dist/styles/tokens.css +250 -185
- package/dist/svelte-app.d.ts +0 -6
- package/dist/svelte-app.js +13 -31
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interrupt.d.ts +89 -5
- package/dist/types/interrupt.js +13 -1
- package/dist/types/playground.d.ts +5 -0
- package/dist/types/settings.js +1 -1
- package/dist/utils/colors.js +4 -4
- package/dist/utils/connections.js +33 -8
- package/dist/utils/icons.js +1 -1
- package/dist/utils/logger.d.ts +47 -0
- package/dist/utils/logger.js +72 -0
- package/dist/utils/nodeWrapper.js +1 -1
- package/dist/utils/sanitize.d.ts +19 -0
- package/dist/utils/sanitize.js +31 -0
- package/dist/utils/validation.d.ts +29 -0
- package/dist/utils/validation.js +39 -0
- package/package.json +243 -232
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
tabindex="-1"
|
|
75
75
|
>
|
|
76
76
|
<!-- Modal Container -->
|
|
77
|
-
<!-- svelte-ignore a11y_no_static_element_interactions a11y_click_events_have_key_events -->
|
|
77
|
+
<!-- svelte-ignore a11y_no_static_element_interactions a11y_click_events_have_key_events — role="presentation" container stops backdrop click propagation -->
|
|
78
78
|
<div class="playground-modal" onclick={(e) => e.stopPropagation()} role="presentation">
|
|
79
79
|
<!-- Modal Header -->
|
|
80
80
|
<div class="playground-modal__header">
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
align-items: center;
|
|
122
122
|
justify-content: center;
|
|
123
123
|
z-index: 1100;
|
|
124
|
-
padding: var(--fd-space-
|
|
124
|
+
padding: var(--fd-space-xl);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.playground-modal {
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
display: flex;
|
|
142
142
|
align-items: center;
|
|
143
143
|
justify-content: space-between;
|
|
144
|
-
padding: var(--fd-space-
|
|
144
|
+
padding: var(--fd-space-xl) var(--fd-space-2xl);
|
|
145
145
|
border-bottom: 1px solid var(--fd-border);
|
|
146
146
|
background-color: var(--fd-muted);
|
|
147
147
|
flex-shrink: 0;
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
.playground-modal__title {
|
|
151
151
|
display: flex;
|
|
152
152
|
align-items: center;
|
|
153
|
-
gap: var(--fd-space-
|
|
153
|
+
gap: var(--fd-space-xs);
|
|
154
154
|
font-size: var(--fd-text-base);
|
|
155
155
|
font-weight: 600;
|
|
156
156
|
color: var(--fd-foreground);
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
.playground-modal__header {
|
|
210
|
-
padding: var(--fd-space-
|
|
210
|
+
padding: var(--fd-space-md) var(--fd-space-xl);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
import { slide } from 'svelte/transition';
|
|
12
12
|
import type { PlaygroundSession } from '../../types/playground.js';
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from '../../stores/playgroundStore.js';
|
|
14
|
+
getSessions,
|
|
15
|
+
getCurrentSession,
|
|
16
|
+
getIsLoading,
|
|
17
|
+
getSessionCount
|
|
18
|
+
} from '../../stores/playgroundStore.svelte.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Component props
|
|
@@ -171,8 +171,8 @@
|
|
|
171
171
|
<div class="session-manager__title">
|
|
172
172
|
<Icon icon="mdi:history" />
|
|
173
173
|
<span>Sessions</span>
|
|
174
|
-
{#if
|
|
175
|
-
<span class="session-manager__count">{
|
|
174
|
+
{#if getSessionCount() > 0}
|
|
175
|
+
<span class="session-manager__count">{getSessionCount()}</span>
|
|
176
176
|
{/if}
|
|
177
177
|
</div>
|
|
178
178
|
<Icon
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
type="button"
|
|
190
190
|
class="session-manager__new-btn"
|
|
191
191
|
onclick={onCreateSession}
|
|
192
|
-
disabled={
|
|
192
|
+
disabled={getIsLoading()}
|
|
193
193
|
>
|
|
194
194
|
<Icon icon="mdi:plus" />
|
|
195
195
|
New Session
|
|
@@ -197,16 +197,16 @@
|
|
|
197
197
|
|
|
198
198
|
<!-- Sessions List -->
|
|
199
199
|
<div class="session-manager__list">
|
|
200
|
-
{#if
|
|
200
|
+
{#if getSessions().length === 0}
|
|
201
201
|
<div class="session-manager__empty">
|
|
202
202
|
<Icon icon="mdi:chat-outline" />
|
|
203
203
|
<span>No sessions yet</span>
|
|
204
204
|
</div>
|
|
205
205
|
{:else}
|
|
206
|
-
{#each
|
|
206
|
+
{#each getSessions() as session (session.id)}
|
|
207
207
|
<div
|
|
208
208
|
class="session-manager__item"
|
|
209
|
-
class:session-manager__item--active={
|
|
209
|
+
class:session-manager__item--active={getCurrentSession()?.id === session.id}
|
|
210
210
|
role="button"
|
|
211
211
|
tabindex="0"
|
|
212
212
|
onclick={() => handleSelectSession(session.id)}
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
align-items: center;
|
|
296
296
|
justify-content: space-between;
|
|
297
297
|
width: 100%;
|
|
298
|
-
padding: var(--fd-space-
|
|
298
|
+
padding: var(--fd-space-md) var(--fd-space-xl);
|
|
299
299
|
border: none;
|
|
300
300
|
background: transparent;
|
|
301
301
|
cursor: pointer;
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
.session-manager__title {
|
|
310
310
|
display: flex;
|
|
311
311
|
align-items: center;
|
|
312
|
-
gap: var(--fd-space-
|
|
312
|
+
gap: var(--fd-space-xs);
|
|
313
313
|
font-size: var(--fd-text-sm);
|
|
314
314
|
font-weight: 500;
|
|
315
315
|
color: var(--fd-foreground);
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
justify-content: center;
|
|
322
322
|
min-width: 1.25rem;
|
|
323
323
|
height: 1.25rem;
|
|
324
|
-
padding: 0 var(--fd-space-
|
|
324
|
+
padding: 0 var(--fd-space-3xs);
|
|
325
325
|
border-radius: var(--fd-radius-full);
|
|
326
326
|
font-size: var(--fd-text-xs);
|
|
327
327
|
font-weight: 600;
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
|
|
341
341
|
/* Content */
|
|
342
342
|
.session-manager__content {
|
|
343
|
-
padding: var(--fd-space-
|
|
343
|
+
padding: var(--fd-space-xs);
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
/* New Session Button */
|
|
@@ -348,10 +348,10 @@
|
|
|
348
348
|
display: flex;
|
|
349
349
|
align-items: center;
|
|
350
350
|
justify-content: center;
|
|
351
|
-
gap: var(--fd-space-
|
|
351
|
+
gap: var(--fd-space-3xs);
|
|
352
352
|
width: 100%;
|
|
353
|
-
padding:
|
|
354
|
-
margin-bottom: var(--fd-space-
|
|
353
|
+
padding: var(--fd-space-sm) var(--fd-space-xl);
|
|
354
|
+
margin-bottom: var(--fd-space-xs);
|
|
355
355
|
border: 1px dashed var(--fd-border-strong);
|
|
356
356
|
border-radius: var(--fd-radius-lg);
|
|
357
357
|
background: transparent;
|
|
@@ -383,8 +383,8 @@
|
|
|
383
383
|
display: flex;
|
|
384
384
|
flex-direction: column;
|
|
385
385
|
align-items: center;
|
|
386
|
-
gap: var(--fd-space-
|
|
387
|
-
padding: var(--fd-space-
|
|
386
|
+
gap: var(--fd-space-xs);
|
|
387
|
+
padding: var(--fd-space-4xl) var(--fd-space-xl);
|
|
388
388
|
color: var(--fd-muted-foreground);
|
|
389
389
|
font-size: var(--fd-text-sm);
|
|
390
390
|
}
|
|
@@ -395,8 +395,8 @@
|
|
|
395
395
|
align-items: center;
|
|
396
396
|
justify-content: space-between;
|
|
397
397
|
width: 100%;
|
|
398
|
-
padding:
|
|
399
|
-
margin-bottom: var(--fd-space-
|
|
398
|
+
padding: var(--fd-space-sm) var(--fd-space-md);
|
|
399
|
+
margin-bottom: var(--fd-space-3xs);
|
|
400
400
|
border: 1px solid transparent;
|
|
401
401
|
border-radius: var(--fd-radius-lg);
|
|
402
402
|
background: transparent;
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
.session-manager__item-header {
|
|
423
423
|
display: flex;
|
|
424
424
|
align-items: center;
|
|
425
|
-
gap: var(--fd-space-
|
|
425
|
+
gap: var(--fd-space-xs);
|
|
426
426
|
margin-bottom: 0.125rem;
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
/* Delete Button */
|
|
479
479
|
.session-manager__item-actions {
|
|
480
480
|
display: flex;
|
|
481
|
-
gap: var(--fd-space-
|
|
481
|
+
gap: var(--fd-space-3xs);
|
|
482
482
|
opacity: 0;
|
|
483
483
|
transition: opacity var(--fd-transition-normal);
|
|
484
484
|
}
|
|
@@ -528,11 +528,11 @@
|
|
|
528
528
|
/* Responsive */
|
|
529
529
|
@media (max-width: 640px) {
|
|
530
530
|
.session-manager__content {
|
|
531
|
-
padding: var(--fd-space-
|
|
531
|
+
padding: var(--fd-space-3xs);
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
.session-manager__item {
|
|
535
|
-
padding: var(--fd-space-
|
|
535
|
+
padding: var(--fd-space-xs);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library-wide Constants
|
|
3
|
+
*
|
|
4
|
+
* Centralizes magic numbers and default configuration values
|
|
5
|
+
* used across FlowDrop services.
|
|
6
|
+
*
|
|
7
|
+
* @module config/constants
|
|
8
|
+
*/
|
|
9
|
+
/** Default API request timeout in milliseconds */
|
|
10
|
+
export declare const DEFAULT_API_TIMEOUT_MS = 30000;
|
|
11
|
+
/** Cache timeout for node execution data in milliseconds */
|
|
12
|
+
export declare const NODE_EXECUTION_CACHE_TIMEOUT_MS = 30000;
|
|
13
|
+
/** Duration to mark pipeline API as unavailable after 404 (milliseconds) */
|
|
14
|
+
export declare const PIPELINE_API_UNAVAILABLE_DURATION_MS: number;
|
|
15
|
+
/** Toast notification durations in milliseconds */
|
|
16
|
+
export declare const TOAST_DURATION: {
|
|
17
|
+
readonly SUCCESS: 4000;
|
|
18
|
+
readonly ERROR: 6000;
|
|
19
|
+
readonly WARNING: 5000;
|
|
20
|
+
readonly INFO: 4000;
|
|
21
|
+
readonly CONFIRMATION: 5000;
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library-wide Constants
|
|
3
|
+
*
|
|
4
|
+
* Centralizes magic numbers and default configuration values
|
|
5
|
+
* used across FlowDrop services.
|
|
6
|
+
*
|
|
7
|
+
* @module config/constants
|
|
8
|
+
*/
|
|
9
|
+
/** Default API request timeout in milliseconds */
|
|
10
|
+
export const DEFAULT_API_TIMEOUT_MS = 30_000;
|
|
11
|
+
/** Cache timeout for node execution data in milliseconds */
|
|
12
|
+
export const NODE_EXECUTION_CACHE_TIMEOUT_MS = 30_000;
|
|
13
|
+
/** Duration to mark pipeline API as unavailable after 404 (milliseconds) */
|
|
14
|
+
export const PIPELINE_API_UNAVAILABLE_DURATION_MS = 5 * 60 * 1000;
|
|
15
|
+
/** Toast notification durations in milliseconds */
|
|
16
|
+
export const TOAST_DURATION = {
|
|
17
|
+
SUCCESS: 4_000,
|
|
18
|
+
ERROR: 6_000,
|
|
19
|
+
WARNING: 5_000,
|
|
20
|
+
INFO: 4_000,
|
|
21
|
+
CONFIRMATION: 5_000
|
|
22
|
+
};
|
|
@@ -118,6 +118,25 @@ export interface EndpointConfig {
|
|
|
118
118
|
delay: number;
|
|
119
119
|
backoff?: 'linear' | 'exponential';
|
|
120
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* Optional transform applied to workflow objects before they are sent to the backend
|
|
123
|
+
* (i.e., in create and update requests).
|
|
124
|
+
*
|
|
125
|
+
* Use this to adapt the generic FlowDrop `Workflow` shape to whatever your backend
|
|
126
|
+
* expects. The function receives the workflow data and must return the body that will
|
|
127
|
+
* be JSON-serialised and posted.
|
|
128
|
+
*
|
|
129
|
+
* Default: identity — the workflow is sent as-is.
|
|
130
|
+
*
|
|
131
|
+
* @example Drupal integration — Drupal expects `label` in addition to `name`:
|
|
132
|
+
* ```ts
|
|
133
|
+
* transformWorkflowPayload: (workflow) => ({
|
|
134
|
+
* ...workflow,
|
|
135
|
+
* label: workflow.name,
|
|
136
|
+
* })
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
transformWorkflowPayload?: (workflow: Record<string, unknown>) => Record<string, unknown>;
|
|
121
140
|
}
|
|
122
141
|
/**
|
|
123
142
|
* Default endpoint configuration
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* This allows the application to use environment variables set at deployment
|
|
6
6
|
* time rather than build time.
|
|
7
7
|
*/
|
|
8
|
+
import { logger } from '../utils/logger.js';
|
|
8
9
|
/** Cached runtime configuration */
|
|
9
10
|
let cachedConfig = null;
|
|
10
11
|
/** Cache timestamp */
|
|
@@ -35,7 +36,7 @@ export async function fetchRuntimeConfig(force = false) {
|
|
|
35
36
|
return config;
|
|
36
37
|
}
|
|
37
38
|
catch (error) {
|
|
38
|
-
|
|
39
|
+
logger.error('Failed to fetch runtime configuration:', error);
|
|
39
40
|
// Return default configuration if fetch fails
|
|
40
41
|
const defaultConfig = {
|
|
41
42
|
apiBaseUrl: '/api/flowdrop',
|
package/dist/core/index.d.ts
CHANGED
|
@@ -66,5 +66,8 @@ export { defaultAgentSpecEndpoints, createAgentSpecEndpointConfig, buildAgentSpe
|
|
|
66
66
|
export { AgentSpecExecutionService, agentSpecExecutionService } from '../services/agentSpecExecutionService.js';
|
|
67
67
|
export type { AgentSpecExecutionHandle } from '../services/agentSpecExecutionService.js';
|
|
68
68
|
export { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '../schema/index.js';
|
|
69
|
-
export type { ThemePreference, ResolvedTheme } from '../stores/settingsStore.js';
|
|
70
|
-
export { theme, resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.js';
|
|
69
|
+
export type { ThemePreference, ResolvedTheme } from '../stores/settingsStore.svelte.js';
|
|
70
|
+
export { getTheme as theme, getResolvedTheme as resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.svelte.js';
|
|
71
|
+
export { sanitizeHtml } from '../utils/sanitize.js';
|
|
72
|
+
export { logger, setLogLevel, getLogLevel } from '../utils/logger.js';
|
|
73
|
+
export type { LogLevel } from '../utils/logger.js';
|
package/dist/core/index.js
CHANGED
|
@@ -81,4 +81,12 @@ export { AgentSpecExecutionService, agentSpecExecutionService } from '../service
|
|
|
81
81
|
// Workflow JSON Schema
|
|
82
82
|
// ============================================================================
|
|
83
83
|
export { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '../schema/index.js';
|
|
84
|
-
export { theme, resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.js';
|
|
84
|
+
export { getTheme as theme, getResolvedTheme as resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.svelte.js';
|
|
85
|
+
// ============================================================================
|
|
86
|
+
// HTML Sanitization
|
|
87
|
+
// ============================================================================
|
|
88
|
+
export { sanitizeHtml } from '../utils/sanitize.js';
|
|
89
|
+
// ============================================================================
|
|
90
|
+
// Logger
|
|
91
|
+
// ============================================================================
|
|
92
|
+
export { logger, setLogLevel, getLogLevel } from '../utils/logger.js';
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* building visual workflow editors. This module includes @xyflow/svelte
|
|
6
6
|
* and all node components.
|
|
7
7
|
*
|
|
8
|
+
* **Important: Single-instance only.** FlowDrop uses module-level singleton
|
|
9
|
+
* stores for state management. Only one FlowDrop editor instance per page
|
|
10
|
+
* is supported. This is a known architectural limitation.
|
|
11
|
+
*
|
|
8
12
|
* @module editor
|
|
9
13
|
*
|
|
10
14
|
* @example Mounting a standalone workflow editor:
|
|
@@ -31,9 +35,9 @@ import '../registry/builtinNodes.js';
|
|
|
31
35
|
export { default as WorkflowEditor } from '../components/WorkflowEditor.svelte';
|
|
32
36
|
export { default as App } from '../components/App.svelte';
|
|
33
37
|
export { default as WorkflowNodeComponent } from '../components/nodes/WorkflowNode.svelte';
|
|
34
|
-
export { default as
|
|
35
|
-
export { default as
|
|
36
|
-
export { default as
|
|
38
|
+
export { default as SimpleNode } from '../components/nodes/SimpleNode.svelte';
|
|
39
|
+
export { default as ToolNode } from '../components/nodes/ToolNode.svelte';
|
|
40
|
+
export { default as NotesNode } from '../components/nodes/NotesNode.svelte';
|
|
37
41
|
export { default as GatewayNode } from '../components/nodes/GatewayNode.svelte';
|
|
38
42
|
export { default as SquareNode } from '../components/nodes/SquareNode.svelte';
|
|
39
43
|
export { default as TerminalNode } from '../components/nodes/TerminalNode.svelte';
|
|
@@ -63,17 +67,17 @@ export { default as MessageBubble } from '../components/playground/MessageBubble
|
|
|
63
67
|
export { mountWorkflowEditor, mountFlowDropApp, unmountFlowDropApp } from '../svelte-app.js';
|
|
64
68
|
export { nodeComponentRegistry, createNamespacedType, parseNamespacedType, BUILTIN_NODE_COMPONENTS, BUILTIN_NODE_TYPES, FLOWDROP_SOURCE, registerBuiltinNodes, areBuiltinsRegistered, isBuiltinType, getBuiltinTypes, resolveBuiltinAlias, registerFlowDropPlugin, unregisterFlowDropPlugin, registerCustomNode, createPlugin, isValidNamespace, getRegisteredPlugins, getPluginNodeCount } from '../registry/index.js';
|
|
65
69
|
export { EdgeStylingHelper, NodeOperationsHelper, WorkflowOperationsHelper, ConfigurationHelper } from '../helpers/workflowEditorHelper.js';
|
|
66
|
-
export {
|
|
67
|
-
export {
|
|
68
|
-
export {
|
|
69
|
-
export type { HistoryEntry, HistoryState, PushOptions } from '../stores/historyStore.js';
|
|
70
|
+
export { getWorkflowStore, workflowActions, getWorkflowId, getWorkflowName, getWorkflowNodes, getWorkflowEdges, getWorkflowMetadata, getWorkflowFormat, getWorkflowChanged, getWorkflowValidation, getWorkflowMetadataChanged, getConnectedHandles, getIsDirty, isDirty, markAsSaved, getWorkflow as getWorkflowFromStore, setOnDirtyStateChange, setOnWorkflowChange, setHistoryEnabled, isHistoryEnabled, setRestoringFromHistory } from '../stores/workflowStore.svelte.js';
|
|
71
|
+
export { rebuildAllPortCoordinates, updateNodePortCoordinates, removeNodePortCoordinates, getPortCoordinate, getNodePortCoordinates, getPortCoordinateSnapshot, getPortCoordinates } from '../stores/portCoordinateStore.svelte.js';
|
|
72
|
+
export { getHistoryState, getCanUndo, getCanRedo, historyActions, setOnRestoreCallback, cleanupHistorySubscription, historyService, HistoryService } from '../stores/historyStore.svelte.js';
|
|
73
|
+
export type { HistoryEntry, HistoryState, PushOptions } from '../stores/historyStore.svelte.js';
|
|
70
74
|
export * from '../services/api.js';
|
|
71
75
|
export { showSuccess, showError, showWarning, showInfo, showLoading, dismissToast, dismissAllToasts, showPromise, showConfirmation, apiToasts, workflowToasts, pipelineToasts } from '../services/toastService.js';
|
|
72
76
|
export { NodeExecutionService, nodeExecutionService } from '../services/nodeExecutionService.js';
|
|
73
77
|
export { PlaygroundService, playgroundService } from '../services/playgroundService.js';
|
|
74
|
-
export {
|
|
78
|
+
export { getCurrentSession, getSessions, getMessages, getIsExecuting, getIsLoading, getError as getPlaygroundError, getCurrentWorkflow, getLastPollTimestamp, getSessionStatus, getMessageCount, getChatMessages, getLogMessages, getLatestMessage, getInputFields, getHasChatInput, getSessionCount, playgroundActions, createPollingCallback, subscribeToSessionStatus, getCurrentSessionId, isSessionSelected, getMessagesSnapshot, getLatestMessageTimestamp } from '../stores/playgroundStore.svelte.js';
|
|
75
79
|
export { saveWorkflow, updateWorkflow, getWorkflow, getWorkflows, deleteWorkflow, getWorkflowCount, initializeSampleWorkflows } from '../services/workflowStorage.js';
|
|
76
|
-
export { globalSaveWorkflow, globalExportWorkflow
|
|
80
|
+
export { globalSaveWorkflow, globalExportWorkflow } from '../services/globalSave.js';
|
|
77
81
|
export { fetchPortConfig, validatePortConfig } from '../services/portConfigApi.js';
|
|
78
82
|
export { fetchCategories, validateCategories } from '../services/categoriesApi.js';
|
|
79
83
|
export { fetchDynamicSchema, resolveExternalEditUrl, getEffectiveConfigEditOptions, clearSchemaCache, invalidateSchemaCache, hasConfigEditOptions, shouldShowExternalEdit, shouldUseDynamicSchema } from '../services/dynamicSchemaService.js';
|
package/dist/editor/index.js
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* building visual workflow editors. This module includes @xyflow/svelte
|
|
6
6
|
* and all node components.
|
|
7
7
|
*
|
|
8
|
+
* **Important: Single-instance only.** FlowDrop uses module-level singleton
|
|
9
|
+
* stores for state management. Only one FlowDrop editor instance per page
|
|
10
|
+
* is supported. This is a known architectural limitation.
|
|
11
|
+
*
|
|
8
12
|
* @module editor
|
|
9
13
|
*
|
|
10
14
|
* @example Mounting a standalone workflow editor:
|
|
@@ -42,9 +46,9 @@ export { default as App } from '../components/App.svelte';
|
|
|
42
46
|
// Node Components
|
|
43
47
|
// ============================================================================
|
|
44
48
|
export { default as WorkflowNodeComponent } from '../components/nodes/WorkflowNode.svelte';
|
|
45
|
-
export { default as
|
|
46
|
-
export { default as
|
|
47
|
-
export { default as
|
|
49
|
+
export { default as SimpleNode } from '../components/nodes/SimpleNode.svelte';
|
|
50
|
+
export { default as ToolNode } from '../components/nodes/ToolNode.svelte';
|
|
51
|
+
export { default as NotesNode } from '../components/nodes/NotesNode.svelte';
|
|
48
52
|
export { default as GatewayNode } from '../components/nodes/GatewayNode.svelte';
|
|
49
53
|
export { default as SquareNode } from '../components/nodes/SquareNode.svelte';
|
|
50
54
|
export { default as TerminalNode } from '../components/nodes/TerminalNode.svelte';
|
|
@@ -96,15 +100,15 @@ export { EdgeStylingHelper, NodeOperationsHelper, WorkflowOperationsHelper, Conf
|
|
|
96
100
|
// ============================================================================
|
|
97
101
|
// Stores
|
|
98
102
|
// ============================================================================
|
|
99
|
-
export {
|
|
103
|
+
export { getWorkflowStore, workflowActions, getWorkflowId, getWorkflowName, getWorkflowNodes, getWorkflowEdges, getWorkflowMetadata, getWorkflowFormat, getWorkflowChanged, getWorkflowValidation, getWorkflowMetadataChanged, getConnectedHandles,
|
|
100
104
|
// Dirty state tracking
|
|
101
|
-
|
|
105
|
+
getIsDirty, isDirty, markAsSaved, getWorkflow as getWorkflowFromStore, setOnDirtyStateChange, setOnWorkflowChange,
|
|
102
106
|
// History control
|
|
103
|
-
setHistoryEnabled, isHistoryEnabled, setRestoringFromHistory } from '../stores/workflowStore.js';
|
|
104
|
-
// Port Coordinate Store
|
|
105
|
-
export {
|
|
107
|
+
setHistoryEnabled, isHistoryEnabled, setRestoringFromHistory } from '../stores/workflowStore.svelte.js';
|
|
108
|
+
// Port Coordinate Store (Svelte 5 runes-based)
|
|
109
|
+
export { rebuildAllPortCoordinates, updateNodePortCoordinates, removeNodePortCoordinates, getPortCoordinate, getNodePortCoordinates, getPortCoordinateSnapshot, getPortCoordinates } from '../stores/portCoordinateStore.svelte.js';
|
|
106
110
|
// History Store and Service
|
|
107
|
-
export {
|
|
111
|
+
export { getHistoryState, getCanUndo, getCanRedo, historyActions, setOnRestoreCallback, cleanupHistorySubscription, historyService, HistoryService } from '../stores/historyStore.svelte.js';
|
|
108
112
|
// ============================================================================
|
|
109
113
|
// Services
|
|
110
114
|
// ============================================================================
|
|
@@ -113,9 +117,9 @@ export { showSuccess, showError, showWarning, showInfo, showLoading, dismissToas
|
|
|
113
117
|
export { NodeExecutionService, nodeExecutionService } from '../services/nodeExecutionService.js';
|
|
114
118
|
// Playground Service and Store
|
|
115
119
|
export { PlaygroundService, playgroundService } from '../services/playgroundService.js';
|
|
116
|
-
export {
|
|
120
|
+
export { getCurrentSession, getSessions, getMessages, getIsExecuting, getIsLoading, getError as getPlaygroundError, getCurrentWorkflow, getLastPollTimestamp, getSessionStatus, getMessageCount, getChatMessages, getLogMessages, getLatestMessage, getInputFields, getHasChatInput, getSessionCount, playgroundActions, createPollingCallback, subscribeToSessionStatus, getCurrentSessionId, isSessionSelected, getMessagesSnapshot, getLatestMessageTimestamp } from '../stores/playgroundStore.svelte.js';
|
|
117
121
|
export { saveWorkflow, updateWorkflow, getWorkflow, getWorkflows, deleteWorkflow, getWorkflowCount, initializeSampleWorkflows } from '../services/workflowStorage.js';
|
|
118
|
-
export { globalSaveWorkflow, globalExportWorkflow
|
|
122
|
+
export { globalSaveWorkflow, globalExportWorkflow } from '../services/globalSave.js';
|
|
119
123
|
export { fetchPortConfig, validatePortConfig } from '../services/portConfigApi.js';
|
|
120
124
|
export { fetchCategories, validateCategories } from '../services/categoriesApi.js';
|
|
121
125
|
export { fetchDynamicSchema, resolveExternalEditUrl, getEffectiveConfigEditOptions, clearSchemaCache, invalidateSchemaCache, hasConfigEditOptions, shouldShowExternalEdit, shouldUseDynamicSchema } from '../services/dynamicSchemaService.js';
|
package/dist/form/code.d.ts
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* // Now SchemaForm will render code editors for format: "json", "code", or "template"
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
+
import type { FieldComponent } from './fieldRegistry.js';
|
|
23
24
|
import type { FieldSchema } from '../components/form/types.js';
|
|
24
25
|
export { default as FormCodeEditor } from '../components/form/FormCodeEditor.svelte';
|
|
25
26
|
export { default as FormTemplateEditor } from '../components/form/FormTemplateEditor.svelte';
|
|
@@ -89,7 +90,7 @@ export declare function registerAllCodeEditors(priority?: number): void;
|
|
|
89
90
|
* registerCodeEditorFieldWithComponent(FormCodeEditor);
|
|
90
91
|
* ```
|
|
91
92
|
*/
|
|
92
|
-
export declare function registerCodeEditorFieldWithComponent(component:
|
|
93
|
+
export declare function registerCodeEditorFieldWithComponent(component: FieldComponent, priority?: number): void;
|
|
93
94
|
/**
|
|
94
95
|
* Check if code editor field is registered
|
|
95
96
|
*/
|
package/dist/form/code.js
CHANGED
|
@@ -135,9 +135,7 @@ export function registerAllCodeEditors(priority = 100) {
|
|
|
135
135
|
* registerCodeEditorFieldWithComponent(FormCodeEditor);
|
|
136
136
|
* ```
|
|
137
137
|
*/
|
|
138
|
-
export function registerCodeEditorFieldWithComponent(
|
|
139
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
140
|
-
component, priority = 100) {
|
|
138
|
+
export function registerCodeEditorFieldWithComponent(component, priority = 100) {
|
|
141
139
|
if (codeEditorRegistered) {
|
|
142
140
|
return;
|
|
143
141
|
}
|
package/dist/form/markdown.d.ts
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* };
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
+
import type { FieldComponent } from './fieldRegistry.js';
|
|
26
27
|
import type { FieldSchema } from '../components/form/types.js';
|
|
27
28
|
export { default as FormMarkdownEditor } from '../components/form/FormMarkdownEditor.svelte';
|
|
28
29
|
export type { MarkdownEditorFieldProps } from '../components/form/types.js';
|
|
@@ -61,7 +62,7 @@ export declare function registerMarkdownEditorField(priority?: number): void;
|
|
|
61
62
|
* registerMarkdownEditorFieldWithComponent(FormMarkdownEditor);
|
|
62
63
|
* ```
|
|
63
64
|
*/
|
|
64
|
-
export declare function registerMarkdownEditorFieldWithComponent(component:
|
|
65
|
+
export declare function registerMarkdownEditorFieldWithComponent(component: FieldComponent, priority?: number): void;
|
|
65
66
|
/**
|
|
66
67
|
* Check if markdown editor field is registered
|
|
67
68
|
*/
|
package/dist/form/markdown.js
CHANGED
|
@@ -80,9 +80,7 @@ export function registerMarkdownEditorField(priority = 100) {
|
|
|
80
80
|
* registerMarkdownEditorFieldWithComponent(FormMarkdownEditor);
|
|
81
81
|
* ```
|
|
82
82
|
*/
|
|
83
|
-
export function registerMarkdownEditorFieldWithComponent(
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
|
-
component, priority = 100) {
|
|
83
|
+
export function registerMarkdownEditorFieldWithComponent(component, priority = 100) {
|
|
86
84
|
if (markdownEditorRegistered) {
|
|
87
85
|
return;
|
|
88
86
|
}
|
|
@@ -6,11 +6,12 @@ import { MarkerType } from '@xyflow/svelte';
|
|
|
6
6
|
import { hasCycles, hasInvalidCycles, isLoopbackEdge } from '../utils/connections.js';
|
|
7
7
|
import { workflowApi, nodeApi, setEndpointConfig } from '../services/api.js';
|
|
8
8
|
import { v4 as uuidv4 } from 'uuid';
|
|
9
|
-
import { workflowActions } from '../stores/workflowStore.js';
|
|
9
|
+
import { workflowActions } from '../stores/workflowStore.svelte.js';
|
|
10
10
|
import { nodeExecutionService } from '../services/nodeExecutionService.js';
|
|
11
11
|
import { WorkflowAdapter } from '../adapters/WorkflowAdapter.js';
|
|
12
12
|
import { AgentSpecAdapter } from '../adapters/agentspec/AgentSpecAdapter.js';
|
|
13
13
|
import { validateForAgentSpecExport } from '../adapters/agentspec/validator.js';
|
|
14
|
+
import { logger } from '../utils/logger.js';
|
|
14
15
|
/**
|
|
15
16
|
* Generate a unique node ID based on node type and existing nodes
|
|
16
17
|
* Format: <node_type>.<number>
|
|
@@ -291,7 +292,7 @@ export class NodeOperationsHelper {
|
|
|
291
292
|
return fetchedNodes;
|
|
292
293
|
}
|
|
293
294
|
catch (error) {
|
|
294
|
-
|
|
295
|
+
logger.error('Failed to load nodes from API:', error);
|
|
295
296
|
// Use fallback sample nodes
|
|
296
297
|
return [
|
|
297
298
|
{
|
|
@@ -332,7 +333,7 @@ export class NodeOperationsHelper {
|
|
|
332
333
|
return executionInfo;
|
|
333
334
|
}
|
|
334
335
|
catch (error) {
|
|
335
|
-
|
|
336
|
+
logger.error('Failed to load node execution info:', error);
|
|
336
337
|
return {};
|
|
337
338
|
}
|
|
338
339
|
}
|
|
@@ -393,7 +394,7 @@ export class NodeOperationsHelper {
|
|
|
393
394
|
return newNode;
|
|
394
395
|
}
|
|
395
396
|
catch (error) {
|
|
396
|
-
|
|
397
|
+
logger.error('Error parsing node data:', error);
|
|
397
398
|
return null;
|
|
398
399
|
}
|
|
399
400
|
}
|
|
@@ -406,9 +407,12 @@ export class WorkflowOperationsHelper {
|
|
|
406
407
|
* Generate workflow metadata for updates
|
|
407
408
|
*/
|
|
408
409
|
static generateMetadata(existingMetadata) {
|
|
410
|
+
const now = new Date().toISOString();
|
|
409
411
|
return {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
+
version: '1.0.0',
|
|
413
|
+
createdAt: now,
|
|
414
|
+
...(existingMetadata ?? {}),
|
|
415
|
+
updatedAt: now,
|
|
412
416
|
versionId: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
413
417
|
updateNumber: (existingMetadata?.updateNumber || 0) + 1
|
|
414
418
|
};
|
|
@@ -465,7 +469,7 @@ export class WorkflowOperationsHelper {
|
|
|
465
469
|
*/
|
|
466
470
|
static async saveWorkflow(workflow) {
|
|
467
471
|
if (!workflow) {
|
|
468
|
-
|
|
472
|
+
logger.warn('No workflow data available to save');
|
|
469
473
|
return null;
|
|
470
474
|
}
|
|
471
475
|
try {
|
|
@@ -506,7 +510,7 @@ export class WorkflowOperationsHelper {
|
|
|
506
510
|
return savedWorkflow;
|
|
507
511
|
}
|
|
508
512
|
catch (error) {
|
|
509
|
-
|
|
513
|
+
logger.error('Failed to save workflow:', error);
|
|
510
514
|
throw error;
|
|
511
515
|
}
|
|
512
516
|
}
|
|
@@ -515,7 +519,7 @@ export class WorkflowOperationsHelper {
|
|
|
515
519
|
*/
|
|
516
520
|
static exportWorkflow(workflow) {
|
|
517
521
|
if (!workflow) {
|
|
518
|
-
|
|
522
|
+
logger.warn('No workflow data available to export');
|
|
519
523
|
return;
|
|
520
524
|
}
|
|
521
525
|
// Use the same ID logic as saveWorkflow
|
package/dist/mocks/app-forms.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
* Provides minimal implementations for SvelteKit navigation in library context
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { logger } from '../utils/logger.js';
|
|
7
|
+
|
|
6
8
|
// Mock goto function
|
|
7
9
|
export const goto = async () => {
|
|
8
10
|
// No-op for library context
|
|
9
|
-
|
|
11
|
+
logger.warn('Navigation not available in library context');
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
// Mock invalidate function
|
|
@@ -2,13 +2,13 @@ export const page: import("svelte/store").Writable<{
|
|
|
2
2
|
url: URL;
|
|
3
3
|
params: {};
|
|
4
4
|
route: {
|
|
5
|
-
id:
|
|
5
|
+
id: null;
|
|
6
6
|
};
|
|
7
7
|
status: number;
|
|
8
|
-
error:
|
|
8
|
+
error: null;
|
|
9
9
|
data: {};
|
|
10
|
-
form:
|
|
10
|
+
form: null;
|
|
11
11
|
}>;
|
|
12
|
-
export const navigating: import("svelte/store").Writable<
|
|
12
|
+
export const navigating: import("svelte/store").Writable<null>;
|
|
13
13
|
export const updated: import("svelte/store").Writable<boolean>;
|
|
14
14
|
export function preloadData(): Promise<{}>;
|
|
@@ -120,11 +120,12 @@ export { default as MessageBubble } from '../components/playground/MessageBubble
|
|
|
120
120
|
export { InterruptBubble, ConfirmationPrompt, ChoicePrompt, TextInputPrompt, FormPrompt } from '../components/interrupt/index.js';
|
|
121
121
|
export { PlaygroundService, playgroundService } from '../services/playgroundService.js';
|
|
122
122
|
export { InterruptService, interruptService } from '../services/interruptService.js';
|
|
123
|
-
export {
|
|
123
|
+
export { getCurrentSession, getSessions, getMessages, getIsExecuting, getIsLoading, getError as getPlaygroundError, getCurrentWorkflow, getLastPollTimestamp, getSessionStatus, getMessageCount, getChatMessages, getLogMessages, getLatestMessage, getInputFields, getHasChatInput, getSessionCount, playgroundActions, createPollingCallback, subscribeToSessionStatus, getCurrentSessionId, isSessionSelected, getMessagesSnapshot, getLatestMessageTimestamp } from '../stores/playgroundStore.svelte.js';
|
|
124
124
|
export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse } from '../types/playground.js';
|
|
125
125
|
export { isChatInputNode, CHAT_INPUT_PATTERNS, defaultShouldStopPolling, defaultIsTerminalStatus, DEFAULT_STOP_POLLING_STATUSES, DEFAULT_TERMINAL_STATUSES } from '../types/playground.js';
|
|
126
|
-
export type { InterruptType, InterruptStatus, Interrupt, InterruptChoice, InterruptConfig, ConfirmationConfig, ChoiceConfig, TextConfig, FormConfig, InterruptResolution, InterruptApiResponse, InterruptListResponse, InterruptResponse, InterruptMessageMetadata, InterruptPollingConfig } from '../types/interrupt.js';
|
|
126
|
+
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';
|
|
127
127
|
export { isInterruptMetadata, extractInterruptMetadata, metadataToInterrupt, defaultInterruptPollingConfig } from '../types/interrupt.js';
|
|
128
|
-
export {
|
|
128
|
+
export { getInterruptsMap, getPendingInterruptIds, getPendingInterrupts, getPendingInterruptCount, getResolvedInterrupts, getIsAnySubmitting, interruptActions, getInterrupt, isInterruptPending, isInterruptSubmitting, getInterruptError, getInterruptByMessageId, interruptHasError } from '../stores/interruptStore.svelte.js';
|
|
129
|
+
export type { InterruptWithState } from '../stores/interruptStore.svelte.js';
|
|
129
130
|
export { mountPlayground, unmountPlayground, type PlaygroundMountOptions, type MountedPlayground } from './mount.js';
|
|
130
131
|
export { createEndpointConfig, defaultEndpointConfig, buildEndpointUrl, type EndpointConfig } from '../config/endpoints.js';
|