Repository navigation
Commit ab513aa
authored
feat: update ACP SDK to 2.4 and align protocol behavior (#727)
## Summary
Upgrade `@agentclientprotocol/sdk` from 2.2.0 to 2.4.0 (schemas v1.29.1
and v2.0.0-alpha.13), including the newly released `stopWaitingOnCancel`
support.
- Stop waiting for cancelled permission requests without requiring a
Client response. Keep async elicitation late-answer handling intact.
- Add standard `session/set_title` on ACP v1 and v2, reusing existing
persistence, normalization, write ordering, and automatic-title
safeguards.
- Reject empty system-prompt content before lifecycle changes,
preserving existing client and AIR instructions.
- Add cross-version regression coverage and document the title wire
contract.
## AIR compatibility
The existing AIR API is preserved: private methods, capability gates,
response shapes, and `_meta` contracts are unchanged. Shared title
internals are reused, but `_session/rename` retains its empty result and
existing semantics. Standard ACP compatibility fixes also apply when the
Client is AIR.
The 33 AIR scenario snapshot changes were checked programmatically:
their only change is the additive standard `sessionCapabilities.title:
{}` initialization capability. Existing frozen baselines were not
regenerated.
## Review scope
Reviewed all four schemas, stable/draft protocol pages, and changed RFDs
since schema v1.28.0 / v2.0.0-alpha.11. The SDK upgrade primarily
adjusts existing permission-cancellation and system-prompt behavior.
The already completed `session/set_title` change is retained. All other
new RFD implementations are on hold: no session-status, auth-status,
archive/unarchive, proxy, or background-work reporting/control features
are added. The session-status prototype is not included in this PR.
Unsupported optional capabilities remain unadvertised. No plan Markdown
file is included.
## Validation
- Published npm SDK 2.4.0 installed and verified; no local SDK
substitution.
- `npm run typecheck` — passed, including examples.
- `npm test` — 2,418 passed, 39 skipped.
- `npm run build` — passed.
- `git diff --check` — passed.
- Real Codex prompt smoke — completed with `end_turn`.
- Real wire smoke against the built executable on both ACP v1 and v2 —
normalized title returned and persistence verified through
`session/list`.
Separate integration/E2E suites and cross-platform bundles were not run.
`npm audit` reports four unchanged dependency advisories; no unrelated
dependency fixes were applied.1 parent 3b35338 commit ab513aa
54 files changed
Lines changed: 243 additions & 67 deletions
File tree
- docs
- src
- __tests__
- CodexACPAgent
- data
- scenarios
- data/air
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | | - | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
| 825 | + | |
825 | 826 | | |
826 | 827 | | |
827 | 828 | | |
| |||
906 | 907 | | |
907 | 908 | | |
908 | 909 | | |
| 910 | + | |
909 | 911 | | |
910 | 912 | | |
911 | 913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
244 | 250 | | |
245 | 251 | | |
246 | 252 | | |
| |||
0 commit comments