Skip to content
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ff93ad6
Phase 1: codegen falls back to JsonElement instead of object
SteveSandersonMS May 20, 2026
ecf4432
Phase 3: seal hand-written public types
SteveSandersonMS May 20, 2026
7b21592
Phase 4a: simple property/method renames
SteveSandersonMS May 20, 2026
57d0627
Phase 4b: expand SessionFsProvider abbreviations
SteveSandersonMS May 20, 2026
52ac22a
Phase 4c: shape changes (Streaming, Tools, ToolBinaryResultType, clea…
SteveSandersonMS May 20, 2026
e12fcf0
Phase 4d/4e: remove CopilotClient.State, retype LogLevel
SteveSandersonMS May 20, 2026
c636349
Fix mojibake from cp1252/UTF-8 round-trip in earlier phase commits
SteveSandersonMS May 20, 2026
23626b9
Phase 4f: generic OnLifecycle<T> + On<T>, polymorphic lifecycle events
SteveSandersonMS May 20, 2026
734d80d
Phase 4g: DateTimeOffset timestamps + PermissionRequestResult.Feedback
SteveSandersonMS May 20, 2026
174b535
Phase 7: SendAsync(string) / SendAndWaitAsync(string) convenience ove…
SteveSandersonMS May 20, 2026
59ddbf5
Phase 9 (partial): rename Cwd/Remote properties on hand-written types
SteveSandersonMS May 20, 2026
a64803a
Phase 8: README updates for OnLifecycle<T> and lifecycle event types
SteveSandersonMS May 20, 2026
ccd1a08
Phase 5: extract SessionConfigBase; seal config classes
SteveSandersonMS May 20, 2026
94715fe
Phase 6: remove named delegate types, use Func<...>
SteveSandersonMS May 20, 2026
7670b99
Phase 9: introduce RuntimeConnection discriminated config
SteveSandersonMS May 20, 2026
1be458e
README: update Custom Permission Handler section for Phase 6 delegate…
SteveSandersonMS May 20, 2026
07b337a
Re-run C# codegen to pick up Phase 1 JsonElement fallback consistently
SteveSandersonMS May 20, 2026
0508ce8
Fix snapshot capture locally
SteveSandersonMS May 20, 2026
50540ac
Fix MCP config serialization
SteveSandersonMS May 20, 2026
129c281
Revert "Phase 1: codegen falls back to JsonElement instead of object"
SteveSandersonMS May 20, 2026
ec6e28a
Post-revert cleanup for Phase 1 revert
SteveSandersonMS May 20, 2026
074ace7
Revert "Fix MCP config serialization"
SteveSandersonMS May 20, 2026
70f3e36
Fixes to E2E tests to restore main behavior
SteveSandersonMS May 20, 2026
f3708e5
Restore TCP transport for two ClientOptions tests
SteveSandersonMS May 20, 2026
9658005
Test harness: throw if both useStdio and Connection are supplied
SteveSandersonMS May 20, 2026
a46ae79
Revert accidental CapiProxy.cs change
SteveSandersonMS May 20, 2026
466c1a2
Test fix
SteveSandersonMS May 20, 2026
6b24197
Update C# doc snippets for renamed APIs
SteveSandersonMS May 20, 2026
e1b5eff
Update C# test scenarios for renamed APIs
SteveSandersonMS May 20, 2026
f2d90ff
Drop .SDK from C# namespaces
SteveSandersonMS May 20, 2026
8dbab2d
Fix local test runs
SteveSandersonMS May 20, 2026
77dc443
Drop unused uriConn binding in Client.cs is-check
SteveSandersonMS May 20, 2026
a50f6a1
Address Copilot review feedback
SteveSandersonMS May 20, 2026
5bfb4ea
Docs validation: prepend 'using GitHub.Copilot;' after namespace rename
SteveSandersonMS May 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/auth/authenticate.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ client := copilot.NewClient(nil)
<summary><strong>.NET</strong></summary>

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

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

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

var userAccessToken = "token";
await using var client = new CopilotClient(new CopilotClientOptions
{
GithubToken = userAccessToken,
GitHubToken = userAccessToken,
UseLoggedInUser = false,
});
```
<!-- /docs-validate: hidden -->

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

await using var client = new CopilotClient(new CopilotClientOptions
{
GithubToken = userAccessToken, // Token from OAuth flow
GitHubToken = userAccessToken, // Token from OAuth flow
UseLoggedInUser = false, // Don't use stored CLI credentials
});
```
Expand Down
4 changes: 2 additions & 2 deletions docs/auth/byok.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func main() {
<summary><strong>.NET</strong></summary>

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

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

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

var client = new CopilotClient(new CopilotClientOptions
{
Expand Down
8 changes: 4 additions & 4 deletions docs/features/custom-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ session, _ := client.CreateSession(ctx, &copilot.SessionConfig{
<summary><strong>.NET</strong></summary>

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

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

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class SubAgentEventsExample
{
public static async Task Example(CopilotSession session)
{
using var subscription = session.On(evt =>
using var subscription = session.On<SessionEvent>(evt =>
{
switch (evt)
{
Expand Down Expand Up @@ -622,7 +622,7 @@ public static class SubAgentEventsExample
<!-- /docs-validate: hidden -->

```csharp
using var subscription = session.On(evt =>
using var subscription = session.On<SessionEvent>(evt =>
{
switch (evt)
{
Expand Down
4 changes: 2 additions & 2 deletions docs/features/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ session, err := client.CreateSession(ctx, &copilot.SessionConfig{

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class HooksExample
{
Expand Down Expand Up @@ -348,7 +348,7 @@ session, _ := client.CreateSession(ctx, &copilot.SessionConfig{

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class PermissionControlExample
{
Expand Down
6 changes: 3 additions & 3 deletions docs/features/image-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ session.Send(ctx, copilot.MessageOptions{

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class ImageInputExample
{
Expand Down Expand Up @@ -193,7 +193,7 @@ public static class ImageInputExample
<!-- /docs-validate: hidden -->

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

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

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class BlobAttachmentExample
{
Expand Down
2 changes: 1 addition & 1 deletion docs/features/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func main() {
### .NET

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
Expand Down
4 changes: 2 additions & 2 deletions docs/features/session-persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ session.SendAndWait(ctx, copilot.MessageOptions{Prompt: "Analyze my codebase"})
### C# (.NET)

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

var client = new CopilotClient();

Expand Down Expand Up @@ -201,7 +201,7 @@ session.SendAndWait(ctx, copilot.MessageOptions{Prompt: "What did we discuss ear

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class ResumeSessionExample
{
Expand Down
4 changes: 2 additions & 2 deletions docs/features/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func main() {
<summary><strong>.NET</strong></summary>

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
Expand Down Expand Up @@ -244,7 +244,7 @@ session, _ := client.CreateSession(context.Background(), &copilot.SessionConfig{

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class SkillsExample
{
Expand Down
4 changes: 2 additions & 2 deletions docs/features/steering-and-queueing.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func main() {
<summary><strong>.NET</strong></summary>

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
Expand Down Expand Up @@ -361,7 +361,7 @@ session.Send(ctx, copilot.MessageOptions{

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class QueueingExample
{
Expand Down
6 changes: 3 additions & 3 deletions docs/features/streaming-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@ session.On(func(event copilot.SessionEvent) {

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class StreamingEventsExample
{
public static async Task Example(CopilotSession session)
{
session.On(evt =>
session.On<SessionEvent>(evt =>
{
if (evt is AssistantMessageDeltaEvent delta)
{
Expand All @@ -180,7 +180,7 @@ public static class StreamingEventsExample
<!-- /docs-validate: hidden -->

```csharp
session.On(evt =>
session.On<SessionEvent>(evt =>
{
if (evt is AssistantMessageDeltaEvent delta)
{
Expand Down
31 changes: 15 additions & 16 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ dotnet new console -n CopilotDemo && cd CopilotDemo
Then add the SDK:

```bash
dotnet add package GitHub.Copilot.SDK
dotnet add package GitHub.Copilot
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the package name changing?

```

</details>
Expand Down Expand Up @@ -299,7 +299,7 @@ cargo run
Create a new console project and add this to `Program.cs`:

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
Expand Down Expand Up @@ -557,7 +557,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Update `Program.cs`:

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
Expand All @@ -568,7 +568,7 @@ await using var session = await client.CreateSessionAsync(new SessionConfig
});

// Listen for response chunks
session.On(ev =>
session.On<SessionEvent>(ev =>
{
if (ev is AssistantMessageDeltaEvent deltaEvent)
{
Expand Down Expand Up @@ -800,17 +800,17 @@ tokio::spawn(async move {

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class EventSubscriptionExample
{
public static void Example(CopilotSession session)
{
// Subscribe to all events
var unsubscribe = session.On(ev => Console.WriteLine($"Event: {ev.Type}"));
var unsubscribe = session.On<SessionEvent>(ev => Console.WriteLine($"Event: {ev.Type}"));

// Filter by event type using pattern matching
session.On(ev =>
session.On<SessionEvent>(ev =>
{
switch (ev)
{
Expand All @@ -832,10 +832,10 @@ public static class EventSubscriptionExample

```csharp
// Subscribe to all events
var unsubscribe = session.On(ev => Console.WriteLine($"Event: {ev.Type}"));
var unsubscribe = session.On<SessionEvent>(ev => Console.WriteLine($"Event: {ev.Type}"));

// Filter by event type using pattern matching
session.On(ev =>
session.On<SessionEvent>(ev =>
{
switch (ev)
{
Expand Down Expand Up @@ -1159,7 +1159,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
Update `Program.cs`:

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;
using Microsoft.Extensions.AI;
using System.ComponentModel;

Expand Down Expand Up @@ -1190,7 +1190,7 @@ await using var session = await client.CreateSessionAsync(new SessionConfig
Tools = [getWeather],
});

session.On(ev =>
session.On<SessionEvent>(ev =>
{
if (ev is AssistantMessageDeltaEvent deltaEvent)
{
Expand Down Expand Up @@ -1647,7 +1647,7 @@ cargo run
Create a new console project and update `Program.cs`:

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;
using Microsoft.Extensions.AI;
using System.ComponentModel;

Expand Down Expand Up @@ -1676,7 +1676,7 @@ await using var session = await client.CreateSessionAsync(new SessionConfig
});

// Listen for response chunks
session.On(ev =>
session.On<SessionEvent>(ev =>
{
if (ev is AssistantMessageDeltaEvent deltaEvent)
{
Expand Down Expand Up @@ -2067,12 +2067,11 @@ let session = client
<summary><strong>.NET</strong></summary>

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

using var client = new CopilotClient(new CopilotClientOptions
{
CliUrl = "localhost:4321",
UseStdio = false
Connection = RuntimeConnection.Uri("localhost:4321"),
Comment thread
SteveSandersonMS marked this conversation as resolved.
Outdated
});

// Use the client normally
Expand Down
4 changes: 2 additions & 2 deletions docs/hooks/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type ErrorOccurredHandler func(

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public delegate Task<ErrorOccurredHookOutput?> ErrorOccurredHandler(
ErrorOccurredHookInput input,
Expand Down Expand Up @@ -226,7 +226,7 @@ session, _ := client.CreateSession(context.Background(), &copilot.SessionConfig{

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class ErrorHandlingExample
{
Expand Down
2 changes: 1 addition & 1 deletion docs/hooks/hooks-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func main() {
<summary><strong>.NET</strong></summary>

```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

var client = new CopilotClient();

Expand Down
4 changes: 2 additions & 2 deletions docs/hooks/post-tool-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type PostToolUseHandler func(

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public delegate Task<PostToolUseHookOutput?> PostToolUseHandler(
PostToolUseHookInput input,
Expand Down Expand Up @@ -219,7 +219,7 @@ session, _ := client.CreateSession(context.Background(), &copilot.SessionConfig{

<!-- docs-validate: hidden -->
```csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot;

public static class PostToolUseExample
{
Expand Down
Loading
Loading