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
pub fn json_line(lines: &[String]) -> anyhow::Result<serde_json::Value> {
    let line = lines
        .iter()
        .rev()
        .find(|line| !line.trim().is_empty())
        .ok_or_else(|| anyhow::anyhow!("PowerShell produced no JSON output"))?;
    Ok(serde_json::from_str(line.trim())?)
}

pub fn escaped_command(script: &str, marker: &str) -> String {
    format!(
        "$ErrorActionPreference='Stop';try{{{script}}}catch{{[pscustomobject]@{{error=$_.Exception.Message}}|ConvertTo-Json -Compress}};Write-Output '{marker}'\n"
    )
}