Forward enableManagedSettings in session.create (all SDKs)#1925
Open
devm33 wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Threads an opt-in selfFetchManagedSettings flag through each language SDK’s session config and into the session.create / session.resume JSON-RPC payloads, enabling the runtime to self-fetch enterprise managed settings at session bootstrap using the session GitHub token.
Changes:
- Added
selfFetchManagedSettings(language-idiomatic naming/types) to session create + resume configuration surfaces across SDKs. - Forwarded the flag into the corresponding create/resume wire/request payloads so it’s emitted as
selfFetchManagedSettingswhen set. - Updated supporting builders/clone paths/debug output where applicable to preserve config behavior and observability.
Show a summary per file
| File | Description |
|---|---|
| rust/src/wire.rs | Adds self_fetch_managed_settings to create/resume wire structs (camelCase on the wire via serde). |
| rust/src/types.rs | Adds config fields + builder methods and forwards into wire conversion + defaults/debug. |
| python/copilot/client.py | Adds self_fetch_managed_settings kwargs to create/resume and forwards into payload as selfFetchManagedSettings. |
| nodejs/src/types.ts | Adds selfFetchManagedSettings?: boolean to SessionConfigBase. |
| nodejs/src/client.ts | Forwards selfFetchManagedSettings in session.create and session.resume request payloads. |
| java/src/main/java/com/github/copilot/SessionRequestBuilder.java | Forwards optional flag from config into create/resume request objects. |
| java/src/main/java/com/github/copilot/rpc/SessionConfig.java | Adds optional flag to session config, accessor, setter, and clone copy. |
| java/src/main/java/com/github/copilot/rpc/CreateSessionRequest.java | Adds nullable selfFetchManagedSettings JSON property with getter/setter/clear. |
| java/src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java | Adds nullable selfFetchManagedSettings JSON property with getter/setter/clear. |
| java/src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java | Adds optional flag to resume config, accessor, setter, and clone copy. |
| go/types.go | Adds SelfFetchManagedSettings *bool to session + resume configs and to create/resume request structs. |
| go/client.go | Forwards SelfFetchManagedSettings from configs into create/resume requests. |
| dotnet/src/Types.cs | Adds SelfFetchManagedSettings to SessionConfigBase and includes it in cloning. |
| dotnet/src/Client.cs | Forwards SelfFetchManagedSettings into create/resume request records (JSON name selfFetchManagedSettings). |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 0
- Review effort level: Low
This comment has been minimized.
This comment has been minimized.
tpope
approved these changes
Jul 7, 2026
This comment has been minimized.
This comment has been minimized.
Threads an optional `selfFetchManagedSettings` flag from the SDK session config through the `session.create` / `resumeSession` wire calls, so consumers can opt the runtime into self-fetching enterprise managed settings (bypass-permissions policy) at session bootstrap. Extends the Node.js change from #1846 to every language SDK: - nodejs: `selfFetchManagedSettings?: boolean` on `SessionConfigBase`, forwarded in create/resume payloads. - python: `self_fetch_managed_settings` kwarg on create/resume, forwarded as `selfFetchManagedSettings`. - go: `SelfFetchManagedSettings *bool` on `SessionConfig` / `ResumeSessionConfig` and wire structs. - dotnet: `SelfFetchManagedSettings` on `SessionConfigBase` (+ clone) and wire records. - rust: `self_fetch_managed_settings: Option<bool>` with builders and wire structs. - java: `selfFetchManagedSettings` on config, request classes, and builder. Purely additive and opt-in; unset behaves exactly as before. Requires the session `gitHubToken`; the runtime is expected to reject session creation when omitted (fail-closed). Runtime enforcement lives in the runtime PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Follows up runtime rename github/copilot-agent-runtime#12118, which renamed the `session.create` opt-in parameter `selfFetchManagedSettings` to `enableManagedSettings` (wire name `enableManagedSettings`). The new name reads as an "enable managed-settings enforcement" switch rather than describing the fetch mechanism. Renames the field/param across every SDK to match the new wire contract: nodejs, python, go, dotnet, rust, java. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9e6cc04 to
fe539ae
Compare
This comment has been minimized.
This comment has been minimized.
The sed-based rename left misaligned struct-tag whitespace in go/types.go (gofmt) and over-expanded Debug .field() blocks in rust/src/types.rs (rustfmt). Reformat with the source formatters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Cross-SDK Consistency Review ✅All six SDK implementations ( Naming conventions (all correct per language idiom)
Wire serialization — all use
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends #1846 to all language SDKs.
Forward
enableManagedSettingsinsession.createThreads an optional
enableManagedSettingsflag from the SDK session config through thesession.create/resumeSessionwire calls, so consumers can opt the runtime into enterprise managed-settings enforcement (bypass-permissions policy) at session bootstrap using the session'sgitHubToken.Per language:
enableManagedSettings?: booleanonSessionConfigBase; forwarded in create/resume payloads. (mirrors Forward selfFetchManagedSettings in session.create #1846)enable_managed_settingskwarg oncreate_session/resume_session, sent on the wire asenableManagedSettings.EnableManagedSettings *boolonSessionConfig/ResumeSessionConfigand the create/resume wire structs; forwarded inclient.go.EnableManagedSettingsonSessionConfigBase(incl. clone) and both wire records.enable_managed_settings: Option<bool>withwith_enable_managed_settingsbuilders on both configs and the wire structs.enableManagedSettingsonSessionConfig/ResumeSessionConfig(getter/setter + clone), the request classes, andSessionRequestBuilder.Purely additive and opt-in; unset behaves exactly as before. Requires the session
gitHubToken; the runtime is expected to reject session creation when omitted (fail-closed). Runtime enforcement lives in the runtime PRs.Verification
go build,go vet, test compile ✓CloneTests/SerializationTests(76 passed) ✓cargo build+session_configlib tests (26 passed) ✓ConfigCloneTest/SessionRequestBuilderTest(116 passed), Spotless applied ✓tsc --noEmit✓Related PRs
enableManagedSettings): github/copilot-agent-runtime#12118