Skip to content

Forward OAuth client metadata URL in all SDK sessions - #2258

Open
SamMorrowDrums wants to merge 16 commits into
mainfrom
sammorrowdrums-auth-client-metadata-url
Open

Forward OAuth client metadata URL in all SDK sessions#2258
SamMorrowDrums wants to merge 16 commits into
mainfrom
sammorrowdrums-auth-client-metadata-url

Conversation

@SamMorrowDrums

@SamMorrowDrums SamMorrowDrums commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • expose the optional host OAuth client metadata document URL across Node, Python, Go, .NET, Java, and Rust
  • forward explicit host identity through both session.create and session.resume
  • omit the field when unset so generic SDK users remain isolated and older runtimes remain compatible
  • add configured-value and unset-omission serialization coverage in every supported SDK

Dependencies

  • Runtime support: github/copilot-agent-runtime#14687 — merged at 92879e7bed882e63ff3e1cba25ee2bef504f213f; closes dedicated subtask github/copilot-agent-runtime#17439
  • Production CLI client metadata: https://github.com/copilot/cli/client-metadata.json — live
  • Desktop client metadata hosting — live
  • Tracking: github/copilot-agent-runtime#6983

Runtime #14687 is required for the value to affect MCP OAuth. Older runtimes ignore this additive optional request field.

Validation

  • Node: focused Vitest coverage; Prettier, ESLint, TypeScript typecheck, and build
  • Python: focused pytest coverage; Ruff format/lint and ty check copilot
  • Go: focused request serialization coverage and go test ./...
  • .NET: focused serialization coverage and full test suite
  • Java: focused request/Jackson coverage and Spotless
  • Rust: rustfmt, Clippy, and focused create/resume serialization coverage

The branch is merged with current SDK main and validated against CLI 1.0.83-3.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 4, 2026 20:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Rust SDK support for forwarding OAuth client metadata URLs during session creation and resume.

Changes:

  • Adds optional configuration fields and builders.
  • Serializes the value in create/resume wire payloads while omitting None.
  • Adds serialization coverage for configured values.
Show a summary per file
File Description
rust/src/wire.rs Adds optional camelCase wire fields.
rust/src/types.rs Exposes, forwards, and tests the new setting.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread rust/src/types.rs
SamMorrowDrums and others added 4 commits August 13, 2026 16:31
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f531cfac-d107-4676-963c-a6c10cc92148
Retain OAuth client metadata URL forwarding in create and resume payloads, including custom Debug output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f531cfac-d107-4676-963c-a6c10cc92148
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@SamMorrowDrums
SamMorrowDrums marked this pull request as ready for review August 13, 2026 14:51
@SamMorrowDrums
SamMorrowDrums requested a review from a team as a code owner August 13, 2026 14:51
@SamMorrowDrums
SamMorrowDrums marked this pull request as draft August 13, 2026 14:58
@SamMorrowDrums
SamMorrowDrums marked this pull request as ready for review August 13, 2026 17:30
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 716e07c8-226b-4a6f-beb0-877ccee1eb6e
Document that external SDK users remain generic and isolated unless they explicitly provide a host client metadata URL, including on resume.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 716e07c8-226b-4a6f-beb0-877ccee1eb6e
@SteveSandersonMS

Copy link
Copy Markdown
Contributor

Thanks for adding this to the Rust SDK — the implementation is clean and follows the existing optional-field pattern well (builder method, correct skip_serializing_if omission, and coverage for both session.create and session.resume).

Per our contribution guidelines, features need to land consistently across all supported SDKs rather than in a single language, so this shouldn't merge Rust-only. Could you also expose and forward authClientIdMetadataUrl (or the per-language idiomatic equivalent) in Node, C#, Python, Go, and Java, following the same pattern as mcpOAuthTokenStorage/embeddingCacheStorage in each of those SDKs?

For coverage, please add create/resume wire-serialization unit tests per language (mirroring the Rust test here), and only add E2E coverage where the runtime dependency (copilot-agent-runtime#14687) is far enough along for it to be meaningful — no need to fake E2E coverage against a runtime that doesn't yet honor the field.

Once parity across languages and per-language tests are in place, please mark this ready for review again and we'll take another look. Thanks again for driving this!

Expose the optional host identity on create and resume in Node, Python, Go, .NET, Java, and Rust while omitting it when unset for older-runtime compatibility.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 716e07c8-226b-4a6f-beb0-877ccee1eb6e
@SamMorrowDrums SamMorrowDrums changed the title Forward OAuth client metadata URL in Rust sessions Forward OAuth client metadata URL in all SDK sessions Aug 27, 2026
@SamMorrowDrums
SamMorrowDrums marked this pull request as ready for review August 27, 2026 15:49
@github-actions

This comment has been minimized.

Avoid deprecated no-ID create request helpers in OAuth client metadata serialization coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 716e07c8-226b-4a6f-beb0-877ccee1eb6e
@github-actions

Copy link
Copy Markdown
Contributor

Cross-SDK Consistency Review ✅

This PR uniformly adds authClientIdMetadataUrl across all six SDK implementations for both createSession and resumeSession:

SDK Public API name Null-omit behavior
Node.js/TypeScript authClientIdMetadataUrl?: string on SessionConfigBase ✅ omitted when undefined
Python auth_client_id_metadata_url: str | None = None param ✅ omitted when None
Go AuthClientIDMetadataURL string on SessionConfig/ResumeSessionConfig omitempty tag
.NET string? AuthClientIdMetadataUrl on SessionConfigBase ✅ omitted when null
Java getAuthClientIdMetadataUrl() / setAuthClientIdMetadataUrl() on SessionConfig/ResumeSessionConfig @JsonInclude(NON_NULL)
Rust Added to types.rs / wire.rs omitempty-equivalent

Naming follows each language's idiomatic convention (camelCase for TS/Java, snake_case for Python/Rust, PascalCase for Go/exported fields, PascalCase for .NET). The JSON wire name authClientIdMetadataUrl is consistent across all implementations.

All six SDKs also include focused serialization tests verifying both the configured-value and unset-omission cases. No cross-SDK consistency issues found.

Generated by SDK Consistency Review Agent for #2258 · sonnet46 29.4 AIC · ⌖ 8.28 AIC · ⊞ 6.6K ·

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums and others added 2 commits September 3, 2026 09:56
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the reviewer-ready CIMD feature tree while preserving the published workflow experiment history.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants