Skip to content

Forward OAuth client metadata URL in Rust sessions - #2258

Draft
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums-auth-client-metadata-url
Draft

Forward OAuth client metadata URL in Rust sessions#2258
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums-auth-client-metadata-url

Conversation

@SamMorrowDrums

Copy link
Copy Markdown

Summary

  • expose the optional authClientIdMetadataUrl session setting in the Rust SDK
  • forward it through both session.create and session.resume
  • keep the field omitted when unset so older runtimes remain compatible

Dependencies

  • Runtime support: github/copilot-agent-runtime#14687
  • Tracking: github/copilot-agent-runtime#6983
  • Desktop metadata hosting: github/github#444810

This dependency is needed by the GitHub Copilot desktop app consumer slice. Runtime #14687 must be available for the value to affect MCP OAuth; older runtimes ignore the additive optional request field.

Validation

  • cargo fmt --check
  • cargo test auth_client_id_metadata_url_reaches_create_and_resume_wire_payloads

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
Comment on lines +6414 to +6420
let (resume_wire, _) = ResumeSessionConfig::new(SessionId::from("sess-1"))
.with_auth_client_id_metadata_url(url)
.into_wire()
.expect("default resume has no duplicate handlers");
let resume_json = serde_json::to_value(&resume_wire).unwrap();
assert_eq!(resume_json["authClientIdMetadataUrl"], url);
}
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.

2 participants