Skip to content

Commit df3e56a

Browse files
earayudependabot[bot]jamadeofresh3noughangiejones
authored
chore: sync upstream aaif-goose/goose@main (2026-05-30 daily sync) (#30)
* chore(deps): bump agent-client-protocol from 0.11.1 to 0.12.1 (aaif-goose#9381) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> * chore(deps): bump image from 0.24.9 to 0.25.10 (aaif-goose#9383) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(agents): serialize per-session agent creation to stop duplicate MCP init (aaif-goose#9357) Signed-off-by: fresh3nough <anonwurcod@proton.me> * Fix desktop chat search session limiting (aaif-goose#9366) Signed-off-by: Angie Jones <jones.angie@gmail.com> * Build summon instructions per turn (aaif-goose#9329) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * docs: stats update (aaif-goose#9410) * Simplify UI customization (aaif-goose#9353) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * chore(deps): bump qs from 6.14.2 to 6.15.2 in /evals/open-model-gym/mcp-harness (aaif-goose#9395) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add Turkish desktop locale (aaif-goose#9392) Signed-off-by: dejavu <dejavu@Mac.home> Co-authored-by: dejavu <dejavu@Mac.home> * Improve dependency hygiene (aaif-goose#9360) Signed-off-by: jh-block <jhugo@block.xyz> * fix(desktop): stop the main window growing taller on every launch (aaif-goose#9409) Signed-off-by: Asish Kumar <officialasishkumar@gmail.com> * Russian language support (aaif-goose#9406) Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> * chore(release): bump version to 1.36.0 (minor) (aaif-goose#9417) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * add databricks ai gateway provider (aaif-goose#9274) Signed-off-by: Bradley Axen <baxen@squareup.com> * Prefer goose aliases for Databricks v2 inventory (aaif-goose#9430) Signed-off-by: Bradley Axen <baxen@squareup.com> * fix(ci): build linux x86_64 standard inside manylinux_2_28 for glibc 2.28+ compat (aaif-goose#9415) Signed-off-by: Andrew Mello <andrew@88plug.com> Co-authored-by: Alex Hancock <alex@alexhancock.com> Co-authored-by: jh-block <255854896+jh-block@users.noreply.github.com> * feat: add /model slash command to CLI for session model switching (aaif-goose#8747) Signed-off-by: Bradley Axen <baxen@squareup.com> Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * local inference: stricter GGUF requirements, auto detection of tool calling support, fixed thinking output parsing (aaif-goose#9442) Signed-off-by: jh-block <jhugo@block.xyz> * fix: tolerate missing responses output (aaif-goose#9449) Signed-off-by: Angie Jones <jones.angie@gmail.com> * fix(ui): preserve pending env vars in Add Extension form (aaif-goose#9285) Signed-off-by: UGBOMEH OGOCHUKWU WILLIAMS <williamsugbomeh@gmail.com> Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * feat: make tool output size limit configurable via GOOSE_MAX_TOOL_RESPONSE_SIZE (aaif-goose#9256) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * fix: make azure api-version query param optional (aaif-goose#9221) Signed-off-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Douwe Osinga <douwe@squareup.com> * fix(desktop): start new chat in current window from recipe param modal (aaif-goose#9422) Signed-off-by: Michael Neale <micn@block.xyz> * fix(desktop): refresh provider list in Switch Models picker (aaif-goose#9408) Signed-off-by: Asish Kumar <officialasishkumar@gmail.com> * feat(providers): add Alibaba (Qwen via DashScope) declarative provider (aaif-goose#9443) Signed-off-by: Jeremy Dawes <jeremy@jezweb.net> * feat(providers): add Perplexity as a declarative OpenAI-compatible provider (aaif-goose#9324) * chore(deps): bump sha2 from 0.10.9 to 0.11.0 (aaif-goose#8963) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> * refactor: convert desktop v1 and goose-server extensions to ACP+ (aaif-goose#9448) * doc: Add Scaleway provider (aaif-goose#9423) Co-authored-by: Quentin Champenois <qchampenois@scaleway.com> * CLI to list skills with token counts (aaif-goose#9326) * feat: add `tui` feature flag to gate the tui command (aaif-goose#9428) Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> * Add Scholar Sidekick MCP extension (aaif-goose#9433) * Add ACP session system prompt setter (aaif-goose#9478) Signed-off-by: Bradley Axen <baxen@squareup.com> * fix(acp): forward ACP server context window size to clients (aaif-goose#9455) Signed-off-by: Matt Toohey <contact@matttoohey.com> * Expose raw provider supported models over ACP (aaif-goose#9475) Signed-off-by: Bradley Axen <baxen@squareup.com> Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Matt Toohey <contact@matttoohey.com> * feat: replay acp images on session load (aaif-goose#9496) Signed-off-by: Kalvin Chau <kalvin@block.xyz> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: fresh3nough <anonwurcod@proton.me> Signed-off-by: Angie Jones <jones.angie@gmail.com> Signed-off-by: Douwe Osinga <douwe@squareup.com> Signed-off-by: dejavu <dejavu@Mac.home> Signed-off-by: jh-block <jhugo@block.xyz> Signed-off-by: Asish Kumar <officialasishkumar@gmail.com> Signed-off-by: Bradley Axen <baxen@squareup.com> Signed-off-by: Andrew Mello <andrew@88plug.com> Signed-off-by: UGBOMEH OGOCHUKWU WILLIAMS <williamsugbomeh@gmail.com> Signed-off-by: Michael Neale <micn@block.xyz> Signed-off-by: Jeremy Dawes <jeremy@jezweb.net> Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com> Signed-off-by: Matt Toohey <contact@matttoohey.com> Signed-off-by: Kalvin Chau <kalvin@block.xyz> Signed-off-by: earayu <earayu@163.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com> Co-authored-by: fre$h <anonwurcod@proton.me> Co-authored-by: Angie Jones <jones.angie@gmail.com> Co-authored-by: Douwe Osinga <douwe@block.xyz> Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: seneroner77-cmd <seneroner77@gmail.com> Co-authored-by: dejavu <dejavu@Mac.home> Co-authored-by: jh-block <jhugo@block.xyz> Co-authored-by: Asish Kumar <87874775+officialasishkumar@users.noreply.github.com> Co-authored-by: Dmitry Beskov <43372966+besdar@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bradley Axen <baxen@squareup.com> Co-authored-by: 88plug <19512127+88plug@users.noreply.github.com> Co-authored-by: Alex Hancock <alex@alexhancock.com> Co-authored-by: jh-block <255854896+jh-block@users.noreply.github.com> Co-authored-by: UGBOMEH OGOCHUKWU WILLIAMS <williamsugbomeh@gmail.com> Co-authored-by: Michael Neale <michael.neale@gmail.com> Co-authored-by: Jeremy Dawes <jeremy@jezweb.net> Co-authored-by: James Liounis <james.liounis@perplexity.ai> Co-authored-by: Alex Hancock <alexhancock@block.xyz> Co-authored-by: Quentin Champenois <26109239+Quentinchampenois@users.noreply.github.com> Co-authored-by: Quentin Champenois <qchampenois@scaleway.com> Co-authored-by: Jack Amadeo <jackamadeo@block.xyz> Co-authored-by: Rodolfo Olivieri <rolivier@redhat.com> Co-authored-by: Mark Lavercombe <mlava@users.noreply.github.com> Co-authored-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Kalvin C <kalvinnchau@users.noreply.github.com>
1 parent d7d4a34 commit df3e56a

6 files changed

Lines changed: 133 additions & 41 deletions

File tree

crates/goose/src/acp/server.rs

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,32 @@ fn replay_message_meta(message: &Message) -> Meta {
24012401
meta
24022402
}
24032403

2404+
fn replay_audience_annotations(audience: &[Role]) -> Annotations {
2405+
Annotations::new().audience(
2406+
audience
2407+
.iter()
2408+
.map(|role| match role {
2409+
Role::Assistant => agent_client_protocol::schema::Role::Assistant,
2410+
Role::User => agent_client_protocol::schema::Role::User,
2411+
})
2412+
.collect::<Vec<_>>(),
2413+
)
2414+
}
2415+
2416+
fn send_replay_content_chunk(
2417+
cx: &ConnectionTo<Client>,
2418+
session_id: &SessionId,
2419+
message: &Message,
2420+
content: ContentBlock,
2421+
) -> std::result::Result<(), agent_client_protocol::Error> {
2422+
let chunk = ContentChunk::new(content).meta(replay_message_meta(message));
2423+
let update = match message.role {
2424+
Role::User => SessionUpdate::UserMessageChunk(chunk),
2425+
Role::Assistant => SessionUpdate::AgentMessageChunk(chunk),
2426+
};
2427+
cx.send_notification(SessionNotification::new(session_id.clone(), update))
2428+
}
2429+
24042430
fn replay_message_goose_meta(message: &Message) -> serde_json::Map<String, serde_json::Value> {
24052431
let mut goose = serde_json::Map::new();
24062432
goose.insert("created".to_string(), serde_json::json!(message.created));
@@ -2824,30 +2850,28 @@ impl GooseAcpAgent {
28242850
MessageContent::Text(text) => {
28252851
let mut tc = TextContent::new(text.text.clone());
28262852
if let Some(audience) = text.audience() {
2827-
tc = tc.annotations(
2828-
Annotations::new().audience(
2829-
audience
2830-
.iter()
2831-
.map(|r| match r {
2832-
Role::Assistant => {
2833-
agent_client_protocol::schema::Role::Assistant
2834-
}
2835-
Role::User => agent_client_protocol::schema::Role::User,
2836-
})
2837-
.collect::<Vec<_>>(),
2838-
),
2839-
);
2853+
tc = tc.annotations(replay_audience_annotations(audience));
28402854
}
2841-
let chunk = ContentChunk::new(ContentBlock::Text(tc))
2842-
.meta(replay_message_meta(message));
2843-
let update = match message.role {
2844-
Role::User => SessionUpdate::UserMessageChunk(chunk),
2845-
Role::Assistant => SessionUpdate::AgentMessageChunk(chunk),
2846-
};
2847-
cx.send_notification(SessionNotification::new(
2848-
args.session_id.clone(),
2849-
update,
2850-
))?;
2855+
send_replay_content_chunk(
2856+
cx,
2857+
&args.session_id,
2858+
message,
2859+
ContentBlock::Text(tc),
2860+
)?;
2861+
}
2862+
MessageContent::Image(image) => {
2863+
let mut image_content =
2864+
ImageContent::new(image.data.clone(), image.mime_type.clone());
2865+
if let Some(audience) = image.audience() {
2866+
image_content =
2867+
image_content.annotations(replay_audience_annotations(audience));
2868+
}
2869+
send_replay_content_chunk(
2870+
cx,
2871+
&args.session_id,
2872+
message,
2873+
ContentBlock::Image(image_content),
2874+
)?;
28512875
}
28522876
MessageContent::ToolRequest(tool_request) => {
28532877
// Replay-only: emit the ToolCall notification and

crates/goose/tests/acp_common_tests/mod.rs

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#[path = "../acp_fixtures/mod.rs"]
66
pub mod fixtures;
77
use agent_client_protocol::schema::{
8-
ListSessionsResponse, McpServer, McpServerHttp, ModelId, SessionInfo, SessionModeId,
9-
ToolCallStatus, ToolKind,
8+
ContentBlock, ListSessionsResponse, McpServer, McpServerHttp, ModelId, SessionInfo,
9+
SessionModeId, SessionUpdate, ToolCallStatus, ToolKind,
1010
};
1111
use fixtures::{
1212
assert_notifications, Connection, FsFixture, Notification, OpenAiFixture, PermissionDecision,
@@ -622,6 +622,57 @@ pub async fn run_load_session_mcp<C: Connection>() {
622622
assert_eq!(output.text, FAKE_CODE, "tool call failed in loaded session");
623623
}
624624

625+
pub async fn run_load_session_replays_image_attachment<C: Connection>() {
626+
let expected_session_id = C::expected_session_id();
627+
let openai = OpenAiFixture::new(
628+
vec![(
629+
r#""type":"image_url""#.into(),
630+
include_str!("../acp_test_data/openai_image_attachment.txt"),
631+
)],
632+
expected_session_id.clone(),
633+
)
634+
.await;
635+
636+
let mut conn = C::new(TestConnectionConfig::default(), openai).await;
637+
let SessionData { mut session, .. } = conn.new_session().await.unwrap();
638+
expected_session_id.set(&session.session_id().0);
639+
let session_id = session.session_id().0.to_string();
640+
641+
let output = session
642+
.prompt_with_image(
643+
"Describe what you see in this image",
644+
TEST_IMAGE_B64,
645+
"image/png",
646+
PermissionDecision::Cancel,
647+
)
648+
.await
649+
.unwrap();
650+
assert!(output.text.contains("Hello Goose!"));
651+
session.session_updates();
652+
653+
let SessionData { session, .. } = conn.load_session(&session_id, vec![]).await.unwrap();
654+
let replayed_images = session
655+
.session_updates()
656+
.into_iter()
657+
.filter_map(|update| match update {
658+
SessionUpdate::UserMessageChunk(chunk) => match chunk.content {
659+
ContentBlock::Image(image) => Some(image),
660+
_ => None,
661+
},
662+
_ => None,
663+
})
664+
.collect::<Vec<_>>();
665+
666+
assert_eq!(
667+
replayed_images.len(),
668+
1,
669+
"expected load_session to replay the user image attachment exactly once"
670+
);
671+
let replayed_image = &replayed_images[0];
672+
assert_eq!(replayed_image.data, TEST_IMAGE_B64);
673+
assert_eq!(replayed_image.mime_type, "image/png");
674+
}
675+
625676
pub async fn run_load_session_error<C: Connection>() {
626677
let openai = OpenAiFixture::new(vec![], C::expected_session_id()).await;
627678
let mut conn = C::new(TestConnectionConfig::default(), openai).await;

crates/goose/tests/acp_fixtures/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,9 @@ pub trait Connection: Sized {
562562
pub trait Session: std::fmt::Debug {
563563
fn session_id(&self) -> &agent_client_protocol::schema::SessionId;
564564
fn work_dir(&self) -> std::path::PathBuf;
565+
/// Drains and returns raw session updates collected by the fixture.
566+
fn session_updates(&self) -> Vec<SessionUpdate>;
567+
/// Drains and returns simplified notifications collected by the fixture.
565568
fn notifications(&self) -> Vec<Notification>;
566569
async fn prompt(
567570
&mut self,

crates/goose/tests/acp_fixtures/provider.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,12 @@ impl Session for AcpProviderSession {
325325
self.work_dir.clone()
326326
}
327327

328+
fn session_updates(&self) -> Vec<SessionUpdate> {
329+
self.notification_sink.lock().unwrap().drain(..).collect()
330+
}
331+
328332
fn notifications(&self) -> Vec<super::Notification> {
329-
let updates: Vec<_> = self.notification_sink.lock().unwrap().drain(..).collect();
330-
super::to_notifications(&updates)
333+
super::to_notifications(&self.session_updates())
331334
}
332335

333336
async fn prompt(

crates/goose/tests/acp_fixtures/server.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ impl std::fmt::Debug for AcpServerSession {
5353
}
5454

5555
impl AcpServerSession {
56+
pub fn session_updates(&self) -> Vec<SessionUpdate> {
57+
self.updates
58+
.lock()
59+
.unwrap()
60+
.drain(..)
61+
.map(|n| n.update)
62+
.collect()
63+
}
64+
5665
async fn send_prompt(
5766
&mut self,
5867
content: Vec<ContentBlock>,
@@ -464,15 +473,12 @@ impl Session for AcpServerSession {
464473
self._work_dir.path().to_path_buf()
465474
}
466475

476+
fn session_updates(&self) -> Vec<SessionUpdate> {
477+
AcpServerSession::session_updates(self)
478+
}
479+
467480
fn notifications(&self) -> Vec<super::Notification> {
468-
let updates: Vec<_> = self
469-
.updates
470-
.lock()
471-
.unwrap()
472-
.drain(..)
473-
.map(|n| n.update)
474-
.collect();
475-
super::to_notifications(&updates)
481+
super::to_notifications(&self.session_updates())
476482
}
477483

478484
async fn prompt(

crates/goose/tests/acp_server_test.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ use common_tests::{
1111
run_close_session, run_config_mcp, run_config_option_mode_set, run_config_option_model_set,
1212
run_delete_session, run_fs_read_text_file_true, run_fs_write_text_file_false,
1313
run_fs_write_text_file_true, run_initialize_doesnt_hit_provider, run_list_sessions,
14-
run_load_mode, run_load_model, run_load_session_error, run_load_session_mcp, run_mode_set,
15-
run_model_list, run_model_set, run_model_set_error_session_not_found,
16-
run_new_session_returns_initial_config, run_permission_persistence, run_prompt_basic,
17-
run_prompt_error, run_prompt_image, run_prompt_image_attachment, run_prompt_mcp,
18-
run_prompt_model_mismatch, run_prompt_skill, run_session_name_update_notification,
19-
run_shell_terminal_false, run_shell_terminal_true,
14+
run_load_mode, run_load_model, run_load_session_error, run_load_session_mcp,
15+
run_load_session_replays_image_attachment, run_mode_set, run_model_list, run_model_set,
16+
run_model_set_error_session_not_found, run_new_session_returns_initial_config,
17+
run_permission_persistence, run_prompt_basic, run_prompt_error, run_prompt_image,
18+
run_prompt_image_attachment, run_prompt_mcp, run_prompt_model_mismatch, run_prompt_skill,
19+
run_session_name_update_notification, run_shell_terminal_false, run_shell_terminal_true,
2020
};
2121
use goose::config::GooseMode;
2222
use goose::conversation::message::Message;
@@ -220,6 +220,11 @@ fn test_load_session_mcp() {
220220
run_test(async { run_load_session_mcp::<AcpServerConnection>().await });
221221
}
222222

223+
#[test]
224+
fn test_load_session_replays_image_attachment() {
225+
run_test(async { run_load_session_replays_image_attachment::<AcpServerConnection>().await });
226+
}
227+
223228
#[test]
224229
fn test_mode_set() {
225230
run_test(async { run_mode_set::<AcpServerConnection>().await });

0 commit comments

Comments
 (0)