Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
189b9ba
Phase 1: codegen falls back to JsonElement instead of object
SteveSandersonMS May 20, 2026
78c1500
Phase 3: seal hand-written public types
SteveSandersonMS May 20, 2026
2c9a74a
Phase 4a: simple property/method renames
SteveSandersonMS May 20, 2026
7b07d6f
Phase 4b: expand SessionFsProvider abbreviations
SteveSandersonMS May 20, 2026
69fccdf
Phase 4c: shape changes (Streaming, Tools, ToolBinaryResultType, clea…
SteveSandersonMS May 20, 2026
b00fd8c
Phase 4d/4e: remove CopilotClient.State, retype LogLevel
SteveSandersonMS May 20, 2026
e400c5c
Fix mojibake from cp1252/UTF-8 round-trip in earlier phase commits
SteveSandersonMS May 20, 2026
ff5d96b
Phase 4f: generic OnLifecycle<T> + On<T>, polymorphic lifecycle events
SteveSandersonMS May 20, 2026
aa4481b
Phase 4g: DateTimeOffset timestamps + PermissionRequestResult.Feedback
SteveSandersonMS May 20, 2026
c8e2573
Phase 7: SendAsync(string) / SendAndWaitAsync(string) convenience ove…
SteveSandersonMS May 20, 2026
3907f28
Phase 9 (partial): rename Cwd/Remote properties on hand-written types
SteveSandersonMS May 20, 2026
85ee59f
Phase 8: README updates for OnLifecycle<T> and lifecycle event types
SteveSandersonMS May 20, 2026
89f002a
Phase 5: extract SessionConfigBase; seal config classes
SteveSandersonMS May 20, 2026
3061cb2
Phase 6: remove named delegate types, use Func<...>
SteveSandersonMS May 20, 2026
3daed13
Phase 9: introduce RuntimeConnection discriminated config
SteveSandersonMS May 20, 2026
7ca216e
README: update Custom Permission Handler section for Phase 6 delegate…
SteveSandersonMS May 20, 2026
aee2384
Fix snapshot capture locally
SteveSandersonMS May 20, 2026
2382621
Fix MCP config serialization
SteveSandersonMS May 20, 2026
48aa42f
Revert "Phase 1: codegen falls back to JsonElement instead of object"
SteveSandersonMS May 20, 2026
2c64f30
Post-revert cleanup for Phase 1 revert
SteveSandersonMS May 20, 2026
25db93a
Revert "Fix MCP config serialization"
SteveSandersonMS May 20, 2026
ae49e16
Fixes to E2E tests to restore main behavior
SteveSandersonMS May 20, 2026
2b65212
Restore TCP transport for two ClientOptions tests
SteveSandersonMS May 20, 2026
dd9a270
Test harness: throw if both useStdio and Connection are supplied
SteveSandersonMS May 20, 2026
8c9ede2
Revert accidental CapiProxy.cs change
SteveSandersonMS May 20, 2026
6633928
Test fix
SteveSandersonMS May 20, 2026
32567bf
Update C# doc snippets for renamed APIs
SteveSandersonMS May 20, 2026
99d0fcd
Update C# test scenarios for renamed APIs
SteveSandersonMS May 20, 2026
4b72cf5
Drop .SDK from C# namespaces
SteveSandersonMS May 20, 2026
199189c
Fix local test runs
SteveSandersonMS May 20, 2026
cc3e9d1
Drop unused uriConn binding in Client.cs is-check
SteveSandersonMS May 20, 2026
c721e40
Address Copilot review feedback
SteveSandersonMS May 20, 2026
ab570c3
Docs validation: prepend 'using GitHub.Copilot;' after namespace rename
SteveSandersonMS May 20, 2026
eeb9b4a
Rename RuntimeConnection factories: Stdio/Tcp/Uri -> ForStdio/ForTcp/…
SteveSandersonMS May 21, 2026
26eedfd
Apply RuntimeConnection.For* rename in E2ETestContext.cs
SteveSandersonMS May 21, 2026
db9e0ed
Docs: restore 'dotnet add package GitHub.Copilot.SDK'
SteveSandersonMS May 21, 2026
f7d8646
Dev version
SteveSandersonMS May 21, 2026
263dfc3
Codegen: drop full GitHub.Copilot qualifier from GeneratedStringEnumJ…
SteveSandersonMS May 21, 2026
3e1a3e1
Regenerate Rpc.cs after rebase onto origin/main
SteveSandersonMS May 21, 2026
5d55127
Test: make Should_Get_Null_Last_Session_Id resilient to test order
SteveSandersonMS May 21, 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
29 changes: 14 additions & 15 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
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.ForUri("localhost:4321"),
});

// 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
4 changes: 2 additions & 2 deletions docs/hooks/pre-tool-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type PreToolUseHandler func(

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

public delegate Task<PreToolUseHookOutput?> PreToolUseHandler(
PreToolUseHookInput input,
Expand Down Expand Up @@ -228,7 +228,7 @@ session, _ := client.CreateSession(context.Background(), &copilot.SessionConfig{

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

public static class PreToolUseExample
{
Expand Down
Loading
Loading