/** * Agent bridge capability taxonomy (#150). * * Defines the deny-by-default capability model for {@link createScopedHandle}. * Capabilities follow the `group.action` naming from the XPHandle surface; * wildcards expand per group but never cover dangerous capabilities. */ /** * Every granular capability the scoped handle recognizes. * Grouped by the XPHandle domain they gate. */ export type Capability = 'fs.read' | 'fs.write' | 'fs.create' | 'fs.delete' | 'fs.unlock' | 'windows.list' | 'windows.focus' | 'windows.minimize' | 'windows.maximize' | 'windows.restore' | 'apps.open' | 'files.open' | 'notify' | 'sound.play' | `emit:${string}` | 'snapshot.read' | 'session.login' | 'session.logout' | 'session.shutdown' | 'session.restart' | 'snapshot.load' | 'reset' | 'schedule'; /** Capabilities that are NEVER granted by a group wildcard (`*` or `group.*`). */ export declare const DANGEROUS_CAPS: ReadonlySet; /** Group prefixes that can be expanded with `group.*`. */ export declare const CAP_GROUPS: Record; /** * Expand a capability spec (which may contain `group.*` wildcards) into the * concrete set of granted capabilities. Dangerous caps are stripped unless * they appear as explicit entries (not via wildcard). */ export declare function expandCaps(specs: string[]): Set; /** How a denied call is handled. */ export type DeniedPolicy = 'event' | 'throw'; /** Configuration for {@link createScopedHandle}. */ export interface ScopedHandleConfig { /** Capability allowlist. Supports `group.*` wildcards. */ allow: string[]; /** What happens when a call is denied. Default `'event'`. */ onDenied?: DeniedPolicy; /** Maximum calls per sliding window. */ rateLimit?: { maxCalls: number; windowMs: number; }; }