Skip to content

Commit ae591cc

Browse files
committed
Forward selfFetchManagedSettings in session.create wire call
Add selfFetchManagedSettings to SessionConfigBase and forward it in the session.create RPC payload. This allows hosts (e.g. VS Code AHP) to opt the runtime into enterprise managed-settings self-fetch and enforcement. Without this change, the field is silently dropped by the explicit field list in client.ts and never reaches the runtime. Requires: github/copilot-agent-runtime#agents/managed-settings-sdk-capability
1 parent 6189f84 commit ae591cc

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

nodejs/src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,7 @@ export class CopilotClient {
14491449
remoteSession: config.remoteSession,
14501450
cloud: config.cloud,
14511451
expAssignments: config.expAssignments,
1452+
selfFetchManagedSettings: config.selfFetchManagedSettings,
14521453
});
14531454

14541455
const {
@@ -1660,6 +1661,7 @@ export class CopilotClient {
16601661
remoteSession: config.remoteSession,
16611662
openCanvases: config.openCanvases,
16621663
expAssignments: config.expAssignments,
1664+
selfFetchManagedSettings: config.selfFetchManagedSettings,
16631665
});
16641666

16651667
const { workspacePath, capabilities, openCanvases } = response as {

nodejs/src/types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,6 +2149,14 @@ export interface SessionConfigBase {
21492149
*/
21502150
gitHubToken?: string;
21512151

2152+
/**
2153+
* Opt-in: when true, the runtime self-fetches enterprise managed settings
2154+
* (bypass-permissions policy) at session bootstrap using the session's
2155+
* `gitHubToken`. The runtime calls `/copilot_internal/managed_settings`
2156+
* and enforces the result fail-closed before the first turn.
2157+
*/
2158+
selfFetchManagedSettings?: boolean;
2159+
21522160
/**
21532161
* When true, skips embedding-based retrieval for this session.
21542162
* Use in multitenant deployments to prevent cross-session information leakage

0 commit comments

Comments
 (0)