// Permission key: module, module:scope, or module:scope:command
const PERMISSION_KEY_PATTERN = /^[a-z][a-zA-Z0-9-]*(:[a-zA-Z][a-zA-Z0-9]*){0,2}$/;

export function validatePermissionKey(key: string): boolean {
  return PERMISSION_KEY_PATTERN.test(key);
}
