servers
) {
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionMcpListResultServersItem(
- /** Server name (config key) */
- @JsonProperty("name") String name,
- /** Connection status: connected, failed, needs-auth, pending, disabled, or not_configured */
- @JsonProperty("status") SessionMcpListResultServersItemStatus status,
- /** Configuration source: user, workspace, plugin, or builtin */
- @JsonProperty("source") String source,
- /** Error message if the server failed to connect */
- @JsonProperty("error") String error
- ) {
-
- /** Connection status: connected, failed, needs-auth, pending, disabled, or not_configured */
- public enum SessionMcpListResultServersItemStatus {
- /** The {@code connected} variant. */
- CONNECTED("connected"),
- /** The {@code failed} variant. */
- FAILED("failed"),
- /** The {@code needs-auth} variant. */
- NEEDS_AUTH("needs-auth"),
- /** The {@code pending} variant. */
- PENDING("pending"),
- /** The {@code disabled} variant. */
- DISABLED("disabled"),
- /** The {@code not_configured} variant. */
- NOT_CONFIGURED("not_configured");
-
- private final String value;
- SessionMcpListResultServersItemStatus(String value) { this.value = value; }
- @com.fasterxml.jackson.annotation.JsonValue
- public String getValue() { return value; }
- @com.fasterxml.jackson.annotation.JsonCreator
- public static SessionMcpListResultServersItemStatus fromValue(String value) {
- for (SessionMcpListResultServersItemStatus v : values()) {
- if (v.value.equals(value)) return v;
- }
- throw new IllegalArgumentException("Unknown SessionMcpListResultServersItemStatus value: " + value);
- }
- }
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthApi.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthApi.java
new file mode 100644
index 0000000000..4a864468e3
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthApi.java
@@ -0,0 +1,47 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import java.util.concurrent.CompletableFuture;
+import javax.annotation.processing.Generated;
+
+/**
+ * API methods for the {@code mcp.oauth} namespace.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionMcpOauthApi {
+
+ private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE;
+
+ private final RpcCaller caller;
+ private final String sessionId;
+
+ /** @param caller the RPC transport function */
+ SessionMcpOauthApi(RpcCaller caller, String sessionId) {
+ this.caller = caller;
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * Invokes {@code session.mcp.oauth.login}.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+ public CompletableFuture login(SessionMcpOauthLoginParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.mcp.oauth.login", _p, SessionMcpOauthLoginResult.class);
+ }
+
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthLoginParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthLoginParams.java
new file mode 100644
index 0000000000..ef336408d1
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthLoginParams.java
@@ -0,0 +1,35 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.mcp.oauth.login} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionMcpOauthLoginParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** Name of the remote MCP server to authenticate */
+ @JsonProperty("serverName") String serverName,
+ /** When true, clears any cached OAuth token for the server and runs a full new authorization. Use when the user explicitly wants to switch accounts or believes their session is stuck. */
+ @JsonProperty("forceReauth") Boolean forceReauth,
+ /** Optional override for the OAuth client display name shown on the consent screen. Applies to newly registered dynamic clients only — existing registrations keep the name they were created with. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass their own surface-specific label so the consent screen matches the product the user sees. */
+ @JsonProperty("clientName") String clientName,
+ /** Optional override for the body text shown on the OAuth loopback callback success page. When omitted, the runtime applies a neutral fallback; callers driving interactive auth should pass surface-specific copy telling the user where to return. */
+ @JsonProperty("callbackSuccessMessage") String callbackSuccessMessage
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthLoginResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthLoginResult.java
new file mode 100644
index 0000000000..e46ab39efb
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMcpOauthLoginResult.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code session.mcp.oauth.login} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionMcpOauthLoginResult(
+ /** URL the caller should open in a browser to complete OAuth. Omitted when cached tokens were still valid and no browser interaction was needed — the server is already reconnected in that case. When present, the runtime starts the callback listener before returning and continues the flow in the background; completion is signaled via session.mcp_server_status_changed. */
+ @JsonProperty("authorizationUrl") String authorizationUrl
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMode.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMode.java
new file mode 100644
index 0000000000..5b246bcb5a
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionMode.java
@@ -0,0 +1,37 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import javax.annotation.processing.Generated;
+
+/**
+ * The agent mode. Valid values: "interactive", "plan", "autopilot".
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public enum SessionMode {
+ /** The {@code interactive} variant. */
+ INTERACTIVE("interactive"),
+ /** The {@code plan} variant. */
+ PLAN("plan"),
+ /** The {@code autopilot} variant. */
+ AUTOPILOT("autopilot");
+
+ private final String value;
+ SessionMode(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionMode fromValue(String value) {
+ for (SessionMode v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionMode value: " + value);
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java
index 7fd8eff736..bf20ad088f 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeApi.java
@@ -30,11 +30,11 @@ public final class SessionModeApi {
}
/**
- * Invokes {@code session.mode.get}.
+ * The agent mode. Valid values: "interactive", "plan", "autopilot".
* @since 1.0.0
*/
- public CompletableFuture get() {
- return caller.invoke("session.mode.get", java.util.Map.of("sessionId", this.sessionId), SessionModeGetResult.class);
+ public CompletableFuture get() {
+ return caller.invoke("session.mode.get", java.util.Map.of("sessionId", this.sessionId), Void.class);
}
/**
@@ -44,10 +44,10 @@ public CompletableFuture get() {
* by the session-scoped wrapper; any value provided is ignored.
* @since 1.0.0
*/
- public CompletableFuture set(SessionModeSetParams params) {
+ public CompletableFuture set(SessionModeSetParams params) {
com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
_p.put("sessionId", this.sessionId);
- return caller.invoke("session.mode.set", _p, SessionModeSetResult.class);
+ return caller.invoke("session.mode.set", _p, Void.class);
}
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeSetParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeSetParams.java
index dfbae5cac5..4153014e5d 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeSetParams.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModeSetParams.java
@@ -23,29 +23,7 @@
public record SessionModeSetParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
- /** The mode to switch to. Valid values: "interactive", "plan", "autopilot". */
- @JsonProperty("mode") SessionModeSetParamsMode mode
+ /** The agent mode. Valid values: "interactive", "plan", "autopilot". */
+ @JsonProperty("mode") SessionMode mode
) {
-
- /** The mode to switch to. Valid values: "interactive", "plan", "autopilot". */
- public enum SessionModeSetParamsMode {
- /** The {@code interactive} variant. */
- INTERACTIVE("interactive"),
- /** The {@code plan} variant. */
- PLAN("plan"),
- /** The {@code autopilot} variant. */
- AUTOPILOT("autopilot");
-
- private final String value;
- SessionModeSetParamsMode(String value) { this.value = value; }
- @com.fasterxml.jackson.annotation.JsonValue
- public String getValue() { return value; }
- @com.fasterxml.jackson.annotation.JsonCreator
- public static SessionModeSetParamsMode fromValue(String value) {
- for (SessionModeSetParamsMode v : values()) {
- if (v.value.equals(value)) return v;
- }
- throw new IllegalArgumentException("Unknown SessionModeSetParamsMode value: " + value);
- }
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSwitchToParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSwitchToParams.java
index 994b3f53b4..4d69219fe2 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSwitchToParams.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionModelSwitchToParams.java
@@ -10,7 +10,6 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
import javax.annotation.processing.Generated;
/**
@@ -29,50 +28,6 @@ public record SessionModelSwitchToParams(
/** Reasoning effort level to use for the model */
@JsonProperty("reasoningEffort") String reasoningEffort,
/** Override individual model capabilities resolved by the runtime */
- @JsonProperty("modelCapabilities") SessionModelSwitchToParamsModelCapabilities modelCapabilities
+ @JsonProperty("modelCapabilities") ModelCapabilitiesOverride modelCapabilities
) {
-
- /** Override individual model capabilities resolved by the runtime */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionModelSwitchToParamsModelCapabilities(
- /** Feature flags indicating what the model supports */
- @JsonProperty("supports") SessionModelSwitchToParamsModelCapabilitiesSupports supports,
- /** Token limits for prompts, outputs, and context window */
- @JsonProperty("limits") SessionModelSwitchToParamsModelCapabilitiesLimits limits
- ) {
-
- /** Feature flags indicating what the model supports */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionModelSwitchToParamsModelCapabilitiesSupports(
- @JsonProperty("vision") Boolean vision,
- @JsonProperty("reasoningEffort") Boolean reasoningEffort
- ) {
- }
-
- /** Token limits for prompts, outputs, and context window */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionModelSwitchToParamsModelCapabilitiesLimits(
- @JsonProperty("max_prompt_tokens") Double maxPromptTokens,
- @JsonProperty("max_output_tokens") Double maxOutputTokens,
- /** Maximum total context window size in tokens */
- @JsonProperty("max_context_window_tokens") Double maxContextWindowTokens,
- @JsonProperty("vision") SessionModelSwitchToParamsModelCapabilitiesLimitsVision vision
- ) {
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionModelSwitchToParamsModelCapabilitiesLimitsVision(
- /** MIME types the model accepts */
- @JsonProperty("supported_media_types") List supportedMediaTypes,
- /** Maximum number of images per prompt */
- @JsonProperty("max_prompt_images") Double maxPromptImages,
- /** Maximum image size in bytes */
- @JsonProperty("max_prompt_image_size") Double maxPromptImageSize
- ) {
- }
- }
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameApi.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameApi.java
new file mode 100644
index 0000000000..1700becb97
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameApi.java
@@ -0,0 +1,53 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import java.util.concurrent.CompletableFuture;
+import javax.annotation.processing.Generated;
+
+/**
+ * API methods for the {@code name} namespace.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionNameApi {
+
+ private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE;
+
+ private final RpcCaller caller;
+ private final String sessionId;
+
+ /** @param caller the RPC transport function */
+ SessionNameApi(RpcCaller caller, String sessionId) {
+ this.caller = caller;
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * Invokes {@code session.name.get}.
+ * @since 1.0.0
+ */
+ public CompletableFuture get() {
+ return caller.invoke("session.name.get", java.util.Map.of("sessionId", this.sessionId), SessionNameGetResult.class);
+ }
+
+ /**
+ * Invokes {@code session.name.set}.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ * @since 1.0.0
+ */
+ public CompletableFuture set(SessionNameSetParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.name.set", _p, Void.class);
+ }
+
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameGetParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameGetParams.java
new file mode 100644
index 0000000000..59b638e4c5
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameGetParams.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.name.get} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionNameGetParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameGetResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameGetResult.java
new file mode 100644
index 0000000000..9e516b45aa
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameGetResult.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code session.name.get} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionNameGetResult(
+ /** The session name, falling back to the auto-generated summary, or null if neither exists */
+ @JsonProperty("name") String name
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetParams.java
new file mode 100644
index 0000000000..45e93db451
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionNameSetParams.java
@@ -0,0 +1,29 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.name.set} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionNameSetParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** New session name (1–100 characters, trimmed of leading/trailing whitespace) */
+ @JsonProperty("name") String name
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java
index 38c2dd4fc3..31edf36b7e 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsApi.java
@@ -42,4 +42,25 @@ public CompletableFuture
return caller.invoke("session.permissions.handlePendingPermissionRequest", _p, SessionPermissionsHandlePendingPermissionRequestResult.class);
}
+ /**
+ * Invokes {@code session.permissions.setApproveAll}.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ * @since 1.0.0
+ */
+ public CompletableFuture setApproveAll(SessionPermissionsSetApproveAllParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.permissions.setApproveAll", _p, SessionPermissionsSetApproveAllResult.class);
+ }
+
+ /**
+ * Invokes {@code session.permissions.resetSessionApprovals}.
+ * @since 1.0.0
+ */
+ public CompletableFuture resetSessionApprovals() {
+ return caller.invoke("session.permissions.resetSessionApprovals", java.util.Map.of("sessionId", this.sessionId), SessionPermissionsResetSessionApprovalsResult.class);
+ }
+
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsResetSessionApprovalsParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsResetSessionApprovalsParams.java
new file mode 100644
index 0000000000..6fa1b0310f
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsResetSessionApprovalsParams.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.permissions.resetSessionApprovals} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionPermissionsResetSessionApprovalsParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsResetSessionApprovalsResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsResetSessionApprovalsResult.java
new file mode 100644
index 0000000000..91fa4c7822
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsResetSessionApprovalsResult.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code session.permissions.resetSessionApprovals} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionPermissionsResetSessionApprovalsResult(
+ /** Whether the operation succeeded */
+ @JsonProperty("success") Boolean success
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllParams.java
new file mode 100644
index 0000000000..cd6ad254cc
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllParams.java
@@ -0,0 +1,29 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.permissions.setApproveAll} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionPermissionsSetApproveAllParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** Whether to auto-approve all tool permission requests */
+ @JsonProperty("enabled") Boolean enabled
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllResult.java
new file mode 100644
index 0000000000..be59662460
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPermissionsSetApproveAllResult.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code session.permissions.setApproveAll} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionPermissionsSetApproveAllResult(
+ /** Whether the operation succeeded */
+ @JsonProperty("success") Boolean success
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPluginsListResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPluginsListResult.java
index d6008318d8..501e8760d0 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPluginsListResult.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionPluginsListResult.java
@@ -23,20 +23,6 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public record SessionPluginsListResult(
/** Installed plugins */
- @JsonProperty("plugins") List plugins
+ @JsonProperty("plugins") List plugins
) {
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionPluginsListResultPluginsItem(
- /** Plugin name */
- @JsonProperty("name") String name,
- /** Marketplace the plugin came from */
- @JsonProperty("marketplace") String marketplace,
- /** Installed version */
- @JsonProperty("version") String version,
- /** Whether the plugin is currently enabled */
- @JsonProperty("enabled") Boolean enabled
- ) {
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java
index 9faf4612d5..39ab121b6d 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionRpc.java
@@ -28,14 +28,20 @@ public final class SessionRpc {
private final RpcCaller caller;
private final String sessionId;
+ /** API methods for the {@code auth} namespace. */
+ public final SessionAuthApi auth;
/** API methods for the {@code model} namespace. */
public final SessionModelApi model;
/** API methods for the {@code mode} namespace. */
public final SessionModeApi mode;
+ /** API methods for the {@code name} namespace. */
+ public final SessionNameApi name;
/** API methods for the {@code plan} namespace. */
public final SessionPlanApi plan;
- /** API methods for the {@code workspace} namespace. */
- public final SessionWorkspaceApi workspace;
+ /** API methods for the {@code workspaces} namespace. */
+ public final SessionWorkspacesApi workspaces;
+ /** API methods for the {@code instructions} namespace. */
+ public final SessionInstructionsApi instructions;
/** API methods for the {@code fleet} namespace. */
public final SessionFleetApi fleet;
/** API methods for the {@code agent} namespace. */
@@ -72,10 +78,13 @@ public final class SessionRpc {
public SessionRpc(RpcCaller caller, String sessionId) {
this.caller = caller;
this.sessionId = sessionId;
+ this.auth = new SessionAuthApi(caller, sessionId);
this.model = new SessionModelApi(caller, sessionId);
this.mode = new SessionModeApi(caller, sessionId);
+ this.name = new SessionNameApi(caller, sessionId);
this.plan = new SessionPlanApi(caller, sessionId);
- this.workspace = new SessionWorkspaceApi(caller, sessionId);
+ this.workspaces = new SessionWorkspacesApi(caller, sessionId);
+ this.instructions = new SessionInstructionsApi(caller, sessionId);
this.fleet = new SessionFleetApi(caller, sessionId);
this.agent = new SessionAgentApi(caller, sessionId);
this.skills = new SessionSkillsApi(caller, sessionId);
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellExecParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellExecParams.java
index 9e9d93e99f..3aeeebff05 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellExecParams.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellExecParams.java
@@ -28,6 +28,6 @@ public record SessionShellExecParams(
/** Working directory (defaults to session working directory) */
@JsonProperty("cwd") String cwd,
/** Timeout in milliseconds (default: 30000) */
- @JsonProperty("timeout") Double timeout
+ @JsonProperty("timeout") Long timeout
) {
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellKillParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellKillParams.java
index 19569dd0e7..cb0e128b6d 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellKillParams.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionShellKillParams.java
@@ -26,28 +26,6 @@ public record SessionShellKillParams(
/** Process identifier returned by shell.exec */
@JsonProperty("processId") String processId,
/** Signal to send (default: SIGTERM) */
- @JsonProperty("signal") SessionShellKillParamsSignal signal
+ @JsonProperty("signal") ShellKillSignal signal
) {
-
- /** Signal to send (default: SIGTERM) */
- public enum SessionShellKillParamsSignal {
- /** The {@code SIGTERM} variant. */
- SIGTERM("SIGTERM"),
- /** The {@code SIGKILL} variant. */
- SIGKILL("SIGKILL"),
- /** The {@code SIGINT} variant. */
- SIGINT("SIGINT");
-
- private final String value;
- SessionShellKillParamsSignal(String value) { this.value = value; }
- @com.fasterxml.jackson.annotation.JsonValue
- public String getValue() { return value; }
- @com.fasterxml.jackson.annotation.JsonCreator
- public static SessionShellKillParamsSignal fromValue(String value) {
- for (SessionShellKillParamsSignal v : values()) {
- if (v.value.equals(value)) return v;
- }
- throw new IllegalArgumentException("Unknown SessionShellKillParamsSignal value: " + value);
- }
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsListResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsListResult.java
index dc6ba023e8..cd8e8ea8c8 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsListResult.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionSkillsListResult.java
@@ -23,24 +23,6 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public record SessionSkillsListResult(
/** Available skills */
- @JsonProperty("skills") List skills
+ @JsonProperty("skills") List skills
) {
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionSkillsListResultSkillsItem(
- /** Unique identifier for the skill */
- @JsonProperty("name") String name,
- /** Description of what the skill does */
- @JsonProperty("description") String description,
- /** Source location type (e.g., project, personal, plugin) */
- @JsonProperty("source") String source,
- /** Whether the skill can be invoked by the user as a slash command */
- @JsonProperty("userInvocable") Boolean userInvocable,
- /** Whether the skill is currently enabled */
- @JsonProperty("enabled") Boolean enabled,
- /** Absolute path to the skill file */
- @JsonProperty("path") String path
- ) {
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java
index a987bd627e..d6c1e3b4d3 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiApi.java
@@ -30,7 +30,7 @@ public final class SessionUiApi {
}
/**
- * Invokes {@code session.ui.elicitation}.
+ * The elicitation response (accept with form values, decline, or cancel)
*
* Note: the {@code sessionId} field in the params record is overridden
* by the session-scoped wrapper; any value provided is ignored.
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationParams.java
index d1df4daea0..315a857f5d 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationParams.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationParams.java
@@ -10,8 +10,6 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-import java.util.Map;
import javax.annotation.processing.Generated;
/**
@@ -28,19 +26,6 @@ public record SessionUiElicitationParams(
/** Message describing what information is needed from the user */
@JsonProperty("message") String message,
/** JSON Schema describing the form fields to present to the user */
- @JsonProperty("requestedSchema") SessionUiElicitationParamsRequestedSchema requestedSchema
+ @JsonProperty("requestedSchema") UIElicitationSchema requestedSchema
) {
-
- /** JSON Schema describing the form fields to present to the user */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionUiElicitationParamsRequestedSchema(
- /** Schema type indicator (always 'object') */
- @JsonProperty("type") String type,
- /** Form field definitions, keyed by field name */
- @JsonProperty("properties") Map properties,
- /** List of required field names */
- @JsonProperty("required") List required
- ) {
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationResult.java
index 92ea417781..4be941e08b 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationResult.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiElicitationResult.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Result for the {@code session.ui.elicitation} RPC method.
+ * The elicitation response (accept with form values, decline, or cancel)
*
* @since 1.0.0
*/
@@ -23,30 +23,8 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public record SessionUiElicitationResult(
/** The user's response: accept (submitted), decline (rejected), or cancel (dismissed) */
- @JsonProperty("action") SessionUiElicitationResultAction action,
+ @JsonProperty("action") UIElicitationResponseAction action,
/** The form values submitted by the user (present when action is 'accept') */
@JsonProperty("content") Map content
) {
-
- /** The user's response: accept (submitted), decline (rejected), or cancel (dismissed) */
- public enum SessionUiElicitationResultAction {
- /** The {@code accept} variant. */
- ACCEPT("accept"),
- /** The {@code decline} variant. */
- DECLINE("decline"),
- /** The {@code cancel} variant. */
- CANCEL("cancel");
-
- private final String value;
- SessionUiElicitationResultAction(String value) { this.value = value; }
- @com.fasterxml.jackson.annotation.JsonValue
- public String getValue() { return value; }
- @com.fasterxml.jackson.annotation.JsonCreator
- public static SessionUiElicitationResultAction fromValue(String value) {
- for (SessionUiElicitationResultAction v : values()) {
- if (v.value.equals(value)) return v;
- }
- throw new IllegalArgumentException("Unknown SessionUiElicitationResultAction value: " + value);
- }
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingElicitationParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingElicitationParams.java
index e890fffbda..23fd0759de 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingElicitationParams.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUiHandlePendingElicitationParams.java
@@ -10,7 +10,6 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.Map;
import javax.annotation.processing.Generated;
/**
@@ -27,39 +26,6 @@ public record SessionUiHandlePendingElicitationParams(
/** The unique request ID from the elicitation.requested event */
@JsonProperty("requestId") String requestId,
/** The elicitation response (accept with form values, decline, or cancel) */
- @JsonProperty("result") SessionUiHandlePendingElicitationParamsResult result
+ @JsonProperty("result") UIElicitationResponse result
) {
-
- /** The elicitation response (accept with form values, decline, or cancel) */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionUiHandlePendingElicitationParamsResult(
- /** The user's response: accept (submitted), decline (rejected), or cancel (dismissed) */
- @JsonProperty("action") SessionUiHandlePendingElicitationParamsResultAction action,
- /** The form values submitted by the user (present when action is 'accept') */
- @JsonProperty("content") Map content
- ) {
-
- /** The user's response: accept (submitted), decline (rejected), or cancel (dismissed) */
- public enum SessionUiHandlePendingElicitationParamsResultAction {
- /** The {@code accept} variant. */
- ACCEPT("accept"),
- /** The {@code decline} variant. */
- DECLINE("decline"),
- /** The {@code cancel} variant. */
- CANCEL("cancel");
-
- private final String value;
- SessionUiHandlePendingElicitationParamsResultAction(String value) { this.value = value; }
- @com.fasterxml.jackson.annotation.JsonValue
- public String getValue() { return value; }
- @com.fasterxml.jackson.annotation.JsonCreator
- public static SessionUiHandlePendingElicitationParamsResultAction fromValue(String value) {
- for (SessionUiHandlePendingElicitationParamsResultAction v : values()) {
- if (v.value.equals(value)) return v;
- }
- throw new IllegalArgumentException("Unknown SessionUiHandlePendingElicitationParamsResultAction value: " + value);
- }
- }
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java
index 5a98516d4d..9cfdbcfc8d 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionUsageGetMetricsResult.java
@@ -31,9 +31,9 @@ public record SessionUsageGetMetricsResult(
/** Session start timestamp (epoch milliseconds) */
@JsonProperty("sessionStartTime") Long sessionStartTime,
/** Aggregated code change metrics */
- @JsonProperty("codeChanges") SessionUsageGetMetricsResultCodeChanges codeChanges,
+ @JsonProperty("codeChanges") UsageMetricsCodeChanges codeChanges,
/** Per-model token and request metrics, keyed by model identifier */
- @JsonProperty("modelMetrics") Map modelMetrics,
+ @JsonProperty("modelMetrics") Map modelMetrics,
/** Currently active model identifier */
@JsonProperty("currentModel") String currentModel,
/** Input tokens from the most recent main-agent API call */
@@ -41,55 +41,4 @@ public record SessionUsageGetMetricsResult(
/** Output tokens from the most recent main-agent API call */
@JsonProperty("lastCallOutputTokens") Long lastCallOutputTokens
) {
-
- /** Aggregated code change metrics */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionUsageGetMetricsResultCodeChanges(
- /** Total lines of code added */
- @JsonProperty("linesAdded") Long linesAdded,
- /** Total lines of code removed */
- @JsonProperty("linesRemoved") Long linesRemoved,
- /** Number of distinct files modified */
- @JsonProperty("filesModifiedCount") Long filesModifiedCount
- ) {
- }
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionUsageGetMetricsResultModelMetricsValue(
- /** Request count and cost metrics for this model */
- @JsonProperty("requests") SessionUsageGetMetricsResultModelMetricsValueRequests requests,
- /** Token usage metrics for this model */
- @JsonProperty("usage") SessionUsageGetMetricsResultModelMetricsValueUsage usage
- ) {
-
- /** Request count and cost metrics for this model */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionUsageGetMetricsResultModelMetricsValueRequests(
- /** Number of API requests made with this model */
- @JsonProperty("count") Long count,
- /** User-initiated premium request cost (with multiplier applied) */
- @JsonProperty("cost") Double cost
- ) {
- }
-
- /** Token usage metrics for this model */
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record SessionUsageGetMetricsResultModelMetricsValueUsage(
- /** Total input tokens consumed */
- @JsonProperty("inputTokens") Long inputTokens,
- /** Total output tokens produced */
- @JsonProperty("outputTokens") Long outputTokens,
- /** Total tokens read from prompt cache */
- @JsonProperty("cacheReadTokens") Long cacheReadTokens,
- /** Total tokens written to prompt cache */
- @JsonProperty("cacheWriteTokens") Long cacheWriteTokens,
- /** Total output tokens used for reasoning */
- @JsonProperty("reasoningTokens") Long reasoningTokens
- ) {
- }
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesApi.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesApi.java
new file mode 100644
index 0000000000..b9a5238fac
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesApi.java
@@ -0,0 +1,74 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import java.util.concurrent.CompletableFuture;
+import javax.annotation.processing.Generated;
+
+/**
+ * API methods for the {@code workspaces} namespace.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionWorkspacesApi {
+
+ private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE;
+
+ private final RpcCaller caller;
+ private final String sessionId;
+
+ /** @param caller the RPC transport function */
+ SessionWorkspacesApi(RpcCaller caller, String sessionId) {
+ this.caller = caller;
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * Invokes {@code session.workspaces.getWorkspace}.
+ * @since 1.0.0
+ */
+ public CompletableFuture getWorkspace() {
+ return caller.invoke("session.workspaces.getWorkspace", java.util.Map.of("sessionId", this.sessionId), SessionWorkspacesGetWorkspaceResult.class);
+ }
+
+ /**
+ * Invokes {@code session.workspaces.listFiles}.
+ * @since 1.0.0
+ */
+ public CompletableFuture listFiles() {
+ return caller.invoke("session.workspaces.listFiles", java.util.Map.of("sessionId", this.sessionId), SessionWorkspacesListFilesResult.class);
+ }
+
+ /**
+ * Invokes {@code session.workspaces.readFile}.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ * @since 1.0.0
+ */
+ public CompletableFuture readFile(SessionWorkspacesReadFileParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.workspaces.readFile", _p, SessionWorkspacesReadFileResult.class);
+ }
+
+ /**
+ * Invokes {@code session.workspaces.createFile}.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ * @since 1.0.0
+ */
+ public CompletableFuture createFile(SessionWorkspacesCreateFileParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.workspaces.createFile", _p, Void.class);
+ }
+
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesCreateFileParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesCreateFileParams.java
new file mode 100644
index 0000000000..def2ffe373
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesCreateFileParams.java
@@ -0,0 +1,31 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.workspaces.createFile} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionWorkspacesCreateFileParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** Relative path within the workspace files directory */
+ @JsonProperty("path") String path,
+ /** File content to write as a UTF-8 string */
+ @JsonProperty("content") String content
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceParams.java
new file mode 100644
index 0000000000..c2f0e5a16d
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceParams.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.workspaces.getWorkspace} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionWorkspacesGetWorkspaceParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceResult.java
new file mode 100644
index 0000000000..2a2260db8a
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesGetWorkspaceResult.java
@@ -0,0 +1,92 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.UUID;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code session.workspaces.getWorkspace} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionWorkspacesGetWorkspaceResult(
+ /** Current workspace metadata, or null if not available */
+ @JsonProperty("workspace") SessionWorkspacesGetWorkspaceResultWorkspace workspace
+) {
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ public record SessionWorkspacesGetWorkspaceResultWorkspace(
+ @JsonProperty("id") UUID id,
+ @JsonProperty("cwd") String cwd,
+ @JsonProperty("git_root") String gitRoot,
+ @JsonProperty("repository") String repository,
+ @JsonProperty("host_type") SessionWorkspacesGetWorkspaceResultWorkspaceHostType hostType,
+ @JsonProperty("branch") String branch,
+ @JsonProperty("summary") String summary,
+ @JsonProperty("name") String name,
+ @JsonProperty("summary_count") Long summaryCount,
+ @JsonProperty("created_at") OffsetDateTime createdAt,
+ @JsonProperty("updated_at") OffsetDateTime updatedAt,
+ @JsonProperty("remote_steerable") Boolean remoteSteerable,
+ @JsonProperty("mc_task_id") String mcTaskId,
+ @JsonProperty("mc_session_id") String mcSessionId,
+ @JsonProperty("mc_last_event_id") String mcLastEventId,
+ @JsonProperty("session_sync_level") SessionWorkspacesGetWorkspaceResultWorkspaceSessionSyncLevel sessionSyncLevel,
+ @JsonProperty("chronicle_sync_dismissed") Boolean chronicleSyncDismissed
+ ) {
+
+ public enum SessionWorkspacesGetWorkspaceResultWorkspaceHostType {
+ /** The {@code github} variant. */
+ GITHUB("github"),
+ /** The {@code ado} variant. */
+ ADO("ado");
+
+ private final String value;
+ SessionWorkspacesGetWorkspaceResultWorkspaceHostType(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionWorkspacesGetWorkspaceResultWorkspaceHostType fromValue(String value) {
+ for (SessionWorkspacesGetWorkspaceResultWorkspaceHostType v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionWorkspacesGetWorkspaceResultWorkspaceHostType value: " + value);
+ }
+ }
+
+ public enum SessionWorkspacesGetWorkspaceResultWorkspaceSessionSyncLevel {
+ /** The {@code local} variant. */
+ LOCAL("local"),
+ /** The {@code user} variant. */
+ USER("user"),
+ /** The {@code repo_and_user} variant. */
+ REPO_AND_USER("repo_and_user");
+
+ private final String value;
+ SessionWorkspacesGetWorkspaceResultWorkspaceSessionSyncLevel(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static SessionWorkspacesGetWorkspaceResultWorkspaceSessionSyncLevel fromValue(String value) {
+ for (SessionWorkspacesGetWorkspaceResultWorkspaceSessionSyncLevel v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown SessionWorkspacesGetWorkspaceResultWorkspaceSessionSyncLevel value: " + value);
+ }
+ }
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListFilesParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListFilesParams.java
new file mode 100644
index 0000000000..7bcee441ed
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListFilesParams.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.workspaces.listFiles} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionWorkspacesListFilesParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListFilesResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListFilesResult.java
new file mode 100644
index 0000000000..26064cde40
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesListFilesResult.java
@@ -0,0 +1,28 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code session.workspaces.listFiles} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionWorkspacesListFilesResult(
+ /** Relative file paths in the workspace files directory */
+ @JsonProperty("files") List files
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadFileParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadFileParams.java
new file mode 100644
index 0000000000..40b2778542
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadFileParams.java
@@ -0,0 +1,29 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code session.workspaces.readFile} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionWorkspacesReadFileParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** Relative path within the workspace files directory */
+ @JsonProperty("path") String path
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadFileResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadFileResult.java
new file mode 100644
index 0000000000..c0ce5e7c7a
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SessionWorkspacesReadFileResult.java
@@ -0,0 +1,27 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code session.workspaces.readFile} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionWorkspacesReadFileResult(
+ /** File content as a UTF-8 string */
+ @JsonProperty("content") String content
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/ShellKillSignal.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/ShellKillSignal.java
new file mode 100644
index 0000000000..92700c5c0f
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/ShellKillSignal.java
@@ -0,0 +1,37 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import javax.annotation.processing.Generated;
+
+/**
+ * Signal to send (default: SIGTERM)
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public enum ShellKillSignal {
+ /** The {@code SIGTERM} variant. */
+ SIGTERM("SIGTERM"),
+ /** The {@code SIGKILL} variant. */
+ SIGKILL("SIGKILL"),
+ /** The {@code SIGINT} variant. */
+ SIGINT("SIGINT");
+
+ private final String value;
+ ShellKillSignal(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static ShellKillSignal fromValue(String value) {
+ for (ShellKillSignal v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown ShellKillSignal value: " + value);
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/Skill.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/Skill.java
new file mode 100644
index 0000000000..7f3c2a4010
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/Skill.java
@@ -0,0 +1,32 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record Skill(
+ /** Unique identifier for the skill */
+ @JsonProperty("name") String name,
+ /** Description of what the skill does */
+ @JsonProperty("description") String description,
+ /** Source location type (e.g., project, personal, plugin) */
+ @JsonProperty("source") String source,
+ /** Whether the skill can be invoked by the user as a slash command */
+ @JsonProperty("userInvocable") Boolean userInvocable,
+ /** Whether the skill is currently enabled */
+ @JsonProperty("enabled") Boolean enabled,
+ /** Absolute path to the skill file */
+ @JsonProperty("path") String path
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsConfigSetDisabledSkillsParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsConfigSetDisabledSkillsParams.java
new file mode 100644
index 0000000000..94a32b573b
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsConfigSetDisabledSkillsParams.java
@@ -0,0 +1,28 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code skills.config.setDisabledSkills} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SkillsConfigSetDisabledSkillsParams(
+ /** List of skill names to disable */
+ @JsonProperty("disabledSkills") List disabledSkills
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsDiscoverParams.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsDiscoverParams.java
new file mode 100644
index 0000000000..053d42585a
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsDiscoverParams.java
@@ -0,0 +1,30 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request parameters for the {@code skills.discover} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SkillsDiscoverParams(
+ /** Optional list of project directory paths to scan for project-scoped skills */
+ @JsonProperty("projectPaths") List projectPaths,
+ /** Optional list of additional skill directory paths to include */
+ @JsonProperty("skillDirectories") List skillDirectories
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsDiscoverResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsDiscoverResult.java
new file mode 100644
index 0000000000..a2f0efe971
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/SkillsDiscoverResult.java
@@ -0,0 +1,28 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * Result for the {@code skills.discover} RPC method.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SkillsDiscoverResult(
+ /** All discovered skills across all sources */
+ @JsonProperty("skills") List skills
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/Tool.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/Tool.java
new file mode 100644
index 0000000000..53fbdcb8ed
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/Tool.java
@@ -0,0 +1,31 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record Tool(
+ /** Tool identifier (e.g., "bash", "grep", "str_replace_editor") */
+ @JsonProperty("name") String name,
+ /** Optional namespaced name for declarative filtering (e.g., "playwright/navigate" for MCP tools) */
+ @JsonProperty("namespacedName") String namespacedName,
+ /** Description of what the tool does */
+ @JsonProperty("description") String description,
+ /** JSON Schema for the tool's input parameters */
+ @JsonProperty("parameters") Map parameters,
+ /** Optional instructions for how to use this tool effectively */
+ @JsonProperty("instructions") String instructions
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/ToolsListResult.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/ToolsListResult.java
index d56ef7e7cb..3a1b7c29d5 100644
--- a/src/generated/java/com/github/copilot/sdk/generated/rpc/ToolsListResult.java
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/ToolsListResult.java
@@ -11,7 +11,6 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-import java.util.Map;
import javax.annotation.processing.Generated;
/**
@@ -24,22 +23,6 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public record ToolsListResult(
/** List of available built-in tools with metadata */
- @JsonProperty("tools") List tools
+ @JsonProperty("tools") List tools
) {
-
- @JsonIgnoreProperties(ignoreUnknown = true)
- @JsonInclude(JsonInclude.Include.NON_NULL)
- public record ToolsListResultToolsItem(
- /** Tool identifier (e.g., "bash", "grep", "str_replace_editor") */
- @JsonProperty("name") String name,
- /** Optional namespaced name for declarative filtering (e.g., "playwright/navigate" for MCP tools) */
- @JsonProperty("namespacedName") String namespacedName,
- /** Description of what the tool does */
- @JsonProperty("description") String description,
- /** JSON Schema for the tool's input parameters */
- @JsonProperty("parameters") Map parameters,
- /** Optional instructions for how to use this tool effectively */
- @JsonProperty("instructions") String instructions
- ) {
- }
}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationResponse.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationResponse.java
new file mode 100644
index 0000000000..058a68c0df
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationResponse.java
@@ -0,0 +1,30 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * The elicitation response (accept with form values, decline, or cancel)
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record UIElicitationResponse(
+ /** The user's response: accept (submitted), decline (rejected), or cancel (dismissed) */
+ @JsonProperty("action") UIElicitationResponseAction action,
+ /** The form values submitted by the user (present when action is 'accept') */
+ @JsonProperty("content") Map content
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationResponseAction.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationResponseAction.java
new file mode 100644
index 0000000000..e4811ef956
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationResponseAction.java
@@ -0,0 +1,37 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import javax.annotation.processing.Generated;
+
+/**
+ * The user's response: accept (submitted), decline (rejected), or cancel (dismissed)
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public enum UIElicitationResponseAction {
+ /** The {@code accept} variant. */
+ ACCEPT("accept"),
+ /** The {@code decline} variant. */
+ DECLINE("decline"),
+ /** The {@code cancel} variant. */
+ CANCEL("cancel");
+
+ private final String value;
+ UIElicitationResponseAction(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static UIElicitationResponseAction fromValue(String value) {
+ for (UIElicitationResponseAction v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown UIElicitationResponseAction value: " + value);
+ }
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationSchema.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationSchema.java
new file mode 100644
index 0000000000..171f5c6883
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/UIElicitationSchema.java
@@ -0,0 +1,33 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.processing.Generated;
+
+/**
+ * JSON Schema describing the form fields to present to the user
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record UIElicitationSchema(
+ /** Schema type indicator (always 'object') */
+ @JsonProperty("type") String type,
+ /** Form field definitions, keyed by field name */
+ @JsonProperty("properties") Map properties,
+ /** List of required field names */
+ @JsonProperty("required") List required
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsCodeChanges.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsCodeChanges.java
new file mode 100644
index 0000000000..442c88da21
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsCodeChanges.java
@@ -0,0 +1,31 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Aggregated code change metrics
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record UsageMetricsCodeChanges(
+ /** Total lines of code added */
+ @JsonProperty("linesAdded") Long linesAdded,
+ /** Total lines of code removed */
+ @JsonProperty("linesRemoved") Long linesRemoved,
+ /** Number of distinct files modified */
+ @JsonProperty("filesModifiedCount") Long filesModifiedCount
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetric.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetric.java
new file mode 100644
index 0000000000..8334872cbb
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetric.java
@@ -0,0 +1,24 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record UsageMetricsModelMetric(
+ /** Request count and cost metrics for this model */
+ @JsonProperty("requests") UsageMetricsModelMetricRequests requests,
+ /** Token usage metrics for this model */
+ @JsonProperty("usage") UsageMetricsModelMetricUsage usage
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetricRequests.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetricRequests.java
new file mode 100644
index 0000000000..ac18ded858
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetricRequests.java
@@ -0,0 +1,29 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request count and cost metrics for this model
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record UsageMetricsModelMetricRequests(
+ /** Number of API requests made with this model */
+ @JsonProperty("count") Long count,
+ /** User-initiated premium request cost (with multiplier applied) */
+ @JsonProperty("cost") Double cost
+) {
+}
diff --git a/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetricUsage.java b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetricUsage.java
new file mode 100644
index 0000000000..f7c556a0f8
--- /dev/null
+++ b/src/generated/java/com/github/copilot/sdk/generated/rpc/UsageMetricsModelMetricUsage.java
@@ -0,0 +1,35 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.sdk.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * Token usage metrics for this model
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record UsageMetricsModelMetricUsage(
+ /** Total input tokens consumed */
+ @JsonProperty("inputTokens") Long inputTokens,
+ /** Total output tokens produced */
+ @JsonProperty("outputTokens") Long outputTokens,
+ /** Total tokens read from prompt cache */
+ @JsonProperty("cacheReadTokens") Long cacheReadTokens,
+ /** Total tokens written to prompt cache */
+ @JsonProperty("cacheWriteTokens") Long cacheWriteTokens,
+ /** Total output tokens used for reasoning */
+ @JsonProperty("reasoningTokens") Long reasoningTokens
+) {
+}
diff --git a/src/main/java/com/github/copilot/sdk/CliServerManager.java b/src/main/java/com/github/copilot/sdk/CliServerManager.java
index 2176999865..07b5eefecc 100644
--- a/src/main/java/com/github/copilot/sdk/CliServerManager.java
+++ b/src/main/java/com/github/copilot/sdk/CliServerManager.java
@@ -83,6 +83,11 @@ ProcessInfo startCliServer() throws IOException, InterruptedException {
args.add("--no-auto-login");
}
+ if (options.getSessionIdleTimeoutSeconds() != null && options.getSessionIdleTimeoutSeconds() > 0) {
+ args.add("--session-idle-timeout");
+ args.add(String.valueOf(options.getSessionIdleTimeoutSeconds()));
+ }
+
List command = resolveCliCommand(cliPath, args);
var pb = new ProcessBuilder(command);
diff --git a/src/main/java/com/github/copilot/sdk/CopilotSession.java b/src/main/java/com/github/copilot/sdk/CopilotSession.java
index b54b2cbf3c..c1374320cd 100644
--- a/src/main/java/com/github/copilot/sdk/CopilotSession.java
+++ b/src/main/java/com/github/copilot/sdk/CopilotSession.java
@@ -32,15 +32,19 @@
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.rpc.SessionCommandsHandlePendingCommandParams;
import com.github.copilot.sdk.generated.rpc.SessionLogParams;
+import com.github.copilot.sdk.generated.rpc.SessionLogLevel;
+import com.github.copilot.sdk.generated.rpc.ModelCapabilitiesOverride;
+import com.github.copilot.sdk.generated.rpc.ModelCapabilitiesOverrideLimits;
+import com.github.copilot.sdk.generated.rpc.ModelCapabilitiesOverrideSupports;
import com.github.copilot.sdk.generated.rpc.SessionModelSwitchToParams;
import com.github.copilot.sdk.generated.rpc.SessionPermissionsHandlePendingPermissionRequestParams;
import com.github.copilot.sdk.generated.rpc.SessionRpc;
import com.github.copilot.sdk.generated.rpc.SessionToolsHandlePendingToolCallParams;
import com.github.copilot.sdk.generated.rpc.SessionUiElicitationParams;
-import com.github.copilot.sdk.generated.rpc.SessionUiElicitationResult;
import com.github.copilot.sdk.generated.rpc.SessionUiHandlePendingElicitationParams;
-import com.github.copilot.sdk.generated.rpc.SessionUiHandlePendingElicitationParams.SessionUiHandlePendingElicitationParamsResult;
-import com.github.copilot.sdk.generated.rpc.SessionUiHandlePendingElicitationParams.SessionUiHandlePendingElicitationParamsResult.SessionUiHandlePendingElicitationParamsResultAction;
+import com.github.copilot.sdk.generated.rpc.UIElicitationResponse;
+import com.github.copilot.sdk.generated.rpc.UIElicitationResponseAction;
+import com.github.copilot.sdk.generated.rpc.UIElicitationSchema;
import com.github.copilot.sdk.generated.CapabilitiesChangedEvent;
import com.github.copilot.sdk.generated.CommandExecuteEvent;
import com.github.copilot.sdk.generated.ElicitationRequestedEvent;
@@ -880,8 +884,7 @@ private void executeToolAndRespondAsync(String requestId, String toolName, Strin
* future completes exceptionally.
*/
private SessionUiHandlePendingElicitationParams buildElicitationCancelParams(String requestId) {
- var cancelResult = new SessionUiHandlePendingElicitationParamsResult(
- SessionUiHandlePendingElicitationParamsResultAction.CANCEL, null);
+ var cancelResult = new UIElicitationResponse(UIElicitationResponseAction.CANCEL, null);
return new SessionUiHandlePendingElicitationParams(sessionId, requestId, cancelResult);
}
@@ -1037,9 +1040,8 @@ private void handleElicitationRequestAsync(ElicitationContext context, String re
String actionStr = result.getAction() != null
? result.getAction().getValue()
: ElicitationResultAction.CANCEL.getValue();
- var parsedAction = SessionUiHandlePendingElicitationParamsResultAction.fromValue(actionStr);
- var elicitationResult = new SessionUiHandlePendingElicitationParamsResult(parsedAction,
- result.getContent());
+ var parsedAction = UIElicitationResponseAction.fromValue(actionStr);
+ var elicitationResult = new UIElicitationResponse(parsedAction, result.getContent());
getRpc().ui.handlePendingElicitation(
new SessionUiHandlePendingElicitationParams(sessionId, requestId, elicitationResult));
} catch (Exception e) {
@@ -1095,9 +1097,8 @@ private final class SessionUiApiImpl implements SessionUiApi {
public CompletableFuture elicitation(ElicitationParams params) {
assertElicitation();
return getRpc().ui.elicitation(new SessionUiElicitationParams(sessionId, params.getMessage(),
- new SessionUiElicitationParams.SessionUiElicitationParamsRequestedSchema(
- params.getRequestedSchema().getType(), params.getRequestedSchema().getProperties(),
- params.getRequestedSchema().getRequired())))
+ new UIElicitationSchema(params.getRequestedSchema().getType(),
+ params.getRequestedSchema().getProperties(), params.getRequestedSchema().getRequired())))
.thenApply(resp -> {
var result = new ElicitationResult();
if (resp.action() != null) {
@@ -1120,14 +1121,10 @@ public CompletableFuture elicitation(ElicitationParams params
public CompletableFuture confirm(String message) {
assertElicitation();
var field = Map.of("type", "boolean", "default", (Object) true);
- return getRpc().ui
- .elicitation(
- new SessionUiElicitationParams(sessionId, message,
- new SessionUiElicitationParams.SessionUiElicitationParamsRequestedSchema("object",
- Map.of("confirmed", (Object) field), List.of("confirmed"))))
+ return getRpc().ui.elicitation(new SessionUiElicitationParams(sessionId, message,
+ new UIElicitationSchema("object", Map.of("confirmed", (Object) field), List.of("confirmed"))))
.thenApply(resp -> {
- if (resp.action() == SessionUiElicitationResult.SessionUiElicitationResultAction.ACCEPT
- && resp.content() != null) {
+ if (resp.action() == UIElicitationResponseAction.ACCEPT && resp.content() != null) {
Object val = resp.content().get("confirmed");
if (val instanceof Boolean b) {
return b;
@@ -1147,14 +1144,10 @@ public CompletableFuture confirm(String message) {
public CompletableFuture select(String message, String[] options) {
assertElicitation();
var field = Map.of("type", (Object) "string", "enum", (Object) options);
- return getRpc().ui
- .elicitation(
- new SessionUiElicitationParams(sessionId, message,
- new SessionUiElicitationParams.SessionUiElicitationParamsRequestedSchema("object",
- Map.of("selection", (Object) field), List.of("selection"))))
+ return getRpc().ui.elicitation(new SessionUiElicitationParams(sessionId, message,
+ new UIElicitationSchema("object", Map.of("selection", (Object) field), List.of("selection"))))
.thenApply(resp -> {
- if (resp.action() == SessionUiElicitationResult.SessionUiElicitationResultAction.ACCEPT
- && resp.content() != null) {
+ if (resp.action() == UIElicitationResponseAction.ACCEPT && resp.content() != null) {
Object val = resp.content().get("selection");
return val != null ? val.toString() : null;
}
@@ -1181,12 +1174,11 @@ public CompletableFuture input(String message, InputOptions options) {
if (options.getDefaultValue() != null)
field.put("default", options.getDefaultValue());
}
- return getRpc().ui.elicitation(new SessionUiElicitationParams(sessionId, message,
- new SessionUiElicitationParams.SessionUiElicitationParamsRequestedSchema("object",
- Map.of("value", (Object) field), List.of("value"))))
+ return getRpc().ui
+ .elicitation(new SessionUiElicitationParams(sessionId, message,
+ new UIElicitationSchema("object", Map.of("value", (Object) field), List.of("value"))))
.thenApply(resp -> {
- if (resp.action() == SessionUiElicitationResult.SessionUiElicitationResultAction.ACCEPT
- && resp.content() != null) {
+ if (resp.action() == UIElicitationResponseAction.ACCEPT && resp.content() != null) {
Object val = resp.content().get("value");
return val != null ? val.toString() : null;
}
@@ -1232,7 +1224,7 @@ CompletableFuture handlePermissionRequest(JsonNode perm
PermissionHandler handler = permissionHandler.get();
if (handler == null) {
PermissionRequestResult result = new PermissionRequestResult();
- result.setKind("denied-no-approval-rule-and-could-not-request-from-user");
+ result.setKind(PermissionRequestResultKind.USER_NOT_AVAILABLE);
return CompletableFuture.completedFuture(result);
}
@@ -1243,13 +1235,13 @@ CompletableFuture handlePermissionRequest(JsonNode perm
return handler.handle(request, invocation).exceptionally(ex -> {
LOG.log(Level.SEVERE, "Permission handler threw an exception", ex);
PermissionRequestResult result = new PermissionRequestResult();
- result.setKind("denied-no-approval-rule-and-could-not-request-from-user");
+ result.setKind(PermissionRequestResultKind.USER_NOT_AVAILABLE);
return result;
});
} catch (Exception e) {
LOG.log(Level.SEVERE, "Failed to process permission request", e);
PermissionRequestResult result = new PermissionRequestResult();
- result.setKind("denied-no-approval-rule-and-could-not-request-from-user");
+ result.setKind(PermissionRequestResultKind.USER_NOT_AVAILABLE);
return CompletableFuture.completedFuture(result);
}
}
@@ -1582,21 +1574,19 @@ public CompletableFuture setModel(String model, String reasoningEffort) {
public CompletableFuture setModel(String model, String reasoningEffort,
com.github.copilot.sdk.json.ModelCapabilitiesOverride modelCapabilities) {
ensureNotTerminated();
- SessionModelSwitchToParams.SessionModelSwitchToParamsModelCapabilities generatedCapabilities = null;
+ ModelCapabilitiesOverride generatedCapabilities = null;
if (modelCapabilities != null) {
- SessionModelSwitchToParams.SessionModelSwitchToParamsModelCapabilities.SessionModelSwitchToParamsModelCapabilitiesSupports supports = null;
+ ModelCapabilitiesOverrideSupports supports = null;
if (modelCapabilities.getSupports() != null) {
var s = modelCapabilities.getSupports();
- supports = new SessionModelSwitchToParams.SessionModelSwitchToParamsModelCapabilities.SessionModelSwitchToParamsModelCapabilitiesSupports(
- s.getVision(), s.getReasoningEffort());
+ supports = new ModelCapabilitiesOverrideSupports(s.getVision(), s.getReasoningEffort());
}
- SessionModelSwitchToParams.SessionModelSwitchToParamsModelCapabilities.SessionModelSwitchToParamsModelCapabilitiesLimits limits = null;
+ ModelCapabilitiesOverrideLimits limits = null;
if (modelCapabilities.getLimits() != null) {
limits = new ObjectMapper().convertValue(modelCapabilities.getLimits(),
- SessionModelSwitchToParams.SessionModelSwitchToParamsModelCapabilities.SessionModelSwitchToParamsModelCapabilitiesLimits.class);
+ ModelCapabilitiesOverrideLimits.class);
}
- generatedCapabilities = new SessionModelSwitchToParams.SessionModelSwitchToParamsModelCapabilities(supports,
- limits);
+ generatedCapabilities = new ModelCapabilitiesOverride(supports, limits);
}
return getRpc().model
.switchTo(new SessionModelSwitchToParams(sessionId, model, reasoningEffort, generatedCapabilities))
@@ -1658,12 +1648,12 @@ public CompletableFuture setModel(String model) {
*/
public CompletableFuture log(String message, String level, Boolean ephemeral, String url) {
ensureNotTerminated();
- SessionLogParams.SessionLogParamsLevel rpcLevel = null;
+ SessionLogLevel rpcLevel = null;
if (level != null) {
try {
- rpcLevel = SessionLogParams.SessionLogParamsLevel.fromValue(level);
+ rpcLevel = SessionLogLevel.fromValue(level);
} catch (IllegalArgumentException e) {
- rpcLevel = SessionLogParams.SessionLogParamsLevel.INFO;
+ rpcLevel = SessionLogLevel.INFO;
}
}
return getRpc().log(new SessionLogParams(sessionId, message, rpcLevel, ephemeral, url)).thenApply(r -> null);
diff --git a/src/main/java/com/github/copilot/sdk/SessionRequestBuilder.java b/src/main/java/com/github/copilot/sdk/SessionRequestBuilder.java
index f20b0a21fc..de6977ea8d 100644
--- a/src/main/java/com/github/copilot/sdk/SessionRequestBuilder.java
+++ b/src/main/java/com/github/copilot/sdk/SessionRequestBuilder.java
@@ -118,6 +118,7 @@ static CreateSessionRequest buildCreateRequest(SessionConfig config, String sess
request.setIncludeSubAgentStreamingEvents(config.getIncludeSubAgentStreamingEvents());
request.setMcpServers(config.getMcpServers());
request.setCustomAgents(config.getCustomAgents());
+ request.setDefaultAgent(config.getDefaultAgent());
request.setAgent(config.getAgent());
request.setInfiniteSessions(config.getInfiniteSessions());
request.setSkillDirectories(config.getSkillDirectories());
@@ -135,6 +136,7 @@ static CreateSessionRequest buildCreateRequest(SessionConfig config, String sess
if (config.getOnElicitationRequest() != null) {
request.setRequestElicitation(true);
}
+ request.setGitHubToken(config.getGitHubToken());
return request;
}
@@ -194,6 +196,7 @@ static ResumeSessionRequest buildResumeRequest(String sessionId, ResumeSessionCo
request.setIncludeSubAgentStreamingEvents(config.getIncludeSubAgentStreamingEvents());
request.setMcpServers(config.getMcpServers());
request.setCustomAgents(config.getCustomAgents());
+ request.setDefaultAgent(config.getDefaultAgent());
request.setAgent(config.getAgent());
request.setSkillDirectories(config.getSkillDirectories());
request.setDisabledSkills(config.getDisabledSkills());
@@ -209,6 +212,7 @@ static ResumeSessionRequest buildResumeRequest(String sessionId, ResumeSessionCo
if (config.getOnElicitationRequest() != null) {
request.setRequestElicitation(true);
}
+ request.setGitHubToken(config.getGitHubToken());
return request;
}
diff --git a/src/main/java/com/github/copilot/sdk/json/CopilotClientOptions.java b/src/main/java/com/github/copilot/sdk/json/CopilotClientOptions.java
index 2e9a804563..3a14d17335 100644
--- a/src/main/java/com/github/copilot/sdk/json/CopilotClientOptions.java
+++ b/src/main/java/com/github/copilot/sdk/json/CopilotClientOptions.java
@@ -52,6 +52,7 @@ public class CopilotClientOptions {
private Supplier>> onListModels;
private int port;
private TelemetryConfig telemetry;
+ private Integer sessionIdleTimeoutSeconds;
private Boolean useLoggedInUser;
private boolean useStdio = true;
@@ -430,6 +431,37 @@ public CopilotClientOptions setTelemetry(TelemetryConfig telemetry) {
return this;
}
+ /**
+ * Gets the server-wide idle timeout for sessions in seconds.
+ *
+ * @return the session idle timeout in seconds, or {@code null} to disable
+ * (sessions live indefinitely)
+ * @since 1.3.0
+ */
+ public Integer getSessionIdleTimeoutSeconds() {
+ return sessionIdleTimeoutSeconds;
+ }
+
+ /**
+ * Sets the server-wide idle timeout for sessions in seconds.
+ *
+ * Sessions without activity for this duration are automatically cleaned up. Set
+ * to {@code 0} or leave as {@code null} to disable (sessions live
+ * indefinitely).
+ *
+ * This option is only used when the SDK spawns the CLI process; it is ignored
+ * when connecting to an external server via {@link #setCliUrl(String)}.
+ *
+ * @param sessionIdleTimeoutSeconds
+ * the idle timeout in seconds, or {@code null} to disable
+ * @return this options instance for method chaining
+ * @since 1.3.0
+ */
+ public CopilotClientOptions setSessionIdleTimeoutSeconds(Integer sessionIdleTimeoutSeconds) {
+ this.sessionIdleTimeoutSeconds = sessionIdleTimeoutSeconds;
+ return this;
+ }
+
/**
* Returns whether to use the logged-in user for authentication.
*
@@ -508,6 +540,7 @@ public CopilotClientOptions clone() {
copy.logLevel = this.logLevel;
copy.onListModels = this.onListModels;
copy.port = this.port;
+ copy.sessionIdleTimeoutSeconds = this.sessionIdleTimeoutSeconds;
copy.telemetry = this.telemetry;
copy.useLoggedInUser = this.useLoggedInUser;
copy.useStdio = this.useStdio;
diff --git a/src/main/java/com/github/copilot/sdk/json/CreateSessionRequest.java b/src/main/java/com/github/copilot/sdk/json/CreateSessionRequest.java
index 25e777d1ae..ef8d5fda2d 100644
--- a/src/main/java/com/github/copilot/sdk/json/CreateSessionRequest.java
+++ b/src/main/java/com/github/copilot/sdk/json/CreateSessionRequest.java
@@ -79,6 +79,9 @@ public final class CreateSessionRequest {
@JsonProperty("customAgents")
private List customAgents;
+ @JsonProperty("defaultAgent")
+ private DefaultAgentConfig defaultAgent;
+
@JsonProperty("agent")
private String agent;
@@ -106,6 +109,9 @@ public final class CreateSessionRequest {
@JsonProperty("modelCapabilities")
private ModelCapabilitiesOverride modelCapabilities;
+ @JsonProperty("gitHubToken")
+ private String gitHubToken;
+
/** Gets the model name. @return the model */
public String getModel() {
return model;
@@ -278,6 +284,18 @@ public void setCustomAgents(List customAgents) {
this.customAgents = customAgents;
}
+ /** Gets the default agent config. @return the default agent config */
+ public DefaultAgentConfig getDefaultAgent() {
+ return defaultAgent;
+ }
+
+ /**
+ * Sets the default agent config. @param defaultAgent the default agent config
+ */
+ public void setDefaultAgent(DefaultAgentConfig defaultAgent) {
+ this.defaultAgent = defaultAgent;
+ }
+
/** Gets the pre-selected agent name. @return the agent name */
public String getAgent() {
return agent;
@@ -382,4 +400,17 @@ public ModelCapabilitiesOverride getModelCapabilities() {
public void setModelCapabilities(ModelCapabilitiesOverride modelCapabilities) {
this.modelCapabilities = modelCapabilities;
}
+
+ /** Gets the GitHub token for per-session authentication. @return the token */
+ public String getGitHubToken() {
+ return gitHubToken;
+ }
+
+ /**
+ * Sets the GitHub token for per-session authentication. @param gitHubToken the
+ * token
+ */
+ public void setGitHubToken(String gitHubToken) {
+ this.gitHubToken = gitHubToken;
+ }
}
diff --git a/src/main/java/com/github/copilot/sdk/json/DefaultAgentConfig.java b/src/main/java/com/github/copilot/sdk/json/DefaultAgentConfig.java
new file mode 100644
index 0000000000..88f39ecff9
--- /dev/null
+++ b/src/main/java/com/github/copilot/sdk/json/DefaultAgentConfig.java
@@ -0,0 +1,59 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+package com.github.copilot.sdk.json;
+
+import java.util.Collections;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Configuration for the default agent (the built-in agent that handles turns
+ * when no custom agent is selected).
+ *
+ * Use {@link #setExcludedTools(List)} to hide specific tools from the default
+ * agent while keeping them available to custom sub-agents.
+ *
+ *
Example Usage
+ *
+ * {@code
+ * var config = new SessionConfig().setTools(List.of(secretTool))
+ * .setDefaultAgent(new DefaultAgentConfig().setExcludedTools(List.of("secret_tool")));
+ * }
+ *
+ * @see SessionConfig#setDefaultAgent(DefaultAgentConfig)
+ * @since 1.3.0
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class DefaultAgentConfig {
+
+ @JsonProperty("excludedTools")
+ private List excludedTools;
+
+ /**
+ * Gets the list of tool names excluded from the default agent.
+ *
+ * @return the list of excluded tool names, or {@code null} if not set
+ */
+ public List getExcludedTools() {
+ return excludedTools == null ? null : Collections.unmodifiableList(excludedTools);
+ }
+
+ /**
+ * Sets the list of tool names to exclude from the default agent.
+ *
+ * These tools remain available to custom sub-agents that reference them in
+ * their {@link CustomAgentConfig#setTools(List)} list.
+ *
+ * @param excludedTools
+ * the list of tool names to exclude from the default agent
+ * @return this config for method chaining
+ */
+ public DefaultAgentConfig setExcludedTools(List excludedTools) {
+ this.excludedTools = excludedTools;
+ return this;
+ }
+}
diff --git a/src/main/java/com/github/copilot/sdk/json/PermissionHandler.java b/src/main/java/com/github/copilot/sdk/json/PermissionHandler.java
index 21b822e418..d230748fcf 100644
--- a/src/main/java/com/github/copilot/sdk/json/PermissionHandler.java
+++ b/src/main/java/com/github/copilot/sdk/json/PermissionHandler.java
@@ -20,11 +20,13 @@
* // Check the permission kind
* if ("dangerous-action".equals(request.getKind())) {
* // Deny dangerous actions
- * return CompletableFuture.completedFuture(new PermissionRequestResult().setKind("user-denied"));
+ * return CompletableFuture
+ * .completedFuture(new PermissionRequestResult().setKind(PermissionRequestResultKind.REJECTED));
* }
*
* // Approve other requests
- * return CompletableFuture.completedFuture(new PermissionRequestResult().setKind("user-approved"));
+ * return CompletableFuture
+ * .completedFuture(new PermissionRequestResult().setKind(PermissionRequestResultKind.APPROVED));
* };
* }
*
diff --git a/src/main/java/com/github/copilot/sdk/json/PermissionRequestResultKind.java b/src/main/java/com/github/copilot/sdk/json/PermissionRequestResultKind.java
index 8f30be0929..f782fd76b6 100644
--- a/src/main/java/com/github/copilot/sdk/json/PermissionRequestResultKind.java
+++ b/src/main/java/com/github/copilot/sdk/json/PermissionRequestResultKind.java
@@ -19,13 +19,13 @@
*
* Well-known kinds
*
- * - {@link #APPROVED} — the permission was approved.
- * - {@link #DENIED_BY_RULES} — the permission was denied by policy
- * rules.
- * - {@link #DENIED_COULD_NOT_REQUEST_FROM_USER} — the permission was denied
- * because no approval rule was found and the user could not be prompted.
- * - {@link #DENIED_INTERACTIVELY_BY_USER} — the permission was denied
- * interactively by the user.
+ * - {@link #APPROVED} — the permission was approved for this one
+ * instance.
+ * - {@link #REJECTED} — the permission was denied interactively by the
+ * user.
+ * - {@link #USER_NOT_AVAILABLE} — the permission was denied because user
+ * confirmation was unavailable.
+ * - {@link #NO_RESULT} — no permission decision was made.
*
*
* @see PermissionRequestResult
@@ -33,23 +33,15 @@
*/
public final class PermissionRequestResultKind {
- /** The permission was approved. */
- public static final PermissionRequestResultKind APPROVED = new PermissionRequestResultKind("approved");
-
- /** The permission was denied by policy rules. */
- public static final PermissionRequestResultKind DENIED_BY_RULES = new PermissionRequestResultKind(
- "denied-by-rules");
-
- /**
- * The permission was denied because no approval rule was found and the user
- * could not be prompted.
- */
- public static final PermissionRequestResultKind DENIED_COULD_NOT_REQUEST_FROM_USER = new PermissionRequestResultKind(
- "denied-no-approval-rule-and-could-not-request-from-user");
+ /** The permission was approved for this one instance. */
+ public static final PermissionRequestResultKind APPROVED = new PermissionRequestResultKind("approve-once");
/** The permission was denied interactively by the user. */
- public static final PermissionRequestResultKind DENIED_INTERACTIVELY_BY_USER = new PermissionRequestResultKind(
- "denied-interactively-by-user");
+ public static final PermissionRequestResultKind REJECTED = new PermissionRequestResultKind("reject");
+
+ /** The permission was denied because user confirmation was unavailable. */
+ public static final PermissionRequestResultKind USER_NOT_AVAILABLE = new PermissionRequestResultKind(
+ "user-not-available");
/**
* Leaves the pending permission request unanswered.
@@ -66,6 +58,24 @@ public final class PermissionRequestResultKind {
*/
public static final PermissionRequestResultKind NO_RESULT = new PermissionRequestResultKind("no-result");
+ /**
+ * @deprecated Use {@link #REJECTED} instead.
+ */
+ @Deprecated
+ public static final PermissionRequestResultKind DENIED_INTERACTIVELY_BY_USER = REJECTED;
+
+ /**
+ * @deprecated Use {@link #USER_NOT_AVAILABLE} instead.
+ */
+ @Deprecated
+ public static final PermissionRequestResultKind DENIED_COULD_NOT_REQUEST_FROM_USER = USER_NOT_AVAILABLE;
+
+ /**
+ * @deprecated Use {@link #USER_NOT_AVAILABLE} instead.
+ */
+ @Deprecated
+ public static final PermissionRequestResultKind DENIED_BY_RULES = USER_NOT_AVAILABLE;
+
private final String value;
/**
diff --git a/src/main/java/com/github/copilot/sdk/json/ResumeSessionConfig.java b/src/main/java/com/github/copilot/sdk/json/ResumeSessionConfig.java
index c3199c3176..b4dacf3702 100644
--- a/src/main/java/com/github/copilot/sdk/json/ResumeSessionConfig.java
+++ b/src/main/java/com/github/copilot/sdk/json/ResumeSessionConfig.java
@@ -56,6 +56,7 @@ public class ResumeSessionConfig {
private Boolean includeSubAgentStreamingEvents;
private Map mcpServers;
private List customAgents;
+ private DefaultAgentConfig defaultAgent;
private String agent;
private List skillDirectories;
private List disabledSkills;
@@ -63,6 +64,7 @@ public class ResumeSessionConfig {
private Consumer onEvent;
private List commands;
private ElicitationHandler onElicitationRequest;
+ private String gitHubToken;
/**
* Gets the AI model to use.
@@ -520,6 +522,31 @@ public ResumeSessionConfig setCustomAgents(List customAgents)
return this;
}
+ /**
+ * Gets the default agent configuration.
+ *
+ * @return the default agent configuration, or {@code null} if not set
+ */
+ public DefaultAgentConfig getDefaultAgent() {
+ return defaultAgent;
+ }
+
+ /**
+ * Sets the default agent configuration.
+ *
+ * Use {@link DefaultAgentConfig#setExcludedTools(List)} to hide specific tools
+ * from the default agent while keeping them available to custom sub-agents.
+ *
+ * @param defaultAgent
+ * the default agent configuration
+ * @return this config for method chaining
+ * @see DefaultAgentConfig
+ */
+ public ResumeSessionConfig setDefaultAgent(DefaultAgentConfig defaultAgent) {
+ this.defaultAgent = defaultAgent;
+ return this;
+ }
+
/**
* Gets the name of the custom agent to activate at session start.
*
@@ -684,6 +711,33 @@ public ResumeSessionConfig setOnElicitationRequest(ElicitationHandler onElicitat
return this;
}
+ /**
+ * Gets the GitHub token for per-session authentication.
+ *
+ * @return the GitHub token, or {@code null} if not set
+ * @since 1.3.0
+ */
+ public String getGitHubToken() {
+ return gitHubToken;
+ }
+
+ /**
+ * Sets the GitHub token for per-session authentication.
+ *
+ * When provided, the runtime resolves this token into a full GitHub identity
+ * and stores it on the session for content exclusion, model routing, and quota
+ * checks.
+ *
+ * @param gitHubToken
+ * the GitHub token for per-session authentication
+ * @return this config for method chaining
+ * @since 1.3.0
+ */
+ public ResumeSessionConfig setGitHubToken(String gitHubToken) {
+ this.gitHubToken = gitHubToken;
+ return this;
+ }
+
/**
* Creates a shallow clone of this {@code ResumeSessionConfig} instance.
*
@@ -718,6 +772,7 @@ public ResumeSessionConfig clone() {
copy.includeSubAgentStreamingEvents = this.includeSubAgentStreamingEvents;
copy.mcpServers = this.mcpServers != null ? new java.util.HashMap<>(this.mcpServers) : null;
copy.customAgents = this.customAgents != null ? new ArrayList<>(this.customAgents) : null;
+ copy.defaultAgent = this.defaultAgent;
copy.agent = this.agent;
copy.skillDirectories = this.skillDirectories != null ? new ArrayList<>(this.skillDirectories) : null;
copy.disabledSkills = this.disabledSkills != null ? new ArrayList<>(this.disabledSkills) : null;
@@ -725,6 +780,7 @@ public ResumeSessionConfig clone() {
copy.onEvent = this.onEvent;
copy.commands = this.commands != null ? new ArrayList<>(this.commands) : null;
copy.onElicitationRequest = this.onElicitationRequest;
+ copy.gitHubToken = this.gitHubToken;
return copy;
}
}
diff --git a/src/main/java/com/github/copilot/sdk/json/ResumeSessionRequest.java b/src/main/java/com/github/copilot/sdk/json/ResumeSessionRequest.java
index 77d00b24db..e36e90b675 100644
--- a/src/main/java/com/github/copilot/sdk/json/ResumeSessionRequest.java
+++ b/src/main/java/com/github/copilot/sdk/json/ResumeSessionRequest.java
@@ -89,6 +89,9 @@ public final class ResumeSessionRequest {
@JsonProperty("customAgents")
private List customAgents;
+ @JsonProperty("defaultAgent")
+ private DefaultAgentConfig defaultAgent;
+
@JsonProperty("agent")
private String agent;
@@ -110,6 +113,9 @@ public final class ResumeSessionRequest {
@JsonProperty("modelCapabilities")
private ModelCapabilitiesOverride modelCapabilities;
+ @JsonProperty("gitHubToken")
+ private String gitHubToken;
+
/** Gets the session ID. @return the session ID */
public String getSessionId() {
return sessionId;
@@ -328,6 +334,18 @@ public void setCustomAgents(List customAgents) {
this.customAgents = customAgents;
}
+ /** Gets the default agent config. @return the default agent config */
+ public DefaultAgentConfig getDefaultAgent() {
+ return defaultAgent;
+ }
+
+ /**
+ * Sets the default agent config. @param defaultAgent the default agent config
+ */
+ public void setDefaultAgent(DefaultAgentConfig defaultAgent) {
+ this.defaultAgent = defaultAgent;
+ }
+
/** Gets the pre-selected agent name. @return the agent name */
public String getAgent() {
return agent;
@@ -402,4 +420,17 @@ public ModelCapabilitiesOverride getModelCapabilities() {
public void setModelCapabilities(ModelCapabilitiesOverride modelCapabilities) {
this.modelCapabilities = modelCapabilities;
}
+
+ /** Gets the GitHub token for per-session authentication. @return the token */
+ public String getGitHubToken() {
+ return gitHubToken;
+ }
+
+ /**
+ * Sets the GitHub token for per-session authentication. @param gitHubToken the
+ * token
+ */
+ public void setGitHubToken(String gitHubToken) {
+ this.gitHubToken = gitHubToken;
+ }
}
diff --git a/src/main/java/com/github/copilot/sdk/json/SessionConfig.java b/src/main/java/com/github/copilot/sdk/json/SessionConfig.java
index 997da51168..09661346a2 100644
--- a/src/main/java/com/github/copilot/sdk/json/SessionConfig.java
+++ b/src/main/java/com/github/copilot/sdk/json/SessionConfig.java
@@ -53,6 +53,7 @@ public class SessionConfig {
private Boolean includeSubAgentStreamingEvents;
private Map mcpServers;
private List customAgents;
+ private DefaultAgentConfig defaultAgent;
private String agent;
private InfiniteSessionConfig infiniteSessions;
private List skillDirectories;
@@ -63,6 +64,7 @@ public class SessionConfig {
private Consumer onEvent;
private List commands;
private ElicitationHandler onElicitationRequest;
+ private String gitHubToken;
/**
* Gets the custom session ID.
@@ -448,6 +450,31 @@ public SessionConfig setCustomAgents(List customAgents) {
return this;
}
+ /**
+ * Gets the default agent configuration.
+ *
+ * @return the default agent configuration, or {@code null} if not set
+ */
+ public DefaultAgentConfig getDefaultAgent() {
+ return defaultAgent;
+ }
+
+ /**
+ * Sets the default agent configuration.
+ *
+ * Use {@link DefaultAgentConfig#setExcludedTools(List)} to hide specific tools
+ * from the default agent while keeping them available to custom sub-agents.
+ *
+ * @param defaultAgent
+ * the default agent configuration
+ * @return this config instance for method chaining
+ * @see DefaultAgentConfig
+ */
+ public SessionConfig setDefaultAgent(DefaultAgentConfig defaultAgent) {
+ this.defaultAgent = defaultAgent;
+ return this;
+ }
+
/**
* Gets the name of the custom agent to activate at session start.
*
@@ -736,6 +763,33 @@ public SessionConfig setOnElicitationRequest(ElicitationHandler onElicitationReq
return this;
}
+ /**
+ * Gets the GitHub token for per-session authentication.
+ *
+ * @return the GitHub token, or {@code null} if not set
+ * @since 1.3.0
+ */
+ public String getGitHubToken() {
+ return gitHubToken;
+ }
+
+ /**
+ * Sets the GitHub token for per-session authentication.
+ *
+ * When provided, the runtime resolves this token into a full GitHub identity
+ * and stores it on the session for content exclusion, model routing, and quota
+ * checks.
+ *
+ * @param gitHubToken
+ * the GitHub token for per-session authentication
+ * @return this config instance for method chaining
+ * @since 1.3.0
+ */
+ public SessionConfig setGitHubToken(String gitHubToken) {
+ this.gitHubToken = gitHubToken;
+ return this;
+ }
+
/**
* Creates a shallow clone of this {@code SessionConfig} instance.
*
@@ -767,6 +821,7 @@ public SessionConfig clone() {
copy.includeSubAgentStreamingEvents = this.includeSubAgentStreamingEvents;
copy.mcpServers = this.mcpServers != null ? new java.util.HashMap<>(this.mcpServers) : null;
copy.customAgents = this.customAgents != null ? new ArrayList<>(this.customAgents) : null;
+ copy.defaultAgent = this.defaultAgent;
copy.agent = this.agent;
copy.infiniteSessions = this.infiniteSessions;
copy.skillDirectories = this.skillDirectories != null ? new ArrayList<>(this.skillDirectories) : null;
@@ -777,6 +832,7 @@ public SessionConfig clone() {
copy.onEvent = this.onEvent;
copy.commands = this.commands != null ? new ArrayList<>(this.commands) : null;
copy.onElicitationRequest = this.onElicitationRequest;
+ copy.gitHubToken = this.gitHubToken;
return copy;
}
}
diff --git a/src/site/markdown/advanced.md b/src/site/markdown/advanced.md
index 1209e2578f..a4c4d830ad 100644
--- a/src/site/markdown/advanced.md
+++ b/src/site/markdown/advanced.md
@@ -753,10 +753,10 @@ The `PermissionRequestResultKind` class provides well-known constants for common
| Constant | Value | Meaning |
|---|---|---|
-| `PermissionRequestResultKind.APPROVED` | `"approved"` | The permission was approved |
-| `PermissionRequestResultKind.DENIED_BY_RULES` | `"denied-by-rules"` | Denied by policy rules |
-| `PermissionRequestResultKind.DENIED_COULD_NOT_REQUEST_FROM_USER` | `"denied-no-approval-rule-and-could-not-request-from-user"` | No rule and user could not be prompted |
-| `PermissionRequestResultKind.DENIED_INTERACTIVELY_BY_USER` | `"denied-interactively-by-user"` | User denied interactively |
+| `PermissionRequestResultKind.APPROVED` | `"approve-once"` | The permission was approved for this one instance |
+| `PermissionRequestResultKind.REJECTED` | `"reject"` | The permission was denied interactively by the user |
+| `PermissionRequestResultKind.USER_NOT_AVAILABLE` | `"user-not-available"` | Denied because user confirmation was unavailable |
+| `PermissionRequestResultKind.NO_RESULT` | `"no-result"` | No permission decision was made (protocol v3 only) |
You can also pass a raw string to `setKind(String)` for custom or extension values. Use
[`PermissionHandler.APPROVE_ALL`](apidocs/com/github/copilot/sdk/json/PermissionHandler.html) to approve all
diff --git a/src/site/markdown/cookbook/error-handling.md b/src/site/markdown/cookbook/error-handling.md
index 5272b44b87..4fffd2ba0d 100644
--- a/src/site/markdown/cookbook/error-handling.md
+++ b/src/site/markdown/cookbook/error-handling.md
@@ -30,7 +30,7 @@ jbang BasicErrorHandling.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -64,7 +64,7 @@ public class BasicErrorHandling {
## Handling specific error types
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import java.util.concurrent.ExecutionException;
@@ -99,7 +99,7 @@ public class SpecificErrorHandling {
## Timeout handling
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotSession;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -130,7 +130,7 @@ public class TimeoutHandling {
## Aborting a request
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotSession;
import com.github.copilot.sdk.json.MessageOptions;
import java.util.concurrent.Executors;
@@ -162,7 +162,7 @@ public class AbortRequest {
## Graceful shutdown
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
public class GracefulShutdown {
@@ -192,7 +192,7 @@ public class GracefulShutdown {
## Try-with-resources pattern
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -224,7 +224,7 @@ public class TryWithResources {
## Handling tool errors
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
diff --git a/src/site/markdown/cookbook/managing-local-files.md b/src/site/markdown/cookbook/managing-local-files.md
index 1deb78a51a..723d9b1059 100644
--- a/src/site/markdown/cookbook/managing-local-files.md
+++ b/src/site/markdown/cookbook/managing-local-files.md
@@ -34,7 +34,7 @@ jbang ManagingLocalFiles.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.SessionIdleEvent;
@@ -161,7 +161,7 @@ session.send(new MessageOptions().setPrompt(prompt));
## Interactive file organization
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import java.io.BufferedReader;
import java.io.InputStreamReader;
diff --git a/src/site/markdown/cookbook/multiple-sessions.md b/src/site/markdown/cookbook/multiple-sessions.md
index 8c95660d2b..c7ac909f18 100644
--- a/src/site/markdown/cookbook/multiple-sessions.md
+++ b/src/site/markdown/cookbook/multiple-sessions.md
@@ -30,7 +30,7 @@ jbang MultipleSessions.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -123,7 +123,7 @@ try {
## Managing session lifecycle with CompletableFuture
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import java.util.concurrent.CompletableFuture;
import java.util.List;
diff --git a/src/site/markdown/cookbook/persisting-sessions.md b/src/site/markdown/cookbook/persisting-sessions.md
index fb00e7f510..de50001fcf 100644
--- a/src/site/markdown/cookbook/persisting-sessions.md
+++ b/src/site/markdown/cookbook/persisting-sessions.md
@@ -30,7 +30,7 @@ jbang PersistingSessions.java
**Code:**
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.json.MessageOptions;
@@ -127,7 +127,7 @@ public class DeleteSession {
## Getting session history
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.UserMessageEvent;
@@ -162,7 +162,7 @@ public class SessionHistory {
## Complete example with session management
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import java.util.Scanner;
public class SessionManager {
diff --git a/src/site/markdown/cookbook/pr-visualization.md b/src/site/markdown/cookbook/pr-visualization.md
index c0923e2262..40d7cde768 100644
--- a/src/site/markdown/cookbook/pr-visualization.md
+++ b/src/site/markdown/cookbook/pr-visualization.md
@@ -34,7 +34,7 @@ jbang PRVisualization.java github/copilot-sdk
## Full example: PRVisualization.java
```java
-//DEPS com.github:copilot-sdk-java:0.3.0-java-preview.1-java-preview.0
+//DEPS com.github:copilot-sdk-java:0.3.0-java.2
import com.github.copilot.sdk.CopilotClient;
import com.github.copilot.sdk.generated.AssistantMessageEvent;
import com.github.copilot.sdk.generated.ToolExecutionStartEvent;
diff --git a/src/test/java/com/github/copilot/sdk/CapiProxy.java b/src/test/java/com/github/copilot/sdk/CapiProxy.java
index bcd064d949..30f8434363 100644
--- a/src/test/java/com/github/copilot/sdk/CapiProxy.java
+++ b/src/test/java/com/github/copilot/sdk/CapiProxy.java
@@ -219,6 +219,54 @@ public List