Add root/downloadProgress notification#263
Open
Giuspepe wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):downloadIdkind'agent-sdk'resourceId'claude'/'codex'displayNamephaseDownloadPhase:started→ throttledprogress→completed/failedreceivedBytesdownloadIdtotalBytes?Content-Lengthknown; absent ⇒ indeterminatesession?error?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.