zeph_core/agent/agent_access_impl.rs
1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! `AgentError` <-> `CommandError` conversion for the [`zeph_commands::AgentAccess`] trait
5//! boundary.
6//!
7//! The 15 `AgentAccess` sub-trait implementations for [`Agent<C>`] live in the per-domain
8//! `*_commands.rs` modules alongside this file (see `crate::agent::mod` for the full list),
9//! not here.
10//!
11//! [`Agent<C>`]: super::Agent
12
13use zeph_commands::CommandError;
14
15use super::error::AgentError;
16
17/// Convert `AgentError` to `CommandError` for the trait boundary.
18impl From<AgentError> for CommandError {
19 fn from(e: AgentError) -> Self {
20 Self(e.to_string())
21 }
22}