@particle-academy/fancy-flow 0.34.0 → 0.35.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/{capabilities-BLOeLACV.d.cts → capabilities-BtJQTbnw.d.cts} +1 -1
- package/dist/{capabilities-BH7zmSQQ.d.ts → capabilities-CkhKj_U_.d.ts} +1 -1
- package/dist/engine.d.cts +7 -238
- package/dist/engine.d.ts +7 -238
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- 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-Dd1Q66uP.d.ts → registry-Df2-bTXZ.d.ts} +1 -1
- package/dist/{registry-qv4gRiuQ.d.cts → registry-Ru5jIS5H.d.cts} +1 -1
- package/dist/{run-cohort-DitsaYgS.d.cts → run-cohort-Bjv2ZU6g.d.cts} +1 -1
- package/dist/{run-cohort-CV7EcwGG.d.ts → run-cohort-BnP6ErHi.d.ts} +1 -1
- package/dist/runtime/index.d.cts +3 -3
- package/dist/runtime/index.d.ts +3 -3
- package/dist/schema/index.d.cts +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/{types-DEmDSByY.d.cts → types-D6lsIGoe.d.ts} +251 -2
- package/dist/{types-Bj_ZHwqG.d.ts → types-D8Dezh9v.d.cts} +251 -2
- package/dist/{types-CMSrWVYM.d.cts → types-sOmpCitB.d.cts} +1 -1
- package/dist/{types-CMSrWVYM.d.ts → types-sOmpCitB.d.ts} +1 -1
- package/dist/ux.d.cts +2 -2
- package/dist/ux.d.ts +2 -2
- package/package.json +1 -1
package/dist/engine.d.cts
CHANGED
|
@@ -1,243 +1,12 @@
|
|
|
1
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-
|
|
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,
|
|
4
|
-
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-
|
|
5
|
-
import { P as PauseAwaiting } from './types-
|
|
6
|
-
export { C as ConfigField, L as LEGACY_PAUSE_PREFIXES,
|
|
1
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-Bjv2ZU6g.cjs';
|
|
2
|
+
import { F as FlowGraph, R as RunEvent, N as NodeExecutor } from './types-sOmpCitB.cjs';
|
|
3
|
+
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, E as ExecutorRegistry, a as FlowEdge, b as FlowNode, c as FlowNodeData, d as FlowNodeKind, e as NodeRunStatus, f as NoteNodeData, O as OutputNodeData, P as PortDescriptor, S as SubgraphNodeData, T as TriggerNodeData } from './types-sOmpCitB.cjs';
|
|
4
|
+
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-Ru5jIS5H.cjs';
|
|
5
|
+
import { P as PauseAwaiting } from './types-D8Dezh9v.cjs';
|
|
6
|
+
export { C as CapabilityRequirement, a as ConfigField, L as LEGACY_PAUSE_PREFIXES, M as ManifestProblem, b as ManifestValidation, N as NODE_MANIFEST_SCHEMA_VERSION, c as NodeCategory, d as NodeKindDefinition, e as NodePackageManifest, f as NodeRuntimeId, g as NodeRuntimeSpec, h as PAUSE_PREFIX, i as PauseSignal, j as PortSpec, S as SideEffects, k as checkCapabilities, l as checkRuntimeSupport, m as decodePause, n as encodePause, o as isPause, p as pauseForHuman, s as satisfiesRange, v as validateNodeManifest } from './types-D8Dezh9v.cjs';
|
|
7
7
|
import '@xyflow/react';
|
|
8
8
|
import 'react';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* The node package manifest — what a marketplace node declares about itself.
|
|
12
|
-
*
|
|
13
|
-
* A node is not one artifact. It is a kind definition (palette entry, config
|
|
14
|
-
* schema, ports, renderer) plus an executor for EACH runtime the consumer runs.
|
|
15
|
-
* A package shipping only a TS executor is unusable to anyone executing on PHP,
|
|
16
|
-
* and without a manifest that is invisible until a run fails. Requested by the
|
|
17
|
-
* MOIC Suite consumer (fancy-flow#2 §2), who runs the editor in TS and executes
|
|
18
|
-
* in PHP and hit exactly this.
|
|
19
|
-
*
|
|
20
|
-
* The manifest is data, not code: the registry, the CLI, and the MCP all read
|
|
21
|
-
* it without executing anything a package author wrote.
|
|
22
|
-
*
|
|
23
|
-
* ## Why the engine range lives per runtime
|
|
24
|
-
*
|
|
25
|
-
* The first cut of this manifest carried ONE `fancyFlow` range, and it was
|
|
26
|
-
* wrong: the two engines version independently, so a single range cannot say
|
|
27
|
-
* "needs npm >=0.11 AND php >=0.5". A package supporting both runtimes would
|
|
28
|
-
* install cleanly against a host whose OTHER runtime was too old — the 0.9.0
|
|
29
|
-
* failure shape wearing a manifest. The range belongs inside each runtime.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/** The current manifest schema version. Bump only on a breaking shape change. */
|
|
33
|
-
declare const NODE_MANIFEST_SCHEMA_VERSION = 1;
|
|
34
|
-
/**
|
|
35
|
-
* A runtime a node can implement.
|
|
36
|
-
*
|
|
37
|
-
* Open rather than a closed union — the PHP and Node twins are what exist
|
|
38
|
-
* today, but the point of a manifest is that a runtime we haven't written can
|
|
39
|
-
* declare itself without a release here.
|
|
40
|
-
*/
|
|
41
|
-
type NodeRuntimeId = "ts" | "php" | (string & {});
|
|
42
|
-
/**
|
|
43
|
-
* How one runtime provides this node, and which engine version it needs.
|
|
44
|
-
*
|
|
45
|
-
* `files` are source directories, not a dependency: a node is **vendored**, so
|
|
46
|
-
* `fancy-cli add node` copies them into the project the way it copies a
|
|
47
|
-
* component's source. One node, one source, readable and editable in the app
|
|
48
|
-
* rather than hidden in `node_modules` or `vendor`.
|
|
49
|
-
*
|
|
50
|
-
* This spec covers a runtime's BACKEND only. The surface lives in the
|
|
51
|
-
* manifest's `ui`, because the editor is React on every host — a Laravel
|
|
52
|
-
* project needs the React kind and does not need the TypeScript executor.
|
|
53
|
-
*/
|
|
54
|
-
type NodeRuntimeSpec = {
|
|
55
|
-
/** This backend's source directories, relative to the node. */
|
|
56
|
-
files: string[];
|
|
57
|
-
/** Semver range of THIS runtime's engine. Required — see the module note. */
|
|
58
|
-
engine: string;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Whether a capability must be wired for the node to work at all.
|
|
62
|
-
*
|
|
63
|
-
* `required` is checked at AUTHOR time, not run time. The failure that hurts is
|
|
64
|
-
* a node that installs fine, authors fine, and silently no-ops during a run —
|
|
65
|
-
* the same silence as a routing bug. An editor can grey the node and say which
|
|
66
|
-
* capability the host never registered.
|
|
67
|
-
*/
|
|
68
|
-
type CapabilityRequirement = "required" | "optional";
|
|
69
|
-
/**
|
|
70
|
-
* Whether a node is safe to run again.
|
|
71
|
-
*
|
|
72
|
-
* Durable runs RETRY. A node that writes needs to say so, or a host has to pick
|
|
73
|
-
* one retry policy for every node and get it wrong somewhere.
|
|
74
|
-
*/
|
|
75
|
-
type SideEffects = "none" | "idempotent" | "unsafe-to-replay";
|
|
76
|
-
/**
|
|
77
|
-
* A Fancy suite package this node's source imports.
|
|
78
|
-
*
|
|
79
|
-
* Separate from a plain npm dependency because the suite is polyglot and
|
|
80
|
-
* vendorable: the same capability ships as an npm package, a Composer package,
|
|
81
|
-
* or source you copy in, and which of those a consumer wants depends on the
|
|
82
|
-
* host — so the node names the *package*, and the CLI offers the routes that
|
|
83
|
-
* exist. A bare `dependencies: ["@particle-academy/fancy-screens"]` can only
|
|
84
|
-
* ever offer `npm install`, which is the wrong answer in a Laravel app whose
|
|
85
|
-
* editor is vendored.
|
|
86
|
-
*
|
|
87
|
-
* ## No versions, deliberately
|
|
88
|
-
*
|
|
89
|
-
* Nothing here carries a range, and the validator rejects one. A pinned
|
|
90
|
-
* marketplace node freezes a consumer on an old surface: the suite ships
|
|
91
|
-
* additively and often, and a node that pinned `^0.4` at authoring time would
|
|
92
|
-
* be holding a project back a year later for a constraint nobody revisits.
|
|
93
|
-
* Compatibility is expressed where it can actually be checked — `runtimes[].engine`
|
|
94
|
-
* against the *engine*, which is the contract a node really depends on.
|
|
95
|
-
*/
|
|
96
|
-
type FancyDependency = {
|
|
97
|
-
/** Suite slug — what `/packages/<slug>` documents. */
|
|
98
|
-
package: string;
|
|
99
|
-
/** npm name, when the suite ships one. */
|
|
100
|
-
npm?: string;
|
|
101
|
-
/** Composer name, when the suite ships one. */
|
|
102
|
-
composer?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Why the node needs it, in a few words.
|
|
105
|
-
*
|
|
106
|
-
* Printed at install. Without it the CLI can only present a bare name and a
|
|
107
|
-
* command, which reads as an unexplained demand for a second package.
|
|
108
|
-
*/
|
|
109
|
-
reason?: string;
|
|
110
|
-
/** Whether the node fails without it, or merely does less. Defaults to required. */
|
|
111
|
-
requirement?: CapabilityRequirement;
|
|
112
|
-
};
|
|
113
|
-
type NodePackageManifest = {
|
|
114
|
-
/** Must equal `NODE_MANIFEST_SCHEMA_VERSION`. */
|
|
115
|
-
schemaVersion: number;
|
|
116
|
-
/** Package name, as installed (`@acme/fancy-flow-salesforce`). */
|
|
117
|
-
name: string;
|
|
118
|
-
/**
|
|
119
|
-
* The canonical kind id this package provides — namespaced, and the string
|
|
120
|
-
* that gets persisted into every document using it.
|
|
121
|
-
*/
|
|
122
|
-
kind: string;
|
|
123
|
-
/**
|
|
124
|
-
* Previous ids this kind still answers to.
|
|
125
|
-
*
|
|
126
|
-
* Core renamed `llm_branch` to `llm_router` and kept every old id working.
|
|
127
|
-
* Third-party packages will rename too, and their documents break the same
|
|
128
|
-
* way core's would have — so packages get the same escape hatch, otherwise
|
|
129
|
-
* only first-party nodes can rename safely.
|
|
130
|
-
*/
|
|
131
|
-
aliases?: string[];
|
|
132
|
-
/**
|
|
133
|
-
* Version of this node's CONFIG shape, independent of the document schema.
|
|
134
|
-
*
|
|
135
|
-
* A node's config evolves on its own clock. Without a declared version, every
|
|
136
|
-
* executor accretes hand-written read-fallbacks forever (MOIC carries one for
|
|
137
|
-
* `routes[].key` → `routes[].port`), because nothing canonicalises old config
|
|
138
|
-
* the way import canonicalises kind ids.
|
|
139
|
-
*/
|
|
140
|
-
configVersion?: number;
|
|
141
|
-
/**
|
|
142
|
-
* The node's SURFACE — its React kind — as source directories.
|
|
143
|
-
*
|
|
144
|
-
* Copied whichever backend the consumer picks, because the editor is React on
|
|
145
|
-
* every host. Kept out of `runtimes` deliberately: fold the two together and
|
|
146
|
-
* a PHP project either loses its palette entry or gains a TypeScript executor
|
|
147
|
-
* it will never run.
|
|
148
|
-
*/
|
|
149
|
-
ui?: string[];
|
|
150
|
-
/** Per-runtime backend source and engine ranges. */
|
|
151
|
-
runtimes: Partial<Record<NodeRuntimeId, NodeRuntimeSpec>>;
|
|
152
|
-
/**
|
|
153
|
-
* Host capabilities this node needs, and whether each is mandatory.
|
|
154
|
-
*
|
|
155
|
-
* Declared so the CLI and the editor can say what to wire BEFORE a run,
|
|
156
|
-
* rather than the node silently no-opping or crashing mid-run.
|
|
157
|
-
*/
|
|
158
|
-
capabilities?: Record<string, CapabilityRequirement>;
|
|
159
|
-
/** Fancy suite packages this node's source imports. See {@link FancyDependency}. */
|
|
160
|
-
fancyDependencies?: FancyDependency[];
|
|
161
|
-
/**
|
|
162
|
-
* Path to this node's golden fixtures, relative to the package root.
|
|
163
|
-
*
|
|
164
|
-
* REQUIRED. Every runtime the package claims runs these same cases, which is
|
|
165
|
-
* what makes "behaves identically on both runtimes" verified rather than
|
|
166
|
-
* asserted. See `./fixtures`.
|
|
167
|
-
*/
|
|
168
|
-
fixtures: string;
|
|
169
|
-
/**
|
|
170
|
-
* Declares the node halts for a person. Mirrors `NodeKindDefinition`.
|
|
171
|
-
*
|
|
172
|
-
* A host-planning fact, not a node internal: a parent that embeds workflows
|
|
173
|
-
* needs to reject a child that can pause, because a paused child wedges the
|
|
174
|
-
* parent — and discovering that at run time means watching a run park.
|
|
175
|
-
*/
|
|
176
|
-
pausesForHuman?: PauseAwaiting;
|
|
177
|
-
/** Whether this node is safe to replay. See `SideEffects`. */
|
|
178
|
-
sideEffects?: SideEffects;
|
|
179
|
-
/** One-line summary — what `search_nodes` matches against. */
|
|
180
|
-
description?: string;
|
|
181
|
-
/**
|
|
182
|
-
* Assigned by the registry, never by the author. Present in a manifest being
|
|
183
|
-
* submitted for publication, it is a claim to a trust signal the author does
|
|
184
|
-
* not get to make.
|
|
185
|
-
*/
|
|
186
|
-
verified?: boolean;
|
|
187
|
-
};
|
|
188
|
-
type ManifestProblem = {
|
|
189
|
-
level: "error" | "warning";
|
|
190
|
-
field: string;
|
|
191
|
-
message: string;
|
|
192
|
-
};
|
|
193
|
-
type ManifestValidation = {
|
|
194
|
-
/** True when there are no `error`-level problems. Warnings do not block. */
|
|
195
|
-
ok: boolean;
|
|
196
|
-
manifest?: NodePackageManifest;
|
|
197
|
-
problems: ManifestProblem[];
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Validate a manifest read from disk or a registry.
|
|
201
|
-
*
|
|
202
|
-
* Returns every problem rather than throwing on the first, because an author
|
|
203
|
-
* fixing a package wants the whole list — a validator that reveals one error
|
|
204
|
-
* per run turns a five-minute fix into five round trips.
|
|
205
|
-
*/
|
|
206
|
-
declare function validateNodeManifest(input: unknown): ManifestValidation;
|
|
207
|
-
/**
|
|
208
|
-
* Check a node against the runtimes a host executes on, and their versions.
|
|
209
|
-
*
|
|
210
|
-
* Two failures live here, and both are errors because the node genuinely
|
|
211
|
-
* cannot run: a runtime the package does not implement at all, and a runtime
|
|
212
|
-
* it implements against an engine newer than the host's.
|
|
213
|
-
*
|
|
214
|
-
* `engineVersions` is optional — pass what the host knows. An unchecked range
|
|
215
|
-
* is reported as a warning rather than passed over silently, because "we did
|
|
216
|
-
* not check" and "it is fine" must not look the same.
|
|
217
|
-
*/
|
|
218
|
-
declare function checkRuntimeSupport(manifest: Pick<NodePackageManifest, "kind" | "runtimes">, hostRuntimes: readonly string[], engineVersions?: Readonly<Record<string, string>>): ManifestProblem[];
|
|
219
|
-
/**
|
|
220
|
-
* Minimal semver range check — `^x.y.z`, `~x.y.z`, `>=x.y.z`, `x.y.z`, `*`.
|
|
221
|
-
*
|
|
222
|
-
* Deliberately small: this runs in the CLI and in CI, and pulling a semver
|
|
223
|
-
* library into the engine for one comparison is not worth the dependency. It
|
|
224
|
-
* covers the forms a manifest actually uses; anything it cannot parse is
|
|
225
|
-
* treated as unsatisfied rather than silently passed, so an unparseable range
|
|
226
|
-
* fails loudly instead of waving a node through.
|
|
227
|
-
*/
|
|
228
|
-
declare function satisfiesRange(version: string, range: string): boolean;
|
|
229
|
-
/**
|
|
230
|
-
* Check that every capability a node needs is wired.
|
|
231
|
-
*
|
|
232
|
-
* A `required` capability that is missing is an ERROR — that is the whole point
|
|
233
|
-
* of the requirement level. It is meant to be surfaced at author time, so an
|
|
234
|
-
* editor can grey the node and name what the host never registered, rather than
|
|
235
|
-
* the node installing cleanly and silently no-opping during a run.
|
|
236
|
-
*
|
|
237
|
-
* An `optional` one is a warning: the node still works, with less.
|
|
238
|
-
*/
|
|
239
|
-
declare function checkCapabilities(manifest: Pick<NodePackageManifest, "kind" | "capabilities">, available: Readonly<Record<string, boolean>>): ManifestProblem[];
|
|
240
|
-
|
|
241
10
|
/**
|
|
242
11
|
* Golden fixtures — the parity guarantee, and a publishing requirement.
|
|
243
12
|
*
|
|
@@ -399,4 +168,4 @@ declare function runFixtures(file: FixtureFile, executor: NodeExecutor): Promise
|
|
|
399
168
|
*/
|
|
400
169
|
declare function validateFixtureFile(input: unknown, expectedKind?: string): string[];
|
|
401
170
|
|
|
402
|
-
export { type
|
|
171
|
+
export { type FixtureCase, type FixtureEventExpectation, type FixtureExpectation, type FixtureFailure, type FixtureFile, type FixtureRunResult, type FixtureStubs, FlowGraph, NodeExecutor, PauseAwaiting, RunEvent, runFixtures, validateFixtureFile };
|
package/dist/engine.d.ts
CHANGED
|
@@ -1,243 +1,12 @@
|
|
|
1
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-
|
|
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,
|
|
4
|
-
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-
|
|
5
|
-
import { P as PauseAwaiting } from './types-
|
|
6
|
-
export { C as ConfigField, L as LEGACY_PAUSE_PREFIXES,
|
|
1
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-BnP6ErHi.js';
|
|
2
|
+
import { F as FlowGraph, R as RunEvent, N as NodeExecutor } from './types-sOmpCitB.js';
|
|
3
|
+
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, E as ExecutorRegistry, a as FlowEdge, b as FlowNode, c as FlowNodeData, d as FlowNodeKind, e as NodeRunStatus, f as NoteNodeData, O as OutputNodeData, P as PortDescriptor, S as SubgraphNodeData, T as TriggerNodeData } from './types-sOmpCitB.js';
|
|
4
|
+
export { d as defaultConfigFor, g as getNodeKind, k as kindIds, l as listNodeKinds, r as registerNodeKind, a as resolveKindId, v as validateConfig } from './registry-Df2-bTXZ.js';
|
|
5
|
+
import { P as PauseAwaiting } from './types-D6lsIGoe.js';
|
|
6
|
+
export { C as CapabilityRequirement, a as ConfigField, L as LEGACY_PAUSE_PREFIXES, M as ManifestProblem, b as ManifestValidation, N as NODE_MANIFEST_SCHEMA_VERSION, c as NodeCategory, d as NodeKindDefinition, e as NodePackageManifest, f as NodeRuntimeId, g as NodeRuntimeSpec, h as PAUSE_PREFIX, i as PauseSignal, j as PortSpec, S as SideEffects, k as checkCapabilities, l as checkRuntimeSupport, m as decodePause, n as encodePause, o as isPause, p as pauseForHuman, s as satisfiesRange, v as validateNodeManifest } from './types-D6lsIGoe.js';
|
|
7
7
|
import '@xyflow/react';
|
|
8
8
|
import 'react';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* The node package manifest — what a marketplace node declares about itself.
|
|
12
|
-
*
|
|
13
|
-
* A node is not one artifact. It is a kind definition (palette entry, config
|
|
14
|
-
* schema, ports, renderer) plus an executor for EACH runtime the consumer runs.
|
|
15
|
-
* A package shipping only a TS executor is unusable to anyone executing on PHP,
|
|
16
|
-
* and without a manifest that is invisible until a run fails. Requested by the
|
|
17
|
-
* MOIC Suite consumer (fancy-flow#2 §2), who runs the editor in TS and executes
|
|
18
|
-
* in PHP and hit exactly this.
|
|
19
|
-
*
|
|
20
|
-
* The manifest is data, not code: the registry, the CLI, and the MCP all read
|
|
21
|
-
* it without executing anything a package author wrote.
|
|
22
|
-
*
|
|
23
|
-
* ## Why the engine range lives per runtime
|
|
24
|
-
*
|
|
25
|
-
* The first cut of this manifest carried ONE `fancyFlow` range, and it was
|
|
26
|
-
* wrong: the two engines version independently, so a single range cannot say
|
|
27
|
-
* "needs npm >=0.11 AND php >=0.5". A package supporting both runtimes would
|
|
28
|
-
* install cleanly against a host whose OTHER runtime was too old — the 0.9.0
|
|
29
|
-
* failure shape wearing a manifest. The range belongs inside each runtime.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/** The current manifest schema version. Bump only on a breaking shape change. */
|
|
33
|
-
declare const NODE_MANIFEST_SCHEMA_VERSION = 1;
|
|
34
|
-
/**
|
|
35
|
-
* A runtime a node can implement.
|
|
36
|
-
*
|
|
37
|
-
* Open rather than a closed union — the PHP and Node twins are what exist
|
|
38
|
-
* today, but the point of a manifest is that a runtime we haven't written can
|
|
39
|
-
* declare itself without a release here.
|
|
40
|
-
*/
|
|
41
|
-
type NodeRuntimeId = "ts" | "php" | (string & {});
|
|
42
|
-
/**
|
|
43
|
-
* How one runtime provides this node, and which engine version it needs.
|
|
44
|
-
*
|
|
45
|
-
* `files` are source directories, not a dependency: a node is **vendored**, so
|
|
46
|
-
* `fancy-cli add node` copies them into the project the way it copies a
|
|
47
|
-
* component's source. One node, one source, readable and editable in the app
|
|
48
|
-
* rather than hidden in `node_modules` or `vendor`.
|
|
49
|
-
*
|
|
50
|
-
* This spec covers a runtime's BACKEND only. The surface lives in the
|
|
51
|
-
* manifest's `ui`, because the editor is React on every host — a Laravel
|
|
52
|
-
* project needs the React kind and does not need the TypeScript executor.
|
|
53
|
-
*/
|
|
54
|
-
type NodeRuntimeSpec = {
|
|
55
|
-
/** This backend's source directories, relative to the node. */
|
|
56
|
-
files: string[];
|
|
57
|
-
/** Semver range of THIS runtime's engine. Required — see the module note. */
|
|
58
|
-
engine: string;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Whether a capability must be wired for the node to work at all.
|
|
62
|
-
*
|
|
63
|
-
* `required` is checked at AUTHOR time, not run time. The failure that hurts is
|
|
64
|
-
* a node that installs fine, authors fine, and silently no-ops during a run —
|
|
65
|
-
* the same silence as a routing bug. An editor can grey the node and say which
|
|
66
|
-
* capability the host never registered.
|
|
67
|
-
*/
|
|
68
|
-
type CapabilityRequirement = "required" | "optional";
|
|
69
|
-
/**
|
|
70
|
-
* Whether a node is safe to run again.
|
|
71
|
-
*
|
|
72
|
-
* Durable runs RETRY. A node that writes needs to say so, or a host has to pick
|
|
73
|
-
* one retry policy for every node and get it wrong somewhere.
|
|
74
|
-
*/
|
|
75
|
-
type SideEffects = "none" | "idempotent" | "unsafe-to-replay";
|
|
76
|
-
/**
|
|
77
|
-
* A Fancy suite package this node's source imports.
|
|
78
|
-
*
|
|
79
|
-
* Separate from a plain npm dependency because the suite is polyglot and
|
|
80
|
-
* vendorable: the same capability ships as an npm package, a Composer package,
|
|
81
|
-
* or source you copy in, and which of those a consumer wants depends on the
|
|
82
|
-
* host — so the node names the *package*, and the CLI offers the routes that
|
|
83
|
-
* exist. A bare `dependencies: ["@particle-academy/fancy-screens"]` can only
|
|
84
|
-
* ever offer `npm install`, which is the wrong answer in a Laravel app whose
|
|
85
|
-
* editor is vendored.
|
|
86
|
-
*
|
|
87
|
-
* ## No versions, deliberately
|
|
88
|
-
*
|
|
89
|
-
* Nothing here carries a range, and the validator rejects one. A pinned
|
|
90
|
-
* marketplace node freezes a consumer on an old surface: the suite ships
|
|
91
|
-
* additively and often, and a node that pinned `^0.4` at authoring time would
|
|
92
|
-
* be holding a project back a year later for a constraint nobody revisits.
|
|
93
|
-
* Compatibility is expressed where it can actually be checked — `runtimes[].engine`
|
|
94
|
-
* against the *engine*, which is the contract a node really depends on.
|
|
95
|
-
*/
|
|
96
|
-
type FancyDependency = {
|
|
97
|
-
/** Suite slug — what `/packages/<slug>` documents. */
|
|
98
|
-
package: string;
|
|
99
|
-
/** npm name, when the suite ships one. */
|
|
100
|
-
npm?: string;
|
|
101
|
-
/** Composer name, when the suite ships one. */
|
|
102
|
-
composer?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Why the node needs it, in a few words.
|
|
105
|
-
*
|
|
106
|
-
* Printed at install. Without it the CLI can only present a bare name and a
|
|
107
|
-
* command, which reads as an unexplained demand for a second package.
|
|
108
|
-
*/
|
|
109
|
-
reason?: string;
|
|
110
|
-
/** Whether the node fails without it, or merely does less. Defaults to required. */
|
|
111
|
-
requirement?: CapabilityRequirement;
|
|
112
|
-
};
|
|
113
|
-
type NodePackageManifest = {
|
|
114
|
-
/** Must equal `NODE_MANIFEST_SCHEMA_VERSION`. */
|
|
115
|
-
schemaVersion: number;
|
|
116
|
-
/** Package name, as installed (`@acme/fancy-flow-salesforce`). */
|
|
117
|
-
name: string;
|
|
118
|
-
/**
|
|
119
|
-
* The canonical kind id this package provides — namespaced, and the string
|
|
120
|
-
* that gets persisted into every document using it.
|
|
121
|
-
*/
|
|
122
|
-
kind: string;
|
|
123
|
-
/**
|
|
124
|
-
* Previous ids this kind still answers to.
|
|
125
|
-
*
|
|
126
|
-
* Core renamed `llm_branch` to `llm_router` and kept every old id working.
|
|
127
|
-
* Third-party packages will rename too, and their documents break the same
|
|
128
|
-
* way core's would have — so packages get the same escape hatch, otherwise
|
|
129
|
-
* only first-party nodes can rename safely.
|
|
130
|
-
*/
|
|
131
|
-
aliases?: string[];
|
|
132
|
-
/**
|
|
133
|
-
* Version of this node's CONFIG shape, independent of the document schema.
|
|
134
|
-
*
|
|
135
|
-
* A node's config evolves on its own clock. Without a declared version, every
|
|
136
|
-
* executor accretes hand-written read-fallbacks forever (MOIC carries one for
|
|
137
|
-
* `routes[].key` → `routes[].port`), because nothing canonicalises old config
|
|
138
|
-
* the way import canonicalises kind ids.
|
|
139
|
-
*/
|
|
140
|
-
configVersion?: number;
|
|
141
|
-
/**
|
|
142
|
-
* The node's SURFACE — its React kind — as source directories.
|
|
143
|
-
*
|
|
144
|
-
* Copied whichever backend the consumer picks, because the editor is React on
|
|
145
|
-
* every host. Kept out of `runtimes` deliberately: fold the two together and
|
|
146
|
-
* a PHP project either loses its palette entry or gains a TypeScript executor
|
|
147
|
-
* it will never run.
|
|
148
|
-
*/
|
|
149
|
-
ui?: string[];
|
|
150
|
-
/** Per-runtime backend source and engine ranges. */
|
|
151
|
-
runtimes: Partial<Record<NodeRuntimeId, NodeRuntimeSpec>>;
|
|
152
|
-
/**
|
|
153
|
-
* Host capabilities this node needs, and whether each is mandatory.
|
|
154
|
-
*
|
|
155
|
-
* Declared so the CLI and the editor can say what to wire BEFORE a run,
|
|
156
|
-
* rather than the node silently no-opping or crashing mid-run.
|
|
157
|
-
*/
|
|
158
|
-
capabilities?: Record<string, CapabilityRequirement>;
|
|
159
|
-
/** Fancy suite packages this node's source imports. See {@link FancyDependency}. */
|
|
160
|
-
fancyDependencies?: FancyDependency[];
|
|
161
|
-
/**
|
|
162
|
-
* Path to this node's golden fixtures, relative to the package root.
|
|
163
|
-
*
|
|
164
|
-
* REQUIRED. Every runtime the package claims runs these same cases, which is
|
|
165
|
-
* what makes "behaves identically on both runtimes" verified rather than
|
|
166
|
-
* asserted. See `./fixtures`.
|
|
167
|
-
*/
|
|
168
|
-
fixtures: string;
|
|
169
|
-
/**
|
|
170
|
-
* Declares the node halts for a person. Mirrors `NodeKindDefinition`.
|
|
171
|
-
*
|
|
172
|
-
* A host-planning fact, not a node internal: a parent that embeds workflows
|
|
173
|
-
* needs to reject a child that can pause, because a paused child wedges the
|
|
174
|
-
* parent — and discovering that at run time means watching a run park.
|
|
175
|
-
*/
|
|
176
|
-
pausesForHuman?: PauseAwaiting;
|
|
177
|
-
/** Whether this node is safe to replay. See `SideEffects`. */
|
|
178
|
-
sideEffects?: SideEffects;
|
|
179
|
-
/** One-line summary — what `search_nodes` matches against. */
|
|
180
|
-
description?: string;
|
|
181
|
-
/**
|
|
182
|
-
* Assigned by the registry, never by the author. Present in a manifest being
|
|
183
|
-
* submitted for publication, it is a claim to a trust signal the author does
|
|
184
|
-
* not get to make.
|
|
185
|
-
*/
|
|
186
|
-
verified?: boolean;
|
|
187
|
-
};
|
|
188
|
-
type ManifestProblem = {
|
|
189
|
-
level: "error" | "warning";
|
|
190
|
-
field: string;
|
|
191
|
-
message: string;
|
|
192
|
-
};
|
|
193
|
-
type ManifestValidation = {
|
|
194
|
-
/** True when there are no `error`-level problems. Warnings do not block. */
|
|
195
|
-
ok: boolean;
|
|
196
|
-
manifest?: NodePackageManifest;
|
|
197
|
-
problems: ManifestProblem[];
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Validate a manifest read from disk or a registry.
|
|
201
|
-
*
|
|
202
|
-
* Returns every problem rather than throwing on the first, because an author
|
|
203
|
-
* fixing a package wants the whole list — a validator that reveals one error
|
|
204
|
-
* per run turns a five-minute fix into five round trips.
|
|
205
|
-
*/
|
|
206
|
-
declare function validateNodeManifest(input: unknown): ManifestValidation;
|
|
207
|
-
/**
|
|
208
|
-
* Check a node against the runtimes a host executes on, and their versions.
|
|
209
|
-
*
|
|
210
|
-
* Two failures live here, and both are errors because the node genuinely
|
|
211
|
-
* cannot run: a runtime the package does not implement at all, and a runtime
|
|
212
|
-
* it implements against an engine newer than the host's.
|
|
213
|
-
*
|
|
214
|
-
* `engineVersions` is optional — pass what the host knows. An unchecked range
|
|
215
|
-
* is reported as a warning rather than passed over silently, because "we did
|
|
216
|
-
* not check" and "it is fine" must not look the same.
|
|
217
|
-
*/
|
|
218
|
-
declare function checkRuntimeSupport(manifest: Pick<NodePackageManifest, "kind" | "runtimes">, hostRuntimes: readonly string[], engineVersions?: Readonly<Record<string, string>>): ManifestProblem[];
|
|
219
|
-
/**
|
|
220
|
-
* Minimal semver range check — `^x.y.z`, `~x.y.z`, `>=x.y.z`, `x.y.z`, `*`.
|
|
221
|
-
*
|
|
222
|
-
* Deliberately small: this runs in the CLI and in CI, and pulling a semver
|
|
223
|
-
* library into the engine for one comparison is not worth the dependency. It
|
|
224
|
-
* covers the forms a manifest actually uses; anything it cannot parse is
|
|
225
|
-
* treated as unsatisfied rather than silently passed, so an unparseable range
|
|
226
|
-
* fails loudly instead of waving a node through.
|
|
227
|
-
*/
|
|
228
|
-
declare function satisfiesRange(version: string, range: string): boolean;
|
|
229
|
-
/**
|
|
230
|
-
* Check that every capability a node needs is wired.
|
|
231
|
-
*
|
|
232
|
-
* A `required` capability that is missing is an ERROR — that is the whole point
|
|
233
|
-
* of the requirement level. It is meant to be surfaced at author time, so an
|
|
234
|
-
* editor can grey the node and name what the host never registered, rather than
|
|
235
|
-
* the node installing cleanly and silently no-opping during a run.
|
|
236
|
-
*
|
|
237
|
-
* An `optional` one is a warning: the node still works, with less.
|
|
238
|
-
*/
|
|
239
|
-
declare function checkCapabilities(manifest: Pick<NodePackageManifest, "kind" | "capabilities">, available: Readonly<Record<string, boolean>>): ManifestProblem[];
|
|
240
|
-
|
|
241
10
|
/**
|
|
242
11
|
* Golden fixtures — the parity guarantee, and a publishing requirement.
|
|
243
12
|
*
|
|
@@ -399,4 +168,4 @@ declare function runFixtures(file: FixtureFile, executor: NodeExecutor): Promise
|
|
|
399
168
|
*/
|
|
400
169
|
declare function validateFixtureFile(input: unknown, expectedKind?: string): string[];
|
|
401
170
|
|
|
402
|
-
export { type
|
|
171
|
+
export { type FixtureCase, type FixtureEventExpectation, type FixtureExpectation, type FixtureFailure, type FixtureFile, type FixtureRunResult, type FixtureStubs, FlowGraph, NodeExecutor, PauseAwaiting, RunEvent, runFixtures, validateFixtureFile };
|
package/dist/index.d.cts
CHANGED
|
@@ -3,19 +3,19 @@ import { ReactNode, CSSProperties, ComponentType } from 'react';
|
|
|
3
3
|
import { ReactFlowProps, Edge, BackgroundVariant, Connection, NodeProps, NodeTypes } from '@xyflow/react';
|
|
4
4
|
import { ConnectionValidatorOptions } from './registry/index.cjs';
|
|
5
5
|
export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerBuiltinKinds, registerRichInputAdapter, resolveNodePorts, resolvePortSpec } from './registry/index.cjs';
|
|
6
|
-
import {
|
|
7
|
-
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData,
|
|
6
|
+
import { b as FlowNode, F as FlowGraph, e as NodeRunStatus, E as ExecutorRegistry } from './types-sOmpCitB.cjs';
|
|
7
|
+
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, a as FlowEdge, c as FlowNodeData, d as FlowNodeKind, N as NodeExecutor, f as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-sOmpCitB.cjs';
|
|
8
8
|
import { WorkflowSchema, WorkflowMetadata } from './schema/index.cjs';
|
|
9
9
|
export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.cjs';
|
|
10
10
|
import { AutoLayoutOptions } from './layout/index.cjs';
|
|
11
11
|
export { AutoLayoutDirection } from './layout/index.cjs';
|
|
12
|
-
import {
|
|
13
|
-
export { D as DocumentConfigField, K as KeyValueConfigField, L as LEGACY_PAUSE_PREFIXES,
|
|
12
|
+
import { c as NodeCategory, d as NodeKindDefinition, a as ConfigField } from './types-D8Dezh9v.cjs';
|
|
13
|
+
export { D as DocumentConfigField, K as KeyValueConfigField, L as LEGACY_PAUSE_PREFIXES, h as PAUSE_PREFIX, P as PauseAwaiting, i as PauseSignal, j as PortSpec, R as RenderBodyContext, t as RepeaterConfigField, u as RepeaterRowField, m as decodePause, n as encodePause, o as isPause, p as pauseForHuman } from './types-D8Dezh9v.cjs';
|
|
14
14
|
import { FlowRunFeedEntry } from './runtime/index.cjs';
|
|
15
15
|
export { HistoryController, UseFlowHistoryReturn, UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './runtime/index.cjs';
|
|
16
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-
|
|
17
|
-
export { c as categoryAccent, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, r as registerNodeKind, v as validateConfig } from './registry-
|
|
18
|
-
import './capabilities-
|
|
16
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-Bjv2ZU6g.cjs';
|
|
17
|
+
export { c as categoryAccent, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, r as registerNodeKind, v as validateConfig } from './registry-Ru5jIS5H.cjs';
|
|
18
|
+
import './capabilities-BtJQTbnw.cjs';
|
|
19
19
|
|
|
20
20
|
type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
|
|
21
21
|
nodes: FlowNode[];
|
package/dist/index.d.ts
CHANGED
|
@@ -3,19 +3,19 @@ import { ReactNode, CSSProperties, ComponentType } from 'react';
|
|
|
3
3
|
import { ReactFlowProps, Edge, BackgroundVariant, Connection, NodeProps, NodeTypes } from '@xyflow/react';
|
|
4
4
|
import { ConnectionValidatorOptions } from './registry/index.js';
|
|
5
5
|
export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerBuiltinKinds, registerRichInputAdapter, resolveNodePorts, resolvePortSpec } from './registry/index.js';
|
|
6
|
-
import {
|
|
7
|
-
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData,
|
|
6
|
+
import { b as FlowNode, F as FlowGraph, e as NodeRunStatus, E as ExecutorRegistry } from './types-sOmpCitB.js';
|
|
7
|
+
export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, a as FlowEdge, c as FlowNodeData, d as FlowNodeKind, N as NodeExecutor, f as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-sOmpCitB.js';
|
|
8
8
|
import { WorkflowSchema, WorkflowMetadata } from './schema/index.js';
|
|
9
9
|
export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.js';
|
|
10
10
|
import { AutoLayoutOptions } from './layout/index.js';
|
|
11
11
|
export { AutoLayoutDirection } from './layout/index.js';
|
|
12
|
-
import {
|
|
13
|
-
export { D as DocumentConfigField, K as KeyValueConfigField, L as LEGACY_PAUSE_PREFIXES,
|
|
12
|
+
import { c as NodeCategory, d as NodeKindDefinition, a as ConfigField } from './types-D6lsIGoe.js';
|
|
13
|
+
export { D as DocumentConfigField, K as KeyValueConfigField, L as LEGACY_PAUSE_PREFIXES, h as PAUSE_PREFIX, P as PauseAwaiting, i as PauseSignal, j as PortSpec, R as RenderBodyContext, t as RepeaterConfigField, u as RepeaterRowField, m as decodePause, n as encodePause, o as isPause, p as pauseForHuman } from './types-D6lsIGoe.js';
|
|
14
14
|
import { FlowRunFeedEntry } from './runtime/index.js';
|
|
15
15
|
export { HistoryController, UseFlowHistoryReturn, UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './runtime/index.js';
|
|
16
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-
|
|
17
|
-
export { c as categoryAccent, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, r as registerNodeKind, v as validateConfig } from './registry-
|
|
18
|
-
import './capabilities-
|
|
16
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, R as RunOptions, d as RunResult, r as runCohort, e as runFlow } from './run-cohort-BnP6ErHi.js';
|
|
17
|
+
export { c as categoryAccent, d as defaultConfigFor, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, r as registerNodeKind, v as validateConfig } from './registry-Df2-bTXZ.js';
|
|
18
|
+
import './capabilities-CkhKj_U_.js';
|
|
19
19
|
|
|
20
20
|
type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
|
|
21
21
|
nodes: FlowNode[];
|
package/dist/layout/index.d.cts
CHANGED
package/dist/layout/index.d.ts
CHANGED
package/dist/llm/prism.d.cts
CHANGED
package/dist/llm/prism.d.ts
CHANGED
package/dist/llm/vercel-ai.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LanguageModel } from 'ai';
|
|
2
|
-
import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-
|
|
3
|
-
import '../types-
|
|
2
|
+
import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-BtJQTbnw.cjs';
|
|
3
|
+
import '../types-sOmpCitB.cjs';
|
|
4
4
|
import '@xyflow/react';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/llm/vercel-ai.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LanguageModel } from 'ai';
|
|
2
|
-
import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-
|
|
3
|
-
import '../types-
|
|
2
|
+
import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-CkhKj_U_.js';
|
|
3
|
+
import '../types-sOmpCitB.js';
|
|
4
4
|
import '@xyflow/react';
|
|
5
5
|
|
|
6
6
|
/**
|