import type { RuntimeCapabilityId } from './permission-capabilities.js';
/**
 * Shared permission-kernel types.
 *
 * These types live in core so every runtime surface can reference the same
 * contract without importing app-layer modules.
 */
export { RUNTIME_CAPABILITY, RUNTIME_CAPABILITY_IDS, type RuntimeCapabilityId } from './permission-capabilities.js';
export type PermissionMutationBehavior = 'allow' | 'require_approval' | 'deny';
export type PermissionReadScope = 'none' | 'workspace' | 'unrestricted';
export type PermissionWriteScope = 'none' | 'workspace' | 'unrestricted';
export type AgentApprovalSurface = 'headful' | 'headless';
export interface RuntimeFilesystemApprovalGrant {
    path: string;
    access: 'read' | 'write';
    scope: 'file' | 'folder';
}
/** Filesystem policy for direct runtime-owned file tools. */
export interface RuntimeFilesystemPermissionPolicy {
    workspaceRoots: string[];
    persistentApprovals: RuntimeFilesystemApprovalGrant[];
    defaultReadScope: PermissionReadScope;
    defaultWriteScope: PermissionWriteScope;
    requireApprovalOutsideWorkspace: boolean;
}
/** Shell execution policy for runtime-owned shell tools. */
export interface RuntimeShellPermissionPolicy {
    enabled: boolean;
    mutationBehavior: PermissionMutationBehavior;
}
/** Spreadsheet mutation policy for runtime-owned spreadsheet execution tools. */
export interface RuntimeSpreadsheetPermissionPolicy {
    enabled: boolean;
    mutationBehavior: PermissionMutationBehavior;
    /** Headless spreadsheet surfaces may auto-approve writes only when explicitly widened. */
    allowHeadlessApproval: boolean;
}
/** Subagent policy for runtime-owned agent spawning. */
export interface RuntimeSubagentPermissionPolicy {
    enabled: boolean;
    /** Child agents run within the parent's compiled permission boundary. */
    inheritParentPolicy: boolean;
}
/** Cross-capability approval behavior for runtime-owned approval surfaces. */
export interface AgentApprovalPermissionPolicy {
    /** True when the runtime, not an external system, owns approval semantics. */
    runtimeOwned: boolean;
    /** Headless surfaces may auto-approve unsafe actions only when explicitly widened. */
    allowHeadlessApproval: boolean;
}
/** Effective runtime permission contract consumed by tools and approval code. */
export interface RuntimePermissionPolicy {
    modeName?: string;
    dangerouslySkipRuntimePermissions: boolean;
    declaredToolNames: string[];
    declaredCapabilityIds: RuntimeCapabilityId[];
    filesystem: RuntimeFilesystemPermissionPolicy;
    shell: RuntimeShellPermissionPolicy;
    spreadsheet: RuntimeSpreadsheetPermissionPolicy;
    subagents: RuntimeSubagentPermissionPolicy;
    approvals: AgentApprovalPermissionPolicy;
}
//# sourceMappingURL=permission-policy.d.ts.map