Skip to content

Commit 53f3a45

Browse files
examonCopilot
andauthored
docs: replace removed session.idle.backgroundTasks field with the current aborted field (#2232)
The `session.idle` reference tables listed a `backgroundTasks` field of type `BackgroundTasks`. That field was removed from the payload and the docs were never updated; the type name no longer exists in the schema either. The payload's only member today is an optional `aborted` boolean, which was undocumented. Corrects the data-field row and the at-a-glance row in docs/features/streaming-events.md, plus the two Node.js quick-reference tables. Documentation only; no code, schema or generated file is affected. Co-authored-by: examon <examon@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ddf11bc commit 53f3a45

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/features/streaming-events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ Ephemeral. The agent has finished all processing and is ready for the next messa
548548

549549
| Data Field | Type | Required | Description |
550550
|------------|------|----------|-------------|
551-
| `backgroundTasks` | `BackgroundTasks` | | Background agents/shells still running when the agent became idle |
551+
| `aborted` | `boolean` | | True when the preceding turn was cancelled via abort signal |
552552

553553
### `session.error`
554554

@@ -958,7 +958,7 @@ This table lists key `data` payload fields. Common envelope fields are documente
958958
| `tool.execution_partial_result` || Tool | `toolCallId`, `partialOutput` |
959959
| `tool.execution_progress` || Tool | `toolCallId`, `progressMessage` |
960960
| `tool.execution_complete` | | Tool | `toolCallId`, `success`, `result?`, `error?` |
961-
| `session.idle` || Session | `backgroundTasks?` |
961+
| `session.idle` || Session | `aborted?` |
962962
| `session.error` | | Session | `errorType`, `message`, `statusCode?` |
963963
| `session.compaction_start` | | Session | *(empty)* |
964964
| `session.compaction_complete` | | Session | `success`, `preCompactionTokens?`, `summaryContent?` |

nodejs/docs/agent-author.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ const unsub = session.on("tool.execution_complete", (event) => {
270270
| `tool.execution_start` | `toolCallId`, `toolName`, `arguments` |
271271
| `tool.execution_complete` | `toolCallId`, `success`, `result`, `error` |
272272
| `user.message` | `content`, `attachments`, `source` |
273-
| `session.idle` | `backgroundTasks` |
273+
| `session.idle` | `aborted` |
274274
| `session.error` | `errorType`, `message`, `stack` |
275275
| `permission.requested` | `requestId`, `permissionRequest.kind` |
276276
| `session.shutdown` | `shutdownType`, `totalPremiumRequests` |

nodejs/docs/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ session.on("assistant.message", (event) => {
419419
| `tool.execution_start` | A tool is about to run | `toolCallId`, `toolName`, `arguments` |
420420
| `tool.execution_complete` | A tool finished running | `toolCallId`, `success`, `result`, `error` |
421421
| `user.message` | User sent a message | `content`, `attachments`, `source` |
422-
| `session.idle` | Session finished processing a turn | `backgroundTasks` |
422+
| `session.idle` | Session finished processing a turn | `aborted` |
423423
| `session.error` | An error occurred | `errorType`, `message`, `stack` |
424424
| `permission.requested` | Agent needs permission (shell, file write, etc.) | `requestId`, `permissionRequest.kind` |
425425
| `session.shutdown` | Session is ending | `shutdownType`, `totalPremiumRequests`, `codeChanges` |

0 commit comments

Comments
 (0)