@particle-academy/fancy-flow 0.50.0 → 0.51.0
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/dist/{ConfigFieldRenderer-CrXFq6Eb.d.cts → ConfigFieldRenderer-Bc9Txnql.d.cts} +2 -2
- package/dist/{ConfigFieldRenderer-u3nYHovX.d.ts → ConfigFieldRenderer-Bt3RGT7Z.d.ts} +2 -2
- package/dist/{FlowViewer-DRgjeWJ7.d.ts → FlowViewer-BI_AyyvU.d.ts} +1 -1
- package/dist/{FlowViewer-CFSMlCqi.d.cts → FlowViewer-DABx-6A-.d.cts} +1 -1
- package/dist/{capabilities-VzgDApur.d.cts → capabilities-BYa5p5jw.d.cts} +1 -1
- package/dist/{capabilities-B00VXLUp.d.ts → capabilities-COOXRiNL.d.ts} +1 -1
- package/dist/{chunk-I4F6GI3A.js → chunk-6AI6CBNL.js} +3 -3
- package/dist/{chunk-I4F6GI3A.js.map → chunk-6AI6CBNL.js.map} +1 -1
- package/dist/{chunk-OWDSPRAF.js → chunk-7XTTXMGB.js} +4 -4
- package/dist/{chunk-OWDSPRAF.js.map → chunk-7XTTXMGB.js.map} +1 -1
- package/dist/{chunk-BAHJVX3S.js → chunk-HXGGCMR7.js} +3 -3
- package/dist/{chunk-BAHJVX3S.js.map → chunk-HXGGCMR7.js.map} +1 -1
- package/dist/{chunk-3W26FA7Q.js → chunk-LH76EIFL.js} +18 -4
- package/dist/chunk-LH76EIFL.js.map +1 -0
- package/dist/{chunk-DQJIU55F.js → chunk-SKEZ5AGI.js} +3 -3
- package/dist/{chunk-DQJIU55F.js.map → chunk-SKEZ5AGI.js.map} +1 -1
- package/dist/{chunk-XJMWMU4J.js → chunk-XCT2CJ5O.js} +72 -4
- package/dist/chunk-XCT2CJ5O.js.map +1 -0
- package/dist/connectors.d.cts +2 -2
- package/dist/connectors.d.ts +2 -2
- package/dist/durable/index.d.cts +2 -2
- package/dist/durable/index.d.ts +2 -2
- package/dist/durable.cjs +70 -2
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +70 -2
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.cts +7 -7
- package/dist/engine.d.ts +7 -7
- package/dist/engine.js +3 -3
- package/dist/fields/react-fancy.d.cts +3 -3
- package/dist/fields/react-fancy.d.ts +3 -3
- package/dist/index.cjs +85 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -11
- package/dist/layout/index.d.cts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/llm/prism.d.cts +2 -2
- package/dist/llm/prism.d.ts +2 -2
- package/dist/llm/vercel-ai.d.cts +2 -2
- package/dist/llm/vercel-ai.d.ts +2 -2
- package/dist/registry/index.d.cts +6 -6
- package/dist/registry/index.d.ts +6 -6
- package/dist/{registry-6cB5wCv6.d.ts → registry-3RkSYrMi.d.ts} +1 -1
- package/dist/{registry-DQh7ZmnM.d.cts → registry-C6TMfiD_.d.cts} +1 -1
- package/dist/registry.cjs +70 -2
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/{run-cohort-VX4JG21l.d.ts → run-cohort-BPIOpE8A.d.ts} +2 -2
- package/dist/{run-cohort-DYCL8Qv6.d.cts → run-cohort-r-L8dMED.d.cts} +2 -2
- package/dist/{run-flow-B24QUO1H.d.cts → run-flow-COdAOFg2.d.cts} +10 -1
- package/dist/{run-flow-DPUPAWk6.d.ts → run-flow-DJ7KYT6E.d.ts} +10 -1
- package/dist/runtime/index.d.cts +5 -5
- package/dist/runtime/index.d.ts +5 -5
- package/dist/runtime.cjs +70 -2
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema/index.d.cts +12 -1
- package/dist/schema/index.d.ts +12 -1
- package/dist/schema.cjs +85 -3
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/screens.cjs +70 -2
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.d.cts +2 -2
- package/dist/screens.d.ts +2 -2
- package/dist/screens.js +4 -4
- package/dist/{types-BtMOnb9I.d.cts → types-3sPauVRT.d.cts} +1 -1
- package/dist/{types-7cXcSQlx.d.cts → types-JFYjPJAG.d.cts} +37 -1
- package/dist/{types-7cXcSQlx.d.ts → types-JFYjPJAG.d.ts} +37 -1
- package/dist/{types-CDgIIj4c.d.ts → types-s643U1Hi.d.ts} +1 -1
- package/dist/ux.cjs +70 -2
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.d.cts +2 -2
- package/dist/ux.d.ts +2 -2
- package/dist/ux.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3W26FA7Q.js.map +0 -1
- package/dist/chunk-XJMWMU4J.js.map +0 -1
package/dist/engine.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-
|
|
2
|
-
import { F as FlowGraph, R as RunEvent, N as NodeExecutor } from './types-
|
|
3
|
-
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, E as ExecutorRegistry, d as FlowEdge, a as FlowNode, e as FlowNodeData, f as FlowNodeKind, g as NodeRunStatus, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, b as RunIdentity, c as RunIdentityJson, S as SubgraphNodeData, T as TriggerNodeData, i as escapeSegment } from './types-
|
|
4
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-
|
|
5
|
-
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-
|
|
6
|
-
export { b as CapabilityRequirement, C as ConfigField, M as ManifestProblem, c as ManifestValidation, d as NODE_MANIFEST_SCHEMA_VERSION, a as NodeCategory, N as NodeKindDefinition, e as NodePackageManifest, f as NodeRuntimeId, g as NodeRuntimeSpec, O as OutputField, h as OutputShape, P as PortSpec, S as SideEffects, i as checkCapabilities, j as checkRuntimeSupport, s as satisfiesRange, v as validateNodeManifest } from './types-
|
|
1
|
+
export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-COdAOFg2.cjs';
|
|
2
|
+
import { F as FlowGraph, R as RunEvent, N as NodeExecutor } from './types-JFYjPJAG.cjs';
|
|
3
|
+
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, E as ExecutorRegistry, d as FlowEdge, a as FlowNode, e as FlowNodeData, f as FlowNodeKind, g as NodeRunStatus, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, b as RunIdentity, c as RunIdentityJson, S as SubgraphNodeData, T as TriggerNodeData, i as escapeSegment } from './types-JFYjPJAG.cjs';
|
|
4
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-r-L8dMED.cjs';
|
|
5
|
+
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-C6TMfiD_.cjs';
|
|
6
|
+
export { b as CapabilityRequirement, C as ConfigField, M as ManifestProblem, c as ManifestValidation, d as NODE_MANIFEST_SCHEMA_VERSION, a as NodeCategory, N as NodeKindDefinition, e as NodePackageManifest, f as NodeRuntimeId, g as NodeRuntimeSpec, O as OutputField, h as OutputShape, P as PortSpec, S as SideEffects, i as checkCapabilities, j as checkRuntimeSupport, s as satisfiesRange, v as validateNodeManifest } from './types-3sPauVRT.cjs';
|
|
7
7
|
import { P as PauseAwaiting } from './pause-9iT4tCEV.cjs';
|
|
8
8
|
export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from './pause-9iT4tCEV.cjs';
|
|
9
|
-
import { W as WorkflowResolver } from './capabilities-
|
|
9
|
+
import { W as WorkflowResolver } from './capabilities-BYa5p5jw.cjs';
|
|
10
10
|
import '@xyflow/react';
|
|
11
11
|
import 'react';
|
|
12
12
|
|
package/dist/engine.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-
|
|
2
|
-
import { F as FlowGraph, R as RunEvent, N as NodeExecutor } from './types-
|
|
3
|
-
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, E as ExecutorRegistry, d as FlowEdge, a as FlowNode, e as FlowNodeData, f as FlowNodeKind, g as NodeRunStatus, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, b as RunIdentity, c as RunIdentityJson, S as SubgraphNodeData, T as TriggerNodeData, i as escapeSegment } from './types-
|
|
4
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-
|
|
5
|
-
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-
|
|
6
|
-
export { b as CapabilityRequirement, C as ConfigField, M as ManifestProblem, c as ManifestValidation, d as NODE_MANIFEST_SCHEMA_VERSION, a as NodeCategory, N as NodeKindDefinition, e as NodePackageManifest, f as NodeRuntimeId, g as NodeRuntimeSpec, O as OutputField, h as OutputShape, P as PortSpec, S as SideEffects, i as checkCapabilities, j as checkRuntimeSupport, s as satisfiesRange, v as validateNodeManifest } from './types-
|
|
1
|
+
export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-DJ7KYT6E.js';
|
|
2
|
+
import { F as FlowGraph, R as RunEvent, N as NodeExecutor } from './types-JFYjPJAG.js';
|
|
3
|
+
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, E as ExecutorRegistry, d as FlowEdge, a as FlowNode, e as FlowNodeData, f as FlowNodeKind, g as NodeRunStatus, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, b as RunIdentity, c as RunIdentityJson, S as SubgraphNodeData, T as TriggerNodeData, i as escapeSegment } from './types-JFYjPJAG.js';
|
|
4
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-BPIOpE8A.js';
|
|
5
|
+
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-3RkSYrMi.js';
|
|
6
|
+
export { b as CapabilityRequirement, C as ConfigField, M as ManifestProblem, c as ManifestValidation, d as NODE_MANIFEST_SCHEMA_VERSION, a as NodeCategory, N as NodeKindDefinition, e as NodePackageManifest, f as NodeRuntimeId, g as NodeRuntimeSpec, O as OutputField, h as OutputShape, P as PortSpec, S as SideEffects, i as checkCapabilities, j as checkRuntimeSupport, s as satisfiesRange, v as validateNodeManifest } from './types-s643U1Hi.js';
|
|
7
7
|
import { P as PauseAwaiting } from './pause-9iT4tCEV.js';
|
|
8
8
|
export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from './pause-9iT4tCEV.js';
|
|
9
|
-
import { W as WorkflowResolver } from './capabilities-
|
|
9
|
+
import { W as WorkflowResolver } from './capabilities-COOXRiNL.js';
|
|
10
10
|
import '@xyflow/react';
|
|
11
11
|
import 'react';
|
|
12
12
|
|
package/dist/engine.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { runCohort } from './chunk-
|
|
1
|
+
export { runCohort } from './chunk-SKEZ5AGI.js';
|
|
2
2
|
import { decodePause } from './chunk-UEOE6B52.js';
|
|
3
3
|
export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
|
|
4
|
-
import { runFlow, getNodeKind, resolveNodePorts } from './chunk-
|
|
5
|
-
export { RunIdentity, defaultConfigFor, escapeSegment, getNodeKind, kindIds, listNodeKinds, registerNodeKind, resolveKindId, runFlow, validateConfig } from './chunk-
|
|
4
|
+
import { runFlow, getNodeKind, resolveNodePorts } from './chunk-XCT2CJ5O.js';
|
|
5
|
+
export { RunIdentity, defaultConfigFor, escapeSegment, getNodeKind, kindIds, listNodeKinds, registerNodeKind, resolveKindId, runFlow, validateConfig } from './chunk-XCT2CJ5O.js';
|
|
6
6
|
import './chunk-F5RPRB7A.js';
|
|
7
7
|
import { isResolutionFailure, registerLlmClient, registerWorkflowResolver } from './chunk-USL4FMFU.js';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ConfigFieldRenderFn } from '../ConfigFieldRenderer-
|
|
1
|
+
import { C as ConfigFieldRenderFn } from '../ConfigFieldRenderer-Bc9Txnql.cjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-JFYjPJAG.cjs';
|
|
4
4
|
import '@xyflow/react';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-3sPauVRT.cjs';
|
|
6
6
|
import '../pause-9iT4tCEV.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ConfigFieldRenderFn } from '../ConfigFieldRenderer-
|
|
1
|
+
import { C as ConfigFieldRenderFn } from '../ConfigFieldRenderer-Bt3RGT7Z.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-JFYjPJAG.js';
|
|
4
4
|
import '@xyflow/react';
|
|
5
|
-
import '../types-
|
|
5
|
+
import '../types-s643U1Hi.js';
|
|
6
6
|
import '../pause-9iT4tCEV.js';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -11098,6 +11098,61 @@ var RunIdentity = class _RunIdentity {
|
|
|
11098
11098
|
}
|
|
11099
11099
|
};
|
|
11100
11100
|
|
|
11101
|
+
// src/runtime/workflow-props.ts
|
|
11102
|
+
function typeOf(value) {
|
|
11103
|
+
if (value === null) return "null";
|
|
11104
|
+
if (Array.isArray(value)) return "array";
|
|
11105
|
+
return typeof value;
|
|
11106
|
+
}
|
|
11107
|
+
function resolveWorkflowProps(declared, passed) {
|
|
11108
|
+
const inputs = declared ?? [];
|
|
11109
|
+
const given = passed ?? {};
|
|
11110
|
+
const byName = new Map(inputs.map((input) => [input.name, input]));
|
|
11111
|
+
for (const name of Object.keys(given)) {
|
|
11112
|
+
if (!byName.has(name)) {
|
|
11113
|
+
const known = inputs.map((input) => input.name);
|
|
11114
|
+
const suffix = known.length === 0 ? "this workflow declares no inputs" : `known inputs: ${known.join(", ")}`;
|
|
11115
|
+
return {
|
|
11116
|
+
ok: false,
|
|
11117
|
+
code: "unknown_input",
|
|
11118
|
+
error: `Unknown workflow input "${name}" \u2014 ${suffix}.`
|
|
11119
|
+
};
|
|
11120
|
+
}
|
|
11121
|
+
}
|
|
11122
|
+
const resolved = {};
|
|
11123
|
+
for (const input of inputs) {
|
|
11124
|
+
const supplied = Object.prototype.hasOwnProperty.call(given, input.name);
|
|
11125
|
+
const hasDefault = Object.prototype.hasOwnProperty.call(input, "default");
|
|
11126
|
+
if (!supplied) {
|
|
11127
|
+
if (hasDefault) {
|
|
11128
|
+
resolved[input.name] = input.default;
|
|
11129
|
+
continue;
|
|
11130
|
+
}
|
|
11131
|
+
if (input.required) {
|
|
11132
|
+
return {
|
|
11133
|
+
ok: false,
|
|
11134
|
+
code: "missing_required",
|
|
11135
|
+
error: `Missing required workflow input "${input.name}"${input.type ? ` (${input.type})` : ""}.`
|
|
11136
|
+
};
|
|
11137
|
+
}
|
|
11138
|
+
continue;
|
|
11139
|
+
}
|
|
11140
|
+
const value = given[input.name];
|
|
11141
|
+
if (input.type !== void 0) {
|
|
11142
|
+
const actual = typeOf(value);
|
|
11143
|
+
if (actual !== input.type) {
|
|
11144
|
+
return {
|
|
11145
|
+
ok: false,
|
|
11146
|
+
code: "type_mismatch",
|
|
11147
|
+
error: `Workflow input "${input.name}" expects ${input.type}, got ${actual}.`
|
|
11148
|
+
};
|
|
11149
|
+
}
|
|
11150
|
+
}
|
|
11151
|
+
resolved[input.name] = value;
|
|
11152
|
+
}
|
|
11153
|
+
return { ok: true, props: resolved };
|
|
11154
|
+
}
|
|
11155
|
+
|
|
11101
11156
|
// src/runtime/run-flow.ts
|
|
11102
11157
|
async function runFlow(graph, executors, onEvent = () => {
|
|
11103
11158
|
}, options = {}) {
|
|
@@ -11113,6 +11168,13 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
11113
11168
|
onEvent({ type: "run-error", error: msg });
|
|
11114
11169
|
return { ok: false, outputs, error: msg };
|
|
11115
11170
|
}
|
|
11171
|
+
const propsCheck = resolveWorkflowProps(graph.inputs, options.props);
|
|
11172
|
+
if (!propsCheck.ok) {
|
|
11173
|
+
onEvent({ type: "run-error", error: propsCheck.error });
|
|
11174
|
+
return { ok: false, outputs, error: propsCheck.error };
|
|
11175
|
+
}
|
|
11176
|
+
const props = propsCheck.props;
|
|
11177
|
+
const declaresProps = (graph.inputs?.length ?? 0) > 0;
|
|
11116
11178
|
const incomingByNode = indexIncoming(graph.edges);
|
|
11117
11179
|
const timer2 = timeoutMs ? setTimeout(() => errors.push(`Run timed out after ${timeoutMs}ms`), timeoutMs) : null;
|
|
11118
11180
|
onEvent({ type: "run-start" });
|
|
@@ -11154,7 +11216,7 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
11154
11216
|
}
|
|
11155
11217
|
onEvent({ type: "node-status", nodeId: node.id, status: "running" });
|
|
11156
11218
|
announce(onEvent, node, "start");
|
|
11157
|
-
const inputs = collectInputs(node, incoming, portValues, initialInputs);
|
|
11219
|
+
const inputs = collectInputs(node, incoming, portValues, initialInputs, props, declaresProps);
|
|
11158
11220
|
const exec = pickExecutor(executors, node);
|
|
11159
11221
|
if (!exec) {
|
|
11160
11222
|
const msg = `No executor registered for kind=${node.type}`;
|
|
@@ -11231,8 +11293,13 @@ function topoSort(graph) {
|
|
|
11231
11293
|
const byId = new Map(graph.nodes.map((n) => [n.id, n]));
|
|
11232
11294
|
return ordered.map((id2) => byId.get(id2)).filter(Boolean);
|
|
11233
11295
|
}
|
|
11234
|
-
function collectInputs(node, incoming, portValues, initial) {
|
|
11296
|
+
function collectInputs(node, incoming, portValues, initial, props, declaresProps) {
|
|
11235
11297
|
const inputs = { ...initial[node.id] ?? {} };
|
|
11298
|
+
if (incoming.length === 0) {
|
|
11299
|
+
for (const [name, value] of Object.entries(props)) {
|
|
11300
|
+
if (!(name in inputs)) inputs[name] = value;
|
|
11301
|
+
}
|
|
11302
|
+
}
|
|
11236
11303
|
for (const e of incoming) {
|
|
11237
11304
|
const portId = e.targetHandle ?? "in";
|
|
11238
11305
|
const key = `${e.source}:${e.sourceHandle ?? "out"}`;
|
|
@@ -11242,6 +11309,7 @@ function collectInputs(node, incoming, portValues, initial) {
|
|
|
11242
11309
|
inputs[e.source] = portValues.get(key);
|
|
11243
11310
|
}
|
|
11244
11311
|
}
|
|
11312
|
+
if (declaresProps) inputs.$props = props;
|
|
11245
11313
|
return inputs;
|
|
11246
11314
|
}
|
|
11247
11315
|
function pickExecutor(executors, node) {
|
|
@@ -14116,6 +14184,9 @@ function exportWorkflow(graph, metadata, view) {
|
|
|
14116
14184
|
$schema: WORKFLOW_SCHEMA_URL,
|
|
14117
14185
|
version: WORKFLOW_SCHEMA_VERSION,
|
|
14118
14186
|
metadata: metadata ? { ...metadata, updatedAt: Date.now() } : void 0,
|
|
14187
|
+
// Round-trips, or a saved workflow silently forgets its own contract and
|
|
14188
|
+
// every caller's props become "unknown input" on the next load.
|
|
14189
|
+
...graph.inputs && graph.inputs.length > 0 ? { inputs: graph.inputs } : {},
|
|
14119
14190
|
graph: {
|
|
14120
14191
|
nodes: graph.nodes.map(toSchemaNode),
|
|
14121
14192
|
edges: graph.edges.map(toSchemaEdge)
|
|
@@ -14238,7 +14309,18 @@ function importWorkflow(schema, options = {}) {
|
|
|
14238
14309
|
};
|
|
14239
14310
|
}).filter((e) => e !== null);
|
|
14240
14311
|
const ok = issues.every((i) => i.level !== "error");
|
|
14241
|
-
|
|
14312
|
+
const declaredInputs = Array.isArray(s.inputs) ? s.inputs.filter(
|
|
14313
|
+
(input) => input !== null && typeof input === "object" && typeof input.name === "string"
|
|
14314
|
+
) : void 0;
|
|
14315
|
+
return {
|
|
14316
|
+
ok,
|
|
14317
|
+
graph: {
|
|
14318
|
+
nodes,
|
|
14319
|
+
edges,
|
|
14320
|
+
...declaredInputs && declaredInputs.length > 0 ? { inputs: declaredInputs } : {}
|
|
14321
|
+
},
|
|
14322
|
+
issues
|
|
14323
|
+
};
|
|
14242
14324
|
}
|
|
14243
14325
|
function workflowToBlob(schema) {
|
|
14244
14326
|
return new Blob([JSON.stringify(schema, null, 2)], { type: "application/json" });
|