.NET: [BREAKING] Migrate .NET GitHub Copilot SDK to v1.0.0#6381
Merged
Conversation
- Update namespace from GitHub.Copilot.SDK to GitHub.Copilot - Replace PermissionRequestResult/PermissionRequestResultKind with PermissionDecision - Remove ConnectionState check (StartAsync is now idempotent) - Rename ConfigDir to ConfigDirectory - Use SessionConfig.Clone() for CopySessionConfig - Update Tools type from List<AIFunction> to List<AIFunctionDeclaration> - Rename UserMessageAttachmentFile to AttachmentFile - Update usage data types (CacheWriteTokens: long, Duration: TimeSpan) - Add GHCP001 NoWarn for experimental SDK APIs (matches framework convention) - Specify type argument on CopilotSession.On<SessionEvent>() Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the .NET integration package (Microsoft.Agents.AI.GitHub.Copilot) to work with the stable GitHub.Copilot.SDK v1.0.0, adapting to the GA namespace and API breaking changes while keeping agent behavior consistent with the framework.
Changes:
- Bumps
GitHub.Copilot.SDKfrom 1.0.0-beta.2 to 1.0.0 and migrates code to the new namespaces (GitHub.Copilot+GitHub.Copilot.Rpc). - Updates agent/session glue code for SDK changes (idempotent
StartAsync, typedOn<SessionEvent>, attachment + tool declaration type updates, config clone usage). - Adds
GHCP001toNoWarnacross the library, tests, and sample project to align with upstream/experimental warning-handling conventions.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/Directory.Packages.props | Bumps GitHub.Copilot.SDK dependency to 1.0.0. |
| dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/Microsoft.Agents.AI.GitHub.Copilot.csproj | Adds GHCP001 suppression at the library project level. |
| dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs | Migrates core agent implementation to GA SDK APIs (session events, start semantics, config cloning, attachments, usage types). |
| dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/CopilotClientExtensions.cs | Moves extension namespace to GitHub.Copilot to match the GA SDK surface. |
| dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests.csproj | Adds GHCP001 suppression for unit test project. |
| dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs | Updates unit tests for renamed types and config properties in v1.0.0. |
| dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/CopilotClientExtensionsTests.cs | Updates extension tests for new namespaces / options behavior. |
| dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.IntegrationTests/Microsoft.Agents.AI.GitHub.Copilot.IntegrationTests.csproj | Adds GHCP001 suppression for integration test project. |
| dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.IntegrationTests/GitHubCopilotAgentTests.cs | Updates integration tests to use PermissionDecision API. |
| dotnet/samples/02-agents/AgentProviders/Agent_With_GitHubCopilot/README.md | Updates sample docs to the GA namespaces. |
| dotnet/samples/02-agents/AgentProviders/Agent_With_GitHubCopilot/Program.cs | Updates sample permission handler to PermissionDecision API and GA namespaces. |
| dotnet/samples/02-agents/AgentProviders/Agent_With_GitHubCopilot/Agent_With_GitHubCopilot.csproj | Adds GHCP001 suppression for the sample project. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SergeyMenshykh
approved these changes
Jun 8, 2026
westey-m
approved these changes
Jun 8, 2026
Azure Functions Core Tools v4 can no longer auto-detect the worker runtime in CI (local.settings.json is gitignored). All 7 active SamplesValidation tests fail with 'Worker runtime cannot be None'. Tracked by: microsoft#6402 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
peibekwe
approved these changes
Jun 8, 2026
WorkflowSamplesValidation (5 tests): same func tools issue as microsoft#6402. WorkflowConsoleAppSamplesValidation (4 tests): KeyNotFoundException during workflow execution, tracked by microsoft#6404. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
peibekwe
approved these changes
Jun 8, 2026
4 tasks
learn-build-service-prod Bot
pushed a commit
to MicrosoftDocs/semantic-kernel-docs
that referenced
this pull request
Jun 11, 2026
Update namespace from GitHub.Copilot.SDK to GitHub.Copilot, migrate permission handler from PermissionRequestResult to PermissionDecision, and remove --prerelease flag since the package is now stable. Companion to microsoft/agent-framework#6381. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the .NET
Microsoft.Agents.AI.GitHub.Copilotpackage fromGitHub.Copilot.SDK1.0.0-beta.2 to stable 1.0.0.Companion to the Python migration in #6292.
Breaking API Migrations
GitHub.Copilot.SDKGitHub.Copilot/GitHub.Copilot.RpcPermissionRequestResultPermissionDecisionPermissionRequestResultKind.ApprovedPermissionDecision.ApproveOnce()AutoStart = falseclient.State != ConnectionState.ConnectedStartAsync()is idempotentSessionConfig.ConfigDirSessionConfig.ConfigDirectoryICollection<AIFunction>ICollection<AIFunctionDeclaration>UserMessageAttachmentFileAttachmentFiledouble?long?double?(milliseconds)TimeSpan?session.On(evt => ...)session.On<SessionEvent>(evt => ...)Improvements
CopySessionConfignow usesSessionConfig.Clone()— automatically forwards all new properties added in v1.0.0GHCP001NoWarnat project level (follows framework convention for upstream experimental APIs, same asMEAI001/OPENAI001elsewhere)Files Modified (12)
Directory.Packages.props— version bumpGitHubCopilotAgent.cs— core API updatesCopilotClientExtensions.cs— namespaceMicrosoft.Agents.AI.GitHub.Copilot.csproj— NoWarnProgram.cs,README.md,.csproj— namespace, permission API, NoWarnTesting