Forward selfFetchManagedSettings in session.create (all SDKs)#1925
Open
devm33 wants to merge 1 commit into
Open
Forward selfFetchManagedSettings in session.create (all SDKs)#1925devm33 wants to merge 1 commit into
devm33 wants to merge 1 commit into
Conversation
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>
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
Contributor
Cross-SDK Consistency Review ✅All six SDK implementations are covered and consistent. Here's a summary of what was verified: Coverage (all SDKs ✅)
API Design Consistency
No cross-SDK inconsistencies found. This PR successfully extends the feature from Node.js (#1846) to all five remaining SDKs.
|
tpope
approved these changes
Jul 7, 2026
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
selfFetchManagedSettingsinsession.createThreads an optional
selfFetchManagedSettingsflag from the SDK session config through thesession.create/resumeSessionwire calls, so consumers can opt the runtime into self-fetching enterprise managed settings (bypass-permissions policy) at session bootstrap using the session'sgitHubToken.Per language:
selfFetchManagedSettings?: booleanonSessionConfigBase; forwarded in create/resume payloads. (mirrors Forward selfFetchManagedSettings in session.create #1846)self_fetch_managed_settingskwarg oncreate_session/resume_session, sent on the wire asselfFetchManagedSettings.SelfFetchManagedSettings *boolonSessionConfig/ResumeSessionConfigand the create/resume wire structs; forwarded inclient.go.SelfFetchManagedSettingsonSessionConfigBase(incl. clone) and both wire records.self_fetch_managed_settings: Option<bool>withwith_self_fetch_managed_settingsbuilders on both configs and the wire structs.selfFetchManagedSettingsonSessionConfig/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 PR.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