TaskExecutor constructor

TaskExecutor({
  1. required List<AgentTool> childTools,
  2. required StreamFunction streamFunction(),
  3. required Model model(),
  4. required TaskAgentRegistry registry,
  5. required Semaphore semaphore,
  6. required AgentOutputStore store,
  7. ModelRolesResolver? rolesResolver,
  8. SubagentManager? subagentManager,
  9. A2aManager? a2aManager,
  10. Future<Session> childSessionFactory(
    1. String parentSessionId,
    2. String childId
    )?,
  11. ChildSessionOpener? childSessionOpener,
  12. CompactionEngine? compactionEngine,
  13. ContextWindowRegistry? contextWindowRegistry,
  14. int? contextWindowCap,
  15. 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,
});