feat(goose-acp): enable parallel sessions with isolated agent state (#6392)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Adrian Cole
2026-01-15 06:19:17 +08:00
committed by GitHub
parent fb0eca2c36
commit 7d4a6bd8ff
86 changed files with 2594 additions and 1938 deletions
+5 -5
View File
@@ -11,21 +11,21 @@ description.workspace = true
workspace = true
[dependencies]
anyhow = "1.0"
anyhow = { workspace = true }
paste = "1.0"
ctor = "0.2.7"
goose = { path = "../goose" }
rmcp = { workspace = true }
async-trait = "0.1.89"
chrono = { version = "0.4", features = ["serde"] }
serde_json = "1.0"
serde_json = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
tracing = "0.1"
tracing = { workspace = true }
tracing-subscriber = { version = "0.3", features = ["registry"] }
tokio = { version = "1.43", features = ["full"] }
tokio = { workspace = true }
include_dir = "0.7.4"
once_cell = "1.19"
regex = "1.11.1"
regex = { workspace = true }
dotenvy = "0.15.7"
[target.'cfg(target_os = "windows")'.dependencies]
+4 -3
View File
@@ -1,6 +1,7 @@
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use goose::conversation::Conversation;
use goose::session::session_manager::Session;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
@@ -19,7 +20,7 @@ pub trait BenchBaseSession: Send + Sync {
async fn headless(&mut self, message: String) -> anyhow::Result<()>;
fn message_history(&self) -> Conversation;
fn get_total_token_usage(&self) -> anyhow::Result<Option<i32>>;
fn get_session_id(&self) -> anyhow::Result<String>;
async fn get_session(&self) -> anyhow::Result<Session>;
}
// struct for managing agent-session-access. to be passed to evals for benchmarking
pub struct BenchAgent {
@@ -52,7 +53,7 @@ impl BenchAgent {
self.session.get_total_token_usage().ok().flatten()
}
pub(crate) fn get_session_id(&self) -> anyhow::Result<String> {
self.session.get_session_id()
pub(crate) async fn get_session(&self) -> anyhow::Result<Session> {
self.session.get_session().await
}
}
@@ -5,7 +5,6 @@ use crate::eval_suites::{EvaluationSuite, ExtensionRequirements};
use crate::reporting::EvaluationResult;
use crate::utilities::await_process_exits;
use anyhow::{bail, Context, Result};
use goose::session::SessionManager;
use std::env;
use std::fs;
use std::future::Future;
@@ -156,8 +155,7 @@ impl EvalRunner {
.canonicalize()
.context("Failed to canonicalize current directory path")?;
let session_id = agent.get_session_id()?.to_string();
let session = SessionManager::get_session(&session_id, true).await?;
let session = agent.get_session().await?;
let session_json = serde_json::to_string_pretty(&session)
.context("Failed to serialize session to JSON")?;