StuckToolConfig class final
The agent.stuckTool: yaml section (gh-1054). Strict: a bad schema
throws at boot; negative values are rejected; enabled: false is the
kill switch (byte-identical legacy behavior).
Constructors
-
StuckToolConfig({bool enabled = true, StuckFollowUpMode followUp = StuckFollowUpMode.autonomous, Duration floor = const Duration(seconds: defaultStuckFloorSeconds), num declaredTimeoutFactor = defaultStuckDeclaredTimeoutFactor, Duration heartbeatInterval = const Duration(seconds: defaultStuckHeartbeatSeconds), Duration cancelGrace = const Duration(seconds: defaultStuckCancelGraceSeconds), List<
String> excludeTools = defaultStuckExcludedTools}) -
const
- StuckToolConfig.fromYaml(Object? node)
-
factory
Properties
- cancelGrace → Duration
-
Bounded wait for a cancelled call to observe its cancellation before
the supervisor abandons it and moves to the next stage. A wedged
executor that ignores its cancel token cannot block the follow-up
longer than this.
final
- declaredTimeoutFactor → num
-
Multiplier for the call's declared timeout (
bash'stimeoutarg).final - enabled → bool
-
Kill switch.
false= no supervision, byte-identical legacy loop.final -
excludeTools
→ List<
String> -
Tool names never supervised (see defaultStuckExcludedTools).
final
- floor → Duration
-
Absolute floor for the stuck threshold.
final
- followUp → StuckFollowUpMode
-
Threshold follow-up behavior.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeatInterval → Duration
-
Cadence of the liveness heartbeat records.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
excludes(
String name) → bool -
Whether
nameis excluded from supervision. -
heartbeatStart(
Duration? declaredTimeout) → Duration - When heartbeats start: half the stuck threshold — comfortably before the follow-up deadline, and for a declared-timeout call exactly at its own declared bound ("running past its own declared bound" is when the call becomes interesting to watch).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stuckThreshold(
Duration? declaredTimeout) → Duration -
The stuck threshold for a call that declared
declaredTimeout: the greater of (factor × declared) and the absolute floor. Anulldeclared timeout (most tools) uses the floor alone. -
toString(
) → String -
A string representation of this object.
inherited
-
toYamlMap(
) → Map< String, Object?> -
The yaml node shape for host persistence (the
agent:section'sstuckTool:sub-map); only non-default values are written so the config file stays minimal.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
defaultStuckExcludedTools
→ const List<
String> -
Tools never supervised:
ask/request_secretblock on a human by design (a threshold cancel would re-ask),taskruns whole subagents whose own background/settle machinery owns long runs. Configurable so an owner can supervise any of them explicitly.