/**
 * Forge-style operational commands for a provisioned compute fleet, run over
 * the active driver (SSH/SSM): roll a site back to a previous release, read a
 * site's deployment history, and run a reusable server recipe across servers.
 *
 * Each finds the project's targets via the driver, builds a small shell script
 * with the shared generators, and runs it on every box — mirroring how
 * {@link import('./compute-deploy').deploySiteRelease} drives a deploy.
 */
import type { CloudDriver, DatabaseConfig, EnvironmentType, RemoteDeployInstanceResult } from '@ts-cloud/core';
export interface ComputeOpsLogger {
    info(message: string): void;
    warn(message: string): void;
    error(message: string): void;
    step(message: string): void;
    success(message: string): void;
}
export interface ComputeOpsContext {
    driver: CloudDriver;
    slug: string;
    environment: EnvironmentType;
    /** Target role label. @default 'app' */
    role?: string;
    logger?: ComputeOpsLogger;
}
export interface ComputeOpsResult {
    success: boolean;
    error?: string;
    perInstance?: RemoteDeployInstanceResult[];
}
/**
 * Roll a site back to a previous release (Forge-style). With `to`, points
 * `current` at `releases/<to>`; otherwise the most recent prior release. After
 * flipping the symlink, php-fpm is restarted and queue workers are signalled so
 * they pick up the rolled-back code.
 */
export declare function rollbackComputeSite(ctx: ComputeOpsContext, options: {
    siteName: string;
    to?: string;
}): Promise<ComputeOpsResult>;
/**
 * Read a site's on-box deployment history (the log written by
 * {@link import('./releases').buildDeployHistoryHeader}). Returns the per-server
 * output so the caller can print the most recent deploys.
 */
export declare function getComputeDeployHistory(ctx: ComputeOpsContext, options: {
    siteName: string;
    limit?: number;
}): Promise<ComputeOpsResult>;
/**
 * Run a reusable server recipe (a bash script) across the project's servers as
 * a chosen user (Forge's Recipes). The recipe runs through a login shell so
 * pantry's env is loaded; output is captured per server.
 */
export declare function runComputeRecipe(ctx: ComputeOpsContext, options: {
    name: string;
    script: string[];
    user?: string;
}): Promise<ComputeOpsResult>;
/**
 * Restore a database from a ts-backups dump on the box (Forge's backup restore).
 * Runs the restore on the project's servers; with no `from`, the newest matching
 * dump is used. Returns per-server output.
 */
export declare function restoreDatabaseBackup(ctx: ComputeOpsContext, options: {
    database: DatabaseConfig | undefined;
    from?: string;
}): Promise<ComputeOpsResult>;
