Add experimental GitHub telemetry redirection across all SDKs#1835
Add experimental GitHub telemetry redirection across all SDKs#1835MackinnonBuck wants to merge 9 commits into
Conversation
Adds an optional otification marker to the shared RpcMethod interface so the per-language generators can emit notification-style dispatch (no JSON-RPC reply) for void clientGlobal methods such as gitHubTelemetry.event. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerates the TypeScript RPC types for the experimental gitHubTelemetry.event clientGlobal notification and wires an onGitHubTelemetry callback on the client. Registering a handler opts created/resumed sessions into telemetry redirection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerates the C# RPC types for the experimental gitHubTelemetry.event clientGlobal notification and adds an OnGitHubTelemetry callback. Registering a handler opts created/resumed sessions into telemetry redirection. The option is marked [Experimental] and [EditorBrowsable(Never)] to keep it unadvertised. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerates the Python RPC types for the experimental gitHubTelemetry.event clientGlobal notification and adds an on_github_telemetry callback. Registering a handler opts created/resumed sessions into telemetry redirection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerates the Go RPC types for the experimental gitHubTelemetry.event clientGlobal notification and adds an OnGitHubTelemetry callback. Registering a handler opts created/resumed sessions into telemetry redirection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerates the Rust RPC types for the experimental gitHubTelemetry.event clientGlobal notification and adds an on_github_telemetry callback. Registering a handler opts created/resumed sessions into telemetry redirection. The telemetry module is #[doc(hidden)] to keep it unadvertised. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds the experimental gitHubTelemetry.event notification adapter and an onGitHubTelemetry client option. Registering a handler opts created/resumed sessions into telemetry redirection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolves conflicts in two generated files where main's @github/copilot 1.0.66-2 bump added new RPC types (GitHubRepoRef, user settings, mcp headers, push attachments, etc.) adjacent to this branch's GitHubTelemetry* types: - go/rpc/zrpc.go: union of both sides' struct declarations. - python/copilot/generated/rpc.py: union of __all__ exports and reconstruction of the RPC.from_dict positional constructor call from the (auto-merged) assignment order, verified to match the RPC dataclass field order (795 fields). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| ); | ||
| } | ||
| } | ||
| Err(e) => { |
This comment has been minimized.
This comment has been minimized.
| catch (Exception ex) when (ex is OperationCanceledException or ObjectDisposedException or IOException or SocketException) | ||
| { | ||
| } |
Keep experimental GitHub telemetry schema additions available to codegen until they ship in the packaged Copilot schema, and apply formatter output required by CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cross-SDK Consistency ReviewThis PR implements the ✅ Consistent across all SDKs
|
Why
The runtime can now forward per-session GitHub (hydro) telemetry to opted-in host connections via a new JSON-RPC server to client notification,
gitHubTelemetry.event. This PR implements the consumer side of that contract in every language SDK so hosts can receive those events. The feature is internal and experimental, so it is intentionally kept low-profile and undocumented for public consumers.What
For each SDK this adds an
onGitHubTelemetrycallback (per-language naming) and a hand-written opt-in: when a host registers a handler, the client setsenableGitHubTelemetryRedirectionon every session it creates or resumes, and dispatches eachgitHubTelemetry.eventnotification to the callback.Key pieces:
GitHubTelemetryNotification,GitHubTelemetryEvent,GitHubTelemetryClientInfo, and thegitHubTelemetry.eventclientGlobal method). The shared codegen change adds anotificationflag toRpcMethodso generators emit notification-style dispatch (no JSON-RPC reply) for void clientGlobal methods.llmInference/ notification idiom and wires the opt-in flag into the create/resume requests. We deliberately reuse the generated RPC types directly rather than introducing friendly wrapper types.Notable decisions
utils.ts). This makes the feature trivially revertible language-by-language: reverting a single language's commit removes its support without touching the others. The sharedutils.tschange is purely additive (an optionalnotification?field), so it stays put and never breaks the remaining generators.[EditorBrowsable(EditorBrowsableState.Never)]and Rust uses#[doc(hidden)]. Languages without a true "exported but hidden" mechanism stay visible + experimental with minimal docs.Review notes
This is the SDK side of a contract whose runtime counterpart is merged-in-progress on the
@github/copilot(copilot-agent-runtime) side. The schema is the source of truth; generated files were produced by codegen, not hand-edited.