Tags: jchuerva/copilot-sdk
Tags
Update @github/copilot to 1.0.69-0 (github#1892) - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Update @github/copilot to 1.0.69-0 (github#1892) - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
[maven-release-plugin] copy for tag java/v1.0.6-preview.1
Update @github/copilot to 1.0.69-0 (github#1892) - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Add experimental GitHub telemetry redirection across all SDKs (github… …#1835) * codegen: add notification flag to RpcMethod metadata 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> * nodejs: add GitHub telemetry redirection support 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> * dotnet: add GitHub telemetry redirection support 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> * python: add GitHub telemetry redirection support 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> * go: add GitHub telemetry redirection support 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> * rust: add GitHub telemetry redirection support 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> * java: add GitHub telemetry redirection support 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> * Fix telemetry codegen after schema bump 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> * Rename telemetry redirection to forwarding across SDKs The runtime renamed the per-session opt-in capability from "redirection" to "forwarding" (wire field enableGitHubTelemetryForwarding) and updated the GitHubTelemetry schema description strings. This mirrors that rename across every SDK plus the codegen schema overlay so the hand-written opt-in flag matches the runtime contract. Also folds in two PR review fixes: - dotnet: document the expected-teardown catch in GitHubTelemetryTests DisposeAsync (was an empty catch). - python: re-export GitHubTelemetryNotification/Event/ClientInfo from copilot/__init__.py for parity with the nodejs public surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * nodejs: align GitHub telemetry forwarding with cross-SDK contract Address PR review feedback on the Node telemetry surface: - Omit enableGitHubTelemetryForwarding from session.create/resume unless a handler is registered, matching Go/Python/Rust/dotnet/Java (which all omit the field when off) instead of always sending false. - Isolate consumer callback failures: await the handler inside try/catch so async callbacks or thrown errors cannot leak into the JSON-RPC dispatch path (mirrors the panic isolation in the other SDKs). - Widen onGitHubTelemetry to return void | Promise<void> so consumers can supply async callbacks. - Update the no-handler test to assert the field is absent rather than false. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * python: address telemetry review nits - Use asyncio.create_task instead of the legacy asyncio.ensure_future when scheduling awaitable notification handlers on the event loop thread. - Drop the redundant local `import asyncio` in the telemetry transport test (asyncio is already imported at module scope), clearing CodeQL py/repeated-import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: observe expected exception in telemetry test teardown The DisposeAsync teardown catch swallows expected listener/socket shutdown exceptions. Observe the caught exception so the block is no longer empty, clearing CodeQL cs/empty-catch-block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * go: format telemetry forwarding fields Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * codegen: remove temporary GitHub telemetry schema overlay The telemetry types ship natively in @github/copilot 1.0.67, so the hand-maintained schema overlay that injected GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, and the gitHubTelemetry.event clientGlobal method is no longer needed. Remove the api-additions overlay and its application plumbing in utils.ts, and revert rust.ts to read the schema directly. The generic notification-flag codegen handling is retained, since the published schema marks gitHubTelemetry.event as a notification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Reconcile Node/Python/Go telemetry glue with main's generated dispatch Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * Repoint Java telemetry glue at generated types; finish Rust/.NET reconcile Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * codegen: restore notification dispatch for gitHubTelemetry.event The clientGlobal method gitHubTelemetry.event is a JSON-RPC notification (schema notification: true, void result). Restore the codegen notification-flag machinery so TypeScript/Python/Go emit notification registration (onNotification / notification-handler table / nil-result SetRequestHandler) instead of request-style onRequest dispatch, and regenerate the affected bindings. Also restore the Python _jsonrpc notification registry and fix the Go adapter to return only an error. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: guard gitHubTelemetry.event notification-style dispatch Send an id-less JSON-RPC notification (not a request) through the real wire in the Node and Python unit tests so a regression back to onRequest dispatch is caught. Add a Node E2E that creates a forwarding-enabled session against a live CLI and asserts a gitHubTelemetry.event notification is delivered to the onGitHubTelemetry handler. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: clarify telemetry forwarding comment in e2e Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: use shared waitForCondition helper in telemetry e2e Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: add live gitHubTelemetry forwarding E2E for all languages Adds a live-CLI E2E in Go, Python, .NET, Rust, and Java that registers an onGitHubTelemetry callback, creates a session, and asserts at least one gitHubTelemetry.event notification is forwarded with a well-typed payload. This brings the other SDKs to parity with the existing nodejs E2E. Session creation emits an early session.start hydro event, so no model round-trip (and no recorded CAPI exchange) is needed; the tests are snapshot-free. The Rust change also refactors the E2E harness to run a native COPILOT_CLI_PATH binary directly (non-.js), leaving the node_modules index.js path unchanged for CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix: guard gitHubTelemetry callbacks in Python and .NET adapters Wrap the user-provided on_github_telemetry / OnGitHubTelemetry callback invocation in exception handling so a throwing handler cannot propagate into the JSON-RPC dispatch machinery. Mirrors the existing guards in the Node, Go, Java, and Rust adapters. Errors are logged (Python module logger; .NET ILogger, falling back to NullLogger.Instance) rather than silently swallowed, matching the Java (SEVERE) and Rust (warn) behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: normalize telemetry E2E line endings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(java): log gitHubTelemetry callback errors at WARNING not SEVERE A user-supplied onGitHubTelemetry callback throwing is a routine, recoverable condition, not a serious system failure. Level.WARNING matches the Java SDK''s own convention (CopilotSession "Error in event handler") and the .NET (LogWarning) and Rust (warn) adapters. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(python): log gitHubTelemetry callback errors at WARNING not ERROR A user-supplied on_github_telemetry callback throwing is a routine, recoverable condition, not an error. Use logger.warning(..., exc_info=True) instead of logger.exception (which logs at ERROR), matching the .NET, Java, and Rust adapters and client.py''s own convention (exc_info=True elsewhere, never logger.exception). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Make GitHub telemetry callback async in nodejs, .NET, Java, and Python The runtime-forwarded gitHubTelemetry.event callback now returns an awaitable so consumers can perform async I/O in their telemetry sink, addressing PR feedback. Signatures: - nodejs: (n) => void | Promise<void> - .NET: Func<GitHubTelemetryNotification, Task> - Java: Function<GitHubTelemetryNotification, CompletableFuture<Void>> - Python: Callable[[GitHubTelemetryNotification], None | Awaitable[None]] Each adapter awaits the result and logs handler failures at WARNING. Go and Rust are intentionally left synchronous; neither SDK has an async-callback idiom. Unit and E2E call sites updated accordingly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
docs: add session limits guidance (github#1856) * docs: add session limits guidance Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs: clarify session limits soft cap Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add experimental GitHub telemetry redirection across all SDKs (github… …#1835) * codegen: add notification flag to RpcMethod metadata 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> * nodejs: add GitHub telemetry redirection support 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> * dotnet: add GitHub telemetry redirection support 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> * python: add GitHub telemetry redirection support 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> * go: add GitHub telemetry redirection support 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> * rust: add GitHub telemetry redirection support 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> * java: add GitHub telemetry redirection support 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> * Fix telemetry codegen after schema bump 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> * Rename telemetry redirection to forwarding across SDKs The runtime renamed the per-session opt-in capability from "redirection" to "forwarding" (wire field enableGitHubTelemetryForwarding) and updated the GitHubTelemetry schema description strings. This mirrors that rename across every SDK plus the codegen schema overlay so the hand-written opt-in flag matches the runtime contract. Also folds in two PR review fixes: - dotnet: document the expected-teardown catch in GitHubTelemetryTests DisposeAsync (was an empty catch). - python: re-export GitHubTelemetryNotification/Event/ClientInfo from copilot/__init__.py for parity with the nodejs public surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * nodejs: align GitHub telemetry forwarding with cross-SDK contract Address PR review feedback on the Node telemetry surface: - Omit enableGitHubTelemetryForwarding from session.create/resume unless a handler is registered, matching Go/Python/Rust/dotnet/Java (which all omit the field when off) instead of always sending false. - Isolate consumer callback failures: await the handler inside try/catch so async callbacks or thrown errors cannot leak into the JSON-RPC dispatch path (mirrors the panic isolation in the other SDKs). - Widen onGitHubTelemetry to return void | Promise<void> so consumers can supply async callbacks. - Update the no-handler test to assert the field is absent rather than false. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * python: address telemetry review nits - Use asyncio.create_task instead of the legacy asyncio.ensure_future when scheduling awaitable notification handlers on the event loop thread. - Drop the redundant local `import asyncio` in the telemetry transport test (asyncio is already imported at module scope), clearing CodeQL py/repeated-import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: observe expected exception in telemetry test teardown The DisposeAsync teardown catch swallows expected listener/socket shutdown exceptions. Observe the caught exception so the block is no longer empty, clearing CodeQL cs/empty-catch-block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * go: format telemetry forwarding fields Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * codegen: remove temporary GitHub telemetry schema overlay The telemetry types ship natively in @github/copilot 1.0.67, so the hand-maintained schema overlay that injected GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, and the gitHubTelemetry.event clientGlobal method is no longer needed. Remove the api-additions overlay and its application plumbing in utils.ts, and revert rust.ts to read the schema directly. The generic notification-flag codegen handling is retained, since the published schema marks gitHubTelemetry.event as a notification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Reconcile Node/Python/Go telemetry glue with main's generated dispatch Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * Repoint Java telemetry glue at generated types; finish Rust/.NET reconcile Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * codegen: restore notification dispatch for gitHubTelemetry.event The clientGlobal method gitHubTelemetry.event is a JSON-RPC notification (schema notification: true, void result). Restore the codegen notification-flag machinery so TypeScript/Python/Go emit notification registration (onNotification / notification-handler table / nil-result SetRequestHandler) instead of request-style onRequest dispatch, and regenerate the affected bindings. Also restore the Python _jsonrpc notification registry and fix the Go adapter to return only an error. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: guard gitHubTelemetry.event notification-style dispatch Send an id-less JSON-RPC notification (not a request) through the real wire in the Node and Python unit tests so a regression back to onRequest dispatch is caught. Add a Node E2E that creates a forwarding-enabled session against a live CLI and asserts a gitHubTelemetry.event notification is delivered to the onGitHubTelemetry handler. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: clarify telemetry forwarding comment in e2e Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: use shared waitForCondition helper in telemetry e2e Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: add live gitHubTelemetry forwarding E2E for all languages Adds a live-CLI E2E in Go, Python, .NET, Rust, and Java that registers an onGitHubTelemetry callback, creates a session, and asserts at least one gitHubTelemetry.event notification is forwarded with a well-typed payload. This brings the other SDKs to parity with the existing nodejs E2E. Session creation emits an early session.start hydro event, so no model round-trip (and no recorded CAPI exchange) is needed; the tests are snapshot-free. The Rust change also refactors the E2E harness to run a native COPILOT_CLI_PATH binary directly (non-.js), leaving the node_modules index.js path unchanged for CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix: guard gitHubTelemetry callbacks in Python and .NET adapters Wrap the user-provided on_github_telemetry / OnGitHubTelemetry callback invocation in exception handling so a throwing handler cannot propagate into the JSON-RPC dispatch machinery. Mirrors the existing guards in the Node, Go, Java, and Rust adapters. Errors are logged (Python module logger; .NET ILogger, falling back to NullLogger.Instance) rather than silently swallowed, matching the Java (SEVERE) and Rust (warn) behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: normalize telemetry E2E line endings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(java): log gitHubTelemetry callback errors at WARNING not SEVERE A user-supplied onGitHubTelemetry callback throwing is a routine, recoverable condition, not a serious system failure. Level.WARNING matches the Java SDK''s own convention (CopilotSession "Error in event handler") and the .NET (LogWarning) and Rust (warn) adapters. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(python): log gitHubTelemetry callback errors at WARNING not ERROR A user-supplied on_github_telemetry callback throwing is a routine, recoverable condition, not an error. Use logger.warning(..., exc_info=True) instead of logger.exception (which logs at ERROR), matching the .NET, Java, and Rust adapters and client.py''s own convention (exc_info=True elsewhere, never logger.exception). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Make GitHub telemetry callback async in nodejs, .NET, Java, and Python The runtime-forwarded gitHubTelemetry.event callback now returns an awaitable so consumers can perform async I/O in their telemetry sink, addressing PR feedback. Signatures: - nodejs: (n) => void | Promise<void> - .NET: Func<GitHubTelemetryNotification, Task> - Java: Function<GitHubTelemetryNotification, CompletableFuture<Void>> - Python: Callable[[GitHubTelemetryNotification], None | Awaitable[None]] Each adapter awaits the result and logs handler failures at WARNING. Go and Rust are intentionally left synchronous; neither SDK has an async-callback idiom. Unit and E2E call sites updated accordingly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
docs: add session limits guidance (github#1856) * docs: add session limits guidance Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs: clarify session limits soft cap Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add experimental GitHub telemetry redirection across all SDKs (github… …#1835) * codegen: add notification flag to RpcMethod metadata 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> * nodejs: add GitHub telemetry redirection support 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> * dotnet: add GitHub telemetry redirection support 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> * python: add GitHub telemetry redirection support 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> * go: add GitHub telemetry redirection support 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> * rust: add GitHub telemetry redirection support 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> * java: add GitHub telemetry redirection support 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> * Fix telemetry codegen after schema bump 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> * Rename telemetry redirection to forwarding across SDKs The runtime renamed the per-session opt-in capability from "redirection" to "forwarding" (wire field enableGitHubTelemetryForwarding) and updated the GitHubTelemetry schema description strings. This mirrors that rename across every SDK plus the codegen schema overlay so the hand-written opt-in flag matches the runtime contract. Also folds in two PR review fixes: - dotnet: document the expected-teardown catch in GitHubTelemetryTests DisposeAsync (was an empty catch). - python: re-export GitHubTelemetryNotification/Event/ClientInfo from copilot/__init__.py for parity with the nodejs public surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * nodejs: align GitHub telemetry forwarding with cross-SDK contract Address PR review feedback on the Node telemetry surface: - Omit enableGitHubTelemetryForwarding from session.create/resume unless a handler is registered, matching Go/Python/Rust/dotnet/Java (which all omit the field when off) instead of always sending false. - Isolate consumer callback failures: await the handler inside try/catch so async callbacks or thrown errors cannot leak into the JSON-RPC dispatch path (mirrors the panic isolation in the other SDKs). - Widen onGitHubTelemetry to return void | Promise<void> so consumers can supply async callbacks. - Update the no-handler test to assert the field is absent rather than false. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * python: address telemetry review nits - Use asyncio.create_task instead of the legacy asyncio.ensure_future when scheduling awaitable notification handlers on the event loop thread. - Drop the redundant local `import asyncio` in the telemetry transport test (asyncio is already imported at module scope), clearing CodeQL py/repeated-import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: observe expected exception in telemetry test teardown The DisposeAsync teardown catch swallows expected listener/socket shutdown exceptions. Observe the caught exception so the block is no longer empty, clearing CodeQL cs/empty-catch-block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * go: format telemetry forwarding fields Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * codegen: remove temporary GitHub telemetry schema overlay The telemetry types ship natively in @github/copilot 1.0.67, so the hand-maintained schema overlay that injected GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, and the gitHubTelemetry.event clientGlobal method is no longer needed. Remove the api-additions overlay and its application plumbing in utils.ts, and revert rust.ts to read the schema directly. The generic notification-flag codegen handling is retained, since the published schema marks gitHubTelemetry.event as a notification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Reconcile Node/Python/Go telemetry glue with main's generated dispatch Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * Repoint Java telemetry glue at generated types; finish Rust/.NET reconcile Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> * codegen: restore notification dispatch for gitHubTelemetry.event The clientGlobal method gitHubTelemetry.event is a JSON-RPC notification (schema notification: true, void result). Restore the codegen notification-flag machinery so TypeScript/Python/Go emit notification registration (onNotification / notification-handler table / nil-result SetRequestHandler) instead of request-style onRequest dispatch, and regenerate the affected bindings. Also restore the Python _jsonrpc notification registry and fix the Go adapter to return only an error. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: guard gitHubTelemetry.event notification-style dispatch Send an id-less JSON-RPC notification (not a request) through the real wire in the Node and Python unit tests so a regression back to onRequest dispatch is caught. Add a Node E2E that creates a forwarding-enabled session against a live CLI and asserts a gitHubTelemetry.event notification is delivered to the onGitHubTelemetry handler. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: clarify telemetry forwarding comment in e2e Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: use shared waitForCondition helper in telemetry e2e Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: add live gitHubTelemetry forwarding E2E for all languages Adds a live-CLI E2E in Go, Python, .NET, Rust, and Java that registers an onGitHubTelemetry callback, creates a session, and asserts at least one gitHubTelemetry.event notification is forwarded with a well-typed payload. This brings the other SDKs to parity with the existing nodejs E2E. Session creation emits an early session.start hydro event, so no model round-trip (and no recorded CAPI exchange) is needed; the tests are snapshot-free. The Rust change also refactors the E2E harness to run a native COPILOT_CLI_PATH binary directly (non-.js), leaving the node_modules index.js path unchanged for CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix: guard gitHubTelemetry callbacks in Python and .NET adapters Wrap the user-provided on_github_telemetry / OnGitHubTelemetry callback invocation in exception handling so a throwing handler cannot propagate into the JSON-RPC dispatch machinery. Mirrors the existing guards in the Node, Go, Java, and Rust adapters. Errors are logged (Python module logger; .NET ILogger, falling back to NullLogger.Instance) rather than silently swallowed, matching the Java (SEVERE) and Rust (warn) behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: normalize telemetry E2E line endings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(java): log gitHubTelemetry callback errors at WARNING not SEVERE A user-supplied onGitHubTelemetry callback throwing is a routine, recoverable condition, not a serious system failure. Level.WARNING matches the Java SDK''s own convention (CopilotSession "Error in event handler") and the .NET (LogWarning) and Rust (warn) adapters. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(python): log gitHubTelemetry callback errors at WARNING not ERROR A user-supplied on_github_telemetry callback throwing is a routine, recoverable condition, not an error. Use logger.warning(..., exc_info=True) instead of logger.exception (which logs at ERROR), matching the .NET, Java, and Rust adapters and client.py''s own convention (exc_info=True elsewhere, never logger.exception). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Make GitHub telemetry callback async in nodejs, .NET, Java, and Python The runtime-forwarded gitHubTelemetry.event callback now returns an awaitable so consumers can perform async I/O in their telemetry sink, addressing PR feedback. Signatures: - nodejs: (n) => void | Promise<void> - .NET: Func<GitHubTelemetryNotification, Task> - Java: Function<GitHubTelemetryNotification, CompletableFuture<Void>> - Python: Callable[[GitHubTelemetryNotification], None | Awaitable[None]] Each adapter awaits the result and logs handler failures at WARNING. Go and Rust are intentionally left synchronous; neither SDK has an async-callback idiom. Unit and E2E call sites updated accordingly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
PreviousNext