pi-agent 1.0.0

Agent runtime with tool calling (Rust port of @earendil-works/pi-agent-core). Streaming agent loop, permission policy, built-in tools (read/write/edit/bash/grep/glob/web_fetch/todo).
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum AgentError {
    #[error("provider error: {0}")]
    Provider(#[from] pi_ai::Error),

    #[error("tool '{tool}' failed: {message}")]
    Tool { tool: String, message: String },

    #[error("agent cancelled")]
    Cancelled,

    #[error("agent reached max turns ({0})")]
    MaxTurns(u32),

    #[error("{0}")]
    Other(String),
}

pub type Result<T> = std::result::Result<T, AgentError>;