Skip to content

Update @github/copilot to 1.0.71#1998

Merged
stephentoub merged 6 commits into
mainfrom
update-copilot-1.0.71
Jul 16, 2026
Merged

Update @github/copilot to 1.0.71#1998
stephentoub merged 6 commits into
mainfrom
update-copilot-1.0.71

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated update of @github/copilot to version 1.0.71.

Changes

  • Updated @github/copilot in nodejs/package.json and test/harness/package.json
  • Re-ran all code generators (scripts/codegen)
  • Formatted generated output
  • Updated Java codegen dependency, POM property, and regenerated Java types

Java Handwritten Code Adaptation Plan

If java-sdk-tests CI fails on this PR, follow these steps:

  1. Identify failures: Run mvn clean, mvn verify from java/ locally or check the java-sdk-tests workflow run logs.
  2. Categorize errors:
    • Constructor signature changes (new fields added to generated records)
    • Enum value additions/renames in generated types
    • New event types requiring handler registration
    • Removed or renamed generated types
  3. Fix handwritten source (java/src/main/java/com/github/copilot/sdk/):
    • Update call sites passing positional constructor args to include new fields (typically null for optional new fields).
    • Update switch/if-else over enum values to handle new cases.
    • Register handlers for new event types in CopilotSession.java if applicable.
  4. Fix handwritten tests (java/src/test/java/com/github/copilot/sdk/):
    • Same constructor/enum fixes as above.
    • Add new test methods for new functionality if the change adds user-facing API surface.
  5. Validate: cd java && mvn clean test-compile jar:jar && mvn verify -Dskip.test.harness=true
  6. Format: cd java && mvn spotless:apply
  7. Push fixes to this PR branch.

To automate this, trigger the java-adapt-handwritten-code-to-accept-upgrade-changes agentic workflow instead.

Next steps

When ready, click Ready for review to trigger CI checks.

Created by the Update @github/copilot Dependency workflow.

- Updated nodejs and test harness dependencies
- Re-ran code generators
- Formatted generated code
@stephentoub
stephentoub marked this pull request as ready for review July 16, 2026 02:10
@stephentoub
stephentoub requested a review from a team as a code owner July 16, 2026 02:10
Copilot AI review requested due to automatic review settings July 16, 2026 02:10
@stephentoub stephentoub self-assigned this Jul 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates @github/copilot from prerelease 1.0.71-2 to stable 1.0.71 and regenerates SDK protocol bindings.

Changes:

  • Updates dependency manifests and lockfiles.
  • Regenerates cross-language RPC and session-event types.
  • Adds hook callbacks, managed settings, server-tool progress, OAuth response, MCP UI, and model pricing types.
Show a summary per file
File Description
test/harness/package.json Updates harness dependency.
test/harness/package-lock.json Locks stable runtime packages.
rust/src/generated/session_events.rs Adds generated events and payloads.
rust/src/generated/rpc.rs Updates MCP tool documentation.
rust/src/generated/api_types.rs Adds generated RPC types.
python/copilot/generated/session_events.py Adds generated events and serialization.
python/copilot/generated/rpc.py Adds RPC types and hook registration.
nodejs/src/generated/session-events.ts Adds generated event interfaces.
nodejs/src/generated/rpc.ts Adds RPC types and hook registration.
nodejs/samples/package-lock.json Updates sample dependency lock.
nodejs/package.json Updates Node dependency.
nodejs/package-lock.json Locks stable runtime packages.
java/src/generated/java/com/github/copilot/generated/SessionManagedSettingsResolvedEvent.java Adds managed-settings event.
java/src/generated/java/com/github/copilot/generated/SessionEvent.java Registers new event subtypes.
java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateResult.java Adds plugin hook count.
java/src/generated/java/com/github/copilot/generated/rpc/SessionModelPriceCategory.java Adds model pricing type.
java/src/generated/java/com/github/copilot/generated/rpc/SessionModelListResult.java Adds model pricing metadata.
java/src/generated/java/com/github/copilot/generated/rpc/McpToolUiVisibility.java Adds MCP UI visibility enum.
java/src/generated/java/com/github/copilot/generated/rpc/McpToolUi.java Adds MCP UI metadata.
java/src/generated/java/com/github/copilot/generated/rpc/McpTools.java Includes MCP UI metadata.
java/src/generated/java/com/github/copilot/generated/rpc/HookType.java Adds hook type enum.
java/src/generated/java/com/github/copilot/generated/rpc/HooksInvokeResult.java Adds hook response type.
java/src/generated/java/com/github/copilot/generated/rpc/HookInvokeRequest.java Adds hook request type.
java/src/generated/java/com/github/copilot/generated/McpToolsListChangedEvent.java Updates event documentation.
java/src/generated/java/com/github/copilot/generated/McpResourcesListChangedEvent.java Updates event documentation.
java/src/generated/java/com/github/copilot/generated/McpPromptsListChangedEvent.java Updates event documentation.
java/src/generated/java/com/github/copilot/generated/McpOauthRequiredEvent.java Adds OAuth HTTP response.
java/src/generated/java/com/github/copilot/generated/McpOauthHttpResponse.java Adds OAuth response type.
java/src/generated/java/com/github/copilot/generated/ManagedSettingsResolvedSource.java Adds managed-settings source enum.
java/src/generated/java/com/github/copilot/generated/HeaderEntry.java Adds HTTP header type.
java/src/generated/java/com/github/copilot/generated/AssistantServerToolProgressEvent.java Adds server-tool progress event.
java/scripts/codegen/package.json Updates codegen dependency.
java/scripts/codegen/package-lock.json Locks codegen dependencies.
java/pom.xml Updates reference implementation version.
go/zsession_events.go Re-exports new event types.
go/rpc/zsession_events.go Adds generated event models.
go/rpc/zsession_encoding.go Decodes new event payloads.
go/rpc/zrpc.go Adds RPC types and hook registration.
dotnet/src/Generated/SessionEvents.cs Adds generated event models.
dotnet/src/Generated/Rpc.cs Adds RPC types and hook registration.

Review details

Files not reviewed (8)
  • go/rpc/zrpc.go: Generated file
  • go/rpc/zsession_encoding.go: Generated file
  • go/rpc/zsession_events.go: Generated file
  • go/zsession_events.go: Generated file
  • java/scripts/codegen/package-lock.json: Generated file
  • nodejs/package-lock.json: Generated file
  • nodejs/samples/package-lock.json: Generated file
  • test/harness/package-lock.json: Generated file
  • Files reviewed: 4/40 changed files
  • Comments generated: 3
  • Review effort level: Medium

Comment thread go/rpc/zrpc.go
Comment thread dotnet/src/Generated/Rpc.cs Outdated
Comment thread dotnet/src/Generated/Rpc.cs Outdated
@github-actions

This comment has been minimized.

@HBReality HBReality left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better

CLI 1.0.71 promoted hooks.invoke to a client-global RPC method with a
generated HooksHandler interface. The handwritten SDK still registered its
own hooks.invoke handler, which only avoided colliding with the generated
one because global handlers were skipped when no LLM/telemetry adapter was
set.

Make the wiring intentional: add _HooksAdapter implementing the generated
HooksHandler protocol (routing HookInvokeRequest.sessionId to the matching
session's dispatcher), always register the client-global handlers with the
hooks adapter, and remove the redundant handwritten hooks.invoke
registrations and dead client-level handler.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae226b7f-caf9-46f3-b8c5-b9a21c5d7951
@github-actions

This comment has been minimized.

CLI 1.0.71 promoted hooks.invoke to a client-global RPC method with a
generated HooksHandler interface. The handwritten SDK registered its own
hooks.invoke handler on the connection, which the generated
registerClientGlobalApiHandlers then shadowed with an unwired handler that
threw "No hooks client-global handler registered" — so hooks never fired.

Wire the existing handleHooksInvoke routing into the generated
clientGlobalHandlers.hooks slot and drop the redundant handwritten
connection.onRequest("hooks.invoke") registration. Behavior is unchanged;
the dispatcher and its payload validation are reused as-is.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae226b7f-caf9-46f3-b8c5-b9a21c5d7951
@github-actions

This comment has been minimized.

CLI 1.0.71 promoted hooks.invoke to a client-global RPC method whose
generated registration installs a hooks.invoke handler that rejects all
invocations unless the Hooks slot is populated. Whenever an LLM inference
or telemetry adapter was configured, that generated handler overrode the
handwritten hooks.invoke registration and hooks stopped firing (e.g. the
sub-agent hook test).

Always register the client-global handlers with a hooksAdapter that
delegates to the existing per-session dispatcher, and drop the redundant
handwritten hooks.invoke registration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae226b7f-caf9-46f3-b8c5-b9a21c5d7951
@github-actions

This comment has been minimized.

The Copilot CLI serializes hook input `timestamp` as a JSON float
(e.g. `1784203878038.0`). Rust's hand-authored hook input structs typed
`timestamp` as `i64`, so `serde_json::from_value` rejected the float,
`dispatch_hook` returned an error, and the session handler fell back to
an empty `{ "output": {} }` response. Hooks therefore never fired: e.g. a
preToolUse deny was dropped, the CLI executed the tool, and the replayed
conversation diverged ("No cached response" -> 500).

Other SDKs tolerate this incidentally (Go decodes `input` into `any` and
re-marshals, dropping the `.0`); Rust decodes strictly. Type the hook
input `timestamp` fields as `f64` to match the shape the runtime sends.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae226b7f-caf9-46f3-b8c5-b9a21c5d7951
@github-actions

This comment has been minimized.

CLI 1.0.71 promoted hooks.invoke to an internal client-global RPC method.
The C# codegen still emitted its internal request/result DTOs behind a public
IHooksHandler surface, producing CS0050/CS0051 inconsistent-accessibility
errors that broke the entire .NET build. It also registered a second, unwired
hooks.invoke handler that would shadow the working handwritten one.

Filter internal client-global and client-session methods in the C# code
generator so no generated interface, handler property, or RPC registration is
emitted for internal methods like hooks.invoke. The handwritten
SetLocalRpcMethod(hooks.invoke, ...) registration continues to serve hooks.
This mirrors, for .NET's static typing, the routing fixes already applied to
Node, Python, and Go.

Also tolerate hook timestamp epoch milliseconds encoded as either JSON
integers or floats in UnixMillisecondsDateTimeOffsetConverter, covering the
CLI 1.0.71 float serialization (matching the Rust fix).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 94a20428-6b0e-4733-a354-0abf2d186320
@github-actions

Copy link
Copy Markdown
Contributor Author

Cross-SDK Consistency Review ✅

This PR is an automated @github/copilot 1.0.71 dependency update. Cross-SDK consistency looks good:

Generated types — New types (AssistantServerToolProgressEvent, SessionManagedSettingsResolvedEvent, McpToolUi, McpToolUiVisibility, SessionModelPriceCategory) are present in all SDKs:

  • Node.js ✅ (already in generated/rpc.ts, generated/session-events.ts)
  • Python ✅ (already in generated/rpc.py, generated/session_events.py)
  • Rust ✅ (already in generated/api_types.rs, generated/session_events.rs)
  • .NET ✅ (updated in this PR via Generated/Rpc.cs, Generated/SessionEvents.cs)
  • Go ✅ (updated in this PR via rpc/zrpc.go, rpc/zsession_events.go)
  • Java ✅ (updated in this PR)

Non-generated fixes:

  1. .NET UnixMillisecondsDateTimeOffsetConverter.cs — Handles float-formatted epoch timestamps (1700000000000.0) that cause GetInt64() to throw. This is .NET-specific; other language runtimes handle this implicitly.

  2. Go client.go — Moves hooks.invoke registration from a conditional block to an always-registered client-global handler (with a dedicated Hooks adapter). This aligns Go with how Node.js, Python, and .NET already handle hooks.invoke as a connection-level RPC method routing to the owning session by sessionId.

No inconsistencies found.

Generated by SDK Consistency Review Agent for issue #1998 · sonnet46 1.1M ·

@stephentoub
stephentoub added this pull request to the merge queue Jul 16, 2026
Merged via the queue into main with commit d95cfac Jul 16, 2026
56 checks passed
@stephentoub
stephentoub deleted the update-copilot-1.0.71 branch July 16, 2026 13:49
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.

4 participants