Skip to content

Commit 9fdb1a8

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 07f849a commit 9fdb1a8

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
@@ -1448,6 +1448,7 @@ export class CopilotClient {
14481448
remoteSession: config.remoteSession,
14491449
cloud: config.cloud,
14501450
expAssignments: config.expAssignments,
1451+
selfFetchManagedSettings: config.selfFetchManagedSettings,
14511452
});
14521453

14531454
const {
@@ -1646,6 +1647,7 @@ export class CopilotClient {
16461647
remoteSession: config.remoteSession,
16471648
openCanvases: config.openCanvases,
16481649
expAssignments: config.expAssignments,
1650+
selfFetchManagedSettings: config.selfFetchManagedSettings,
16491651
});
16501652

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

nodejs/src/types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,6 +2072,14 @@ export interface SessionConfigBase {
20722072
*/
20732073
gitHubToken?: string;
20742074

2075+
/**
2076+
* Opt-in: when true, the runtime self-fetches enterprise managed settings
2077+
* (bypass-permissions policy) at session bootstrap using the session's
2078+
* `gitHubToken`. The runtime calls `/copilot_internal/managed_settings`
2079+
* and enforces the result fail-closed before the first turn.
2080+
*/
2081+
selfFetchManagedSettings?: boolean;
2082+
20752083
/**
20762084
* When true, skips embedding-based retrieval for this session.
20772085
* Use in multitenant deployments to prevent cross-session information leakage

0 commit comments

Comments
 (0)