Skip to content

Commit d95cfac

Browse files
github-actions[bot]SteveSandersonMSCopilotstephentoub
authored
Update @github/copilot to 1.0.71 (#1998)
* Update @github/copilot to 1.0.71 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Route Python hooks.invoke through generated client-global handler 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 * Route Node hooks.invoke through generated client-global handler 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 * Route Go hooks.invoke through generated client-global handler 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 * Fix Rust hook input deserialization for float timestamps 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 * Fix .NET build break and float hook timestamps for hooks.invoke 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 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Stephen Toub <stoub@microsoft.com>
1 parent a023934 commit d95cfac

50 files changed

Lines changed: 2253 additions & 380 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dotnet/src/Generated/Rpc.cs

Lines changed: 110 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)