Commit 4e1499d
docs: clarify session destroy vs delete semantics (#599)
* docs: clarify session destroy vs delete semantics across all SDKs
Clarify the distinction between destroy() (closes session, releases
in-memory resources, preserves disk state for resumption) and
deleteSession() (permanently removes all data from disk).
Update doc comments across all four SDK languages (Go, Node.js, Python,
.NET) and the session persistence guide to make the behavioral
difference explicit and help users choose the right method.
Fixes #526
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add disconnect() method, deprecate destroy() across all SDKs
Add disconnect() as the preferred method for closing sessions across all
four SDK languages, marking destroy() as deprecated:
- Node.js: disconnect() + Symbol.asyncDispose support, destroy() delegates
- Python: disconnect() + __aenter__/__aexit__ context manager, destroy()
emits DeprecationWarning
- Go: Disconnect() method, Destroy() marked with Deprecated godoc tag
- .NET: DisconnectAsync() method, DisposeAsync() delegates to it
Update all samples, READMEs, and documentation guides to use the new
disconnect() terminology. Internal stop() methods now call disconnect().
Resolves PR #599 comments:
- Rename destroy → disconnect for clarity
- Define IDisposable behavior in .NET (DisposeAsync delegates to
DisconnectAsync)
- Add idiomatic cleanup patterns (async context managers, Symbol.asyncDispose)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: update all tests, scenarios, and docs to use disconnect()
Migrate all test scenarios, e2e tests, READMEs, and documentation
references from destroy()/Destroy() to disconnect()/Disconnect().
- 90 test scenario files across Go/Python/TypeScript/C#
- 15 Node.js e2e test files
- 8 Python e2e test files
- 3 Go e2e test files
- 1 .NET test file
- READMEs and compatibility docs updated with new API reference
- Agent docs updated with new method names
- Reconnect scenario log messages updated to 'disconnected'
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: rename snapshot to match updated test name
The hooks_extended test 'should invoke onSessionEnd hook when session is
destroyed' was renamed to '...disconnected', but the snapshot YAML file
wasn't renamed to match, causing CI to fail with 'No cached response'.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* dotnet: remove DisconnectAsync, keep only DisposeAsync
Address review feedback from SteveSandersonMS: for .NET, the
standard IAsyncDisposable pattern (DisposeAsync) is sufficient
on its own without a duplicate DisconnectAsync method.
Moves the disconnect implementation directly into DisposeAsync
and removes the separate DisconnectAsync method. Updates all
references in Client.cs and README.md accordingly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 4246289 commit 4e1499d
File tree
150 files changed
+508
-350
lines changed- .github/agents
- docs
- auth
- guides
- setup
- mcp
- dotnet
- src
- test
- go
- internal/e2e
- samples
- nodejs
- examples
- src
- test/e2e
- python
- copilot
- e2e
- test
- scenarios
- auth
- byok-anthropic
- go
- python
- typescript/src
- byok-azure
- go
- python
- typescript/src
- byok-ollama
- go
- python
- typescript/src
- byok-openai
- go
- python
- typescript/src
- gh-app
- go
- python
- typescript/src
- bundling
- app-backend-to-server
- go
- python
- typescript/src
- app-direct-server
- go
- python
- typescript/src
- container-proxy
- go
- python
- typescript/src
- fully-bundled
- go
- python
- typescript/src
- callbacks
- hooks
- go
- python
- typescript/src
- permissions
- go
- python
- typescript/src
- user-input
- go
- python
- typescript/src
- modes
- default
- go
- python
- typescript/src
- minimal
- go
- python
- typescript/src
- prompts
- attachments
- go
- python
- typescript/src
- reasoning-effort
- go
- python
- typescript/src
- system-message
- go
- python
- typescript/src
- sessions
- concurrent-sessions
- go
- python
- typescript/src
- infinite-sessions
- go
- python
- typescript/src
- multi-user-short-lived
- session-resume
- go
- python
- typescript/src
- streaming
- go
- python
- typescript/src
- tools
- custom-agents
- go
- python
- typescript/src
- mcp-servers
- go
- python
- typescript/src
- no-tools
- go
- python
- typescript/src
- skills
- go
- python
- typescript/src
- tool-filtering
- go
- python
- typescript/src
- tool-overrides
- go
- python
- typescript/src
- virtual-filesystem
- go
- python
- typescript/src
- transport
- reconnect
- csharp
- go
- python
- typescript/src
- stdio
- go
- python
- typescript/src
- tcp
- go
- python
- typescript/src
- snapshots/hooks_extended
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
150 files changed
+508
-350
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
346 | 368 | | |
347 | 369 | | |
348 | 370 | | |
| |||
526 | 548 | | |
527 | 549 | | |
528 | 550 | | |
529 | | - | |
530 | | - | |
| 551 | + | |
| 552 | + | |
531 | 553 | | |
532 | 554 | | |
533 | 555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | | - | |
| 415 | + | |
| 416 | + | |
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
223 | 233 | | |
224 | 234 | | |
225 | 235 | | |
| |||
0 commit comments