Skip to content

feat(frontends): extend ACP bridge for Agentero integration - #788

Open
Phil-Fan wants to merge 2 commits into
lsdefine:mainfrom
Phil-Fan:main
Open

feat(frontends): extend ACP bridge for Agentero integration#788
Phil-Fan wants to merge 2 commits into
lsdefine:mainfrom
Phil-Fan:main

Conversation

@Phil-Fan

@Phil-Fan Phil-Fan commented Sep 2, 2026

Copy link
Copy Markdown

Summary

This PR extends the experimental ACP stdio bridge in frontends/genericagent_acp_bridge.py so that GenericAgent can be used as an ACP agent inside editors/clients such as Agentero.

The bridge already spoke a minimal subset of the Agent Client Protocol (ACP). This change fills in the remaining baseline capabilities Agentero's BYOA ACP client needs in order to drive GenericAgent as a first-class coding assistant.

Motivation

Agentero connects to local agents via ACP. The existing bridge only handled initialize, session/new, session/prompt and session/cancel, which meant Agentero could start a turn but could not:

  • list, load, resume or delete previous sessions,
  • run long-lived terminal commands on GenericAgent's behalf,
  • receive streamed assistant output with correct messageId boundaries,
  • accept embedded resource context in prompts.

This PR completes those baseline ACP capabilities while keeping image, audio and MCP support intentionally disabled.

What changed

  • Session lifecycle: implement session/list, session/load, session/resume, session/delete and session/close.
  • Session persistence: save session metadata and conversation history to temp/acp_sessions/ so a restarted bridge can resume previous conversations.
  • Terminal support: implement all terminal/* methods (create, output, wait_for_exit, kill, release) via subprocess.Popen.
  • Prompt content: support resource / resource_link / embedded context blocks; image and audio blocks are explicitly omitted and reported as disabled in capabilities.
  • Streaming: every agent_message_chunk now carries the required messageId so clients can reassemble streamed messages.
  • Auth/MCP: removed; authMethods is empty and mcpCapabilities stays disabled.

Tests

Added frontends/tests/test_acp_bridge_smoke.py with smoke tests for initialize, session lifecycle, terminal lifecycle, prompt builder behavior, and chunk formatting.

Related

…istence, terminal and embeddedContext

- Add session/list, session/load, session/resume, session/delete lifecycle methods
- Persist session metadata and conversation history to temp/acp_sessions/
- Add terminal/* methods (create/output/wait/kill/release) via subprocess
- Support embeddedContext/resource content blocks in prompts
- Stream agent_message_chunk with required messageId
- Remove auth, audio, image and MCP support per project policy
- Test initialize capability advertisement
- Test session lifecycle (new/list/load/resume/delete)
- Test terminal lifecycle
- Test prompt builder resource/embeddedContext handling and media omission
- Test streaming chunk includes messageId
@Phil-Fan

Phil-Fan commented Sep 2, 2026

Copy link
Copy Markdown
Author
image 1405dcf9ea629ce3462caa782cde3c48

usage screenshot in Agentero

@Phil-Fan
Phil-Fan marked this pull request as ready for review September 2, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant