TaskExecutor class final
Runs task batch items as child Agents under a session Semaphore.
Guards (card §4): the child tool surface never contains task (no
nested task calls — TaskAgentRegistry.toolSurfaceFor); the parent
CancelToken aborts every in-flight child and every semaphore waiter; a
child failure becomes a per-item error entry, never a batch failure
(runSpawn never throws).
Constructors
-
TaskExecutor({required List<
AgentTool> childTools, required StreamFunction streamFunction, required Model model, required TaskAgentRegistry registry, required Semaphore semaphore, required AgentOutputStore store, ModelRolesResolver? rolesResolver}) -
Creates a TaskExecutor.
childToolsis the parent tool pool children draw their restricted surface from;streamFunction/modelare the parent model wiring children inherit unless their agent type's TaskAgentDefinition.modelRole resolves throughrolesResolver.
Properties
-
childTools
→ List<
AgentTool> -
The parent tool pool (already minus any host-hidden tools).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- model → Model
-
Inherited model.
final
- registry → TaskAgentRegistry
-
Agent-type resolution.
final
- rolesResolver → ModelRolesResolver?
-
Optional role resolver supplying cheap models per role (omp's
@smol).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semaphore → Semaphore
-
The session semaphore bounding concurrent children.
final
- store → AgentOutputStore
-
The session output store (
agent://backing).final - streamFunction → StreamFunction
-
Inherited provider adapter (see StreamFunction).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runSpawn(
{required TaskItem item, required int index, required String context, String? preallocatedId, CancelToken? cancelToken, TaskSpawnProgressCallback? onProgress}) → Future< TaskSingleResult> - Runs one batch item to completion. Never throws: cancellation and failure are reported as TaskSingleResult error entries.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited