Commit 034e320
committed
release: sync copilot-sdk-cpp v0.4.1
Re-pins to @github/copilot 1.0.84-6 (github/copilot-sdk e5c53790) and closes the
two lifecycle gaps carried over from the previous release.
Read this before upgrading: NOT binary-compatible
Despite the patch-level version, relinking a prebuilt library against 0.4.0
headers is unsafe. SessionEventType gained three values ahead of Unknown, so
Unknown renumbers from 144 to 147, and struct layouts changed. Recompiling
against these headers is safe and requires no source changes.
Fixes
- Session teardown now issues session.detach rather than session.destroy,
following upstream. Session::detach() returns the runtime's {success, error};
destroy() is kept, implemented on top of it, and drops a soft failure because
its signature cannot carry one. A declined detach is not raised -- teardown
should not fail because the runtime already considers a session gone.
- Host tool invocations are cancelled when the connection closes. Tool handlers
run on a background task and answer with session.tools.handlePendingToolCall;
because session destruction waits on those tasks, a handler finishing during
shutdown would answer over a transport already being torn down.
Client::stop() and force_stop() now cancel first, so the result is dropped
instead. The handler itself is your code and is not interrupted.
Session::cancel_pending_tool_invocations() and pending_tool_invocations() are
public, so the behaviour is observable rather than implicit.
Protocol
Regenerated from CLI 1.0.84-6: API definitions 1293 -> 1306, event definitions
576 -> 582, event variants 144 -> 147. Three new skill.* events are mapped
rather than degrading to SessionEventType::Unknown.
RPC methods went 384 -> 383: sessions.registerExtensionToolsOnSession was
removed upstream. Nothing in the hand-written API referenced it.
The wire protocol is unchanged at version 3.
Suite: 468 tests, 0 failed.1 parent 8243614 commit 034e320
11 files changed
Lines changed: 795 additions & 191 deletions
File tree
- include/copilot
- generated
- schemas
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3118 | 3118 | | |
3119 | 3119 | | |
3120 | 3120 | | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
3121 | 3125 | | |
3122 | 3126 | | |
3123 | 3127 | | |
| |||
3466 | 3470 | | |
3467 | 3471 | | |
3468 | 3472 | | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
3469 | 3477 | | |
3470 | 3478 | | |
3471 | 3479 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
290 | 327 | | |
291 | 328 | | |
292 | 329 | | |
| |||
451 | 488 | | |
452 | 489 | | |
453 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
454 | 498 | | |
455 | 499 | | |
456 | 500 | | |
0 commit comments