import { type AuthMetadata } from './auth.js'; export declare const READ_ONLY_ERROR_MESSAGE = "This CLI is authenticated in read-only mode. Re-run `tdc auth login` without --read-only to enable write operations."; export declare function isMutatingMethod(methodPath: string): boolean; /** The scope `methodPath` needs beyond the default write grant, if any. */ export declare function getRequiredScope(methodPath: string): string | undefined; export declare function ensureWriteAllowed(preloaded?: AuthMetadata): Promise; /** * Fail fast when the stored grant is missing a scope the method needs. * * Fails *open* whenever the granted scope is unknown — `COMMS_API_TOKEN` and * manually-saved tokens carry no scope metadata, and may be session tokens, * which bypass Comms' scope enforcement entirely. Blocking those would break * working setups to guess at an error the server is better placed to raise. */ export declare function ensureScopeAllowed(methodPath: string, preloaded?: AuthMetadata): Promise; /** * Single guard for a mutating call: one `getAuthMetadata()` read shared by both * checks, since it hits the config file on every invocation and is uncached. */ export declare function ensureMutationAllowed(methodPath: string): Promise; //# sourceMappingURL=permissions.d.ts.map