Skip to content

Update @github/copilot to 1.0.40-1#1177

Open
github-actions[bot] wants to merge 5 commits intomainfrom
update-copilot-1.0.40-1
Open

Update @github/copilot to 1.0.40-1#1177
github-actions[bot] wants to merge 5 commits intomainfrom
update-copilot-1.0.40-1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Automated update of @github/copilot to version 1.0.40-1.

Changes

  • Updated @github/copilot in nodejs/package.json and test/harness/package.json
  • Re-ran all code generators (scripts/codegen)
  • Formatted generated output

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 April 30, 2026 15:29
@stephentoub stephentoub requested a review from a team as a code owner April 30, 2026 15:29
Copilot AI review requested due to automatic review settings April 30, 2026 15:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the mono-repo’s Copilot CLI schema dependency (@github/copilot) to 1.0.40-1 and refreshes the generated RPC + session-event types across the Node, Python, Go, and .NET SDKs so the SDKs stay aligned with the updated protocol.

Changes:

  • Bumped @github/copilot dependency versions in Node packages (SDK + test harness + samples lockfile).
  • Regenerated RPC and session-event types across languages, picking up new/changed protocol fields (e.g., PermissionResult, expanded external tool results, new token metrics fields, new turnId fields).
  • Reformatted generated output.
Show a summary per file
File Description
test/harness/package.json Bumps @github/copilot devDependency.
test/harness/package-lock.json Lockfile refresh for updated Copilot package + platform artifacts.
nodejs/package.json Bumps @github/copilot dependency.
nodejs/package-lock.json Lockfile refresh for updated Copilot package + platform artifacts.
nodejs/samples/package-lock.json Lockfile refresh for samples to match updated Copilot dependency.
nodejs/src/generated/rpc.ts Regenerated Node RPC types (notably external tool result and permissions changes).
nodejs/src/generated/session-events.ts Regenerated Node session-event types (notably PermissionResult, usage/token details, new IDs/flags).
python/copilot/generated/rpc.py Regenerated Python RPC types (notably HandlePendingToolCall* request/result shape changes).
python/copilot/generated/session_events.py Regenerated Python session-event types (PermissionResult, new metrics/fields).
go/rpc/generated_rpc.go Regenerated Go RPC types (notably ExternalToolResult union + HandlePendingToolCall* changes).
go/generated_session_events.go Regenerated Go session-event types (PermissionResult, new metrics/fields).
dotnet/src/Generated/Rpc.cs Regenerated .NET RPC types (notably HandlePendingToolCall*, usage metrics details).
dotnet/src/Generated/SessionEvents.cs Regenerated .NET session-event types (PermissionResult polymorphism, new metrics/fields).

Copilot's findings

Files not reviewed (3)
  • nodejs/package-lock.json: Language not supported
  • nodejs/samples/package-lock.json: Language not supported
  • test/harness/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

go/rpc/generated_rpc.go:3393

  • ToolsApi.HandlePendingToolCall puts *params.Result into the request map. ExternalToolResult is a union type (string | object), but in Go it’s represented as a struct with pointer fields; without a custom marshaler this will serialize as an object with String/ExternalToolTextResultForLlm fields instead of the union value the RPC expects. Fix by either (a) adding MarshalJSON/UnmarshalJSON for ExternalToolResult (similar to the existing union helper), or (b) setting req["result"] to the underlying string/object variant rather than the wrapper struct.
	if params != nil {
		req["requestId"] = params.RequestID
		if params.Result != nil {
			req["result"] = *params.Result
		}
  • Files reviewed: 4/13 changed files
  • Comments generated: 2

Comment thread go/rpc/generated_rpc.go
Comment thread dotnet/src/Generated/SessionEvents.cs
The 1.0.40-1 schema renames several types that are referenced from
hand-authored code:

  - ToolsHandlePendingToolCallRequest -> HandlePendingToolCallRequest
  - ToolsHandlePendingToolCall (union) -> ExternalToolResult (union)
  - ToolCallResult                     -> ExternalToolTextResultForLlm
  - PermissionCompletedKind enum       -> PermissionResult polymorphism
                                          (PermissionResultApproved,
                                           PermissionResultDeniedInteractivelyByUser,
                                           ...)

Update the corresponding hand-authored files so the SDKs build again:

  - go/rpc/result_union.go: rename receiver and union field references
    on the custom (Un)MarshalJSON methods.
  - go/session.go: use the new request/result type and union field names
    when sending tool call results back via RPC.
  - python/copilot/session.py: import the renamed RPC types and use them
    when constructing handle_pending_tool_call requests.
  - dotnet/test/MultiClientTests.cs: switch from a removed Kind enum
    comparison to Assert.IsType<PermissionResult*> against the new
    polymorphic PermissionResult derived types.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

The 1.0.40-1 @github/copilot CLI holds the SQLite session-store.db handle open slightly longer on Windows than 1.0.39, exposing race conditions in the test fixtures. These tests were green on 1.0.40-0 and earlier, but flake on this bump.

- python/e2e/testharness/context.py: per-test cleanup now suppresses OSError from file unlink (matches the existing shutil.rmtree(ignore_errors=True) behavior used for directories)

- nodejs/test/e2e/harness/sdkTestContext.ts: rmDir retries extended from 5x2s (10s total) to 30x1s (30s total) to give Windows time to release the SQLite handle after the CLI subprocess exits

- dotnet/test/McpAndAgentsTests.cs: Should_Accept_Both_MCP_Servers_And_Custom_Agents now uses an explicit 120s timeout (instead of the 60s default) to tolerate slower MCP server spawning on Windows

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

…Lite race

The previous tightening (30s rmDir retry; suppress(OSError) for unlink in central context.py) was not enough on Windows: the @github/copilot 1.0.40-1 CLI keeps the SQLite session-store.db handle open longer than 30 seconds in some cases, and three additional multi-client test files have their own configure_for_test methods with the same unlink-without-suppression pattern.

- python/e2e/test_commands.py, test_multi_client.py, test_ui_elicitation_multi_client.py: wrap item.unlink(missing_ok=True) in contextlib.suppress(OSError), matching the change in testharness/context.py

- nodejs/test/e2e/harness/sdkTestContext.ts: rmDir now warns instead of throwing if the temp dir cannot be removed after the 30s retry budget — temp dirs are reclaimed by the OS / GitHub Actions runner anyway, so a stale temp dir should not fail the entire test suite when 245/254 tests passed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

This comment has been minimized.

Exposes the new continuePendingWork resume option introduced by runtime PR #6099 (suspend/resume support for permission and tool call continuity). When true, the runtime continues any tool calls or permission prompts that were pending when the session was suspended; default false matches existing behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Cross-SDK Consistency Review ✅

This PR is an automated regeneration of all four SDK implementations from the @github/copilot 1.0.40-1 schema. All significant changes are applied consistently across Node.js/TypeScript, Python, Go, and .NET.

Consistent changes confirmed across all SDKs

Change Node.js Python Go .NET
ContinuePendingWork added to ResumeSessionConfig continuePendingWork?: boolean continue_pending_work: bool ContinuePendingWork bool bool? ContinuePendingWork
ToolsHandlePendingToolCallRequestHandlePendingToolCallRequest
HandleToolCallResultHandlePendingToolCallResult
ToolCallResult/ToolsHandlePendingToolCallExternalToolTextResultForLlm/ExternalToolResult
PermissionDecisionApprovePermanently new type
PermissionDecisionApproveForSession.approval made optional + new domain field
Usage metrics: tokenDetails and totalNanoAiu fields

Minor observation: Python unit tests for continue_pending_work

Node.js added two unit tests verifying that continuePendingWork is forwarded in the session.resume payload; Go added equivalent tests; .NET added clone/copy tests. Python did not add analogous unit tests for continue_pending_work. This is not blocking — the feature is correctly implemented in Python — but a quick unit test (similar to the Node/Go ones) would bring test coverage into parity.

No blocking consistency issues found.

Generated by SDK Consistency Review Agent for issue #1177 · ● 899.7K ·

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.

2 participants