Path: blob/main/src/vs/platform/agentHost/common/sessionConfigKeys.ts
13394 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45/**6* Well-known keys used in the agent-host configuration value bag.7*8* The Agent Host Protocol's config schema is intentionally generic — agents9* are free to advertise any property names. These constants capture the10* names that the platform itself consumes (e.g. {@link SessionConfigKey.AutoApprove}11* drives tool auto-approval) or that clients interpret via convention12* (e.g. {@link SessionConfigKey.Branch}, {@link SessionConfigKey.Isolation}).13*14* Agents that opt into the corresponding behavior should use these exact15* property names in their `resolveSessionConfig` response.16*/17export const enum SessionConfigKey {18/** `'autoApprove'` — tool auto-approval level. */19AutoApprove = 'autoApprove',20/** `'permissions'` — per-tool session allow/deny lists. */21Permissions = 'permissions',22/** `'isolation'` — `'folder'` or `'worktree'`. */23Isolation = 'isolation',24/** `'branch'` — base branch to work from. */25Branch = 'branch',26/** `'branchNameHint'` — client-supplied hint used during worktree creation. */27BranchNameHint = 'branchNameHint',28/** `'mode'` — agent execution mode (interactive / plan). */29Mode = 'mode',30}3132/**33* The set of enum values the unified permission picker understands for the34* {@link SessionConfigKey.AutoApprove} property.35*36* `default` is the required baseline level; `autoApprove` and `autopilot`37* are optional (an agent may choose to advertise a subset).38*/39export const KNOWN_AUTO_APPROVE_VALUES: ReadonlySet<string> = new Set(['default', 'autoApprove', 'autopilot']);404142