Skip to content

Commit 27fb849

Browse files
authored
Merge branch 'main' into agents/managed-settings-forward-flag
2 parents ae591cc + e7d5e9a commit 27fb849

182 files changed

Lines changed: 16569 additions & 1854 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/badges/jacoco-generated.svg

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/badges/jacoco-handwritten.svg

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/scripts/generate-java-coverage-badge.sh

Lines changed: 0 additions & 104 deletions
This file was deleted.

.github/workflows/java-sdk-tests.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ on:
3131
merge_group:
3232

3333
permissions:
34-
contents: write
35-
checks: write
36-
pull-requests: write
34+
contents: read
3735

3836
jobs:
3937
java-sdk:
@@ -117,22 +115,6 @@ jobs:
117115
java/target/surefire-reports-isolated/
118116
retention-days: 1
119117

120-
- name: Generate JaCoCo badge
121-
if: success() && github.ref == 'refs/heads/main' && matrix.test-jdk == '25'
122-
working-directory: .
123-
run: bash .github/scripts/generate-java-coverage-badge.sh java/target/site/jacoco-coverage/jacoco.csv .github/badges
124-
125-
- name: Create PR for JaCoCo badge update
126-
if: success() && github.ref == 'refs/heads/main' && matrix.test-jdk == '25'
127-
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
128-
with:
129-
commit-message: "Update Java JaCoCo coverage badge"
130-
title: "Update Java JaCoCo coverage badge"
131-
body: "Automated Java JaCoCo coverage badge update from CI."
132-
branch: auto/update-java-jacoco-badge
133-
add-paths: .github/badges/
134-
delete-branch: true
135-
136118
- name: Generate Test Report Summary
137119
if: always()
138120
uses: ./.github/actions/java-test-report

CHANGELOG.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,82 @@ All notable changes to the Copilot SDK are documented in this file.
55
This changelog is automatically generated by an AI agent when stable releases are published.
66
See [GitHub Releases](https://github.com/github/copilot-sdk/releases) for the full list.
77

8+
## [java/v1.0.5-01](https://github.com/github/copilot-sdk/releases/tag/java/v1.0.5-01) (2026-07-01)
9+
10+
### Feature: new session options — citations, agent exclusions, and credit limits
11+
12+
Three new options are available on `SessionConfig` and `ResumeSessionConfig`. `enableCitations` (experimental) enables native model citations for supported providers; `excludedBuiltInAgents` hides named built-in agents from discovery; and `sessionLimits` sets a per-session AI-credit budget. ([#1865](https://github.com/github/copilot-sdk/pull/1865))
13+
14+
```java
15+
SessionConfig config = new SessionConfig()
16+
.setEnableCitations(true)
17+
.setExcludedBuiltInAgents(List.of("copilot"))
18+
.setSessionLimits(new SessionLimitsConfig(100.0));
19+
```
20+
21+
### New contributors
22+
23+
- @coleflennikenmsft made their first contribution in [#1854](https://github.com/github/copilot-sdk/pull/1854)
24+
- @szabta89 made their first contribution in [#1856](https://github.com/github/copilot-sdk/pull/1856)
25+
26+
## [v1.0.5](https://github.com/github/copilot-sdk/releases/tag/v1.0.5) (2026-07-01)
27+
28+
### Feature: MCP OAuth host token handlers
29+
30+
SDK applications can now handle OAuth challenges from MCP servers that require host-provided authentication. Register an `onMcpAuthRequest` callback on the session config and the SDK will invoke it whenever an MCP server responds with a `401 WWW-Authenticate` challenge; return an access token (or cancel the request). Supports initial auth, refresh, reauth, and upscope flows across all SDKs. ([#1669](https://github.com/github/copilot-sdk/pull/1669))
31+
32+
```ts
33+
const session = await client.createSession({
34+
onMcpAuthRequest: async (request) => ({
35+
accessToken: await myIdentityProvider.getToken(request.serverUrl),
36+
}),
37+
});
38+
```
39+
40+
```cs
41+
var session = await client.CreateSessionAsync(new SessionConfig
42+
{
43+
OnMcpAuthRequest = async ctx =>
44+
McpAuthResult.FromToken(new McpAuthToken
45+
{
46+
AccessToken = await myIdentityProvider.GetTokenAsync(ctx.ServerUrl)
47+
}),
48+
});
49+
```
50+
51+
### Feature: session options for citations, excluded agents, and spending limits
52+
53+
Three additional session configuration options are now available across all SDKs. ([#1865](https://github.com/github/copilot-sdk/pull/1865))
54+
55+
```ts
56+
const session = await client.createSession({
57+
enableCitations: true,
58+
excludedBuiltinAgents: ["github-search"],
59+
sessionLimits: { maxAiCredits: 10 },
60+
});
61+
```
62+
63+
```cs
64+
var session = await client.CreateSessionAsync(new SessionConfig
65+
{
66+
EnableCitations = true,
67+
ExcludedBuiltInAgents = ["github-search"],
68+
SessionLimits = new SessionLimitsConfig { MaxAiCredits = 10 },
69+
});
70+
```
71+
72+
### Other changes
73+
74+
- improvement: **[All SDKs]** rename BYOK callback field `getBearerToken``bearerTokenProvider`; add `sessionId` to `ProviderTokenArgs` for per-session token scoping ([#1796](https://github.com/github/copilot-sdk/pull/1796))
75+
- bugfix: **[Node]** fix MCP OAuth `registerInterest` sent before `session.resume`, causing "Session not found" errors when resuming a session with `onMcpAuthRequest` ([#1861](https://github.com/github/copilot-sdk/pull/1861))
76+
- feature: **[Java]** `@CopilotTool` and `@CopilotToolParam` annotations with compile-time annotation processor for ergonomic tool registration via `ToolDefinition.fromObject()` ([#1792](https://github.com/github/copilot-sdk/pull/1792), [#1838](https://github.com/github/copilot-sdk/pull/1838))
77+
- feature: **[Java]** `ToolInvocation` parameter injection in `@CopilotTool` methods for accessing session context without exposing it to the LLM schema ([#1832](https://github.com/github/copilot-sdk/pull/1832))
78+
- feature: **[Rust]** add 9 GitHub-anchored variants to `Attachment` enum (`GitHubCommit`, `GitHubRelease`, `GitHubActionsJob`, `GitHubRepository`, `GitHubFileDiff`, `GitHubTreeComparison`, `GitHubUrl`, `GitHubFile`, `GitHubSnippet`) ([#1823](https://github.com/github/copilot-sdk/pull/1823))
79+
80+
### New contributors
81+
82+
- @pallaviraiturkar0 made their first contribution in [#1823](https://github.com/github/copilot-sdk/pull/1823)
83+
- @roji made their first contribution in [#1827](https://github.com/github/copilot-sdk/pull/1827)
884
## [java/v1.0.4](https://github.com/github/copilot-sdk/releases/tag/java/v1.0.4) (2026-06-25)
985

1086
### Feature: HTTP request callback support

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Yes, a GitHub Copilot subscription is required to use the GitHub Copilot SDK, **
6565

6666
### How does billing work for SDK usage?
6767

68-
Billing for the GitHub Copilot SDK is based on the same model as the Copilot CLI, with each prompt being counted towards your premium request quota. For more information on premium requests, see [Requests in GitHub Copilot](https://docs.github.com/en/copilot/concepts/billing/copilot-requests).
68+
Billing for the GitHub Copilot SDK is based on the same model as the Copilot CLI, with each prompt being counted towards your usage allowance. For more information on Copilot usage billing, see [Usage in GitHub Copilot](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing).
6969

7070
### Does it support BYOK (Bring Your Own Key)?
7171

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Guides for building with the SDK's capabilities.
4646
* [MCP Servers](./features/mcp.md): integrate Model Context Protocol servers
4747
* [Skills](./features/skills.md): load reusable prompt modules
4848
* [Plugin Directories](./features/plugin-directories.md): bundle skills, hooks, MCP servers, and agents as a single loadable plugin
49+
* [Session limits](./features/session-limits.md): set an AI Credits budget for a session
4950
* [Image Input](./features/image-input.md): send images as attachments
5051
* [Streaming Events](./features/streaming-events.md): real-time event reference
5152
* [Steering & Queueing](./features/steering-and-queueing.md): message delivery modes

docs/features/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ These guides cover the capabilities you can add to your Copilot SDK application.
1515
| [MCP Servers](./mcp.md) | Integrate Model Context Protocol servers for external tool access |
1616
| [Skills](./skills.md) | Load reusable prompt modules from directories |
1717
| [Plugin Directories](./plugin-directories.md) | Bundle skills, hooks, MCP servers, and agents as a single loadable plugin |
18+
| [Session limits](./session-limits.md) | Set an AI Credits budget for a session and observe budget events |
1819
| [Image Input](./image-input.md) | Send images to sessions as attachments |
1920
| [Streaming Events](./streaming-events.md) | Subscribe to real-time session events (40+ event types) |
2021
| [Steering & Queueing](./steering-and-queueing.md) | Control message delivery—immediate steering vs. sequential queueing |

0 commit comments

Comments
 (0)