diff --git a/docs/features/mcp.md b/docs/features/mcp.md index caac633275..a111040cf9 100644 --- a/docs/features/mcp.md +++ b/docs/features/mcp.md @@ -24,6 +24,73 @@ The SDK supports two types of MCP servers: | **Local/Stdio** | Runs as a subprocess, communicates via stdin/stdout | Local tools, file access, custom scripts | | **HTTP/SSE** | Remote server accessed via HTTP | Shared services, cloud-hosted tools | +## Copilot Connectors + +The experimental Connector session API lets SDK hosts offer the same non-UI +Connector flow as Copilot CLI. The runtime owns catalog validation, GitHub +authorization, bounded connection polling, MCP projection, and authoritative +same-session reconciliation. The SDK host owns account selection, browser +opening, confirmation, and presentation. + +Use `mcpServers` for MCP servers that your application configures directly. +Use the Connector API for service-backed catalog entries whose connection and +session lifecycle the runtime manages. + +Start with capability detection. When availability is `enabled`, obtain the +opaque account ID from your host's account-selection flow, list the catalog, +reconcile already-connected entries, and drive the typed connection result: + + + +```typescript +async function connectConnector(session, accountId, openConsentUrl) { + const capabilities = await session.rpc.connectors.getCapabilities(); + if (capabilities.availability !== "enabled") return; + + const catalog = await session.rpc.connectors.list({ accountId }); + await session.rpc.connectors.reconcile({ accountId }); + const connectorName = await chooseConnector(catalog.connectors); + + const result = await session.rpc.connectors.connect({ + accountId, + connectorName, + }); + if (result.kind === "consent_required") { + await openConsentUrl(result.consentUrl); + } + if (result.kind !== "connected") { + await session.rpc.connectors.continueConnection({ + continuationId: result.continuationId, + maxAttempts: Math.min(30, capabilities.maxPollAttempts), + pollIntervalMs: Math.min(2_000, capabilities.maxPollIntervalMs), + deadlineMs: Math.min(60_000, capabilities.maxDeadlineMs), + }); + } +} +``` + +The generated API also exposes `refresh`, `reconnect`, `disconnect`, +`getStatus`, and `reconcile`. Connect and continuation results are discriminated +as `connected`, `consent_required`, or `pending`. Disconnect and reconcile +return authoritative session state, including live Connector-owned MCP status. +Account IDs and continuation IDs are opaque. The host obtains the account ID +through its existing account-selection flow and passes only that identifier to +Connector methods; credentials and provider tokens never appear in Connector +DTOs. + +| SDK | Connector API | +| --- | --- | +| Node.js | `session.rpc.connectors` | +| Python | `session.rpc.connectors` | +| Go | `session.RPC.Connectors` | +| .NET | `session.Rpc.Connectors` | +| Java | `session.getRpc().connectors` | +| Rust | `session.rpc().connectors()` | + +> [!NOTE] +> Connector support is experimental and may be unavailable in some runtime +> versions. Always call the capability method before using the API. + ## Configuration ### Node.js / TypeScript diff --git a/dotnet/README.md b/dotnet/README.md index 0e764b6c2d..dd9e70c8c1 100644 --- a/dotnet/README.md +++ b/dotnet/README.md @@ -77,6 +77,44 @@ tool name is `-`. For `AvailableTools` and `mcp:-`. For `CustomAgents[].Tools` and `DefaultAgent.ExcludedTools`, use `-` directly. +## Experimental Connector API + +`session.Rpc.Connectors` exposes the runtime-owned Connector catalog and +lifecycle. The API is experimental, so call `GetCapabilitiesAsync()` first and +use the remaining methods only when availability is enabled. + +```csharp +using GitHub.Copilot.Rpc; + +const string accountId = "opaque-account-selection-id"; +var connectors = session.Rpc.Connectors; +var capabilities = await connectors.GetCapabilitiesAsync(); + +if (capabilities.Availability == ConnectorAvailability.Enabled) +{ + var catalog = await connectors.ListAsync(accountId); + await connectors.ReconcileAsync(accountId); + var result = await connectors.ConnectAsync(accountId, catalog.Connectors[0].Name); + + if (result is ConnectorConnectResultConsentRequired consent) + { + OpenBrowser(consent.ConsentUrl); + result = await connectors.ContinueConnectionAsync( + consent.ContinuationId, + maxAttempts: capabilities.MaxPollAttempts, + pollIntervalMs: capabilities.MaxPollIntervalMs, + deadlineMs: capabilities.MaxDeadlineMs); + } +} +``` + +The nine experimental methods are `GetCapabilitiesAsync`, `GetStatusAsync`, +`ListAsync`, `RefreshAsync`, `ConnectAsync`, `ReconnectAsync`, +`ContinueConnectionAsync`, `DisconnectAsync`, and `ReconcileAsync`. The host +selects the opaque GitHub account and handles consent UI. Connector methods +accept only that account ID, never credentials or provider tokens; credentials +and MCP projection remain runtime-owned. + ## API Reference ### CopilotClient diff --git a/dotnet/test/Unit/ClientSessionLifetimeTests.cs b/dotnet/test/Unit/ClientSessionLifetimeTests.cs index 3ae2493a8d..ee5fb10bb7 100644 --- a/dotnet/test/Unit/ClientSessionLifetimeTests.cs +++ b/dotnet/test/Unit/ClientSessionLifetimeTests.cs @@ -2465,6 +2465,8 @@ public static Task StartAsync() public Func? AfterResponseAsync { get; set; } + public Func? ResponseFactory { get; set; } + public IReadOnlyList Requests { get @@ -2779,6 +2781,7 @@ private async Task HandleRequestAsync(Stream stream, JsonElement request, Cancel }, "session.detach" => await DetachSessionAsync(cancellationToken), "runtime.shutdown" => HandleRuntimeShutdown(), + _ when ResponseFactory is { } responseFactory => responseFactory(requestRecord), _ => throw new InvalidOperationException($"Unexpected RPC method '{method}'.") }; diff --git a/dotnet/test/Unit/RpcConnectorsTests.cs b/dotnet/test/Unit/RpcConnectorsTests.cs new file mode 100644 index 0000000000..f7304700bd --- /dev/null +++ b/dotnet/test/Unit/RpcConnectorsTests.cs @@ -0,0 +1,297 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +#if NET8_0_OR_GREATER +using System.Text.Json; +using GitHub.Copilot.Rpc; +using Xunit; + +namespace GitHub.Copilot.Test.Unit; + +public sealed partial class ClientSessionLifetimeTests +{ + [Fact] + public async Task Session_Rpc_Connectors_Reports_Capabilities_Status_And_Catalogs() + { + await using var server = await FakeCopilotServer.StartAsync(); + server.ResponseFactory = CreateConnectorRpcResponse; + await using var client = new CopilotClient(new CopilotClientOptions + { + Connection = RuntimeConnection.ForUri(server.Url) + }); + await using var session = await client.CreateSessionAsync(new SessionConfig()); + server.ClearRequests(); + + var connectors = session.Rpc.Connectors; + Assert.Same(connectors, session.Rpc.Connectors); + + var capabilities = await connectors.GetCapabilitiesAsync(); + Assert.Equal(1, capabilities.ApiVersion); + Assert.Equal(ConnectorAvailability.Enabled, capabilities.Availability); + Assert.True(capabilities.ConsentContinuation); + Assert.Equal(5, capabilities.MaxPollAttempts); + Assert.Equal(2_000, capabilities.MaxPollIntervalMs); + Assert.Equal(30_000, capabilities.MaxDeadlineMs); + Assert.True(capabilities.OpaqueAccountSelection); + + var status = await connectors.GetStatusAsync(); + Assert.Equal("account-1", status.AccountId); + Assert.Equal(2, status.PendingConnections); + Assert.Equal(7, status.Catalog?.Revision); + var runtimeServer = Assert.Single(status.RuntimeServers); + Assert.Equal("slack", runtimeServer.ConnectorName); + Assert.Equal("connector-slack", runtimeServer.RuntimeServerId); + Assert.Equal(ConnectorMcpStatus.Connected, runtimeServer.Status); + + var listed = await connectors.ListAsync("account-1"); + AssertConnectorCatalog(listed, 3, ConnectorCatalogStatus.NotConnected); + + var refreshed = await connectors.RefreshAsync("account-1"); + AssertConnectorCatalog(refreshed, 4, ConnectorCatalogStatus.Connected); + + Assert.Collection( + server.Requests, + request => AssertConnectorRequest( + request, + "session.connectors.getCapabilities", + session.SessionId), + request => AssertConnectorRequest( + request, + "session.connectors.getStatus", + session.SessionId), + request => AssertConnectorRequest( + request, + "session.connectors.list", + session.SessionId, + ("accountId", "account-1")), + request => AssertConnectorRequest( + request, + "session.connectors.refresh", + session.SessionId, + ("accountId", "account-1"))); + } + + [Fact] + public async Task Session_Rpc_Connectors_Maps_Connection_Wire_And_Result_Variants() + { + await using var server = await FakeCopilotServer.StartAsync(); + server.ResponseFactory = CreateConnectorRpcResponse; + await using var client = new CopilotClient(new CopilotClientOptions + { + Connection = RuntimeConnection.ForUri(server.Url) + }); + await using var session = await client.CreateSessionAsync(new SessionConfig()); + server.ClearRequests(); + + var connected = Assert.IsType( + await session.Rpc.Connectors.ConnectAsync("account-1", "slack")); + Assert.Equal("connected", connected.Kind); + Assert.Equal(8, connected.Status.Catalog?.Revision); + + var consent = Assert.IsType( + await session.Rpc.Connectors.ReconnectAsync("account-1", "slack")); + Assert.Equal("consent_required", consent.Kind); + Assert.Equal("https://example.com/consent", consent.ConsentUrl); + Assert.Equal("continuation-reconnect", consent.ContinuationId); + + var pending = Assert.IsType( + await session.Rpc.Connectors.ContinueConnectionAsync( + "continuation-reconnect", + maxAttempts: 3, + pollIntervalMs: 1_000, + deadlineMs: 10_000)); + Assert.Equal("pending", pending.Kind); + Assert.Equal("continuation-next", pending.ContinuationId); + + Assert.Collection( + server.Requests, + request => AssertConnectorRequest( + request, + "session.connectors.connect", + session.SessionId, + ("accountId", "account-1"), + ("connectorName", "slack")), + request => AssertConnectorRequest( + request, + "session.connectors.reconnect", + session.SessionId, + ("accountId", "account-1"), + ("connectorName", "slack")), + request => AssertConnectorRequest( + request, + "session.connectors.continueConnection", + session.SessionId, + ("continuationId", "continuation-reconnect"), + ("maxAttempts", 3L), + ("pollIntervalMs", 1_000L), + ("deadlineMs", 10_000L))); + } + + [Fact] + public async Task Session_Rpc_Connectors_Maps_Disconnect_And_Reconcile() + { + await using var server = await FakeCopilotServer.StartAsync(); + server.ResponseFactory = CreateConnectorRpcResponse; + await using var client = new CopilotClient(new CopilotClientOptions + { + Connection = RuntimeConnection.ForUri(server.Url) + }); + await using var session = await client.CreateSessionAsync(new SessionConfig()); + server.ClearRequests(); + + var disconnected = await session.Rpc.Connectors.DisconnectAsync("account-1", "slack"); + Assert.True(disconnected.Disconnected); + Assert.Equal(9, disconnected.Status.Catalog?.Revision); + + var reconciled = await session.Rpc.Connectors.ReconcileAsync("account-1", refreshCatalog: true); + Assert.Equal(10, reconciled.Catalog?.Revision); + Assert.Empty(reconciled.RuntimeServers); + + Assert.Collection( + server.Requests, + request => AssertConnectorRequest( + request, + "session.connectors.disconnect", + session.SessionId, + ("accountId", "account-1"), + ("connectorName", "slack")), + request => AssertConnectorRequest( + request, + "session.connectors.reconcile", + session.SessionId, + ("accountId", "account-1"), + ("refreshCatalog", true))); + } + + private static Dictionary CreateConnectorRpcResponse(RpcRequestRecord request) => + request.Method switch + { + "session.connectors.getCapabilities" => new Dictionary + { + ["apiVersion"] = 1L, + ["availability"] = "enabled", + ["consentContinuation"] = true, + ["maxDeadlineMs"] = 30_000L, + ["maxPollAttempts"] = 5L, + ["maxPollIntervalMs"] = 2_000L, + ["opaqueAccountSelection"] = true + }, + "session.connectors.getStatus" => CreateConnectorStatusResponse(7, pendingConnections: 2), + "session.connectors.list" => CreateConnectorCatalogResponse(3, "not_connected"), + "session.connectors.refresh" => CreateConnectorCatalogResponse(4, "connected"), + "session.connectors.connect" => new Dictionary + { + ["kind"] = "connected", + ["status"] = CreateConnectorStatusResponse(8) + }, + "session.connectors.reconnect" => new Dictionary + { + ["kind"] = "consent_required", + ["consentUrl"] = "https://example.com/consent", + ["continuationId"] = "continuation-reconnect" + }, + "session.connectors.continueConnection" => new Dictionary + { + ["kind"] = "pending", + ["continuationId"] = "continuation-next" + }, + "session.connectors.disconnect" => new Dictionary + { + ["disconnected"] = true, + ["status"] = CreateConnectorStatusResponse(9) + }, + "session.connectors.reconcile" => CreateConnectorStatusResponse( + 10, + includeRuntimeServer: false), + _ => throw new InvalidOperationException($"Unexpected Connector RPC method '{request.Method}'.") + }; + + private static Dictionary CreateConnectorStatusResponse( + long revision, + long pendingConnections = 0, + bool includeRuntimeServer = true) => + new() + { + ["accountId"] = "account-1", + ["apiVersion"] = 1L, + ["availability"] = "enabled", + ["catalog"] = CreateConnectorCatalogResponse(revision, "connected"), + ["pendingConnections"] = pendingConnections, + ["runtimeServers"] = includeRuntimeServer + ? new object?[] + { + new Dictionary + { + ["connectorName"] = "slack", + ["runtimeServerId"] = "connector-slack", + ["status"] = "connected" + } + } + : Array.Empty() + }; + + private static Dictionary CreateConnectorCatalogResponse(long revision, string status) => + new() + { + ["connectors"] = new object?[] + { + new Dictionary + { + ["description"] = "Slack workspace search", + ["displayName"] = "Slack", + ["name"] = "slack", + ["runtimeServerIds"] = new object?[] { "connector-slack" }, + ["status"] = status + } + }, + ["refreshedAtMs"] = 1_750_000_000_000L, + ["revision"] = revision + }; + + private static void AssertConnectorCatalog( + ConnectorCatalogResult catalog, + long revision, + ConnectorCatalogStatus status) + { + Assert.Equal(revision, catalog.Revision); + Assert.Equal(1_750_000_000_000L, catalog.RefreshedAtMs); + var connector = Assert.Single(catalog.Connectors); + Assert.Equal("Slack", connector.DisplayName); + Assert.Equal("slack", connector.Name); + Assert.Equal(status, connector.Status); + Assert.Equal(["connector-slack"], connector.RuntimeServerIds); + } + + private static void AssertConnectorRequest( + RpcRequestRecord request, + string method, + string sessionId, + params (string Name, object Value)[] expectedProperties) + { + Assert.Equal(method, request.Method); + Assert.Equal(expectedProperties.Length + 1, request.Params.EnumerateObject().Count()); + Assert.Equal(sessionId, request.Params.GetProperty("sessionId").GetString()); + + foreach (var (name, expectedValue) in expectedProperties) + { + var actualValue = request.Params.GetProperty(name); + switch (expectedValue) + { + case string stringValue: + Assert.Equal(stringValue, actualValue.GetString()); + break; + case long longValue: + Assert.Equal(longValue, actualValue.GetInt64()); + break; + case bool boolValue: + Assert.Equal(boolValue, actualValue.GetBoolean()); + break; + default: + throw new InvalidOperationException( + $"Unsupported expected JSON value type '{expectedValue.GetType().Name}'."); + } + } + } +} +#endif diff --git a/go/README.md b/go/README.md index b6d80cf6d0..aca40e3844 100644 --- a/go/README.md +++ b/go/README.md @@ -279,6 +279,19 @@ Initial acquisition runs during session creation or resume. Cancellation, provid - `UI() *SessionUI` - Interactive UI API for elicitation dialogs - `Capabilities() SessionCapabilities` - Host capabilities (e.g. elicitation support) +#### Connector session API (Experimental) + +`session.RPC.Connectors` exposes the runtime-owned Connector catalog, lifecycle, +bounded consent continuation, and MCP reconciliation APIs: +`GetCapabilities`, `GetStatus`, `List`, `Refresh`, `Connect`, `Reconnect`, +`ContinueConnection`, `Disconnect`, and `Reconcile`. The host account-selection +flow supplies an opaque `selectionId`, passed as `AccountID` (`accountId` on the +wire), and owns consent/browser UX. Connector APIs neither require nor return +tokens; Connector credentials and MCP projection remain runtime-owned. + +`GetCapabilities` reports API availability and bounded continuation limits +without changing Connector state. Check it before using the remaining methods. + #### Message source Set `MessageOptions.Source` to `copilot.MessageSourceAgent(id)` for messages from diff --git a/go/connectors_rpc_test.go b/go/connectors_rpc_test.go new file mode 100644 index 0000000000..ff92a1b29a --- /dev/null +++ b/go/connectors_rpc_test.go @@ -0,0 +1,309 @@ +package copilot + +import ( + "encoding/json" + "fmt" + "net" + "reflect" + "testing" + + "github.com/github/copilot-sdk/go/internal/jsonrpc2" + "github.com/github/copilot-sdk/go/rpc" +) + +const ( + connectorAccountID = "opaque-account-selection" + connectorStatusResult = `{ + "accountId":"` + connectorAccountID + `", + "apiVersion":1, + "availability":"enabled", + "catalog":{ + "connectors":[{ + "description":"Calendar and mail", + "displayName":"Outlook", + "name":"outlook", + "runtimeServerIds":["connector-outlook"], + "status":"connected" + }], + "refreshedAtMs":1700000000000, + "revision":7 + }, + "pendingConnections":2, + "runtimeServers":[{ + "connectorName":"outlook", + "runtimeServerId":"connector-outlook", + "status":"connected" + }] +}` +) + +func TestSessionRPCConnectors(t *testing.T) { + clientConn, serverConn := net.Pipe() + client := jsonrpc2.NewClient(clientConn, clientConn) + server := jsonrpc2.NewClient(serverConn, serverConn) + client.Start() + server.Start() + t.Cleanup(func() { + client.Stop() + server.Stop() + _ = clientConn.Close() + _ = serverConn.Close() + }) + + session := newSession("session-1", client, "", false) + t.Cleanup(session.stopEventProcessing) + if session.RPC == nil || session.RPC.Connectors == nil { + t.Fatal("session.RPC.Connectors is not initialized") + } + + t.Run("get capabilities", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.getCapabilities", map[string]any{ + "sessionId": "session-1", + }, `{ + "apiVersion":1, + "availability":"enabled", + "consentContinuation":true, + "maxDeadlineMs":60000, + "maxPollAttempts":10, + "maxPollIntervalMs":5000, + "opaqueAccountSelection":true + }`) + + result, err := session.RPC.Connectors.GetCapabilities(t.Context()) + if err != nil { + t.Fatalf("GetCapabilities: %v", err) + } + if result.APIVersion != 1 || + result.Availability != rpc.ConnectorAvailabilityEnabled || + !result.ConsentContinuation || + result.MaxDeadlineMs != 60000 || + result.MaxPollAttempts != 10 || + result.MaxPollIntervalMs != 5000 || + !result.OpaqueAccountSelection { + t.Fatalf("GetCapabilities result = %#v", result) + } + }) + + t.Run("get status", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.getStatus", map[string]any{ + "sessionId": "session-1", + }, connectorStatusResult) + + result, err := session.RPC.Connectors.GetStatus(t.Context()) + if err != nil { + t.Fatalf("GetStatus: %v", err) + } + assertConnectorStatus(t, result) + }) + + t.Run("list", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.list", map[string]any{ + "accountId": connectorAccountID, + "sessionId": "session-1", + }, `{ + "connectors":[{ + "description":"Calendar and mail", + "displayName":"Outlook", + "name":"outlook", + "runtimeServerIds":["connector-outlook"], + "status":"connected" + }], + "refreshedAtMs":1700000000000, + "revision":7 + }`) + + result, err := session.RPC.Connectors.List(t.Context(), &rpc.ConnectorAccountRequest{ + AccountID: connectorAccountID, + }) + if err != nil { + t.Fatalf("List: %v", err) + } + assertConnectorCatalog(t, result, 7, rpc.ConnectorCatalogStatusConnected) + }) + + t.Run("refresh", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.refresh", map[string]any{ + "accountId": connectorAccountID, + "sessionId": "session-1", + }, `{ + "connectors":[{ + "displayName":"Outlook", + "name":"outlook", + "runtimeServerIds":[], + "status":"not_connected" + }], + "refreshedAtMs":1700000000100, + "revision":8 + }`) + + result, err := session.RPC.Connectors.Refresh(t.Context(), &rpc.ConnectorAccountRequest{ + AccountID: connectorAccountID, + }) + if err != nil { + t.Fatalf("Refresh: %v", err) + } + assertConnectorCatalog(t, result, 8, rpc.ConnectorCatalogStatusNotConnected) + }) + + t.Run("connect", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.connect", map[string]any{ + "accountId": connectorAccountID, + "connectorName": "outlook", + "sessionId": "session-1", + }, `{ + "kind":"consent_required", + "consentUrl":"https://example.com/consent", + "continuationId":"continuation-1" + }`) + + result, err := session.RPC.Connectors.Connect(t.Context(), &rpc.ConnectorConnectRequest{ + AccountID: connectorAccountID, + ConnectorName: "outlook", + }) + if err != nil { + t.Fatalf("Connect: %v", err) + } + consent, ok := result.(*rpc.ConnectorConnectResultConsentRequired) + if !ok || consent.ConsentURL != "https://example.com/consent" || consent.ContinuationID != "continuation-1" { + t.Fatalf("Connect result = %#v", result) + } + }) + + t.Run("reconnect", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.reconnect", map[string]any{ + "accountId": connectorAccountID, + "connectorName": "outlook", + "sessionId": "session-1", + }, `{"kind":"pending","continuationId":"continuation-2"}`) + + result, err := session.RPC.Connectors.Reconnect(t.Context(), &rpc.ConnectorConnectRequest{ + AccountID: connectorAccountID, + ConnectorName: "outlook", + }) + if err != nil { + t.Fatalf("Reconnect: %v", err) + } + pending, ok := result.(*rpc.ConnectorConnectResultPending) + if !ok || pending.ContinuationID != "continuation-2" { + t.Fatalf("Reconnect result = %#v", result) + } + }) + + t.Run("continue connection", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.continueConnection", map[string]any{ + "continuationId": "continuation-2", + "deadlineMs": float64(30000), + "maxAttempts": float64(4), + "pollIntervalMs": float64(500), + "sessionId": "session-1", + }, `{"kind":"connected","status":`+connectorStatusResult+`}`) + + result, err := session.RPC.Connectors.ContinueConnection(t.Context(), &rpc.ConnectorContinueRequest{ + ContinuationID: "continuation-2", + DeadlineMs: 30000, + MaxAttempts: 4, + PollIntervalMs: 500, + }) + if err != nil { + t.Fatalf("ContinueConnection: %v", err) + } + connected, ok := result.(*rpc.ConnectorConnectResultConnected) + if !ok { + t.Fatalf("ContinueConnection result = %T", result) + } + assertConnectorStatus(t, &connected.Status) + }) + + t.Run("disconnect", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.disconnect", map[string]any{ + "accountId": connectorAccountID, + "connectorName": "outlook", + "sessionId": "session-1", + }, `{"disconnected":true,"status":`+connectorStatusResult+`}`) + + result, err := session.RPC.Connectors.Disconnect(t.Context(), &rpc.ConnectorConnectRequest{ + AccountID: connectorAccountID, + ConnectorName: "outlook", + }) + if err != nil { + t.Fatalf("Disconnect: %v", err) + } + if !result.Disconnected { + t.Fatalf("Disconnect result = %#v", result) + } + assertConnectorStatus(t, &result.Status) + }) + + t.Run("reconcile", func(t *testing.T) { + expectConnectorRPC(t, server, "session.connectors.reconcile", map[string]any{ + "accountId": connectorAccountID, + "refreshCatalog": true, + "sessionId": "session-1", + }, connectorStatusResult) + + result, err := session.RPC.Connectors.Reconcile(t.Context(), &rpc.ConnectorReconcileRequest{ + AccountID: connectorAccountID, + RefreshCatalog: Bool(true), + }) + if err != nil { + t.Fatalf("Reconcile: %v", err) + } + assertConnectorStatus(t, result) + }) +} + +func expectConnectorRPC(t *testing.T, server *jsonrpc2.Client, method string, wantParams map[string]any, result string) { + t.Helper() + wantJSON, err := json.Marshal(wantParams) + if err != nil { + t.Fatalf("marshal expected %s params: %v", method, err) + } + var want any + if err := json.Unmarshal(wantJSON, &want); err != nil { + t.Fatalf("normalize expected %s params: %v", method, err) + } + + server.SetRequestHandler(method, func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) { + var got any + if err := json.Unmarshal(params, &got); err != nil { + return nil, &jsonrpc2.Error{Code: -32602, Message: err.Error()} + } + if !reflect.DeepEqual(got, want) { + return nil, &jsonrpc2.Error{ + Code: -32602, + Message: fmt.Sprintf("%s params = %s, want %s", method, params, wantJSON), + } + } + return json.RawMessage(result), nil + }) +} + +func assertConnectorCatalog(t *testing.T, catalog *rpc.ConnectorCatalogResult, revision int64, status rpc.ConnectorCatalogStatus) { + t.Helper() + if catalog.Revision != revision || len(catalog.Connectors) != 1 { + t.Fatalf("catalog = %#v", catalog) + } + connector := catalog.Connectors[0] + if connector.Name != "outlook" || connector.DisplayName != "Outlook" || connector.Status != status { + t.Fatalf("connector = %#v", connector) + } +} + +func assertConnectorStatus(t *testing.T, status *rpc.ConnectorStatus) { + t.Helper() + if status.AccountID == nil || + *status.AccountID != connectorAccountID || + status.APIVersion != 1 || + status.Availability != rpc.ConnectorAvailabilityEnabled || + status.PendingConnections != 2 || + len(status.RuntimeServers) != 1 { + t.Fatalf("status = %#v", status) + } + assertConnectorCatalog(t, status.Catalog, 7, rpc.ConnectorCatalogStatusConnected) + runtimeServer := status.RuntimeServers[0] + if runtimeServer.ConnectorName != "outlook" || + runtimeServer.RuntimeServerID != "connector-outlook" || + runtimeServer.Status != rpc.ConnectorMCPStatusConnected { + t.Fatalf("runtime server = %#v", runtimeServer) + } +} diff --git a/java/README.md b/java/README.md index cab77b19c7..fc8bda1b11 100644 --- a/java/README.md +++ b/java/README.md @@ -176,6 +176,63 @@ and `setExcludedTools(...)`, prefer the source-qualified filter form `DefaultAgentConfig.setExcludedTools(...)`, use `-` directly. +## Connector session API (experimental) + +The Connector API is experimental and may be unavailable in some runtime +versions. Check `getCapabilities()` before using the remaining methods. + +Opt in to experimental APIs, then use the generated DTOs through +`session.getRpc().connectors`: + +```java +import com.github.copilot.AllowCopilotExperimental; +import com.github.copilot.CopilotSession; +import com.github.copilot.generated.rpc.ConnectorAvailability; +import com.github.copilot.generated.rpc.ConnectorConnectResultConsentRequired; +import com.github.copilot.generated.rpc.SessionConnectorsConnectParams; +import com.github.copilot.generated.rpc.SessionConnectorsContinueConnectionParams; +import com.github.copilot.generated.rpc.SessionConnectorsListParams; +import com.github.copilot.generated.rpc.SessionConnectorsReconcileParams; + +@AllowCopilotExperimental +static void connectConnector(CopilotSession session, String accountId) + throws Exception { + var connectors = session.getRpc().connectors; + var capabilities = connectors.getCapabilities().get(); + if (capabilities.availability() != ConnectorAvailability.ENABLED) { + return; + } + + var catalog = connectors + .list(new SessionConnectorsListParams(null, accountId)).get(); + connectors + .reconcile(new SessionConnectorsReconcileParams( + null, accountId, false)).get(); + var connectorName = chooseConnector(catalog.connectors()); + var connection = connectors + .connect(new SessionConnectorsConnectParams( + null, accountId, connectorName)).get(); + if (connection instanceof ConnectorConnectResultConsentRequired consent) { + openConsentUrl(consent.getConsentUrl()); + connection = connectors + .continueConnection(new SessionConnectorsContinueConnectionParams( + null, + consent.getContinuationId(), + capabilities.maxPollAttempts(), + capabilities.maxPollIntervalMs(), + capabilities.maxDeadlineMs())) + .get(); + } +} +``` + +Pass `null` for each DTO's `sessionId`; the session-scoped wrapper injects the +active session ID. Bound continuation values using `getCapabilities()`. The +host supplies only its opaque account selection ID and owns browser and consent +UI; Connector methods never accept or return credentials or provider tokens. +The namespace also exposes `getStatus`, `refresh`, `reconnect`, `disconnect`, +and `reconcile`. + `CopilotClientOptions.setCwd(...)` sets the runtime process working directory, which otherwise inherits the current process working directory. `SessionConfig.setWorkingDirectory(...)` sets the session working directory, which otherwise defaults to the runtime process working directory. `CopilotClientOptions.setExtensionLaunchProvider(...)` configures an experimental diff --git a/java/scripts/codegen/java.ts b/java/scripts/codegen/java.ts index 472eedfd61..31a91e7bd6 100644 --- a/java/scripts/codegen/java.ts +++ b/java/scripts/codegen/java.ts @@ -30,6 +30,19 @@ function isSchemaInternal(schema: JSONSchema7 | null | undefined): boolean { (schema as Record).visibility === "internal"; } +function isSchemaExperimental(schema: JSONSchema7 | null | undefined): boolean { + return typeof schema === "object" && + schema !== null && + (schema as Record).stability === "experimental"; +} + +function appendExperimentalTypeApiNote(lines: string[], schema: JSONSchema7): void { + if (isSchemaExperimental(schema)) { + lines.push(` *`); + lines.push(` * @apiNote This type is experimental and may change in a future version.`); + } +} + const AUTO_GENERATED_HEADER = `// AUTO-GENERATED FILE - DO NOT EDIT`; const GENERATED_FROM_SESSION_EVENTS = `// Generated from: session-events.schema.json`; const GENERATED_FROM_API = `// Generated from: api.schema.json`; @@ -526,6 +539,7 @@ async function generatePolymorphicResultClass( const anyOf = schema.anyOf as JSONSchema7[]; const variants = resolveAnyOfVariants(anyOf); const discriminator = findDiscriminator(variants); + const experimental = isSchemaExperimental(schema); if (!discriminator) { console.warn(`[codegen] Cannot find discriminator for ${className} — skipping polymorphic generation`); @@ -573,11 +587,15 @@ async function generatePolymorphicResultClass( baseLines.push(`import com.fasterxml.jackson.annotation.JsonIgnoreProperties;`); baseLines.push(`import com.fasterxml.jackson.annotation.JsonSubTypes;`); baseLines.push(`import com.fasterxml.jackson.annotation.JsonTypeInfo;`); + if (experimental) { + baseLines.push(`import com.github.copilot.CopilotExperimental;`); + } baseLines.push(`import javax.annotation.processing.Generated;`); baseLines.push(""); - if (schema.description) { + if (schema.description || experimental) { baseLines.push(`/**`); - baseLines.push(` * ${schema.description}`); + baseLines.push(` * ${schema.description ?? `Polymorphic result type {@code ${className}}.`}`); + appendExperimentalTypeApiNote(baseLines, schema); baseLines.push(` *`); baseLines.push(` * @since 1.0.0`); baseLines.push(` */`); @@ -593,6 +611,9 @@ async function generatePolymorphicResultClass( baseLines.push(` @JsonSubTypes.Type(value = ${v.variantClassName}.class, name = "${v.discriminatorValue}")${comma}`); } baseLines.push(`})`); + if (experimental) { + baseLines.push(`@CopilotExperimental`); + } baseLines.push(`@JsonIgnoreProperties(ignoreUnknown = true)`); baseLines.push(GENERATED_ANNOTATION); baseLines.push(`public abstract class ${className} {`); @@ -626,12 +647,16 @@ async function generatePolymorphicVariantClass( packageName: string, packageDir: string ): Promise { + const experimental = isSchemaExperimental(schema); const allImports = new Set([ "com.fasterxml.jackson.annotation.JsonIgnoreProperties", "com.fasterxml.jackson.annotation.JsonInclude", "com.fasterxml.jackson.annotation.JsonProperty", "javax.annotation.processing.Generated", ]); + if (experimental) { + allImports.add("com.github.copilot.CopilotExperimental"); + } const nestedTypes = new Map(); // Collect fields (excluding the discriminator property) @@ -676,16 +701,21 @@ async function generatePolymorphicVariantClass( if (schema.description) { lines.push(`/**`); lines.push(` * ${schema.description}`); + appendExperimentalTypeApiNote(lines, schema); lines.push(` *`); lines.push(` * @since 1.0.0`); lines.push(` */`); } else { lines.push(`/**`); lines.push(` * Variant {@code ${discriminatorValue}} of {@link ${baseClassName}}.`); + appendExperimentalTypeApiNote(lines, schema); lines.push(` *`); lines.push(` * @since 1.0.0`); lines.push(` */`); } + if (experimental) { + lines.push(`@CopilotExperimental`); + } lines.push(`@JsonIgnoreProperties(ignoreUnknown = true)`); lines.push(`@JsonInclude(JsonInclude.Include.NON_NULL)`); lines.push(GENERATED_ANNOTATION); @@ -1432,6 +1462,7 @@ async function generateStandaloneEnum( headerComment: string ): Promise { const values = schema.enum as string[]; + const experimental = isSchemaExperimental(schema); const lines: string[] = []; lines.push(COPYRIGHT); lines.push(""); @@ -1440,15 +1471,22 @@ async function generateStandaloneEnum( lines.push(""); lines.push(`package ${packageName};`); lines.push(""); + if (experimental) { + lines.push(`import com.github.copilot.CopilotExperimental;`); + } lines.push(`import javax.annotation.processing.Generated;`); lines.push(""); - if (schema.description) { + if (schema.description || experimental) { lines.push(`/**`); - lines.push(` * ${schema.description}`); + lines.push(` * ${schema.description ?? `Values for {@code ${name}}.`}`); + appendExperimentalTypeApiNote(lines, schema); lines.push(` *`); lines.push(` * @since 1.0.0`); lines.push(` */`); } + if (experimental) { + lines.push(`@CopilotExperimental`); + } lines.push(GENERATED_ANNOTATION); lines.push(`public enum ${name} {`); for (let i = 0; i < values.length; i++) { @@ -1484,6 +1522,7 @@ async function generateStandaloneRecord( ): Promise { const nestedTypes = new Map(); const { code, imports } = generateRpcClass(name, schema, nestedTypes, packageName); + const experimental = isSchemaExperimental(schema); const lines: string[] = []; lines.push(COPYRIGHT); @@ -1501,19 +1540,26 @@ async function generateStandaloneRecord( "javax.annotation.processing.Generated", ...imports, ]); + if (experimental) { + allImports.add("com.github.copilot.CopilotExperimental"); + } const sortedImports = [...allImports].sort(); for (const imp of sortedImports) { lines.push(`import ${imp};`); } lines.push(""); - if (schema.description) { + if (schema.description || experimental) { lines.push(`/**`); - lines.push(` * ${schema.description}`); + lines.push(` * ${schema.description ?? `Data type {@code ${name}}.`}`); + appendExperimentalTypeApiNote(lines, schema); lines.push(` *`); lines.push(` * @since 1.0.0`); lines.push(` */`); } + if (experimental) { + lines.push(`@CopilotExperimental`); + } lines.push(GENERATED_ANNOTATION); lines.push(code); lines.push(""); diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java index ee9c5fd485..3603e09f1e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageReasoningBlocks.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * Neutral provider-tagged reasoning content blocks preserved verbatim for round-tripping * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java index 6d67f6ecbe..eb75a75121 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantMessageServerTools.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import java.util.Map; import javax.annotation.processing.Generated; @@ -17,8 +18,11 @@ /** * Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java b/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java index 12518491e8..b0f2a8d23e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * A single canvas declaration in `session.canvas.registry_changed`, including provider IDs, display metadata, input schema, and actions. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java b/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java index 99c390efb2..68fe3a6444 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * A single action within a canvas declaration, with its name, optional description, and optional input schema. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CitableSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/CitableSource.java index c66809fc15..6f11f99bc1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CitableSource.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CitableSource.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * A source supplied by a tool that should be made available to the model as citable content. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CitationProvider.java b/java/sdk/src/generated/java/com/github/copilot/generated/CitationProvider.java index 46a02b2561..4122059df8 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CitationProvider.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CitationProvider.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * The system that produced a citation. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum CitationProvider { /** The {@code anthropic} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CitationReference.java b/java/sdk/src/generated/java/com/github/copilot/generated/CitationReference.java index e9ad222c10..db15713df4 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CitationReference.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CitationReference.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * A single citation occurrence linking a span of generated text to a supporting source. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CitationSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/CitationSource.java index 561c5eced7..a1daf7def4 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CitationSource.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CitationSource.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * A source that backs one or more cited spans in the assistant's response. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CitationSpan.java b/java/sdk/src/generated/java/com/github/copilot/generated/CitationSpan.java index aaa8647a64..6aeb1d994c 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CitationSpan.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CitationSpan.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * A contiguous span of generated assistant text and the source references that support it. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/Citations.java b/java/sdk/src/generated/java/com/github/copilot/generated/Citations.java index c153c39a7b..c18758e87e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/Citations.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/Citations.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * Provider-agnostic citations linking spans of the assistant's response to their supporting sources. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionAttribution.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionAttribution.java index 8e4ae7e937..90de85e586 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionAttribution.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionAttribution.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Experimental attribution linking an ordinary event to the HydraFusion turn, phase, and concrete source that produced it. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionConversationScope.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionConversationScope.java index d38381ed48..702c43ea7e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionConversationScope.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionConversationScope.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Conversation scope in which a HydraFusion phase executes. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionConversationScope { /** The {@code root} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpAction.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpAction.java index e54bf4604f..e9ec06aff8 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpAction.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpAction.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Server-recommended routing behavior for a later HydraFusion turn. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionFollowUpAction { /** The {@code reuse_primary} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpRecommendation.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpRecommendation.java index 101d497fb2..f2678d9373 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpRecommendation.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionFollowUpRecommendation.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable server recommendation for subsequent HydraFusion turns. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPattern.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPattern.java index d37ef4ee83..ed9a2391a6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPattern.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPattern.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Validated HydraFusion execution pattern. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionPattern { /** The {@code single} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseActivityKind.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseActivityKind.java index a95a08cf91..e0b10db828 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseActivityKind.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseActivityKind.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Content-safe activity observed while a HydraFusion phase is running. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionPhaseActivityKind { /** The {@code model_output} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseKind.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseKind.java index ead79b75fc..512ea698ef 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseKind.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseKind.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * HydraFusion phase kind. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionPhaseKind { /** The {@code primary} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhasePlanStep.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhasePlanStep.java index cfb07a789a..de40eaf0ac 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhasePlanStep.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhasePlanStep.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Presentation-neutral phase planned for a HydraFusion turn. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseStatus.java index f670332b5c..88f8a751aa 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseStatus.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable outcome status of a HydraFusion phase. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionPhaseStatus { /** The {@code succeeded} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseUsage.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseUsage.java index 4a707bb69e..a21ece2845 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseUsage.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionPhaseUsage.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Aggregate concrete-model usage for one HydraFusion phase. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionProjectionMode.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionProjectionMode.java index 9681efc0ba..ef705b48d2 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionProjectionMode.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionProjectionMode.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * How a durable phase checkpoint contributes its exact message to canonical root history. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionProjectionMode { /** The {@code append} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionScores.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionScores.java index eefb8190a1..ae2b219d9d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionScores.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionScores.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Validated HydraFusion routing capability scores. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionStagedTerminal.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionStagedTerminal.java index 262c8c664b..297a4325d4 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionStagedTerminal.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionStagedTerminal.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Internal durable terminal request staged by a HydraFusion phase until an idempotent final commit selects it. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FusionTurnKind.java b/java/sdk/src/generated/java/com/github/copilot/generated/FusionTurnKind.java index 24e39b976c..ec55bab2bb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FusionTurnKind.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FusionTurnKind.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Kind of turn for which HydraFusion routing is running. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FusionTurnKind { /** The {@code user} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java index 14bc8e2895..e142238e7b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Which direction a message-backed authorization claim moves authority in. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum PermissionMessageAuthorizationPolarity { /** The {@code grant} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMode.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMode.java index 421ad76139..fec188d66e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMode.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMode.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Permission mode for the session. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum PermissionMode { /** The {@code manual} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/TaskBlocker.java b/java/sdk/src/generated/java/com/github/copilot/generated/TaskBlocker.java index 54b9495d91..d1093a8839 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/TaskBlocker.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/TaskBlocker.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Structured reason that the task cannot continue without intervention * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteShellExecution.java b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteShellExecution.java index e08ac623f9..4c9a304c40 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteShellExecution.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/ToolExecutionCompleteShellExecution.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Experimental shell completion facts retained independently of the full tool result. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/UIEphemeralQueryPhase.java b/java/sdk/src/generated/java/com/github/copilot/generated/UIEphemeralQueryPhase.java index 7798c159eb..63a53aa0bb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/UIEphemeralQueryPhase.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/UIEphemeralQueryPhase.java @@ -7,13 +7,17 @@ package com.github.copilot.generated; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Lifecycle phase for a Rust-owned ephemeral query stream. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum UIEphemeralQueryPhase { /** The {@code started} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveCreditLimit.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveCreditLimit.java index d3f6a585b8..776e25273a 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveCreditLimit.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveCreditLimit.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Current per-window credit limit and consumption for an autopilot objective. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveState.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveState.java index 657884c4f6..3b2c3002fa 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveState.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveState.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Public, persistence-independent projection of an autopilot objective. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveStatus.java index b50cf2072c..024ca37c43 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutopilotObjectiveStatus.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Current normalized autopilot objective lifecycle status. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum AutopilotObjectiveStatus { /** The {@code active} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolDescriptor.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolDescriptor.java index 057498fb98..e36268609f 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolDescriptor.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolDescriptor.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Rust-owned metadata and input schema for a built-in tool. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormat.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormat.java index 7af5ef2d45..c03c92afc4 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormat.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormat.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Custom grammar input format accepted by a built-in tool. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormatType.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormatType.java index 6239493671..fcb277e6c9 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormatType.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolFormatType.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Custom input-format kind. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum BuiltinToolFormatType { /** The {@code grammar} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchema.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchema.java index 764450b37e..277eba0751 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchema.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchema.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * JSON Schema object accepted by a built-in tool. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchemaType.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchemaType.java index 729f3329b5..d935afb4a6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchemaType.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/BuiltinToolInputSchemaType.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Root JSON Schema type for a built-in tool input. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum BuiltinToolInputSchemaType { /** The {@code object} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasAction.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasAction.java index 36554ed767..b31f9d6fdb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasAction.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasAction.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContext.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContext.java index 8dba8156e4..cf09ce5679 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContext.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContext.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Host context supplied by the runtime. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContextCapabilities.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContextCapabilities.java index a8118eeebf..c3133d0099 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContextCapabilities.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasHostContextCapabilities.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Host capabilities * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasSessionContext.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasSessionContext.java index 422d32e542..d3c5c75bde 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasSessionContext.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CanvasSessionContext.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Session context supplied by the runtime. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CommandsInvocationEffectOutcome.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CommandsInvocationEffectOutcome.java index 79f3be8baf..65293f1219 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CommandsInvocationEffectOutcome.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CommandsInvocationEffectOutcome.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Whether a pending slash-command invocation effect was applied or cancelled by the host. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum CommandsInvocationEffectOutcome { /** The {@code applied} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationRequirement.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationRequirement.java index ed48dc4bae..8e4479da72 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationRequirement.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationRequirement.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Account-targeted authorization update required by the Connector service. The account ID is an opaque host routing identifier; no credential is included. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationScope.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationScope.java index 7b0f1a7b15..762c455778 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationScope.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAuthorizationScope.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Stable OAuth scope whose absence prevents Connector management. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum ConnectorAuthorizationScope { /** The {@code write_plugin_gateway_connections} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAvailability.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAvailability.java index 2b2b19dc53..00f11aed79 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAvailability.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorAvailability.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Availability of the EXPERIMENTAL session connector API. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum ConnectorAvailability { /** The {@code enabled} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogEntry.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogEntry.java index 612dd11f8b..53c3750792 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogEntry.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogEntry.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * Credential-free Connector catalog entry. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogResult.java index 2e4102daf9..2d10c7ad93 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogResult.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * Validated Connector catalog snapshot cached by the session. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogStatus.java index 50f4ede020..7be156a58b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorCatalogStatus.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Authoritative service connection state for one Connector. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum ConnectorCatalogStatus { /** The {@code not_connected} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResult.java index 53a6cd0884..3598e407d1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResult.java @@ -10,11 +10,14 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Typed result of initiating or continuing a Connector connection. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true) @@ -23,6 +26,7 @@ @JsonSubTypes.Type(value = ConnectorConnectResultConsentRequired.class, name = "consent_required"), @JsonSubTypes.Type(value = ConnectorConnectResultPending.class, name = "pending") }) +@CopilotExperimental @JsonIgnoreProperties(ignoreUnknown = true) @javax.annotation.processing.Generated("copilot-sdk-codegen") public abstract class ConnectorConnectResult { diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConnected.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConnected.java index 4eb5f6f63f..cf5051e62c 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConnected.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConnected.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * The service is connected and the session MCP graph was reconciled. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) @javax.annotation.processing.Generated("copilot-sdk-codegen") diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConsentRequired.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConsentRequired.java index c501753aaf..3552bdc9e3 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConsentRequired.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultConsentRequired.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Host-owned consent is required before bounded continuation can complete. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) @javax.annotation.processing.Generated("copilot-sdk-codegen") diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultPending.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultPending.java index 8ef1f4f608..a31a009382 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultPending.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorConnectResultPending.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * The service is still completing the connection without a consent URL. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) @javax.annotation.processing.Generated("copilot-sdk-codegen") diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorMcpStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorMcpStatus.java index 97fbf5a9bf..d517230f4f 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorMcpStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorMcpStatus.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Live MCP status of one Connector-owned runtime server. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum ConnectorMcpStatus { /** The {@code connected} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorRuntimeStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorRuntimeStatus.java index 61f01b82fa..af01caaba8 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorRuntimeStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorRuntimeStatus.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Live status of one session-owned MCP projection. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorStatus.java index f1008008b6..29d6d33a3c 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ConnectorStatus.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * Authoritative session connector state. Account IDs are opaque routing identifiers and credentials are never included. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ContentExclusionPathCheck.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ContentExclusionPathCheck.java index ba48326c2e..5dd0809887 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ContentExclusionPathCheck.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ContentExclusionPathCheck.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Content-exclusion decision for one requested path. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/DiscoveredCanvas.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/DiscoveredCanvas.java index 0b0c518040..ce8759ee33 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/DiscoveredCanvas.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/DiscoveredCanvas.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * Canvas available in the current session. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProfile.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProfile.java index e7590c7f9e..a2c5bb7ed2 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProfile.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProfile.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import java.util.Map; import javax.annotation.processing.Generated; @@ -17,8 +18,11 @@ /** * Opaque integrator-owned process launch profile for one extension entrypoint. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProviderResolveRequest.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProviderResolveRequest.java index 7b520f9067..d33956d10d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProviderResolveRequest.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ExtensionLaunchProviderResolveRequest.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * A discovered extension entrypoint that the registered integrator may classify and resolve to an opaque launch profile. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java index 51b9077ba1..35470e7199 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Options for one factory-scoped subagent call. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java index d1bd2329b2..d063fc9c6b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Prompt-safe durable identity and live status for a direct factory agent. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java index e0a30f51a6..c15631835d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Current factory phase identity. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java index 7fa99b005b..7e2e4e6b5b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Declared or approved factory resource ceilings. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLine.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLine.java index 28a9690450..1f7afdd583 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLine.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLine.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * One ordered factory progress line. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java index aa96e0cb90..167766885c 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable lifecycle and timing for one factory phase. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseStatus.java index d9fea0bc36..8432507176 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseStatus.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Derived lifecycle state of a factory phase. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum FactoryPhaseStatus { /** The {@code pending} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressLine.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressLine.java index 3a26b67d79..c9ed149610 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressLine.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressLine.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * One durable factory progress record. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java index 76278a1585..935140612e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * A bidirectional page of factory progress. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java index a492db26f6..5ffc43435d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable factory resource consumption. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunLimits.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunLimits.java index 79304772a0..300e4977b3 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunLimits.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunLimits.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Wire-only per-invocation factory resource ceiling overrides. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java index e58b774bcb..56d1f91763 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable factory run summary with read-time live overlays. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java index 0123e19793..0b0db7d9b7 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Prompt-safe terminal factory outcome. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryToolRunOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryToolRunOptions.java index cc3e7c8da1..e2444c7053 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryToolRunOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryToolRunOptions.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Options for an internal tool-originated factory invocation. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryClientInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryClientInfo.java index b6bef1bffd..513fa2ec98 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryClientInfo.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryClientInfo.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Client environment metadata describing the process that produced a telemetry event. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryEvent.java index efbf920b4f..58c550af05 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryEvent.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.Map; import javax.annotation.processing.Generated; /** * A single telemetry event in the runtime's native GitHub-shaped telemetry format, forwarded verbatim to opted-in hosts. The `restricted` flag on the enclosing GitHubTelemetryNotification distinguishes standard from restricted events; the payload shape is identical for both. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java index 6059f1ff6c..7d1cf5b1a3 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTelemetryNotification.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Payload for a `gitHubTelemetry.event` notification: a single GitHub telemetry event the runtime forwards to a host connection that opted into telemetry forwarding during the `server.connect` handshake. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java index 59ba9d8ed5..890af9a526 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireRequest.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Asks the SDK client to acquire a GitHub access token from an opaque callback registration. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.java index a20724c337..f0d0b2d3ee 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/GitHubTokenAcquireResult.java @@ -10,11 +10,14 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * SDK host response to a GitHub credential request. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true) @@ -22,6 +25,7 @@ @JsonSubTypes.Type(value = GitHubTokenAcquireResultToken.class, name = "token"), @JsonSubTypes.Type(value = GitHubTokenAcquireResultCancelled.class, name = "cancelled") }) +@CopilotExperimental @JsonIgnoreProperties(ignoreUnknown = true) @javax.annotation.processing.Generated("copilot-sdk-codegen") public abstract class GitHubTokenAcquireResult { diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpExecuteSamplingResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpExecuteSamplingResult.java index 18a838d30c..07b07ab376 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpExecuteSamplingResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/McpExecuteSamplingResult.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * MCP CreateMessageResult payload (with optional 'tools' extension), present when action='success'. Treated as opaque at the schema layer; consumers should construct/consume it per the MCP CreateMessageResult shape. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelSwitchAutoTierStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelSwitchAutoTierStatus.java index e4a1baed5e..f3f607dbfd 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelSwitchAutoTierStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelSwitchAutoTierStatus.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Whether the requested preference was already effective or was accepted for later transactional activation. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum ModelSwitchAutoTierStatus { /** The {@code unchanged} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OpenCanvasInstance.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OpenCanvasInstance.java index f38ba82c4f..d84108e62b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OpenCanvasInstance.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/OpenCanvasInstance.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Open canvas instance snapshot. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionMode.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionMode.java index 1f4ea9b6bc..ddbd006872 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionMode.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionMode.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Current or requested permission mode. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum PermissionMode { /** The {@code manual} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionModeSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionModeSource.java index 107ac3f6d9..52f3e6cea3 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionModeSource.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PermissionModeSource.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Optional source for permission-mode telemetry. Defaults to `rpc` when omitted for SDK callers. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum PermissionModeSource { /** The {@code cli_flag} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefer.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefer.java index 58f1ec24d5..0129cf4091 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefer.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefer.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Controls whether the runtime may defer loading an external tool definition. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum ProtocolExternalToolDefer { /** The {@code auto} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefinition.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefinition.java index 5e7095700c..27d0c23a9b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefinition.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProtocolExternalToolDefinition.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.Map; import javax.annotation.processing.Generated; /** * Serializable definition of a caller-implemented tool whose execution is handled over the SDK connection. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java index 25cc365ab0..22c7414996 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProviderConfig.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.Map; import javax.annotation.processing.Generated; /** * Custom model-provider configuration (BYOK). * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RunOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RunOptions.java index 11ac51827a..ae535af8cf 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RunOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RunOptions.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Options controlling factory invocation. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java index dd522f7a34..0b02851782 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Resolved sandbox configuration. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java index e25eaed867..6fb780a3aa 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionError.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Classified SQLite transaction failure. busyOrLocked guarantees rollback; postCommitAmbiguous must never be retried. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionStatement.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionStatement.java index f56f268ba1..2d21d0a52c 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionStatement.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteTransactionStatement.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.Map; import javax.annotation.processing.Generated; /** * One statement in an atomic SQLite transaction. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ShellCredentials.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ShellCredentials.java index 53567c98db..01251b5a13 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ShellCredentials.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ShellCredentials.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** @@ -30,9 +31,12 @@ retained between spawns, replacing the session credential (`session.gitHubAuth.s presents, not about what the agent may touch, and it works on every platform whether or not an OS sandboxing backend is available. `sandboxConfig.auth` remains the sandbox-scoped spelling and is additive with this one. + * + * @apiNote This type is experimental and may change in a future version. * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TaskBlocker.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TaskBlocker.java index c54d63865d..bc61d79fa0 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TaskBlocker.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/TaskBlocker.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Structured reason that the task cannot continue without intervention * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultExpanded.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultExpanded.java index 47527cfec8..db2160eecb 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultExpanded.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultExpanded.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import java.util.Map; import javax.annotation.processing.Generated; @@ -17,8 +18,11 @@ /** * Expanded canonical result returned by a session tool. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultNewMessage.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultNewMessage.java index da203a0e98..59cc14d57a 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultNewMessage.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultNewMessage.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * A message injected by a tool result. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultType.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultType.java index bc3b5ae2ac..5b045c5f56 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultType.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ToolResultType.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Execution outcome classification. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum ToolResultType { /** The {@code success} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentOptions.java index d3774baf0c..4287f6016b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentOptions.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Options for one workflow-scoped subagent call. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentSummary.java index 17546d7c57..f486169cee 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentSummary.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowAgentSummary.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Prompt-safe durable identity and live status for a direct workflow agent. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowCurrentPhase.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowCurrentPhase.java index d89ec13e47..420a08e491 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowCurrentPhase.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowCurrentPhase.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Current workflow phase identity. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowDeclaredLimits.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowDeclaredLimits.java index d5caca470a..c211952f22 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowDeclaredLimits.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowDeclaredLimits.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Declared or approved workflow resource ceilings. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowLogLine.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowLogLine.java index 3338b9670f..d83d88bde8 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowLogLine.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowLogLine.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * One ordered workflow progress line. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseObservation.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseObservation.java index 1848365d8e..ad1f8dc888 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseObservation.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseObservation.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable lifecycle and timing for one workflow phase. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseStatus.java index 9029a3f410..5fc22b716b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowPhaseStatus.java @@ -7,13 +7,17 @@ package com.github.copilot.generated.rpc; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Derived lifecycle state of a workflow phase. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") public enum WorkflowPhaseStatus { /** The {@code pending} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressLine.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressLine.java index bed10aebe1..df06764ba6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressLine.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressLine.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * One durable workflow progress record. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressPage.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressPage.java index 733c0cfb86..fc18be0b47 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressPage.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowProgressPage.java @@ -10,14 +10,18 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import java.util.List; import javax.annotation.processing.Generated; /** * A bidirectional page of workflow progress. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunConsumed.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunConsumed.java index db72711af2..4da97259b7 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunConsumed.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunConsumed.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable workflow resource consumption. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunLimits.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunLimits.java index 1bdf9dc877..d4578878d1 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunLimits.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunLimits.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Wire-only per-invocation workflow resource ceiling overrides. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunOptions.java index 2ab3115d4a..f57fd13760 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunOptions.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Options controlling workflow invocation. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunSummary.java index 6c0288d616..8ad1bfecac 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunSummary.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunSummary.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Durable workflow run summary with read-time live overlays. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunTerminal.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunTerminal.java index 6563df4001..055cb4f358 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunTerminal.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowRunTerminal.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Prompt-safe terminal workflow outcome. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowToolRunOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowToolRunOptions.java index a14a606554..3a0f5099cf 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowToolRunOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/WorkflowToolRunOptions.java @@ -10,13 +10,17 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; import javax.annotation.processing.Generated; /** * Options for an internal tool-originated workflow invocation. * + * @apiNote This type is experimental and may change in a future version. + * * @since 1.0.0 */ +@CopilotExperimental @javax.annotation.processing.Generated("copilot-sdk-codegen") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/java/sdk/src/test/java/com/github/copilot/CopilotExperimentalProcessorTest.java b/java/sdk/src/test/java/com/github/copilot/CopilotExperimentalProcessorTest.java index b7005c5d52..3715235bc1 100644 --- a/java/sdk/src/test/java/com/github/copilot/CopilotExperimentalProcessorTest.java +++ b/java/sdk/src/test/java/com/github/copilot/CopilotExperimentalProcessorTest.java @@ -114,6 +114,27 @@ void failsByDefault_whenExtendingExperimentalType() { "Expected compile error for extending experimental type, got: " + diagnostics.getDiagnostics()); } + @Test + void failsByDefault_whenUsingGeneratedExperimentalConnectorTypes() { + for (String type : List.of("ConnectorAvailability", "ConnectorStatus", "ConnectorConnectResult", + "ConnectorConnectResultConnected")) { + String source = """ + package consumer; + import com.github.copilot.generated.rpc.%s; + public class Consumer { + private %s value; + } + """.formatted(type, type); + DiagnosticCollector diagnostics = compile( + List.of(inMemorySource("consumer.Consumer", source)), Collections.emptyList()); + + boolean hasError = diagnostics.getDiagnostics().stream().anyMatch( + d -> d.getKind() == Diagnostic.Kind.ERROR && d.getMessage(null).contains("experimental API")); + assertTrue(hasError, "Expected compile error for generated experimental type " + type + ", got: " + + diagnostics.getDiagnostics()); + } + } + @Test void passes_whenAllowAnnotationIsOnType() { DiagnosticCollector diagnostics = compile( diff --git a/java/sdk/src/test/java/com/github/copilot/RpcWrappersTest.java b/java/sdk/src/test/java/com/github/copilot/RpcWrappersTest.java index 022e07de2b..396d076ff5 100644 --- a/java/sdk/src/test/java/com/github/copilot/RpcWrappersTest.java +++ b/java/sdk/src/test/java/com/github/copilot/RpcWrappersTest.java @@ -20,6 +20,19 @@ import com.github.copilot.generated.rpc.RpcCaller; import com.github.copilot.generated.rpc.ServerRpc; import com.github.copilot.generated.rpc.SessionAgentSelectParams; +import com.github.copilot.generated.rpc.SessionConnectorsConnectParams; +import com.github.copilot.generated.rpc.SessionConnectorsContinueConnectionParams; +import com.github.copilot.generated.rpc.SessionConnectorsDisconnectParams; +import com.github.copilot.generated.rpc.SessionConnectorsDisconnectResult; +import com.github.copilot.generated.rpc.SessionConnectorsGetCapabilitiesResult; +import com.github.copilot.generated.rpc.SessionConnectorsGetStatusResult; +import com.github.copilot.generated.rpc.SessionConnectorsListParams; +import com.github.copilot.generated.rpc.SessionConnectorsListResult; +import com.github.copilot.generated.rpc.SessionConnectorsReconcileParams; +import com.github.copilot.generated.rpc.SessionConnectorsReconcileResult; +import com.github.copilot.generated.rpc.SessionConnectorsReconnectParams; +import com.github.copilot.generated.rpc.SessionConnectorsRefreshParams; +import com.github.copilot.generated.rpc.SessionConnectorsRefreshResult; import com.github.copilot.generated.rpc.SessionModelSwitchToParams; import com.github.copilot.generated.rpc.SessionRpc; @@ -43,7 +56,7 @@ class RpcWrappersTest { */ private static final class StubCaller implements RpcCaller { - static record Call(String method, Object params) { + static record Call(String method, Object params, Class resultType) { } final List calls = new ArrayList<>(); @@ -52,7 +65,7 @@ static record Call(String method, Object params) { @Override @SuppressWarnings("unchecked") public CompletableFuture invoke(String method, Object params, Class resultType) { - calls.add(new Call(method, params)); + calls.add(new Call(method, params, resultType)); return CompletableFuture.completedFuture((T) nextResult); } } @@ -181,6 +194,61 @@ void sessionRpc_instantiates_with_all_namespace_fields() { assertNotNull(session.shell); assertNotNull(session.history); assertNotNull(session.usage); + assertNotNull(session.connectors); + } + + @Test + @AllowCopilotExperimental + void sessionRpc_connectors_exposes_host_lifecycle_methods() { + var stub = new StubCaller(); + var session = new SessionRpc(stub, "sess-connectors"); + + session.connectors.getCapabilities(); + session.connectors.getStatus(); + session.connectors.list(new SessionConnectorsListParams("ignored-session", "account-1")); + session.connectors.refresh(new SessionConnectorsRefreshParams("ignored-session", "account-1")); + session.connectors.connect(new SessionConnectorsConnectParams("ignored-session", "account-1", "outlook")); + session.connectors.reconnect(new SessionConnectorsReconnectParams("ignored-session", "account-1", "outlook")); + session.connectors.continueConnection(new SessionConnectorsContinueConnectionParams("ignored-session", + "continuation-1", 3L, 1_000L, 30_000L)); + session.connectors.disconnect(new SessionConnectorsDisconnectParams("ignored-session", "account-1", "outlook")); + session.connectors.reconcile(new SessionConnectorsReconcileParams("ignored-session", "account-1", true)); + + assertEquals(9, stub.calls.size()); + assertConnectorCall(stub.calls.get(0), "session.connectors.getCapabilities", + SessionConnectorsGetCapabilitiesResult.class); + assertConnectorCall(stub.calls.get(1), "session.connectors.getStatus", SessionConnectorsGetStatusResult.class); + + var listParams = assertConnectorCall(stub.calls.get(2), "session.connectors.list", + SessionConnectorsListResult.class); + assertEquals("account-1", listParams.get("accountId").asText()); + + var refreshParams = assertConnectorCall(stub.calls.get(3), "session.connectors.refresh", + SessionConnectorsRefreshResult.class); + assertEquals("account-1", refreshParams.get("accountId").asText()); + + var connectParams = assertConnectorCall(stub.calls.get(4), "session.connectors.connect", + com.github.copilot.generated.rpc.ConnectorConnectResult.class); + assertEquals("outlook", connectParams.get("connectorName").asText()); + + var reconnectParams = assertConnectorCall(stub.calls.get(5), "session.connectors.reconnect", + com.github.copilot.generated.rpc.ConnectorConnectResult.class); + assertEquals("outlook", reconnectParams.get("connectorName").asText()); + + var continueParams = assertConnectorCall(stub.calls.get(6), "session.connectors.continueConnection", + com.github.copilot.generated.rpc.ConnectorConnectResult.class); + assertEquals("continuation-1", continueParams.get("continuationId").asText()); + assertEquals(3L, continueParams.get("maxAttempts").asLong()); + assertEquals(1_000L, continueParams.get("pollIntervalMs").asLong()); + assertEquals(30_000L, continueParams.get("deadlineMs").asLong()); + + var disconnectParams = assertConnectorCall(stub.calls.get(7), "session.connectors.disconnect", + SessionConnectorsDisconnectResult.class); + assertEquals("outlook", disconnectParams.get("connectorName").asText()); + + var reconcileParams = assertConnectorCall(stub.calls.get(8), "session.connectors.reconcile", + SessionConnectorsReconcileResult.class); + assertTrue(reconcileParams.get("refreshCatalog").asBoolean()); } @Test @@ -362,6 +430,7 @@ void copilotSession_getRpc_all_namespace_fields_present() throws Exception { assertNotNull(sessionRpc.permissions); assertNotNull(sessionRpc.commands); assertNotNull(sessionRpc.ui); + assertNotNull(sessionRpc.connectors); } } @@ -462,6 +531,15 @@ void sessionRpc_mcp_apps_callTool_returns_jsonNode_payload() throws Exception { assertEquals(false, result.get("isError").asBoolean()); } + private static com.fasterxml.jackson.databind.JsonNode assertConnectorCall(StubCaller.Call call, + String expectedMethod, Class expectedResultType) { + assertEquals(expectedMethod, call.method()); + assertEquals(expectedResultType, call.resultType()); + var params = new ObjectMapper().valueToTree(call.params()); + assertEquals("sess-connectors", params.get("sessionId").asText()); + return params; + } + /** * Helper that creates a loopback socket pair. The client side is used by * {@link JsonRpcClient}; the server side can be read to inspect outbound diff --git a/java/sdk/src/test/java/com/github/copilot/generated/rpc/ConnectorSerializationTest.java b/java/sdk/src/test/java/com/github/copilot/generated/rpc/ConnectorSerializationTest.java new file mode 100644 index 0000000000..281569b8f1 --- /dev/null +++ b/java/sdk/src/test/java/com/github/copilot/generated/rpc/ConnectorSerializationTest.java @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +package com.github.copilot.generated.rpc; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.copilot.AllowCopilotExperimental; + +@AllowCopilotExperimental +class ConnectorSerializationTest { + + private static final ObjectMapper MAPPER = new ObjectMapper(); + + @Test + void connectorConnectResult_roundTrips_all_variants() throws Exception { + var connected = roundTrip(""" + { + "kind": "connected", + "status": { + "apiVersion": 1, + "availability": "enabled", + "accountId": "account-1", + "catalog": { + "revision": 7, + "refreshedAtMs": 1000, + "connectors": [{ + "name": "outlook", + "displayName": "Outlook", + "description": "Mail and calendar", + "status": "connected", + "runtimeServerIds": ["connector-outlook"] + }] + }, + "runtimeServers": [{ + "runtimeServerId": "connector-outlook", + "connectorName": "outlook", + "status": "connected" + }], + "pendingConnections": 0 + } + } + """, ConnectorConnectResultConnected.class); + assertEquals(ConnectorAvailability.ENABLED, connected.getStatus().availability()); + assertEquals(ConnectorCatalogStatus.CONNECTED, connected.getStatus().catalog().connectors().get(0).status()); + assertEquals(ConnectorMcpStatus.CONNECTED, connected.getStatus().runtimeServers().get(0).status()); + + var consentRequired = roundTrip(""" + { + "kind": "consent_required", + "consentUrl": "https://example.com/consent", + "continuationId": "continuation-1" + } + """, ConnectorConnectResultConsentRequired.class); + assertEquals("https://example.com/consent", consentRequired.getConsentUrl()); + assertEquals("continuation-1", consentRequired.getContinuationId()); + + var pending = roundTrip(""" + { + "kind": "pending", + "continuationId": "continuation-2" + } + """, ConnectorConnectResultPending.class); + assertEquals("continuation-2", pending.getContinuationId()); + } + + @Test + void connectorGeneratedRecords_preserve_wire_names_and_null_omission() throws Exception { + var params = new SessionConnectorsContinueConnectionParams(null, "continuation-1", 4L, 500L, 10_000L); + + var json = MAPPER.readTree(MAPPER.writeValueAsString(params)); + + assertFalse(json.has("sessionId")); + assertEquals("continuation-1", json.get("continuationId").asText()); + assertEquals(4L, json.get("maxAttempts").asLong()); + assertEquals(500L, json.get("pollIntervalMs").asLong()); + assertEquals(10_000L, json.get("deadlineMs").asLong()); + assertEquals(params, MAPPER.treeToValue(json, SessionConnectorsContinueConnectionParams.class)); + } + + private static T roundTrip(String json, Class expectedType) throws Exception { + var result = MAPPER.readValue(json, ConnectorConnectResult.class); + var typedResult = assertInstanceOf(expectedType, result); + assertEquals(typedResult.getKind(), + MAPPER.readTree(MAPPER.writeValueAsString(typedResult)).get("kind").asText()); + + var serialized = MAPPER.writeValueAsString(typedResult); + return assertInstanceOf(expectedType, MAPPER.readValue(serialized, ConnectorConnectResult.class)); + } +} diff --git a/nodejs/README.md b/nodejs/README.md index 90aa8a717a..1ffd70a729 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -480,6 +480,20 @@ Capabilities may update during the session. For example, when another client joi Interactive UI methods for showing dialogs to the user. Only available when the CLI host supports elicitation (`session.capabilities.ui?.elicitation === true`). See [UI Elicitation](#ui-elicitation) for full details. +##### `rpc.connectors` _(experimental)_ + +The generated Connector namespace exposes `getCapabilities`, `getStatus`, +`list`, `refresh`, `connect`, `reconnect`, `continueConnection`, `disconnect`, +and `reconcile`. The runtime owns Connector service calls, bounded polling, and +session MCP reconciliation. Your application chooses the opaque account ID, +opens returned consent URLs, confirms destructive actions, and renders UI. +Pass only the host-selected account ID; Connector methods do not accept or +return credentials or provider tokens. + +Check `getCapabilities()` before use. Connector support remains default-off +unless enabled by the connected runtime. See +[Using MCP servers](../docs/features/mcp.md#copilot-connectors). + ##### `destroy(): Promise` _(deprecated)_ Deprecated — use `disconnect()` instead. diff --git a/nodejs/src/index.ts b/nodejs/src/index.ts index 42adbe30f6..c46742d853 100644 --- a/nodejs/src/index.ts +++ b/nodejs/src/index.ts @@ -61,6 +61,20 @@ export type { CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, + ConnectorAccountRequest, + ConnectorAvailability, + ConnectorCapabilities, + ConnectorCatalogEntry, + ConnectorCatalogResult, + ConnectorCatalogStatus, + ConnectorConnectRequest, + ConnectorConnectResult, + ConnectorContinueRequest, + ConnectorDisconnectResult, + ConnectorMcpStatus, + ConnectorReconcileRequest, + ConnectorRuntimeStatus, + ConnectorStatus, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 6a19116a37..9c5705f9c8 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -36,6 +36,20 @@ import type { ToolSet } from "./toolSet.js"; export type { RemoteSessionMode } from "./generated/rpc.js"; export type { CurrentToolMetadata } from "./generated/rpc.js"; export type { + ConnectorAccountRequest, + ConnectorAvailability, + ConnectorCapabilities, + ConnectorCatalogEntry, + ConnectorCatalogResult, + ConnectorCatalogStatus, + ConnectorConnectRequest, + ConnectorConnectResult, + ConnectorContinueRequest, + ConnectorDisconnectResult, + ConnectorMcpStatus, + ConnectorReconcileRequest, + ConnectorRuntimeStatus, + ConnectorStatus, ExtensionLaunchProfile, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, diff --git a/nodejs/test/connectors.test.ts b/nodejs/test/connectors.test.ts new file mode 100644 index 0000000000..b6046a434d --- /dev/null +++ b/nodejs/test/connectors.test.ts @@ -0,0 +1,147 @@ +import { describe, expect, it, vi } from "vitest"; +import type { MessageConnection } from "vscode-jsonrpc"; + +import { CopilotSession } from "../src/session.js"; + +describe("session Connector RPC", () => { + it("exposes the host-owned experimental Connector lifecycle", async () => { + const sendRequest = vi.fn(async (method: string) => { + if (method === "session.connectors.getCapabilities") { + return { + apiVersion: 1, + availability: "enabled", + consentContinuation: true, + opaqueAccountSelection: true, + maxPollAttempts: 30, + maxPollIntervalMs: 2_000, + maxDeadlineMs: 60_000, + }; + } + if (method === "session.connectors.list" || method === "session.connectors.refresh") { + return { revision: 1, refreshedAtMs: 1, connectors: [] }; + } + if (method === "session.connectors.connect") { + return { + kind: "consent_required", + consentUrl: "https://example.com/consent", + continuationId: "continuation-1", + }; + } + if ( + method === "session.connectors.reconnect" || + method === "session.connectors.continueConnection" + ) { + return { kind: "pending", continuationId: "continuation-1" }; + } + if (method === "session.connectors.disconnect") { + return { disconnected: true, status: connectorStatus() }; + } + return connectorStatus(); + }); + const session = new CopilotSession("session-1", { + sendRequest, + } as unknown as MessageConnection); + + expect(await session.rpc.connectors.getCapabilities()).toMatchObject({ + apiVersion: 1, + availability: "enabled", + }); + expect(await session.rpc.connectors.getStatus()).toEqual(connectorStatus()); + expect(await session.rpc.connectors.list({ accountId: "account-1" })).toMatchObject({ + revision: 1, + }); + expect(await session.rpc.connectors.refresh({ accountId: "account-1" })).toMatchObject({ + revision: 1, + }); + expect( + await session.rpc.connectors.connect({ + accountId: "account-1", + connectorName: "calendar", + }) + ).toMatchObject({ kind: "consent_required" }); + expect( + await session.rpc.connectors.reconnect({ + accountId: "account-1", + connectorName: "calendar", + }) + ).toMatchObject({ kind: "pending" }); + expect( + await session.rpc.connectors.continueConnection({ + continuationId: "continuation-1", + maxAttempts: 3, + pollIntervalMs: 100, + deadlineMs: 1_000, + }) + ).toMatchObject({ kind: "pending" }); + expect( + await session.rpc.connectors.disconnect({ + accountId: "account-1", + connectorName: "calendar", + }) + ).toMatchObject({ disconnected: true }); + expect( + await session.rpc.connectors.reconcile({ + accountId: "account-1", + refreshCatalog: true, + }) + ).toEqual(connectorStatus()); + + expect(sendRequest.mock.calls).toEqual([ + ["session.connectors.getCapabilities", { sessionId: "session-1" }], + ["session.connectors.getStatus", { sessionId: "session-1" }], + ["session.connectors.list", { sessionId: "session-1", accountId: "account-1" }], + ["session.connectors.refresh", { sessionId: "session-1", accountId: "account-1" }], + [ + "session.connectors.connect", + { + sessionId: "session-1", + accountId: "account-1", + connectorName: "calendar", + }, + ], + [ + "session.connectors.reconnect", + { + sessionId: "session-1", + accountId: "account-1", + connectorName: "calendar", + }, + ], + [ + "session.connectors.continueConnection", + { + sessionId: "session-1", + continuationId: "continuation-1", + maxAttempts: 3, + pollIntervalMs: 100, + deadlineMs: 1_000, + }, + ], + [ + "session.connectors.disconnect", + { + sessionId: "session-1", + accountId: "account-1", + connectorName: "calendar", + }, + ], + [ + "session.connectors.reconcile", + { + sessionId: "session-1", + accountId: "account-1", + refreshCatalog: true, + }, + ], + ]); + }); +}); + +function connectorStatus() { + return { + apiVersion: 1, + availability: "enabled" as const, + runtimeServers: [], + pendingConnections: 0, + }; +} diff --git a/python/README.md b/python/README.md index 6802682ee3..a51e7ee037 100644 --- a/python/README.md +++ b/python/README.md @@ -339,6 +339,20 @@ Initial acquisition runs during session creation or resume. Cancellation, provid - `available_tools` / `excluded_tools` / `default_agent.excluded_tools` / custom-agent `tools`: MCP tools registered from `mcp_servers` are exposed to the runtime as `-`. For `available_tools` and `excluded_tools`, prefer `ToolSet().add_mcp("-")` or the raw `mcp:-` form. For custom-agent `tools` and `default_agent.excluded_tools`, use `-` directly. +**Copilot Connectors (experimental):** + +`session.rpc.connectors` exposes `get_capabilities`, `get_status`, `list`, +`refresh`, `connect`, `reconnect`, `continue_connection`, `disconnect`, and +`reconcile`. The runtime owns Connector service calls, bounded polling, and MCP +reconciliation. Your application chooses the opaque account ID, opens returned +consent URLs, confirms destructive actions, and renders UI. +Pass only the host-selected account ID; Connector methods do not accept or +return credentials or provider tokens. + +Check `get_capabilities()` before use. Connector support remains default-off +unless enabled by the connected runtime. See +[Using MCP servers](../docs/features/mcp.md#copilot-connectors). + **Session Lifecycle Methods:** ```python diff --git a/python/test_connectors.py b/python/test_connectors.py new file mode 100644 index 0000000000..9c7e63a435 --- /dev/null +++ b/python/test_connectors.py @@ -0,0 +1,148 @@ +from unittest.mock import AsyncMock, Mock + +import pytest + +from copilot.generated.rpc import ( + ConnectorAccountRequest, + ConnectorAvailability, + ConnectorConnectRequest, + ConnectorConnectResultKind, + ConnectorContinueRequest, + ConnectorReconcileRequest, +) +from copilot.session import CopilotSession + + +@pytest.mark.asyncio +async def test_session_connectors_exposes_host_lifecycle_api(): + transport = Mock() + transport.request = AsyncMock(side_effect=connector_response) + session = CopilotSession("session-1", transport) + + capabilities = await session.rpc.connectors.get_capabilities() + assert capabilities.availability is ConnectorAvailability.ENABLED + assert (await session.rpc.connectors.get_status()).api_version == 1 + assert ( + await session.rpc.connectors.list(ConnectorAccountRequest(account_id="account-1")) + ).revision == 1 + assert ( + await session.rpc.connectors.refresh(ConnectorAccountRequest(account_id="account-1")) + ).revision == 1 + + request = ConnectorConnectRequest(account_id="account-1", connector_name="calendar") + consent = await session.rpc.connectors.connect(request) + assert consent.kind is ConnectorConnectResultKind.CONSENT_REQUIRED + assert consent.consent_url == "https://example.com/consent" + assert consent.continuation_id == "continuation-1" + + reconnect = await session.rpc.connectors.reconnect(request) + assert reconnect.kind is ConnectorConnectResultKind.PENDING + assert reconnect.continuation_id == "continuation-1" + + continued = await session.rpc.connectors.continue_connection( + ConnectorContinueRequest( + continuation_id="continuation-1", + max_attempts=3, + poll_interval_ms=100, + deadline_ms=1_000, + ) + ) + assert continued.kind is ConnectorConnectResultKind.PENDING + assert continued.continuation_id == "continuation-1" + + assert (await session.rpc.connectors.disconnect(request)).disconnected + assert ( + await session.rpc.connectors.reconcile( + ConnectorReconcileRequest(account_id="account-1", refresh_catalog=True) + ) + ).api_version == 1 + + assert [(call.args[0], call.args[1]) for call in transport.request.await_args_list] == [ + ("session.connectors.getCapabilities", {"sessionId": "session-1"}), + ("session.connectors.getStatus", {"sessionId": "session-1"}), + ( + "session.connectors.list", + {"accountId": "account-1", "sessionId": "session-1"}, + ), + ( + "session.connectors.refresh", + {"accountId": "account-1", "sessionId": "session-1"}, + ), + ( + "session.connectors.connect", + { + "accountId": "account-1", + "connectorName": "calendar", + "sessionId": "session-1", + }, + ), + ( + "session.connectors.reconnect", + { + "accountId": "account-1", + "connectorName": "calendar", + "sessionId": "session-1", + }, + ), + ( + "session.connectors.continueConnection", + { + "continuationId": "continuation-1", + "deadlineMs": 1_000, + "maxAttempts": 3, + "pollIntervalMs": 100, + "sessionId": "session-1", + }, + ), + ( + "session.connectors.disconnect", + { + "accountId": "account-1", + "connectorName": "calendar", + "sessionId": "session-1", + }, + ), + ( + "session.connectors.reconcile", + { + "accountId": "account-1", + "refreshCatalog": True, + "sessionId": "session-1", + }, + ), + ] + + +def connector_response(method, _params, **_kwargs): + if method == "session.connectors.getCapabilities": + return { + "apiVersion": 1, + "availability": "enabled", + "consentContinuation": True, + "opaqueAccountSelection": True, + "maxPollAttempts": 30, + "maxPollIntervalMs": 2_000, + "maxDeadlineMs": 60_000, + } + if method in ("session.connectors.list", "session.connectors.refresh"): + return {"revision": 1, "refreshedAtMs": 1, "connectors": []} + if method == "session.connectors.connect": + return { + "kind": "consent_required", + "consentUrl": "https://example.com/consent", + "continuationId": "continuation-1", + } + if method in ("session.connectors.reconnect", "session.connectors.continueConnection"): + return {"kind": "pending", "continuationId": "continuation-1"} + if method == "session.connectors.disconnect": + return {"disconnected": True, "status": connector_status()} + return connector_status() + + +def connector_status(): + return { + "apiVersion": 1, + "availability": "enabled", + "runtimeServers": [], + "pendingConnections": 0, + } diff --git a/rust/README.md b/rust/README.md index 47eb980ee2..360b19b40a 100644 --- a/rust/README.md +++ b/rust/README.md @@ -257,6 +257,53 @@ New RPCs land in the namespace immediately as the schema regenerates; helpers are added on top only when an ergonomic story is worth the maintenance. +#### Connectors (experimental) + +When the experimental runtime Connector API is available, use the generated +session-scoped namespace to discover and manage Connectors: + +```rust,ignore +use github_copilot_sdk::rpc::{ + ConnectorAccountRequest, ConnectorAvailability, ConnectorConnectRequest, + ConnectorReconcileRequest, +}; + +let capabilities = session.rpc().connectors().get_capabilities().await?; +if capabilities.availability == ConnectorAvailability::Enabled { + let account_id = "selected-account".to_string(); + let catalog = session + .rpc() + .connectors() + .list(ConnectorAccountRequest { + account_id: account_id.clone(), + }) + .await?; + session + .rpc() + .connectors() + .reconcile(ConnectorReconcileRequest { + account_id: account_id.clone(), + refresh_catalog: None, + }) + .await?; + let connection = session + .rpc() + .connectors() + .connect(ConnectorConnectRequest { + account_id, + connector_name: catalog.connectors[0].name.clone(), + }) + .await?; +} +``` + +The namespace also provides `get_status`, `refresh`, `reconnect`, +`continue_connection`, `disconnect`, and `reconcile`. Hosts select an opaque +GitHub account ID and own consent and browser UI. Connector methods accept only +that account ID, never credentials or provider tokens; the runtime returns +validated consent URLs and owns MCP reconciliation. This API is experimental, +so check its reported availability before use. + ### Handler Traits The SDK exposes five focused handler traits, one per CLI callback type. Implement only the traits you need and install each with the matching `SessionConfig` setter. Each trait has a single `async fn handle(...)` method: diff --git a/rust/tests/api_types_test.rs b/rust/tests/api_types_test.rs index 546adaa510..6db8d9d084 100644 --- a/rust/tests/api_types_test.rs +++ b/rust/tests/api_types_test.rs @@ -4,12 +4,13 @@ #![allow(clippy::unwrap_used)] use github_copilot_sdk::rpc::{ - AcceptedEnqueueCommandResult, EnqueueCommandResult, Extension, ExtensionList, ExtensionSource, - ExtensionStatus, ExtensionsDisableRequest, ExtensionsEnableRequest, FleetStartRequest, - FleetStartResult, ModelSetAllowedModelsRequest, ModelSetAllowedModelsResult, - ModelSwitchAutoTierRequest, ModelSwitchAutoTierResult, ModelSwitchAutoTierStatus, - QueuePendingItems, QueuePendingItemsKind, SandboxConfig, SendAgentMode, TasksStartAgentRequest, - UnsupportedEnqueueCommandResult, + AcceptedEnqueueCommandResult, ConnectorAccountRequest, ConnectorCatalogStatus, + ConnectorConnectRequest, ConnectorContinueRequest, ConnectorReconcileRequest, + EnqueueCommandResult, Extension, ExtensionList, ExtensionSource, ExtensionStatus, + ExtensionsDisableRequest, ExtensionsEnableRequest, FleetStartRequest, FleetStartResult, + ModelSetAllowedModelsRequest, ModelSetAllowedModelsResult, ModelSwitchAutoTierRequest, + ModelSwitchAutoTierResult, ModelSwitchAutoTierStatus, QueuePendingItems, QueuePendingItemsKind, + SandboxConfig, SendAgentMode, TasksStartAgentRequest, UnsupportedEnqueueCommandResult, }; use github_copilot_sdk::session_events::{ PermissionRequest, PermissionRequestedData, SessionEventData, TypedSessionEvent, @@ -131,6 +132,68 @@ fn tasks_start_agent_request_fields_are_accessible() { assert_eq!(request.description.as_deref(), Some("SDK task agent")); } +#[test] +fn connector_request_dtos_use_public_camel_case_wire_fields() { + let account = ConnectorAccountRequest { + account_id: "account-1".to_string(), + }; + assert_eq!( + serde_json::to_value(account).unwrap(), + serde_json::json!({ "accountId": "account-1" }) + ); + + let connector = ConnectorConnectRequest { + account_id: "account-1".to_string(), + connector_name: "github".to_string(), + }; + assert_eq!( + serde_json::to_value(connector).unwrap(), + serde_json::json!({ + "accountId": "account-1", + "connectorName": "github", + }) + ); + + let continuation = ConnectorContinueRequest { + continuation_id: "continuation-1".to_string(), + deadline_ms: 30_000, + max_attempts: 5, + poll_interval_ms: 1_000, + }; + assert_eq!( + serde_json::to_value(continuation).unwrap(), + serde_json::json!({ + "continuationId": "continuation-1", + "deadlineMs": 30_000, + "maxAttempts": 5, + "pollIntervalMs": 1_000, + }) + ); + + let reconcile = ConnectorReconcileRequest { + account_id: "account-1".to_string(), + refresh_catalog: Some(true), + }; + assert_eq!( + serde_json::to_value(reconcile).unwrap(), + serde_json::json!({ + "accountId": "account-1", + "refreshCatalog": true, + }) + ); +} + +#[test] +fn connector_catalog_unknown_wire_value_has_a_distinct_variant() { + let service_unknown: ConnectorCatalogStatus = + serde_json::from_value(serde_json::json!("unknown")).unwrap(); + let future_status: ConnectorCatalogStatus = + serde_json::from_value(serde_json::json!("future_status")).unwrap(); + + assert_eq!(service_unknown, ConnectorCatalogStatus::UnknownValue); + assert_eq!(future_status, ConnectorCatalogStatus::Unknown); +} + #[test] fn model_allowed_models_request_and_result_preserve_contract_fields() { let replace = ModelSetAllowedModelsRequest { diff --git a/rust/tests/session_test.rs b/rust/tests/session_test.rs index 920eed4561..26491827dc 100644 --- a/rust/tests/session_test.rs +++ b/rust/tests/session_test.rs @@ -19,7 +19,11 @@ use github_copilot_sdk::handler::{ }; use github_copilot_sdk::rpc::{ CanvasProviderInvokeActionRequest, CanvasProviderOpenRequest, CanvasProviderOpenResult, - ModelSetAllowedModelsRequest, OpenCanvasInstance, SendAgentMode, SendMode, SendRequest, + ConnectorAccountRequest, ConnectorAvailability, ConnectorCapabilities, ConnectorCatalogResult, + ConnectorCatalogStatus, ConnectorConnectRequest, ConnectorConnectResult, + ConnectorContinueRequest, ConnectorDisconnectResult, ConnectorMcpStatus, + ConnectorReconcileRequest, ConnectorStatus, ModelSetAllowedModelsRequest, OpenCanvasInstance, + SendAgentMode, SendMode, SendRequest, SessionRpcConnectors, }; use github_copilot_sdk::session_events::{ ManagedSettingsResolvedSource, McpOauthRequiredData, ReasoningSummary, SessionLimitsConfig, @@ -6156,6 +6160,235 @@ async fn rpc_namespace_session_tasks_list_dispatches_correctly() { assert!(result.tasks.is_empty()); } +#[tokio::test] +async fn rpc_namespace_session_connectors_dispatches_all_methods() { + let (session, mut server) = create_session_pair().await; + let session_id = server.session_id.clone(); + let catalog = serde_json::json!({ + "connectors": [{ + "description": "Source control", + "displayName": "GitHub", + "name": "github", + "runtimeServerIds": ["connector-github"], + "status": "connected" + }], + "refreshedAtMs": 1_726_668_000_000_i64, + "revision": 4 + }); + let status = serde_json::json!({ + "accountId": "account-1", + "apiVersion": 1, + "availability": "enabled", + "catalog": catalog.clone(), + "pendingConnections": 0, + "runtimeServers": [{ + "connectorName": "github", + "runtimeServerId": "connector-github", + "status": "connected" + }] + }); + let capabilities = serde_json::json!({ + "apiVersion": 1, + "availability": "enabled", + "consentContinuation": true, + "maxDeadlineMs": 60_000, + "maxPollAttempts": 10, + "maxPollIntervalMs": 5_000, + "opaqueAccountSelection": true + }); + + let server_handle = tokio::spawn(async move { + let expectations = [ + ( + "session.connectors.getCapabilities", + serde_json::json!({ "sessionId": session_id }), + capabilities, + ), + ( + "session.connectors.getStatus", + serde_json::json!({ "sessionId": session_id }), + status.clone(), + ), + ( + "session.connectors.list", + serde_json::json!({ + "accountId": "account-1", + "sessionId": session_id + }), + catalog.clone(), + ), + ( + "session.connectors.refresh", + serde_json::json!({ + "accountId": "account-1", + "sessionId": session_id + }), + catalog, + ), + ( + "session.connectors.connect", + serde_json::json!({ + "accountId": "account-1", + "connectorName": "github", + "sessionId": session_id + }), + serde_json::json!({ + "kind": "connected", + "status": status.clone() + }), + ), + ( + "session.connectors.reconnect", + serde_json::json!({ + "accountId": "account-1", + "connectorName": "github", + "sessionId": session_id + }), + serde_json::json!({ + "consentUrl": "https://example.test/consent", + "continuationId": "continuation-1", + "kind": "consent_required" + }), + ), + ( + "session.connectors.continueConnection", + serde_json::json!({ + "continuationId": "continuation-1", + "deadlineMs": 60_000, + "maxAttempts": 10, + "pollIntervalMs": 1_000, + "sessionId": session_id + }), + serde_json::json!({ + "continuationId": "continuation-2", + "kind": "pending" + }), + ), + ( + "session.connectors.disconnect", + serde_json::json!({ + "accountId": "account-1", + "connectorName": "github", + "sessionId": session_id + }), + serde_json::json!({ + "disconnected": true, + "status": status.clone() + }), + ), + ( + "session.connectors.reconcile", + serde_json::json!({ + "accountId": "account-1", + "refreshCatalog": true, + "sessionId": session_id + }), + status, + ), + ]; + + for (method, params, result) in expectations { + let request = server.read_request().await; + assert_eq!(request["method"], method); + assert_eq!(request["params"], params); + server.respond(&request, result).await; + } + }); + + let connectors: SessionRpcConnectors<'_> = session.rpc().connectors(); + + let capabilities: ConnectorCapabilities = connectors.get_capabilities().await.unwrap(); + assert_eq!(capabilities.availability, ConnectorAvailability::Enabled); + assert_eq!(capabilities.max_poll_attempts, 10); + + let status: ConnectorStatus = connectors.get_status().await.unwrap(); + assert_eq!(status.account_id.as_deref(), Some("account-1")); + assert_eq!( + status.runtime_servers[0].status, + ConnectorMcpStatus::Connected + ); + + let catalog: ConnectorCatalogResult = connectors + .list(ConnectorAccountRequest { + account_id: "account-1".to_string(), + }) + .await + .unwrap(); + assert_eq!( + catalog.connectors[0].status, + ConnectorCatalogStatus::Connected + ); + + let refreshed: ConnectorCatalogResult = connectors + .refresh(ConnectorAccountRequest { + account_id: "account-1".to_string(), + }) + .await + .unwrap(); + assert_eq!(refreshed.revision, 4); + + let connected: ConnectorConnectResult = connectors + .connect(ConnectorConnectRequest { + account_id: "account-1".to_string(), + connector_name: "github".to_string(), + }) + .await + .unwrap(); + let ConnectorConnectResult::Connected(connected) = connected else { + panic!("expected connected result"); + }; + assert_eq!( + connected.status.availability, + ConnectorAvailability::Enabled + ); + + let reconnect: ConnectorConnectResult = connectors + .reconnect(ConnectorConnectRequest { + account_id: "account-1".to_string(), + connector_name: "github".to_string(), + }) + .await + .unwrap(); + let ConnectorConnectResult::ConsentRequired(consent) = reconnect else { + panic!("expected consent-required result"); + }; + assert_eq!(consent.continuation_id, "continuation-1"); + + let continuation: ConnectorConnectResult = connectors + .continue_connection(ConnectorContinueRequest { + continuation_id: "continuation-1".to_string(), + deadline_ms: 60_000, + max_attempts: 10, + poll_interval_ms: 1_000, + }) + .await + .unwrap(); + let ConnectorConnectResult::Pending(pending) = continuation else { + panic!("expected pending result"); + }; + assert_eq!(pending.continuation_id, "continuation-2"); + + let disconnected: ConnectorDisconnectResult = connectors + .disconnect(ConnectorConnectRequest { + account_id: "account-1".to_string(), + connector_name: "github".to_string(), + }) + .await + .unwrap(); + assert!(disconnected.disconnected); + + let reconciled: ConnectorStatus = connectors + .reconcile(ConnectorReconcileRequest { + account_id: "account-1".to_string(), + refresh_catalog: Some(true), + }) + .await + .unwrap(); + assert_eq!(reconciled.catalog.unwrap().revision, 4); + + timeout(TIMEOUT, server_handle).await.unwrap().unwrap(); +} + #[tokio::test] async fn rpc_namespace_client_models_list_dispatches_correctly() { let (session, mut server) = create_session_pair().await;