@bian-womp/spark-graph 0.3.2 → 0.3.4

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 (71) hide show
  1. package/lib/cjs/index.cjs +1380 -1106
  2. package/lib/cjs/index.cjs.map +1 -1
  3. package/lib/cjs/src/core/types.d.ts +4 -1
  4. package/lib/cjs/src/core/types.d.ts.map +1 -1
  5. package/lib/cjs/src/index.d.ts +2 -2
  6. package/lib/cjs/src/index.d.ts.map +1 -1
  7. package/lib/cjs/src/misc/utils/json.d.ts +9 -0
  8. package/lib/cjs/src/misc/utils/json.d.ts.map +1 -1
  9. package/lib/cjs/src/runtime/GraphLifecycleApi.d.ts +4 -1
  10. package/lib/cjs/src/runtime/GraphLifecycleApi.d.ts.map +1 -1
  11. package/lib/cjs/src/runtime/GraphRuntime.d.ts +14 -15
  12. package/lib/cjs/src/runtime/GraphRuntime.d.ts.map +1 -1
  13. package/lib/cjs/src/runtime/LocalEngine.d.ts +2 -2
  14. package/lib/cjs/src/runtime/components/EdgePropagator.d.ts +101 -0
  15. package/lib/cjs/src/runtime/components/EdgePropagator.d.ts.map +1 -0
  16. package/lib/cjs/src/runtime/components/Graph.d.ts +31 -0
  17. package/lib/cjs/src/runtime/components/Graph.d.ts.map +1 -0
  18. package/lib/cjs/src/runtime/components/HandleResolver.d.ts +11 -8
  19. package/lib/cjs/src/runtime/components/HandleResolver.d.ts.map +1 -1
  20. package/lib/cjs/src/runtime/components/NodeExecutor.d.ts +108 -0
  21. package/lib/cjs/src/runtime/components/NodeExecutor.d.ts.map +1 -0
  22. package/lib/cjs/src/runtime/components/RunContextManager.d.ts +26 -13
  23. package/lib/cjs/src/runtime/components/RunContextManager.d.ts.map +1 -1
  24. package/lib/cjs/src/runtime/components/graph-utils.d.ts +22 -0
  25. package/lib/cjs/src/runtime/components/graph-utils.d.ts.map +1 -0
  26. package/lib/cjs/src/runtime/components/interfaces.d.ts +9 -13
  27. package/lib/cjs/src/runtime/components/interfaces.d.ts.map +1 -1
  28. package/lib/cjs/src/runtime/components/types.d.ts +1 -10
  29. package/lib/cjs/src/runtime/components/types.d.ts.map +1 -1
  30. package/lib/esm/index.js +1380 -1107
  31. package/lib/esm/index.js.map +1 -1
  32. package/lib/esm/src/core/types.d.ts +4 -1
  33. package/lib/esm/src/core/types.d.ts.map +1 -1
  34. package/lib/esm/src/index.d.ts +2 -2
  35. package/lib/esm/src/index.d.ts.map +1 -1
  36. package/lib/esm/src/misc/utils/json.d.ts +9 -0
  37. package/lib/esm/src/misc/utils/json.d.ts.map +1 -1
  38. package/lib/esm/src/runtime/GraphLifecycleApi.d.ts +4 -1
  39. package/lib/esm/src/runtime/GraphLifecycleApi.d.ts.map +1 -1
  40. package/lib/esm/src/runtime/GraphRuntime.d.ts +14 -15
  41. package/lib/esm/src/runtime/GraphRuntime.d.ts.map +1 -1
  42. package/lib/esm/src/runtime/LocalEngine.d.ts +2 -2
  43. package/lib/esm/src/runtime/components/EdgePropagator.d.ts +101 -0
  44. package/lib/esm/src/runtime/components/EdgePropagator.d.ts.map +1 -0
  45. package/lib/esm/src/runtime/components/Graph.d.ts +31 -0
  46. package/lib/esm/src/runtime/components/Graph.d.ts.map +1 -0
  47. package/lib/esm/src/runtime/components/HandleResolver.d.ts +11 -8
  48. package/lib/esm/src/runtime/components/HandleResolver.d.ts.map +1 -1
  49. package/lib/esm/src/runtime/components/NodeExecutor.d.ts +108 -0
  50. package/lib/esm/src/runtime/components/NodeExecutor.d.ts.map +1 -0
  51. package/lib/esm/src/runtime/components/RunContextManager.d.ts +26 -13
  52. package/lib/esm/src/runtime/components/RunContextManager.d.ts.map +1 -1
  53. package/lib/esm/src/runtime/components/graph-utils.d.ts +22 -0
  54. package/lib/esm/src/runtime/components/graph-utils.d.ts.map +1 -0
  55. package/lib/esm/src/runtime/components/interfaces.d.ts +9 -13
  56. package/lib/esm/src/runtime/components/interfaces.d.ts.map +1 -1
  57. package/lib/esm/src/runtime/components/types.d.ts +1 -10
  58. package/lib/esm/src/runtime/components/types.d.ts.map +1 -1
  59. package/package.json +2 -2
  60. package/lib/cjs/src/runtime/components/ExecutionScheduler.d.ts +0 -56
  61. package/lib/cjs/src/runtime/components/ExecutionScheduler.d.ts.map +0 -1
  62. package/lib/cjs/src/runtime/components/GraphStructure.d.ts +0 -36
  63. package/lib/cjs/src/runtime/components/GraphStructure.d.ts.map +0 -1
  64. package/lib/cjs/src/runtime/components/ValuePropagator.d.ts +0 -46
  65. package/lib/cjs/src/runtime/components/ValuePropagator.d.ts.map +0 -1
  66. package/lib/esm/src/runtime/components/ExecutionScheduler.d.ts +0 -56
  67. package/lib/esm/src/runtime/components/ExecutionScheduler.d.ts.map +0 -1
  68. package/lib/esm/src/runtime/components/GraphStructure.d.ts +0 -36
  69. package/lib/esm/src/runtime/components/GraphStructure.d.ts.map +0 -1
  70. package/lib/esm/src/runtime/components/ValuePropagator.d.ts +0 -46
  71. package/lib/esm/src/runtime/components/ValuePropagator.d.ts.map +0 -1
@@ -1,20 +1,17 @@
1
- import type { ResolvedHandles } from "@bian-womp/spark-protocol";
2
- import type { Registry } from "../../builder/Registry";
1
+ import type { RunMode } from "@bian-womp/spark-protocol";
3
2
  import type { RunContextId } from "./types";
4
3
  /**
5
- * Interface for value propagation operations
4
+ * Interface for edge propagation operations
6
5
  */
7
- export interface IValuePropagator {
6
+ export interface IEdgePropagator {
8
7
  propagate(srcNodeId: string, srcHandle: string, value: unknown, runContextIds?: Set<RunContextId>): void;
9
- propagateInRunContexts(srcNodeId: string, srcHandle: string, value: unknown, runContextIds: Set<RunContextId>): void;
8
+ invalidateDownstream(nodeId: string): void;
10
9
  }
11
10
  /**
12
- * Interface for execution scheduling operations
11
+ * Interface for node execution operations
13
12
  */
14
- export interface IExecutionScheduler {
15
- scheduleInputsChanged(nodeId: string): void;
16
- scheduleInputsChangedWithRunContexts(nodeId: string, runContextIds: Set<RunContextId>): void;
17
- allInboundHaveValue(nodeId: string): boolean;
13
+ export interface INodeExecutor {
14
+ execute(nodeId: string, runContextIds?: Set<RunContextId>): void;
18
15
  }
19
16
  /**
20
17
  * Interface for handle resolution operations
@@ -26,9 +23,8 @@ export interface IHandleResolver {
26
23
  * Interface for runtime coordination operations
27
24
  * Implemented by GraphRuntime to coordinate cross-component operations
28
25
  */
29
- export interface IRuntimeCoordinator {
30
- updateNodeHandles(nodeId: string, handles: ResolvedHandles, registry: Registry): void;
31
- invalidateDownstream(nodeId: string): void;
26
+ export interface IRuntime {
32
27
  isPaused(): boolean;
28
+ getRunMode(): RunMode | null;
33
29
  }
34
30
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CACP,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAChC,IAAI,CAAC;IACR,sBAAsB,CACpB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,EACd,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,GAC/B,IAAI,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,oCAAoC,CAClC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,GAC/B,IAAI,CAAC;IACR,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,CACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,QAAQ,GACjB,IAAI,CAAC;IACR,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,QAAQ,IAAI,OAAO,CAAC;CACrB"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,CACP,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAChC,IAAI,CAAC;IACR,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CAClE;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,IAAI,OAAO,CAAC;IACpB,UAAU,IAAI,OAAO,GAAG,IAAI,CAAC;CAC9B"}
@@ -20,7 +20,7 @@ export interface RuntimeNode<State = any> extends GraphNodeDefinition {
20
20
  }>;
21
21
  lastScheduledAt?: number;
22
22
  stats: RuntimeNodeStats;
23
- activeRunContexts: Set<string>;
23
+ activeRunContextIds: Set<string>;
24
24
  }
25
25
  export interface RuntimeEdge extends GraphEdgeDefinition {
26
26
  convert?: (value: unknown) => unknown;
@@ -31,13 +31,4 @@ export interface RuntimeEdge extends GraphEdgeDefinition {
31
31
  effectiveTypeId: string;
32
32
  }
33
33
  export type RunContextId = string;
34
- export interface RunContext {
35
- id: RunContextId;
36
- startNodes: Set<string>;
37
- cancelledNodes: Set<string>;
38
- pending: number;
39
- skipPropagateValues: boolean;
40
- propagate: boolean;
41
- resolve?: () => void;
42
- }
43
34
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,QAAQ,EACT,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,WAAW,CAAC,KAAK,GAAG,GAAG,CAAE,SAAQ,mBAAmB;IACnE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAChC,SAAS,EAAE,kBAAkB,CAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtB,KAAK,EACL,GAAG,CACJ,CAAC,WAAW,CAAC,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CA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jE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,gBAAgB,CAAC;IAExB,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,KAAK,EAAE,gBAAgB,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bian-womp/spark-graph",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Spark Graph - Node-based computation graph system",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "node": ">=20.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@bian-womp/spark-protocol": "^0.3.2"
38
+ "@bian-womp/spark-protocol": "^0.3.4"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@rollup/plugin-commonjs": "^28.0.6",
@@ -1,56 +0,0 @@
1
- import type { ExecutionContext } from "../../core/types";
2
- import type { RuntimeNode, RunContextId } from "./types";
3
- import type { GraphStructure } from "./GraphStructure";
4
- import type { EventEmitter } from "./EventEmitter";
5
- import type { RunContextManager } from "./RunContextManager";
6
- import { IValuePropagator, IRuntimeCoordinator } from "./interfaces";
7
- /**
8
- * ExecutionScheduler component - handles node execution scheduling and lifecycle
9
- */
10
- export declare class ExecutionScheduler {
11
- private graphStructure;
12
- private eventEmitter;
13
- private runContextManager;
14
- private valuePropagator;
15
- private runtimeCoordinator;
16
- private environment;
17
- constructor(graphStructure: GraphStructure, eventEmitter: EventEmitter, runContextManager: RunContextManager, valuePropagator: IValuePropagator, runtimeCoordinator: IRuntimeCoordinator, environment?: Record<string, unknown>);
18
- setEnvironment(environment: Record<string, unknown>): void;
19
- /**
20
- * Check if all inbound edges for a node have values
21
- */
22
- allInboundHaveValue(nodeId: string): boolean;
23
- /**
24
- * Compute effective inputs for a node by merging real inputs with defaults
25
- */
26
- getEffectiveInputs(nodeId: string): Record<string, unknown>;
27
- /**
28
- * Create an execution context for a node
29
- */
30
- createExecutionContext(nodeId: string, node: RuntimeNode<any>, inputs: Record<string, unknown>, runId: string, abortSignal: AbortSignal, runContextIds?: Set<RunContextId>, options?: {
31
- emitHandler?: (handle: string, value: unknown) => void;
32
- reportProgress?: (p: number) => void;
33
- }): ExecutionContext<any>;
34
- /**
35
- * Schedule a node for execution when its inputs change
36
- */
37
- scheduleInputsChanged(nodeId: string): void;
38
- /**
39
- * Schedule a node for execution with run-context IDs
40
- */
41
- scheduleInputsChangedWithRunContexts(nodeId: string, runContextIds: Set<RunContextId>): void;
42
- /**
43
- * Internal method for scheduling (also used by GraphRuntime)
44
- */
45
- scheduleInputsChangedInternal(nodeId: string, runContextIds?: Set<RunContextId>): void;
46
- /**
47
- * Cancel all active runs for a node
48
- */
49
- cancelNodeActiveRuns(node: RuntimeNode, reason: "snapshot" | "node-deleted" | "user-cancelled"): void;
50
- /**
51
- * Cancel runs for multiple nodes.
52
- * Can be called for snapshot/undo/redo operations or user-initiated cancellation.
53
- */
54
- cancelNodeRuns(nodeIds: string[], reason?: "snapshot" | "user-cancelled"): void;
55
- }
56
- //# sourceMappingURL=ExecutionScheduler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExecutionScheduler.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/ExecutionScheduler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAA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AAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QACvD,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;KACtC,GACA,gBAAgB,CAAC,GAAG,CAAC;IA+ExB;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI3C;;OAEG;IACH,oCAAoC,CAClC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,GAC/B,IAAI;IAIP;;OAEG;IACH,6BAA6B,CAC3B,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAChC,IAAI;IA2PP;;OAEG;IACH,oBAAoB,CAClB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,UAAU,GAAG,cAAc,GAAG,gBAAgB,GACrD,IAAI;IAiCP;;;OAGG;IACH,cAAc,CACZ,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,GAAE,UAAU,GAAG,gBAAmC,GACvD,IAAI;CAgDR"}
@@ -1,36 +0,0 @@
1
- import type { GraphDefinition, ResolvedHandles } from "@bian-womp/spark-protocol";
2
- import { Registry } from "../../builder/Registry";
3
- import type { RuntimeNode, RuntimeEdge } from "./types";
4
- /**
5
- * GraphStructure component - manages nodes, edges, and handle resolution
6
- */
7
- export declare class GraphStructure {
8
- private nodes;
9
- private edges;
10
- private registry?;
11
- private resolvedByNode;
12
- constructor(registry?: Registry);
13
- getNode(nodeId: string): RuntimeNode<any> | undefined;
14
- getNodes(): Map<string, RuntimeNode<any>>;
15
- setNode(nodeId: string, node: RuntimeNode<any>): void;
16
- deleteNode(nodeId: string): void;
17
- hasNode(nodeId: string): boolean;
18
- getEdges(): RuntimeEdge[];
19
- setEdges(edges: RuntimeEdge[]): void;
20
- getRegistry(): Registry | undefined;
21
- setRegistry(registry: Registry): void;
22
- getResolvedHandles(nodeId: string): ResolvedHandles | undefined;
23
- setResolvedHandles(nodeId: string, handles: ResolvedHandles): void;
24
- getResolvedHandlesMap(): Map<string, ResolvedHandles>;
25
- static computeResolvedHandleMap(def: GraphDefinition, registry: Registry, environment?: Record<string, unknown>): {
26
- map: Map<string, ResolvedHandles>;
27
- pending: Set<string>;
28
- };
29
- static buildEdges(def: GraphDefinition, registry: Registry, resolvedByNode: Map<string, ResolvedHandles>): RuntimeEdge[];
30
- clear(): void;
31
- static buildEdgeConverters(srcDeclared: string | string[] | undefined, dstDeclared: string | undefined, registry: Registry, edgeLabel: string): {
32
- convert?: (v: unknown) => unknown;
33
- convertAsync?: (v: unknown, signal: AbortSignal) => Promise<unknown>;
34
- };
35
- }
36
- //# sourceMappingURL=GraphStructure.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphStructure.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/GraphStructure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMlD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGxD;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,QAAQ,CAAC,CAAW;IAC5B,OAAO,CAAC,cAAc,CAAsC;gBAEhD,QAAQ,CAAC,EAAE,QAAQ;IAK/B,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,SAAS;IAIrD,QAAQ,IAAI,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAIzC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;IAIrD,UAAU,CAAC,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,CAAC;KACtE;CAmFF"}
@@ -1,46 +0,0 @@
1
- import type { RunContextId } from "./types";
2
- import type { GraphStructure } from "./GraphStructure";
3
- import type { EventEmitter } from "./EventEmitter";
4
- import type { RunContextManager } from "./RunContextManager";
5
- import { IExecutionScheduler, IHandleResolver, IRuntimeCoordinator } from "./interfaces";
6
- /**
7
- * ValuePropagator component - handles value propagation through edges
8
- */
9
- export declare class ValuePropagator {
10
- private graphStructure;
11
- private eventEmitter;
12
- private runContextManager;
13
- private executionScheduler;
14
- private handleResolver;
15
- private runtimeCoordinator;
16
- private arrayInputBuckets;
17
- constructor(graphStructure: GraphStructure, eventEmitter: EventEmitter, runContextManager: RunContextManager, handleResolver: IHandleResolver, runtimeCoordinator: IRuntimeCoordinator);
18
- /**
19
- * Set the execution scheduler (called after construction to resolve circular dependency)
20
- */
21
- setExecutionScheduler(executionScheduler: IExecutionScheduler): void;
22
- /**
23
- * Propagate value through edges
24
- * @param runContextIds - Optional set of run-context IDs. If provided, propagation is run-context aware.
25
- * If undefined or empty, behaves like auto mode (always propagates values and execution).
26
- */
27
- propagate(srcNodeId: string, srcHandle: string, value: unknown, runContextIds?: Set<RunContextId>): void;
28
- /**
29
- * Propagate value in run-context aware mode (convenience method)
30
- */
31
- propagateInRunContexts(srcNodeId: string, srcHandle: string, value: unknown, runContextIds: Set<RunContextId>): void;
32
- /**
33
- * Re-emit all outputs from a node (used when graph updates)
34
- * Only re-emits outputs that are valid according to resolved handles
35
- */
36
- reemitNodeOutputs(nodeId: string): void;
37
- /**
38
- * Clear array input buckets for a node (when node is deleted)
39
- */
40
- clearArrayBuckets(nodeId: string): void;
41
- /**
42
- * Clear all array buckets
43
- */
44
- clearAllArrayBuckets(): void;
45
- }
46
- //# sourceMappingURL=ValuePropagator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ValuePropagator.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/ValuePropagator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE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}
@@ -1,56 +0,0 @@
1
- import type { ExecutionContext } from "../../core/types";
2
- import type { RuntimeNode, RunContextId } from "./types";
3
- import type { GraphStructure } from "./GraphStructure";
4
- import type { EventEmitter } from "./EventEmitter";
5
- import type { RunContextManager } from "./RunContextManager";
6
- import { IValuePropagator, IRuntimeCoordinator } from "./interfaces";
7
- /**
8
- * ExecutionScheduler component - handles node execution scheduling and lifecycle
9
- */
10
- export declare class ExecutionScheduler {
11
- private graphStructure;
12
- private eventEmitter;
13
- private runContextManager;
14
- private valuePropagator;
15
- private runtimeCoordinator;
16
- private environment;
17
- constructor(graphStructure: GraphStructure, eventEmitter: EventEmitter, runContextManager: RunContextManager, valuePropagator: IValuePropagator, runtimeCoordinator: IRuntimeCoordinator, environment?: Record<string, unknown>);
18
- setEnvironment(environment: Record<string, unknown>): void;
19
- /**
20
- * Check if all inbound edges for a node have values
21
- */
22
- allInboundHaveValue(nodeId: string): boolean;
23
- /**
24
- * Compute effective inputs for a node by merging real inputs with defaults
25
- */
26
- getEffectiveInputs(nodeId: string): Record<string, unknown>;
27
- /**
28
- * Create an execution context for a node
29
- */
30
- createExecutionContext(nodeId: string, node: RuntimeNode<any>, inputs: Record<string, unknown>, runId: string, abortSignal: AbortSignal, runContextIds?: Set<RunContextId>, options?: {
31
- emitHandler?: (handle: string, value: unknown) => void;
32
- reportProgress?: (p: number) => void;
33
- }): ExecutionContext<any>;
34
- /**
35
- * Schedule a node for execution when its inputs change
36
- */
37
- scheduleInputsChanged(nodeId: string): void;
38
- /**
39
- * Schedule a node for execution with run-context IDs
40
- */
41
- scheduleInputsChangedWithRunContexts(nodeId: string, runContextIds: Set<RunContextId>): void;
42
- /**
43
- * Internal method for scheduling (also used by GraphRuntime)
44
- */
45
- scheduleInputsChangedInternal(nodeId: string, runContextIds?: Set<RunContextId>): void;
46
- /**
47
- * Cancel all active runs for a node
48
- */
49
- cancelNodeActiveRuns(node: RuntimeNode, reason: "snapshot" | "node-deleted" | "user-cancelled"): void;
50
- /**
51
- * Cancel runs for multiple nodes.
52
- * Can be called for snapshot/undo/redo operations or user-initiated cancellation.
53
- */
54
- cancelNodeRuns(nodeIds: string[], reason?: "snapshot" | "user-cancelled"): void;
55
- }
56
- //# sourceMappingURL=ExecutionScheduler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExecutionScheduler.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/ExecutionScheduler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAErE;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,eAAe,CAAmB;IAC1C,OAAO,CAAC,kBAAkB,CAAsB;IAChD,OAAO,CAAC,WAAW,CAA+B;gBAGhD,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,gBAAgB,EACjC,kBAAkB,EAAE,mBAAmB,EACvC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAUvC,cAAc,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAI1D;;OAEG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAY5C;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAmD3D;;OAEG;IACH,sBAAsB,CACpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,WAAW,EACxB,aAAa,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,EACjC,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QACvD,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;KACtC,GACA,gBAAgB,CAAC,GAAG,CAAC;IA+ExB;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI3C;;OAEG;IACH,oCAAoC,CAClC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,GAC/B,IAAI;IAIP;;OAEG;IACH,6BAA6B,CAC3B,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAChC,IAAI;IA2PP;;OAEG;IACH,oBAAoB,CAClB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,UAAU,GAAG,cAAc,GAAG,gBAAgB,GACrD,IAAI;IAiCP;;;OAGG;IACH,cAAc,CACZ,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,GAAE,UAAU,GAAG,gBAAmC,GACvD,IAAI;CAgDR"}
@@ -1,36 +0,0 @@
1
- import type { GraphDefinition, ResolvedHandles } from "@bian-womp/spark-protocol";
2
- import { Registry } from "../../builder/Registry";
3
- import type { RuntimeNode, RuntimeEdge } from "./types";
4
- /**
5
- * GraphStructure component - manages nodes, edges, and handle resolution
6
- */
7
- export declare class GraphStructure {
8
- private nodes;
9
- private edges;
10
- private registry?;
11
- private resolvedByNode;
12
- constructor(registry?: Registry);
13
- getNode(nodeId: string): RuntimeNode<any> | undefined;
14
- getNodes(): Map<string, RuntimeNode<any>>;
15
- setNode(nodeId: string, node: RuntimeNode<any>): void;
16
- deleteNode(nodeId: string): void;
17
- hasNode(nodeId: string): boolean;
18
- getEdges(): RuntimeEdge[];
19
- setEdges(edges: RuntimeEdge[]): void;
20
- getRegistry(): Registry | undefined;
21
- setRegistry(registry: Registry): void;
22
- getResolvedHandles(nodeId: string): ResolvedHandles | undefined;
23
- setResolvedHandles(nodeId: string, handles: ResolvedHandles): void;
24
- getResolvedHandlesMap(): Map<string, ResolvedHandles>;
25
- static computeResolvedHandleMap(def: GraphDefinition, registry: Registry, environment?: Record<string, unknown>): {
26
- map: Map<string, ResolvedHandles>;
27
- pending: Set<string>;
28
- };
29
- static buildEdges(def: GraphDefinition, registry: Registry, resolvedByNode: Map<string, ResolvedHandles>): RuntimeEdge[];
30
- clear(): void;
31
- static buildEdgeConverters(srcDeclared: string | string[] | undefined, dstDeclared: string | undefined, registry: Registry, edgeLabel: string): {
32
- convert?: (v: unknown) => unknown;
33
- convertAsync?: (v: unknown, signal: AbortSignal) => Promise<unknown>;
34
- };
35
- }
36
- //# sourceMappingURL=GraphStructure.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphStructure.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/GraphStructure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMlD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGxD;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,Q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I,IAAI;IAOb,MAAM,CAAC,mBAAmB,CACxB,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,EAC1C,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,MAAM,GAChB;QACD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;QAClC,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;KACtE;CAmFF"}
@@ -1,46 +0,0 @@
1
- import type { RunContextId } from "./types";
2
- import type { GraphStructure } from "./GraphStructure";
3
- import type { EventEmitter } from "./EventEmitter";
4
- import type { RunContextManager } from "./RunContextManager";
5
- import { IExecutionScheduler, IHandleResolver, IRuntimeCoordinator } from "./interfaces";
6
- /**
7
- * ValuePropagator component - handles value propagation through edges
8
- */
9
- export declare class ValuePropagator {
10
- private graphStructure;
11
- private eventEmitter;
12
- private runContextManager;
13
- private executionScheduler;
14
- private handleResolver;
15
- private runtimeCoordinator;
16
- private arrayInputBuckets;
17
- constructor(graphStructure: GraphStructure, eventEmitter: EventEmitter, runContextManager: RunContextManager, handleResolver: IHandleResolver, runtimeCoordinator: IRuntimeCoordinator);
18
- /**
19
- * Set the execution scheduler (called after construction to resolve circular dependency)
20
- */
21
- setExecutionScheduler(executionScheduler: IExecutionScheduler): void;
22
- /**
23
- * Propagate value through edges
24
- * @param runContextIds - Optional set of run-context IDs. If provided, propagation is run-context aware.
25
- * If undefined or empty, behaves like auto mode (always propagates values and execution).
26
- */
27
- propagate(srcNodeId: string, srcHandle: string, value: unknown, runContextIds?: Set<RunContextId>): void;
28
- /**
29
- * Propagate value in run-context aware mode (convenience method)
30
- */
31
- propagateInRunContexts(srcNodeId: string, srcHandle: string, value: unknown, runContextIds: Set<RunContextId>): void;
32
- /**
33
- * Re-emit all outputs from a node (used when graph updates)
34
- * Only re-emits outputs that are valid according to resolved handles
35
- */
36
- reemitNodeOutputs(nodeId: string): void;
37
- /**
38
- * Clear array input buckets for a node (when node is deleted)
39
- */
40
- clearArrayBuckets(nodeId: string): void;
41
- /**
42
- * Clear all array buckets
43
- */
44
- clearAllArrayBuckets(): void;
45
- }
46
- //# sourceMappingURL=ValuePropagator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ValuePropagator.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/ValuePropagator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,kBAAkB,CAAuB;IACjD,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,kBAAkB,CAAsB;IAChD,OAAO,CAAC,iBAAiB,CAGrB;gBAGF,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,eAAe,EAC/B,kBAAkB,EAAE,mBAAmB;IASzC;;OAEG;IACH,qBAAqB,CAAC,kBAAkB,EAAE,mBAAmB,GAAG,IAAI;IAIpE;;;;OAIG;IACH,SAAS,CACP,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,OAAO,EACd,aAAa,CAAC,EAAE,GAAG,CAAC,YAA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