Skip to content

Commit 14bf1f8

Browse files
patnikoPatrickCopilot
authored
docs: refresh for GA; add cloud sessions, fleet mode, multi-tenancy guides (#1481)
* docs: refresh for GA; add cloud sessions, fleet mode, multi-tenancy guides - Remove public/technical preview language across root + all SDK READMEs - Match copilot-agent-runtime GA wording (lowercase 'generally available', no banners) - Add docs/setup/multi-tenancy.md, docs/features/cloud-sessions.md, docs/features/fleet-mode.md - Split cloud sessions out of remote-sessions.md - Correct claims: .NET package name, Python install, Java version placeholder + JDK 21+, Go ctx.Context signatures, Node TS 5.2+/Node 20+, Rust permission handler API - Document skipPermission, per-session gitHubToken, BYOK wireApi, assistant.usage.apiEndpoint, fleet-mode compatibility - Mark java ADR-001 superseded by GA Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs(cloud-sessions): remove confusing remote-sessions/sandbox disambiguation intro Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: validate new GA samples instead of using docs-validate: skip Replace all 9 docs-validate: skip markers in cloud-sessions.md with the hidden-full-snippet + visible-snippet pattern (or direct buildable snippets), and fix latent validation failures in fleet-mode.md and multi-tenancy.md (.NET undefined locals, Go missing package/imports, TS plan-mode union literal). - cloud-sessions.md: 0 skip markers remain - fleet-mode.md: hidden Go/.NET wrappers for session+ctx; plan-mode snippet now a valid type union - multi-tenancy.md: hidden Go/.NET wrappers seed runtimeInstanceId, runtimeUrl, user, requestId Validation (TS / Python / Go / C#) passes for all three files; Java validation requires mvn (only available in CI). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: add plugin directories guide New guide covering the --plugin-dir / extra-args path for loading bundled plugin folders (skills, hooks, MCP, custom agents, LSP) from an SDK host application. Covers folder layout, per-language wiring, plugin-dir vs marketplace plugins, COPILOT_PLUGIN_DIR_ONLY for deterministic plugin sets, session.plugins.list inspection, and troubleshooting. Links added from docs/index.md and docs/features/index.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: address PR review feedback for accuracy Verified all 10 reviewer findings against source; all accurate. Applied fixes: - backend-services.md: Replace 5 instances of the non-existent TS top-level 'cliUrl' option with 'connection: RuntimeConnection.forUri(...)' (matches CopilotClientOptions in nodejs/src/types.ts). - multi-tenancy.md: Drop baseDirectory/sessionIdleTimeoutSeconds from the TS forUri sample and setCopilotHome/setSessionIdleTimeoutSeconds from the Java setCliUrl sample (both ignored for URI connections; documented inline). Fix SessionFsConfig field 'initialWorkingDirectory' -> 'initialCwd' (matches nodejs/src/types.ts:2068). Remove 'or cliUrl' from the TS row of the external-runtime table. - streaming-events.md: Add 'ws:/responses' to assistant.usage.apiEndpoint union (matches nodejs/src/generated/session-events.ts:231). - fleet-mode.md: Fix Rust crate path 'github_copilot' -> 'github_copilot_sdk' (rust/Cargo.toml lib name). - cloud-sessions.md: Replace invalid Rust async closure permission handler with Arc<dyn PermissionHandler> via ApproveAllHandler from handler module (matches rust/src/types.rs:1529 signature). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: fix docs-validate CI failures (Java + Python wrappers, remove last skip) CI Validate-* jobs run with mvn installed (so real Java errors surfaced) and mypy strict (so undefined module-level names surfaced): - features/fleet-mode.md Python sub-agent events: wrap visible snippet with hidden async main() that constructs session via CopilotClient. - setup/multi-tenancy.md Java: add hidden compilable wrapper that defines runtimeUrl/user/requestId stubs and switches wildcard import to fully-qualified com.github.copilot.rpc imports. - features/plugin-directories.md Java: fix wrong import (com.github.copilot.CopilotClientOptions -> com.github.copilot.rpc.CopilotClientOptions) and wrap in hidden compilable class. - features/plugin-directories.md Rust: remove last docs-validate: skip; wrap with hidden tokio::main and keep visible excerpt. All non-Java validators now clean locally; only env-only mvn errors remain. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs(cloud-sessions): add send-after-start, URL surfacing, and troubleshooting Cover two real-world gotchas that the existing guide does not mention: 1. "Sending the first prompt" — explains that createSession returns before the remote worker connects, so the first session.send must await session.start{producer:'copilot-agent'}. Without it the runtime silently swallows the prompt (RemoteSession.sendForSchema is fire-and-forget) and the developer sees a resolved messageId but no assistant.* events and no prompt in Mission Control. Also notes that streaming:true is needed for assistant.message_delta. 2. "Accessing the Mission Control URL" — cloud sessions auto-publish a shareable URL via session.info{infoType:'remote', url}. Apps should subscribe to that event rather than calling remote.enable(), which is only for promoting local sessions. Add three matching rows to the Troubleshooting table and a Streaming Events link in See Also. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update cloud-sessions.md --------- Co-authored-by: Patrick <patrick@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent da1788d commit 14bf1f8

33 files changed

Lines changed: 1726 additions & 190 deletions

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Thanks for your interest in contributing!
44

5-
This repository contains the Copilot SDK, a set of multi-language SDKs (Node/TypeScript, Python, Go, .NET, Rust) for building applications with the GitHub Copilot agent, maintained by the GitHub Copilot team.
5+
This repository contains the Copilot SDK, a set of multi-language SDKs (Node/TypeScript, Python, Go, .NET, Java, and Rust) for building applications with the GitHub Copilot agent, maintained by the GitHub Copilot team.
66

77
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).
88

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
Agents for every app.
1313

14-
Embed Copilot's agentic workflows in your application—now available in public preview as a programmable SDK for Python, TypeScript, Go, .NET, and Java. A Rust SDK is also available in technical preview.
14+
Embed Copilot's agentic workflows in your application with the GitHub Copilot SDK for Python, TypeScript, Go, .NET, Java, and Rust.
1515

1616
The GitHub Copilot SDK exposes the same engine behind Copilot CLI: a production-tested agent runtime you can invoke programmatically. No need to build your own orchestration—you define agent behavior, Copilot handles planning, tool invocation, file edits, and more.
1717

@@ -37,7 +37,7 @@ Quick steps:
3737
1. **(Optional) Install the Copilot CLI**
3838

3939
For Node.js, Python, and .NET SDKs, the Copilot CLI is bundled automatically and no separate installation is required.
40-
For the Go, Java and Rust SDKs, [install the CLI manually](https://github.com/features/copilot/cli) or ensure `copilot` is available in your PATH unless you opt into their application-level CLI bundling features.
40+
For Go, Java, and Rust, [install the CLI manually](https://github.com/features/copilot/cli) or ensure `copilot` is available in your PATH. Go and Rust also expose application-level CLI bundling features.
4141

4242
2. **Install your preferred SDK** using the commands above.
4343

@@ -88,7 +88,7 @@ See the **[Authentication documentation](./docs/auth/index.md)** for details on
8888

8989
No — for Node.js, Python, and .NET SDKs, the Copilot CLI is bundled automatically as a dependency. You do not need to install it separately.
9090

91-
For Go, Java and Rust SDKs, the CLI is **not** bundled by default. Install the CLI manually, ensure `copilot` is available in your PATH, or opt into their application-level CLI bundling features.
91+
For Go, Java, and Rust SDKs, the CLI is **not** bundled by default. Install the CLI manually or ensure `copilot` is available in your PATH. Go and Rust also expose application-level CLI bundling features.
9292

9393
Advanced: You can override the CLI binary or connect to an external server. See the individual SDK README for language-specific options.
9494

@@ -117,7 +117,7 @@ All models available via Copilot CLI are supported in the SDK. The SDK also expo
117117

118118
### Is the SDK production-ready?
119119

120-
The GitHub Copilot SDK is currently in Public Preview. While it is functional and can be used for development and testing, it may not yet be suitable for production use.
120+
The GitHub Copilot SDK is generally available and follows semantic versioning. See [CHANGELOG.md](./CHANGELOG.md) for release notes.
121121

122122
### How do I report issues or request features?
123123

docs/auth/authenticate.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,15 @@ BYOK allows you to use your own API keys from model providers like Azure AI Foun
300300

301301
When multiple authentication methods are available, the SDK uses them in this priority order:
302302

303-
1. **Explicit `gitHubToken`** - Token passed directly to SDK constructor
303+
1. **Explicit `gitHubToken`** - Token passed directly to the SDK client or session configuration
304304
1. **HMAC key** - `CAPI_HMAC_KEY` or `COPILOT_HMAC_KEY` environment variables
305305
1. **Direct API token** - `GITHUB_COPILOT_API_TOKEN` with `COPILOT_API_URL`
306306
1. **Environment variable tokens** - `COPILOT_GITHUB_TOKEN``GH_TOKEN``GITHUB_TOKEN`
307307
1. **Stored OAuth credentials** - From previous `copilot` CLI login
308308
1. **GitHub CLI** - `gh auth` credentials
309309

310+
For multi-user server mode, pass a per-session `gitHubToken` so each session runs with the correct GitHub identity; see [Multi-user and server deployments](../setup/multi-tenancy.md).
311+
310312
## Disabling auto-login
311313

312314
To prevent the SDK from automatically using stored credentials or `gh` CLI auth, use the `useLoggedInUser: false` option:

docs/auth/byok.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,17 @@ client.stop().get();
205205
| `baseUrl` / `base_url` | string | **Required.** API endpoint URL |
206206
| `apiKey` / `api_key` | string | API key (optional for local providers like Ollama) |
207207
| `bearerToken` / `bearer_token` | string | Bearer token auth (takes precedence over apiKey) |
208-
| `wireApi` / `wire_api` | `"completions"` \| `"responses"` | API format (default: `"completions"`) |
208+
| `wireApi` / `wire_api` | `"completions"` \| `"responses"` | Select `"completions"` for broad model compatibility (the Chat Completions API); select `"responses"` for multi-turn state management, tool namespacing, and reasoning support (the Responses API). Anthropic models always use the Messages API regardless of this setting. |
209209
| `azure.apiVersion` / `azure.api_version` | string | Azure API version (default: `"2024-10-21"`) |
210210

211211
### Wire API format
212212

213213
The `wireApi` setting determines which OpenAI API format to use:
214214

215-
* **`"completions"`** (default) - Chat Completions API (`/chat/completions`). Use for most models.
216-
* **`"responses"`** - Responses API. Use for GPT-5 series models that support the newer responses format.
215+
* **`"completions"`** (default) - Chat Completions API (`/chat/completions`) for broad model compatibility.
216+
* **`"responses"`** - Responses API for multi-turn state management, tool namespacing, and reasoning support.
217+
218+
Anthropic models always use the Anthropic Messages API regardless of this setting.
217219

218220
### Type-specific notes
219221

docs/auth/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ Choose the authentication method that best fits your deployment scenario for the
44

55
* [Authenticate Copilot SDK](authenticate.md): methods, priority order, and examples
66
* [Bring your own key (BYOK)](./byok.md): use your own API keys from OpenAI, Azure, Anthropic, and more
7+
8+
## Authentication priority
9+
10+
When multiple credentials are configured, an explicit SDK token takes priority, followed by HMAC or direct Copilot API environment authentication, environment variable GitHub tokens, stored Copilot CLI credentials, and then GitHub CLI credentials. See [Authenticate Copilot SDK](authenticate.md#authentication-priority) for details.
11+
12+
For multi-user server mode, pass a per-session `gitHubToken` so each session runs with the correct GitHub identity; see [Multi-user and server deployments](../setup/multi-tenancy.md).

0 commit comments

Comments
 (0)