TaskExecutor constructor
TaskExecutor({
- required List<
AgentTool> childTools, - required StreamFunction streamFunction(),
- required Model model(),
- required TaskAgentRegistry registry,
- required Semaphore semaphore,
- required AgentOutputStore store,
- ModelRolesResolver? rolesResolver,
- SubagentManager? subagentManager,
- A2aManager? a2aManager,
- Future<
Session> childSessionFactory()?, - ChildSessionOpener? childSessionOpener,
- CompactionEngine? compactionEngine,
- ContextWindowRegistry? contextWindowRegistry,
- int? contextWindowCap,
- bool misuseBreaker = true,
Creates a TaskExecutor. childTools is the parent tool pool children
draw their restricted surface from; streamFunction/model are the
parent wiring accessors children inherit unless their agent type's
TaskAgentDefinition.modelRole resolves through rolesResolver. Both
resolve at spawn time so a host's live credential (re-auth, provider
switch) reaches children — see TaskToolConfig.streamFunction.
Implementation
TaskExecutor({
required this.childTools,
required this.streamFunction,
required this.model,
required this.registry,
required this.semaphore,
required this.store,
this.rolesResolver,
this.subagentManager,
this.a2aManager,
this.childSessionFactory,
this.childSessionOpener,
this.compactionEngine,
this.contextWindowRegistry,
this.contextWindowCap,
this.misuseBreaker = true,
});