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
//! List handler for the `session_task` tool.

use crate::session::tasks::{TaskLog, TaskState};
use crate::tool::ToolResult;
use anyhow::Result;

pub async fn list(log: &TaskLog) -> Result<ToolResult> {
    let events = log.read_all().await?;
    let state = TaskState::from_log(&events);
    let rendered = crate::session::tasks::governance_block(&state)
        .unwrap_or_else(|| "No goal and no tasks.".to_string());
    Ok(ToolResult::success(rendered))
}