Expand description
Worker-side mid-run intervention delivery (NOI-6): the attempt back-index that routes a pushed neutral command to the live session that owns its target. Worker-side mid-run intervention delivery (NOI-6).
This is the WORKER half of the intervention routing path: a command routed
operator -> server -> liminal PUSH arrives here and is delivered to the
in-flight agent session that owns the target (workflow, activity, attempt),
which applies it via AgentSession::intervene
and returns a neutral ack.
§Harness-neutral by construction
Nothing in this module names a harness, a wire protocol, or a concrete adapter.
It speaks ONLY the neutral aion-core control vocabulary: an
[InterventionCommand] in, an [InterventionOutcome] ack out. The command is
delivered onto the session’s driver control channel (a ControlMessage),
where spawn_agent drains it into the session and
replies the ack — so the harness-specific translation stays behind the
AgentSession trait, never here.
§The attempt back-index (§6.4)
ControlRegistry is the worker’s (workflow, activity, attempt) -> session control channel back-index. A command whose target has no live entry — because
the attempt finished, was superseded by a later attempt, or never ran here — is
the attempt-scoped no-op: it returns [InterventionOutcome::stale_target], an
honest NACK, never a panic. A command whose primitive the target session does
not advertise returns [InterventionOutcome::capability_not_supported]. Neither
is an error: they are two of the three locked outcome classes.
Structs§
- Control
Registry - The worker’s attempt back-index: maps a live
SessionKeyto its session control leg, so a routed command reaches the exact in-flight attempt. - Session
Guard - Drop guard removing a session’s control leg from the
ControlRegistrywhen the session ends, so the back-index tracks exactly the live sessions. - Session
Key - The
(workflow, activity, attempt)key one running agent session is addressed by — the exact identity the design keys the whole intervention path on.