@illuma-ai/agents 1.1.23 → 1.1.25
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/dist/cjs/graphs/Graph.cjs +1 -0
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/graphs/MultiAgentGraph.cjs +14 -8
- package/dist/cjs/graphs/MultiAgentGraph.cjs.map +1 -1
- package/dist/esm/graphs/Graph.mjs +1 -0
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/graphs/MultiAgentGraph.mjs +14 -8
- package/dist/esm/graphs/MultiAgentGraph.mjs.map +1 -1
- package/package.json +1 -1
- package/src/graphs/Graph.ts +3 -0
- package/src/graphs/MultiAgentGraph.ts +19 -13
package/src/graphs/Graph.ts
CHANGED
|
@@ -2701,6 +2701,9 @@ If I seem to be missing something we discussed earlier, just give me a quick rem
|
|
|
2701
2701
|
}
|
|
2702
2702
|
} catch (_e) {
|
|
2703
2703
|
/** If we can't get agent context, that's okay - agentId remains undefined */
|
|
2704
|
+
console.debug(
|
|
2705
|
+
`[dispatchRunStep] Could not resolve agentId from metadata.langgraph_node="${(metadata as Record<string, unknown>).langgraph_node}": ${(_e as Error).message}`
|
|
2706
|
+
);
|
|
2704
2707
|
}
|
|
2705
2708
|
}
|
|
2706
2709
|
|
|
@@ -689,6 +689,25 @@ export class MultiAgentGraph extends StandardGraph {
|
|
|
689
689
|
);
|
|
690
690
|
|
|
691
691
|
try {
|
|
692
|
+
/**
|
|
693
|
+
* Dispatch transition BEFORE invoking the child subgraph so that
|
|
694
|
+
* callbacks.js sets multiAgentTrace.isMultiAgent = true before the
|
|
695
|
+
* child's ON_RUN_STEP events fire. This ensures child tool calls
|
|
696
|
+
* are attributed to the correct agent in admin traces.
|
|
697
|
+
*/
|
|
698
|
+
await safeDispatchCustomEvent(
|
|
699
|
+
GraphEvents.ON_AGENT_TRANSITION,
|
|
700
|
+
{
|
|
701
|
+
sourceAgentId: sourceAgentId,
|
|
702
|
+
sourceAgentName: this.agentContexts.get(sourceAgentId)?.name ?? sourceAgentId,
|
|
703
|
+
destinationAgentId: destination,
|
|
704
|
+
destinationAgentName: destContext?.name ?? destination,
|
|
705
|
+
edgeType: EdgeType.HANDOFF,
|
|
706
|
+
timestamp: Date.now(),
|
|
707
|
+
},
|
|
708
|
+
config
|
|
709
|
+
);
|
|
710
|
+
|
|
692
711
|
/**
|
|
693
712
|
* Invoke the child subgraph with config propagation.
|
|
694
713
|
* Config carries callbacks (for SSE streaming), abort signal,
|
|
@@ -711,19 +730,6 @@ export class MultiAgentGraph extends StandardGraph {
|
|
|
711
730
|
`${truncatedResult.length < resultText.length ? `, truncated to ${truncatedResult.length}` : ''})`
|
|
712
731
|
);
|
|
713
732
|
|
|
714
|
-
await safeDispatchCustomEvent(
|
|
715
|
-
GraphEvents.ON_AGENT_TRANSITION,
|
|
716
|
-
{
|
|
717
|
-
sourceAgentId: sourceAgentId,
|
|
718
|
-
sourceAgentName: this.agentContexts.get(sourceAgentId)?.name ?? sourceAgentId,
|
|
719
|
-
destinationAgentId: destination,
|
|
720
|
-
destinationAgentName: destContext?.name ?? destination,
|
|
721
|
-
edgeType: EdgeType.HANDOFF,
|
|
722
|
-
timestamp: Date.now(),
|
|
723
|
-
},
|
|
724
|
-
config
|
|
725
|
-
);
|
|
726
|
-
|
|
727
733
|
return truncatedResult;
|
|
728
734
|
} catch (err) {
|
|
729
735
|
const errorMessage =
|