From 8e83d9828733dc208807b5de503b5f5162105182 Mon Sep 17 00:00:00 2001 From: examon Date: Mon, 3 Aug 2026 16:03:31 +0000 Subject: [PATCH] docs: replace removed `session.idle.backgroundTasks` field with the current `aborted` field 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: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/features/streaming-events.md | 4 ++-- nodejs/docs/agent-author.md | 2 +- nodejs/docs/examples.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/features/streaming-events.md b/docs/features/streaming-events.md index d5201a1685..10f111d9f9 100644 --- a/docs/features/streaming-events.md +++ b/docs/features/streaming-events.md @@ -548,7 +548,7 @@ Ephemeral. The agent has finished all processing and is ready for the next messa | Data Field | Type | Required | Description | |------------|------|----------|-------------| -| `backgroundTasks` | `BackgroundTasks` | | Background agents/shells still running when the agent became idle | +| `aborted` | `boolean` | | True when the preceding turn was cancelled via abort signal | ### `session.error` @@ -958,7 +958,7 @@ This table lists key `data` payload fields. Common envelope fields are documente | `tool.execution_partial_result` | ✅ | Tool | `toolCallId`, `partialOutput` | | `tool.execution_progress` | ✅ | Tool | `toolCallId`, `progressMessage` | | `tool.execution_complete` | | Tool | `toolCallId`, `success`, `result?`, `error?` | -| `session.idle` | ✅ | Session | `backgroundTasks?` | +| `session.idle` | ✅ | Session | `aborted?` | | `session.error` | | Session | `errorType`, `message`, `statusCode?` | | `session.compaction_start` | | Session | *(empty)* | | `session.compaction_complete` | | Session | `success`, `preCompactionTokens?`, `summaryContent?` | diff --git a/nodejs/docs/agent-author.md b/nodejs/docs/agent-author.md index 9071814425..6394603a23 100644 --- a/nodejs/docs/agent-author.md +++ b/nodejs/docs/agent-author.md @@ -270,7 +270,7 @@ const unsub = session.on("tool.execution_complete", (event) => { | `tool.execution_start` | `toolCallId`, `toolName`, `arguments` | | `tool.execution_complete` | `toolCallId`, `toolName`, `success`, `result`, `error` | | `user.message` | `content`, `attachments`, `source` | -| `session.idle` | `backgroundTasks` | +| `session.idle` | `aborted` | | `session.error` | `errorType`, `message`, `stack` | | `permission.requested` | `requestId`, `permissionRequest.kind` | | `session.shutdown` | `shutdownType`, `totalPremiumRequests` | diff --git a/nodejs/docs/examples.md b/nodejs/docs/examples.md index 1bac87982e..ad1f1b13ba 100644 --- a/nodejs/docs/examples.md +++ b/nodejs/docs/examples.md @@ -419,7 +419,7 @@ session.on("assistant.message", (event) => { | `tool.execution_start` | A tool is about to run | `toolCallId`, `toolName`, `arguments` | | `tool.execution_complete` | A tool finished running | `toolCallId`, `toolName`, `success`, `result`, `error` | | `user.message` | User sent a message | `content`, `attachments`, `source` | -| `session.idle` | Session finished processing a turn | `backgroundTasks` | +| `session.idle` | Session finished processing a turn | `aborted` | | `session.error` | An error occurred | `errorType`, `message`, `stack` | | `permission.requested` | Agent needs permission (shell, file write, etc.) | `requestId`, `permissionRequest.kind` | | `session.shutdown` | Session is ending | `shutdownType`, `totalPremiumRequests`, `codeChanges` |