@flowdrop/flowdrop 2.0.0-beta.1 → 2.0.0-beta.11
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 +210 -0
- package/MIGRATION-2.0.md +173 -3
- package/README.md +5 -5
- package/dist/adapters/WorkflowAdapter.js +4 -5
- package/dist/adapters/agentspec/AgentSpecAdapter.js +3 -3
- package/dist/adapters/agentspec/defaultNodeTypes.js +9 -9
- package/dist/api/enhanced-client.js +6 -11
- package/dist/chat/batchFeedback.js +1 -1
- package/dist/chat/commandClassifier.d.ts +11 -0
- package/dist/chat/commandClassifier.js +20 -0
- package/dist/chat/historyBuilder.d.ts +39 -0
- package/dist/chat/historyBuilder.js +82 -0
- package/dist/chat/index.d.ts +2 -1
- package/dist/chat/index.js +2 -1
- package/dist/chat/responseParser.js +16 -12
- package/dist/commands/executor.js +51 -26
- package/dist/commands/parser.d.ts +12 -0
- package/dist/commands/parser.js +33 -6
- package/dist/commands/storeIntegration.svelte.js +11 -1
- package/dist/commands/types.js +5 -5
- package/dist/components/App.svelte +547 -386
- package/dist/components/App.svelte.d.ts +16 -8
- package/dist/components/Button.stories.svelte +65 -0
- package/dist/components/Button.stories.svelte.d.ts +19 -0
- package/dist/components/Button.svelte +62 -0
- package/dist/components/Button.svelte.d.ts +24 -0
- package/dist/components/CanvasIconButton.svelte +76 -0
- package/dist/components/CanvasIconButton.svelte.d.ts +18 -0
- package/dist/components/ConfigForm.svelte +194 -565
- package/dist/components/ConfigForm.svelte.d.ts +24 -7
- package/dist/components/ConfigModal.svelte +9 -1
- package/dist/components/ConfigPanel.svelte +234 -15
- package/dist/components/ConfigPanel.svelte.d.ts +6 -0
- package/dist/components/EditorStatusBar.stories.svelte +44 -0
- package/dist/components/EditorStatusBar.stories.svelte.d.ts +27 -0
- package/dist/components/EditorStatusBar.svelte +99 -0
- package/dist/components/EditorStatusBar.svelte.d.ts +15 -0
- package/dist/components/IconButton.svelte +80 -0
- package/dist/components/IconButton.svelte.d.ts +30 -0
- package/dist/components/Input.svelte +74 -0
- package/dist/components/Input.svelte.d.ts +17 -0
- package/dist/components/LogoWordmark.svelte +113 -0
- package/dist/components/LogoWordmark.svelte.d.ts +26 -0
- package/dist/components/Navbar.svelte +17 -63
- package/dist/components/Navbar.svelte.d.ts +3 -0
- package/dist/components/NodeSidebar.svelte +21 -126
- package/dist/components/NodeSwapPicker.svelte +12 -30
- package/dist/components/PipelineStatus.svelte +6 -1
- package/dist/components/PipelineStatus.svelte.d.ts +3 -0
- package/dist/components/PortMappingRow.svelte +0 -2
- package/dist/components/SchemaForm.svelte +4 -14
- package/dist/components/Select.svelte +53 -0
- package/dist/components/Select.svelte.d.ts +15 -0
- package/dist/components/SettingsModal.svelte +0 -5
- package/dist/components/SettingsPanel.svelte +33 -6
- package/dist/components/Textarea.svelte +39 -0
- package/dist/components/Textarea.svelte.d.ts +12 -0
- package/dist/components/ThemeToggle.svelte +15 -94
- package/dist/components/UniversalNode.svelte +36 -4
- package/dist/components/UniversalNode.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +71 -54
- package/dist/components/WorkflowEditor.svelte.d.ts +21 -0
- package/dist/components/chat/AIChatPanel.svelte +49 -8
- package/dist/components/chat/CommandPreview.svelte +10 -1
- package/dist/components/console/ConsoleAutocomplete.svelte +1 -1
- package/dist/components/console/ConsoleInput.svelte +3 -3
- package/dist/components/console/ConsoleOutput.svelte +2 -2
- package/dist/components/form/FormArray.svelte +37 -173
- package/dist/components/form/FormAutocomplete.svelte +18 -15
- package/dist/components/form/FormCheckboxGroup.svelte +1 -5
- package/dist/components/form/FormCodeEditor.svelte +9 -7
- package/dist/components/form/FormField.svelte +18 -42
- package/dist/components/form/FormFieldLight.svelte +52 -48
- package/dist/components/form/FormFieldLight.svelte.d.ts +12 -0
- package/dist/components/form/FormFieldset.svelte +45 -11
- package/dist/components/form/FormMarkdownEditor.svelte +8 -5
- package/dist/components/form/FormNumberField.svelte +4 -36
- package/dist/components/form/FormPorts.svelte +280 -0
- package/dist/components/form/FormPorts.svelte.d.ts +13 -0
- package/dist/components/form/FormRangeField.svelte +63 -30
- package/dist/components/form/FormSelect.svelte +13 -75
- package/dist/components/form/FormTemplateEditor.svelte +6 -4
- package/dist/components/form/FormTextField.svelte +3 -35
- package/dist/components/form/FormTextarea.svelte +4 -39
- package/dist/components/form/FormToggle.svelte +27 -6
- package/dist/components/form/FormToggle.svelte.d.ts +5 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +3 -1
- package/dist/components/form/resolveFieldType.d.ts +24 -0
- package/dist/components/form/resolveFieldType.js +55 -0
- package/dist/components/icons/CloseIcon.svelte +6 -0
- package/dist/components/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CommandLineIcon.svelte +15 -0
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuIcon.svelte +4 -0
- package/dist/components/icons/MenuIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuOpenIcon.svelte +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +0 -10
- package/dist/components/interrupt/ConfirmationPrompt.svelte +0 -5
- package/dist/components/interrupt/InterruptBubble.svelte +11 -12
- package/dist/components/interrupt/ReviewPrompt.svelte +0 -20
- package/dist/components/interrupt/TextInputPrompt.svelte +0 -6
- package/dist/components/layouts/MainLayout.svelte +4 -5
- package/dist/components/nodes/AtomNode.svelte +62 -76
- package/dist/components/nodes/AtomNode.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.svelte +117 -164
- package/dist/components/nodes/GatewayNode.svelte.d.ts +1 -1
- package/dist/components/nodes/IdeaNode.svelte +72 -98
- package/dist/components/nodes/IdeaNode.svelte.d.ts +8 -4
- package/dist/components/nodes/NodeConfigButton.svelte +86 -0
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +76 -85
- package/dist/components/nodes/NotesNode.svelte.d.ts +8 -4
- package/dist/components/nodes/SimpleNode.svelte +59 -133
- package/dist/components/nodes/SimpleNode.svelte.d.ts +4 -4
- package/dist/components/nodes/SquareNode.svelte +110 -164
- package/dist/components/nodes/SquareNode.svelte.d.ts +4 -4
- package/dist/components/nodes/TerminalNode.svelte +62 -124
- package/dist/components/nodes/TerminalNode.svelte.d.ts +4 -4
- package/dist/components/nodes/ToolNode.svelte +92 -103
- package/dist/components/nodes/ToolNode.svelte.d.ts +6 -6
- package/dist/components/nodes/WorkflowNode.svelte +132 -191
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +1 -1
- package/dist/components/playground/ChatInput.svelte +316 -27
- package/dist/components/playground/ChatInput.svelte.d.ts +31 -1
- package/dist/components/playground/ControlPanel.svelte +22 -0
- package/dist/components/playground/ControlPanel.svelte.d.ts +13 -0
- package/dist/components/playground/InputCollector.svelte +11 -48
- package/dist/components/playground/PipelineKanbanView.svelte +6 -4
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +2 -0
- package/dist/components/playground/PipelinePanel.svelte +20 -3
- package/dist/components/playground/PipelinePanel.svelte.d.ts +2 -0
- package/dist/components/playground/PipelineTableView.svelte +6 -4
- package/dist/components/playground/PipelineTableView.svelte.d.ts +2 -0
- package/dist/components/playground/Playground.svelte +292 -28
- package/dist/components/playground/Playground.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundApp.svelte +6 -1
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundModal.svelte +5 -0
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundStudio.svelte +7 -6
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +3 -0
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +2 -1
- package/dist/components/playground/pipelineViewUtils.svelte.js +2 -2
- package/dist/components/surfaces/SurfaceOverlay.svelte +153 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte.d.ts +14 -0
- package/dist/components/surfaces/TabbedSurface.svelte +133 -0
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +27 -0
- package/dist/config/endpoints.d.ts +71 -1
- package/dist/config/endpoints.js +46 -5
- package/dist/core/index.d.ts +2 -3
- package/dist/core/index.js +2 -6
- package/dist/display/index.d.ts +6 -1
- package/dist/display/index.js +9 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/form/full.d.ts +2 -1
- package/dist/form/full.js +4 -1
- package/dist/form/index.d.ts +0 -1
- package/dist/form/index.js +3 -2
- package/dist/helpers/workflowEditorHelper.d.ts +4 -2
- package/dist/helpers/workflowEditorHelper.js +8 -8
- package/dist/messages/defaults.d.ts +98 -0
- package/dist/messages/defaults.js +58 -1
- package/dist/messages/index.d.ts +1 -1
- package/dist/messages/index.js +1 -1
- package/dist/openapi/v1/openapi.yaml +35 -23
- package/dist/playground/commands/args.d.ts +32 -0
- package/dist/playground/commands/args.js +50 -0
- package/dist/playground/commands/dispatch.d.ts +143 -0
- package/dist/playground/commands/dispatch.js +162 -0
- package/dist/playground/commands/index.d.ts +14 -0
- package/dist/playground/commands/index.js +10 -0
- package/dist/playground/commands/parser.d.ts +38 -0
- package/dist/playground/commands/parser.js +163 -0
- package/dist/playground/commands/registry.d.ts +42 -0
- package/dist/playground/commands/registry.js +122 -0
- package/dist/playground/commands/suggest.d.ts +37 -0
- package/dist/playground/commands/suggest.js +46 -0
- package/dist/playground/commands/types.d.ts +111 -0
- package/dist/playground/commands/types.js +15 -0
- package/dist/playground/index.d.ts +21 -2
- package/dist/playground/index.js +27 -2
- package/dist/playground/mount.d.ts +19 -5
- package/dist/playground/mount.js +16 -8
- package/dist/playground/runAction.d.ts +48 -0
- package/dist/playground/runAction.js +31 -0
- package/dist/registry/builtinNodeTypes.d.ts +53 -0
- package/dist/registry/builtinNodeTypes.js +67 -0
- package/dist/registry/builtinNodes.d.ts +2 -39
- package/dist/registry/builtinNodes.js +6 -53
- package/dist/registry/nodeComponentRegistry.d.ts +2 -1
- package/dist/schemas/v1/workflow.schema.json +16 -14
- package/dist/services/agentSpecExecutionService.d.ts +0 -2
- package/dist/services/agentSpecExecutionService.js +0 -2
- package/dist/services/apiVariableService.js +12 -26
- package/dist/services/categoriesApi.js +3 -6
- package/dist/services/chatService.d.ts +4 -3
- package/dist/services/chatService.js +13 -18
- package/dist/services/dynamicSchemaService.d.ts +31 -4
- package/dist/services/dynamicSchemaService.js +62 -33
- package/dist/services/historyService.d.ts +30 -8
- package/dist/services/historyService.js +51 -15
- package/dist/services/interruptService.d.ts +7 -6
- package/dist/services/interruptService.js +19 -21
- package/dist/services/pipelineSignalService.d.ts +97 -0
- package/dist/services/pipelineSignalService.js +94 -0
- package/dist/services/playgroundService.d.ts +21 -8
- package/dist/services/playgroundService.js +45 -25
- package/dist/services/portConfigApi.js +3 -6
- package/dist/services/settingsService.d.ts +9 -4
- package/dist/services/settingsService.js +23 -12
- package/dist/services/workflowLaunchService.d.ts +74 -0
- package/dist/services/workflowLaunchService.js +74 -0
- package/dist/skins/drafter.d.ts +30 -0
- package/dist/skins/drafter.js +198 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/stores/apiContext.d.ts +11 -0
- package/dist/stores/apiContext.js +15 -0
- package/dist/stores/categoriesStore.svelte.js +0 -1
- package/dist/stores/historyStore.svelte.d.ts +17 -3
- package/dist/stores/historyStore.svelte.js +30 -3
- package/dist/stores/instanceContainer.svelte.js +5 -0
- package/dist/stores/playgroundStore.svelte.js +1 -3
- package/dist/stores/settingsStore.svelte.d.ts +13 -0
- package/dist/stores/settingsStore.svelte.js +32 -0
- package/dist/stores/workflowStore.svelte.d.ts +42 -5
- package/dist/stores/workflowStore.svelte.js +109 -32
- package/dist/styles/base.css +285 -14
- package/dist/styles/tokens.css +60 -2
- package/dist/svelte-app.d.ts +18 -1
- package/dist/svelte-app.js +75 -110
- package/dist/themes/drafter.d.ts +2 -0
- package/dist/themes/drafter.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +8 -2
- package/dist/types/auth.d.ts +9 -51
- package/dist/types/auth.js +4 -54
- package/dist/types/chat.d.ts +5 -1
- package/dist/types/events.d.ts +18 -0
- package/dist/types/events.js +2 -1
- package/dist/types/index.d.ts +84 -29
- package/dist/types/index.js +0 -1
- package/dist/types/settings.d.ts +28 -1
- package/dist/types/settings.js +6 -3
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +16 -2
- package/dist/types/uischema.d.ts +5 -0
- package/dist/utils/canvasSelection.d.ts +25 -0
- package/dist/utils/canvasSelection.js +37 -0
- package/dist/utils/colors.d.ts +27 -0
- package/dist/utils/colors.js +23 -0
- package/dist/utils/connections.js +20 -56
- package/dist/utils/edgeStyling.js +9 -5
- package/dist/utils/fetchWithAuth.d.ts +36 -15
- package/dist/utils/fetchWithAuth.js +53 -23
- package/dist/utils/nodeFormSchema.d.ts +51 -0
- package/dist/utils/nodeFormSchema.js +87 -0
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeSwap.js +3 -6
- package/dist/utils/nodeTypes.js +1 -1
- package/dist/utils/portUtils.d.ts +47 -11
- package/dist/utils/portUtils.js +67 -14
- package/dist/utils/portal.d.ts +18 -0
- package/dist/utils/portal.js +34 -0
- package/dist/utils/schemaMerge.d.ts +25 -0
- package/dist/utils/schemaMerge.js +61 -0
- package/package.json +2 -1
package/dist/config/endpoints.js
CHANGED
|
@@ -24,7 +24,9 @@ export const defaultEndpointConfig = {
|
|
|
24
24
|
delete: '/workflows/{id}',
|
|
25
25
|
validate: '/workflows/validate',
|
|
26
26
|
export: '/workflows/{id}/export',
|
|
27
|
-
import: '/workflows/import'
|
|
27
|
+
import: '/workflows/import',
|
|
28
|
+
// Singular `workflow` here is the reference backend's spelling, not a typo.
|
|
29
|
+
run: '/workflow/{workflowId}/run'
|
|
28
30
|
},
|
|
29
31
|
executions: {
|
|
30
32
|
execute: '/workflows/{id}/execute',
|
|
@@ -51,7 +53,15 @@ export const defaultEndpointConfig = {
|
|
|
51
53
|
deleteSession: '/playground/sessions/{sessionId}',
|
|
52
54
|
getMessages: '/playground/sessions/{sessionId}/messages',
|
|
53
55
|
sendMessage: '/playground/sessions/{sessionId}/messages',
|
|
54
|
-
stopExecution: '/playground/sessions/{sessionId}/stop'
|
|
56
|
+
stopExecution: '/playground/sessions/{sessionId}/stop',
|
|
57
|
+
resetSession: '/playground/sessions/{sessionId}/reset'
|
|
58
|
+
},
|
|
59
|
+
signals: {
|
|
60
|
+
// The reference backend transposes its prefix for these routes.
|
|
61
|
+
baseUrl: '/flowdrop/api',
|
|
62
|
+
pause: '/pipelines/{pipelineId}/pause',
|
|
63
|
+
resume: '/pipelines/{pipelineId}/resume',
|
|
64
|
+
cancel: '/pipelines/{pipelineId}/cancel'
|
|
55
65
|
},
|
|
56
66
|
interrupts: {
|
|
57
67
|
get: '/interrupts/{interruptId}',
|
|
@@ -105,7 +115,7 @@ export function createEndpointConfig(baseUrl, overrides) {
|
|
|
105
115
|
/**
|
|
106
116
|
* Build full URL for an endpoint
|
|
107
117
|
*/
|
|
108
|
-
export function buildEndpointUrl(config, endpointPath, params) {
|
|
118
|
+
export function buildEndpointUrl(config, endpointPath, params, baseUrlOverride) {
|
|
109
119
|
let url = endpointPath;
|
|
110
120
|
// Replace path parameters
|
|
111
121
|
if (params) {
|
|
@@ -113,9 +123,12 @@ export function buildEndpointUrl(config, endpointPath, params) {
|
|
|
113
123
|
url = url.replace(`{${key}}`, encodeURIComponent(value));
|
|
114
124
|
});
|
|
115
125
|
}
|
|
116
|
-
// Ensure URL starts with base URL
|
|
126
|
+
// Ensure URL starts with base URL. `baseUrlOverride` lets a group of
|
|
127
|
+
// endpoints hang off a different root than the global one — backends do not
|
|
128
|
+
// always serve every API from a single prefix.
|
|
129
|
+
const base = baseUrlOverride ?? config.baseUrl;
|
|
117
130
|
if (!url.startsWith('http') && !url.startsWith('//')) {
|
|
118
|
-
url = `${
|
|
131
|
+
url = `${base}${url.startsWith('/') ? url : `/${url}`}`;
|
|
119
132
|
}
|
|
120
133
|
return url;
|
|
121
134
|
}
|
|
@@ -141,3 +154,31 @@ export function getEndpointHeaders(config, endpointKey) {
|
|
|
141
154
|
}
|
|
142
155
|
return baseHeaders;
|
|
143
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Build request headers for an endpoint, layering the auth provider's headers
|
|
159
|
+
* over the static endpoint headers.
|
|
160
|
+
*
|
|
161
|
+
* This is the single header-building path shared by the per-instance services
|
|
162
|
+
* (playground, chat, interrupt, settings, port config, categories). Routing all
|
|
163
|
+
* of them through this helper guarantees a configured {@link AuthProvider}
|
|
164
|
+
* authenticates every request consistently — matching the behaviour of
|
|
165
|
+
* {@link EnhancedFlowDropApiClient}, which owns the equivalent merge for the
|
|
166
|
+
* typed workflow/node API.
|
|
167
|
+
*
|
|
168
|
+
* `getAuthHeaders()` is awaited per call so providers can return freshly
|
|
169
|
+
* refreshed tokens. When no provider is supplied the result is identical to
|
|
170
|
+
* {@link getEndpointHeaders} (no auth) — keeping unauthenticated callers
|
|
171
|
+
* working unchanged.
|
|
172
|
+
*
|
|
173
|
+
* @param config - The endpoint configuration
|
|
174
|
+
* @param endpointKey - Key identifying the endpoint (for static header lookup)
|
|
175
|
+
* @param authProvider - Optional auth provider supplying `Authorization` etc.
|
|
176
|
+
* @returns Merged headers: static endpoint headers < auth headers
|
|
177
|
+
*/
|
|
178
|
+
export async function getRequestHeaders(config, endpointKey, authProvider) {
|
|
179
|
+
const headers = getEndpointHeaders(config, endpointKey);
|
|
180
|
+
if (authProvider) {
|
|
181
|
+
Object.assign(headers, await authProvider.getAuthHeaders());
|
|
182
|
+
}
|
|
183
|
+
return headers;
|
|
184
|
+
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export type { WorkflowFormat, BuiltinWorkflowFormat } from '../types/index.js';
|
|
18
18
|
export { DEFAULT_WORKFLOW_FORMAT } from '../types/index.js';
|
|
19
|
-
export type { NodeCategory, BuiltinNodeCategory, CategoryDefinition, NodeDataType, NodePort, DynamicPort, Branch, NodeMetadata, NodeExtensions, NodeUIExtensions, ConfigValues, WorkflowNode, WorkflowEdge, Workflow, ApiResponse, NodesResponse, WorkflowResponse, WorkflowsResponse, ExecutionStatus, ExecutionResult, FlowDropConfig, WorkflowEvents, BuiltinNodeType, PortConfig, PortCompatibilityRule, ConfigSchema, ConfigProperty, HttpMethod, DynamicSchemaEndpoint, ExternalEditLink, ConfigEditOptions, EdgeCategory, UISchemaElementType, UISchemaElementBase, UISchemaControl, UISchemaVerticalLayout, UISchemaGroup, UISchemaElement } from '../types/index.js';
|
|
19
|
+
export type { NodeCategory, BuiltinNodeCategory, CategoryDefinition, NodeDataType, NodePort, DynamicPort, Branch, NodeMetadata, NodeExtensions, NodeUIExtensions, PortsConfig, PortConfigEntry, ConfigValues, WorkflowNode, WorkflowEdge, Workflow, ApiResponse, NodesResponse, WorkflowResponse, WorkflowsResponse, ExecutionStatus, ExecutionResult, FlowDropConfig, WorkflowEvents, BuiltinNodeType, PortConfig, PortCompatibilityRule, ConfigSchema, ConfigProperty, HttpMethod, DynamicSchemaEndpoint, ExternalEditLink, ConfigEditOptions, EdgeCategory, UISchemaElementType, UISchemaElementBase, UISchemaControl, UISchemaVerticalLayout, UISchemaGroup, UISchemaElement } from '../types/index.js';
|
|
20
20
|
export { isUISchemaControl, isUISchemaVerticalLayout, isUISchemaGroup } from '../types/index.js';
|
|
21
21
|
export type { WorkflowEditorConfig, EditorFeatures, UIConfig, APIConfig, ExecutionConfig, StorageConfig } from '../types/config.js';
|
|
22
22
|
export type { AuthProvider, StaticAuthConfig, CallbackAuthConfig } from '../types/auth.js';
|
|
@@ -68,7 +68,7 @@ export { computeAutoLayout } from '../adapters/agentspec/autoLayout.js';
|
|
|
68
68
|
export type { AutoLayoutConfig } from '../adapters/agentspec/autoLayout.js';
|
|
69
69
|
export type { AgentSpecEndpointConfig } from '../config/agentSpecEndpoints.js';
|
|
70
70
|
export { defaultAgentSpecEndpoints, createAgentSpecEndpointConfig, buildAgentSpecUrl, getAgentSpecAuthHeaders } from '../config/agentSpecEndpoints.js';
|
|
71
|
-
export { AgentSpecExecutionService
|
|
71
|
+
export { AgentSpecExecutionService } from '../services/agentSpecExecutionService.js';
|
|
72
72
|
export type { AgentSpecExecutionHandle } from '../services/agentSpecExecutionService.js';
|
|
73
73
|
export { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '../schemas/index.js';
|
|
74
74
|
export type { FlowDropTheme, FlowDropThemeName, FlowDropThemeConfig } from '../types/theme.js';
|
|
@@ -77,7 +77,6 @@ export type { FlowDropSkin, FlowDropSkinName, FlowDropSkinTokens } from '../type
|
|
|
77
77
|
export { slateSkin, defaultSkin } from '../skins/index.js';
|
|
78
78
|
export type { ThemePreference, ResolvedTheme } from '../stores/settingsStore.svelte.js';
|
|
79
79
|
export { getTheme as theme, getResolvedTheme as resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.svelte.js';
|
|
80
|
-
export { sanitizeHtml } from '../utils/sanitize.js';
|
|
81
80
|
export { logger, setLogLevel, getLogLevel } from '../utils/logger.js';
|
|
82
81
|
export type { LogLevel } from '../utils/logger.js';
|
|
83
82
|
export { computeSwapPreview, computeSwapPreviewWithOptions, executeSwap, mapConfig, getVersionUpgrade, compareSemver, performSwap, validateSwapResult, SwapValidationError } from '../utils/nodeSwap.js';
|
package/dist/core/index.js
CHANGED
|
@@ -80,8 +80,8 @@ export { validateForAgentSpecExport, validateAgentSpecFlow } from '../adapters/a
|
|
|
80
80
|
// Agent Spec auto-layout
|
|
81
81
|
export { computeAutoLayout } from '../adapters/agentspec/autoLayout.js';
|
|
82
82
|
export { defaultAgentSpecEndpoints, createAgentSpecEndpointConfig, buildAgentSpecUrl, getAgentSpecAuthHeaders } from '../config/agentSpecEndpoints.js';
|
|
83
|
-
// Agent Spec execution service
|
|
84
|
-
export { AgentSpecExecutionService
|
|
83
|
+
// Agent Spec execution service (instantiate per instance — no global singleton)
|
|
84
|
+
export { AgentSpecExecutionService } from '../services/agentSpecExecutionService.js';
|
|
85
85
|
// ============================================================================
|
|
86
86
|
// Workflow JSON Schema
|
|
87
87
|
// ============================================================================
|
|
@@ -90,10 +90,6 @@ export { defaultTheme, minimalTheme, resolveTheme } from '../themes/index.js';
|
|
|
90
90
|
export { slateSkin, defaultSkin } from '../skins/index.js';
|
|
91
91
|
export { getTheme as theme, getResolvedTheme as resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.svelte.js';
|
|
92
92
|
// ============================================================================
|
|
93
|
-
// HTML Sanitization
|
|
94
|
-
// ============================================================================
|
|
95
|
-
export { sanitizeHtml } from '../utils/sanitize.js';
|
|
96
|
-
// ============================================================================
|
|
97
93
|
// Logger
|
|
98
94
|
// ============================================================================
|
|
99
95
|
export { logger, setLogLevel, getLogLevel } from '../utils/logger.js';
|
package/dist/display/index.d.ts
CHANGED
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module display
|
|
7
7
|
*
|
|
8
|
+
* This entry renders user/API-provided HTML, so it pulls in the HTML sanitizer
|
|
9
|
+
* (DOMPurify). `sanitizeHtml` is exposed here — rather than from
|
|
10
|
+
* `@flowdrop/flowdrop/core` — to keep `core` free of that heavier dependency.
|
|
11
|
+
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```typescript
|
|
10
|
-
* import { MarkdownDisplay } from "@flowdrop/flowdrop/display";
|
|
14
|
+
* import { MarkdownDisplay, sanitizeHtml } from "@flowdrop/flowdrop/display";
|
|
11
15
|
* ```
|
|
12
16
|
*
|
|
13
17
|
* @example In Svelte:
|
|
@@ -25,3 +29,4 @@
|
|
|
25
29
|
* ```
|
|
26
30
|
*/
|
|
27
31
|
export { default as MarkdownDisplay } from '../components/MarkdownDisplay.svelte';
|
|
32
|
+
export { sanitizeHtml } from '../utils/sanitize.js';
|
package/dist/display/index.js
CHANGED
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module display
|
|
7
7
|
*
|
|
8
|
+
* This entry renders user/API-provided HTML, so it pulls in the HTML sanitizer
|
|
9
|
+
* (DOMPurify). `sanitizeHtml` is exposed here — rather than from
|
|
10
|
+
* `@flowdrop/flowdrop/core` — to keep `core` free of that heavier dependency.
|
|
11
|
+
*
|
|
8
12
|
* @example
|
|
9
13
|
* ```typescript
|
|
10
|
-
* import { MarkdownDisplay } from "@flowdrop/flowdrop/display";
|
|
14
|
+
* import { MarkdownDisplay, sanitizeHtml } from "@flowdrop/flowdrop/display";
|
|
11
15
|
* ```
|
|
12
16
|
*
|
|
13
17
|
* @example In Svelte:
|
|
@@ -28,3 +32,7 @@
|
|
|
28
32
|
// Display Components
|
|
29
33
|
// ============================================================================
|
|
30
34
|
export { default as MarkdownDisplay } from '../components/MarkdownDisplay.svelte';
|
|
35
|
+
// ============================================================================
|
|
36
|
+
// HTML Sanitization (DOMPurify-backed — lives here, not in core)
|
|
37
|
+
// ============================================================================
|
|
38
|
+
export { sanitizeHtml } from '../utils/sanitize.js';
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export { PortCoordinateStore } from '../stores/portCoordinateStore.svelte.js';
|
|
|
74
74
|
export { HistoryService } from '../services/historyService.js';
|
|
75
75
|
export type { HistoryEntry, HistoryState, PushOptions } from '../stores/historyStore.svelte.js';
|
|
76
76
|
export { showSuccess, showError, showWarning, showInfo, showLoading, dismissToast, dismissAllToasts, showPromise, showConfirmation, apiToasts, workflowToasts, pipelineToasts } from '../services/toastService.js';
|
|
77
|
-
export { NodeExecutionService
|
|
77
|
+
export { NodeExecutionService } from '../services/nodeExecutionService.js';
|
|
78
78
|
export { saveWorkflow, updateWorkflow, getWorkflow, getWorkflows, deleteWorkflow, getWorkflowCount, initializeSampleWorkflows } from '../services/workflowStorage.js';
|
|
79
79
|
export { globalSaveWorkflow, globalExportWorkflow } from '../services/globalSave.js';
|
|
80
80
|
export { fetchPortConfig, validatePortConfig } from '../services/portConfigApi.js';
|
package/dist/editor/index.js
CHANGED
|
@@ -109,7 +109,7 @@ export { HistoryService } from '../services/historyService.js';
|
|
|
109
109
|
// Services
|
|
110
110
|
// ============================================================================
|
|
111
111
|
export { showSuccess, showError, showWarning, showInfo, showLoading, dismissToast, dismissAllToasts, showPromise, showConfirmation, apiToasts, workflowToasts, pipelineToasts } from '../services/toastService.js';
|
|
112
|
-
export { NodeExecutionService
|
|
112
|
+
export { NodeExecutionService } from '../services/nodeExecutionService.js';
|
|
113
113
|
export { saveWorkflow, updateWorkflow, getWorkflow, getWorkflows, deleteWorkflow, getWorkflowCount, initializeSampleWorkflows } from '../services/workflowStorage.js';
|
|
114
114
|
export { globalSaveWorkflow, globalExportWorkflow } from '../services/globalSave.js';
|
|
115
115
|
export { fetchPortConfig, validatePortConfig } from '../services/portConfigApi.js';
|
package/dist/form/full.d.ts
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
* // Now all field types are available
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export {
|
|
23
|
+
export { default as FormFieldFull } from '../components/form/FormField.svelte';
|
|
24
|
+
export { SchemaForm, FormField, FormFieldWrapper, FormTextField, FormTextarea, FormNumberField, FormRangeField, FormToggle, FormSelect, FormCheckboxGroup, FormArray, FormFieldset, FormUISchemaRenderer } from './index.js';
|
|
24
25
|
export type { FieldSchema, FieldType, FieldFormat, FieldOption, OneOfItem, SchemaFormProps, BaseFieldProps, TextFieldProps, TextareaFieldProps, NumberFieldProps, ToggleFieldProps, RangeFieldProps, SelectFieldProps, CheckboxGroupFieldProps, ArrayFieldProps, FormFieldFactoryProps, FormFieldWrapperProps, FieldComponentProps, FieldMatcher, FieldMatcherRegistration, FieldComponent, FieldComponentRegistration } from './index.js';
|
|
25
26
|
export { isFieldOptionArray, isOneOfArray, normalizeOptions, oneOfToOptions, getSchemaOptions } from './index.js';
|
|
26
27
|
export { FieldComponentRegistry, hiddenFieldMatcher, checkboxGroupMatcher, enumSelectMatcher, textareaMatcher, rangeMatcher, textFieldMatcher, numberFieldMatcher, toggleMatcher, selectOptionsMatcher, arrayMatcher } from './index.js';
|
package/dist/form/full.js
CHANGED
|
@@ -21,8 +21,11 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
// Re-export everything from the light form module
|
|
24
|
+
// The "everything statically bundled" FormField variant lives here (this is the
|
|
25
|
+
// heavy entry), not in the light `@flowdrop/flowdrop/form`.
|
|
26
|
+
export { default as FormFieldFull } from '../components/form/FormField.svelte';
|
|
24
27
|
// Components
|
|
25
|
-
export { SchemaForm, FormField,
|
|
28
|
+
export { SchemaForm, FormField, FormFieldWrapper, FormTextField, FormTextarea, FormNumberField, FormRangeField, FormToggle, FormSelect, FormCheckboxGroup, FormArray, FormFieldset, FormUISchemaRenderer } from './index.js';
|
|
26
29
|
// Utility functions
|
|
27
30
|
export { isFieldOptionArray, isOneOfArray, normalizeOptions, oneOfToOptions, getSchemaOptions } from './index.js';
|
|
28
31
|
// Field Registry
|
package/dist/form/index.d.ts
CHANGED
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
*/
|
|
60
60
|
export { default as SchemaForm } from '../components/SchemaForm.svelte';
|
|
61
61
|
export { default as FormField } from '../components/form/FormFieldLight.svelte';
|
|
62
|
-
export { default as FormFieldFull } from '../components/form/FormField.svelte';
|
|
63
62
|
export { default as FormFieldWrapper } from '../components/form/FormFieldWrapper.svelte';
|
|
64
63
|
export { default as FormTextField } from '../components/form/FormTextField.svelte';
|
|
65
64
|
export { default as FormTextarea } from '../components/form/FormTextarea.svelte';
|
package/dist/form/index.js
CHANGED
|
@@ -66,8 +66,9 @@ export { default as SchemaForm } from '../components/SchemaForm.svelte';
|
|
|
66
66
|
// ============================================================================
|
|
67
67
|
// Use the light version of FormField that uses the registry for heavy editors
|
|
68
68
|
export { default as FormField } from '../components/form/FormFieldLight.svelte';
|
|
69
|
-
//
|
|
70
|
-
|
|
69
|
+
// NOTE: `FormFieldFull` — the variant that *statically* bundles every editor
|
|
70
|
+
// (including CodeMirror) — is intentionally NOT exported here; it would pull
|
|
71
|
+
// CodeMirror into this light entry. Import it from `@flowdrop/flowdrop/form/full`.
|
|
71
72
|
export { default as FormFieldWrapper } from '../components/form/FormFieldWrapper.svelte';
|
|
72
73
|
export { default as FormTextField } from '../components/form/FormTextField.svelte';
|
|
73
74
|
export { default as FormTextarea } from '../components/form/FormTextarea.svelte';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { WorkflowNode as WorkflowNodeType, NodeMetadata, Workflow, WorkflowEdge, NodeExecutionInfo } from '../types/index.js';
|
|
6
6
|
import { type FlowDropInstance } from '../stores/instanceContainer.svelte.js';
|
|
7
7
|
import type { ApiContext } from '../stores/apiContext.js';
|
|
8
|
+
import type { AuthProvider } from '../types/auth.js';
|
|
8
9
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
9
10
|
export { generateNodeId, extractConfigDefaults } from '../utils/nodeIds.js';
|
|
10
11
|
/**
|
|
@@ -134,7 +135,8 @@ export declare class WorkflowOperationsHelper {
|
|
|
134
135
|
*/
|
|
135
136
|
export declare class ConfigurationHelper {
|
|
136
137
|
/**
|
|
137
|
-
* Configure API endpoints
|
|
138
|
+
* Configure API endpoints (and optionally the auth provider) on the given
|
|
139
|
+
* instance's API context.
|
|
138
140
|
*/
|
|
139
|
-
static configureEndpoints(api: ApiContext, config: EndpointConfig): void;
|
|
141
|
+
static configureEndpoints(api: ApiContext, config: EndpointConfig, authProvider?: AuthProvider): void;
|
|
140
142
|
}
|
|
@@ -63,7 +63,7 @@ export class NodeOperationsHelper {
|
|
|
63
63
|
// Use fallback sample nodes
|
|
64
64
|
return [
|
|
65
65
|
{
|
|
66
|
-
|
|
66
|
+
node_type_id: 'text-input',
|
|
67
67
|
name: 'Text Input',
|
|
68
68
|
category: 'inputs',
|
|
69
69
|
description: 'Simple text input field',
|
|
@@ -73,7 +73,7 @@ export class NodeOperationsHelper {
|
|
|
73
73
|
outputs: [{ id: 'text', name: 'text', type: 'output', dataType: 'string' }]
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
|
|
76
|
+
node_type_id: 'text-output',
|
|
77
77
|
name: 'Text Output',
|
|
78
78
|
category: 'outputs',
|
|
79
79
|
description: 'Display text output',
|
|
@@ -128,7 +128,7 @@ export class NodeOperationsHelper {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
// Generate node ID based on node type and existing nodes
|
|
131
|
-
const newNodeId = generateNodeId(nodeType.
|
|
131
|
+
const newNodeId = generateNodeId(nodeType.node_type_id, existingNodes);
|
|
132
132
|
// All nodes use "universalNode" type
|
|
133
133
|
// UniversalNode component handles internal switching based on metadata and config
|
|
134
134
|
const newNode = {
|
|
@@ -137,8 +137,7 @@ export class NodeOperationsHelper {
|
|
|
137
137
|
position, // Use the position calculated from the drop event
|
|
138
138
|
deletable: true,
|
|
139
139
|
data: {
|
|
140
|
-
...nodeData
|
|
141
|
-
nodeId: newNodeId // Use the same ID
|
|
140
|
+
...nodeData
|
|
142
141
|
}
|
|
143
142
|
};
|
|
144
143
|
return newNode;
|
|
@@ -382,9 +381,10 @@ export class WorkflowOperationsHelper {
|
|
|
382
381
|
*/
|
|
383
382
|
export class ConfigurationHelper {
|
|
384
383
|
/**
|
|
385
|
-
* Configure API endpoints
|
|
384
|
+
* Configure API endpoints (and optionally the auth provider) on the given
|
|
385
|
+
* instance's API context.
|
|
386
386
|
*/
|
|
387
|
-
static configureEndpoints(api, config) {
|
|
388
|
-
api.configure(config);
|
|
387
|
+
static configureEndpoints(api, config, authProvider) {
|
|
388
|
+
api.configure(config, authProvider);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
@@ -271,6 +271,7 @@ export declare const defaultMessages: {
|
|
|
271
271
|
readonly dismissed: "Dismissed";
|
|
272
272
|
readonly applyAll: "Apply All";
|
|
273
273
|
readonly cancel: "Cancel";
|
|
274
|
+
readonly layoutSkipped: "Skipped — AI layout changes are disabled in Settings";
|
|
274
275
|
};
|
|
275
276
|
};
|
|
276
277
|
readonly playground: {
|
|
@@ -284,6 +285,103 @@ export declare const defaultMessages: {
|
|
|
284
285
|
readonly processing: "Processing...";
|
|
285
286
|
readonly viewOnlyHelp: "View-only mode. Workflow execution is controlled externally.";
|
|
286
287
|
};
|
|
288
|
+
readonly commands: {
|
|
289
|
+
readonly unknown: ({ name }: {
|
|
290
|
+
name: string;
|
|
291
|
+
}) => string;
|
|
292
|
+
readonly unknownWithSuggestions: ({ name, suggestions }: {
|
|
293
|
+
name: string;
|
|
294
|
+
suggestions: string;
|
|
295
|
+
}) => string;
|
|
296
|
+
readonly unavailable: ({ name }: {
|
|
297
|
+
name: string;
|
|
298
|
+
}) => string;
|
|
299
|
+
readonly needsSession: ({ name }: {
|
|
300
|
+
name: string;
|
|
301
|
+
}) => string;
|
|
302
|
+
readonly helpHeading: "Available commands";
|
|
303
|
+
readonly helpEscapeHint: "To send a message starting with a slash, type it twice: //like this";
|
|
304
|
+
readonly catalog: {
|
|
305
|
+
readonly help: {
|
|
306
|
+
readonly usage: "/help";
|
|
307
|
+
readonly summary: "List the commands available here";
|
|
308
|
+
};
|
|
309
|
+
readonly run: {
|
|
310
|
+
readonly usage: "/run [--input=value ...]";
|
|
311
|
+
readonly summary: "Start a run, optionally with named inputs";
|
|
312
|
+
};
|
|
313
|
+
readonly new: {
|
|
314
|
+
readonly usage: "/new";
|
|
315
|
+
readonly summary: "Start a new session";
|
|
316
|
+
};
|
|
317
|
+
readonly stop: {
|
|
318
|
+
readonly usage: "/stop";
|
|
319
|
+
readonly summary: "Stop what this session is running";
|
|
320
|
+
};
|
|
321
|
+
readonly reset: {
|
|
322
|
+
readonly usage: "/reset";
|
|
323
|
+
readonly summary: "Reset a stuck session to idle";
|
|
324
|
+
};
|
|
325
|
+
readonly delete: {
|
|
326
|
+
readonly usage: "/delete";
|
|
327
|
+
readonly summary: "Delete the current session";
|
|
328
|
+
};
|
|
329
|
+
readonly pause: {
|
|
330
|
+
readonly usage: "/pause [reason]";
|
|
331
|
+
readonly summary: "Ask the active run to pause";
|
|
332
|
+
};
|
|
333
|
+
readonly resume: {
|
|
334
|
+
readonly usage: "/resume [reason]";
|
|
335
|
+
readonly summary: "Resume the paused run";
|
|
336
|
+
};
|
|
337
|
+
readonly cancel: {
|
|
338
|
+
readonly usage: "/cancel [reason]";
|
|
339
|
+
readonly summary: "Cancel the active run — cannot be undone";
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
readonly dismiss: "Dismiss";
|
|
343
|
+
readonly stopped: "Execution stopped";
|
|
344
|
+
readonly reset: "Session reset";
|
|
345
|
+
readonly created: "New session created";
|
|
346
|
+
readonly deleted: "Session deleted";
|
|
347
|
+
readonly failed: ({ name, error }: {
|
|
348
|
+
name: string;
|
|
349
|
+
error: string;
|
|
350
|
+
}) => string;
|
|
351
|
+
readonly needsRun: ({ name }: {
|
|
352
|
+
name: string;
|
|
353
|
+
}) => string;
|
|
354
|
+
readonly signalPending: ({ signal }: {
|
|
355
|
+
signal: string;
|
|
356
|
+
}) => string;
|
|
357
|
+
readonly pauseRequested: "Pause requested — finishing the current step";
|
|
358
|
+
readonly resumeRequested: "Resume requested";
|
|
359
|
+
readonly cancelRequested: "Cancel requested — finishing the current step";
|
|
360
|
+
readonly refusedTerminal: ({ name }: {
|
|
361
|
+
name: string;
|
|
362
|
+
}) => string;
|
|
363
|
+
readonly refusedDuplicate: "A signal is already pending for this run";
|
|
364
|
+
readonly refusedNotPaused: "Nothing to resume — this run is not paused";
|
|
365
|
+
readonly refusedNotFound: "That run no longer exists";
|
|
366
|
+
readonly refusedForbidden: ({ name }: {
|
|
367
|
+
name: string;
|
|
368
|
+
}) => string;
|
|
369
|
+
readonly refusedOther: ({ name, error }: {
|
|
370
|
+
name: string;
|
|
371
|
+
error: string;
|
|
372
|
+
}) => string;
|
|
373
|
+
readonly runStarted: "Run started";
|
|
374
|
+
readonly runInvalidInput: ({ error }: {
|
|
375
|
+
error: string;
|
|
376
|
+
}) => string;
|
|
377
|
+
readonly runInvalidWorkflow: ({ error }: {
|
|
378
|
+
error: string;
|
|
379
|
+
}) => string;
|
|
380
|
+
readonly runInvalidWorkflowDetail: ({ locator, message }: {
|
|
381
|
+
locator: string;
|
|
382
|
+
message: string;
|
|
383
|
+
}) => string;
|
|
384
|
+
};
|
|
287
385
|
readonly actions: {
|
|
288
386
|
readonly stopTitle: "Stop execution";
|
|
289
387
|
readonly stop: "Stop";
|
|
@@ -249,7 +249,8 @@ export const defaultMessages = {
|
|
|
249
249
|
applied: 'Applied',
|
|
250
250
|
dismissed: 'Dismissed',
|
|
251
251
|
applyAll: 'Apply All',
|
|
252
|
-
cancel: 'Cancel'
|
|
252
|
+
cancel: 'Cancel',
|
|
253
|
+
layoutSkipped: 'Skipped — AI layout changes are disabled in Settings'
|
|
253
254
|
}
|
|
254
255
|
},
|
|
255
256
|
playground: {
|
|
@@ -263,6 +264,62 @@ export const defaultMessages = {
|
|
|
263
264
|
processing: 'Processing...',
|
|
264
265
|
viewOnlyHelp: 'View-only mode. Workflow execution is controlled externally.'
|
|
265
266
|
},
|
|
267
|
+
// Slash commands — the composer's out-of-band control lane. Feedback is
|
|
268
|
+
// transient UI, never a session message: control traffic must not enter
|
|
269
|
+
// conversation history, or it feeds back into the next turn's input.
|
|
270
|
+
commands: {
|
|
271
|
+
unknown: ({ name }) => `Unknown command: /${name}`,
|
|
272
|
+
unknownWithSuggestions: ({ name, suggestions }) => `Unknown command: /${name}. Did you mean ${suggestions}?`,
|
|
273
|
+
unavailable: ({ name }) => `/${name} is not supported by this backend`,
|
|
274
|
+
needsSession: ({ name }) => `/${name} needs an active session`,
|
|
275
|
+
helpHeading: 'Available commands',
|
|
276
|
+
helpEscapeHint: 'To send a message starting with a slash, type it twice: //like this',
|
|
277
|
+
// Display text for each command, shown by `/help` and by the palette.
|
|
278
|
+
// Lives here rather than in the command registry so translators reach it
|
|
279
|
+
// through the same channel as everything else; the registry keeps only
|
|
280
|
+
// the structural facts (does it take arguments, is it available).
|
|
281
|
+
catalog: {
|
|
282
|
+
help: { usage: '/help', summary: 'List the commands available here' },
|
|
283
|
+
run: {
|
|
284
|
+
usage: '/run [--input=value ...]',
|
|
285
|
+
summary: 'Start a run, optionally with named inputs'
|
|
286
|
+
},
|
|
287
|
+
new: { usage: '/new', summary: 'Start a new session' },
|
|
288
|
+
stop: { usage: '/stop', summary: 'Stop what this session is running' },
|
|
289
|
+
reset: { usage: '/reset', summary: 'Reset a stuck session to idle' },
|
|
290
|
+
delete: { usage: '/delete', summary: 'Delete the current session' },
|
|
291
|
+
pause: { usage: '/pause [reason]', summary: 'Ask the active run to pause' },
|
|
292
|
+
resume: { usage: '/resume [reason]', summary: 'Resume the paused run' },
|
|
293
|
+
cancel: { usage: '/cancel [reason]', summary: 'Cancel the active run — cannot be undone' }
|
|
294
|
+
},
|
|
295
|
+
dismiss: 'Dismiss',
|
|
296
|
+
stopped: 'Execution stopped',
|
|
297
|
+
reset: 'Session reset',
|
|
298
|
+
created: 'New session created',
|
|
299
|
+
deleted: 'Session deleted',
|
|
300
|
+
failed: ({ name, error }) => `/${name} failed: ${error}`,
|
|
301
|
+
// Pipeline signals. Wording matters: a backend acknowledges a signal
|
|
302
|
+
// before acting on it, so these say "requested" and let the status poll
|
|
303
|
+
// report the real state. Claiming "Paused" on acknowledgement would be
|
|
304
|
+
// wrong exactly when the current step is slow.
|
|
305
|
+
needsRun: ({ name }) => `/${name} needs an active run`,
|
|
306
|
+
signalPending: ({ signal }) => `A ${signal} is already pending for this run`,
|
|
307
|
+
pauseRequested: 'Pause requested — finishing the current step',
|
|
308
|
+
resumeRequested: 'Resume requested',
|
|
309
|
+
cancelRequested: 'Cancel requested — finishing the current step',
|
|
310
|
+
refusedTerminal: ({ name }) => `Cannot ${name}: the run already finished`,
|
|
311
|
+
refusedDuplicate: 'A signal is already pending for this run',
|
|
312
|
+
refusedNotPaused: 'Nothing to resume — this run is not paused',
|
|
313
|
+
refusedNotFound: 'That run no longer exists',
|
|
314
|
+
refusedForbidden: ({ name }) => `You do not have permission to ${name} this run`,
|
|
315
|
+
refusedOther: ({ name, error }) => `/${name} refused: ${error}`,
|
|
316
|
+
// Launch. Bad inputs and an invalid workflow are separated on purpose —
|
|
317
|
+
// one is the caller's to fix, the other is an authoring problem.
|
|
318
|
+
runStarted: 'Run started',
|
|
319
|
+
runInvalidInput: ({ error }) => `Cannot start: ${error}`,
|
|
320
|
+
runInvalidWorkflow: ({ error }) => `Cannot start — this workflow has errors: ${error}`,
|
|
321
|
+
runInvalidWorkflowDetail: ({ locator, message }) => locator ? ` • ${locator}: ${message}` : ` • ${message}`
|
|
322
|
+
},
|
|
266
323
|
actions: {
|
|
267
324
|
stopTitle: 'Stop execution',
|
|
268
325
|
stop: 'Stop',
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Messages module — typed, overridable, translation-ready user-facing strings.
|
|
3
3
|
*
|
|
4
4
|
* See `./defaults.ts` for the canonical shape, `./context.ts` for the runtime
|
|
5
|
-
* plumbing, and the i18n guide in
|
|
5
|
+
* plumbing, and the i18n guide in the docs site (`.docs/`) for consumer recipes.
|
|
6
6
|
*/
|
|
7
7
|
export { defaultMessages } from './defaults.js';
|
|
8
8
|
export { mergeMessages } from './merge.js';
|
package/dist/messages/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Messages module — typed, overridable, translation-ready user-facing strings.
|
|
3
3
|
*
|
|
4
4
|
* See `./defaults.ts` for the canonical shape, `./context.ts` for the runtime
|
|
5
|
-
* plumbing, and the i18n guide in
|
|
5
|
+
* plumbing, and the i18n guide in the docs site (`.docs/`) for consumer recipes.
|
|
6
6
|
*/
|
|
7
7
|
export { defaultMessages } from './defaults.js';
|
|
8
8
|
export { mergeMessages } from './merge.js';
|