export declare const CAPABILITIES: readonly ["inspect", "edit", "export", "filesystem", "unsafe-script"]; export type Capability = (typeof CAPABILITIES)[number]; export interface CapabilityConfig { capabilities: ReadonlySet; source: "default" | "environment" | "explicit"; } /** * Resolve the server's authority. Unsafe scripting is deliberately never part * of the default: an operator must name it explicitly. */ export declare function resolveCapabilities(value?: string | undefined): CapabilityConfig; export declare class CapabilityDeniedError extends Error { readonly capability: Capability; readonly operationId: string; readonly code = "CAPABILITY_DENIED"; constructor(capability: Capability, operationId: string); } export declare function requireCapability(config: CapabilityConfig, capability: Capability, operationId: string): void; export declare const UNSAFE_TOOL_NAMES: Set; /** A conservative classification for centralized server registration. */ export declare function capabilityForTool(toolName: string): Capability; /** Resolve authority at the action level for consolidated multi-action tools. */ export declare function capabilitiesForToolInvocation(toolName: string, args: unknown): readonly Capability[]; /** * Tools that stay advertised under every profile, because they are how an * operator diagnoses a profile that is too narrow: get_capabilities reports the * active authority, and ping proves the bridge is alive. Withholding them makes * a misconfigured server look broken with no supported way to ask why. */ export declare const ALWAYS_LISTED_TOOL_NAMES: Set; /** * Whether a tool should appear in tools/list under the given profile. * * This is an advertising decision, not an enforcement one — guardToolHandler * remains the authority check at call time. Keeping the two separate means a * listing bug can never widen what a profile is actually allowed to do. */ export declare function isToolPermitted(toolName: string, config: CapabilityConfig): boolean; export declare function guardToolHandler(toolName: string, handler: (args: TArgs) => Promise, config?: CapabilityConfig, createOperationId?: () => string): (args: TArgs) => Promise; //# sourceMappingURL=capabilities.d.ts.map