From e21e4acd05a62c423cc768deac8c6f104d0b6f8b Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 28 May 2026 15:54:51 -0700 Subject: [PATCH 1/9] Address https://github.com/github/copilot-sdk-java/pull/237#discussion_r3321064330 --- java/README.md | 2 +- .../java/com/github/copilot/rpc/ResumeSessionConfig.java | 6 ++++-- .../src/main/java/com/github/copilot/rpc/SessionConfig.java | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/java/README.md b/java/README.md index 46c01635a..66ce29a2c 100644 --- a/java/README.md +++ b/java/README.md @@ -38,7 +38,7 @@ Java SDK for programmatic control of GitHub Copilot CLI, enabling you to build A ```groovy implementation 'com.github:copilot-sdk-java:1.0.0-beta-10-java.0' - +``` #### Snapshot Builds diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java index 3cdf19182..d254d73eb 100644 --- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java @@ -787,8 +787,10 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set, the SDK defaults to {@code "in-memory"} for safe multitenant - * behavior. + * If not set and the client is in + * {@link com.github.copilot.CopilotClientMode#EMPTY EMPTY} mode, the SDK + * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes + * this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode diff --git a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java index c84530687..ead3801b8 100644 --- a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java @@ -697,8 +697,10 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set, the SDK defaults to {@code "in-memory"} for safe multitenant - * behavior. + * If not set and the client is in + * {@link com.github.copilot.CopilotClientMode#EMPTY EMPTY} mode, the SDK + * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes + * this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode From 297ca21cd79fffaeeaba2dd7d5e7107f6ba7f9e3 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 28 May 2026 16:03:38 -0700 Subject: [PATCH 2/9] Apply review comments from https://github.com/github/copilot-sdk-java/pull/237 --- .github/workflows/java-sdk-tests.yml | 1 + .../java/com/github/copilot/rpc/LargeToolOutputConfig.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/java-sdk-tests.yml b/.github/workflows/java-sdk-tests.yml index ef8fcc05e..ecd3441d0 100644 --- a/.github/workflows/java-sdk-tests.yml +++ b/.github/workflows/java-sdk-tests.yml @@ -147,4 +147,5 @@ jobs: path: | java/target/surefire-reports/ java/target/surefire-reports-isolated/ + target/failsafe-reports/ retention-days: 7 diff --git a/java/src/main/java/com/github/copilot/rpc/LargeToolOutputConfig.java b/java/src/main/java/com/github/copilot/rpc/LargeToolOutputConfig.java index 1694761e2..cd1e6b525 100644 --- a/java/src/main/java/com/github/copilot/rpc/LargeToolOutputConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/LargeToolOutputConfig.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */ + package com.github.copilot.rpc; import com.fasterxml.jackson.annotation.JsonInclude; From 5d1426abd2d929143ab073cd7b32ae4e1e48671b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 23:20:48 +0000 Subject: [PATCH 3/9] fix: correct CopilotClientMode Javadoc links in java rpc configs Co-authored-by: edburns <75821+edburns@users.noreply.github.com> --- .githooks/pre-commit | 0 .../java/com/github/copilot/rpc/ResumeSessionConfig.java | 7 +++---- .../main/java/com/github/copilot/rpc/SessionConfig.java | 7 +++---- 3 files changed, 6 insertions(+), 8 deletions(-) mode change 100644 => 100755 .githooks/pre-commit diff --git a/.githooks/pre-commit b/.githooks/pre-commit old mode 100644 new mode 100755 diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java index d254d73eb..beef40de5 100644 --- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java @@ -787,10 +787,9 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set and the client is in - * {@link com.github.copilot.CopilotClientMode#EMPTY EMPTY} mode, the SDK - * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes - * this field is left unset. + * If not set and the client is in {@link CopilotClientMode#EMPTY EMPTY} mode, + * the SDK defaults to {@code "in-memory"} for safe multitenant behavior. In + * other modes this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode diff --git a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java index ead3801b8..79594c151 100644 --- a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java @@ -697,10 +697,9 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set and the client is in - * {@link com.github.copilot.CopilotClientMode#EMPTY EMPTY} mode, the SDK - * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes - * this field is left unset. + * If not set and the client is in {@link CopilotClientMode#EMPTY EMPTY} mode, + * the SDK defaults to {@code "in-memory"} for safe multitenant behavior. In + * other modes this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode From f2d54ade4d6834215f544ffcaec7efa69d222b03 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 28 May 2026 23:21:53 +0000 Subject: [PATCH 4/9] fix: fully qualify CopilotClientMode Javadoc links Co-authored-by: edburns <75821+edburns@users.noreply.github.com> --- .../java/com/github/copilot/rpc/ResumeSessionConfig.java | 7 ++++--- .../main/java/com/github/copilot/rpc/SessionConfig.java | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java index beef40de5..05ee1512e 100644 --- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java @@ -787,9 +787,10 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set and the client is in {@link CopilotClientMode#EMPTY EMPTY} mode, - * the SDK defaults to {@code "in-memory"} for safe multitenant behavior. In - * other modes this field is left unset. + * If not set and the client is in + * {@link com.github.copilot.rpc.CopilotClientMode#EMPTY EMPTY} mode, the SDK + * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes + * this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode diff --git a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java index 79594c151..a72b099ae 100644 --- a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java @@ -697,9 +697,10 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set and the client is in {@link CopilotClientMode#EMPTY EMPTY} mode, - * the SDK defaults to {@code "in-memory"} for safe multitenant behavior. In - * other modes this field is left unset. + * If not set and the client is in + * {@link com.github.copilot.rpc.CopilotClientMode#EMPTY EMPTY} mode, the SDK + * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes + * this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode From 9bc966e5b0376e3a6f7574fc25fc06c3b46d1220 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 28 May 2026 16:30:45 -0700 Subject: [PATCH 5/9] Fix path for failsafe reports in workflow --- .github/workflows/java-sdk-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-sdk-tests.yml b/.github/workflows/java-sdk-tests.yml index ecd3441d0..f005226dc 100644 --- a/.github/workflows/java-sdk-tests.yml +++ b/.github/workflows/java-sdk-tests.yml @@ -147,5 +147,5 @@ jobs: path: | java/target/surefire-reports/ java/target/surefire-reports-isolated/ - target/failsafe-reports/ + java/target/failsafe-reports/ retention-days: 7 From bb411c6222d8f302dcaac95e56ce9365b6ee16dd Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 28 May 2026 16:32:26 -0700 Subject: [PATCH 6/9] Correct Javadoc formatting in ResumeSessionConfig Fix formatting of Javadoc comment for clarity. --- .../main/java/com/github/copilot/rpc/ResumeSessionConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java index 05ee1512e..0c0bbe940 100644 --- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java @@ -250,7 +250,7 @@ public ResumeSessionConfig setProvider(ProviderConfig provider) { * {@code true}, telemetry is enabled for GitHub-authenticated sessions. When a * custom {@link ProviderConfig} (BYOK) is configured, session telemetry is * always disabled regardless of this setting. This is independent of - * {@link com.github.copilot.rpc.CopilotClientOptions#getTelemetry() + * {@link CopilotClientOptions#getTelemetry() * CopilotClientOptions.TelemetryConfig}, which configures OpenTelemetry export * for observability. * From e1db8081ae71960810e15f4f3a78199ed398582a Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 28 May 2026 16:33:12 -0700 Subject: [PATCH 7/9] Fix formatting in ResumeSessionConfig.java documentation --- .../main/java/com/github/copilot/rpc/ResumeSessionConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java index 0c0bbe940..2d72e4063 100644 --- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java @@ -788,7 +788,7 @@ public String getMcpOAuthTokenStorage() { * session ends * * If not set and the client is in - * {@link com.github.copilot.rpc.CopilotClientMode#EMPTY EMPTY} mode, the SDK + * {@link CopilotClientMode#EMPTY EMPTY} mode, the SDK * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes * this field is left unset. * From 616b804069afc6a71e09af826cc33d58a9ef5c23 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 28 May 2026 16:33:47 -0700 Subject: [PATCH 8/9] Fix formatting in SessionConfig.java documentation --- java/src/main/java/com/github/copilot/rpc/SessionConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java index a72b099ae..a2a3f4245 100644 --- a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java @@ -698,7 +698,7 @@ public String getMcpOAuthTokenStorage() { * session ends * * If not set and the client is in - * {@link com.github.copilot.rpc.CopilotClientMode#EMPTY EMPTY} mode, the SDK + * {@link CopilotClientMode#EMPTY EMPTY} mode, the SDK * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes * this field is left unset. * From e15c8e61a007b33f56f6a1afe2a6b7647e152c0b Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Thu, 28 May 2026 16:36:47 -0700 Subject: [PATCH 9/9] Spotless --- .../java/com/github/copilot/rpc/ResumeSessionConfig.java | 7 +++---- .../main/java/com/github/copilot/rpc/SessionConfig.java | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java index 2d72e4063..6d6b9449f 100644 --- a/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java @@ -787,10 +787,9 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set and the client is in - * {@link CopilotClientMode#EMPTY EMPTY} mode, the SDK - * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes - * this field is left unset. + * If not set and the client is in {@link CopilotClientMode#EMPTY EMPTY} mode, + * the SDK defaults to {@code "in-memory"} for safe multitenant behavior. In + * other modes this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode diff --git a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java index a2a3f4245..79594c151 100644 --- a/java/src/main/java/com/github/copilot/rpc/SessionConfig.java +++ b/java/src/main/java/com/github/copilot/rpc/SessionConfig.java @@ -697,10 +697,9 @@ public String getMcpOAuthTokenStorage() { *
  • {@code "in-memory"} — tokens are stored in memory and discarded when the * session ends
  • * - * If not set and the client is in - * {@link CopilotClientMode#EMPTY EMPTY} mode, the SDK - * defaults to {@code "in-memory"} for safe multitenant behavior. In other modes - * this field is left unset. + * If not set and the client is in {@link CopilotClientMode#EMPTY EMPTY} mode, + * the SDK defaults to {@code "in-memory"} for safe multitenant behavior. In + * other modes this field is left unset. * * @param mcpOAuthTokenStorage * the storage mode