Input schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"allow_warning_codes": {
"description": "Continue past specific reviewed plan warning codes. Prefer this to allow_warnings when only one known warning class is intentional.",
"items": {
"type": "string"
},
"type": "array"
},
"allow_warnings": {
"description": "Continue past plan warnings that require confirmation. Default false: the tool stops before upload/commit so an agent can set missing secrets or inspect warnings.",
"type": "boolean"
},
"assets": {
"additionalProperties": false,
"description": "v1.48 unified-apply assets slice. Asset writes promote inside the same activation transaction as functions/site/secrets so a release flips atomically.",
"properties": {
"delete": {
"description": "Asset keys to remove in the activation transaction.",
"items": {
"type": "string"
},
"type": "array"
},
"put": {
"description": "Per-key asset puts. Pass either { source } for the SDK to hash/upload, or { sha256, size_bytes } when bytes are already in CAS.",
"items": {
"additionalProperties": false,
"properties": {
"content_type": {
"type": "string"
},
"immutable": {
"type": "boolean"
},
"key": {
"description": "Asset key (path under the project's asset namespace, no leading slash).",
"type": "string"
},
"sha256": {
"description": "Pre-uploaded CAS reference (wire form). Mutually exclusive with source.",
"type": "string"
},
"size_bytes": {
"description": "Required when using the wire form (sha256).",
"type": "integer"
},
"source": {
"$ref": "#/properties/functions/properties/replace/additionalProperties/properties/source",
"description": "Source bytes (SDK-input form). Mutually exclusive with sha256."
},
"visibility": {
"enum": [
"public",
"private"
],
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
"type": "array"
},
"sync": {
"additionalProperties": false,
"description": "Declarative sync. With prune: true and no confirm, the plan returns an asset_sync block with the values to echo back.",
"properties": {
"confirm": {
"additionalProperties": false,
"description": "Confirmation token echoed back from a prior plan; required to commit a destructive sync.",
"properties": {
"base_revision": {
"type": "string"
},
"delete_set_digest": {
"type": "string"
},
"expected_delete_count": {
"type": "integer"
}
},
"required": [
"base_revision",
"delete_set_digest",
"expected_delete_count"
],
"type": "object"
},
"prefix": {
"description": "Prefix under which sync operates. Required.",
"type": "string"
},
"prune": {
"const": true,
"description": "Must be true to declare destructive sync intent.",
"type": "boolean"
}
},
"required": [
"prefix",
"prune"
],
"type": "object"
}
},
"type": "object"
},
"base": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"release": {
"enum": [
"current",
"empty"
],
"type": "string"
}
},
"required": [
"release"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"release_id": {
"type": "string"
}
},
"required": [
"release_id"
],
"type": "object"
}
],
"description": "Diff base. Default `{ release: 'current' }`. Use `{ release: 'empty' }` for a fresh deploy that fails if a release already exists."
},
"database": {
"additionalProperties": false,
"properties": {
"expose": {
"additionalProperties": {},
"description": "Declarative authorization manifest (see https://run402.com/schemas/manifest.v1.json).",
"type": "object"
},
"migrations": {
"items": {
"additionalProperties": false,
"properties": {
"checksum": {
"description": "Lowercase hex SHA-256 of the migration SQL. Computed from `sql` if omitted.",
"type": "string"
},
"id": {
"description": "Stable versioned migration id (e.g. '001_init'). Same id+checksum across re-deploys is a registry noop; same id+different checksum is a hard error. Use name instead for generated/idempotent SQL.",
"type": "string"
},
"name": {
"description": "Content-tracked migration name for generated/idempotent SQL. The SDK compiles this to <name>_<sha256(sql)[0:16]>; changed content applies once under a new id and identical re-deploys noop. SQL declared with name MUST be idempotent.",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$",
"type": "string"
},
"sql": {
"description": "Inline SQL (UTF-8). Either sql or sql_ref is required.",
"type": "string"
},
"sql_ref": {
"additionalProperties": false,
"description": "Pre-uploaded CAS reference. Mutually exclusive with sql.",
"properties": {
"content_type": {
"type": "string"
},
"sha256": {
"type": "string"
},
"size": {
"type": "number"
}
},
"required": [
"sha256",
"size"
],
"type": "object"
},
"transaction": {
"enum": [
"required",
"none"
],
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"zero_downtime": {
"description": "Skip the migrate-gate phase. Only safe when migrations are declared backward-compatible.",
"type": "boolean"
}
},
"type": "object"
},
"functions": {
"additionalProperties": false,
"properties": {
"patch": {
"additionalProperties": false,
"properties": {
"delete": {
"items": {
"type": "string"
},
"type": "array"
},
"set": {
"$ref": "#/properties/functions/properties/replace"
}
},
"type": "object"
},
"replace": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"config": {
"additionalProperties": false,
"properties": {
"memoryMb": {
"type": "number"
},
"timeoutSeconds": {
"type": "number"
}
},
"type": "object"
},
"entrypoint": {
"type": "string"
},
"files": {
"additionalProperties": {
"$ref": "#/properties/functions/properties/replace/additionalProperties/properties/source"
},
"description": "Multi-file function. Provide `entrypoint` to designate the entry path.",
"type": "object"
},
"runtime": {
"const": "node22",
"type": "string"
},
"source": {
"anyOf": [
{
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"content_type": {
"description": "MIME type override (snake_case, like every wire field). Auto-detected from the path's extension when omitted.",
"type": "string"
},
"data": {
"type": "string"
},
"encoding": {
"enum": [
"utf-8",
"base64"
],
"type": "string"
}
},
"required": [
"data"
],
"type": "object"
}
],
"description": "Single-file function source. The SDK uploads it to CAS and references it in the release."
},
"triggers": {
"description": "Function triggers. A schedule is { type: \"schedule\", cron: \"0 9 * * *\" } (timezone optional, default UTC); the gateway derives its id and default run, and each tick creates a durable function run. An omitted triggers means none.",
"items": {
"additionalProperties": true,
"properties": {
"cron": {
"type": "string"
},
"id": {
"type": "string"
},
"timezone": {
"type": "string"
},
"type": {
"enum": [
"schedule",
"email",
"app_repo"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"type": "object"
}
},
"type": "object"
},
"i18n": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"defaultLocale": {
"description": "Default locale tag. MUST be byte-identical to one entry in locales[]. The platform does NOT silently canonicalize.",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
"type": "string"
},
"detect": {
"description": "Walked in order; first match wins. Defaults to ['accept-language'] when omitted, max 10 entries; [] is allowed and means 'always default'.",
"items": {
"description": "Detect source: 'accept-language' or 'cookie:<name>' (RFC 6265 cookie-name grammar).",
"pattern": "^(accept-language|cookie:[!#$%&'*+\\-.^_`|~0-9A-Za-z]+)$",
"type": "string"
},
"maxItems": 10,
"type": "array"
},
"locales": {
"description": "Supported locale tags. Non-empty, max 50 entries. Tags are opaque — only the safety regex is enforced. Negotiation returns canonical casing from this array, not the request's casing.",
"items": {
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
"type": "string"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
}
},
"required": [
"defaultLocale",
"locales"
],
"type": "object"
}
],
"description": "Routed-locale-context release slice. Omit to carry forward from base release; pass null to clear the slice; pass { defaultLocale, locales, detect? } to replace. Drives the negotiated locale that the gateway surfaces to routed HTTP function invocations via x-run402-locale and x-run402-default-locale request headers (omitted entirely when the active release has no i18n slice). Static-route hits do NOT receive locale negotiation."
},
"idempotency_key": {
"description": "Optional client idempotency key. Combined with the project id and gateway-computed manifest digest to deduplicate retries.",
"type": "string"
},
"project_id": {
"description": "Project ID to deploy to (from provision).",
"type": "string"
},
"routes": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"replace": {
"items": {
"additionalProperties": false,
"properties": {
"methods": {
"description": "Optional method allowlist. Omit to allow all supported methods; do not pass an empty array.",
"items": {
"enum": [
"GET",
"HEAD",
"POST",
"PUT",
"PATCH",
"DELETE",
"OPTIONS"
],
"type": "string"
},
"minItems": 1,
"type": "array"
},
"pattern": {
"description": "Route pattern such as /api, /api/*, or /login. Prefix wildcards only use a final /*.",
"type": "string"
},
"target": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"name": {
"description": "Materialized release function name, not a file name or handler export.",
"type": "string"
},
"type": {
"const": "function",
"type": "string"
}
},
"required": [
"type",
"name"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"file": {
"description": "Materialized static-site file path, relative to the site root. No leading slash, query, fragment, traversal, or directory shorthand.",
"type": "string"
},
"type": {
"const": "static",
"type": "string"
}
},
"required": [
"type",
"file"
],
"type": "object"
}
]
}
},
"required": [
"pattern",
"target"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"replace"
],
"type": "object"
}
],
"description": "Apply-v1 web routes. Omit or pass null to carry forward base routes; pass { replace: [] } to clear routes; pass { replace: [{ pattern, methods?, target: { type: 'function', name } }] } for functions or exact GET/HEAD { target: { type: 'static', file } } entries for method-aware static route aliases. Prefer site.public_paths for ordinary clean static URLs."
},
"secrets": {
"additionalProperties": false,
"properties": {
"delete": {
"items": {
"type": "string"
},
"type": "array"
},
"require": {
"description": "Secret keys that must already exist. Set values first with `set_secret`; never put secret values in deploy specs.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"site": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"embedding": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"frame_ancestors": {
"description": "Platform embedding catalog KEYS (never raw origins). `localhost` expands to http://localhost:* and http://127.0.0.1:*; the gateway rejects unknown keys with INVALID_SPEC naming the valid ones.",
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"frame_ancestors"
],
"type": "object"
},
{
"type": "null"
}
],
"description": "tenant-site-embedding: who may put the site in an iframe. The gateway then sends `Content-Security-Policy: frame-ancestors <expanded origins>` and drops X-Frame-Options on every response of the host. Omit to carry the previous release's declaration forward; null returns to the default deny."
},
"noindex": {
"description": "true adds `X-Robots-Tag: noindex, nofollow, nosnippet` to every response of the host (gateway INVALID_SPEC on site.noindex for anything but a boolean or null). Omit to carry the previous release's value forward; false or null makes the host indexable again (the default).",
"type": [
"boolean",
"null"
]
},
"public_paths": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"mode": {
"const": "implicit",
"description": "Restore filename-derived public reachability for static assets.",
"type": "string"
}
},
"required": [
"mode"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"mode": {
"const": "explicit",
"description": "Use only the complete replace table as direct public static URLs.",
"type": "string"
},
"replace": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"asset": {
"description": "Release static asset path, such as events.html. This is not a public URL.",
"type": "string"
},
"cache_class": {
"description": "Optional static cache class, for example html, immutable_versioned, or revalidating_asset.",
"type": "string"
}
},
"required": [
"asset"
],
"type": "object"
},
"description": "Complete map from public browser paths such as /events to release static asset paths such as events.html.",
"type": "object"
}
},
"required": [
"mode",
"replace"
],
"type": "object"
}
]
},
"replace": {
"$ref": "#/properties/functions/properties/replace/additionalProperties/properties/files"
},
"sign_in_path": {
"description": "The app's own same-origin sign-in page (e.g. \"/join\") that MCP authorization (/_run402/oauth/authorize) sends a signed-out user to, with returnTo appended, instead of the hosted /auth/sign-in. Single leading /, at most 512 chars, no query/fragment, not under /_run402/ or /auth/ (the gateway refuses with INVALID_SPEC on site.sign_in_path). Omit to carry the previous release's value forward; null returns to the hosted page.",
"type": [
"string",
"null"
]
}
},
"required": [
"replace"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"embedding": {
"$ref": "#/properties/site/anyOf/0/properties/embedding",
"description": "tenant-site-embedding: who may put the site in an iframe. The gateway then sends `Content-Security-Policy: frame-ancestors <expanded origins>` and drops X-Frame-Options on every response of the host. Omit to carry the previous release's declaration forward; null returns to the default deny."
},
"noindex": {
"$ref": "#/properties/site/anyOf/0/properties/noindex",
"description": "true adds `X-Robots-Tag: noindex, nofollow, nosnippet` to every response of the host (gateway INVALID_SPEC on site.noindex for anything but a boolean or null). Omit to carry the previous release's value forward; false or null makes the host indexable again (the default)."
},
"patch": {
"additionalProperties": false,
"properties": {
"delete": {
"items": {
"type": "string"
},
"type": "array"
},
"put": {
"$ref": "#/properties/functions/properties/replace/additionalProperties/properties/files"
}
},
"type": "object"
},
"public_paths": {
"$ref": "#/properties/site/anyOf/0/properties/public_paths"
},
"sign_in_path": {
"$ref": "#/properties/site/anyOf/0/properties/sign_in_path",
"description": "The app's own same-origin sign-in page (e.g. \"/join\") that MCP authorization (/_run402/oauth/authorize) sends a signed-out user to, with returnTo appended, instead of the hosted /auth/sign-in. Single leading /, at most 512 chars, no query/fragment, not under /_run402/ or /auth/ (the gateway refuses with INVALID_SPEC on site.sign_in_path). Omit to carry the previous release's value forward; null returns to the hosted page."
}
},
"required": [
"patch"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"embedding": {
"$ref": "#/properties/site/anyOf/0/properties/embedding",
"description": "tenant-site-embedding: who may put the site in an iframe. The gateway then sends `Content-Security-Policy: frame-ancestors <expanded origins>` and drops X-Frame-Options on every response of the host. Omit to carry the previous release's declaration forward; null returns to the default deny."
},
"noindex": {
"$ref": "#/properties/site/anyOf/0/properties/noindex",
"description": "true adds `X-Robots-Tag: noindex, nofollow, nosnippet` to every response of the host (gateway INVALID_SPEC on site.noindex for anything but a boolean or null). Omit to carry the previous release's value forward; false or null makes the host indexable again (the default)."
},
"public_paths": {
"$ref": "#/properties/site/anyOf/0/properties/public_paths"
},
"sign_in_path": {
"$ref": "#/properties/site/anyOf/0/properties/sign_in_path",
"description": "The app's own same-origin sign-in page (e.g. \"/join\") that MCP authorization (/_run402/oauth/authorize) sends a signed-out user to, with returnTo appended, instead of the hosted /auth/sign-in. Single leading /, at most 512 chars, no query/fragment, not under /_run402/ or /auth/ (the gateway refuses with INVALID_SPEC on site.sign_in_path). Omit to carry the previous release's value forward; null returns to the hosted page."
}
},
"required": [
"public_paths"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"embedding": {
"$ref": "#/properties/site/anyOf/0/properties/embedding"
},
"noindex": {
"$ref": "#/properties/site/anyOf/0/properties/noindex",
"description": "true adds `X-Robots-Tag: noindex, nofollow, nosnippet` to every response of the host (gateway INVALID_SPEC on site.noindex for anything but a boolean or null). Omit to carry the previous release's value forward; false or null makes the host indexable again (the default)."
},
"sign_in_path": {
"$ref": "#/properties/site/anyOf/0/properties/sign_in_path",
"description": "The app's own same-origin sign-in page (e.g. \"/join\") that MCP authorization (/_run402/oauth/authorize) sends a signed-out user to, with returnTo appended, instead of the hosted /auth/sign-in. Single leading /, at most 512 chars, no query/fragment, not under /_run402/ or /auth/ (the gateway refuses with INVALID_SPEC on site.sign_in_path). Omit to carry the previous release's value forward; null returns to the hosted page."
}
},
"required": [
"embedding"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"noindex": {
"$ref": "#/properties/site/anyOf/0/properties/noindex",
"description": "true adds `X-Robots-Tag: noindex, nofollow, nosnippet` to every response of the host (gateway INVALID_SPEC on site.noindex for anything but a boolean or null). Omit to carry the previous release's value forward; false or null makes the host indexable again (the default)."
},
"sign_in_path": {
"$ref": "#/properties/site/anyOf/0/properties/sign_in_path"
}
},
"required": [
"sign_in_path"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"noindex": {
"$ref": "#/properties/site/anyOf/0/properties/noindex"
}
},
"required": [
"noindex"
],
"type": "object"
}
]
},
"subdomains": {
"additionalProperties": false,
"description": "At most one subdomain per project — multi-element `set` is rejected with SUBDOMAIN_MULTI_NOT_SUPPORTED.",
"properties": {
"add": {
"items": {
"type": "string"
},
"type": "array"
},
"remove": {
"items": {
"type": "string"
},
"type": "array"
},
"set": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"required": [
"project_id"
],
"type": "object"
}
sha256:5d021d0a0f7842e94b357c531f33a931a6a55e1f008361ddeae50046c6c3e5c9Output schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": true,
"properties": {
"error": {
"additionalProperties": true,
"properties": {
"category": {
"type": "string"
},
"code": {
"type": "string"
},
"column": {
"type": "integer"
},
"details": {},
"diagnostics": {
"items": {
"additionalProperties": true,
"properties": {
"code": {
"type": "string"
},
"column": {
"type": "integer"
},
"line": {
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"line",
"column",
"code",
"message"
],
"type": "object"
},
"type": "array"
},
"diagnostics_ref": {
"type": "string"
},
"diagnostics_total": {
"type": "integer"
},
"fix": {},
"http_status": {
"type": "integer"
},
"line": {
"type": "integer"
},
"logs": {
"items": {
"type": "string"
},
"type": "array"
},
"message": {
"type": "string"
},
"mutation_state": {
"type": "string"
},
"next_actions": {
"items": {
"additionalProperties": true,
"properties": {
"type": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"operation_id": {
"type": "string"
},
"phase": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"resource": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"safe_to_retry": {
"type": "boolean"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"message",
"next_actions"
],
"type": "object"
},
"events": {
"items": {
"additionalProperties": true,
"properties": {
"type": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"result": {
"additionalProperties": true,
"properties": {
"next_actions": {
"items": {
"$ref": "#/properties/error/properties/next_actions/items"
},
"type": "array"
},
"operation_id": {
"type": "string"
},
"release_id": {
"type": "string"
},
"urls": {
"additionalProperties": {},
"type": "object"
},
"warnings": {
"items": {
"additionalProperties": true,
"properties": {
"code": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"required": [
"release_id",
"operation_id",
"urls"
],
"type": "object"
},
"status": {
"enum": [
"ok",
"error"
],
"type": "string"
},
"warnings": {
"items": {
"$ref": "#/properties/result/properties/warnings/items"
},
"type": "array"
}
},
"required": [
"status"
],
"type": "object"
}
sha256:407ee241fbf47371b0057ccbf8685f97ff1153fb0690d6bc99e87e83b455d13b