Skip to main content

Crate aion_integration_cli

Crate aion_integration_cli 

Source
Expand description

A second, independent AgentHarness integration for Aion — the empirical proof that aion-integrations is a real, neutral SDK, not a Norn wrapper (NOI-8, §9.1).

aion-integration-norn is the FIRST adapter (a rich, bidirectional JSON-RPC harness). This crate is a SECOND adapter of a deliberately different shape, so two implementations of one trait exist across two crates — which is what makes the boundary an SDK rather than a one-off. Both fit the neutral seam WITHOUT any change to aion-core, aion-integrations, the wire, the server, or the worker: if a second working integration required touching those, the contract would be “Norn-with-a-flag,” not neutral.

§The two shapes in this crate

  • CliHarness — the observability-only case (case (b) in the design). A plain-stdout CLI agent with no control channel at all: CliHarness::start spawns a line-oriented process and hands its stdout to a CliSession whose pump demuxes interleaved stdout into neutral ActivityEvents (demux, mostly aion_core::ActivityEventKind::Raw, some mapped). It advertises an empty InterventionCapabilities set, so CliSession::intervene rejects every command and the server offers no controls for it. This is a first-class tier — an empty capability advertisement is valid, not degenerate.
  • MockAgentHarness — the interveneable case. A deterministic in-crate harness that advertises {inject_message, cancel}, ACCEPTS those, and cleanly REJECTS the three primitives it does not advertise (notably respond_to_approval) with a capability-not-supported NACK. It exercises the OTHER branch of the AgentSession::intervene contract, and it is a genuine harness the worker driver runs live (not a stub) so the full worker apply path — control channel → AgentSession::intervene → accept/gate → ack — is exercised end-to-end.

§Harness neutrality (the whole point)

Neither shape depends on Norn or on any wire protocol beyond the neutral seam. Both speak only AgentRunSpec in, neutral ActivityEvents out, neutral InterventionCommands in (gated by the neutral InterventionCapabilities), and a neutral terminal Payload. There is no Norn here — this crate exists precisely to prove that.

Re-exports§

pub use harness::CliHarness;
pub use mock::MockAgentHarness;
pub use mock::MockAgentSession;
pub use session::CliSession;

Modules§

demux
The pure stdout demux — plain CLI stdout lines → neutral aion_core::ActivityEvents. The stdout demux — the pure translation from a plain CLI agent’s interleaved stdout lines into neutral [ActivityEvent]s.
harness
The observability-only aion_integrations::AgentHarness over a plain-stdout CLI agent. CliHarness — the [AgentHarness] implementation that drives a plain-stdout CLI agent.
mock
The interveneable mock harness advertising {inject_message, cancel}. MockAgentHarness — the second, INTERVENEABLE shape driven in NOI-8.
session
The live observability-only session implementing aion_integrations::AgentSession. CliSession — a live plain-stdout CLI agent run behind the [AgentSession] seam.