Skip to content

Commit fb8cefd

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/mcp-apps-support
# Conflicts: # dotnet/src/Types.cs
2 parents af3ee8a + c490d7a commit fb8cefd

179 files changed

Lines changed: 11010 additions & 3282 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

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

55
## Big picture 🔧
66

7-
- 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`).
7+
- 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`).
88
- 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`).
99

1010
## Most important files to read first 📚

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ jobs:
129129
uses: actions/upload-artifact@v7.0.0
130130
with:
131131
name: dotnet-package
132-
path: dotnet/artifacts/*.nupkg
132+
path: |
133+
dotnet/artifacts/*.nupkg
134+
dotnet/artifacts/*.snupkg
133135
- name: NuGet login (OIDC)
134136
if: github.ref == 'refs/heads/main'
135137
uses: NuGet/login@v1
@@ -142,7 +144,9 @@ jobs:
142144
user: stevesanderson
143145
- name: Publish to NuGet
144146
if: github.ref == 'refs/heads/main'
145-
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
147+
run: |
148+
dotnet nuget push ./artifacts/*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
149+
dotnet nuget push ./artifacts/*.snupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
146150
147151
publish-rust:
148152
name: Publish Rust SDK

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) 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, 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

docs/auth/authenticate.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ client := copilot.NewClient(nil)
7777
<summary><strong>.NET</strong></summary>
7878

7979
```csharp
80-
using GitHub.Copilot.SDK;
80+
using GitHub.Copilot;
8181

8282
// Default: uses logged-in user credentials
8383
await using var client = new CopilotClient();
@@ -179,23 +179,23 @@ client := copilot.NewClient(&copilot.ClientOptions{
179179

180180
<!-- docs-validate: hidden -->
181181
```csharp
182-
using GitHub.Copilot.SDK;
182+
using GitHub.Copilot;
183183

184184
var userAccessToken = "token";
185185
await using var client = new CopilotClient(new CopilotClientOptions
186186
{
187-
GithubToken = userAccessToken,
187+
GitHubToken = userAccessToken,
188188
UseLoggedInUser = false,
189189
});
190190
```
191191
<!-- /docs-validate: hidden -->
192192

193193
```csharp
194-
using GitHub.Copilot.SDK;
194+
using GitHub.Copilot;
195195

196196
await using var client = new CopilotClient(new CopilotClientOptions
197197
{
198-
GithubToken = userAccessToken, // Token from OAuth flow
198+
GitHubToken = userAccessToken, // Token from OAuth flow
199199
UseLoggedInUser = false, // Don't use stored CLI credentials
200200
});
201201
```

docs/auth/byok.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func main() {
142142
<summary><strong>.NET</strong></summary>
143143

144144
```csharp
145-
using GitHub.Copilot.SDK;
145+
using GitHub.Copilot;
146146

147147
await using var client = new CopilotClient();
148148
await using var session = await client.CreateSessionAsync(new SessionConfig
@@ -424,7 +424,7 @@ func main() {
424424
<summary><strong>.NET</strong></summary>
425425

426426
```csharp
427-
using GitHub.Copilot.SDK;
427+
using GitHub.Copilot;
428428

429429
var client = new CopilotClient(new CopilotClientOptions
430430
{

docs/features/custom-agents.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
173173
<summary><strong>.NET</strong></summary>
174174

175175
```csharp
176-
using GitHub.Copilot.SDK;
176+
using GitHub.Copilot;
177177

178178
await using var client = new CopilotClient();
179179
await using var session = await client.CreateSessionAsync(new SessionConfig
@@ -585,13 +585,13 @@ _, err := session.SendAndWait(ctx, copilot.MessageOptions{
585585

586586
<!-- docs-validate: hidden -->
587587
```csharp
588-
using GitHub.Copilot.SDK;
588+
using GitHub.Copilot;
589589

590590
public static class SubAgentEventsExample
591591
{
592592
public static async Task Example(CopilotSession session)
593593
{
594-
using var subscription = session.On(evt =>
594+
using var subscription = session.On<SessionEvent>(evt =>
595595
{
596596
switch (evt)
597597
{
@@ -622,7 +622,7 @@ public static class SubAgentEventsExample
622622
<!-- /docs-validate: hidden -->
623623

624624
```csharp
625-
using var subscription = session.On(evt =>
625+
using var subscription = session.On<SessionEvent>(evt =>
626626
{
627627
switch (evt)
628628
{

docs/features/hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ session, err := client.CreateSession(ctx, &copilot.SessionConfig{
146146

147147
<!-- docs-validate: hidden -->
148148
```csharp
149-
using GitHub.Copilot.SDK;
149+
using GitHub.Copilot;
150150

151151
public static class HooksExample
152152
{
@@ -348,7 +348,7 @@ session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
348348

349349
<!-- docs-validate: hidden -->
350350
```csharp
351-
using GitHub.Copilot.SDK;
351+
using GitHub.Copilot;
352352

353353
public static class PermissionControlExample
354354
{

docs/features/image-input.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ session.Send(ctx, copilot.MessageOptions{
161161

162162
<!-- docs-validate: hidden -->
163163
```csharp
164-
using GitHub.Copilot.SDK;
164+
using GitHub.Copilot;
165165

166166
public static class ImageInputExample
167167
{
@@ -193,7 +193,7 @@ public static class ImageInputExample
193193
<!-- /docs-validate: hidden -->
194194

195195
```csharp
196-
using GitHub.Copilot.SDK;
196+
using GitHub.Copilot;
197197

198198
await using var client = new CopilotClient();
199199
await using var session = await client.CreateSessionAsync(new SessionConfig
@@ -376,7 +376,7 @@ session.Send(ctx, copilot.MessageOptions{
376376

377377
<!-- docs-validate: hidden -->
378378
```csharp
379-
using GitHub.Copilot.SDK;
379+
using GitHub.Copilot;
380380

381381
public static class BlobAttachmentExample
382382
{

docs/features/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Features
22

3-
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).
3+
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.
44

55
> **New to the SDK?** Start with the [Getting Started tutorial](../getting-started.md) first, then come back here to add more capabilities.
66

docs/features/mcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func main() {
136136
### .NET
137137

138138
```csharp
139-
using GitHub.Copilot.SDK;
139+
using GitHub.Copilot;
140140

141141
await using var client = new CopilotClient();
142142
await using var session = await client.CreateSessionAsync(new SessionConfig

0 commit comments

Comments
 (0)