codetether-agent 4.6.0

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
//! Resolve the on-disk path for a session's task log.

use anyhow::Result;
use std::path::PathBuf;

/// Returns `<sessions_dir>/<id>.tasks.jsonl`.
///
/// Mirrors [`crate::session::Session::session_path`] but with the
/// `.tasks.jsonl` suffix so the log lives alongside its session file.
pub fn task_log_path(session_id: &str) -> Result<PathBuf> {
    let dir = crate::config::Config::data_dir()
        .map(|d| d.join("sessions"))
        .ok_or_else(|| anyhow::anyhow!("Could not determine data directory"))?;
    Ok(dir.join(format!("{session_id}.tasks.jsonl")))
}