/**
 * Domain-skill discovery for `agents browser start`.
 *
 * When a browser task opens a URL, look up a site-specific SKILL.md from
 * `skills/browser/domain-skills/<dir>/SKILL.md` in the layered DotAgents
 * repos — project > user > system, first layer with a match wins, the same
 * precedence `resolveResource` in `../resources.ts` applies — and surface its
 * contents so the calling agent gets per-site operating instructions
 * (selectors, gotchas, sign-in quirks) before it starts driving the page.
 *
 * Matching is intentionally simple: derive the hostname's second-level
 * label (e.g. `perplexity` from `perplexity.ai`, `slack` from `app.slack.com`)
 * and look for a directory of the same name. If the user wants a different
 * mapping (e.g. `mail.google.com` -> `gmail/`), they can pin it via a
 * `domains: [...]` array in the SKILL.md frontmatter; that override beats
 * the directory-name match.
 */
/** Result of resolving a URL to a domain-skill. */
export interface ResolvedDomainSkill {
    /** Skill identifier — the directory name under domain-skills/. */
    name: string;
    /** Absolute path to the SKILL.md that was matched. */
    path: string;
    /** Full SKILL.md contents (frontmatter included). */
    content: string;
    /** Hostname the match was made against (post-www strip). */
    hostname: string;
}
/**
 * Where domain-skills live, in precedence order: project > user > system >
 * extra repos — the same layering `resolveResource` applies. A layer whose
 * root does not exist is simply skipped at resolve time.
 *
 * The project layer resolves from `cwd` (default `process.cwd()`). The
 * browser daemon is shared and long-lived, and its IPC request does not yet
 * carry the calling CLI's cwd, so at that call site the project layer follows
 * the daemon's own cwd until the caller's cwd is threaded through
 * (RUSH-2996); user/system/extra-repo layers are cwd-independent.
 *
 * $AGENTS_BROWSER_DOMAIN_SKILLS_DIR overrides the whole list with a single
 * root, for tests.
 */
export declare function domainSkillsRoots(cwd?: string): string[];
/**
 * Derive match candidates from a hostname. Order matters — earlier candidates
 * are tried first.
 *
 * Examples:
 *   perplexity.ai      -> ['perplexity.ai', 'perplexity']
 *   app.slack.com      -> ['app.slack.com', 'slack.com', 'slack']
 *   mail.google.com    -> ['mail.google.com', 'google.com', 'google', 'mail']
 *   higgsfield.ai      -> ['higgsfield.ai', 'higgsfield']
 */
export declare function hostnameMatchCandidates(hostname: string): string[];
/**
 * Resolve a URL to its matching domain-skill, or null if none.
 *
 * Roots are searched in `domainSkillsRoots` order (project > user > system);
 * the first layer with a match wins outright — an earlier layer's
 * directory-name match beats a later layer's `domains:` pin, mirroring
 * `resolveResource`'s layer precedence. Within one layer, two passes:
 *   1. Index every SKILL.md in the root and read its `domains:` frontmatter.
 *      If any pinned domain matches a candidate, return that skill.
 *   2. Fall back to directory-name match against the candidate list.
 *
 * Errors (missing root, unreadable file, invalid URL) are swallowed and
 * yield null — domain-skill discovery must never break browser start. A miss
 * logs the roots searched at debug level (AGENTS_DEBUG/DEBUG) so a skill
 * sitting in an unsearched layer is diagnosable rather than silent.
 */
export declare function resolveDomainSkill(url: string, cwd?: string): ResolvedDomainSkill | null;
