codetether-agent 4.7.0-a-002.4

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Status parser for the `session_task` tool.

use crate::session::tasks::SessionTaskStatus;
use anyhow::{Result, anyhow};

pub(super) fn parse_status(s: &str) -> Result<SessionTaskStatus> {
    Ok(match s {
        "pending" => SessionTaskStatus::Pending,
        "in_progress" | "inprogress" => SessionTaskStatus::InProgress,
        "done" => SessionTaskStatus::Done,
        "blocked" => SessionTaskStatus::Blocked,
        "cancelled" | "canceled" => SessionTaskStatus::Cancelled,
        other => return Err(anyhow!("unknown status: {other}")),
    })
}