/**
 * User-Agent the observability `clint-pull-worker` stamps on its `/_proxy/routes`
 * poll so the idle signal + wake activator can exclude it as automation. Defined
 * here (the dependency-free policy module) and re-exported by the worker, so the
 * slim housekeeping-service build doesn't drag in the observability subgraph.
 */
export declare const OBSERVABILITY_PULL_USER_AGENT = "vetra-observability-pull";
/**
 * Studio housekeeping policy — pure decision functions shared by the
 * housekeeping subgraph (sleep/wake mutations, power-state query) and the
 * standalone housekeeping service (idle detector + wake activator).
 *
 * Keeping these pure and dependency-free means both the in-reactor subgraph and
 * the out-of-process activator apply identical rules, and they're trivially
 * unit-testable. See docs/superpowers/specs/2026-06-30-studio-housekeeping-…
 */
/**
 * Request paths that are automation, never a real user interaction. Matched as
 * exact paths or path prefixes (a trailing `/` marks a prefix family).
 */
export declare const AUTOMATION_PATHS: readonly string[];
/**
 * User-Agent substrings (lowercased) that mark automation: our own pollers and
 * common uptime/health monitors. Deliberately conservative — generic clients
 * like curl/wget are NOT here, since a real user's CLI uses them.
 */
export declare const AUTOMATION_USER_AGENTS: readonly string[];
/**
 * True when a request is automation (a "ping"), not a proper user request.
 * Used by the idle detector (don't count it as activity) and the wake activator
 * (don't wake a sleeping studio for it).
 */
export declare function isAutomationRequest(path: string | null | undefined, userAgent: string | null | undefined): boolean;
export type StudioPowerStatus = "AWAKE" | "SLEEPING" | "WAKING" | "UNKNOWN";
/** Subset of the environments read-model row the policy functions need. */
export type EnvRow = {
    status?: string | null;
    owner?: string | null;
    poolState?: string | null;
    tenantId?: string | null;
    subdomain?: string | null;
    /** JSON string of the env's services (read-model `environments.services`). */
    services?: string | null;
};
/**
 * True if the env runs an enabled CLINT (studio) agent. Housekeeping only sleeps
 * CLINT studios, which are served at the apex host `<subdomain>.vetra.io` — the
 * host the idle detector checks. CONNECT/SWITCHBOARD apps serve at
 * `connect.*`/`switchboard.*` sub-hosts, so the apex is always empty for them and
 * the idle signal would (wrongly) read every such env as idle → slept. Scoping
 * to CLINT is what keeps the detector off non-studio envs.
 */
export declare function hasClintService(services: string | null | undefined): boolean;
/**
 * Map an environment's document status to a coarse power state. In the
 * activator's context a host is only caught while disabled, so `STOPPED`
 * (housekeeping sleep) reads as SLEEPING and a subsequent deploy reads as
 * WAKING; `READY` is AWAKE.
 */
export declare function deriveStudioPowerState(row: EnvRow | null | undefined): StudioPowerStatus;
/**
 * Deploy-failed status string in the environments read-model. Note the
 * lowercase `t` — a known typo baked into the read-model that must be matched
 * exactly. The document reducer already permits SLEEP_ENVIRONMENT from this
 * state (shipped in 0.0.21); this makes housekeeping reclaim stuck failed
 * deploys instead of leaving them running forever.
 */
export declare const DEPLOYMENT_FAILED_STATUS = "DEPLOYMENt_FAILED";
/**
 * Tenants that must never be slept by housekeeping — the hand-managed core
 * tenants (also excluded from the `powerhouse-tenants` ApplicationSet).
 */
export declare const DEFAULT_NEVER_SLEEP_TENANTS: readonly string[];
export type EligibilityOptions = {
    /** Extra tenantIds (or subdomains) to never sleep — e.g. VIP customers. */
    allowlist?: Iterable<string>;
    /** Override the core-tenant exclusions (defaults to DEFAULT_NEVER_SLEEP_TENANTS). */
    neverSleepTenants?: Iterable<string>;
};
/**
 * Whether an environment is eligible to be put to sleep:
 *  - it's a claimed studio (`owner` set; not a warm-pool WARMING/AVAILABLE/FAILED env),
 *  - it's currently live (`READY`) or stuck in `DEPLOYMENt_FAILED` (never
 *    re-sleep one already stopping/deploying),
 *  - it has a routable subdomain,
 *  - it's not a core tenant and not on the never-sleep allowlist.
 */
export declare function isEligibleForSleep(row: EnvRow | null | undefined, opts?: EligibilityOptions): boolean;
//# sourceMappingURL=policy.d.ts.map