Skip to content

Upstream sync: port changes from github/copilot-sdk (062b61c → 485ea5e)#15

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/upstream-sync-new-commits
Draft

Upstream sync: port changes from github/copilot-sdk (062b61c → 485ea5e)#15
Copilot wants to merge 3 commits intomainfrom
copilot/upstream-sync-new-commits

Conversation

Copy link

Copilot AI commented Mar 17, 2026

Ports 19 upstream commits from the official github/copilot-sdk (.NET reference implementation) into the Java SDK.

New Features

  • TelemetryConfig — new class to configure OpenTelemetry for the CLI server (otlpEndpoint, filePath, exporterType, sourceName, captureContent); set via CopilotClientOptions.setTelemetry(config), which injects the corresponding env vars on CLI startup

  • PermissionRequestResultKind.NO_RESULT — signals "leave this permission request unanswered" in multi-client v3 protocol scenarios; the SDK skips the RPC response call when returned from a v3 broadcast handler, and throws IllegalStateException if returned through the v2 path

  • ToolDefinition.createSkipPermission() — new factory + skipPermission record field; instructs the CLI to bypass the permission check for safe/read-only tools

  • CopilotSession.setModel(model, reasoningEffort) — overload that accepts an optional reasoning effort level ("low", "medium", "high", "xhigh")

  • New events: SessionBackgroundTasksChangedEvent (session.background_tasks_changed) and SessionToolsUpdatedEvent (session.tools_updated)

Protocol Data Updates

Added fields to existing event data records (all nullable, backward-compatible):

  • ExternalToolRequestedData: traceparent, tracestate (W3C Trace Context)
  • SessionStartData, SessionResumeData: reasoningEffort
  • SessionResumeData: selectedModel
  • SessionModelChangeData: reasoningEffort, previousReasoningEffort
  • AssistantUsageData: reasoningEffort

Deprecations

  • CopilotClientOptions.autoRestart — marked @Deprecated; has no effect (feature removed upstream)

Not Ported

  • Serial event dispatch via channel (b100339) — Java SDK's EventErrorPolicy already provides handler-exception control; full migration would require significant test refactoring
  • RequestId serialization fix (a29dc18) — .NET/StreamJsonRpc-specific AOT issue; not applicable to Java/Jackson

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • mvn spotless:apply has been run to format the code
  • mvn clean verify passes locally

Does this introduce a breaking change?

  • Yes
  • No

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkstyle.org
    • Triggering command: `/opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-a0b8ba07f7cabbfc/dbs/java/working/files-to-index13735164267612819003.list --sourceArchiveDir=/tmp/codeql-scratch-a0b8ba07f7cabbfc/dbs/java/src --outputDir=/tmp/codeql-scratch-a0b8ba07f7cabbfc/dbs/java/trap/java --log-level rgo/bin/which --stdio --auth-token-envshow COPILOT_SDK_AUTH47a10811f863364e55c15c093b1c3c89bee89091:src/main/java/com/github/copilot/sdk/json/TelemetryConfig.java which curl�� b/copilot/sdk/events/SessionModelChangeEvent.java onRequestResultKind.NO_RESULT, skipPermission tools, reasoningEffort, new events

Co-authored-by21.0.9+10-LTS k/_temp/ghcca-node/node/bin/git t-work-113297650git bash /.bin/sh which` (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 17, 2026 09:50
…O_RESULT, skipPermission tools, reasoningEffort, new events

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot AI changed the title [WIP] [upstream-sync] Sync with upstream repository for newer commits Upstream sync: port changes from github/copilot-sdk (062b61c → 485ea5e) Mar 17, 2026
Copilot AI requested a review from edburns March 17, 2026 09:59
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.

[upstream-sync] Upstream sync: 19 new commits (2026-03-17)

2 participants