@executioncontrolprotocol/app 0.50.0 → 0.60.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/README.md +4 -31
- package/dist/client/api.d.ts +107 -0
- package/dist/client/api.d.ts.map +1 -0
- package/dist/client/api.js +216 -0
- package/dist/client/api.js.map +1 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +11 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/launch.d.ts +47 -0
- package/dist/client/launch.d.ts.map +1 -0
- package/dist/client/launch.js +50 -0
- package/dist/client/launch.js.map +1 -0
- package/dist/client/results.d.ts +85 -0
- package/dist/client/results.d.ts.map +1 -0
- package/dist/client/results.js +181 -0
- package/dist/client/results.js.map +1 -0
- package/dist/client/run-follow.d.ts +40 -0
- package/dist/client/run-follow.d.ts.map +1 -0
- package/dist/client/run-follow.js +91 -0
- package/dist/client/run-follow.js.map +1 -0
- package/dist/client/sse.d.ts +99 -0
- package/dist/client/sse.d.ts.map +1 -0
- package/dist/client/sse.js +168 -0
- package/dist/client/sse.js.map +1 -0
- package/dist/form/run-input-fields.d.ts +85 -0
- package/dist/form/run-input-fields.d.ts.map +1 -0
- package/dist/form/run-input-fields.js +147 -0
- package/dist/form/run-input-fields.js.map +1 -0
- package/dist/graph/edge-manifest.d.ts +87 -0
- package/dist/graph/edge-manifest.d.ts.map +1 -0
- package/dist/graph/edge-manifest.js +261 -0
- package/dist/graph/edge-manifest.js.map +1 -0
- package/dist/graph/edge-panel-logic.d.ts +24 -0
- package/dist/graph/edge-panel-logic.d.ts.map +1 -0
- package/dist/graph/edge-panel-logic.js +36 -0
- package/dist/graph/edge-panel-logic.js.map +1 -0
- package/dist/graph/execution-to-reactflow.d.ts +14 -0
- package/dist/graph/execution-to-reactflow.d.ts.map +1 -0
- package/dist/graph/execution-to-reactflow.js +497 -0
- package/dist/graph/execution-to-reactflow.js.map +1 -0
- package/dist/graph/extract-data-edges.d.ts +111 -6
- package/dist/graph/extract-data-edges.d.ts.map +1 -1
- package/dist/graph/extract-data-edges.js +477 -81
- package/dist/graph/extract-data-edges.js.map +1 -1
- package/dist/graph/index.d.ts +17 -9
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +16 -8
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/io-from-schema.d.ts +27 -19
- package/dist/graph/io-from-schema.d.ts.map +1 -1
- package/dist/graph/io-from-schema.js +56 -88
- package/dist/graph/io-from-schema.js.map +1 -1
- package/dist/graph/json-schema.d.ts +29 -0
- package/dist/graph/json-schema.d.ts.map +1 -0
- package/dist/graph/json-schema.js +63 -0
- package/dist/graph/json-schema.js.map +1 -0
- package/dist/graph/layout.d.ts +19 -2
- package/dist/graph/layout.d.ts.map +1 -1
- package/dist/graph/layout.js +51 -37
- package/dist/graph/layout.js.map +1 -1
- package/dist/graph/map-run-events.d.ts +83 -3
- package/dist/graph/map-run-events.d.ts.map +1 -1
- package/dist/graph/map-run-events.js +262 -21
- package/dist/graph/map-run-events.js.map +1 -1
- package/dist/graph/markers.d.ts +27 -0
- package/dist/graph/markers.d.ts.map +1 -0
- package/dist/graph/markers.js +41 -0
- package/dist/graph/markers.js.map +1 -0
- package/dist/graph/ports-from-schema.d.ts +35 -0
- package/dist/graph/ports-from-schema.d.ts.map +1 -0
- package/dist/graph/ports-from-schema.js +215 -0
- package/dist/graph/ports-from-schema.js.map +1 -0
- package/dist/graph/progress.d.ts +25 -14
- package/dist/graph/progress.d.ts.map +1 -1
- package/dist/graph/progress.js +38 -16
- package/dist/graph/progress.js.map +1 -1
- package/dist/graph/types.d.ts +279 -45
- package/dist/graph/types.d.ts.map +1 -1
- package/dist/graph/types.js +20 -1
- package/dist/graph/types.js.map +1 -1
- package/dist/graph/value-schema-hint.d.ts +15 -17
- package/dist/graph/value-schema-hint.d.ts.map +1 -1
- package/dist/graph/value-schema-hint.js +67 -146
- package/dist/graph/value-schema-hint.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +6 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +7 -0
- package/dist/version.js.map +1 -0
- package/dist/web/assets/index--o6Bbdb5.js +21 -0
- package/dist/web/assets/index-CRT7x_c8.css +1 -0
- package/dist/web/index.html +4 -4
- package/package.json +18 -30
- package/dist/graph/patch-source.d.ts +0 -8
- package/dist/graph/patch-source.d.ts.map +0 -1
- package/dist/graph/patch-source.js +0 -17
- package/dist/graph/patch-source.js.map +0 -1
- package/dist/graph/ports-from-zod.d.ts +0 -28
- package/dist/graph/ports-from-zod.d.ts.map +0 -1
- package/dist/graph/ports-from-zod.js +0 -177
- package/dist/graph/ports-from-zod.js.map +0 -1
- package/dist/graph/workflow-to-reactflow.d.ts +0 -11
- package/dist/graph/workflow-to-reactflow.d.ts.map +0 -1
- package/dist/graph/workflow-to-reactflow.js +0 -214
- package/dist/graph/workflow-to-reactflow.js.map +0 -1
- package/dist/host/adapter.d.ts +0 -59
- package/dist/host/adapter.d.ts.map +0 -1
- package/dist/host/adapter.js +0 -2
- package/dist/host/adapter.js.map +0 -1
- package/dist/host/constants.d.ts +0 -21
- package/dist/host/constants.d.ts.map +0 -1
- package/dist/host/constants.js +0 -21
- package/dist/host/constants.js.map +0 -1
- package/dist/host/local-client.d.ts +0 -36
- package/dist/host/local-client.d.ts.map +0 -1
- package/dist/host/local-client.js +0 -131
- package/dist/host/local-client.js.map +0 -1
- package/dist/host/protocol.d.ts +0 -75
- package/dist/host/protocol.d.ts.map +0 -1
- package/dist/host/protocol.js +0 -2
- package/dist/host/protocol.js.map +0 -1
- package/dist/host/round-trip.d.ts +0 -19
- package/dist/host/round-trip.d.ts.map +0 -1
- package/dist/host/round-trip.js +0 -37
- package/dist/host/round-trip.js.map +0 -1
- package/dist/web/assets/index-7fmDKtvn.js +0 -105
- package/dist/web/assets/index-BffrVIsz.css +0 -1
|
@@ -1,7 +1,59 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
1
|
+
import type { Node, StepNode } from "@executioncontrolprotocol/protocol";
|
|
2
|
+
import { type ReactFlowEdge } from "./types.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Whole-document output handle, used when a read has no field path.
|
|
5
|
+
* @category App
|
|
6
|
+
*/
|
|
7
|
+
export declare const OUTPUT_HANDLE_ID = "output";
|
|
8
|
+
/**
|
|
9
|
+
* Synthetic target handle for a step `expr` gate.
|
|
10
|
+
* @category App
|
|
11
|
+
*/
|
|
12
|
+
export declare const EXPR_HANDLE_ID = "expr";
|
|
13
|
+
/**
|
|
14
|
+
* Collect every step under a node tree (parallel, branch and loop), in document order.
|
|
15
|
+
* @category App
|
|
16
|
+
*/
|
|
17
|
+
export declare function collectSteps(nodes: Node[], out: StepNode[]): void;
|
|
18
|
+
interface LoopScope {
|
|
19
|
+
/** Loop node id. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** Loop mode. */
|
|
22
|
+
mode: "while" | "for" | "forEach";
|
|
23
|
+
/** Item state key (`for` / `forEach`). */
|
|
24
|
+
as: string;
|
|
25
|
+
/** Output array key (`forEach`). */
|
|
26
|
+
into: string;
|
|
27
|
+
/** `ref` path. */
|
|
28
|
+
refPath: string;
|
|
29
|
+
/** `collect` path (`forEach`). */
|
|
30
|
+
collectPath: string;
|
|
31
|
+
/** Loop `expr` source when set. */
|
|
32
|
+
expr?: string;
|
|
33
|
+
/** Body step ids. */
|
|
34
|
+
bodyStepIds: Set<string>;
|
|
35
|
+
/** Document order at the loop node (before the body). */
|
|
36
|
+
startOrder: number;
|
|
37
|
+
/** Document order after the body. */
|
|
38
|
+
endOrder: number;
|
|
39
|
+
}
|
|
40
|
+
interface StepPlacement {
|
|
41
|
+
step: StepNode;
|
|
42
|
+
order: number;
|
|
43
|
+
/** Enclosing loop node ids, innermost last (all loop modes). */
|
|
44
|
+
enclosingLoopStack: string[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Document-order step placements and loop scopes for edge extraction.
|
|
48
|
+
* @category App
|
|
49
|
+
*/
|
|
50
|
+
export declare function walkManifestPlacements(nodes: Node[]): {
|
|
51
|
+
placements: StepPlacement[];
|
|
52
|
+
loopById: Map<string, LoopScope>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Parse `state.<key>[.<rest>]` (or `<key>[.<rest>]`, as `$state` writes it) into the
|
|
56
|
+
* state key and the optional nested field path.
|
|
5
57
|
* @category App
|
|
6
58
|
*/
|
|
7
59
|
export declare function parseStateRef(refPath: string): {
|
|
@@ -9,9 +61,62 @@ export declare function parseStateRef(refPath: string): {
|
|
|
9
61
|
fieldPath: string;
|
|
10
62
|
} | undefined;
|
|
11
63
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
64
|
+
* Longest output port id that is `fieldPath` or a dotted prefix of it. Falls back to the
|
|
65
|
+
* first path segment, or `output` when the path is empty.
|
|
66
|
+
* @category App
|
|
67
|
+
*/
|
|
68
|
+
export declare function longestMatchingPortId(fieldPath: string, portIds?: readonly string[]): string;
|
|
69
|
+
/**
|
|
70
|
+
* Longest input port id matching `inputPath`, or the full dotted path when none match
|
|
71
|
+
* (so the encoder can create a nested target handle).
|
|
72
|
+
* @category App
|
|
73
|
+
*/
|
|
74
|
+
export declare function resolveInputHandle(inputPath: string, portIds?: readonly string[]): string;
|
|
75
|
+
/**
|
|
76
|
+
* Recursively visit every `$ref` / `$state` in an input value tree, including the
|
|
77
|
+
* `$script.params` of a script marker (reported at the script's own input path).
|
|
78
|
+
* `$expr` and `$script` bodies are not walked; see {@link walkInputExprs}.
|
|
79
|
+
* @category App
|
|
80
|
+
*/
|
|
81
|
+
export declare function walkInputRefs(value: unknown, path: string, visit: (inputPath: string, refPath: string) => void): void;
|
|
82
|
+
/**
|
|
83
|
+
* Recursively visit every `$expr` in an input value tree, including `$expr` values in
|
|
84
|
+
* `$script.params` (reported at the script's own input path).
|
|
85
|
+
* @category App
|
|
86
|
+
*/
|
|
87
|
+
export declare function walkInputExprs(value: unknown, path: string, visit: (inputPath: string, source: string) => void): void;
|
|
88
|
+
/**
|
|
89
|
+
* Short badge text for an `expr` source: whitespace collapsed and, for a concise arrow
|
|
90
|
+
* function, the parameter head dropped (`(state) => state.on` becomes `state.on`).
|
|
91
|
+
* Returns an empty string when there is no expression.
|
|
92
|
+
* @category App
|
|
93
|
+
*/
|
|
94
|
+
export declare function formatExprBadge(expr?: string): string;
|
|
95
|
+
/**
|
|
96
|
+
* State paths an expression source reads, best effort: `<param>.a.b`, `<param>?.a` and
|
|
97
|
+
* `<param>["a"]` accesses on the function's first parameter. Paths are returned without
|
|
98
|
+
* the parameter prefix, deduplicated, in source order.
|
|
99
|
+
* @category App
|
|
100
|
+
*/
|
|
101
|
+
export declare function stateReadsFromExpr(source: string): string[];
|
|
102
|
+
/**
|
|
103
|
+
* First state key an expression reads (`state.doc.title` gives `doc.title`), or
|
|
104
|
+
* `undefined` when it reads none.
|
|
105
|
+
* @category App
|
|
106
|
+
*/
|
|
107
|
+
export declare function stateKeyFromExpr(source: string): string | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Data edges from step `input` reads: `$ref` / `$state` paths (including nested input
|
|
110
|
+
* paths and `$script.params`).
|
|
111
|
+
* A read resolves to the last earlier step committing that key, else the Inputs node when
|
|
112
|
+
* `acceptsKeys` has it, else any other step committing it (a loop-carried value).
|
|
113
|
+
* @category App
|
|
114
|
+
*/
|
|
115
|
+
export declare function extractDataEdges(nodes: Node[], acceptsKeys?: ReadonlySet<string>, outputPortIdsByStepId?: ReadonlyMap<string, readonly string[]>, inputPortIdsByStepId?: ReadonlyMap<string, readonly string[]>): ReactFlowEdge[];
|
|
116
|
+
/**
|
|
117
|
+
* Data edges from the state paths a step's `expr` gate reads into its `expr` handle.
|
|
14
118
|
* @category App
|
|
15
119
|
*/
|
|
16
|
-
export declare function
|
|
120
|
+
export declare function extractExprEdges(nodes: Node[], acceptsKeys?: ReadonlySet<string>, outputPortIdsByStepId?: ReadonlyMap<string, readonly string[]>): ReactFlowEdge[];
|
|
121
|
+
export {};
|
|
17
122
|
//# sourceMappingURL=extract-data-edges.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-data-edges.d.ts","sourceRoot":"","sources":["../../src/graph/extract-data-edges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"extract-data-edges.d.ts","sourceRoot":"","sources":["../../src/graph/extract-data-edges.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAIxE,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,YAAY,CAAA;AAEnB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,WAAW,CAAA;AAExC;;;GAGG;AACH,eAAO,MAAM,cAAc,SAAS,CAAA;AAIpC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,IAAI,CAcjE;AAED,UAAU,SAAS;IACjB,oBAAoB;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,iBAAiB;IACjB,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAAA;IACjC,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAA;IACV,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,kBAAkB;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qBAAqB;IACrB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAA;IAClB,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAA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