/**
 * Deploy gate layer — would the agent's build actually publish?
 *
 * The product Blueprint Agent fronts promises "go from idea to live URL."
 * Pre-Gen-48 the eval stopped at install/typecheck/build/serve — every
 * one of which can pass while `vite build` (or `next build`, etc) fails
 * on a production-only constraint (env-var requirement, dynamic import
 * not statically resolvable, missing public asset).
 *
 * Deploy gate runs the production build via the supplied {@link DeployRunner}
 * and asserts:
 *   - command exited 0
 *   - artifact dir contains an entry point (index.html for static SPAs,
 *     equivalent per framework family)
 *
 * Ships with a canonical `vite` runner. Additional runners
 * (wrangler-deploy --dry-run, next-build, etc.) plug in as factories.
 */
import type { Layer } from './multi-layer-verifier';
export type DeployFamily = 'frontend-static' | 'nextjs' | 'remix' | 'fullstack-ts';
export interface DeployRunResult {
    ok: boolean;
    /** Stdout/stderr tail surfaced as evidence. Bounded in caller. */
    output?: string;
    /** Wall-clock duration of the build command. */
    durationMs?: number;
    /** Path to artifact directory the runner expects (dist/, .next/, build/, etc). */
    artifactDir?: string;
    /** True iff artifactDir contains the family's expected entry point. */
    artifactValid?: boolean;
}
export interface DeployRunner {
    /** Run the production build. The runner owns command + cwd. */
    run(): Promise<DeployRunResult>;
}
export interface DeployGateLayerInput {
    /** Build the runner per call. */
    runner: () => DeployRunner | Promise<DeployRunner>;
    /** Family hint — for logging, surfaced in diagnostics. */
    family?: DeployFamily;
    /** Layer name. Default `deploy`. */
    name?: string;
    /** Layer dependencies — default `['build']`. */
    dependsOn?: string[];
    /** Weight in blendedScore. Default 1. */
    weight?: number;
    /** Cap (ms). Default 120s — prod builds are slower than dev. */
    capMs?: number;
    /** When true, treat artifactValid=false as a fail (default true). */
    requireArtifact?: boolean;
}
/**
 * Build a deploy gate layer that runs the production build and verifies
 * the artifact. Pass: ok && artifactValid. Score: 1.0 (pass) or 0 (fail).
 *
 * For families where artifact-validation isn't applicable (e.g. a
 * server-rendered build that prints a manifest), set `requireArtifact:
 * false` and rely on the runner's own ok signal.
 */
export declare function deployGateLayer<Env = unknown>(input: DeployGateLayerInput): Layer<Env>;
export interface ViteDeployRunnerInput {
    /** Workdir to build. The runner cd's here. */
    workdir: string;
    /**
     * Function to run a shell command in `workdir`. Same shape as
     * agent-eval's CommandRunner.run for compositional reuse.
     */
    exec: (cmd: string, opts?: {
        cwd?: string;
        timeoutMs?: number;
    }) => Promise<{
        stdout: string;
        stderr: string;
        exitCode: number;
    }>;
    /**
     * Function to test whether a path exists in the workdir. Inject
     * `(p) => existsSync(join(workdir, p))` for host runs.
     */
    exists: (relativePath: string) => boolean | Promise<boolean>;
    /** Build command. Default `npm run build`. */
    buildCommand?: string;
    /** Artifact directory to validate. Default `dist`. */
    artifactDir?: string;
    /** Entry-point file under artifactDir. Default `index.html`. */
    artifactEntry?: string;
    /** Per-build cap (ms). Default 90s. */
    timeoutMs?: number;
}
/**
 * Canonical runner for `frontend-static` family — runs the build script,
 * validates `<artifactDir>/<artifactEntry>` exists. Use as the `runner:`
 * factory for {@link deployGateLayer}.
 */
export declare function viteDeployRunner(input: ViteDeployRunnerInput): DeployRunner;
export interface WranglerDeployRunnerInput {
    workdir: string;
    exec: (cmd: string, opts?: {
        cwd?: string;
        timeoutMs?: number;
    }) => Promise<{
        stdout: string;
        stderr: string;
        exitCode: number;
    }>;
    exists: (relativePath: string) => boolean | Promise<boolean>;
    /** Build command. Default `npm run build`. */
    buildCommand?: string;
    /** Wrangler dry-run command. Default `npx wrangler deploy --dry-run --outdir dist`. */
    dryRunCommand?: string;
    /** Per-step cap (ms). Default 120s. */
    timeoutMs?: number;
}
/**
 * Canonical runner for the `fullstack-ts` family on Cloudflare Workers
 * (Remix / React Router v7 / Hono on Workers). Detects wrangler.toml or
 * wrangler.jsonc in the workdir, builds, then `wrangler deploy --dry-run`
 * to catch missing bindings, syntax errors in wrangler config, and
 * import-time crashes that don't surface in `tsc`.
 *
 * No wrangler config = skip with "no wrangler" evidence (not a failure
 * — the gate caller decides whether to require deploy validation).
 */
export declare function wranglerDeployRunner(input: WranglerDeployRunnerInput): DeployRunner;
//# sourceMappingURL=deploy-gate-layer.d.ts.map