/** * Well-known keys used in the agent-host configuration value bag. * * The Agent Host Protocol's config schema is intentionally generic — agents * are free to advertise any property names. These constants capture the * names that the platform itself consumes (e.g. {@link SessionConfigKey.AutoApprove} * drives tool auto-approval) or that clients interpret via convention * (e.g. {@link SessionConfigKey.Branch}, {@link SessionConfigKey.Isolation}). * * Provider-owned platform properties use these names in an agent's * `resolveSessionConfig` response. Worktree properties are owned and * contributed by the host and are not passed to agents. */ export declare enum SessionConfigKey { /** `'autoApprove'` — tool auto-approval level. */ AutoApprove = "autoApprove", /** `'permissions'` — per-tool session allow/deny lists. */ Permissions = "permissions", /** Session sandbox selection; persistence records the successfully applied value. */ SandboxEnabled = "sandboxEnabled", /** `'isolation'` — host-owned `'folder'` or `'worktree'` selection. */ Isolation = "isolation", /** `'branch'` — host-owned base branch to work from. */ Branch = "branch", /** `'mode'` — agent execution mode (interactive / plan / autopilot). */ Mode = "mode", /** `'worktreeBranchPrefix'` — host-owned prefix for the worktree branch name. */ WorktreeBranchPrefix = "worktreeBranchPrefix", /** `'worktreeIncludeFiles'` — host-owned `.gitignore`-syntax patterns for git-ignored files copied into a new worktree. */ WorktreeIncludeFiles = "worktreeIncludeFiles", /** `'worktreeSymlinkFolders'` — host-owned `.gitignore`-syntax patterns for git-ignored folders symlinked into a new worktree. */ WorktreeSymlinkFolders = "worktreeSymlinkFolders", /** `'pullRequestUrl'` — host-owned pull request the session is created from; implies worktree isolation. */ PullRequestUrl = "pullRequestUrl", /** `'agentMerge'` — client-owned Agent Merge enablement and session overrides. */ AgentMerge = "agentMerge", /** `'agentMerge.controller'` — host-owned Agent Merge lifecycle state. */ AgentMergeController = "agentMerge.controller", /** `'agentMerge.folders'` — client-owned Agent Merge enablement and overrides per working-directory key. */ AgentMergeFolders = "agentMerge.folders", /** `'agentMerge.controller.folders'` — host-owned Agent Merge lifecycle state per working-directory key. */ AgentMergeControllerFolders = "agentMerge.controller.folders", /** `'agentMerge.injectedConfiguration'` — host-owned session-wide elevated configuration of older builds, restored on upgrade. */ AgentMergeInjectedConfiguration = "agentMerge.injectedConfiguration", /** `'agentMerge.chatInjectedConfiguration'` — host-owned elevation Agent Merge applied to each owning chat's own config, keyed by chat. */ AgentMergeChatInjectedConfiguration = "agentMerge.chatInjectedConfiguration", /** `'shellInitScripts'` — scripts a client generated for the session, sourced before built-in shell tool commands. */ ShellInitScripts = "shellInitScripts", /** `'sensitiveEditLocations'` — workspace-relative client customization locations that must always require edit confirmation. */ SensitiveEditLocations = "sensitiveEditLocations" } export type SessionSandboxEnabled = "default" | "on" | "off"; /** Returns the {@link SessionConfigKey.PullRequestUrl} a session is created from, if any. */ export declare function getSessionPullRequestUrl(values: Readonly> | undefined): string | undefined; /** * The set of enum values the unified permission picker *tolerates* for the * {@link SessionConfigKey.AutoApprove} property when deciding whether a * session's schema is "well-known" (and therefore handled by the dedicated * permission picker rather than the generic per-property fallback). * * `default` is the required baseline level; `assisted` and `autoApprove` are * offered elevated levels. `autopilot` is retained for backward compatibility * with sessions created before it moved onto the mode axis. */ export declare const KNOWN_AUTO_APPROVE_VALUES: ReadonlySet; /** * The set of enum values understood for the {@link SessionConfigKey.Mode} * property: the agent execution mode axis. */ export declare const KNOWN_MODE_VALUES: ReadonlySet; /** * Removes session config that is derived from live client state and must not * survive an Agent Host restart. */ export declare function omitTransientSessionConfigValues(values: Record): Record; /** Persists confirmed sandbox enablement, retaining the stored selection until runtime confirmation is available. */ export declare function getPersistedSessionConfigValues(values: Record, appliedSandboxEnabled: boolean | undefined, persistedValues?: string): Record; /** * Removes values owned by a concrete session or target rather than a reusable Automation template. * Sandbox selection stays so a saved preference survives reopening, and managed policy can still force it on at run time. */ export declare function omitAutomationSessionTemplateConfigValues(values: Record): Record; /** Retains definition-owned values while an editor-facing Automation template is written back. */ export declare function pickAutomationDefinitionOwnedConfigValues(values: Readonly> | undefined): Record;