Expand description
Server-side mid-run intervention routing (NOI-6): capability gate + attempt owner resolution + push to the owning worker over a pluggable transport. Server-side mid-run intervention routing (NOI-6).
This is the SERVER half of the intervention path: it takes a neutral
[InterventionCommand] an operator submitted, resolves the worker currently
owning the target (workflow, activity, attempt) session, gates on that
worker’s advertised [InterventionCapabilities], and — only for an advertised
primitive — routes the command to the owning worker over a pluggable
InterventionTransport (the production one is the liminal server-push, §6.2).
It returns the neutral [InterventionOutcome] ack the operator sees.
§Harness-neutral by construction
Nothing here names a harness or a wire protocol. The router speaks ONLY neutral
aion-core types; the transport trait carries a neutral command and returns a
neutral ack, so the only harness-specific translation stays behind the worker’s
AgentSession, far below this module.
§The three locked outcome classes (§6.4)
- Not supported — the owning worker does not advertise the command’s
primitive. The router refuses it at the SERVER and NEVER sends it, returning
[
InterventionOutcome::capability_not_supported]. This is the LOCKED server-side gate:-32601is reserved for the degenerate protocol bug of a child rejecting a method the server should have gated, NEVER routine gating. - Too late / wrong attempt — no worker owns the target attempt (finished,
superseded, or unknown). The router returns
[
InterventionOutcome::stale_target] — the attempt-scoped no-op, an honest NACK surfaced to the operator, never a crash. - Applied — the command reached the live session and was applied.
Structs§
- Attempt
Key - The
(workflow, activity, attempt)key one running agent session is addressed by — the same identity the worker back-index and the whole design key on. - Attempt
Owner Index - Server-side
attempt -> owning-workerback-index (§6.2). - Intervention
Router - Routes an operator’s neutral command to the worker owning the target attempt, gating on the worker’s advertised capabilities first (NOI-6).
Traits§
- Intervention
Transport - The transport the router pushes a gated command to the owning worker over.