feat(core): Thread AgentLoopContext through core. (#21944)

This commit is contained in:
joshualitt
2026-03-10 18:12:59 -07:00
committed by GitHub
parent daf3701194
commit 20a226a5ab
30 changed files with 272 additions and 125 deletions
+4 -4
View File
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type { Config } from '../config/config.js';
import { type AgentLoopContext } from '../config/agent-loop-context.js';
import { LocalAgentExecutor } from './local-executor.js';
import { safeJsonToMarkdown } from '../utils/markdownUtils.js';
import {
@@ -43,13 +43,13 @@ export class LocalSubagentInvocation extends BaseToolInvocation<
> {
/**
* @param definition The definition object that configures the agent.
* @param config The global runtime configuration.
* @param context The agent loop context.
* @param params The validated input parameters for the agent.
* @param messageBus Message bus for policy enforcement.
*/
constructor(
private readonly definition: LocalAgentDefinition,
private readonly config: Config,
private readonly context: AgentLoopContext,
params: AgentInputs,
messageBus: MessageBus,
_toolName?: string,
@@ -223,7 +223,7 @@ export class LocalSubagentInvocation extends BaseToolInvocation<
const executor = await LocalAgentExecutor.create(
this.definition,
this.config,
this.context,
onActivity,
);