import type { RuntimeFilesystemApprovalGrant } from '../../core/permission-policy.js';
/**
 * Persisted permissioning settings.
 *
 * This schema stores only runtime-owned permission defaults and persistent
 * grants. Session-only approval state belongs elsewhere.
 */
export interface RuntimePermissioningFilesystemSettings {
    workspaceRoots?: string[];
    persistentApprovals?: RuntimeFilesystemApprovalGrant[];
}
export interface RuntimePermissioningSpreadsheetSettings {
    autoApproveDefault?: boolean;
}
export interface RuntimePermissioningAgentSettings {
    dangerouslySkipPermissions?: boolean;
}
export interface RuntimePermissioningShellSettings {
}
export interface RuntimePermissioningSubagentSettings {
}
export interface RuntimePermissioningSettings {
    version?: 1;
    runtime?: RuntimePermissioningAgentSettings;
    filesystem?: RuntimePermissioningFilesystemSettings;
    spreadsheet?: RuntimePermissioningSpreadsheetSettings;
    shell?: RuntimePermissioningShellSettings;
    subagents?: RuntimePermissioningSubagentSettings;
}
export type RuntimePermissioningFieldKind = 'workspace_roots' | 'filesystem_grants' | 'boolean';
export interface RuntimePermissioningFieldSpec {
    id: 'runtime.dangerouslySkipPermissions' | 'filesystem.workspaceRoots' | 'filesystem.persistentApprovals' | 'spreadsheet.autoApproveDefault';
    command: 'skip-runtime-permissions' | 'workspace-roots' | 'filesystem-grants' | 'spreadsheet-auto-approve';
    label: string;
    description: string;
    kind: RuntimePermissioningFieldKind;
    trueLabel?: string;
    falseLabel?: string;
}
/**
 * Central field catalog for the persisted permissioning schema.
 *
 * Slash-command UI and any future settings UIs should render from this spec
 * instead of hardcoding a second permissions model in the presentation layer.
 */
export declare const RUNTIME_PERMISSIONING_FIELD_SPECS: readonly RuntimePermissioningFieldSpec[];
export declare function getRuntimePermissioningFieldSpecByCommand(command: string): RuntimePermissioningFieldSpec | undefined;
export declare function createDefaultRuntimePermissioningSettings(): RuntimePermissioningSettings;
export declare function mergeRuntimePermissioningSettings(base: RuntimePermissioningSettings | undefined, overrides: RuntimePermissioningSettings | undefined): RuntimePermissioningSettings | undefined;
/**
 * Normalizes legacy permission fields into the canonical `permissioning` tree.
 *
 * The caller still owns broader settings migration. This helper only handles
 * the permissioning slice so the schema logic can stay out of SettingsManager.
 */
export declare function migrateRuntimePermissioningSettings(settings: Record<string, unknown>, scope: 'global' | 'project'): {
    permissioning: RuntimePermissioningSettings | undefined;
    changed: boolean;
};
export declare function getWorkspaceRootsFromPermissioning(permissioning: RuntimePermissioningSettings | undefined): string[];
export declare function getDangerouslySkipRuntimePermissionsFromPermissioning(permissioning: RuntimePermissioningSettings | undefined): boolean;
export declare function setPermissioningWorkspaceRoots(permissioning: RuntimePermissioningSettings | undefined, workspaceRoots: string[]): RuntimePermissioningSettings;
export declare function addPermissioningFilesystemApproval(permissioning: RuntimePermissioningSettings | undefined, grant: RuntimeFilesystemApprovalGrant): RuntimePermissioningSettings;
export declare function removePermissioningFilesystemApproval(permissioning: RuntimePermissioningSettings | undefined, grant: RuntimeFilesystemApprovalGrant): RuntimePermissioningSettings;
export declare function setPermissioningSpreadsheetAutoApproveDefault(permissioning: RuntimePermissioningSettings | undefined, autoApproveDefault: boolean): RuntimePermissioningSettings;
export declare function setPermissioningDangerouslySkipRuntimePermissions(permissioning: RuntimePermissioningSettings | undefined, dangerouslySkipPermissions: boolean): RuntimePermissioningSettings;
//# sourceMappingURL=settings.d.ts.map