diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 1dad5f95c..f9ca4db84 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,7 +4,7 @@ ## Big picture 🔧 -- The repo implements language SDKs (Node/TS, Python, Go, .NET) that speak to the **Copilot CLI** via **JSON‑RPC** (see `README.md` and `nodejs/src/client.ts`). +- The repo implements language SDKs (Node/TS, Python, Go, .NET, Rust) that speak to the **Copilot CLI** via **JSON‑RPC** (see `README.md` and `nodejs/src/client.ts`). - Typical flow: your App → SDK client → JSON-RPC → Copilot CLI (server mode). The CLI must be installed or you can connect to an external CLI server via the `CLI URL option (language-specific casing)` (Node: `cliUrl`, Go: `CLIUrl`, .NET: `CliUrl`, Python: `cli_url`). ## Most important files to read first 📚 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7dbe1b492..2fa57dbe6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Thanks for your interest in contributing! -This repository contains the Copilot SDK, a set of multi-language SDKs (Node/TypeScript, Python, Go, .NET) for building applications with the GitHub Copilot agent, maintained by the GitHub Copilot team. +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. 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). diff --git a/docs/features/index.md b/docs/features/index.md index 5c97a007b..2fa11b76e 100644 --- a/docs/features/index.md +++ b/docs/features/index.md @@ -1,6 +1,6 @@ # Features -These guides cover the capabilities you can add to your Copilot SDK application. Each guide includes examples in all supported languages (TypeScript, Python, Go, .NET, and Java). +These guides cover the capabilities you can add to your Copilot SDK application. Each guide includes examples in supported languages (TypeScript, Python, Go, .NET, Java, and Rust) where available. > **New to the SDK?** Start with the [Getting Started tutorial](../getting-started.md) first, then come back here to add more capabilities. diff --git a/docs/integrations/microsoft-agent-framework.md b/docs/integrations/microsoft-agent-framework.md index 4c74092ee..4da47104c 100644 --- a/docs/integrations/microsoft-agent-framework.md +++ b/docs/integrations/microsoft-agent-framework.md @@ -14,7 +14,7 @@ The Microsoft Agent Framework is the unified successor to Semantic Kernel and Au | **A2A protocol** | Agent-to-Agent communication standard supported by the framework | > [!NOTE] -> MAF integration packages are available for **.NET** and **Python**. For TypeScript, Go, and Java, use the Copilot SDK directly—the standard SDK APIs already provide tool calling, streaming, and custom agents. +> MAF integration packages are available for **.NET** and **Python**. For TypeScript, Go, Java, and Rust, use the Copilot SDK directly—the standard SDK APIs already provide tool calling, streaming, and custom agents. ## Prerequisites diff --git a/docs/observability/opentelemetry.md b/docs/observability/opentelemetry.md index 8ef04c832..42a5c6e96 100644 --- a/docs/observability/opentelemetry.md +++ b/docs/observability/opentelemetry.md @@ -84,15 +84,30 @@ var client = new CopilotClient(new CopilotClientOptions() +
+Rust + + +```rust +use github_copilot_sdk::{Client, ClientOptions, TelemetryConfig}; + +let client = Client::start(ClientOptions::new() + .with_telemetry(TelemetryConfig::new() + .with_otlp_endpoint("http://localhost:4318")) +).await?; +``` + +
+ ### TelemetryConfig options -| Option | Node.js | Python | Go | .NET | Java | Description | -|---|---|---|---|---|---|---| -| OTLP endpoint | `otlpEndpoint` | `otlp_endpoint` | `OTLPEndpoint` | `OtlpEndpoint` | `otlpEndpoint` | OTLP HTTP endpoint URL | -| File path | `filePath` | `file_path` | `FilePath` | `FilePath` | `filePath` | File path for JSON-lines trace output | -| Exporter type | `exporterType` | `exporter_type` | `ExporterType` | `ExporterType` | `exporterType` | `"otlp-http"` or `"file"` | -| Source name | `sourceName` | `source_name` | `SourceName` | `SourceName` | `sourceName` | Instrumentation scope name | -| Capture content | `captureContent` | `capture_content` | `CaptureContent` | `CaptureContent` | `captureContent` | Whether to capture message content | +| Option | Node.js | Python | Go | .NET | Java | Rust | Description | +|---|---|---|---|---|---|---|---| +| OTLP endpoint | `otlpEndpoint` | `otlp_endpoint` | `OTLPEndpoint` | `OtlpEndpoint` | `otlpEndpoint` | `otlp_endpoint` | OTLP HTTP endpoint URL | +| File path | `filePath` | `file_path` | `FilePath` | `FilePath` | `filePath` | `file_path` | File path for JSON-lines trace output | +| Exporter type | `exporterType` | `exporter_type` | `ExporterType` | `ExporterType` | `exporterType` | `exporter_type` | `"otlp-http"` or `"file"` | +| Source name | `sourceName` | `source_name` | `SourceName` | `SourceName` | `sourceName` | `source_name` | Instrumentation scope name | +| Capture content | `captureContent` | `capture_content` | `CaptureContent` | `CaptureContent` | `captureContent` | `capture_content` | Whether to capture message content | ### Trace context propagation diff --git a/docs/troubleshooting/mcp-debugging.md b/docs/troubleshooting/mcp-debugging.md index fe001a13f..eb98eb1bd 100644 --- a/docs/troubleshooting/mcp-debugging.md +++ b/docs/troubleshooting/mcp-debugging.md @@ -446,7 +446,7 @@ When opening an issue or asking for help, collect: * [ ] SDK language and version * [ ] CLI version (`copilot --version`) -* [ ] MCP server type (Node.js, Python, .NET, Go, etc.) +* [ ] MCP server type (Node.js, Python, .NET, Go, Rust, etc.) * [ ] Full MCP server configuration (redact secrets) * [ ] Result of manual `initialize` test * [ ] Result of manual `tools/list` test diff --git a/test/scenarios/README.md b/test/scenarios/README.md index e45aac32f..30be29c44 100644 --- a/test/scenarios/README.md +++ b/test/scenarios/README.md @@ -1,6 +1,6 @@ # SDK E2E Scenario Tests -End-to-end scenario tests for the Copilot SDK. Each scenario demonstrates a specific SDK capability with implementations in TypeScript, Python, and Go. +End-to-end scenario tests for the Copilot SDK. Each scenario demonstrates a specific SDK capability with implementations in TypeScript, Python, Go, C#, and Rust. ## Structure @@ -35,4 +35,4 @@ COPILOT_CLI_PATH=/path/to/copilot GITHUB_TOKEN=$(gh auth token) bash / - **Copilot CLI** — set `COPILOT_CLI_PATH` - **GitHub token** — set `GITHUB_TOKEN` or use `gh auth login` -- **Node.js 20+**, **Python 3.10+**, **Go 1.24+** (per language) +- **Node.js 20+**, **Python 3.11+**, **Go 1.24+**, **.NET 8+**, **Rust 1.94+** (per language) diff --git a/test/scenarios/prompts/attachments/README.md b/test/scenarios/prompts/attachments/README.md index 145239f08..4c6918f35 100644 --- a/test/scenarios/prompts/attachments/README.md +++ b/test/scenarios/prompts/attachments/README.md @@ -7,7 +7,7 @@ Demonstrates sending **file attachments** alongside a prompt using the Copilot S 1. Creates a session with a custom system prompt in `replace` mode 2. Resolves the path to `sample-data.txt` (a small text file in the scenario root) 3. Sends: _"What languages are listed in the attached file?"_ with the file as an attachment -4. Prints the response — which should list TypeScript, Python, and Go +4. Prints the response — which should list TypeScript, Python, Go, C#, and Rust ## Attachment Format @@ -51,7 +51,7 @@ The `sample-data.txt` file contains basic project metadata used as the attachmen Project: Copilot SDK Samples Version: 1.0.0 Description: Minimal buildable samples demonstrating the Copilot SDK -Languages: TypeScript, Python, Go +Languages: TypeScript, Python, Go, C#, Rust ``` ## Run diff --git a/test/scenarios/prompts/attachments/sample-data.txt b/test/scenarios/prompts/attachments/sample-data.txt index ea82ad2d3..449dec12c 100644 --- a/test/scenarios/prompts/attachments/sample-data.txt +++ b/test/scenarios/prompts/attachments/sample-data.txt @@ -1,4 +1,4 @@ Project: Copilot SDK Samples Version: 1.0.0 Description: Minimal buildable samples demonstrating the Copilot SDK -Languages: TypeScript, Python, Go +Languages: TypeScript, Python, Go, C#, Rust diff --git a/test/scenarios/transport/README.md b/test/scenarios/transport/README.md index d986cc7ad..25067158a 100644 --- a/test/scenarios/transport/README.md +++ b/test/scenarios/transport/README.md @@ -6,8 +6,8 @@ Minimal samples organized by **transport model** — the wire protocol used to c | Transport | Description | Languages | |-----------|-------------|-----------| -| **[stdio](stdio/)** | SDK spawns `copilot` as a child process and communicates via stdin/stdout | TypeScript, Python, Go | -| **[tcp](tcp/)** | SDK connects to a pre-running `copilot` TCP server | TypeScript, Python, Go | +| **[stdio](stdio/)** | SDK spawns `copilot` as a child process and communicates via stdin/stdout | TypeScript, Python, Go, C#, Rust | +| **[tcp](tcp/)** | SDK connects to a pre-running `copilot` TCP server | TypeScript, Python, Go, C#, Rust | | **[wasm](wasm/)** | SDK loads `copilot` as an in-process WASM module | TypeScript | ## How They Differ @@ -23,7 +23,7 @@ Minimal samples organized by **transport model** — the wire protocol used to c - **Authentication** — set `GITHUB_TOKEN`, or run `gh auth login` - **Copilot CLI** — required for stdio and tcp (set `COPILOT_CLI_PATH`) -- Language toolchains as needed (Node.js 20+, Python 3.10+, Go 1.24+) +- Language toolchains as needed (Node.js 20+, Python 3.11+, Go 1.24+, .NET 8+, Rust 1.94+) ## Verification