Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d625e58
chore(deps): bump agent-client-protocol from 0.11.1 to 0.12.1 (#9381)
dependabot[bot] May 23, 2026
8689fdf
chore(deps): bump image from 0.24.9 to 0.25.10 (#9383)
dependabot[bot] May 23, 2026
ce004f7
fix(agents): serialize per-session agent creation to stop duplicate M…
fresh3nough May 23, 2026
c4d64d1
Fix desktop chat search session limiting (#9366)
angiejones May 24, 2026
e1cc44f
Build summon instructions per turn (#9329)
DOsinga May 25, 2026
ba16de9
docs: stats update (#9410)
angiejones May 25, 2026
a11843a
Simplify UI customization (#9353)
DOsinga May 26, 2026
6d544e7
chore(deps): bump qs from 6.14.2 to 6.15.2 in /evals/open-model-gym/m…
dependabot[bot] May 26, 2026
bf0da95
Add Turkish desktop locale (#9392)
seneroner77-cmd May 26, 2026
27dc0d5
Improve dependency hygiene (#9360)
jh-block May 26, 2026
dcdc7f6
fix(desktop): stop the main window growing taller on every launch (#9…
officialasishkumar May 26, 2026
b332f50
Russian language support (#9406)
besdar May 26, 2026
b0cd61a
chore(release): bump version to 1.36.0 (minor) (#9417)
github-actions[bot] May 26, 2026
7dc904e
add databricks ai gateway provider (#9274)
baxen May 26, 2026
1749354
Prefer goose aliases for Databricks v2 inventory (#9430)
baxen May 27, 2026
794402d
fix(ci): build linux x86_64 standard inside manylinux_2_28 for glibc …
88plug May 27, 2026
d90b349
feat: add /model slash command to CLI for session model switching (#8…
baxen May 27, 2026
27b41d9
local inference: stricter GGUF requirements, auto detection of tool c…
jh-block May 27, 2026
d017295
fix: tolerate missing responses output (#9449)
angiejones May 27, 2026
4f43ae4
fix(ui): preserve pending env vars in Add Extension form (#9285)
williams145 May 27, 2026
10ac6b1
feat: make tool output size limit configurable via GOOSE_MAX_TOOL_RES…
DOsinga May 27, 2026
1125e8d
fix: make azure api-version query param optional (#9221)
DOsinga May 27, 2026
35d1fc7
fix(desktop): start new chat in current window from recipe param moda…
michaelneale May 27, 2026
a18b92e
fix(desktop): refresh provider list in Switch Models picker (#9408)
officialasishkumar May 27, 2026
4c88f4b
feat(providers): add Alibaba (Qwen via DashScope) declarative provide…
jezweb May 27, 2026
e9b0d92
feat(providers): add Perplexity as a declarative OpenAI-compatible pr…
jliounis May 27, 2026
c9945bc
chore(deps): bump sha2 from 0.10.9 to 0.11.0 (#8963)
dependabot[bot] May 27, 2026
9c403b1
refactor: convert desktop v1 and goose-server extensions to ACP+ (#9448)
alexhancock May 27, 2026
27d68ba
doc: Add Scaleway provider (#9423)
Quentinchampenois May 28, 2026
d10d009
CLI to list skills with token counts (#9326)
jamadeo May 28, 2026
2116f88
feat: add `tui` feature flag to gate the tui command (#9428)
r0x0d May 28, 2026
1cb5cb0
Add Scholar Sidekick MCP extension (#9433)
mlava May 28, 2026
104cc17
Add ACP session system prompt setter (#9478)
baxen May 29, 2026
a3bdb91
fix(acp): forward ACP server context window size to clients (#9455)
matt2e May 29, 2026
25ff547
Expose raw provider supported models over ACP (#9475)
baxen May 29, 2026
13f7be2
feat: replay acp images on session load (#9496)
kalvinnchau May 29, 2026
6d49493
chore: sync upstream aaif-goose/goose@main into apemind-agent (2026-0…
earayu May 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 47 additions & 23 deletions crates/goose/src/acp/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,32 @@ fn replay_message_meta(message: &Message) -> Meta {
meta
}

fn replay_audience_annotations(audience: &[Role]) -> Annotations {
Annotations::new().audience(
audience
.iter()
.map(|role| match role {
Role::Assistant => agent_client_protocol::schema::Role::Assistant,
Role::User => agent_client_protocol::schema::Role::User,
})
.collect::<Vec<_>>(),
)
}

fn send_replay_content_chunk(
cx: &ConnectionTo<Client>,
session_id: &SessionId,
message: &Message,
content: ContentBlock,
) -> std::result::Result<(), agent_client_protocol::Error> {
let chunk = ContentChunk::new(content).meta(replay_message_meta(message));
let update = match message.role {
Role::User => SessionUpdate::UserMessageChunk(chunk),
Role::Assistant => SessionUpdate::AgentMessageChunk(chunk),
};
cx.send_notification(SessionNotification::new(session_id.clone(), update))
}

fn replay_message_goose_meta(message: &Message) -> serde_json::Map<String, serde_json::Value> {
let mut goose = serde_json::Map::new();
goose.insert("created".to_string(), serde_json::json!(message.created));
Expand Down Expand Up @@ -2824,30 +2850,28 @@ impl GooseAcpAgent {
MessageContent::Text(text) => {
let mut tc = TextContent::new(text.text.clone());
if let Some(audience) = text.audience() {
tc = tc.annotations(
Annotations::new().audience(
audience
.iter()
.map(|r| match r {
Role::Assistant => {
agent_client_protocol::schema::Role::Assistant
}
Role::User => agent_client_protocol::schema::Role::User,
})
.collect::<Vec<_>>(),
),
);
tc = tc.annotations(replay_audience_annotations(audience));
}
let chunk = ContentChunk::new(ContentBlock::Text(tc))
.meta(replay_message_meta(message));
let update = match message.role {
Role::User => SessionUpdate::UserMessageChunk(chunk),
Role::Assistant => SessionUpdate::AgentMessageChunk(chunk),
};
cx.send_notification(SessionNotification::new(
args.session_id.clone(),
update,
))?;
send_replay_content_chunk(
cx,
&args.session_id,
message,
ContentBlock::Text(tc),
)?;
}
MessageContent::Image(image) => {
let mut image_content =
ImageContent::new(image.data.clone(), image.mime_type.clone());
if let Some(audience) = image.audience() {
image_content =
image_content.annotations(replay_audience_annotations(audience));
}
send_replay_content_chunk(
cx,
&args.session_id,
message,
ContentBlock::Image(image_content),
)?;
}
MessageContent::ToolRequest(tool_request) => {
// Replay-only: emit the ToolCall notification and
Expand Down
55 changes: 53 additions & 2 deletions crates/goose/tests/acp_common_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#[path = "../acp_fixtures/mod.rs"]
pub mod fixtures;
use agent_client_protocol::schema::{
ListSessionsResponse, McpServer, McpServerHttp, ModelId, SessionInfo, SessionModeId,
ToolCallStatus, ToolKind,
ContentBlock, ListSessionsResponse, McpServer, McpServerHttp, ModelId, SessionInfo,
SessionModeId, SessionUpdate, ToolCallStatus, ToolKind,
};
use fixtures::{
assert_notifications, Connection, FsFixture, Notification, OpenAiFixture, PermissionDecision,
Expand Down Expand Up @@ -622,6 +622,57 @@ pub async fn run_load_session_mcp<C: Connection>() {
assert_eq!(output.text, FAKE_CODE, "tool call failed in loaded session");
}

pub async fn run_load_session_replays_image_attachment<C: Connection>() {
let expected_session_id = C::expected_session_id();
let openai = OpenAiFixture::new(
vec![(
r#""type":"image_url""#.into(),
include_str!("../acp_test_data/openai_image_attachment.txt"),
)],
expected_session_id.clone(),
)
.await;

let mut conn = C::new(TestConnectionConfig::default(), openai).await;
let SessionData { mut session, .. } = conn.new_session().await.unwrap();
expected_session_id.set(&session.session_id().0);
let session_id = session.session_id().0.to_string();

let output = session
.prompt_with_image(
"Describe what you see in this image",
TEST_IMAGE_B64,
"image/png",
PermissionDecision::Cancel,
)
.await
.unwrap();
assert!(output.text.contains("Hello Goose!"));
session.session_updates();

let SessionData { session, .. } = conn.load_session(&session_id, vec![]).await.unwrap();
let replayed_images = session
.session_updates()
.into_iter()
.filter_map(|update| match update {
SessionUpdate::UserMessageChunk(chunk) => match chunk.content {
ContentBlock::Image(image) => Some(image),
_ => None,
},
_ => None,
})
.collect::<Vec<_>>();

assert_eq!(
replayed_images.len(),
1,
"expected load_session to replay the user image attachment exactly once"
);
let replayed_image = &replayed_images[0];
assert_eq!(replayed_image.data, TEST_IMAGE_B64);
assert_eq!(replayed_image.mime_type, "image/png");
}

pub async fn run_load_session_error<C: Connection>() {
let openai = OpenAiFixture::new(vec![], C::expected_session_id()).await;
let mut conn = C::new(TestConnectionConfig::default(), openai).await;
Expand Down
3 changes: 3 additions & 0 deletions crates/goose/tests/acp_fixtures/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,9 @@ pub trait Connection: Sized {
pub trait Session: std::fmt::Debug {
fn session_id(&self) -> &agent_client_protocol::schema::SessionId;
fn work_dir(&self) -> std::path::PathBuf;
/// Drains and returns raw session updates collected by the fixture.
fn session_updates(&self) -> Vec<SessionUpdate>;
/// Drains and returns simplified notifications collected by the fixture.
fn notifications(&self) -> Vec<Notification>;
async fn prompt(
&mut self,
Expand Down
7 changes: 5 additions & 2 deletions crates/goose/tests/acp_fixtures/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,12 @@ impl Session for AcpProviderSession {
self.work_dir.clone()
}

fn session_updates(&self) -> Vec<SessionUpdate> {
self.notification_sink.lock().unwrap().drain(..).collect()
}

fn notifications(&self) -> Vec<super::Notification> {
let updates: Vec<_> = self.notification_sink.lock().unwrap().drain(..).collect();
super::to_notifications(&updates)
super::to_notifications(&self.session_updates())
}

async fn prompt(
Expand Down
22 changes: 14 additions & 8 deletions crates/goose/tests/acp_fixtures/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ impl std::fmt::Debug for AcpServerSession {
}

impl AcpServerSession {
pub fn session_updates(&self) -> Vec<SessionUpdate> {
self.updates
.lock()
.unwrap()
.drain(..)
.map(|n| n.update)
.collect()
}

async fn send_prompt(
&mut self,
content: Vec<ContentBlock>,
Expand Down Expand Up @@ -464,15 +473,12 @@ impl Session for AcpServerSession {
self._work_dir.path().to_path_buf()
}

fn session_updates(&self) -> Vec<SessionUpdate> {
AcpServerSession::session_updates(self)
}

fn notifications(&self) -> Vec<super::Notification> {
let updates: Vec<_> = self
.updates
.lock()
.unwrap()
.drain(..)
.map(|n| n.update)
.collect();
super::to_notifications(&updates)
super::to_notifications(&self.session_updates())
}

async fn prompt(
Expand Down
17 changes: 11 additions & 6 deletions crates/goose/tests/acp_server_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ use common_tests::{
run_close_session, run_config_mcp, run_config_option_mode_set, run_config_option_model_set,
run_delete_session, run_fs_read_text_file_true, run_fs_write_text_file_false,
run_fs_write_text_file_true, run_initialize_doesnt_hit_provider, run_list_sessions,
run_load_mode, run_load_model, run_load_session_error, run_load_session_mcp, run_mode_set,
run_model_list, run_model_set, run_model_set_error_session_not_found,
run_new_session_returns_initial_config, run_permission_persistence, run_prompt_basic,
run_prompt_error, run_prompt_image, run_prompt_image_attachment, run_prompt_mcp,
run_prompt_model_mismatch, run_prompt_skill, run_session_name_update_notification,
run_shell_terminal_false, run_shell_terminal_true,
run_load_mode, run_load_model, run_load_session_error, run_load_session_mcp,
run_load_session_replays_image_attachment, run_mode_set, run_model_list, run_model_set,
run_model_set_error_session_not_found, run_new_session_returns_initial_config,
run_permission_persistence, run_prompt_basic, run_prompt_error, run_prompt_image,
run_prompt_image_attachment, run_prompt_mcp, run_prompt_model_mismatch, run_prompt_skill,
run_session_name_update_notification, run_shell_terminal_false, run_shell_terminal_true,
};
use goose::config::GooseMode;
use goose::conversation::message::Message;
Expand Down Expand Up @@ -220,6 +220,11 @@ fn test_load_session_mcp() {
run_test(async { run_load_session_mcp::<AcpServerConnection>().await });
}

#[test]
fn test_load_session_replays_image_attachment() {
run_test(async { run_load_session_replays_image_attachment::<AcpServerConnection>().await });
}

#[test]
fn test_mode_set() {
run_test(async { run_mode_set::<AcpServerConnection>().await });
Expand Down
Loading