Expand description
The first-party Norn adapter for Aion — the first concrete AgentHarness integration.
This crate implements the aion-integrations AgentHarness / AgentSession seam against a
real Norn process driven in its --protocol jsonrpc mode. It is the analogue of aion-worker’s
concrete liminal adapter: the ONE place in the workspace that names Norn’s on-wire contract
and translates the neutral intervention primitives onto Norn’s native control channel (§3.4).
§The invariant this crate exists to preserve
The aion platform crates (aion-core, aion-worker, aion-server, …) stay Norn-blind:
everything Norn-specific — the JSON-RPC method namespace, the event/* shapes, the
intervene/* requests — is confined to protocol and translate here, behind the neutral
trait. Nothing above this adapter references a Norn type (§3A.4). Norn itself does not depend
on aion: this adapter maps Norn’s documented JSON-RPC contract, so Norn stays a standalone
harness.
§Shape
NornHarnessimplementsAgentHarness:AgentHarness::startspawnsnorn --protocol jsonrpc, performs theinitializehandshake, issuesrun/execute, and returns aNornSession.NornSessionimplementsAgentSession:AgentSession::capabilitiesreturns the parsedinitializecapabilities,AgentSession::eventsstreams live translatedaion_core::ActivityEvents,AgentSession::intervenemaps a neutral command onto anintervene/*request (capability-gated), andAgentSession::wait_resultreturns the id-matchedrun/executeResponse as the terminalaion_core::Payload.registration_capabilitiespublishes the neutralInterventionCapabilitiesthis adapter can honour, for a worker that must advertise them when it REGISTERS — before anynornprocess exists to be asked. It is the adapter’s translation ceiling, not a guess about a binary; the per-session handshake reads what the spawned binary actually advertises, and the function’s own documentation is explicit about how the two can disagree.protocolnames Norn’s wire contract;translateis the pure, independently tested translation between that contract and the neutral types.advicecarries the operator route-out for Norn’s degraded-session refusal:AdvisingHarnessdecorates any composed harness so that specific refusal surfaces with the restart flag that gets past it, spelled the way the deployment’s own command line spells it. Promoted here from the assistant’s example worker so every composition root — the built-inaion worker agentverb included — teaches the same way.NornInvocationis the previewable child invocation (NornHarness::invocation): the spawn path is built from it, so a composition root can assert the exact argv and child environment it composed without running an agent.
Re-exports§
pub use advice::ALLOW_DEGRADED_SESSION_FLAG;pub use advice::AdvisingHarness;pub use advice::argv_allows_degraded_session;pub use advice::degraded_session_advice;pub use advice::is_degraded_session_refusal;pub use harness::NornHarness;pub use harness::NornInvocation;pub use harness::registration_capabilities;pub use session::NornSession;
Modules§
- advice
- Operator advice for Norn’s degraded-session refusal.
- harness
NornHarness— theAgentHarnessimplementation that drives a real Norn process.- protocol
- Norn’s on-wire JSON-RPC contract — the ONLY module in the workspace that names it.
- session
NornSession— a live Norn--protocol jsonrpcrun behind theAgentSessionseam.- translate
- The §3.4 translation point — the single place Norn’s native event/command shapes are named.