Skip to content

feat(acp): implement session/close handler and capability advertisement#2429

Merged
bug-ops merged 1 commit intomainfrom
session-close-handler
Mar 30, 2026
Merged

feat(acp): implement session/close handler and capability advertisement#2429
bug-ops merged 1 commit intomainfrom
session-close-handler

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 30, 2026

Closes #2421

Summary

  • Add unstable-session-close feature to zeph-acp, wired to agent-client-protocol/unstable_session_close; included in acp-unstable compound feature in root Cargo.toml
  • Implement close_session on ZephAcpAgent: removes the session from the LRU map and fires the cancel signal to any running turn actor; idempotent for unknown session IDs
  • Advertise session: { close: {} } in the initialize response capabilities when the feature is enabled
  • 3 new unit tests (close_session_removes_entry, close_session_unknown_id_is_ok, close_session_signals_cancel) + updated initialize_advertises_session_capabilities

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace --features full -- -D warnings passes (0 warnings)
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 7265 passed
  • All 4 new/updated ACP session tests pass under --features unstable-session-close

…nt (#2421)

- Add `unstable-session-close` feature to zeph-acp, wired to
  `agent-client-protocol/unstable_session_close`; included in
  `acp-unstable` compound feature in root Cargo.toml
- Implement `close_session` on `ZephAcpAgent`: removes session from LRU
  map and fires cancel signal to any running turn actor (idempotent for
  unknown session IDs)
- Advertise `session: { close: {} }` in `initialize` response
  capabilities when feature is enabled
- Add 3 new unit tests covering removal, idempotency, and cancel signal;
  update `initialize_advertises_session_capabilities` to assert
  `close.is_some()`
@github-actions github-actions bot added enhancement New feature or request size/M Medium PR (51-200 lines) documentation Improvements or additions to documentation rust Rust code changes dependencies Dependency updates and removed size/M Medium PR (51-200 lines) labels Mar 30, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 30, 2026 06:43
@bug-ops bug-ops merged commit b45de72 into main Mar 30, 2026
27 checks passed
@bug-ops bug-ops deleted the session-close-handler branch March 30, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(acp): implement session/close handler and capability advertisement

1 participant