//#region src/permissions.d.ts
/**
 * OAuth-style scope system for Sentry MCP Server
 *
 * Defines scopes for access control with hierarchical permissions.
 * Higher scopes include lower ones (e.g., write includes read).
 */
/**
 * Available scopes in the MCP server
 * These align with Sentry's API scopes where possible
 */
type Scope = "org:read" | "org:write" | "org:admin" | "project:read" | "project:write" | "project:admin" | "team:read" | "team:write" | "team:admin" | "member:read" | "member:write" | "member:admin" | "event:read" | "event:write" | "event:admin" | "project:releases" | "seer";
/**
 * All available scopes as a readonly list
 */
declare function getAvailableScopes(): ReadonlyArray<Scope>;
/**
 * All scopes available in the server, generated from the permission hierarchy.
 * Exported here to keep scope consumers lightweight and avoid importing other
 * unrelated constants.
 */
declare const ALL_SCOPES: ReadonlyArray<Scope>;
declare const ALL_SCOPES_SET: Set<Scope>;
/**
 * Expand a set of granted scopes to include all implied scopes
 */
declare function expandScopes(grantedScopes: Set<Scope>): Set<Scope>;
/**
 * Human-readable descriptions of scopes
 */
declare const SCOPE_DESCRIPTIONS: Record<Scope, string>;
/**
 * Check if a set of scopes satisfies the required scopes
 */
declare function hasRequiredScopes(grantedScopes: Set<Scope>, requiredScopes: Scope[]): boolean;
/**
 * Check if a tool is allowed based on granted scopes
 */
declare function isToolAllowed(requiredScopes: Scope[] | undefined, grantedScopes: Set<Scope>): boolean;
/**
 * Parse scopes from a comma-separated string
 */
/**
 * Parse scopes from a comma-separated string.
 * - Filters out invalid entries
 * - Logs a console.warn listing any invalid values
 */
/**
 * Parse scopes from an array of strings.
 * - Filters out invalid entries
 * - Logs a console.warn listing any invalid values
 */
/**
 * Generic scope parser: accepts a comma-separated string or an array.
 * Returns both valid and invalid tokens. No logging.
 */
declare function parseScopes(input: unknown): {
  valid: Set<Scope>;
  invalid: string[];
};
/**
 * Strict validation helper for scope strings supplied via flags/env.
 * Returns both valid and invalid entries without side effects.
 */
/**
 * Resolve final scopes from optional override/additive sets and provided defaults.
 * - If override is provided, it replaces defaults and is expanded
 * - Else if add is provided, it unions with defaults and is expanded
 * - Else returns undefined to indicate default handling upstream
 */
declare function resolveScopes(options: {
  override?: Set<Scope>;
  add?: Set<Scope>;
  defaults: ReadonlyArray<Scope>;
}): Set<Scope> | undefined;
//# sourceMappingURL=permissions.d.ts.map
//#endregion
export { ALL_SCOPES, ALL_SCOPES_SET, SCOPE_DESCRIPTIONS, Scope, expandScopes, getAvailableScopes, hasRequiredScopes, isToolAllowed, parseScopes, resolveScopes };
//# sourceMappingURL=permissions-BBgPgD70.d.ts.map