@librechat/agents 3.2.62 → 3.2.63

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.
@@ -470,12 +470,15 @@ var StandardGraph = class StandardGraph extends Graph {
470
470
  * {@link t.StandardGraphInput.subagentUsageSink}.
471
471
  */
472
472
  subagentUsageSink;
473
- constructor({ runId, signal, agents, langfuse, tokenCounter, indexTokenCountMap, calibrationRatio, subagentUsageSink }) {
473
+ /** See {@link t.StandardGraphInput.subagentScope}. */
474
+ subagentScope;
475
+ constructor({ runId, signal, agents, langfuse, tokenCounter, indexTokenCountMap, calibrationRatio, subagentUsageSink, subagentScope }) {
474
476
  super();
475
477
  this.runId = runId;
476
478
  this.signal = signal;
477
479
  this.langfuse = langfuse;
478
480
  this.subagentUsageSink = subagentUsageSink;
481
+ this.subagentScope = subagentScope === true;
479
482
  if (agents.length === 0) throw new Error("At least one agent configuration is required");
480
483
  for (const agentConfig of agents) {
481
484
  const agentContext = require_AgentContext.AgentContext.fromConfig(agentConfig, tokenCounter, indexTokenCountMap);
@@ -682,7 +685,7 @@ var StandardGraph = class StandardGraph extends Graph {
682
685
  eventDrivenMode: true,
683
686
  sessions: this.sessions,
684
687
  toolDefinitions: toolDefMap,
685
- agentId: agentContext?.agentId,
688
+ agentId: this.subagentScope ? agentContext?.agentId : void 0,
686
689
  executingAgentId: agentContext?.agentId,
687
690
  toolCallStepIds: this.toolCallStepIds,
688
691
  toolRegistry: agentContext?.toolRegistry,
@@ -712,6 +715,7 @@ var StandardGraph = class StandardGraph extends Graph {
712
715
  trace: traceToolNode,
713
716
  runLangfuse: this.langfuse,
714
717
  agentLangfuse: agentContext?.langfuse,
718
+ agentId: this.subagentScope ? agentContext?.agentId : void 0,
715
719
  executingAgentId: agentContext?.agentId,
716
720
  toolCallStepIds: this.toolCallStepIds,
717
721
  errorHandler: (data, metadata) => StandardGraph.handleToolCallErrorStatic(this, data, metadata),