import type { CloudConfig, CloudDriver, DeploySiteReleaseOptions, DeploySiteReleaseResult, EnvironmentType } from '@ts-cloud/core';
export interface ComputeDeployLogger {
    info(message: string): void;
    warn(message: string): void;
    error(message: string): void;
    step(message: string): void;
    success(message: string): void;
}
/**
 * Deploy a single site release tarball to compute targets via the active driver.
 */
export declare function deploySiteRelease(driver: CloudDriver, options: DeploySiteReleaseOptions, logger?: ComputeDeployLogger): Promise<DeploySiteReleaseResult>;
export interface DeployAllSitesOptions {
    config: CloudConfig;
    environment: EnvironmentType;
    driver: CloudDriver;
    sha: string;
    runtime: 'bun' | 'node' | 'deno' | 'php';
    tarballForSite: (siteName: string) => string;
    logger?: ComputeDeployLogger;
    /** Project root used to resolve/build the management dashboard UI. Defaults to `process.cwd()`. */
    cwd?: string;
    /**
     * The FULL site model for regenerating the rpx gateway, distinct from `config`
     * which may be narrowed to a single site for a partial deploy. The rpx gateway
     * MUST always be reloaded with every route, so a single-site deploy can never
     * drop the other sites' routes. Defaults to `config` when omitted.
     */
    rpxConfig?: CloudConfig;
}
/**
 * Deploy every site that targets the compute server — both dynamic apps
 * (`server` + `start`, run as systemd services) and static sites (`server`
 * without `start`, shipped to `/var/www/<site>`). Bucket sites are skipped.
 */
export declare function deployAllComputeSites(options: DeployAllSitesOptions): Promise<boolean>;
/**
 * Regenerate the rpx gateway config from the sites model and (re)start the
 * gateway. No-op (returns `true`) unless `compute.proxy.engine === 'rpx'`.
 *
 * Two shapes, resolved by probing for a dedicated load-balancer target:
 *  - **Fleet** (bun-style: one rpx LB box fronts N gateway-less app boxes) —
 *    rewrite ONLY the LB's route fragment with the multi-upstream LB config
 *    ({@link buildRpxLbConfig} + {@link buildRpxFragmentRefreshScript}).
 *  - **Single box** — the gateway is co-located with the app, so the full
 *    provision script runs on the app targets. Re-runnable: it rewrites the
 *    launcher + unit and `systemctl restart`s, reloading the new routes.
 */
export declare function reloadRpxGateway(options: DeployAllSitesOptions): Promise<boolean>;
/**
 * Request the first production certificates after DNS has been reconciled.
 * Provisioning installs the per-project renewal unit, but ACME HTTP-01 cannot
 * succeed until the domain points at the new box. This deliberately runs after
 * DNS and targets the same gateway box selected by reloadRpxGateway.
 */
export declare function renewRpxCertificates(options: Pick<DeployAllSitesOptions, 'config' | 'environment' | 'driver' | 'logger' | 'rpxConfig'>): Promise<boolean>;
