Skip to main content

forge_primitives/
turn_error.rs

1//! Turn-error classification used by both forge-agent (the classifier
2//! lives there next to the matching regex helpers) and
3//! forge-workspace (re-emitted via `SessionUpdate::TurnError`). The
4//! enum itself lives here so neither crate has to re-state it.
5
6/// Coarse classification of a turn-level error message. The
7/// classifier itself lives in forge-agent's
8/// `translate::error_handling`; this enum is the wire shape it
9/// produces.
10#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
11#[serde(rename_all = "snake_case")]
12pub enum TurnErrorClass {
13    PlanLimit,
14    AuthRequired,
15    Internal,
16    Other,
17}