Skip to content

Add generated Rust account.getManagedSettings API - #2797

Draft
ellismg wants to merge 1 commit into
mainfrom
ellismg-expose-managed-settings-rust
Draft

ellismg wants to merge 1 commit into
mainfrom
ellismg-expose-managed-settings-rust

Conversation

@ellismg

@ellismg ellismg commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the account.getManagedSettings RPC surface to the Rust SDK, matching runtime PR github/copilot-agent-runtime#12606 and the shape vendored ahead-of-sync in github/github-app#8854.

What changed

Regenerated rust/src/generated/{api_types.rs,rpc.rs} via the real codegen pipeline (npm run generate:rust), using a schema patched with the new RPC method/types on top of the pinned CLI schema already used by this repo:

  • rpc_methods::ACCOUNT_GETMANAGEDSETTINGS constant ("account.getManagedSettings")
  • AccountGetManagedSettingsRequest { git_hub_token: Option<String> }
  • AccountGetManagedSettingsResult { account: Option<String>, resolved: ManagedSettingsResolvedData }
  • ClientRpcAccount::get_managed_settings() / get_managed_settings_with_params(...)

ManagedSettingsResolvedData is unchanged — this repo's main already carries a richer schema for that type than #12606's snapshot (client_managed, policy_helper_managed, sandbox_enabled_by_undetermined_policy, permissions_allow_intersected), so the new result type references the existing, more current definition rather than regressing it.

Surface is marked @experimental, following the existing get_quota/get_quota_with_params pattern exactly.

Validation

  • cargo build --all-features — passes
  • cargo check --all-features — passes
  • cargo +nightly-2026-04-14 fmt --all -- --config-path .rustfmt.nightly.toml --check — clean
  • cargo clippy --all-targets --features test-support -- --no-deps -D warnings -D clippy::unwrap_used -D clippy::disallowed_macros -D clippy::await_holding_invalid_type — clean
  • cargo test --features test-support --test api_types_test — 29/29 passing (no regressions)

No other generated files changed.

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

Regenerate rust/src/generated/{api_types.rs,rpc.rs} via the real codegen
pipeline (npm run generate:rust) against the pinned CLI schema, patched
with the account.getManagedSettings RPC and its request/result types to
match runtime PR github/copilot-agent-runtime#12606 and the shape vendored
in github/github-app#8854:

- rpc_methods::ACCOUNT_GETMANAGEDSETTINGS constant
- AccountGetManagedSettingsRequest (optional gitHubToken)
- AccountGetManagedSettingsResult (account, resolved: ManagedSettingsResolvedData)
- ClientRpcAccount::get_managed_settings / get_managed_settings_with_params

ManagedSettingsResolvedData is unchanged (already richer on main than the
older #12606 schema snapshot); the new result type references the existing
definition. Surface is marked @experimental, following the get_quota /
get_quota_with_params pattern.

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

This branch has not been deployed

No deployments
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.

1 participant