@d34dman/flowdrop 0.0.56 → 0.0.58

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 (83) hide show
  1. package/README.md +4 -4
  2. package/dist/adapters/WorkflowAdapter.d.ts +2 -1
  3. package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +96 -0
  4. package/dist/adapters/agentspec/AgentSpecAdapter.js +663 -0
  5. package/dist/adapters/agentspec/agentAdapter.d.ts +59 -0
  6. package/dist/adapters/agentspec/agentAdapter.js +91 -0
  7. package/dist/adapters/agentspec/autoLayout.d.ts +34 -0
  8. package/dist/adapters/agentspec/autoLayout.js +127 -0
  9. package/dist/adapters/agentspec/componentTypeDefaults.d.ts +73 -0
  10. package/dist/adapters/agentspec/componentTypeDefaults.js +238 -0
  11. package/dist/adapters/agentspec/defaultNodeTypes.d.ts +53 -0
  12. package/dist/adapters/agentspec/defaultNodeTypes.js +561 -0
  13. package/dist/adapters/agentspec/index.d.ts +37 -0
  14. package/dist/adapters/agentspec/index.js +39 -0
  15. package/dist/adapters/agentspec/validator.d.ts +34 -0
  16. package/dist/adapters/agentspec/validator.js +169 -0
  17. package/dist/components/App.svelte +57 -13
  18. package/dist/components/ConfigForm.svelte +46 -12
  19. package/dist/components/ConfigForm.svelte.d.ts +8 -0
  20. package/dist/components/NodeSidebar.svelte +20 -8
  21. package/dist/components/NodeSidebar.svelte.d.ts +2 -1
  22. package/dist/components/SchemaForm.svelte +34 -12
  23. package/dist/components/SchemaForm.svelte.d.ts +8 -0
  24. package/dist/components/WorkflowEditor.svelte +14 -13
  25. package/dist/components/form/FormFieldset.svelte +142 -0
  26. package/dist/components/form/FormFieldset.svelte.d.ts +11 -0
  27. package/dist/components/form/FormMarkdownEditor.svelte +546 -422
  28. package/dist/components/form/FormMarkdownEditor.svelte.d.ts +2 -0
  29. package/dist/components/form/FormUISchemaRenderer.svelte +136 -0
  30. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +32 -0
  31. package/dist/components/form/index.d.ts +2 -0
  32. package/dist/components/form/index.js +3 -0
  33. package/dist/components/form/types.d.ts +1 -1
  34. package/dist/components/nodes/WorkflowNode.svelte +1 -2
  35. package/dist/config/agentSpecEndpoints.d.ts +70 -0
  36. package/dist/config/agentSpecEndpoints.js +65 -0
  37. package/dist/config/endpoints.d.ts +6 -0
  38. package/dist/core/index.d.ts +29 -3
  39. package/dist/core/index.js +31 -1
  40. package/dist/form/code.js +6 -1
  41. package/dist/form/fieldRegistry.d.ts +79 -15
  42. package/dist/form/fieldRegistry.js +104 -49
  43. package/dist/form/full.d.ts +2 -2
  44. package/dist/form/full.js +2 -2
  45. package/dist/form/index.d.ts +5 -3
  46. package/dist/form/index.js +9 -2
  47. package/dist/form/markdown.d.ts +3 -3
  48. package/dist/form/markdown.js +8 -4
  49. package/dist/helpers/workflowEditorHelper.d.ts +24 -0
  50. package/dist/helpers/workflowEditorHelper.js +55 -0
  51. package/dist/index.d.ts +2 -2
  52. package/dist/index.js +2 -2
  53. package/dist/registry/BaseRegistry.d.ts +92 -0
  54. package/dist/registry/BaseRegistry.js +124 -0
  55. package/dist/registry/builtinFormats.d.ts +23 -0
  56. package/dist/registry/builtinFormats.js +70 -0
  57. package/dist/registry/builtinNodes.js +4 -0
  58. package/dist/registry/index.d.ts +2 -1
  59. package/dist/registry/index.js +2 -0
  60. package/dist/registry/nodeComponentRegistry.d.ts +26 -57
  61. package/dist/registry/nodeComponentRegistry.js +29 -82
  62. package/dist/registry/workflowFormatRegistry.d.ts +122 -0
  63. package/dist/registry/workflowFormatRegistry.js +96 -0
  64. package/dist/schema/index.d.ts +23 -0
  65. package/dist/schema/index.js +23 -0
  66. package/dist/services/agentSpecExecutionService.d.ts +106 -0
  67. package/dist/services/agentSpecExecutionService.js +333 -0
  68. package/dist/stores/portCoordinateStore.js +1 -4
  69. package/dist/stores/workflowStore.d.ts +3 -0
  70. package/dist/stores/workflowStore.js +3 -0
  71. package/dist/svelte-app.d.ts +4 -0
  72. package/dist/svelte-app.js +9 -1
  73. package/dist/types/agentspec.d.ts +318 -0
  74. package/dist/types/agentspec.js +48 -0
  75. package/dist/types/events.d.ts +28 -1
  76. package/dist/types/index.d.ts +31 -0
  77. package/dist/types/index.js +5 -0
  78. package/dist/types/uischema.d.ts +144 -0
  79. package/dist/types/uischema.js +51 -0
  80. package/dist/utils/uischema.d.ts +52 -0
  81. package/dist/utils/uischema.js +88 -0
  82. package/package.json +231 -225
  83. package/schemas/v1/workflow.schema.json +952 -0
@@ -21,6 +21,8 @@ interface Props {
21
21
  autosaveDelay?: number;
22
22
  /** Whether the field is disabled (read-only) */
23
23
  disabled?: boolean;
24
+ /** Whether to use dark theme */
25
+ darkTheme?: boolean;
24
26
  /** ARIA description ID */
25
27
  ariaDescribedBy?: string;
26
28
  /** Callback when value changes */
@@ -0,0 +1,136 @@
1
+ <!--
2
+ FormUISchemaRenderer Component
3
+ Recursively renders UISchema elements: VerticalLayout, Group, and Control.
4
+
5
+ This component bridges the UISchema tree and the existing FormField components.
6
+ It resolves Control scopes to property keys and delegates field rendering to FormField.
7
+
8
+ Rendering logic:
9
+ - Control -> resolve scope to key, render FormField
10
+ - VerticalLayout -> vertical flex container with recursive children
11
+ - Group -> FormFieldset wrapping recursive children
12
+ -->
13
+
14
+ <script lang="ts">
15
+ import type { UISchemaElement } from '../../types/uischema.js';
16
+ import type { ConfigSchema, WorkflowNode, WorkflowEdge, AuthProvider } from '../../types/index.js';
17
+ import type { FieldSchema } from './types.js';
18
+ import { resolveScopeToKey } from '../../utils/uischema.js';
19
+ import FormField from './FormField.svelte';
20
+ import FormFieldset from './FormFieldset.svelte';
21
+ import Self from './FormUISchemaRenderer.svelte';
22
+
23
+ interface Props {
24
+ /** The UISchema element to render */
25
+ element: UISchemaElement;
26
+ /** The data schema (for resolving field definitions) */
27
+ schema: ConfigSchema;
28
+ /** Current form values */
29
+ values: Record<string, unknown>;
30
+ /** Required field keys from the schema */
31
+ requiredFields?: string[];
32
+ /** Base animation index for staggered animations */
33
+ animationIndexBase?: number;
34
+ /** Callback when a field value changes */
35
+ onFieldChange: (key: string, value: unknown) => void;
36
+ /** Convert a property to FieldSchema (handles template variable injection etc.) */
37
+ toFieldSchema: (property: Record<string, unknown>) => FieldSchema;
38
+ /** Current workflow node (optional, passed through to FormField) */
39
+ node?: WorkflowNode;
40
+ /** All workflow nodes (optional, passed through to FormField) */
41
+ nodes?: WorkflowNode[];
42
+ /** All workflow edges (optional, passed through to FormField) */
43
+ edges?: WorkflowEdge[];
44
+ /** Workflow ID (optional, passed through to FormField) */
45
+ workflowId?: string;
46
+ /** Auth provider (optional, passed through to FormField) */
47
+ authProvider?: AuthProvider;
48
+ }
49
+
50
+ let {
51
+ element,
52
+ schema,
53
+ values,
54
+ requiredFields = [],
55
+ animationIndexBase = 0,
56
+ onFieldChange,
57
+ toFieldSchema,
58
+ node,
59
+ nodes,
60
+ edges,
61
+ workflowId,
62
+ authProvider
63
+ }: Props = $props();
64
+
65
+ function isRequired(key: string): boolean {
66
+ return requiredFields.includes(key);
67
+ }
68
+ </script>
69
+
70
+ {#if element.type === 'Control'}
71
+ {@const key = resolveScopeToKey(element.scope)}
72
+ {#if key && schema.properties[key]}
73
+ {@const fieldSchema = toFieldSchema(schema.properties[key] as Record<string, unknown>)}
74
+ <FormField
75
+ fieldKey={key}
76
+ schema={fieldSchema}
77
+ value={values[key]}
78
+ required={isRequired(key)}
79
+ animationIndex={animationIndexBase}
80
+ {node}
81
+ {nodes}
82
+ {edges}
83
+ {workflowId}
84
+ {authProvider}
85
+ onChange={(val) => onFieldChange(key, val)}
86
+ />
87
+ {/if}
88
+ {:else if element.type === 'VerticalLayout'}
89
+ <div class="form-uischema-layout form-uischema-layout--vertical">
90
+ {#each element.elements as child, idx (idx)}
91
+ <Self
92
+ element={child}
93
+ {schema}
94
+ {values}
95
+ {requiredFields}
96
+ animationIndexBase={animationIndexBase + idx}
97
+ {onFieldChange}
98
+ {toFieldSchema}
99
+ {node}
100
+ {nodes}
101
+ {edges}
102
+ {workflowId}
103
+ {authProvider}
104
+ />
105
+ {/each}
106
+ </div>
107
+ {:else if element.type === 'Group'}
108
+ <FormFieldset group={element}>
109
+ <div class="form-uischema-layout form-uischema-layout--vertical">
110
+ {#each element.elements as child, idx (idx)}
111
+ <Self
112
+ element={child}
113
+ {schema}
114
+ {values}
115
+ {requiredFields}
116
+ animationIndexBase={animationIndexBase + idx}
117
+ {onFieldChange}
118
+ {toFieldSchema}
119
+ {node}
120
+ {nodes}
121
+ {edges}
122
+ {workflowId}
123
+ {authProvider}
124
+ />
125
+ {/each}
126
+ </div>
127
+ </FormFieldset>
128
+ {/if}
129
+
130
+ <style>
131
+ .form-uischema-layout--vertical {
132
+ display: flex;
133
+ flex-direction: column;
134
+ gap: var(--fd-space-5);
135
+ }
136
+ </style>
@@ -0,0 +1,32 @@
1
+ import type { UISchemaElement } from '../../types/uischema.js';
2
+ import type { ConfigSchema, WorkflowNode, WorkflowEdge, AuthProvider } from '../../types/index.js';
3
+ import type { FieldSchema } from './types.js';
4
+ interface Props {
5
+ /** The UISchema element to render */
6
+ element: UISchemaElement;
7
+ /** The data schema (for resolving field definitions) */
8
+ schema: ConfigSchema;
9
+ /** Current form values */
10
+ values: Record<string, unknown>;
11
+ /** Required field keys from the schema */
12
+ requiredFields?: string[];
13
+ /** Base animation index for staggered animations */
14
+ animationIndexBase?: number;
15
+ /** Callback when a field value changes */
16
+ onFieldChange: (key: string, value: unknown) => void;
17
+ /** Convert a property to FieldSchema (handles template variable injection etc.) */
18
+ toFieldSchema: (property: Record<string, unknown>) => FieldSchema;
19
+ /** Current workflow node (optional, passed through to FormField) */
20
+ node?: WorkflowNode;
21
+ /** All workflow nodes (optional, passed through to FormField) */
22
+ nodes?: WorkflowNode[];
23
+ /** All workflow edges (optional, passed through to FormField) */
24
+ edges?: WorkflowEdge[];
25
+ /** Workflow ID (optional, passed through to FormField) */
26
+ workflowId?: string;
27
+ /** Auth provider (optional, passed through to FormField) */
28
+ authProvider?: AuthProvider;
29
+ }
30
+ declare const FormUISchemaRenderer: import("svelte").Component<Props, {}, "">;
31
+ type FormUISchemaRenderer = ReturnType<typeof FormUISchemaRenderer>;
32
+ export default FormUISchemaRenderer;
@@ -44,4 +44,6 @@ export { default as FormCodeEditor } from './FormCodeEditor.svelte';
44
44
  export { default as FormMarkdownEditor } from './FormMarkdownEditor.svelte';
45
45
  export { default as FormTemplateEditor } from './FormTemplateEditor.svelte';
46
46
  export { default as FormAutocomplete } from './FormAutocomplete.svelte';
47
+ export { default as FormFieldset } from './FormFieldset.svelte';
48
+ export { default as FormUISchemaRenderer } from './FormUISchemaRenderer.svelte';
47
49
  export { createTemplateAutocomplete } from './templateAutocomplete.js';
@@ -48,5 +48,8 @@ export { default as FormCodeEditor } from './FormCodeEditor.svelte';
48
48
  export { default as FormMarkdownEditor } from './FormMarkdownEditor.svelte';
49
49
  export { default as FormTemplateEditor } from './FormTemplateEditor.svelte';
50
50
  export { default as FormAutocomplete } from './FormAutocomplete.svelte';
51
+ // UISchema rendering components
52
+ export { default as FormFieldset } from './FormFieldset.svelte';
53
+ export { default as FormUISchemaRenderer } from './FormUISchemaRenderer.svelte';
51
54
  // Template autocomplete utilities
52
55
  export { createTemplateAutocomplete } from './templateAutocomplete.js';
@@ -194,7 +194,7 @@ export interface CodeEditorFieldProps extends BaseFieldProps {
194
194
  onChange: (value: unknown) => void;
195
195
  }
196
196
  /**
197
- * Properties for markdown editor fields (SimpleMDE-based)
197
+ * Properties for markdown editor fields (CodeMirror 6-based)
198
198
  */
199
199
  export interface MarkdownEditorFieldProps extends BaseFieldProps {
200
200
  /** Current value (markdown string) */
@@ -195,8 +195,7 @@
195
195
  </h3>
196
196
 
197
197
  <!-- Status Indicators -->
198
- <div class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center">
199
- </div>
198
+ <div class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center"></div>
200
199
  </div>
201
200
  <!-- Node Description - line-height 20px so header grows in steps of 10 -->
202
201
  <p
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Agent Spec Runtime Endpoint Configuration
3
+ *
4
+ * Defines the API endpoints for connecting to Agent Spec runtimes
5
+ * (WayFlow, PyAgentSpec, or other compatible runtimes).
6
+ */
7
+ /**
8
+ * Agent Spec runtime endpoint configuration.
9
+ *
10
+ * Separate from the main FlowDrop EndpointConfig because the Agent Spec
11
+ * runtime is an independent service with its own base URL and auth.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const config: AgentSpecEndpointConfig = {
16
+ * baseUrl: 'http://localhost:8000',
17
+ * endpoints: { ...defaultAgentSpecEndpoints.endpoints },
18
+ * auth: { type: 'bearer', token: 'my-api-key' }
19
+ * };
20
+ * ```
21
+ */
22
+ export interface AgentSpecEndpointConfig {
23
+ /** Base URL for the Agent Spec runtime */
24
+ baseUrl: string;
25
+ endpoints: {
26
+ /** POST — Execute a flow (body: AgentSpecFlow JSON) */
27
+ execute: string;
28
+ /** GET — Get execution status (params: {id}) */
29
+ status: string;
30
+ /** POST — Cancel a running execution (params: {id}) */
31
+ cancel: string;
32
+ /** GET — Get execution results (params: {id}) */
33
+ results: string;
34
+ /** WS — WebSocket for streaming execution updates (params: {id}) */
35
+ stream: string;
36
+ /** POST — Validate a flow specification (body: AgentSpecFlow JSON) */
37
+ validate: string;
38
+ /** GET — List available agents on the runtime */
39
+ agents: string;
40
+ /** GET — List available tools on the runtime */
41
+ tools: string;
42
+ /** GET — Runtime health check */
43
+ health: string;
44
+ };
45
+ /** Authentication for the runtime */
46
+ auth?: {
47
+ type: 'none' | 'bearer' | 'api_key';
48
+ token?: string;
49
+ apiKey?: string;
50
+ };
51
+ /** Request timeout in milliseconds */
52
+ timeout?: number;
53
+ }
54
+ /**
55
+ * Default Agent Spec runtime endpoints.
56
+ * Targets a local WayFlow/PyAgentSpec instance on port 8000.
57
+ */
58
+ export declare const defaultAgentSpecEndpoints: AgentSpecEndpointConfig;
59
+ /**
60
+ * Create Agent Spec endpoint configuration with custom base URL.
61
+ */
62
+ export declare function createAgentSpecEndpointConfig(baseUrl: string, overrides?: Partial<AgentSpecEndpointConfig>): AgentSpecEndpointConfig;
63
+ /**
64
+ * Build a full URL for an Agent Spec runtime endpoint.
65
+ */
66
+ export declare function buildAgentSpecUrl(config: AgentSpecEndpointConfig, endpointPath: string, params?: Record<string, string>): string;
67
+ /**
68
+ * Get authentication headers for Agent Spec runtime requests.
69
+ */
70
+ export declare function getAgentSpecAuthHeaders(config: AgentSpecEndpointConfig): Record<string, string>;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Agent Spec Runtime Endpoint Configuration
3
+ *
4
+ * Defines the API endpoints for connecting to Agent Spec runtimes
5
+ * (WayFlow, PyAgentSpec, or other compatible runtimes).
6
+ */
7
+ /**
8
+ * Default Agent Spec runtime endpoints.
9
+ * Targets a local WayFlow/PyAgentSpec instance on port 8000.
10
+ */
11
+ export const defaultAgentSpecEndpoints = {
12
+ baseUrl: 'http://localhost:8000',
13
+ endpoints: {
14
+ execute: '/flows/execute',
15
+ status: '/executions/{id}',
16
+ cancel: '/executions/{id}/cancel',
17
+ results: '/executions/{id}/results',
18
+ stream: '/executions/{id}/stream',
19
+ validate: '/flows/validate',
20
+ agents: '/agents',
21
+ tools: '/tools',
22
+ health: '/health'
23
+ },
24
+ timeout: 60000
25
+ };
26
+ /**
27
+ * Create Agent Spec endpoint configuration with custom base URL.
28
+ */
29
+ export function createAgentSpecEndpointConfig(baseUrl, overrides) {
30
+ return {
31
+ ...defaultAgentSpecEndpoints,
32
+ baseUrl: baseUrl.replace(/\/$/, ''),
33
+ ...overrides
34
+ };
35
+ }
36
+ /**
37
+ * Build a full URL for an Agent Spec runtime endpoint.
38
+ */
39
+ export function buildAgentSpecUrl(config, endpointPath, params) {
40
+ let url = endpointPath;
41
+ if (params) {
42
+ for (const [key, value] of Object.entries(params)) {
43
+ url = url.replace(`{${key}}`, encodeURIComponent(value));
44
+ }
45
+ }
46
+ if (!url.startsWith('http') && !url.startsWith('//')) {
47
+ url = `${config.baseUrl}${url.startsWith('/') ? url : `/${url}`}`;
48
+ }
49
+ return url;
50
+ }
51
+ /**
52
+ * Get authentication headers for Agent Spec runtime requests.
53
+ */
54
+ export function getAgentSpecAuthHeaders(config) {
55
+ const headers = {
56
+ 'Content-Type': 'application/json'
57
+ };
58
+ if (config.auth?.type === 'bearer' && config.auth.token) {
59
+ headers['Authorization'] = `Bearer ${config.auth.token}`;
60
+ }
61
+ else if (config.auth?.type === 'api_key' && config.auth.apiKey) {
62
+ headers['X-API-Key'] = config.auth.apiKey;
63
+ }
64
+ return headers;
65
+ }
@@ -2,6 +2,7 @@
2
2
  * FlowDrop Endpoint Configuration
3
3
  * Provides configurable endpoints for all API actions
4
4
  */
5
+ import type { AgentSpecEndpointConfig } from './agentSpecEndpoints.js';
5
6
  export interface EndpointConfig {
6
7
  /** Base URL for all endpoints */
7
8
  baseUrl: string;
@@ -88,6 +89,11 @@ export interface EndpointConfig {
88
89
  version: string;
89
90
  };
90
91
  };
92
+ /**
93
+ * Optional Agent Spec runtime configuration.
94
+ * When provided, enables Agent Spec execution features.
95
+ */
96
+ agentSpec?: AgentSpecEndpointConfig;
91
97
  /** HTTP method overrides for specific endpoints */
92
98
  methods?: {
93
99
  [key: string]: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * This module exports types, utilities, and lightweight functionality
5
5
  * with zero heavy dependencies. Safe to import without bundling
6
- * @xyflow/svelte, codemirror, easymde, or marked.
6
+ * @xyflow/svelte, codemirror, or marked.
7
7
  *
8
8
  * @module core
9
9
  *
@@ -14,12 +14,20 @@
14
14
  * import { getStatusColor, createDefaultExecutionInfo } from "@d34dman/flowdrop/core";
15
15
  * ```
16
16
  */
17
- 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 } from '../types/index.js';
17
+ export type { WorkflowFormat, BuiltinWorkflowFormat } from '../types/index.js';
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';
20
+ export { isUISchemaControl, isUISchemaVerticalLayout, isUISchemaGroup } from '../types/index.js';
18
21
  export type { WorkflowEditorConfig, EditorFeatures, UIConfig, APIConfig, ExecutionConfig, StorageConfig } from '../types/config.js';
19
22
  export type { AuthProvider, StaticAuthConfig, CallbackAuthConfig } from '../types/auth.js';
20
23
  export type { WorkflowChangeType, FlowDropEventHandlers, FlowDropFeatures } from '../types/events.js';
21
24
  export type { FieldSchema, FieldType, FieldFormat, FieldOption, SchemaFormProps, BaseFieldProps, TextFieldProps, TextareaFieldProps, NumberFieldProps, ToggleFieldProps, RangeFieldProps, SelectFieldProps, CheckboxGroupFieldProps, ArrayFieldProps, CodeEditorFieldProps, MarkdownEditorFieldProps, TemplateEditorFieldProps, FormFieldFactoryProps, FormFieldWrapperProps } from '../components/form/types.js';
22
- export type { NodeComponentProps, NodeComponentRegistration, NodeComponentCategory, StatusPosition, StatusSize, NodeRegistrationFilter, FlowDropPluginConfig, PluginNodeDefinition, PluginRegistrationResult } from '../registry/index.js';
25
+ export { BaseRegistry } from '../registry/BaseRegistry.js';
26
+ export type { NodeComponentProps, NodeTypeInfo, NodeComponentRegistration, NodeComponentCategory, StatusPosition, StatusSize, NodeRegistrationFilter, FlowDropPluginConfig, PluginNodeDefinition, PluginRegistrationResult } from '../registry/index.js';
27
+ export type { FieldMatcherRegistration } from '../form/fieldRegistry.js';
28
+ export { workflowFormatRegistry } from '../registry/workflowFormatRegistry.js';
29
+ export type { WorkflowFormatAdapter, FormatValidationResult } from '../registry/workflowFormatRegistry.js';
30
+ export { registerBuiltinFormats, areBuiltinFormatsRegistered, resetBuiltinFormatRegistration } from '../registry/builtinFormats.js';
23
31
  export type { ToastType, ToastOptions } from '../services/toastService.js';
24
32
  export type { DynamicSchemaResult } from '../services/dynamicSchemaService.js';
25
33
  export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse } from '../types/playground.js';
@@ -37,8 +45,26 @@ export * from '../utils/config.js';
37
45
  export * from '../utils/nodeTypes.js';
38
46
  export { isLoopbackEdge, isValidLoopbackCycle, hasCycles, hasInvalidCycles } from '../utils/connections.js';
39
47
  export { isFieldOptionArray, normalizeOptions } from '../components/form/types.js';
48
+ export { resolveScopeToKey, keyToScope, generateDefaultUISchema, collectReferencedKeys } from '../utils/uischema.js';
40
49
  export { DEFAULT_PORT_CONFIG } from '../config/defaultPortConfig.js';
41
50
  export { defaultEndpointConfig, createEndpointConfig } from '../config/endpoints.js';
42
51
  export * from '../adapters/WorkflowAdapter.js';
52
+ export type { AgentSpecNodeComponentType, AgentSpecToolComponentType, AgentSpecComponentType, AgentSpecProperty, AgentSpecNodeBase, AgentSpecStartNode, AgentSpecEndNode, AgentSpecLLMNode, AgentSpecAPINode, AgentSpecAgentNode, AgentSpecFlowNode, AgentSpecMapNode, AgentSpecBranchingNode, AgentSpecToolNode, AgentSpecNode, AgentSpecBranch, AgentSpecControlFlowEdge, AgentSpecDataFlowEdge, AgentSpecFlow, AgentSpecToolBase, AgentSpecServerTool, AgentSpecClientTool, AgentSpecRemoteTool, AgentSpecTool, AgentSpecLLMConfig, AgentSpecAgent, AgentSpecDocument } from '../types/agentspec.js';
53
+ export { COMPONENT_REF_PREFIX, isComponentRef, extractComponentRefId, createComponentRef } from '../types/agentspec.js';
54
+ export { getAgentSpecNodeMetadata, getDefaultAgentSpecNodeTypes, createAgentSpecNodeMetadata } from '../adapters/agentspec/defaultNodeTypes.js';
55
+ export { getComponentTypeDefaults, extractComponentType, isAgentSpecNodeId, AGENTSPEC_NAMESPACE } from '../adapters/agentspec/componentTypeDefaults.js';
56
+ export type { ComponentTypeDefaults } from '../adapters/agentspec/componentTypeDefaults.js';
57
+ export { AgentSpecAdapter } from '../adapters/agentspec/AgentSpecAdapter.js';
58
+ export { AgentSpecAgentAdapter } from '../adapters/agentspec/agentAdapter.js';
59
+ export type { AgentConfig, AgentSpecImportResult } from '../adapters/agentspec/agentAdapter.js';
60
+ export { validateForAgentSpecExport, validateAgentSpecFlow } from '../adapters/agentspec/validator.js';
61
+ export type { AgentSpecValidationResult } from '../adapters/agentspec/validator.js';
62
+ export { computeAutoLayout } from '../adapters/agentspec/autoLayout.js';
63
+ export type { AutoLayoutConfig } from '../adapters/agentspec/autoLayout.js';
64
+ export type { AgentSpecEndpointConfig } from '../config/agentSpecEndpoints.js';
65
+ export { defaultAgentSpecEndpoints, createAgentSpecEndpointConfig, buildAgentSpecUrl, getAgentSpecAuthHeaders } from '../config/agentSpecEndpoints.js';
66
+ export { AgentSpecExecutionService, agentSpecExecutionService } from '../services/agentSpecExecutionService.js';
67
+ export type { AgentSpecExecutionHandle } from '../services/agentSpecExecutionService.js';
68
+ export { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '../schema/index.js';
43
69
  export type { ThemePreference, ResolvedTheme } from '../stores/settingsStore.js';
44
70
  export { theme, resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.js';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * This module exports types, utilities, and lightweight functionality
5
5
  * with zero heavy dependencies. Safe to import without bundling
6
- * @xyflow/svelte, codemirror, easymde, or marked.
6
+ * @xyflow/svelte, codemirror, or marked.
7
7
  *
8
8
  * @module core
9
9
  *
@@ -14,6 +14,14 @@
14
14
  * import { getStatusColor, createDefaultExecutionInfo } from "@d34dman/flowdrop/core";
15
15
  * ```
16
16
  */
17
+ export { DEFAULT_WORKFLOW_FORMAT } from '../types/index.js';
18
+ export { isUISchemaControl, isUISchemaVerticalLayout, isUISchemaGroup } from '../types/index.js';
19
+ // Base registry
20
+ export { BaseRegistry } from '../registry/BaseRegistry.js';
21
+ // Workflow format registry
22
+ export { workflowFormatRegistry } from '../registry/workflowFormatRegistry.js';
23
+ // Built-in format registration helpers
24
+ export { registerBuiltinFormats, areBuiltinFormatsRegistered, resetBuiltinFormatRegistration } from '../registry/builtinFormats.js';
17
25
  export { isChatInputNode, CHAT_INPUT_PATTERNS } from '../types/playground.js';
18
26
  // ============================================================================
19
27
  // Authentication Providers (no dependencies)
@@ -42,6 +50,8 @@ export * from '../utils/nodeTypes.js';
42
50
  export { isLoopbackEdge, isValidLoopbackCycle, hasCycles, hasInvalidCycles } from '../utils/connections.js';
43
51
  // Form type utilities
44
52
  export { isFieldOptionArray, normalizeOptions } from '../components/form/types.js';
53
+ // UISchema utilities
54
+ export { resolveScopeToKey, keyToScope, generateDefaultUISchema, collectReferencedKeys } from '../utils/uischema.js';
45
55
  // ============================================================================
46
56
  // Configuration
47
57
  // ============================================================================
@@ -51,4 +61,24 @@ export { defaultEndpointConfig, createEndpointConfig } from '../config/endpoints
51
61
  // Adapters
52
62
  // ============================================================================
53
63
  export * from '../adapters/WorkflowAdapter.js';
64
+ export { COMPONENT_REF_PREFIX, isComponentRef, extractComponentRefId, createComponentRef } from '../types/agentspec.js';
65
+ // Agent Spec default node types (optional starter templates — users can provide their own)
66
+ export { getAgentSpecNodeMetadata, getDefaultAgentSpecNodeTypes, createAgentSpecNodeMetadata } from '../adapters/agentspec/defaultNodeTypes.js';
67
+ // Agent Spec component type defaults (adapter infrastructure)
68
+ export { getComponentTypeDefaults, extractComponentType, isAgentSpecNodeId, AGENTSPEC_NAMESPACE } from '../adapters/agentspec/componentTypeDefaults.js';
69
+ // Agent Spec adapter (bidirectional conversion)
70
+ export { AgentSpecAdapter } from '../adapters/agentspec/AgentSpecAdapter.js';
71
+ // Agent Spec agent-level adapter
72
+ export { AgentSpecAgentAdapter } from '../adapters/agentspec/agentAdapter.js';
73
+ // Agent Spec validation
74
+ export { validateForAgentSpecExport, validateAgentSpecFlow } from '../adapters/agentspec/validator.js';
75
+ // Agent Spec auto-layout
76
+ export { computeAutoLayout } from '../adapters/agentspec/autoLayout.js';
77
+ export { defaultAgentSpecEndpoints, createAgentSpecEndpointConfig, buildAgentSpecUrl, getAgentSpecAuthHeaders } from '../config/agentSpecEndpoints.js';
78
+ // Agent Spec execution service
79
+ export { AgentSpecExecutionService, agentSpecExecutionService } from '../services/agentSpecExecutionService.js';
80
+ // ============================================================================
81
+ // Workflow JSON Schema
82
+ // ============================================================================
83
+ export { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '../schema/index.js';
54
84
  export { theme, resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.js';
package/dist/form/code.js CHANGED
@@ -20,7 +20,7 @@
20
20
  * // Now SchemaForm will render code editors for format: "json", "code", or "template"
21
21
  * ```
22
22
  */
23
- import { registerFieldComponent } from './fieldRegistry.js';
23
+ import { registerFieldComponent, fieldComponentRegistry } from './fieldRegistry.js';
24
24
  // Re-export the components for direct usage if needed
25
25
  export { default as FormCodeEditor } from '../components/form/FormCodeEditor.svelte';
26
26
  export { default as FormTemplateEditor } from '../components/form/FormTemplateEditor.svelte';
@@ -54,6 +54,11 @@ let codeEditorRegistered = false;
54
54
  * Track if template editor is registered
55
55
  */
56
56
  let templateEditorRegistered = false;
57
+ // Sync registration flags with registry.clear() for test isolation
58
+ fieldComponentRegistry.onClear(() => {
59
+ codeEditorRegistered = false;
60
+ templateEditorRegistered = false;
61
+ });
57
62
  /**
58
63
  * Register the code/JSON editor field component
59
64
  *