Skip to content

Add root/downloadProgress notification#263

Open
Giuspepe wants to merge 1 commit into
mainfrom
feat/sdk-download-progress
Open

Add root/downloadProgress notification#263
Giuspepe wants to merge 1 commit into
mainfrom
feat/sdk-download-progress

Conversation

@Giuspepe

@Giuspepe Giuspepe commented Jun 25, 2026

Copy link
Copy Markdown

Why

Hosts fetch large native agent SDK/runtime binaries (70–95 MB) lazily on first use. Today that blocks for several seconds with nothing on the wire, so a client can only show a silent hang. This adds a host→client notification so clients can render a real progress indicator.

Related

Wire shape

New server→client notification on the root channel, root/downloadProgress (DownloadProgressParams):

field notes
downloadId stable id; coalesces a download's frames, distinguishes concurrent ones
kind resource category (open string); today 'agent-sdk'
resourceId id within the kind, e.g. 'claude' / 'codex'
displayName brand noun for the client's localized label
phase DownloadPhase: started → throttled progresscompleted / failed
receivedBytes monotonic within a downloadId
totalBytes? present when Content-Length known; absent ⇒ indeterminate
session? informational — the session whose action triggered it (download is host-level)
error? short reason on failed
{ "jsonrpc": "2.0", "method": "root/downloadProgress",
  "params": { "channel": "ahp-root://", "downloadId": "d3f1c2", "kind": "agent-sdk",
              "resourceId": "claude", "displayName": "Claude", "phase": "progress",
              "receivedBytes": 18874368, "totalBytes": 41957498 } }

Intentionally resource-agnostic (kind + resourceId) so the same channel can report future downloads (other runtimes, plugins, models) without a new method. Ephemeral (not replayed on reconnect), host-level, deduped into one download.

Introduced in the unreleased 0.5.0 spec (NOTIFICATION_INTRODUCED_IN). Additive, non-breaking. Includes regenerated Rust/Kotlin/Swift/Go clients + JSON schema, and spec + per-client CHANGELOG entries.

Introduce a host→client notification, broadcast on the root channel, that
reports progress while the host downloads a resource on the client's behalf —
typically a multi-MB artifact fetched lazily the first time it is needed (today:
an agent's native SDK/runtime, `kind: 'agent-sdk'`). Lets clients show a
determinate (or indeterminate) progress indicator instead of a silent
multi-second hang.

The notification is intentionally resource-agnostic: a `kind` discriminant (open
string) plus `resourceId` let the same channel report future downloads
(additional agent runtimes, plugins, models, …) without a new method. The
download is host-level — the artifact is shared across consumers and concurrent
fetches are deduplicated into one download (one `downloadId`). Frames carry the
lifecycle phase (started → throttled progress → completed/failed),
`receivedBytes`, and optional `totalBytes` (present when the host knows the size
up front, e.g. a Content-Length). The optional `session` field names the
triggering session as informational context only.

Lands in the unreleased 0.5.0 spec (NOTIFICATION_INTRODUCED_IN), with spec and
per-client (TypeScript/Rust/Kotlin/Swift/Go) CHANGELOG entries. Re-exports the
new `DownloadProgressParams` and `DownloadPhase` types from the TypeScript
package root (types/index.ts). Registers the new types in the Swift/Rust/Kotlin/Go
generators and commits the regenerated client sources + JSON schema. Additive and
non-breaking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant