import type { RuleResult } from "../../types.js"; /** * Default AI crawler user-agents to check. Ordered by prevalence. */ export declare const DEFAULT_AI_CRAWLERS: readonly ["GPTBot", "ChatGPT-User", "ClaudeBot", "PerplexityBot", "Bytespider", "Google-Extended", "CCBot", "Applebot-Extended"]; /** * Parse robots.txt into a map of user-agent -> list of Disallow patterns. * User-agent keys are lowercased for case-insensitive lookup. * A blank Disallow value is treated as "allow all" and produces an empty array * (matches the robots spec: "Disallow: " with no value means no restrictions). */ export declare function parseRobotsByUserAgent(robotsTxt: string): Map; /** * Parse robots.txt into a map of user-agent -> list of Allow patterns. * Mirrors parseRobotsByUserAgent but captures Allow directives. */ export declare function parseRobotsAllowByUserAgent(robotsTxt: string): Map; /** True if the Disallow list includes a root block (`/`). */ export declare function isFullyDisallowed(patterns: string[] | undefined): boolean; /** * RFC 9309 block status for an agent given its disallow and allow patterns. * Returns: * "none" — not blocked (no root disallow, or root disallow overridden by Allow: /) * "partial" — root disallow with some Allow paths that reopen part of the site (but not all) * "full" — root disallow with no overriding Allow */ export declare function blockStatus(disallowPatterns: string[] | undefined, allowPatterns: string[] | undefined): "none" | "partial" | "full"; export interface CrawlerAccessOptions { /** List of AI crawler user-agents to check. */ crawlers?: readonly string[]; } /** * Warn per blocked AI crawler; escalate to error when all configured crawlers are blocked. * Wildcard blocks (`User-agent: *` + `Disallow: /`) also count as blocking each named crawler * unless the crawler has its own more-permissive block. * Per RFC 9309, Allow directives override Disallow when more specific (or equal length). */ export declare function crawlerAccessRule(robotsTxtContent: string, options?: CrawlerAccessOptions): RuleResult[]; //# sourceMappingURL=crawler-access.d.ts.map