@d34dman/flowdrop 0.0.63 → 0.0.64

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 (115) hide show
  1. package/README.md +2 -0
  2. package/dist/adapters/agentspec/AgentSpecAdapter.js +1 -40
  3. package/dist/api/enhanced-client.d.ts +19 -0
  4. package/dist/api/enhanced-client.js +9 -0
  5. package/dist/components/App.svelte +31 -35
  6. package/dist/components/CanvasBanner.stories.svelte +12 -8
  7. package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
  8. package/dist/components/ConfigPanel.stories.svelte +35 -26
  9. package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
  10. package/dist/components/LoadingSpinner.stories.svelte +13 -13
  11. package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
  12. package/dist/components/Logo.stories.svelte +4 -4
  13. package/dist/components/Logo.stories.svelte.d.ts +1 -1
  14. package/dist/components/MarkdownDisplay.stories.svelte +25 -10
  15. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
  16. package/dist/components/Navbar.stories.svelte +42 -30
  17. package/dist/components/Navbar.stories.svelte.d.ts +1 -1
  18. package/dist/components/Navbar.svelte +6 -3
  19. package/dist/components/NodeStatusOverlay.stories.svelte +61 -50
  20. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
  21. package/dist/components/PipelineStatus.svelte +9 -12
  22. package/dist/components/PipelineStatus.svelte.d.ts +2 -2
  23. package/dist/components/SchemaForm.stories.svelte +97 -82
  24. package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
  25. package/dist/components/SchemaForm.svelte +6 -2
  26. package/dist/components/SettingsPanel.svelte +5 -1
  27. package/dist/components/StatusIcon.stories.svelte +15 -15
  28. package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
  29. package/dist/components/StatusLabel.stories.svelte +8 -8
  30. package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
  31. package/dist/components/ThemeToggle.stories.svelte +10 -10
  32. package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
  33. package/dist/components/WorkflowEditor.svelte +23 -5
  34. package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -13
  35. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
  36. package/dist/components/form/FormField.svelte +2 -2
  37. package/dist/components/form/FormFieldLight.svelte +4 -4
  38. package/dist/components/form/FormFieldWrapper.stories.svelte +38 -16
  39. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
  40. package/dist/components/form/FormNumberField.stories.svelte +21 -18
  41. package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
  42. package/dist/components/form/FormRangeField.stories.svelte +13 -13
  43. package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
  44. package/dist/components/form/FormSelect.stories.svelte +21 -21
  45. package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
  46. package/dist/components/form/FormTemplateEditor.svelte +0 -13
  47. package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -7
  48. package/dist/components/form/FormTextField.stories.svelte +17 -17
  49. package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
  50. package/dist/components/form/FormTextarea.stories.svelte +21 -18
  51. package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
  52. package/dist/components/form/FormToggle.stories.svelte +13 -13
  53. package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
  54. package/dist/components/form/index.d.ts +2 -1
  55. package/dist/components/form/index.js +1 -2
  56. package/dist/components/form/types.d.ts +8 -20
  57. package/dist/components/form/types.js +3 -8
  58. package/dist/components/interrupt/ChoicePrompt.stories.svelte +37 -28
  59. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
  60. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +57 -35
  61. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
  62. package/dist/components/interrupt/ReviewPrompt.stories.svelte +52 -31
  63. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
  64. package/dist/components/interrupt/ReviewPrompt.svelte +42 -25
  65. package/dist/components/interrupt/TextInputPrompt.stories.svelte +32 -19
  66. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
  67. package/dist/components/nodes/GatewayNode.stories.svelte +96 -64
  68. package/dist/components/nodes/IdeaNode.stories.svelte +40 -36
  69. package/dist/components/nodes/NotesNode.stories.svelte +61 -54
  70. package/dist/components/nodes/SimpleNode.stories.svelte +141 -83
  71. package/dist/components/nodes/SquareNode.stories.svelte +70 -44
  72. package/dist/components/nodes/TerminalNode.stories.svelte +10 -10
  73. package/dist/components/nodes/TerminalNode.svelte +6 -2
  74. package/dist/components/nodes/ToolNode.stories.svelte +177 -59
  75. package/dist/components/nodes/WorkflowNode.stories.svelte +43 -38
  76. package/dist/components/playground/MessageBubble.stories.svelte +51 -38
  77. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
  78. package/dist/components/playground/Playground.svelte +1 -4
  79. package/dist/config/constants.d.ts +21 -0
  80. package/dist/config/constants.js +9 -0
  81. package/dist/core/index.d.ts +7 -5
  82. package/dist/core/index.js +5 -5
  83. package/dist/editor/index.d.ts +4 -4
  84. package/dist/editor/index.js +3 -4
  85. package/dist/form/code.js +16 -4
  86. package/dist/form/fieldRegistry.d.ts +8 -82
  87. package/dist/form/fieldRegistry.js +9 -101
  88. package/dist/form/full.d.ts +4 -1
  89. package/dist/form/full.js +6 -1
  90. package/dist/form/index.d.ts +1 -1
  91. package/dist/form/index.js +0 -2
  92. package/dist/form/markdown.js +11 -3
  93. package/dist/helpers/workflowEditorHelper.d.ts +0 -3
  94. package/dist/helpers/workflowEditorHelper.js +7 -26
  95. package/dist/index.js +3 -0
  96. package/dist/schemas/v1/workflow.schema.json +950 -1076
  97. package/dist/services/apiVariableService.d.ts +1 -3
  98. package/dist/services/apiVariableService.js +3 -4
  99. package/dist/services/dynamicSchemaService.js +3 -4
  100. package/dist/stories/CanvasDecorator.svelte +7 -8
  101. package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
  102. package/dist/stories/NodeDecorator.svelte +13 -14
  103. package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
  104. package/dist/stories/utils.d.ts +2 -2
  105. package/dist/stories/utils.js +55 -55
  106. package/dist/styles/base.css +12 -4
  107. package/dist/styles/tokens.css +138 -130
  108. package/dist/types/interrupt.d.ts +1 -4
  109. package/dist/utils/errors.d.ts +28 -0
  110. package/dist/utils/errors.js +44 -0
  111. package/dist/utils/handleIds.d.ts +35 -0
  112. package/dist/utils/handleIds.js +58 -0
  113. package/package.json +53 -12
  114. package/dist/api/client.d.ts +0 -110
  115. package/dist/api/client.js +0 -240
@@ -1,110 +0,0 @@
1
- /**
2
- * API Client for FlowDrop Workflow Library
3
- */
4
- import type { NodeMetadata, Workflow, ExecutionResult, PortConfig, CategoryDefinition } from '../types/index.js';
5
- /**
6
- * HTTP API client for FlowDrop
7
- *
8
- * @deprecated Use {@link EnhancedFlowDropApiClient} instead, which supports
9
- * configurable endpoints, authentication providers, retry logic, and timeouts.
10
- * This class will be removed in a future major version.
11
- */
12
- export declare class FlowDropApiClient {
13
- private baseUrl;
14
- private headers;
15
- constructor(baseUrl: string, apiKey?: string);
16
- /**
17
- * Make HTTP request with error handling
18
- */
19
- private request;
20
- /**
21
- * Fetch available node types and their metadata
22
- */
23
- getAvailableNodes(): Promise<NodeMetadata[]>;
24
- /**
25
- * Fetch nodes by category
26
- */
27
- getNodesByCategory(category: string): Promise<NodeMetadata[]>;
28
- /**
29
- * Fetch a specific node's metadata
30
- */
31
- getNodeMetadata(nodeId: string): Promise<NodeMetadata>;
32
- /**
33
- * Save a workflow
34
- */
35
- saveWorkflow(workflow: Workflow): Promise<Workflow>;
36
- /**
37
- * Update an existing workflow
38
- */
39
- updateWorkflow(workflowId: string, workflow: Partial<Workflow>): Promise<Workflow>;
40
- /**
41
- * Load a workflow by ID
42
- */
43
- loadWorkflow(workflowId: string): Promise<Workflow>;
44
- /**
45
- * List all workflows
46
- */
47
- listWorkflows(): Promise<Workflow[]>;
48
- /**
49
- * Delete a workflow
50
- */
51
- deleteWorkflow(workflowId: string): Promise<void>;
52
- /**
53
- * Execute a workflow
54
- */
55
- executeWorkflow(workflowId: string, inputs?: Record<string, unknown>): Promise<ExecutionResult>;
56
- /**
57
- * Get execution status
58
- */
59
- getExecutionStatus(executionId: string): Promise<ExecutionResult>;
60
- /**
61
- * Cancel workflow execution
62
- */
63
- cancelExecution(executionId: string): Promise<void>;
64
- /**
65
- * Get execution logs
66
- */
67
- getExecutionLogs(executionId: string): Promise<string[]>;
68
- /**
69
- * Validate workflow configuration
70
- */
71
- validateWorkflow(workflow: Workflow): Promise<{
72
- valid: boolean;
73
- errors: string[];
74
- }>;
75
- /**
76
- * Export workflow as JSON
77
- */
78
- exportWorkflow(workflowId: string): Promise<string>;
79
- /**
80
- * Import workflow from JSON
81
- */
82
- importWorkflow(workflowJson: string): Promise<Workflow>;
83
- /**
84
- * Fetch port configuration
85
- */
86
- getPortConfig(): Promise<PortConfig>;
87
- /**
88
- * Fetch category definitions
89
- */
90
- getCategories(): Promise<CategoryDefinition[]>;
91
- /**
92
- * Fetch pipeline data including job information and status
93
- */
94
- getPipelineData(pipelineId: string): Promise<{
95
- status: string;
96
- jobs: Array<Record<string, unknown>>;
97
- node_statuses: Record<string, {
98
- status: string;
99
- [key: string]: unknown;
100
- }>;
101
- job_status_summary: {
102
- total: number;
103
- pending: number;
104
- running: number;
105
- completed: number;
106
- failed: number;
107
- cancelled: number;
108
- };
109
- }>;
110
- }
@@ -1,240 +0,0 @@
1
- /**
2
- * API Client for FlowDrop Workflow Library
3
- */
4
- import { logger } from '../utils/logger.js';
5
- /**
6
- * HTTP API client for FlowDrop
7
- *
8
- * @deprecated Use {@link EnhancedFlowDropApiClient} instead, which supports
9
- * configurable endpoints, authentication providers, retry logic, and timeouts.
10
- * This class will be removed in a future major version.
11
- */
12
- export class FlowDropApiClient {
13
- baseUrl;
14
- headers;
15
- constructor(baseUrl, apiKey) {
16
- this.baseUrl = baseUrl.replace(/\/$/, '');
17
- this.headers = {
18
- 'Content-Type': 'application/json'
19
- };
20
- if (apiKey) {
21
- this.headers['Authorization'] = `Bearer ${apiKey}`;
22
- }
23
- }
24
- /**
25
- * Make HTTP request with error handling
26
- */
27
- async request(endpoint, options = {}) {
28
- const url = `${this.baseUrl}${endpoint}`;
29
- const config = {
30
- headers: this.headers,
31
- ...options
32
- };
33
- try {
34
- const response = await fetch(url, config);
35
- if (!response.ok) {
36
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
37
- }
38
- const data = await response.json();
39
- return data;
40
- }
41
- catch (error) {
42
- logger.error('API request failed:', error);
43
- throw new Error(`API request failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
44
- }
45
- }
46
- /**
47
- * Fetch available node types and their metadata
48
- */
49
- async getAvailableNodes() {
50
- const response = await this.request('/nodes');
51
- if (!response.success || !response.data) {
52
- throw new Error(response.error || 'Failed to fetch available nodes');
53
- }
54
- return response.data;
55
- }
56
- /**
57
- * Fetch nodes by category
58
- */
59
- async getNodesByCategory(category) {
60
- const response = await this.request(`/nodes?category=${encodeURIComponent(category)}`);
61
- if (!response.success || !response.data) {
62
- throw new Error(response.error || 'Failed to fetch nodes by category');
63
- }
64
- return response.data;
65
- }
66
- /**
67
- * Fetch a specific node's metadata
68
- */
69
- async getNodeMetadata(nodeId) {
70
- const response = await this.request(`/nodes/${encodeURIComponent(nodeId)}`);
71
- if (!response.success || !response.data) {
72
- throw new Error(response.error || 'Failed to fetch node metadata');
73
- }
74
- return response.data;
75
- }
76
- /**
77
- * Save a workflow
78
- */
79
- async saveWorkflow(workflow) {
80
- const response = await this.request('/workflows', {
81
- method: 'POST',
82
- body: JSON.stringify(workflow)
83
- });
84
- if (!response.success || !response.data) {
85
- throw new Error(response.error || 'Failed to save workflow');
86
- }
87
- return response.data;
88
- }
89
- /**
90
- * Update an existing workflow
91
- */
92
- async updateWorkflow(workflowId, workflow) {
93
- const response = await this.request(`/workflows/${encodeURIComponent(workflowId)}`, {
94
- method: 'PUT',
95
- body: JSON.stringify(workflow)
96
- });
97
- if (!response.success || !response.data) {
98
- throw new Error(response.error || 'Failed to update workflow');
99
- }
100
- return response.data;
101
- }
102
- /**
103
- * Load a workflow by ID
104
- */
105
- async loadWorkflow(workflowId) {
106
- const response = await this.request(`/workflows/${encodeURIComponent(workflowId)}`);
107
- if (!response.success || !response.data) {
108
- throw new Error(response.error || 'Failed to load workflow');
109
- }
110
- return response.data;
111
- }
112
- /**
113
- * List all workflows
114
- */
115
- async listWorkflows() {
116
- const response = await this.request('/workflows');
117
- if (!response.success || !response.data) {
118
- throw new Error(response.error || 'Failed to list workflows');
119
- }
120
- return response.data;
121
- }
122
- /**
123
- * Delete a workflow
124
- */
125
- async deleteWorkflow(workflowId) {
126
- const response = await this.request(`/workflows/${encodeURIComponent(workflowId)}`, {
127
- method: 'DELETE'
128
- });
129
- if (!response.success) {
130
- throw new Error(response.error || 'Failed to delete workflow');
131
- }
132
- }
133
- /**
134
- * Execute a workflow
135
- */
136
- async executeWorkflow(workflowId, inputs) {
137
- const response = await this.request(`/workflows/${encodeURIComponent(workflowId)}/execute`, {
138
- method: 'POST',
139
- body: JSON.stringify({ inputs })
140
- });
141
- if (!response.success || !response.data) {
142
- throw new Error(response.error || 'Failed to execute workflow');
143
- }
144
- return response.data;
145
- }
146
- /**
147
- * Get execution status
148
- */
149
- async getExecutionStatus(executionId) {
150
- const response = await this.request(`/executions/${encodeURIComponent(executionId)}`);
151
- if (!response.success || !response.data) {
152
- throw new Error(response.error || 'Failed to get execution status');
153
- }
154
- return response.data;
155
- }
156
- /**
157
- * Cancel workflow execution
158
- */
159
- async cancelExecution(executionId) {
160
- const response = await this.request(`/executions/${encodeURIComponent(executionId)}/cancel`, {
161
- method: 'POST'
162
- });
163
- if (!response.success) {
164
- throw new Error(response.error || 'Failed to cancel execution');
165
- }
166
- }
167
- /**
168
- * Get execution logs
169
- */
170
- async getExecutionLogs(executionId) {
171
- const response = await this.request(`/executions/${encodeURIComponent(executionId)}/logs`);
172
- if (!response.success || !response.data) {
173
- throw new Error(response.error || 'Failed to get execution logs');
174
- }
175
- return response.data;
176
- }
177
- /**
178
- * Validate workflow configuration
179
- */
180
- async validateWorkflow(workflow) {
181
- const response = await this.request('/workflows/validate', {
182
- method: 'POST',
183
- body: JSON.stringify(workflow)
184
- });
185
- if (!response.success || !response.data) {
186
- throw new Error(response.error || 'Failed to validate workflow');
187
- }
188
- return response.data;
189
- }
190
- /**
191
- * Export workflow as JSON
192
- */
193
- async exportWorkflow(workflowId) {
194
- const response = await this.request(`/workflows/${encodeURIComponent(workflowId)}/export`);
195
- if (!response.success || !response.data) {
196
- throw new Error(response.error || 'Failed to export workflow');
197
- }
198
- return response.data;
199
- }
200
- /**
201
- * Import workflow from JSON
202
- */
203
- async importWorkflow(workflowJson) {
204
- const response = await this.request('/workflows/import', {
205
- method: 'POST',
206
- body: JSON.stringify({ workflow: workflowJson })
207
- });
208
- if (!response.success || !response.data) {
209
- throw new Error(response.error || 'Failed to import workflow');
210
- }
211
- return response.data;
212
- }
213
- /**
214
- * Fetch port configuration
215
- */
216
- async getPortConfig() {
217
- const response = await this.request('/port-config');
218
- if (!response.success || !response.data) {
219
- throw new Error(response.error || 'Failed to fetch port configuration');
220
- }
221
- return response.data;
222
- }
223
- /**
224
- * Fetch category definitions
225
- */
226
- async getCategories() {
227
- const response = await this.request('/categories');
228
- if (!response.success || !response.data) {
229
- throw new Error(response.error || 'Failed to fetch categories');
230
- }
231
- return response.data;
232
- }
233
- /**
234
- * Fetch pipeline data including job information and status
235
- */
236
- async getPipelineData(pipelineId) {
237
- const response = await this.request(`/pipeline/${encodeURIComponent(pipelineId)}`);
238
- return response;
239
- }
240
- }