/** * The `factory-environment-build` workflow: step one decides and starts a * build (`runEnvironmentBuild`), step two polls the provider until the build * settles and pins the active template on the project row. Registered by * `MastraFactory.prepare()` only when the sandbox has `builds`, and driven by * the Build now route, the per-project cron schedule and the GitHub push * hand-off. Saving settings never starts it. */ import { z } from 'zod'; import type { EnvironmentBuildDeps, EnvironmentBuildOutcome } from './build.js'; export declare const ENVIRONMENT_BUILD_WORKFLOW_ID = "factory-environment-build"; export declare const DEFAULT_BUILD_POLL_MS = 15000; export declare const MAX_BUILD_WAIT_MS: number; export declare const environmentBuildInputSchema: z.ZodObject<{ projectId: z.ZodString; trigger: z.ZodEnum<{ manual: "manual"; push: "push"; schedule: "schedule"; }>; }, z.core.$strip>; export declare const environmentBuildOutputSchema: z.ZodObject<{ outcome: z.ZodEnum<{ started: "started"; failed: "failed"; skipped: "skipped"; unavailable: "unavailable"; }>; buildId: z.ZodOptional; templateId: z.ZodOptional; reason: z.ZodOptional; status: z.ZodOptional>; }, z.core.$strip>; export type EnvironmentBuildWorkflowResult = z.infer; export interface EnvironmentBuildWorkflowOptions { sleep?: (ms: number) => Promise; pollMs?: number; maxWaitMs?: number; /** Called with the first step's answer so a caller can return it without waiting for the poll. */ onStart?: (runId: string, outcome: EnvironmentBuildOutcome) => void; } export declare function createEnvironmentBuildWorkflow(deps: EnvironmentBuildDeps, options?: EnvironmentBuildWorkflowOptions): import("@mastra/core/workflows").Workflow[], "factory-environment-build", unknown, { projectId: string; trigger: "manual" | "push" | "schedule"; }, { outcome: "started" | "failed" | "skipped" | "unavailable"; buildId?: string | undefined; templateId?: string | undefined; reason?: string | undefined; status?: "unknown" | "failed" | "ready" | undefined; }, { outcome: "started" | "failed" | "skipped" | "unavailable"; buildId?: string | undefined; templateId?: string | undefined; reason?: string | undefined; status?: "unknown" | "failed" | "ready" | undefined; }, unknown>; //# sourceMappingURL=build-workflow.d.ts.map