ExternalInbox class final
A plugin-provided inbox drained into the agent loop as steering messages, oldest first. Sources may be remote (a hub connection), so both callbacks must be cheap and drain must never throw — a failing drain returns an empty list instead.
Constructors
-
ExternalInbox({required Future<
List< drain(), Future<AgentMessage> >bool> hasPending()?}) -
const
Properties
-
drain
→ Future<
List< Function()AgentMessage> > -
Consumes the unread messages, oldest first. Never throws; an empty
list means "nothing arrived".
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hasPending
→ Future<
bool> Function()? -
Non-draining probe: true when at least one unread message waits.
Optional — inboxes without it cannot wake the idle loop or soften a
long tool call, only deliver at turn boundaries.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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