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<ContextError> for AgentError`.
13#[derive(Debug, Error)]
14pub enum ContextError {
15 /// A memory subsystem operation failed.
16 #[error("memory error: {0}")]
17 Memory(#[from] zeph_memory::MemoryError),
18
19 /// An unexpected error occurred during context assembly.
20 #[error("context assembly error: {0}")]
21 Assembly(String),
22}