TaskToolConfig class final
Configuration for taskTool. One config per session: the semaphore,
outputs store, and jobManager are session-scoped through it, so
repeated (and concurrent) task calls share the concurrency bound and
the agent:// id space (omp's session-scoped TaskTool instance).
Constructors
-
TaskToolConfig({required List<
AgentTool> childTools, required StreamFunction streamFunction(), required Model model(), ModelRolesResolver? rolesResolver, List<TaskAgentDefinition> agentTypes = const [], int maxConcurrent = defaultTaskMaxConcurrent, bool defaultBackground = false, AgentOutputStore? outputs, TaskJobManager? jobManager, SubagentManager? subagentManager, Future<Session> childSessionFactory(String parentSessionId, String childId)?, ChildSessionOpener? childSessionOpener, A2aManager? a2aManager, CompactionEngine? compactionEngine, bool misuseBreaker = true}) - Creates a TaskToolConfig.
Properties
- a2aManager → A2aManager?
-
Optional A2A remote-agent manager (Phase 5a). When present, the agent
type
a2a:<name>runs items against the configured remote agent.final -
agentTypes
→ List<
TaskAgentDefinition> -
Host-provided agent types; a name colliding with a built-in replaces it
(omp's project-over-bundled precedence).
final
-
childSessionFactory
→ Future<
Session> Function(String parentSessionId, String childId)? -
Optional child-session factory (Phase 3a+): when present, the executor
creates a real JSONL session for each completed child and writes its
transcript into it, so
/agents open <id>can switch into the child session afterwards. Created at COMPLETION (not at register) — creating a session mid-spawn would lose the completion-delivery steering race.final - childSessionOpener → ChildSessionOpener?
-
Optional child-session opener (issue #222): when present, the shared
executor can resume a failed/idle/completed child IN ITS OWN JSONL
session (
task_resume/task_send) — same session file, same mailbox id, never aname-2clone. Null disables the resume path; the tools advertise the missingchild-resumecapability.final -
childTools
→ List<
AgentTool> -
The parent tool pool children draw their restricted surface from.
The
tasktool itself is always excluded from child surfaces (no nested task calls in v1).final - compactionEngine → CompactionEngine?
-
Compaction engine for proactive child compaction (issue #439): the
host's config choice rides to children — null resolves to structured.
final
- defaultBackground → bool
-
Default execution mode when a call omits
background(omp'sasync.enabled, made host-neutral per the card).final - executor → TaskExecutor
-
The session-shared executor (issue #222): the
tasktool runs through it, and hosts pass TaskExecutor.resumeChild tosubagentMonitoringToolssotask_resume/task_sendcontinue children in their own sessions. Lazy — identical construction to the executortaskToolused to build per call.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
- jobManager → TaskJobManager
-
The session background job registry.
final
- misuseBreaker → bool
-
The tool-misuse circuit breaker switch (issue #862, default true):
every spawned child agent gets a breaker wired into its loop.
final
- model → Model Function()
-
The parent's model, inherited the same way (resolved per spawn).
final
- outputs → AgentOutputStore
-
The session output store backing
agent://resolution.final - rolesResolver → ModelRolesResolver?
-
Optional role resolver; agent types with a
TaskAgentDefinition.modelRole (e.g. the built-in
exploreonsmol) resolve their model + stream through it, falling back to the parent wiring when the role is unconfigured.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semaphore → Semaphore
-
The session concurrency bound (omp's
task.maxConcurrency;0means unbounded). Sized once — later changes need a new config (omp semantics).final - streamFunction → StreamFunction Function()
-
The parent's provider adapter, inherited by children without a
resolvable model role. Resolved at SPAWN time, not at construction:
a host that re-authenticates or switches provider/model mid-session
(
/provider, an SSO refresh) re-points its live adapter, and children spawned afterwards must inherit the live credential — a wiring frozen at boot would send the stale (or empty) key and 401.final - subagentManager → SubagentManager?
-
Optional retained-subagent registry (Phase 3a). When present, every
spawn registers a SubagentHandle so the child is addressable and
observable after completion.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited