Skip to content

feat(acp): support Lody subagent events and automatic session titles - #75

Merged
lodyai[bot] merged 1 commit into
mainfrom
feat/acp-lody-subagent-events-session-title
Oct 1, 2026
Merged

lodyai[bot] merged 1 commit into
mainfrom
feat/acp-lody-subagent-events-session-title

Conversation

@frostming

Copy link
Copy Markdown
Contributor

Summary

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.

Testing

  • Tests cover the wire contract, negotiation, failure and cancellation paths, client identification, and a real stdio end-to-end run.
  • New test files: test_subagents.py, test_session_title.py.

Files changed

  • packages/bub-acp-server/README.md
  • packages/bub-acp-server/src/bub_acp_server/agent.py
  • packages/bub-acp-server/src/bub_acp_server/subagents.py (new)
  • packages/bub-acp-server/tests/test_e2e.py
  • packages/bub-acp-server/tests/test_mcp.py
  • packages/bub-acp-server/tests/test_plugin.py
  • packages/bub-acp-server/tests/test_session_title.py (new)
  • packages/bub-acp-server/tests/test_subagents.py (new)

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.
@lodyai
lodyai Bot merged commit 064d543 into main Oct 1, 2026
1 check passed
@lodyai
lodyai Bot deleted the feat/acp-lody-subagent-events-session-title branch October 1, 2026 11:24
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