Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ type PostToolUseHookInput = Parameters<NonNullable<SessionHooks['onPostToolUse']
type CopilotSessionLaunchConfig = ResumeSessionConfig & {
readonly pluginDirectories?: string[];
readonly remoteSession?: 'export';
/**
* Opt the runtime into self-fetching enterprise managed settings at session
* bootstrap. Declared locally until the published `@github/copilot-sdk` carries
* it on `SessionConfigBase`; it is forwarded to `createSession` and read by the
* runtime at runtime regardless of the published SDK's static type.
*/
readonly selfFetchManagedSettings?: boolean;
};

/**
Expand Down Expand Up @@ -409,6 +416,12 @@ export class CopilotSessionLauncher implements ICopilotSessionLauncher {
// session must opt in via `remoteSession` to actually export
// events. Without this, sessions default to "off".
remoteSession: this._configurationService.getRootValue(platformRootSchema, AgentHostSessionSyncEnabledConfigKey) === true ? 'export' : undefined,
// Opt the runtime into self-fetching enterprise managed settings
// (bypass-permissions policy) at session bootstrap. The runtime uses
// the session's gitHubToken to call /copilot_internal/managed_settings
// and enforces the result fail-closed before the first turn.
// Typed locally on CopilotSessionLaunchConfig pending the SDK type update.
selfFetchManagedSettings: true,
};
}
}
Loading