SubagentHeartbeat class final

Periodic status digests for running background subagents.

The constructor takes FUNCTION getters for both thresholds so a config change applies at the next tick without a restart (E6), and an injectable clock so tests drive ages deterministically (E5: every window is computed from the child's timestamps, never a wall timer).

Constructors

SubagentHeartbeat({required SubagentManager manager, required void notify(String digest), int heartbeatMinutes()?, int stallMinutes()?, DateTime now()?})

Properties

hashCode → int
The hash code for this object.
no setterinherited
manager → SubagentManager
The retained-subagent registry the digests observe.
final
notify → void Function(String digest)
The delivery sink: the host steers the digest into the parent (busy → step boundary, idle → wake) exactly like completion notices.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildDigest() → String?
The merged digest for every RUNNING child, or null when none is running. A child that settled before the tick never appears (E1/E3: the completion notice is the only word — no zombie-ghost line).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() → void
Arms the cadence. The kill switch (heartbeatMinutes <= 0) arms nothing — no timer, no digests.
stop() → void
Disarms the cadence.
tick() → String?
Fires one digest and returns it — the timer's body and the tests' manual trigger. The threshold getters are consulted EVERY call (E6); the kill switch suppresses the digest entirely. Returns null when nothing is to report.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited