Conversation
…els, log(), new event types Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Sync with upstream repository to include 21 new commits
[upstream-sync] Port 21 upstream commits (2026-03-10): protocol v3, agent pre-selection, onListModels, session logging, new event types
Mar 10, 2026
1 task
Collaborator
|
I am reviewing this now, @brunoborges |
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.
Resolves #
Ports 21 upstream commits from
github/copilot-sdk(4e1499d..7235609).Before the change?
external_tool.requested,permission.requested,command.queued, etc.) were unknown/droppedAfter the change?
Protocol v3 (backward-compatible)
SdkProtocolVersionbumped to 3; range check accepts v2–v3 so existing deployments keep workingBYOK: Custom Model List (
e478657)CopilotClientOptions.setOnListModels(Supplier<CompletableFuture<List<ModelInfo>>>)— called bylistModels()instead of querying the CLI; results are cached; noclient.start()requiredAgent pre-selection at session start (
7766b1a)SessionConfig.setAgent(String)/ResumeSessionConfig.setAgent(String)— activates a named custom agent immediately on session creation, replacing a follow-upselectAgent()callSession logging (
11dde6e)CopilotSession.log(String)andCopilotSession.log(String, SessionLogRequestLevel, Boolean)— writes to the session timeline viasession.logRPC; supportsINFO/WARNING/ERRORlevels and ephemeral (non-persisted) messagesNew protocol v3 event types (
11dde6e,396e8b3)AbstractSessionEventandSessionEventParser:ExternalToolRequestedEvent,ExternalToolCompletedEvent,PermissionRequestedEvent,CommandQueuedEvent,CommandCompletedEvent,ExitPlanModeRequestedEvent,ExitPlanModeCompletedEvent,SystemNotificationEventsession.on(); SDK does not auto-respond to them because the current CLI sends both v2 RPCs and v3 broadcast events simultaneously — auto-handling caused double-response conflictsPull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.