feat(ecc2): implement live output streaming per agent (#774)

- PTY output capture via tokio::process with stdout/stderr piping
- Ring buffer (1000 lines) per session
- Output pane wired to show selected session with auto-scroll
- Broadcast channel for output events
This commit is contained in:
Affaan Mustafa
2026-03-23 03:46:19 -07:00
parent e78c092499
commit 44c2bf6f7b
7 changed files with 1037 additions and 222 deletions

View File

@@ -7,6 +7,7 @@ mod worktree;
use anyhow::Result;
use clap::Parser;
use std::path::PathBuf;
use tracing_subscriber::EnvFilter;
#[derive(Parser, Debug)]
@@ -46,6 +47,17 @@ enum Commands {
},
/// Run as background daemon
Daemon,
#[command(hide = true)]
RunSession {
#[arg(long)]
session_id: String,
#[arg(long)]
task: String,
#[arg(long)]
agent: String,
#[arg(long)]
cwd: PathBuf,
},
}
#[tokio::main]
@@ -91,6 +103,14 @@ async fn main() -> Result<()> {
println!("Starting ECC daemon...");
session::daemon::run(db, cfg).await?;
}
Some(Commands::RunSession {
session_id,
task,
agent,
cwd,
}) => {
session::manager::run_session(&cfg, &session_id, &task, &agent, &cwd).await?;
}
}
Ok(())