zeph_context/error.rs
1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Error type for context assembly operations.
5
6use thiserror::Error;
7
8/// Errors that can occur during context assembly.
9///
10/// All async fetch operations in [`crate::assembler::ContextAssembler`] propagate
11/// errors through this type. Callers in `zeph-core` convert to `AgentError` at the
12/// boundary using `From<AssemblerError> for AgentError`.
13#[non_exhaustive]
14#[derive(Debug, Error)]
15pub enum AssemblerError {
16 /// A memory subsystem operation failed.
17 #[error("memory error: {0}")]
18 Memory(Box<dyn std::error::Error + Send + Sync + 'static>),
19
20 /// An unexpected error occurred during context assembly.
21 #[error("context assembly error: {0}")]
22 Assembly(String),
23}