flowcraft 2.0.0 → 2.1.1

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 (87) hide show
  1. package/README.md +51 -5
  2. package/dist/analysis.d.ts +1 -1
  3. package/dist/analysis.js +1 -1
  4. package/dist/{chunk-RYTIQZIB.js → chunk-3XVVR2SR.js} +167 -53
  5. package/dist/chunk-3XVVR2SR.js.map +1 -0
  6. package/dist/{chunk-6DNEDIIT.js → chunk-4A627Q6L.js} +47 -23
  7. package/dist/chunk-4A627Q6L.js.map +1 -0
  8. package/dist/{chunk-VFC342WL.js → chunk-4PELJWF7.js} +6 -6
  9. package/dist/chunk-4PELJWF7.js.map +1 -0
  10. package/dist/{chunk-WXT3YEWU.js → chunk-5ZXV3R5D.js} +2 -2
  11. package/dist/chunk-5ZXV3R5D.js.map +1 -0
  12. package/dist/{chunk-UYPIWXZG.js → chunk-CSZ6EOWG.js} +9 -10
  13. package/dist/chunk-CSZ6EOWG.js.map +1 -0
  14. package/dist/chunk-CYHZ2YVH.js +24 -0
  15. package/dist/chunk-CYHZ2YVH.js.map +1 -0
  16. package/dist/{chunk-J3RNCPED.js → chunk-DSYAC4WB.js} +2 -2
  17. package/dist/chunk-DSYAC4WB.js.map +1 -0
  18. package/dist/{chunk-M23P46ZL.js → chunk-HN72TZY5.js} +10 -5
  19. package/dist/chunk-HN72TZY5.js.map +1 -0
  20. package/dist/{chunk-MICPMOTW.js → chunk-KWQHFT7E.js} +2 -2
  21. package/dist/chunk-KWQHFT7E.js.map +1 -0
  22. package/dist/chunk-M2FRTT2K.js +144 -0
  23. package/dist/chunk-M2FRTT2K.js.map +1 -0
  24. package/dist/{chunk-RW4FH7IL.js → chunk-NBIRTKZ7.js} +89 -32
  25. package/dist/chunk-NBIRTKZ7.js.map +1 -0
  26. package/dist/chunk-O3XD45IL.js +236 -0
  27. package/dist/chunk-O3XD45IL.js.map +1 -0
  28. package/dist/chunk-PH2IYZHV.js +48 -0
  29. package/dist/chunk-PH2IYZHV.js.map +1 -0
  30. package/dist/{chunk-DSZSR7UE.js → chunk-U5V5O5MN.js} +11 -2
  31. package/dist/chunk-U5V5O5MN.js.map +1 -0
  32. package/dist/{chunk-RAZXOMZC.js → chunk-UETC63DP.js} +7 -6
  33. package/dist/chunk-UETC63DP.js.map +1 -0
  34. package/dist/context.d.ts +5 -5
  35. package/dist/context.js +1 -1
  36. package/dist/errors.js +1 -1
  37. package/dist/evaluator.d.ts +21 -13
  38. package/dist/evaluator.js +1 -1
  39. package/dist/flow.d.ts +6 -5
  40. package/dist/flow.js +2 -2
  41. package/dist/index.d.ts +2 -1
  42. package/dist/index.js +15 -15
  43. package/dist/linter.d.ts +1 -1
  44. package/dist/linter.js +2 -2
  45. package/dist/logger.d.ts +5 -5
  46. package/dist/logger.js +1 -1
  47. package/dist/node.d.ts +1 -1
  48. package/dist/node.js +1 -1
  49. package/dist/runtime/adapter.d.ts +24 -4
  50. package/dist/runtime/adapter.js +13 -13
  51. package/dist/runtime/executors.d.ts +7 -7
  52. package/dist/runtime/executors.js +2 -2
  53. package/dist/runtime/index.d.ts +1 -1
  54. package/dist/runtime/index.js +13 -13
  55. package/dist/runtime/runtime.d.ts +9 -7
  56. package/dist/runtime/runtime.js +12 -12
  57. package/dist/runtime/state.d.ts +2 -2
  58. package/dist/runtime/state.js +2 -2
  59. package/dist/runtime/traverser.d.ts +5 -3
  60. package/dist/runtime/traverser.js +3 -3
  61. package/dist/runtime/types.d.ts +2 -1
  62. package/dist/sanitizer.d.ts +1 -1
  63. package/dist/sanitizer.js +1 -1
  64. package/dist/serializer.d.ts +2 -1
  65. package/dist/serializer.js +1 -1
  66. package/dist/{types-CZN_FcB6.d.ts → types-CQCe_nBM.d.ts} +35 -22
  67. package/dist/types.d.ts +1 -1
  68. package/package.json +2 -2
  69. package/dist/chunk-6DNEDIIT.js.map +0 -1
  70. package/dist/chunk-734J4PTM.js +0 -100
  71. package/dist/chunk-734J4PTM.js.map +0 -1
  72. package/dist/chunk-DSZSR7UE.js.map +0 -1
  73. package/dist/chunk-GTZC6PQI.js +0 -22
  74. package/dist/chunk-GTZC6PQI.js.map +0 -1
  75. package/dist/chunk-J3RNCPED.js.map +0 -1
  76. package/dist/chunk-M23P46ZL.js.map +0 -1
  77. package/dist/chunk-MICPMOTW.js.map +0 -1
  78. package/dist/chunk-NPAJNLXQ.js +0 -106
  79. package/dist/chunk-NPAJNLXQ.js.map +0 -1
  80. package/dist/chunk-RAZXOMZC.js.map +0 -1
  81. package/dist/chunk-REH55ZXV.js +0 -13
  82. package/dist/chunk-REH55ZXV.js.map +0 -1
  83. package/dist/chunk-RW4FH7IL.js.map +0 -1
  84. package/dist/chunk-RYTIQZIB.js.map +0 -1
  85. package/dist/chunk-UYPIWXZG.js.map +0 -1
  86. package/dist/chunk-VFC342WL.js.map +0 -1
  87. package/dist/chunk-WXT3YEWU.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { analyzeBlueprint } from './chunk-M23P46ZL.js';
1
+ import { analyzeBlueprint } from './chunk-HN72TZY5.js';
2
2
 
3
3
  // src/linter.ts
4
4
  function lintBlueprint(blueprint, registry) {
@@ -37,11 +37,12 @@ function lintBlueprint(blueprint, registry) {
37
37
  const visited = /* @__PURE__ */ new Set();
38
38
  while (nodesToVisit.length > 0) {
39
39
  const currentId = nodesToVisit.pop();
40
- if (visited.has(currentId))
41
- continue;
40
+ if (!currentId || visited.has(currentId)) continue;
42
41
  visited.add(currentId);
43
42
  connectedNodes.add(currentId);
44
- blueprint.edges.filter((e) => e.source === currentId).forEach((e) => nodesToVisit.push(e.target));
43
+ for (const e of blueprint.edges.filter((e2) => e2.source === currentId)) {
44
+ nodesToVisit.push(e.target);
45
+ }
45
46
  }
46
47
  for (const nodeId of nodeIds) {
47
48
  if (!connectedNodes.has(nodeId)) {
@@ -60,5 +61,5 @@ function lintBlueprint(blueprint, registry) {
60
61
  }
61
62
 
62
63
  export { lintBlueprint };
63
- //# sourceMappingURL=chunk-RAZXOMZC.js.map
64
- //# sourceMappingURL=chunk-RAZXOMZC.js.map
64
+ //# sourceMappingURL=chunk-UETC63DP.js.map
65
+ //# sourceMappingURL=chunk-UETC63DP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/linter.ts"],"names":["e"],"mappings":"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","file":"chunk-UETC63DP.js","sourcesContent":["import { analyzeBlueprint } from './analysis'\nimport type { NodeClass, NodeFunction, WorkflowBlueprint } from './types'\n\nexport type LinterIssueCode =\n\t| 'INVALID_EDGE_SOURCE'\n\t| 'INVALID_EDGE_TARGET'\n\t| 'MISSING_NODE_IMPLEMENTATION'\n\t| 'ORPHAN_NODE'\n\nexport interface LinterIssue {\n\tcode: LinterIssueCode\n\tmessage: string\n\tnodeId?: string\n\trelatedId?: string\n}\n\nexport interface LinterResult {\n\tisValid: boolean\n\tissues: LinterIssue[]\n}\n\n/**\n * Statically analyzes a workflow blueprint against a registry of implementations\n * to find common errors before runtime.\n *\n * @param blueprint The WorkflowBlueprint to analyze.\n * @param registry A map of node implementations (functions or classes) to check against.\n * @returns A LinterResult object containing any issues found.\n */\nexport function lintBlueprint(\n\tblueprint: WorkflowBlueprint,\n\tregistry: Map<string, NodeFunction | NodeClass> | Record<string, NodeFunction | NodeClass>,\n): LinterResult {\n\tconst issues: LinterIssue[] = []\n\tconst nodeIds = new Set(blueprint.nodes.map((n) => n.id))\n\tconst registryKeys = registry instanceof Map ? new Set(registry.keys()) : new Set(Object.keys(registry))\n\n\t// check for missing node implementations\n\tfor (const node of blueprint.nodes) {\n\t\tif (!node.uses.startsWith('batch-') && !node.uses.startsWith('loop-') && !registryKeys.has(node.uses)) {\n\t\t\tissues.push({\n\t\t\t\tcode: 'MISSING_NODE_IMPLEMENTATION',\n\t\t\t\tmessage: `Node implementation key '${node.uses}' is not found in the provided registry.`,\n\t\t\t\tnodeId: node.id,\n\t\t\t})\n\t\t}\n\t}\n\n\t// check for graph integrity (edges must point to valid nodes)\n\tfor (const edge of blueprint.edges || []) {\n\t\tif (!nodeIds.has(edge.source)) {\n\t\t\tissues.push({\n\t\t\t\tcode: 'INVALID_EDGE_SOURCE',\n\t\t\t\tmessage: `Edge source '${edge.source}' does not correspond to a valid node ID.`,\n\t\t\t\trelatedId: edge.target,\n\t\t\t})\n\t\t}\n\t\tif (!nodeIds.has(edge.target)) {\n\t\t\tissues.push({\n\t\t\t\tcode: 'INVALID_EDGE_TARGET',\n\t\t\t\tmessage: `Edge target '${edge.target}' does not correspond to a valid node ID.`,\n\t\t\t\trelatedId: edge.source,\n\t\t\t})\n\t\t}\n\t}\n\n\t// check for orphan nodes (not connected to the main graph)\n\tif (blueprint.nodes.length > 1) {\n\t\tconst analysis = analyzeBlueprint(blueprint)\n\t\tconst connectedNodes = new Set<string>()\n\t\tconst nodesToVisit = [...analysis.startNodeIds]\n\t\tconst visited = new Set<string>()\n\n\t\twhile (nodesToVisit.length > 0) {\n\t\t\tconst currentId = nodesToVisit.pop()\n\t\t\tif (!currentId || visited.has(currentId)) continue\n\n\t\t\tvisited.add(currentId)\n\t\t\tconnectedNodes.add(currentId)\n\n\t\t\tfor (const e of blueprint.edges.filter((e) => e.source === currentId)) {\n\t\t\t\tnodesToVisit.push(e.target)\n\t\t\t}\n\t\t}\n\n\t\tfor (const nodeId of nodeIds) {\n\t\t\tif (!connectedNodes.has(nodeId)) {\n\t\t\t\tissues.push({\n\t\t\t\t\tcode: 'ORPHAN_NODE',\n\t\t\t\t\tmessage: `Node '${nodeId}' is not reachable from any start node.`,\n\t\t\t\t\tnodeId,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tisValid: issues.length === 0,\n\t\tissues,\n\t}\n}\n"]}
package/dist/context.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as ISyncContext, h as IAsyncContext } from './types-CZN_FcB6.js';
1
+ import { I as ISyncContext, h as IAsyncContext } from './types-CQCe_nBM.js';
2
2
 
3
3
  /**
4
4
  * A default, high-performance, in-memory implementation of ISyncContext using a Map.
@@ -9,8 +9,8 @@ declare class Context<TContext extends Record<string, any>> implements ISyncCont
9
9
  constructor(initialData?: Partial<TContext>);
10
10
  get<K extends keyof TContext>(key: K): TContext[K] | undefined;
11
11
  set<K extends keyof TContext>(key: K, value: TContext[K]): void;
12
- has(key: keyof TContext): boolean;
13
- delete(key: keyof TContext): boolean;
12
+ has<K extends keyof TContext>(key: K): boolean;
13
+ delete<K extends keyof TContext>(key: K): boolean;
14
14
  toJSON(): Record<string, any>;
15
15
  }
16
16
  /**
@@ -23,8 +23,8 @@ declare class AsyncContextView<TContext extends Record<string, any>> implements
23
23
  constructor(syncContext: ISyncContext<TContext>);
24
24
  get<K extends keyof TContext>(key: K): Promise<TContext[K] | undefined>;
25
25
  set<K extends keyof TContext>(key: K, value: TContext[K]): Promise<void>;
26
- has(key: keyof TContext): Promise<boolean>;
27
- delete(key: keyof TContext): Promise<boolean>;
26
+ has<K extends keyof TContext>(key: K): Promise<boolean>;
27
+ delete<K extends keyof TContext>(key: K): Promise<boolean>;
28
28
  toJSON(): Promise<Record<string, any>>;
29
29
  }
30
30
 
package/dist/context.js CHANGED
@@ -1,3 +1,3 @@
1
- export { AsyncContextView, Context } from './chunk-MICPMOTW.js';
1
+ export { AsyncContextView, Context } from './chunk-KWQHFT7E.js';
2
2
  //# sourceMappingURL=context.js.map
3
3
  //# sourceMappingURL=context.js.map
package/dist/errors.js CHANGED
@@ -1,3 +1,3 @@
1
- export { CancelledWorkflowError, FatalNodeExecutionError, NodeExecutionError } from './chunk-WXT3YEWU.js';
1
+ export { CancelledWorkflowError, FatalNodeExecutionError, NodeExecutionError } from './chunk-5ZXV3R5D.js';
2
2
  //# sourceMappingURL=errors.js.map
3
3
  //# sourceMappingURL=errors.js.map
@@ -1,22 +1,30 @@
1
- import { k as IEvaluator } from './types-CZN_FcB6.js';
1
+ import { k as IEvaluator } from './types-CQCe_nBM.js';
2
2
 
3
3
  /**
4
- * A simple, safe, placeholder expression evaluator.
5
- * It provides a sandboxed environment for evaluating edge conditions and transforms.
4
+ * A safe evaluator that only allows simple property access.
5
+ * It cannot execute arbitrary code and is secure for untrusted inputs.
6
6
  *
7
- * @warning This implementation uses `new Function()` which, while sandboxed from the global
8
- * scope, can be a security risk if expressions are provided by end-users. It is NOT
9
- * recommended for production systems. Please replace this with a more robust and secure
10
- * library like `jsep` by providing your own implementation in the runtime options.
11
- *
12
- * This implementation can only access properties on a single context object.
13
7
  * Example expressions:
14
- * - "result.output.status === 'SUCCESS'"
8
+ * - "result.output.status"
15
9
  * - "context.user.isAdmin"
16
- * - "input.value * 100"
10
+ * - "input.value"
11
+ */
12
+ declare class PropertyEvaluator implements IEvaluator {
13
+ evaluate(expression: string, context: Record<string, any>): any;
14
+ }
15
+ /**
16
+ * @warning This evaluator uses `new Function()` and can execute arbitrary
17
+ * JavaScript code. It poses a significant security risk if the expressions
18
+ * are not from a trusted source (e.g., user input).
19
+ *
20
+ * It should only be used in controlled environments where all workflow
21
+ * definitions are static and authored by trusted developers.
22
+ *
23
+ * For safer evaluation, use the default `PropertyEvaluator` or install a
24
+ * sandboxed library like `jsep` to create a custom, secure evaluator.
17
25
  */
18
- declare class SimpleEvaluator implements IEvaluator {
26
+ declare class UnsafeEvaluator implements IEvaluator {
19
27
  evaluate(expression: string, context: Record<string, any>): any;
20
28
  }
21
29
 
22
- export { SimpleEvaluator };
30
+ export { PropertyEvaluator, UnsafeEvaluator };
package/dist/evaluator.js CHANGED
@@ -1,3 +1,3 @@
1
- export { SimpleEvaluator } from './chunk-GTZC6PQI.js';
1
+ export { PropertyEvaluator, UnsafeEvaluator } from './chunk-PH2IYZHV.js';
2
2
  //# sourceMappingURL=evaluator.js.map
3
3
  //# sourceMappingURL=evaluator.js.map
package/dist/flow.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as NodeFunction, e as NodeClass, N as NodeDefinition, E as EdgeDefinition, W as WorkflowBlueprint } from './types-CZN_FcB6.js';
1
+ import { d as NodeFunction, e as NodeClass, N as NodeDefinition, E as EdgeDefinition, W as WorkflowBlueprint } from './types-CQCe_nBM.js';
2
2
 
3
3
  /**
4
4
  * A fluent API for programmatically constructing a WorkflowBlueprint.
@@ -7,8 +7,9 @@ declare class Flow<TContext extends Record<string, any> = Record<string, any>, T
7
7
  private blueprint;
8
8
  private functionRegistry;
9
9
  private loopControllerIds;
10
+ private loopDefinitions;
10
11
  constructor(id: string);
11
- node(id: string, implementation: NodeFunction<TContext, TDependencies> | NodeClass, options?: Omit<NodeDefinition, 'id' | 'uses'>): this;
12
+ node<TInput = any, TOutput = any, TAction extends string = string>(id: string, implementation: NodeFunction<TContext, TDependencies, TInput, TOutput, TAction> | NodeClass<TContext, TDependencies, TInput, TOutput, TAction>, options?: Omit<NodeDefinition, 'id' | 'uses'>): this;
12
13
  edge(source: string, target: string, options?: Omit<EdgeDefinition, 'source' | 'target'>): this;
13
14
  /**
14
15
  * Creates a batch processing pattern.
@@ -20,11 +21,11 @@ declare class Flow<TContext extends Record<string, any> = Record<string, any>, T
20
21
  * @param options.outputKey The key in the context where the array of results will be stored.
21
22
  * @returns The Flow instance for chaining.
22
23
  */
23
- batch(id: string, worker: NodeFunction<TContext, TDependencies> | NodeClass, options: {
24
+ batch<TInput = any, TOutput = any, TAction extends string = string>(id: string, worker: NodeFunction<TContext, TDependencies, TInput, TOutput, TAction> | NodeClass<TContext, TDependencies, TInput, TOutput, TAction>, options: {
24
25
  /** The key in the context that holds the input array for the batch. */
25
- inputKey: string;
26
+ inputKey: keyof TContext;
26
27
  /** The key in the context where the array of results will be stored. */
27
- outputKey: string;
28
+ outputKey: keyof TContext;
28
29
  }): this;
29
30
  /**
30
31
  * Creates a loop pattern in the workflow graph.
package/dist/flow.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Flow, createFlow } from './chunk-6DNEDIIT.js';
2
- import './chunk-DSZSR7UE.js';
1
+ export { Flow, createFlow } from './chunk-4A627Q6L.js';
2
+ import './chunk-U5V5O5MN.js';
3
3
  //# sourceMappingURL=flow.js.map
4
4
  //# sourceMappingURL=flow.js.map
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  export { BlueprintAnalysis, Cycles, analyzeBlueprint, checkForCycles, generateMermaid } from './analysis.js';
2
2
  export { AsyncContextView, Context } from './context.js';
3
3
  export { CancelledWorkflowError, FatalNodeExecutionError, NodeExecutionError } from './errors.js';
4
+ export { PropertyEvaluator, UnsafeEvaluator } from './evaluator.js';
4
5
  export { Flow, createFlow } from './flow.js';
5
6
  export { LinterIssue, LinterIssueCode, LinterResult, lintBlueprint } from './linter.js';
6
7
  export { ConsoleLogger, NullLogger } from './logger.js';
7
- export { B as BaseNode, C as ContextImplementation, E as EdgeDefinition, h as IAsyncContext, k as IEvaluator, m as IEventBus, l as ILogger, n as ISerializer, I as ISyncContext, M as Middleware, e as NodeClass, a as NodeConfig, c as NodeContext, N as NodeDefinition, d as NodeFunction, f as NodeImplementation, g as NodeRegistry, b as NodeResult, R as RuntimeDependencies, j as RuntimeOptions, W as WorkflowBlueprint, o as WorkflowError, p as WorkflowResult, i as isNodeClass } from './types-CZN_FcB6.js';
8
+ export { B as BaseNode, C as ContextImplementation, E as EdgeDefinition, h as IAsyncContext, k as IEvaluator, m as IEventBus, l as ILogger, n as ISerializer, I as ISyncContext, M as Middleware, e as NodeClass, a as NodeConfig, c as NodeContext, N as NodeDefinition, d as NodeFunction, f as NodeImplementation, g as NodeRegistry, b as NodeResult, R as RuntimeDependencies, j as RuntimeOptions, W as WorkflowBlueprint, o as WorkflowError, p as WorkflowResult, i as isNodeClass } from './types-CQCe_nBM.js';
8
9
  export { AdapterOptions, BaseDistributedAdapter, ICoordinationStore, JobPayload } from './runtime/adapter.js';
9
10
  export { BuiltInNodeExecutor, ClassNodeExecutor, ExecutionStrategy, FunctionNodeExecutor } from './runtime/executors.js';
10
11
  export { FlowRuntime } from './runtime/runtime.js';
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import './chunk-55J6XMHW.js';
2
2
  import './chunk-HMR2GEGE.js';
3
- export { BaseDistributedAdapter } from './chunk-NPAJNLXQ.js';
4
- export { FlowRuntime } from './chunk-RYTIQZIB.js';
5
- export { WorkflowState } from './chunk-UYPIWXZG.js';
6
- export { GraphTraverser } from './chunk-RW4FH7IL.js';
7
- export { sanitizeBlueprint } from './chunk-J3RNCPED.js';
8
- import './chunk-REH55ZXV.js';
9
- export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from './chunk-734J4PTM.js';
10
- export { AsyncContextView, Context } from './chunk-MICPMOTW.js';
11
- export { CancelledWorkflowError, FatalNodeExecutionError, NodeExecutionError } from './chunk-WXT3YEWU.js';
12
- import './chunk-GTZC6PQI.js';
13
- export { Flow, createFlow } from './chunk-6DNEDIIT.js';
14
- export { BaseNode, isNodeClass } from './chunk-DSZSR7UE.js';
15
- export { lintBlueprint } from './chunk-RAZXOMZC.js';
16
- export { analyzeBlueprint, checkForCycles, generateMermaid } from './chunk-M23P46ZL.js';
17
- export { ConsoleLogger, NullLogger } from './chunk-VFC342WL.js';
3
+ export { BaseDistributedAdapter } from './chunk-O3XD45IL.js';
4
+ export { FlowRuntime } from './chunk-3XVVR2SR.js';
5
+ export { WorkflowState } from './chunk-CSZ6EOWG.js';
6
+ export { GraphTraverser } from './chunk-NBIRTKZ7.js';
7
+ export { sanitizeBlueprint } from './chunk-DSYAC4WB.js';
8
+ import './chunk-CYHZ2YVH.js';
9
+ export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from './chunk-M2FRTT2K.js';
10
+ export { AsyncContextView, Context } from './chunk-KWQHFT7E.js';
11
+ export { CancelledWorkflowError, FatalNodeExecutionError, NodeExecutionError } from './chunk-5ZXV3R5D.js';
12
+ export { PropertyEvaluator, UnsafeEvaluator } from './chunk-PH2IYZHV.js';
13
+ export { Flow, createFlow } from './chunk-4A627Q6L.js';
14
+ export { BaseNode, isNodeClass } from './chunk-U5V5O5MN.js';
15
+ export { lintBlueprint } from './chunk-UETC63DP.js';
16
+ export { analyzeBlueprint, checkForCycles, generateMermaid } from './chunk-HN72TZY5.js';
17
+ export { ConsoleLogger, NullLogger } from './chunk-4PELJWF7.js';
18
18
  //# sourceMappingURL=index.js.map
19
19
  //# sourceMappingURL=index.js.map
package/dist/linter.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { W as WorkflowBlueprint, d as NodeFunction, e as NodeClass } from './types-CZN_FcB6.js';
1
+ import { W as WorkflowBlueprint, d as NodeFunction, e as NodeClass } from './types-CQCe_nBM.js';
2
2
 
3
3
  type LinterIssueCode = 'INVALID_EDGE_SOURCE' | 'INVALID_EDGE_TARGET' | 'MISSING_NODE_IMPLEMENTATION' | 'ORPHAN_NODE';
4
4
  interface LinterIssue {
package/dist/linter.js CHANGED
@@ -1,4 +1,4 @@
1
- export { lintBlueprint } from './chunk-RAZXOMZC.js';
2
- import './chunk-M23P46ZL.js';
1
+ export { lintBlueprint } from './chunk-UETC63DP.js';
2
+ import './chunk-HN72TZY5.js';
3
3
  //# sourceMappingURL=linter.js.map
4
4
  //# sourceMappingURL=linter.js.map
package/dist/logger.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as ILogger } from './types-CZN_FcB6.js';
1
+ import { l as ILogger } from './types-CQCe_nBM.js';
2
2
 
3
3
  /** A logger implementation that outputs to the console. */
4
4
  declare class ConsoleLogger implements ILogger {
@@ -9,10 +9,10 @@ declare class ConsoleLogger implements ILogger {
9
9
  }
10
10
  /** A logger implementation that does nothing (no-op). */
11
11
  declare class NullLogger implements ILogger {
12
- debug(): void;
13
- info(): void;
14
- warn(): void;
15
- error(): void;
12
+ debug(_message: string, _meta?: Record<string, any>): void;
13
+ info(_message: string, _meta?: Record<string, any>): void;
14
+ warn(_message: string, _meta?: Record<string, any>): void;
15
+ error(_message: string, _meta?: Record<string, any>): void;
16
16
  }
17
17
 
18
18
  export { ConsoleLogger, NullLogger };
package/dist/logger.js CHANGED
@@ -1,3 +1,3 @@
1
- export { ConsoleLogger, NullLogger } from './chunk-VFC342WL.js';
1
+ export { ConsoleLogger, NullLogger } from './chunk-4PELJWF7.js';
2
2
  //# sourceMappingURL=logger.js.map
3
3
  //# sourceMappingURL=logger.js.map
package/dist/node.d.ts CHANGED
@@ -1 +1 @@
1
- export { B as BaseNode, i as isNodeClass } from './types-CZN_FcB6.js';
1
+ export { B as BaseNode, i as isNodeClass } from './types-CQCe_nBM.js';
package/dist/node.js CHANGED
@@ -1,3 +1,3 @@
1
- export { BaseNode, isNodeClass } from './chunk-DSZSR7UE.js';
1
+ export { BaseNode, isNodeClass } from './chunk-U5V5O5MN.js';
2
2
  //# sourceMappingURL=node.js.map
3
3
  //# sourceMappingURL=node.js.map
@@ -1,7 +1,7 @@
1
- import { j as RuntimeOptions, n as ISerializer, h as IAsyncContext, p as WorkflowResult } from '../types-CZN_FcB6.js';
1
+ import { j as RuntimeOptions, n as ISerializer, h as IAsyncContext, p as WorkflowResult, W as WorkflowBlueprint } from '../types-CQCe_nBM.js';
2
2
  import { FlowRuntime } from './runtime.js';
3
- import './types.js';
4
3
  import './state.js';
4
+ import './types.js';
5
5
 
6
6
  /**
7
7
  * Defines the contract for an atomic, distributed key-value store required by
@@ -65,14 +65,34 @@ declare abstract class BaseDistributedAdapter {
65
65
  payload?: WorkflowResult;
66
66
  reason?: string;
67
67
  }): Promise<void>;
68
+ /**
69
+ * Hook called at the start of job processing. Subclasses can override this
70
+ * to perform additional setup (e.g., timestamp tracking for reconciliation).
71
+ */
72
+ protected onJobStart(_runId: string, _blueprintId: string, _nodeId: string): Promise<void>;
68
73
  /**
69
74
  * The main handler for processing a single job from the queue.
70
75
  */
71
- private handleJob;
76
+ protected handleJob(job: JobPayload): Promise<void>;
72
77
  /**
73
78
  * Encapsulates the fan-in join logic using the coordination store.
74
79
  */
75
- private isReadyForFanIn;
80
+ protected isReadyForFanIn(runId: string, blueprint: WorkflowBlueprint, targetNodeId: string): Promise<boolean>;
81
+ /**
82
+ * Reconciles the state of a workflow run. It inspects the persisted
83
+ * context to find completed nodes, determines the next set of executable
84
+ * nodes (the frontier), and enqueues jobs for them if they aren't
85
+ * already running. This is the core of the resume functionality.
86
+ *
87
+ * @param runId The unique ID of the workflow execution to reconcile.
88
+ * @returns The set of node IDs that were enqueued for execution.
89
+ */
90
+ reconcile(runId: string): Promise<Set<string>>;
91
+ private calculateResumedFrontier;
92
+ /**
93
+ * Writes a poison pill for 'all' join successors of a failed node to prevent stalling.
94
+ */
95
+ private writePoisonPillForSuccessors;
76
96
  }
77
97
 
78
98
  export { type AdapterOptions, BaseDistributedAdapter, type ICoordinationStore, type JobPayload };
@@ -1,15 +1,15 @@
1
- export { BaseDistributedAdapter } from '../chunk-NPAJNLXQ.js';
2
- import '../chunk-RYTIQZIB.js';
3
- import '../chunk-UYPIWXZG.js';
4
- import '../chunk-RW4FH7IL.js';
5
- import '../chunk-J3RNCPED.js';
6
- import '../chunk-REH55ZXV.js';
7
- import '../chunk-734J4PTM.js';
8
- import '../chunk-MICPMOTW.js';
9
- import '../chunk-WXT3YEWU.js';
10
- import '../chunk-GTZC6PQI.js';
11
- import '../chunk-DSZSR7UE.js';
12
- import '../chunk-M23P46ZL.js';
13
- import '../chunk-VFC342WL.js';
1
+ export { BaseDistributedAdapter } from '../chunk-O3XD45IL.js';
2
+ import '../chunk-3XVVR2SR.js';
3
+ import '../chunk-CSZ6EOWG.js';
4
+ import '../chunk-NBIRTKZ7.js';
5
+ import '../chunk-DSYAC4WB.js';
6
+ import '../chunk-CYHZ2YVH.js';
7
+ import '../chunk-M2FRTT2K.js';
8
+ import '../chunk-KWQHFT7E.js';
9
+ import '../chunk-5ZXV3R5D.js';
10
+ import '../chunk-PH2IYZHV.js';
11
+ import '../chunk-U5V5O5MN.js';
12
+ import '../chunk-HN72TZY5.js';
13
+ import '../chunk-4PELJWF7.js';
14
14
  //# sourceMappingURL=adapter.js.map
15
15
  //# sourceMappingURL=adapter.js.map
@@ -1,26 +1,26 @@
1
- import { N as NodeDefinition, c as NodeContext, b as NodeResult, d as NodeFunction, m as IEventBus, B as BaseNode, C as ContextImplementation } from '../types-CZN_FcB6.js';
1
+ import { N as NodeDefinition, c as NodeContext, b as NodeResult, d as NodeFunction, m as IEventBus, e as NodeClass, C as ContextImplementation } from '../types-CQCe_nBM.js';
2
2
 
3
3
  interface ExecutionStrategy {
4
- execute: (nodeDef: NodeDefinition, context: NodeContext<any, any>, executionId?: string, signal?: AbortSignal) => Promise<NodeResult>;
4
+ execute: (nodeDef: NodeDefinition, context: NodeContext<any, any, any>, executionId?: string, signal?: AbortSignal) => Promise<NodeResult<any, any>>;
5
5
  }
6
6
  declare class FunctionNodeExecutor implements ExecutionStrategy {
7
7
  private implementation;
8
8
  private maxRetries;
9
9
  private eventBus;
10
10
  constructor(implementation: NodeFunction, maxRetries: number, eventBus: IEventBus);
11
- execute(nodeDef: NodeDefinition, context: NodeContext<any, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult>;
11
+ execute(nodeDef: NodeDefinition, context: NodeContext<any, any, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult<any, any>>;
12
12
  }
13
13
  declare class ClassNodeExecutor implements ExecutionStrategy {
14
14
  private implementation;
15
15
  private maxRetries;
16
16
  private eventBus;
17
- constructor(implementation: typeof BaseNode, maxRetries: number, eventBus: IEventBus);
18
- execute(nodeDef: NodeDefinition, context: NodeContext<any, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult>;
17
+ constructor(implementation: NodeClass, maxRetries: number, eventBus: IEventBus);
18
+ execute(nodeDef: NodeDefinition, context: NodeContext<any, any, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult<any, any>>;
19
19
  }
20
20
  declare class BuiltInNodeExecutor implements ExecutionStrategy {
21
21
  private executeBuiltIn;
22
- constructor(executeBuiltIn: (nodeDef: NodeDefinition, context: ContextImplementation<any>) => Promise<NodeResult>);
23
- execute(nodeDef: NodeDefinition, context: NodeContext<any, any>): Promise<NodeResult>;
22
+ constructor(executeBuiltIn: (nodeDef: NodeDefinition, context: ContextImplementation<any>) => Promise<NodeResult<any, any>>);
23
+ execute(nodeDef: NodeDefinition, context: NodeContext<Record<string, unknown>, Record<string, unknown>, any>): Promise<NodeResult<any, any>>;
24
24
  }
25
25
 
26
26
  export { BuiltInNodeExecutor, ClassNodeExecutor, type ExecutionStrategy, FunctionNodeExecutor };
@@ -1,4 +1,4 @@
1
- export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from '../chunk-734J4PTM.js';
2
- import '../chunk-WXT3YEWU.js';
1
+ export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from '../chunk-M2FRTT2K.js';
2
+ import '../chunk-5ZXV3R5D.js';
3
3
  //# sourceMappingURL=executors.js.map
4
4
  //# sourceMappingURL=executors.js.map
@@ -3,5 +3,5 @@ export { BuiltInNodeExecutor, ClassNodeExecutor, ExecutionStrategy, FunctionNode
3
3
  export { FlowRuntime } from './runtime.js';
4
4
  export { WorkflowState } from './state.js';
5
5
  export { GraphTraverser } from './traverser.js';
6
- import '../types-CZN_FcB6.js';
6
+ import '../types-CQCe_nBM.js';
7
7
  import './types.js';
@@ -1,16 +1,16 @@
1
1
  import '../chunk-HMR2GEGE.js';
2
- export { BaseDistributedAdapter } from '../chunk-NPAJNLXQ.js';
3
- export { FlowRuntime } from '../chunk-RYTIQZIB.js';
4
- export { WorkflowState } from '../chunk-UYPIWXZG.js';
5
- export { GraphTraverser } from '../chunk-RW4FH7IL.js';
6
- import '../chunk-J3RNCPED.js';
7
- import '../chunk-REH55ZXV.js';
8
- export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from '../chunk-734J4PTM.js';
9
- import '../chunk-MICPMOTW.js';
10
- import '../chunk-WXT3YEWU.js';
11
- import '../chunk-GTZC6PQI.js';
12
- import '../chunk-DSZSR7UE.js';
13
- import '../chunk-M23P46ZL.js';
14
- import '../chunk-VFC342WL.js';
2
+ export { BaseDistributedAdapter } from '../chunk-O3XD45IL.js';
3
+ export { FlowRuntime } from '../chunk-3XVVR2SR.js';
4
+ export { WorkflowState } from '../chunk-CSZ6EOWG.js';
5
+ export { GraphTraverser } from '../chunk-NBIRTKZ7.js';
6
+ import '../chunk-DSYAC4WB.js';
7
+ import '../chunk-CYHZ2YVH.js';
8
+ export { BuiltInNodeExecutor, ClassNodeExecutor, FunctionNodeExecutor } from '../chunk-M2FRTT2K.js';
9
+ import '../chunk-KWQHFT7E.js';
10
+ import '../chunk-5ZXV3R5D.js';
11
+ import '../chunk-PH2IYZHV.js';
12
+ import '../chunk-U5V5O5MN.js';
13
+ import '../chunk-HN72TZY5.js';
14
+ import '../chunk-4PELJWF7.js';
15
15
  //# sourceMappingURL=index.js.map
16
16
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
- import { j as RuntimeOptions, W as WorkflowBlueprint, p as WorkflowResult, b as NodeResult, C as ContextImplementation, N as NodeDefinition, E as EdgeDefinition } from '../types-CZN_FcB6.js';
2
- import { IRuntime } from './types.js';
1
+ import { d as NodeFunction, e as NodeClass, B as BaseNode, j as RuntimeOptions, W as WorkflowBlueprint, p as WorkflowResult, b as NodeResult, C as ContextImplementation, N as NodeDefinition, E as EdgeDefinition } from '../types-CQCe_nBM.js';
3
2
  import { WorkflowState } from './state.js';
3
+ import { IRuntime } from './types.js';
4
4
 
5
5
  declare class FlowRuntime<TContext extends Record<string, any>, TDependencies extends Record<string, any>> implements IRuntime<TContext, TDependencies> {
6
- private registry;
6
+ registry: Record<string, NodeFunction | NodeClass | typeof BaseNode>;
7
7
  private blueprints;
8
8
  private dependencies;
9
9
  private logger;
@@ -11,23 +11,25 @@ declare class FlowRuntime<TContext extends Record<string, any>, TDependencies ex
11
11
  private serializer;
12
12
  private middleware;
13
13
  private evaluator;
14
+ private analysisCache;
14
15
  options: RuntimeOptions<TDependencies>;
15
16
  constructor(options: RuntimeOptions<TDependencies>);
16
17
  run(blueprint: WorkflowBlueprint, initialState?: Partial<TContext> | string, options?: {
17
18
  functionRegistry?: Map<string, any>;
18
19
  strict?: boolean;
19
20
  signal?: AbortSignal;
21
+ concurrency?: number;
20
22
  }): Promise<WorkflowResult<TContext>>;
21
- executeNode(blueprint: WorkflowBlueprint, nodeId: string, state: WorkflowState<TContext>, allPredecessors?: Map<string, Set<string>>, functionRegistry?: Map<string, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult>;
23
+ executeNode(blueprint: WorkflowBlueprint, nodeId: string, state: WorkflowState<TContext>, allPredecessors?: Map<string, Set<string>>, functionRegistry?: Map<string, any>, executionId?: string, signal?: AbortSignal): Promise<NodeResult<any, any>>;
22
24
  private getExecutor;
23
25
  private executeWithFallback;
24
- determineNextNodes(blueprint: WorkflowBlueprint, nodeId: string, result: NodeResult, context: ContextImplementation<TContext>): Promise<{
26
+ determineNextNodes(blueprint: WorkflowBlueprint, nodeId: string, result: NodeResult<any, any>, context: ContextImplementation<TContext>): Promise<{
25
27
  node: NodeDefinition;
26
28
  edge: EdgeDefinition;
27
29
  }[]>;
28
- applyEdgeTransform(edge: EdgeDefinition, sourceResult: NodeResult, targetNode: NodeDefinition, context: ContextImplementation<TContext>, allPredecessors?: Map<string, Set<string>>): Promise<void>;
30
+ applyEdgeTransform(edge: EdgeDefinition, sourceResult: NodeResult<any, any>, targetNode: NodeDefinition, context: ContextImplementation<TContext>, allPredecessors?: Map<string, Set<string>>): Promise<void>;
29
31
  private _resolveNodeInput;
30
- protected _executeBuiltInNode(nodeDef: NodeDefinition, contextImpl: ContextImplementation<TContext>): Promise<NodeResult>;
32
+ protected _executeBuiltInNode(nodeDef: NodeDefinition, contextImpl: ContextImplementation<TContext>): Promise<NodeResult<any, any>>;
31
33
  }
32
34
 
33
35
  export { FlowRuntime };
@@ -1,14 +1,14 @@
1
- export { FlowRuntime } from '../chunk-RYTIQZIB.js';
2
- import '../chunk-UYPIWXZG.js';
3
- import '../chunk-RW4FH7IL.js';
4
- import '../chunk-J3RNCPED.js';
5
- import '../chunk-REH55ZXV.js';
6
- import '../chunk-734J4PTM.js';
7
- import '../chunk-MICPMOTW.js';
8
- import '../chunk-WXT3YEWU.js';
9
- import '../chunk-GTZC6PQI.js';
10
- import '../chunk-DSZSR7UE.js';
11
- import '../chunk-M23P46ZL.js';
12
- import '../chunk-VFC342WL.js';
1
+ export { FlowRuntime } from '../chunk-3XVVR2SR.js';
2
+ import '../chunk-CSZ6EOWG.js';
3
+ import '../chunk-NBIRTKZ7.js';
4
+ import '../chunk-DSYAC4WB.js';
5
+ import '../chunk-CYHZ2YVH.js';
6
+ import '../chunk-M2FRTT2K.js';
7
+ import '../chunk-KWQHFT7E.js';
8
+ import '../chunk-5ZXV3R5D.js';
9
+ import '../chunk-PH2IYZHV.js';
10
+ import '../chunk-U5V5O5MN.js';
11
+ import '../chunk-HN72TZY5.js';
12
+ import '../chunk-4PELJWF7.js';
13
13
  //# sourceMappingURL=runtime.js.map
14
14
  //# sourceMappingURL=runtime.js.map
@@ -1,4 +1,4 @@
1
- import { C as ContextImplementation, o as WorkflowError, p as WorkflowResult, n as ISerializer } from '../types-CZN_FcB6.js';
1
+ import { C as ContextImplementation, o as WorkflowError, p as WorkflowResult, n as ISerializer } from '../types-CQCe_nBM.js';
2
2
 
3
3
  declare class WorkflowState<TContext extends Record<string, any>> {
4
4
  private _completedNodes;
@@ -14,7 +14,7 @@ declare class WorkflowState<TContext extends Record<string, any>> {
14
14
  getCompletedNodes(): Set<string>;
15
15
  getErrors(): WorkflowError[];
16
16
  getAnyFallbackExecuted(): boolean;
17
- getStatus(allNodeIds: Set<string>, fallbackNodeIds: Set<string>): WorkflowResult['status'];
17
+ getStatus(allNodeIds: Set<string>, _fallbackNodeIds: Set<string>): WorkflowResult['status'];
18
18
  toResult(serializer: ISerializer): WorkflowResult<TContext>;
19
19
  }
20
20
 
@@ -1,4 +1,4 @@
1
- export { WorkflowState } from '../chunk-UYPIWXZG.js';
2
- import '../chunk-MICPMOTW.js';
1
+ export { WorkflowState } from '../chunk-CSZ6EOWG.js';
2
+ import '../chunk-KWQHFT7E.js';
3
3
  //# sourceMappingURL=state.js.map
4
4
  //# sourceMappingURL=state.js.map
@@ -1,20 +1,22 @@
1
- import { W as WorkflowBlueprint } from '../types-CZN_FcB6.js';
1
+ import { W as WorkflowBlueprint } from '../types-CQCe_nBM.js';
2
2
  import { WorkflowState } from './state.js';
3
3
  import { IRuntime } from './types.js';
4
4
 
5
5
  declare class GraphTraverser<TContext extends Record<string, any>, TDependencies extends Record<string, any>> {
6
- private blueprint;
7
6
  private runtime;
8
7
  private state;
9
8
  private functionRegistry;
10
9
  private executionId;
11
10
  private signal?;
11
+ private concurrency?;
12
12
  private frontier;
13
13
  private allPredecessors;
14
14
  private dynamicBlueprint;
15
- constructor(blueprint: WorkflowBlueprint, runtime: IRuntime<TContext, TDependencies>, state: WorkflowState<TContext>, functionRegistry: Map<string, any> | undefined, executionId: string, signal?: AbortSignal | undefined);
15
+ constructor(blueprint: WorkflowBlueprint, runtime: IRuntime<TContext, TDependencies>, state: WorkflowState<TContext>, functionRegistry: Map<string, any> | undefined, executionId: string, signal?: AbortSignal | undefined, concurrency?: number | undefined);
16
16
  private isFallbackNode;
17
+ private getEffectiveJoinStrategy;
17
18
  traverse(): Promise<void>;
19
+ private executeWithConcurrency;
18
20
  private handleDynamicNodes;
19
21
  getAllNodeIds(): Set<string>;
20
22
  getFallbackNodeIds(): Set<string>;
@@ -1,5 +1,5 @@
1
- export { GraphTraverser } from '../chunk-RW4FH7IL.js';
2
- import '../chunk-WXT3YEWU.js';
3
- import '../chunk-M23P46ZL.js';
1
+ export { GraphTraverser } from '../chunk-NBIRTKZ7.js';
2
+ import '../chunk-5ZXV3R5D.js';
3
+ import '../chunk-HN72TZY5.js';
4
4
  //# sourceMappingURL=traverser.js.map
5
5
  //# sourceMappingURL=traverser.js.map
@@ -1,9 +1,10 @@
1
- import { R as RuntimeDependencies, j as RuntimeOptions, W as WorkflowBlueprint, b as NodeResult, C as ContextImplementation, N as NodeDefinition, E as EdgeDefinition } from '../types-CZN_FcB6.js';
1
+ import { R as RuntimeDependencies, j as RuntimeOptions, W as WorkflowBlueprint, b as NodeResult, C as ContextImplementation, N as NodeDefinition, E as EdgeDefinition } from '../types-CQCe_nBM.js';
2
2
  import { WorkflowState } from './state.js';
3
3
 
4
4
  /** Interface for the core runtime operations used by the traverser. */
5
5
  interface IRuntime<TContext extends Record<string, any> = Record<string, any>, TDependencies extends RuntimeDependencies = RuntimeDependencies> {
6
6
  options: RuntimeOptions<TDependencies>;
7
+ registry: Record<string, any>;
7
8
  executeNode: (blueprint: WorkflowBlueprint, nodeId: string, state: WorkflowState<TContext>, allPredecessors?: Map<string, Set<string>>, functionRegistry?: Map<string, any>, executionId?: string, signal?: AbortSignal) => Promise<NodeResult>;
8
9
  determineNextNodes: (blueprint: WorkflowBlueprint, nodeId: string, result: NodeResult, context: ContextImplementation<TContext>) => Promise<{
9
10
  node: NodeDefinition;
@@ -1,4 +1,4 @@
1
- import { W as WorkflowBlueprint } from './types-CZN_FcB6.js';
1
+ import { W as WorkflowBlueprint } from './types-CQCe_nBM.js';
2
2
 
3
3
  /**
4
4
  * Sanitizes a raw workflow blueprint by removing extra properties
package/dist/sanitizer.js CHANGED
@@ -1,3 +1,3 @@
1
- export { sanitizeBlueprint } from './chunk-J3RNCPED.js';
1
+ export { sanitizeBlueprint } from './chunk-DSYAC4WB.js';
2
2
  //# sourceMappingURL=sanitizer.js.map
3
3
  //# sourceMappingURL=sanitizer.js.map
@@ -1,4 +1,4 @@
1
- import { n as ISerializer } from './types-CZN_FcB6.js';
1
+ import { n as ISerializer } from './types-CQCe_nBM.js';
2
2
 
3
3
  /**
4
4
  * A default serializer using standard JSON.
@@ -8,6 +8,7 @@ import { n as ISerializer } from './types-CZN_FcB6.js';
8
8
  * serializer like `superjson` if working with complex data types.
9
9
  */
10
10
  declare class JsonSerializer implements ISerializer {
11
+ private hasWarned;
11
12
  serialize(data: Record<string, any>): string;
12
13
  deserialize(text: string): Record<string, any>;
13
14
  }