import { Disposable } from "../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../base/common/observable.js"; import { IAgentHostEnablementService } from "../../../../../platform/agentHost/common/agentHostEnablementService.service.js"; import { SessionConfigPropertySchema } from "../../../../../platform/agentHost/common/state/protocol/commands.js"; import { ChatConfiguration, ChatPermissionLevel } from "../../../../../workbench/contrib/chat/common/constants.js"; import { IPermissionLevelMeta, IPermissionPickerDelegate } from "../../copilotChatSessions/browser/permissionPicker.js"; import { ISessionsProvidersService } from "../../../../services/sessions/browser/sessionsProvidersService.service.js"; import { IActiveSession } from "../../../../services/sessions/common/sessionsManagement.js"; import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js"; import { IManagedSettingsService } from "../../../../../platform/policy/common/copilotManagedSettings.service.js"; import { IChatPhoneInputPresenter } from "../../../../../workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.service.js"; import { IWorkbenchEnvironmentService } from "../../../../../workbench/services/environment/common/environmentService.service.js"; import { isWellKnownAutoApproveSchema, isWellKnownModeSchema, IUnavailablePermissionLevel } from "../../../../../workbench/contrib/chat/browser/agentSessions/agentHost/agentHostModePickerPresentation.js"; export { isWellKnownAutoApproveSchema, isWellKnownModeSchema }; /** Adapts the active session's advertised approval property to the shared permission picker. */ export declare class AgentHostPermissionPickerDelegate extends Disposable implements IPermissionPickerDelegate { private readonly _session; private readonly _sessionsProvidersService; private readonly _configurationService; /** Fires every time any agent-host provider's session config changes. */ private readonly _configChangedSignal; private readonly _providerSubscriptions; readonly currentPermissionLevel: IObservable; /** Supported levels the host's availability report withholds; shown disabled and never selectable. */ readonly unavailableLevels: IObservable; readonly isApplicable: IObservable; readonly isModePickerCombined: IObservable; readonly isResolving: IObservable; readonly managedSandboxEnforced: IObservable; readonly managedSandboxAllowsBypass: IObservable; readonly sandboxEnabled: IObservable; readonly sandboxConfirmedEnabled: IObservable; readonly sandboxApplyFailed: IObservable; readonly sandboxSelectionRejected: IObservable; readonly sandboxDevContainer: IObservable; readonly sandboxDevContainerSupported: IObservable; readonly sandboxToggleSettingId: IObservable; readonly sandboxToggleConfigurationKeys: string[]; readonly getSandboxToggleProvider: () => string | undefined; readonly isSandboxToggleApplicable: () => boolean; readonly getSandboxToggleSettingId: () => string | undefined; get availableLevels(): readonly ChatPermissionLevel[]; /** Agent-host sessions seed their default approval level from this setting. */ readonly defaultSettingKey = ChatConfiguration.DefaultConfiguration; readonly isPolicyRestricted: () => boolean; getPermissionLevelMeta(level: ChatPermissionLevel, meta: IPermissionLevelMeta): IPermissionLevelMeta; constructor(_session: IObservable, _sessionsProvidersService: ISessionsProvidersService, _configurationService: IConfigurationService, phoneInputPresenter: IChatPhoneInputPresenter, agentHostEnablementService: IAgentHostEnablementService, environmentService: IWorkbenchEnvironmentService, managedSettingsService: IManagedSettingsService); getSandboxToggle(): import("../../../../../platform/actionWidget/browser/actionList.js").IActionListItemInlineToggle | undefined; setSandboxEnabled(enabled: boolean): void; setPermissionLevel(level: ChatPermissionLevel): Promise; getPermissionLevelHover(level: ChatPermissionLevel, _meta: IPermissionLevelMeta): string; private _readLevel; private _readIsWellKnown; private _getProvider; private _getAgentHostProvider; private _watchProviders; } export declare function isWellKnownModeValue(schema: SessionConfigPropertySchema, value: string): boolean; /** * Returns `true` when a `permissionMode` session-config property uses the * Claude SDK's well-known permission-mode value set and includes `default`. */ export declare function isWellKnownClaudePermissionModeSchema(schema: SessionConfigPropertySchema): boolean; /** * Returns `true` when a `codex.permissionsPreset` session-config property uses * the Codex permissions-preset value set and includes `default`. * * Codex collapses its three security axes (sandbox × approval policy × * approvals reviewer) into a single user-facing preset; this guard lets the * dedicated {@link AgentHostCodexApprovalsPicker} claim the property while the * generic per-property picker stands down. */ export declare function isWellKnownCodexApprovalsSchema(schema: SessionConfigPropertySchema): boolean;