import { z } from "zod"; import { type ToolResult } from "../structured.js"; import type { ReleaseSpec, SitePublicPathsSpec, SiteEmbeddingSpec } from "../../sdk/dist/index.js"; /** * MCP `deploy` tool — exposes the unified `p.apply` primitive. * * The Zod schema mirrors `ReleaseSpec` and accepts byte sources in either * shape: a bare UTF-8 string (the natural shape, e.g. `"

hi

"`) or * the `{ data, encoding?, content_type? }` object — the latter is required * for binary payloads via base64 or for an explicit `content_type` override * (wire fields are snake_case; `contentType` is only the in-function JS option). * The SDK's `resolveContent` already accepts both polymorphically; this * schema mirrors that. Agents that want to ship a real app via patch * semantics, multi-resource atomicity, or the resumable operation model * use this tool. */ declare const fileEntry: z.ZodUnion<[z.ZodString, z.ZodObject<{ data: z.ZodString; encoding: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>; declare const fileMap: z.ZodRecord>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>; declare const migrationEntry: z.ZodEffects; name: z.ZodOptional; sql: z.ZodOptional; sql_ref: z.ZodOptional; }, "strip", z.ZodTypeAny, { sha256: string; size: number; content_type?: string | undefined; }, { sha256: string; size: number; content_type?: string | undefined; }>>; checksum: z.ZodOptional; transaction: z.ZodOptional>; }, "strict", z.ZodTypeAny, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }>, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }>; declare const functionSpec: z.ZodObject<{ runtime: z.ZodOptional>; source: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>; files: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>>; entrypoint: z.ZodOptional; config: z.ZodOptional; memoryMb: z.ZodOptional; }, "strip", z.ZodTypeAny, { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; }, { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; }>>; schedule: z.ZodOptional>; }, "strict", z.ZodTypeAny, { source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; runtime?: "node22" | undefined; files?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }, { source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; runtime?: "node22" | undefined; files?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }>; export declare const deploySchema: { project_id: z.ZodString; base: z.ZodOptional; }, "strict", z.ZodTypeAny, { release: "current" | "empty"; }, { release: "current" | "empty"; }>, z.ZodObject<{ release_id: z.ZodString; }, "strict", z.ZodTypeAny, { release_id: string; }, { release_id: string; }>]>>; database: z.ZodOptional; name: z.ZodOptional; sql: z.ZodOptional; sql_ref: z.ZodOptional; }, "strip", z.ZodTypeAny, { sha256: string; size: number; content_type?: string | undefined; }, { sha256: string; size: number; content_type?: string | undefined; }>>; checksum: z.ZodOptional; transaction: z.ZodOptional>; }, "strict", z.ZodTypeAny, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }>, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }, { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }>, "many">>; expose: z.ZodOptional>; zero_downtime: z.ZodOptional; }, "strict", z.ZodTypeAny, { migrations?: { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }[] | undefined; expose?: Record | undefined; zero_downtime?: boolean | undefined; }, { migrations?: { name?: string | undefined; id?: string | undefined; sql?: string | undefined; sql_ref?: { sha256: string; size: number; content_type?: string | undefined; } | undefined; checksum?: string | undefined; transaction?: "none" | "required" | undefined; }[] | undefined; expose?: Record | undefined; zero_downtime?: boolean | undefined; }>>; secrets: z.ZodOptional>; delete: z.ZodOptional>; }, "strict", z.ZodTypeAny, { require?: string[] | undefined; delete?: string[] | undefined; }, { require?: string[] | undefined; delete?: string[] | undefined; }>>; functions: z.ZodOptional>; source: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>; files: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>>; entrypoint: z.ZodOptional; config: z.ZodOptional; memoryMb: z.ZodOptional; }, "strip", z.ZodTypeAny, { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; }, { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; }>>; schedule: z.ZodOptional>; }, "strict", z.ZodTypeAny, { source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; runtime?: "node22" | undefined; files?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }, { source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; runtime?: "node22" | undefined; files?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }>>>; patch: z.ZodOptional>; source: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>; files: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>>; entrypoint: z.ZodOptional; config: z.ZodOptional; memoryMb: z.ZodOptional; }, "strip", z.ZodTypeAny, { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; }, { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; }>>; schedule: z.ZodOptional>; }, "strict", z.ZodTypeAny, { source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; runtime?: "node22" | undefined; files?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }, { source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; runtime?: "node22" | undefined; files?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }>>>; delete: z.ZodOptional>; }, "strict", z.ZodTypeAny, { set?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }> | undefined; delete?: string[] | undefined; }, { set?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }> | undefined; delete?: string[] | undefined; }>>; }, "strict", z.ZodTypeAny, { replace?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }> | undefined; patch?: { set?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }> | undefined; delete?: string[] | undefined; } | undefined; }, { replace?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }> | undefined; patch?: { set?: Record | undefined; entrypoint?: string | undefined; config?: { timeoutSeconds?: number | undefined; memoryMb?: number | undefined; } | undefined; schedule?: string | null | undefined; }> | undefined; delete?: string[] | undefined; } | undefined; }>>; site: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>; public_paths: z.ZodOptional; }, "strict", z.ZodTypeAny, { mode: "implicit"; }, { mode: "implicit"; }>, z.ZodObject<{ mode: z.ZodLiteral<"explicit">; replace: z.ZodRecord; }, "strict", z.ZodTypeAny, { asset: string; cache_class?: string | undefined; }, { asset: string; cache_class?: string | undefined; }>>; }, "strict", z.ZodTypeAny, { mode: "explicit"; replace: Record; }, { mode: "explicit"; replace: Record; }>]>>; embedding: z.ZodOptional; }, "strict", z.ZodTypeAny, { frame_ancestors: string[]; }, { frame_ancestors: string[]; }>>>; }, "strict", z.ZodTypeAny, { replace: Record; public_paths?: { mode: "implicit"; } | { mode: "explicit"; replace: Record; } | undefined; embedding?: { frame_ancestors: string[]; } | null | undefined; }, { replace: Record; public_paths?: { mode: "implicit"; } | { mode: "explicit"; replace: Record; } | undefined; embedding?: { frame_ancestors: string[]; } | null | undefined; }>, z.ZodObject<{ patch: z.ZodObject<{ put: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>>; delete: z.ZodOptional>; }, "strict", z.ZodTypeAny, { delete?: string[] | undefined; put?: Record | undefined; }, { delete?: string[] | undefined; put?: Record | undefined; }>; public_paths: z.ZodOptional; }, "strict", z.ZodTypeAny, { mode: "implicit"; }, { mode: "implicit"; }>, z.ZodObject<{ mode: z.ZodLiteral<"explicit">; replace: z.ZodRecord; }, "strict", z.ZodTypeAny, { asset: string; cache_class?: string | undefined; }, { asset: string; cache_class?: string | undefined; }>>; }, "strict", z.ZodTypeAny, { mode: "explicit"; replace: Record; }, { mode: "explicit"; replace: Record; }>]>>; embedding: z.ZodOptional; }, "strict", z.ZodTypeAny, { frame_ancestors: string[]; }, { frame_ancestors: string[]; }>>>; }, "strict", z.ZodTypeAny, { patch: { delete?: string[] | undefined; put?: Record | undefined; }; public_paths?: { mode: "implicit"; } | { mode: "explicit"; replace: Record; } | undefined; embedding?: { frame_ancestors: string[]; } | null | undefined; }, { patch: { delete?: string[] | undefined; put?: Record | undefined; }; public_paths?: { mode: "implicit"; } | { mode: "explicit"; replace: Record; } | undefined; embedding?: { frame_ancestors: string[]; } | null | undefined; }>, z.ZodObject<{ public_paths: z.ZodUnion<[z.ZodObject<{ mode: z.ZodLiteral<"implicit">; }, "strict", z.ZodTypeAny, { mode: "implicit"; }, { mode: "implicit"; }>, z.ZodObject<{ mode: z.ZodLiteral<"explicit">; replace: z.ZodRecord; }, "strict", z.ZodTypeAny, { asset: string; cache_class?: string | undefined; }, { asset: string; cache_class?: string | undefined; }>>; }, "strict", z.ZodTypeAny, { mode: "explicit"; replace: Record; }, { mode: "explicit"; replace: Record; }>]>; embedding: z.ZodOptional; }, "strict", z.ZodTypeAny, { frame_ancestors: string[]; }, { frame_ancestors: string[]; }>>>; }, "strict", z.ZodTypeAny, { public_paths: { mode: "implicit"; } | { mode: "explicit"; replace: Record; }; embedding?: { frame_ancestors: string[]; } | null | undefined; }, { public_paths: { mode: "implicit"; } | { mode: "explicit"; replace: Record; }; embedding?: { frame_ancestors: string[]; } | null | undefined; }>, z.ZodObject<{ embedding: z.ZodNullable; }, "strict", z.ZodTypeAny, { frame_ancestors: string[]; }, { frame_ancestors: string[]; }>>; }, "strict", z.ZodTypeAny, { embedding: { frame_ancestors: string[]; } | null; }, { embedding: { frame_ancestors: string[]; } | null; }>]>>; assets: z.ZodOptional>; content_type: z.ZodOptional; }, "strict", z.ZodTypeAny, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }, { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; }>]>>; sha256: z.ZodOptional; size_bytes: z.ZodOptional; content_type: z.ZodOptional; visibility: z.ZodOptional>; immutable: z.ZodOptional; }, "strict", z.ZodTypeAny, { key: string; source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; content_type?: string | undefined; sha256?: string | undefined; size_bytes?: number | undefined; visibility?: "public" | "private" | undefined; immutable?: boolean | undefined; }, { key: string; source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; content_type?: string | undefined; sha256?: string | undefined; size_bytes?: number | undefined; visibility?: "public" | "private" | undefined; immutable?: boolean | undefined; }>, "many">>; delete: z.ZodOptional>; sync: z.ZodOptional; confirm: z.ZodOptional>; }, "strict", z.ZodTypeAny, { prefix: string; prune: true; confirm?: { base_revision: string; delete_set_digest: string; expected_delete_count: number; } | undefined; }, { prefix: string; prune: true; confirm?: { base_revision: string; delete_set_digest: string; expected_delete_count: number; } | undefined; }>>; }, "strict", z.ZodTypeAny, { delete?: string[] | undefined; put?: { key: string; source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; content_type?: string | undefined; sha256?: string | undefined; size_bytes?: number | undefined; visibility?: "public" | "private" | undefined; immutable?: boolean | undefined; }[] | undefined; sync?: { prefix: string; prune: true; confirm?: { base_revision: string; delete_set_digest: string; expected_delete_count: number; } | undefined; } | undefined; }, { delete?: string[] | undefined; put?: { key: string; source?: string | { data: string; encoding?: "utf-8" | "base64" | undefined; content_type?: string | undefined; } | undefined; content_type?: string | undefined; sha256?: string | undefined; size_bytes?: number | undefined; visibility?: "public" | "private" | undefined; immutable?: boolean | undefined; }[] | undefined; sync?: { prefix: string; prune: true; confirm?: { base_revision: string; delete_set_digest: string; expected_delete_count: number; } | undefined; } | undefined; }>>; subdomains: z.ZodOptional>; add: z.ZodOptional>; remove: z.ZodOptional>; }, "strict", z.ZodTypeAny, { set?: string[] | undefined; add?: string[] | undefined; remove?: string[] | undefined; }, { set?: string[] | undefined; add?: string[] | undefined; remove?: string[] | undefined; }>>; routes: z.ZodOptional, "many">>; target: z.ZodUnion<[z.ZodObject<{ type: z.ZodLiteral<"function">; name: z.ZodString; }, "strict", z.ZodTypeAny, { type: "function"; name: string; }, { type: "function"; name: string; }>, z.ZodObject<{ type: z.ZodLiteral<"static">; file: z.ZodString; }, "strict", z.ZodTypeAny, { type: "static"; file: string; }, { type: "static"; file: string; }>]>; acknowledge_readonly: z.ZodOptional>; }, "strict", z.ZodTypeAny, { pattern: string; target: { type: "function"; name: string; } | { type: "static"; file: string; }; methods?: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[] | undefined; acknowledge_readonly?: true | undefined; }, { pattern: string; target: { type: "function"; name: string; } | { type: "static"; file: string; }; methods?: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[] | undefined; acknowledge_readonly?: true | undefined; }>, "many">; }, "strict", z.ZodTypeAny, { replace: { pattern: string; target: { type: "function"; name: string; } | { type: "static"; file: string; }; methods?: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[] | undefined; acknowledge_readonly?: true | undefined; }[]; }, { replace: { pattern: string; target: { type: "function"; name: string; } | { type: "static"; file: string; }; methods?: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[] | undefined; acknowledge_readonly?: true | undefined; }[]; }>]>>; i18n: z.ZodOptional; detect: z.ZodOptional>; }, "strict", z.ZodTypeAny, { defaultLocale: string; locales: string[]; detect?: string[] | undefined; }, { defaultLocale: string; locales: string[]; detect?: string[] | undefined; }>]>>; idempotency_key: z.ZodOptional; allow_warnings: z.ZodOptional; allow_warning_codes: z.ZodOptional>; }; type FileMapInput = z.infer; type FunctionSpecInput = z.infer; type DeployArgs = { project_id: string; base?: ReleaseSpec["base"]; database?: { migrations?: Array>; expose?: Record; zero_downtime?: boolean; }; secrets?: ReleaseSpec["secrets"]; functions?: { replace?: Record; patch?: { set?: Record; delete?: string[]; }; }; site?: { replace: FileMapInput; public_paths?: SitePublicPathsSpec; embedding?: SiteEmbeddingSpec | null; } | { patch: { put?: FileMapInput; delete?: string[]; }; public_paths?: SitePublicPathsSpec; embedding?: SiteEmbeddingSpec | null; } | { public_paths: SitePublicPathsSpec; embedding?: SiteEmbeddingSpec | null; } | { embedding: SiteEmbeddingSpec | null; }; assets?: { put?: Array<{ key: string; source?: z.infer; sha256?: string; size_bytes?: number; content_type?: string; visibility?: "public" | "private"; immutable?: boolean; }>; delete?: string[]; sync?: { prefix: string; prune: true; confirm?: { base_revision: string; delete_set_digest: string; expected_delete_count: number; }; }; }; subdomains?: ReleaseSpec["subdomains"]; routes?: ReleaseSpec["routes"]; i18n?: null | { defaultLocale: string; locales: string[]; detect?: string[]; }; idempotency_key?: string; allow_warnings?: boolean; allow_warning_codes?: string[]; }; export declare function handleDeploy(args: DeployArgs): Promise; export {}; //# sourceMappingURL=deploy.d.ts.map