Skip to content

Remove anyhow from zeph-core library crate #1732

@bug-ops

Description

@bug-ops

Problem

zeph-core is a published library crate but depends on anyhow. Project rules state anyhow should only be used in the root binary entry point (main.rs). Library crates should use thiserror for typed errors.

Proposed Changes

  1. Audit all anyhow usage in crates/zeph-core/src/
  2. Replace with appropriate AgentError variants or new typed error enums
  3. Remove anyhow from crates/zeph-core/Cargo.toml

Motivation

  • Enforce consistent error handling contract: library crates use thiserror, binary uses anyhow
  • Typed errors provide better diagnostics and pattern matching for callers
  • Aligns with .claude/rules/rust-code.md

Files

  • crates/zeph-core/Cargo.toml
  • All .rs files in crates/zeph-core/src/ that use anyhow

Metadata

Metadata

Assignees

No one assigned

    Labels

    archArchitecture and designtech-debtTechnical debt

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions