graphai 2.0.12 → 2.0.13

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/lib/node.js CHANGED
@@ -15,7 +15,7 @@ class Node {
15
15
  this.result = undefined;
16
16
  this.nodeId = nodeId;
17
17
  this.graph = graph;
18
- this.log = new transaction_log_1.TransactionLog(nodeId);
18
+ this.log = new transaction_log_1.TransactionLog(nodeId, this.graph.mapIndex);
19
19
  this.console = {};
20
20
  }
21
21
  asString() {
@@ -19,7 +19,7 @@ export declare class TransactionLog {
19
19
  isLoop?: boolean;
20
20
  repeatCount?: number;
21
21
  log?: TransactionLog[];
22
- constructor(nodeId: string);
22
+ constructor(nodeId: string, mapIndex?: number);
23
23
  initForComputedNode(node: ComputedNode, graph: GraphAI): void;
24
24
  onInjected(node: StaticNode, graph: GraphAI, injectFrom?: string): void;
25
25
  onComplete(node: ComputedNode, graph: GraphAI, localLog: TransactionLog[]): void;
@@ -5,9 +5,10 @@ const type_1 = require("./type");
5
5
  const utils_1 = require("./utils/utils");
6
6
  const nodeUtils_1 = require("./utils/nodeUtils");
7
7
  class TransactionLog {
8
- constructor(nodeId) {
8
+ constructor(nodeId, mapIndex) {
9
9
  this.nodeId = nodeId;
10
10
  this.state = type_1.NodeState.Waiting;
11
+ this.mapIndex = mapIndex;
11
12
  }
12
13
  initForComputedNode(node, graph) {
13
14
  this.agentId = node.getAgentId();
package/lib/type.d.ts CHANGED
@@ -90,6 +90,7 @@ export type GraphOptions = {
90
90
  config?: ConfigDataDictionary;
91
91
  graphLoader?: GraphDataLoader;
92
92
  forceLoop?: boolean;
93
+ mapIndex?: number;
93
94
  };
94
95
  export type CacheTypes = "pureAgent" | "impureAgent";
95
96
  export type AgentFunctionContextDebugInfo = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphai",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Asynchronous data flow execution engine for agentic AI apps.",
5
5
  "main": "lib/bundle.cjs.js",
6
6
  "module": "lib/bundle.esm.js",