Skip to content

Commit e7aa6a9

Browse files
committed
feat(test): add unstable elicitation coverage to testy
1 parent baba7d8 commit e7aa6a9

5 files changed

Lines changed: 873 additions & 29 deletions

File tree

md/testy.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@
33
`testy` is a deterministic ACP agent binary for exercising clients against the stable ACP v1 surface.
44
It is built from the `agent-client-protocol-test` crate and communicates over stdio like a normal agent.
55

6+
The default build enables `agent-client-protocol-test`'s `unstable` cargo feature, which forwards
7+
to the SDK's `unstable` feature:
8+
69
```bash
710
cargo build -p agent-client-protocol-test --bin testy
811
```
912

13+
To build stable-only coverage:
14+
15+
```bash
16+
cargo build -p agent-client-protocol-test --bin testy --no-default-features
17+
```
18+
1019
The binary lands at `target/debug/testy`. Integration tests that need to spawn it should use
1120
`agent_client_protocol_test::test_binaries::testy()` after prebuilding test binaries.
1221

@@ -25,6 +34,9 @@ Plain-text commands:
2534
- `cancel_status` reports whether `session/cancel` has been received.
2635
- `full` runs all stable scenarios in deterministic order.
2736

37+
With default features, the existing `callbacks` and `full` scenarios also run unstable protocol
38+
coverage.
39+
2840
JSON command form:
2941

3042
```json
@@ -43,3 +55,8 @@ The `full` scenario sends every stable agent-to-client callback request:
4355
`terminal/output`, `terminal/wait_for_exit`, `terminal/kill`, and `terminal/release`.
4456
It also emits the stable session update variants, including message chunks, tool calls, plans,
4557
available commands, mode/config/session info, and usage.
58+
59+
With default features, `callbacks` and `full` additionally cover `elicitation/create` form mode, URL
60+
mode, session scope, request scope, accept, decline, cancel, and `elicitation/complete`.
61+
If the client advertises form elicitation but not URL elicitation, the URL part returns a
62+
`UrlElicitationRequired` prompt error with deterministic error data.

src/agent-client-protocol-test/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
### Added
99

1010
- Expand the `testy` binary into a deterministic ACP test agent that can exercise stable v1 agent methods, notifications, session updates, and client callbacks.
11+
- Add default `testy` coverage through the `unstable` cargo feature for elicitation form/URL requests, session/request scopes, response actions, completion notifications, and URL-required prompt errors.

src/agent-client-protocol-test/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ homepage.workspace = true
99
description = "Test utilities and mock implementations for the Agent Client Protocol"
1010
publish = false
1111

12+
[features]
13+
default = ["unstable"]
14+
unstable = ["agent-client-protocol/unstable"]
15+
1216
[[bin]]
1317
name = "mcp-echo-server"
1418
path = "src/bin/mcp_echo_server.rs"

0 commit comments

Comments
 (0)