Skip to content

Add Rust managed settings client wrapper - #1987

Draft
jbrown1618 wants to merge 2 commits into
github:mainfrom
jbrown1618:jbrown1618-managed-settings-client
Draft

Add Rust managed settings client wrapper#1987
jbrown1618 wants to merge 2 commits into
github:mainfrom
jbrown1618:jbrown1618-managed-settings-client

Conversation

@jbrown1618

Copy link
Copy Markdown

Summary

  • Add Client::read_managed_settings() as a top-level Rust SDK helper for the server-scoped managedSettings.read JSON-RPC method.
  • Add an opaque ManagedSettings JSON result type so the SDK preserves the runtime-owned canonical payload without reinterpreting policy.
  • Cover the helper with an in-memory JSON-RPC test that verifies it sends managedSettings.read with no session ID before any session.create call.

Dependency

This draft depends on the companion github/copilot-agent-runtime draft PR that exposes the server-scoped managedSettings.read method. The generated RPC schema in this repo does not yet include that method, so this PR adds the Rust top-level wrapper directly rather than hand-editing generated RPC output.

github/copilot-host will consume this Rust SDK wrapper to include managed settings during environment registration.

Validation

  • rustfmt direct check using nightly-2026-04-14 rustfmt on changed Rust files
  • cargo test --test managed_settings_test with Rust 1.94.0
  • cargo clippy --all-features --all-targets -- -D warnings with Rust 1.94.0

Limit: cargo test --all-features was attempted but stopped after several minutes because it appeared stuck downloading the bundled runtime package (@github/copilot-darwin-arm64).

Expose a top-level Rust Client::read_managed_settings helper for the server-scoped managedSettings.read RPC and preserve the runtime-owned payload as opaque JSON.

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

Copilot-Session: 115e51b8-7534-42e6-956b-aa212c360ddc
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 44940cff-d077-4e4d-a8ce-613de54ffded
Copilot AI review requested due to automatic review settings August 3, 2026 19:40

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 a Rust SDK wrapper for retrieving server-scoped managed settings without creating a session.

Changes:

  • Adds Client::read_managed_settings().
  • Introduces ManagedSettingsReadResult.
  • Tests successful and runtime-error responses over in-memory JSON-RPC.
Show a summary per file
File Description
rust/src/lib.rs Adds the managed-settings RPC wrapper.
rust/src/types.rs Defines the public response type.
rust/tests/managed_settings_test.rs Verifies request scope and response handling.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants