Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions dotnet/src/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1480,15 +1480,6 @@ public async Task<CopilotSession> ResumeSessionAsync(string sessionId, ResumeSes
session.SetCapabilities(response.Capabilities);
session.SetOpenCanvases(response.OpenCanvases);

if (config.McpServers is not null)
{
await InvokeRpcAsync<JsonElement>(
connection.Rpc,
"session.mcp.reloadWithConfig",
[new ReloadMcpServersRequest(sessionId, new ReloadMcpServersConfig(config.McpServers))],
cancellationToken);
}

if (config.OnMcpAuthRequest is not null)
{
await session.Rpc.EventLog.RegisterInterestAsync("mcp.oauth_required", cancellationToken);
Expand Down Expand Up @@ -2961,13 +2952,6 @@ internal record ResumeSessionResponse(
IList<OpenCanvasInstance>? OpenCanvases = null);
#pragma warning restore GHCP001

internal record ReloadMcpServersRequest(
string SessionId,
ReloadMcpServersConfig Config);

internal record ReloadMcpServersConfig(
IDictionary<string, McpServerConfig> McpServers);

internal record CommandWireDefinition(
string Name,
string Description);
Expand Down Expand Up @@ -3044,8 +3028,6 @@ internal record HooksInvokeResponse(
[JsonSerializable(typeof(CapiSessionOptions))]
[JsonSerializable(typeof(NamedProviderConfig))]
[JsonSerializable(typeof(ProviderModelConfig))]
[JsonSerializable(typeof(ReloadMcpServersConfig))]
[JsonSerializable(typeof(ReloadMcpServersRequest))]
[JsonSerializable(typeof(SessionLimitsConfig))]
[JsonSerializable(typeof(ResumeSessionRequest))]
[JsonSerializable(typeof(ResumeSessionResponse))]
Expand Down
21 changes: 13 additions & 8 deletions dotnet/src/Generated/Rpc.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dotnet/test/E2E/RpcServerMiscE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public async Task Should_Login_List_GetCurrentAuth_And_Logout_Account()
var initial = await client.Rpc.Account.GetCurrentAuthAsync();
Assert.Null(initial.AuthInfo);

var loginResult = await client.Rpc.Account.LoginAsync("https://github.com", login, token);
var loginResult = await client.Rpc.Account.LoginAsync("https://github.com", token, login);
Assert.NotNull(loginResult);

var current = await client.Rpc.Account.GetCurrentAuthAsync();
Expand Down
13 changes: 0 additions & 13 deletions go/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1356,19 +1356,6 @@ func (c *Client) ResumeSessionWithOptions(ctx context.Context, sessionID string,
return nil, fmt.Errorf("failed to unmarshal response: %w", err)
}

if config.MCPServers != nil {
internalSessionRPC := rpc.NewInternalSessionRPC(c.client, sessionID)
_, err := internalSessionRPC.MCP.ReloadWithConfig(ctx, &rpc.MCPReloadWithConfigRequest{
Config: map[string]any{"mcpServers": config.MCPServers},
})
if err != nil {
c.sessionsMux.Lock()
delete(c.sessions, sessionID)
c.sessionsMux.Unlock()
return nil, fmt.Errorf("failed to reload MCP servers after resume: %w", err)
}
}

if config.OnMCPAuthRequest != nil {
if _, err := c.client.Request(ctx, "session.eventLog.registerInterest", map[string]any{
"sessionId": sessionID,
Expand Down
2 changes: 1 addition & 1 deletion go/internal/e2e/rpc_server_misc_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func TestRpcServerMisc(t *testing.T) {

login, err := client.RPC.Account.Login(t.Context(), &rpc.AccountLoginRequest{
Host: "https://github.com",
Login: "go-account-user",
Login: rpcPtr("go-account-user"),
Token: "go-account-token",
})
if err != nil {
Expand Down
18 changes: 13 additions & 5 deletions go/rpc/zrpc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
DO NOT EDIT MANUALLY. Updated by the update-copilot-dependency
workflow.
-->
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.81-5</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>
<readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.81-6</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>
<!-- The parent POM is not published to Maven Central. -->
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
Expand Down
72 changes: 36 additions & 36 deletions java/scripts/codegen/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion java/scripts/codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"generate:java": "tsx java.ts"
},
"dependencies": {
"@github/copilot": "^1.0.81-5",
"@github/copilot": "^1.0.81-6",
"json-schema": "^0.4.0",
"tsx": "^4.23.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;

/**
* Credentials to store after successful authentication
* Credentials to validate and store. Omit login to resolve the authenticated user from the token.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
Expand All @@ -26,7 +26,7 @@
public record AccountLoginParams(
/** GitHub host URL */
@JsonProperty("host") String host,
/** User login/username */
/** User login/username. When omitted, the runtime validates the token and resolves the login from GitHub. */
@JsonProperty("login") String login,
Comment thread
stephentoub marked this conversation as resolved.
/** GitHub authentication token */
@JsonProperty("token") String token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public enum PermissionModeSource {
SLASH_COMMAND("slash_command"),
/** The {@code autopilot_confirmation} variant. */
AUTOPILOT_CONFIRMATION("autopilot_confirmation"),
/** The {@code user_setting} variant. */
USER_SETTING("user_setting"),
/** The {@code rpc} variant. */
RPC("rpc");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public enum PermissionsSetApproveAllSource {
SLASH_COMMAND("slash_command"),
/** The {@code autopilot_confirmation} variant. */
AUTOPILOT_CONFIRMATION("autopilot_confirmation"),
/** The {@code user_setting} variant. */
USER_SETTING("user_setting"),
/** The {@code rpc} variant. */
RPC("rpc");

Expand Down
Loading
Loading