pub struct AcpTestHarness {
pub client_cx: ConnectionTo<Agent>,
pub peer: TestPeer,
/* private fields */
}Expand description
In-memory ACP harness running the real acp_agent_builder against a
pre-wired test client. Created via AcpTestHarness::start inside a
LocalSet. The harness owns its own [SessionRegistry] and a
temp-dir-backed [SessionStore] so tests can register fake-driven
sessions without going through new_session.
Fields§
§client_cx: ConnectionTo<Agent>§peer: TestPeerImplementations§
Source§impl AcpTestHarness
impl AcpTestHarness
pub async fn start() -> Self
Sourcepub async fn insert_stub_session(
&self,
agent_tx: Sender<UserMessage>,
agent_rx: Receiver<AgentMessage>,
agent_handle: AgentHandle,
id: SessionId,
model: &str,
)
pub async fn insert_stub_session( &self, agent_tx: Sender<UserMessage>, agent_rx: Receiver<AgentMessage>, agent_handle: AgentHandle, id: SessionId, model: &str, )
Register a stub session built from a hand-spawned
(agent_tx, agent_rx, agent_handle) triple — typically from
aether_core::core::agent(fake_llm).spawn().await. MCP channels are
stubbed: no servers, no events. The session is routable via
mgr.prompt(id) / mgr.cancel(id).
Auto Trait Implementations§
impl Freeze for AcpTestHarness
impl !RefUnwindSafe for AcpTestHarness
impl Send for AcpTestHarness
impl Sync for AcpTestHarness
impl Unpin for AcpTestHarness
impl UnsafeUnpin for AcpTestHarness
impl !UnwindSafe for AcpTestHarness
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Creates a shared type from an unshared type.