Skip to content

v1.0.5

Choose a tag to compare

@github-actions github-actions released this 01 Jul 15:13
62ffcfe

Feature: MCP OAuth host token handlers

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)

const session = await client.createSession({
    onMcpAuthRequest: async (request) => ({
        accessToken: await myIdentityProvider.getToken(request.serverUrl),
    }),
});
var session = await client.CreateSessionAsync(new SessionConfig
{
    OnMcpAuthRequest = async ctx =>
        McpAuthResult.FromToken(new McpAuthToken
        {
            AccessToken = await myIdentityProvider.GetTokenAsync(ctx.ServerUrl)
        }),
});

Feature: session options for citations, excluded agents, and spending limits

Three additional session configuration options are now available across all SDKs. (#1865)

const session = await client.createSession({
    enableCitations: true,
    excludedBuiltinAgents: ["github-search"],
    sessionLimits: { maxAiCredits: 10 },
});
var session = await client.CreateSessionAsync(new SessionConfig
{
    EnableCitations = true,
    ExcludedBuiltInAgents = ["github-search"],
    SessionLimits = new SessionLimitsConfig { MaxAiCredits = 10 },
});

Other changes

  • improvement: [All SDKs] rename BYOK callback field getBearerTokenbearerTokenProvider; add sessionId to ProviderTokenArgs for per-session token scoping (#1796)
  • bugfix: [Node] fix MCP OAuth registerInterest sent before session.resume, causing "Session not found" errors when resuming a session with onMcpAuthRequest (#1861)
  • feature: [Java] @CopilotTool and @CopilotToolParam annotations with compile-time annotation processor for ergonomic tool registration via ToolDefinition.fromObject() (#1792, #1838)
  • feature: [Java] ToolInvocation parameter injection in @CopilotTool methods for accessing session context without exposing it to the LLM schema (#1832)
  • feature: [Rust] add 9 GitHub-anchored variants to Attachment enum (GitHubCommit, GitHubRelease, GitHubActionsJob, GitHubRepository, GitHubFileDiff, GitHubTreeComparison, GitHubUrl, GitHubFile, GitHubSnippet) (#1823)

New contributors

  • @pallaviraiturkar0 made their first contribution in #1823
  • @roji made their first contribution in #1827
  • @coleflennikenmsft made their first contribution in #1854
  • @szabta89 made their first contribution in #1856

Full Changelog: v1.0.4...v1.0.5

Generated by Release Changelog Generator · sonnet46 2.6M