Update @github/copilot to 1.0.40-1#1177
Conversation
- Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code
There was a problem hiding this comment.
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/copilotdependency 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, newturnIdfields). - 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.HandlePendingToolCallputs*params.Resultinto the request map.ExternalToolResultis 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 withString/ExternalToolTextResultForLlmfields instead of the union value the RPC expects. Fix by either (a) addingMarshalJSON/UnmarshalJSONforExternalToolResult(similar to the existing union helper), or (b) settingreq["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
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>
This comment has been minimized.
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>
This comment has been minimized.
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>
This comment has been minimized.
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>
This comment has been minimized.
This comment has been minimized.
Should_Work_With_Approve_All_Permission_Handler timed out on the windows-latest .NET CI job at the previous default of 60s while waiting for the first assistant message in the PermissionTests fixture. The CLI / replay-proxy cold-start cost on the first test of a fixture can exceed 60s on Windows GitHub Actions runners; subsequent tests in the same fixture run in well under a second. McpAndAgentsTests.cs already had to bump to 120s explicitly for the same reason. Apply the same 120s default in TestHelper so individual tests don't have to opt in. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cross-SDK Consistency Review ✅This PR (automated update to New public API:
|
| SDK | Config field | Function parameter |
|---|---|---|
| Node.js | continuePendingWork?: boolean |
same (inline) |
| Python | continue_pending_work: bool (TypedDict, total=False) |
continue_pending_work: bool | None = None |
| Go | ContinuePendingWork bool |
— (struct field) |
| .NET | ContinuePendingWork: bool? |
— (property) |
All SDKs default to false / null / nil (i.e., pending work is not continued unless explicitly requested), which is consistent.
Generated code (schema-driven)
All generated files (rpc.ts, session-events.ts, generated_rpc.go, generated_session_events.go, Rpc.cs, SessionEvents.cs, rpc.py, session_events.py) are updated by codegen and consistently include:
continuePendingWorkandsessionWasActiveinSessionResumeDataturnIdinAssistantMessageData,ToolExecutionStartData,ToolExecutionCompleteData- New
PermissionDecisionApprovePermanentlyvariant tokenDetails/totalNanoAiuin usage metrics types- Rename:
ToolsHandlePendingToolCallRequest→HandlePendingToolCallRequest,ToolCallResult→ExternalToolTextResultForLlm(internal types)
Tests
Unit tests covering continuePendingWork payload forwarding exist in Node.js (client.test.ts), Go (client_test.go), and .NET (CloneTests.cs). Python does not have a dedicated unit test for continue_pending_work forwarding, though the implementation follows the same pattern as other parameters in the Python SDK.
No cross-SDK consistency issues found.
Generated by SDK Consistency Review Agent for issue #1177 · ● 363.1K · ◷
Automated update of
@github/copilotto version1.0.40-1.Changes
@github/copilotinnodejs/package.jsonandtest/harness/package.jsonscripts/codegen)Next steps
When ready, click Ready for review to trigger CI checks.