@ai.ntellect/core 0.6.14 → 0.6.15
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/graph/graph.ts +2 -4
- package/package.json +1 -1
package/graph/graph.ts
CHANGED
@@ -62,7 +62,7 @@ export class Graph<T extends ZodSchema> {
|
|
62
62
|
validatedParams = node.parameters.parse(params);
|
63
63
|
}
|
64
64
|
|
65
|
-
|
65
|
+
this.eventEmitter.emit("nodeStarted", { name: nodeName, context });
|
66
66
|
if (node.execute) {
|
67
67
|
await node.execute(context);
|
68
68
|
} else if (node.executeWithParams) {
|
@@ -76,7 +76,7 @@ export class Graph<T extends ZodSchema> {
|
|
76
76
|
|
77
77
|
this.validateContext(context);
|
78
78
|
|
79
|
-
this.eventEmitter.emit("nodeCompleted", { nodeName, context });
|
79
|
+
this.eventEmitter.emit("nodeCompleted", { name: nodeName, context });
|
80
80
|
|
81
81
|
if (node.next) {
|
82
82
|
await Promise.all(
|
@@ -175,12 +175,10 @@ export class Graph<T extends ZodSchema> {
|
|
175
175
|
return structuredClone(this.context);
|
176
176
|
}
|
177
177
|
|
178
|
-
// Journalisation (logging)
|
179
178
|
log(message: string, data?: any): void {
|
180
179
|
console.log(`[Graph ${this.name}] ${message}`, data);
|
181
180
|
}
|
182
181
|
|
183
|
-
// Modification dynamique du graph
|
184
182
|
addNode(node: Node<T>): void {
|
185
183
|
this.nodes.set(node.name, node);
|
186
184
|
this.setupEventListeners();
|