@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.
- package/README.md +4 -4
- package/dist/adapters/WorkflowAdapter.d.ts +2 -1
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +96 -0
- package/dist/adapters/agentspec/AgentSpecAdapter.js +663 -0
- package/dist/adapters/agentspec/agentAdapter.d.ts +59 -0
- package/dist/adapters/agentspec/agentAdapter.js +91 -0
- package/dist/adapters/agentspec/autoLayout.d.ts +34 -0
- package/dist/adapters/agentspec/autoLayout.js +127 -0
- package/dist/adapters/agentspec/componentTypeDefaults.d.ts +73 -0
- package/dist/adapters/agentspec/componentTypeDefaults.js +238 -0
- package/dist/adapters/agentspec/defaultNodeTypes.d.ts +53 -0
- package/dist/adapters/agentspec/defaultNodeTypes.js +561 -0
- package/dist/adapters/agentspec/index.d.ts +37 -0
- package/dist/adapters/agentspec/index.js +39 -0
- package/dist/adapters/agentspec/validator.d.ts +34 -0
- package/dist/adapters/agentspec/validator.js +169 -0
- package/dist/components/App.svelte +57 -13
- package/dist/components/ConfigForm.svelte +46 -12
- package/dist/components/ConfigForm.svelte.d.ts +8 -0
- package/dist/components/NodeSidebar.svelte +20 -8
- package/dist/components/NodeSidebar.svelte.d.ts +2 -1
- package/dist/components/SchemaForm.svelte +34 -12
- package/dist/components/SchemaForm.svelte.d.ts +8 -0
- package/dist/components/WorkflowEditor.svelte +14 -13
- package/dist/components/form/FormFieldset.svelte +142 -0
- package/dist/components/form/FormFieldset.svelte.d.ts +11 -0
- package/dist/components/form/FormMarkdownEditor.svelte +546 -422
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +2 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +136 -0
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +32 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +3 -0
- package/dist/components/form/types.d.ts +1 -1
- package/dist/components/nodes/WorkflowNode.svelte +1 -2
- package/dist/config/agentSpecEndpoints.d.ts +70 -0
- package/dist/config/agentSpecEndpoints.js +65 -0
- package/dist/config/endpoints.d.ts +6 -0
- package/dist/core/index.d.ts +29 -3
- package/dist/core/index.js +31 -1
- package/dist/form/code.js +6 -1
- package/dist/form/fieldRegistry.d.ts +79 -15
- package/dist/form/fieldRegistry.js +104 -49
- package/dist/form/full.d.ts +2 -2
- package/dist/form/full.js +2 -2
- package/dist/form/index.d.ts +5 -3
- package/dist/form/index.js +9 -2
- package/dist/form/markdown.d.ts +3 -3
- package/dist/form/markdown.js +8 -4
- package/dist/helpers/workflowEditorHelper.d.ts +24 -0
- package/dist/helpers/workflowEditorHelper.js +55 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/registry/BaseRegistry.d.ts +92 -0
- package/dist/registry/BaseRegistry.js +124 -0
- package/dist/registry/builtinFormats.d.ts +23 -0
- package/dist/registry/builtinFormats.js +70 -0
- package/dist/registry/builtinNodes.js +4 -0
- package/dist/registry/index.d.ts +2 -1
- package/dist/registry/index.js +2 -0
- package/dist/registry/nodeComponentRegistry.d.ts +26 -57
- package/dist/registry/nodeComponentRegistry.js +29 -82
- package/dist/registry/workflowFormatRegistry.d.ts +122 -0
- package/dist/registry/workflowFormatRegistry.js +96 -0
- package/dist/schema/index.d.ts +23 -0
- package/dist/schema/index.js +23 -0
- package/dist/services/agentSpecExecutionService.d.ts +106 -0
- package/dist/services/agentSpecExecutionService.js +333 -0
- package/dist/stores/portCoordinateStore.js +1 -4
- package/dist/stores/workflowStore.d.ts +3 -0
- package/dist/stores/workflowStore.js +3 -0
- package/dist/svelte-app.d.ts +4 -0
- package/dist/svelte-app.js +9 -1
- package/dist/types/agentspec.d.ts +318 -0
- package/dist/types/agentspec.js +48 -0
- package/dist/types/events.d.ts +28 -1
- package/dist/types/index.d.ts +31 -0
- package/dist/types/index.js +5 -0
- package/dist/types/uischema.d.ts +144 -0
- package/dist/types/uischema.js +51 -0
- package/dist/utils/uischema.d.ts +52 -0
- package/dist/utils/uischema.js +88 -0
- package/package.json +231 -225
- package/schemas/v1/workflow.schema.json +952 -0
package/README.md
CHANGED
|
@@ -224,10 +224,10 @@ Runtime configuration means you build once and deploy to staging, production, or
|
|
|
224
224
|
## Development
|
|
225
225
|
|
|
226
226
|
```bash
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
pnpm install # Install dependencies
|
|
228
|
+
pnpm dev # Start dev server
|
|
229
|
+
pnpm build # Build library
|
|
230
|
+
pnpm test # Run all tests
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
## Contributing
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - External applications that want to integrate with FlowDrop
|
|
14
14
|
* - Systems that need to generate or modify workflows programmatically
|
|
15
15
|
*/
|
|
16
|
-
import type { Workflow, NodeMetadata } from '../types/index.js';
|
|
16
|
+
import type { Workflow, NodeMetadata, WorkflowFormat } from '../types/index.js';
|
|
17
17
|
/**
|
|
18
18
|
* Standard workflow node interface (SvelteFlow-agnostic)
|
|
19
19
|
*/
|
|
@@ -55,6 +55,7 @@ export interface StandardWorkflow {
|
|
|
55
55
|
updatedAt: string;
|
|
56
56
|
author?: string;
|
|
57
57
|
tags?: string[];
|
|
58
|
+
format?: WorkflowFormat;
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Spec Adapter — Bidirectional conversion between FlowDrop and Agent Spec
|
|
3
|
+
*
|
|
4
|
+
* Converts between FlowDrop's StandardWorkflow format and Oracle's Open Agent Spec
|
|
5
|
+
* JSON format. Handles the key structural differences:
|
|
6
|
+
* - Unified edges (FlowDrop) ↔ control-flow + data-flow edges (Agent Spec)
|
|
7
|
+
* - Node IDs (FlowDrop) ↔ node names (Agent Spec)
|
|
8
|
+
* - Visual positions (FlowDrop) ↔ no positions (Agent Spec)
|
|
9
|
+
*
|
|
10
|
+
* @see https://github.com/oracle/agent-spec
|
|
11
|
+
*/
|
|
12
|
+
import type { AgentSpecFlow } from '../../types/agentspec.js';
|
|
13
|
+
import type { StandardWorkflow } from '../WorkflowAdapter.js';
|
|
14
|
+
export declare class AgentSpecAdapter {
|
|
15
|
+
/**
|
|
16
|
+
* Convert a FlowDrop StandardWorkflow to an Agent Spec Flow.
|
|
17
|
+
*
|
|
18
|
+
* Handles:
|
|
19
|
+
* - Node conversion with config → node attributes
|
|
20
|
+
* - Edge splitting into control-flow and data-flow
|
|
21
|
+
* - Position preservation in metadata
|
|
22
|
+
* - Gateway branch → from_branch mapping
|
|
23
|
+
*/
|
|
24
|
+
toAgentSpec(workflow: StandardWorkflow): AgentSpecFlow;
|
|
25
|
+
/**
|
|
26
|
+
* Export a FlowDrop StandardWorkflow as Agent Spec JSON string.
|
|
27
|
+
*/
|
|
28
|
+
exportJSON(workflow: StandardWorkflow): string;
|
|
29
|
+
/**
|
|
30
|
+
* Convert an Agent Spec Flow to a FlowDrop StandardWorkflow.
|
|
31
|
+
*
|
|
32
|
+
* Handles:
|
|
33
|
+
* - Auto-layout (Agent Spec has no positions)
|
|
34
|
+
* - Edge merging (control-flow + data-flow → unified edges)
|
|
35
|
+
* - Node type mapping via registry
|
|
36
|
+
* - Component type preservation in extensions
|
|
37
|
+
*/
|
|
38
|
+
fromAgentSpec(agentSpecFlow: AgentSpecFlow): StandardWorkflow;
|
|
39
|
+
/**
|
|
40
|
+
* Import an Agent Spec flow from a JSON string.
|
|
41
|
+
*/
|
|
42
|
+
importJSON(json: string): StandardWorkflow;
|
|
43
|
+
/**
|
|
44
|
+
* Resolve a stable name for a FlowDrop node in Agent Spec.
|
|
45
|
+
* Uses the node's config instanceTitle, label, or falls back to ID.
|
|
46
|
+
*/
|
|
47
|
+
private resolveNodeName;
|
|
48
|
+
/**
|
|
49
|
+
* Convert a FlowDrop StandardNode to an Agent Spec node.
|
|
50
|
+
*/
|
|
51
|
+
private convertNodeToAgentSpec;
|
|
52
|
+
/**
|
|
53
|
+
* Add Agent Spec type-specific attributes from FlowDrop config.
|
|
54
|
+
*/
|
|
55
|
+
private addNodeSpecificAttributes;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve Agent Spec component type from a FlowDrop node.
|
|
58
|
+
*/
|
|
59
|
+
private resolveComponentType;
|
|
60
|
+
/**
|
|
61
|
+
* Convert an Agent Spec node to a FlowDrop StandardNode.
|
|
62
|
+
*
|
|
63
|
+
* Uses lightweight component type defaults for trigger ports and visual styling.
|
|
64
|
+
* Does NOT depend on the full node type registry — works with any component_type,
|
|
65
|
+
* including custom/unknown types (falls back to sensible defaults).
|
|
66
|
+
*/
|
|
67
|
+
private convertNodeFromAgentSpec;
|
|
68
|
+
/**
|
|
69
|
+
* Extract FlowDrop config values from Agent Spec node-specific attributes.
|
|
70
|
+
*/
|
|
71
|
+
private extractConfigFromAgentSpec;
|
|
72
|
+
/**
|
|
73
|
+
* Get the data type of a source port from a FlowDrop node.
|
|
74
|
+
*/
|
|
75
|
+
private getSourcePortDataType;
|
|
76
|
+
/**
|
|
77
|
+
* Convert a FlowDrop trigger edge to an Agent Spec ControlFlowEdge.
|
|
78
|
+
*/
|
|
79
|
+
private convertToControlFlowEdge;
|
|
80
|
+
/**
|
|
81
|
+
* Convert a FlowDrop data edge to an Agent Spec DataFlowEdge.
|
|
82
|
+
*/
|
|
83
|
+
private convertToDataFlowEdge;
|
|
84
|
+
/**
|
|
85
|
+
* Convert an Agent Spec ControlFlowEdge to a FlowDrop edge.
|
|
86
|
+
*/
|
|
87
|
+
private convertFromControlFlowEdge;
|
|
88
|
+
/**
|
|
89
|
+
* Convert an Agent Spec DataFlowEdge to a FlowDrop edge.
|
|
90
|
+
*/
|
|
91
|
+
private convertFromDataFlowEdge;
|
|
92
|
+
/**
|
|
93
|
+
* Find the start node name from converted Agent Spec nodes.
|
|
94
|
+
*/
|
|
95
|
+
private findStartNodeName;
|
|
96
|
+
}
|