The A2A boundary gateway (issue #27 phase 3): when set, a
name@machine address naming ANOTHER machine delivers through the
a2a: config's server for that machine. Null = foreign machines
stay unresolved (the phase-2 honest error).
The manager's clock, stamped into createdAt/lastActivity.
Injectable so tests drive spawn ages and stall windows
deterministically (issue #383 heartbeat).
This host's machine name for name@machine addressing (issue #27
phase 2): a @machine suffix matching it (case-insensitive) is
stripped before local resolution; any other machine is phase-3 A2A
territory and stays unresolved. Null = the host did not report one —
machine-suffixed addresses then never resolve locally.
Namespace prefix for every mailbox this manager touches (e.g. the
parent session id): two Fa instances sharing one messaging root never
drain each other's inboxes. Mutable — the host sets it once the
session (and thus its id) exists. Empty = single-instance mode.
Injected: the messaging fabric. When present, inter-agent messages go
through per-agent inboxes (visible across processes sharing the
messaging root) instead of the in-process pending queue.
Wakes a retained child with pending inbox mail by resuming it in its
own session (gh-970). Hosts WITH the child-resume capability wire
their executor's resume here:
wakeChild = (id) => executor.resumeChild(id, childInboxWakePrompt) —
the resumed run's warm wake drains the inbox as its first action, so
the reminder (or sibling mail) that fired into a finished monitor is
consumed and the recurrence continues. Null (the app host — no
child-resume capability) keeps the sweep a no-op; the mail waits for
the next task_send/steer.
Attaches the child's real session file to its handle (called by the
executor at child completion when a session factory is wired). The
handle's placeholder id becomes the real JSONL path used by
/agents open <id> and task_observe.
Queues message for id (Phase 3b agent_message / parent steering).
Throws StateError for an unknown id or a full pending queue; caps the
body at maxReplyChars unless capText is false — the warm-wake
resume path passes the parent's steering verbatim (the mailbox cap
would silently truncate it AND shrink it under the over-window
guard, letting an oversized request slip through to the provider).
Aborted children refuse new messages.
Non-draining pending check (issue #647): the child-loop steering
probe. Covers the fabric inbox AND the in-memory pending queue —
the mail:N panel count above reads the fabric only.
The fabric mailbox for a local agent id. An id containing / is
already an absolute mailbox (cross-instance addressing like
<sessionId>/main) and passes through unprefixed.
Context-pressure stamp (issue #439): the executor calls this at every
child turn boundary with the estimated request tokens and the
effective window, so task_status can show the wall approaching.
In-memory only, like touch — the next boundary refreshes it.
Records a completed proactive compaction (issue #439): bumps the
counter, stamps the freed-token count and the time, and persists —
unlike notePressure this is a durable lifecycle fact.
Drops the registry view so the next rehydrate loads afresh — used
when the host switches to a different parent session (each session owns
its own registry). Wake bookkeeping is dropped with it: the new
session's children start clean.
In-flight liveness touch (issue #383 heartbeat): the executor calls
this when the child proves provider-side life — a completed assistant
response — stamping SubagentHandle.lastActivity and the running
turn's usage snapshot. Deliberately in-memory only: the registry
snapshot is not rewritten per provider turn (a write storm for a
freshness signal the next real update refreshes anyway).
Updates a handle's status and emits an event. clearError drops the
recorded failure — the resume path (issue #222) clears the old error
when a failed child goes back to running.
Starts a wake for every retained child that (a) holds pending inbox
mail and (b) can be woken — SubagentStatus.completed or
SubagentStatus.idle. Failed/aborted children stay manual
(task_resume semantics); queued/running children consume their inbox
at the next turn boundary on their own. Fire-and-forget by design:
the sweep rides the host's inbox tick and never blocks it. Returns
how many wakes were STARTED. Without wakeChild or a fabric this is
a cheap no-op.