Repository navigation
feat(acp): support Lody subagent events and automatic session titles - #75
Merged
Merged
Conversation
Implement two Lody extension contracts from acp-extension-core, both gated on
the client identifying itself as Lody in `InitializeRequest.clientInfo`.
Subagent events
- Add `bub_acp_server.subagents` with the `_lody/subagents/event` wire contract:
capability negotiation, a per-execution `SubagentEventEmitter`, JSON-safe
payloads, and best-effort delivery that never fails the run.
- Bub's `subagent` tool consumes the child stream internally, so replace the
runtime agent's tool with a streaming variant when the client negotiates the
capability. The replacement keeps the original name, description, parameters,
renderer and output schema, and still returns Bub's result, so the model sees
no difference and the global registry stays untouched.
- Map child stream events onto snapshot, sparse progress and output payloads.
`outputRead` is `none` and `cancel` is `false`, since runs are not addressable
through the separate list/cancel/output request surface.
- Negotiation stays bilateral: a client opt-in is honored even when the agent
did not advertise, as the contract requires.
Session titles
- Advertise `sessionTitle` and push a tagged `session_info_update` after a
session's first turn, then persist the title for `session/list`.
- Generate with one lean completion: a throwaway `temp/` session with no tools
and no skills. Best effort, bounded by a timeout, at most once per session,
skipped for sessions that already have a title.
Capabilities
- Report `agentCapabilities._meta.lody` only to Lody clients; other clients get
no Lody-namespaced capability and no Lody-specific behavior.
- Keep the non-Lody `{"steering": {"supported": true}}` field unconditional so
clients using the original Codex steering route can still detect it.
Tests cover the wire contract, negotiation, failure and cancellation paths,
client identification, and a real stdio end-to-end run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement two Lody extension contracts from
acp-extension-core, both gated on the client identifying itself as Lody inInitializeRequest.clientInfo.Subagent events
bub_acp_server.subagentswith the_lody/subagents/eventwire contract: capability negotiation, a per-executionSubagentEventEmitter, JSON-safe payloads, and best-effort delivery that never fails the run.subagenttool consumes the child stream internally, so replace the runtime agent's tool with a streaming variant when the client negotiates the capability. The replacement keeps the original name, description, parameters, renderer and output schema, and still returns Bub's result, so the model sees no difference and the global registry stays untouched.outputReadisnoneandcancelisfalse, since runs are not addressable through the separate list/cancel/output request surface.Session titles
sessionTitleand push a taggedsession_info_updateafter a session's first turn, then persist the title forsession/list.temp/session with no tools and no skills. Best effort, bounded by a timeout, at most once per session, skipped for sessions that already have a title.Capabilities
agentCapabilities._meta.lodyonly to Lody clients; other clients get no Lody-namespaced capability and no Lody-specific behavior.{"steering": {"supported": true}}field unconditional so clients using the original Codex steering route can still detect it.Testing
test_subagents.py,test_session_title.py.Files changed
packages/bub-acp-server/README.mdpackages/bub-acp-server/src/bub_acp_server/agent.pypackages/bub-acp-server/src/bub_acp_server/subagents.py(new)packages/bub-acp-server/tests/test_e2e.pypackages/bub-acp-server/tests/test_mcp.pypackages/bub-acp-server/tests/test_plugin.pypackages/bub-acp-server/tests/test_session_title.py(new)packages/bub-acp-server/tests/test_subagents.py(new)