/**
 * peerUrlGuard — shared https/allowlist check a pool fan-out must pass
 * BEFORE attaching this machine's Bearer token to a peer request
 * (GUARD-POSTURE-ENDPOINT-SPEC §3(c)).
 *
 * `lastKnownUrl` is self-advertised and git-synced, so the fan-out's trust
 * assumption is "the registry remote is operator-private." This helper makes
 * the hardening a shipping dependency for /guards (and adoptable by the
 * existing pool routes): the token is only ever sent to
 *   - https URLs whose host matches a known tunnel pattern (or an
 *     operator-extended allowlist), or
 *   - private-network/localhost hosts (http allowed for LAN peers).
 * A URL failing the check is refused VISIBLY (`url-rejected` failure row) —
 * never silently skipped, never sent the token.
 *
 * Redirect note: callers use plain fetch() WITHOUT `redirect: 'manual'` —
 * that is safe by the Fetch spec, which strips the Authorization header on
 * cross-origin redirects (a 301 from an allowlisted peer to a hostile host
 * arrives token-less). Do not "fix" this by following redirects manually
 * with the header preserved (the Slack FileHandler pattern is for a CDN
 * that REQUIRES it — the opposite trade).
 */
export interface PeerUrlVerdict {
    ok: boolean;
    /** Normalized refusal reason (never a raw error string). */
    reason?: 'invalid-url' | 'scheme-not-allowed' | 'host-not-allowlisted';
}
/**
 * May this peer URL receive our Bearer token?
 * `extraHostPatterns` comes from config (`multiMachine.peerUrlAllowlist`,
 * plain suffix strings) so an operator on a custom tunnel domain has a lever
 * instead of a dead end.
 */
export declare function isPeerUrlAllowedForCredentials(rawUrl: string, extraHostSuffixes?: readonly string[]): PeerUrlVerdict;
//# sourceMappingURL=peerUrlGuard.d.ts.map