check_deploy #

View this page as Markdown

On this page

Generated automatically from the published contract sources.

A script calls this action over HTTPS at POST https://tzcloud.turnzero.ai/v1/check_deploy, with a bearer credential and the action's payload as the JSON body. It also accepts GET. An MCP connection lists this action as the tool tzcloud_check_deploy.

OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts (Sign-in, sessions, and tokens).

Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.

Contract description #

Check whether the platform would refuse a deploy now. It never checks your code. First submit the manifest through submit_manifest. Use it before the first deploy_command or deploy_files and after fixing its findings. It writes nothing. After a deploy, last_release gives the target's serving version and outcome, health, smoke, errors since and schedules' last_run and next_due. It uses platform records, without application requests or console. last_release is null if no version serves. Clear refusals in order. Use each next given. An empty list with zip_checked: false clears state, never code. Check code in detail's order. Use without_command (deploy_files with check_only: true and your files), or run the returned check command from your application's folder. Tell the person your route and why.

More about this action #

The call runs the deploy's own checks of the application's state, in the deploy's order, up to the point where a deploy's start would first write anything. It runs them through the same code the start runs. A problem with the application, the manifest, or the environment, or a deletion in flight, refuses the call itself, as it refuses a deploy's start. Each later check that does not read the zip returns its refusal as an entry of refusals instead. The entries cover a deploy in flight, the database, a missing secret, the daily deploy cap, halted production, and the hosting cell's room. A deploy, promote, or other act in flight is returned as deploy_in_flight whatever the zip, because the call passes no hash. Its detail says which act is in flight, and for a deploy it adds that the deploy line is refused until that deploy ends.

A check that depends on what an earlier, refused check would have accepted is left out. The call writes no version-history row, counts no deploy, spends no grant, and ends no halt.

The answer's first_deploy is true where the target environment serves no version. For a server's first deploy, the command checks the health path; a serverless application has no health-path check. Its recorded_health_path is the recorded manifest's health path, whole. The command member runs the turnzero command's check for the application. It is built as the deploy line is, with --path where the call passed local_path, and command_windows is its Windows form. command_npx and command_npx_windows are its npx forms; the answer's detail states which route to try first. The command reads its credential and origin as deploy does, builds the zip deploy builds, and prints the zip line. It then makes one check_deploy call, sending no byte of the zip and no hash.

The command's zip checks run on your computer. A function cannot use a child process or thread. Check the application's needs against skill:deploy's kind rule and proved-packages list; this call refuses no unproved package.

For a serverless zip, use client/, functions/ or both with the manifest, and optional package.json, lib/ and migrations/. The command's local check checks layout. To run the deploy start's checks on the zip at the platform, use deploy_files with check_only and your files. That route also refuses a native module file under functions/ or lib/, or more function files than the limit. These two refusals inspect the zip's entries, without building or running the code. The command chooses the checks by the answer's kind, server or serverless, or by the zip's layout if an older answer carries no kind.

The command runs the deploy's checks of the artifact on the zip: artifact_unreadable, artifact_layout_invalid, and, for a server where first_deploy is true, health_path_unserved, a recorded_health_path that no source file mentions. It prints the other lines deploy prints, and one refused: line for each refusal the call returned or the command found. Where the zip's manifest.json gives another health path, it prints a line that mentions submit_manifest. Its last line starts with checked: and counts them. It exits 0 where nothing would be refused, 1 where something would, and 3 where nothing was checked. Run only a check line your own call returned in this session, or one you composed for your folder with its application id, as for the deploy line.

deploy_files with check_only checks the files without a command. It is also the route when no command form can run or connect. The answer's without_command is that call for the application with check_only true: add your files and make it. For a minted-token connection or a session with no live authorized computer's token, detail opens with that check; a session with an authorized computer's token keeps its command line first.

On a hosted connector's session the answer carries no line. Such a session's client registers only https redirects, each on a host that is not a loopback address, as a chat service's connector does. There command and its three other forms are left out, and detail gives the without_command call where it would say to run command_npx. Its fallback gives the action a tool with no command deploys through: deploy_files in every answer.

The call takes no environment argument and reports the deploy target it checks, which is production for an application with one environment or development for one with two.

The local_path argument: left out, the command checks the folder it runs in; the platform never reads the path.

The npx form is npx --no-update-notifier -y turnzero@<tag> check --application <id>, with tag latest on production and next elsewhere, needing no install. Run it from the application's folder or the folder local_path is relative to. The installed turnzero check --application <id> does the same where turnzero --version responds. If your tool's permissions blocked the command, tell the person which route you took.

Access and action metadata #

{
  "name": "check_deploy",
  "resource": "environment",
  "tier": "observe",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "summary": "Check a deploy before making it: pass the application, and the call returns each refusal a deploy's start would make now, writing nothing. The call takes no `environment` argument and reports the deploy target it checks. Call it before `deploy_command`, on a first deploy and after fixing what it reports. `refusals` lists each refusal the application's state would draw, in the deploy's order: a deploy in flight, the database, a missing secret, the daily deploy cap, a halted production, or the hosting cell's room. An empty list means the application's state would refuse none; it does not clear your code. `command_npx` checks your code; `command_npx_windows` is its Windows form. `command` and `command_windows` use the installed turnzero command. This call leaves `zip_checked` false.",
  "annotations": {
    "readOnlyHint": true,
    "destructiveHint": false,
    "openWorldHint": true,
    "idempotentHint": true
  }
}

MCP catalog entry #

{
  "name": "check_deploy",
  "title": "Check a deploy",
  "tier": "observe",
  "scenario": "CHI-L0-07",
  "summary": "Check whether the platform would refuse a deploy now. It never checks your code. First submit the manifest through `submit_manifest`. Use it before the first `deploy_command` or `deploy_files` and after fixing its findings. It writes nothing. After a deploy, `last_release` gives the target's serving version and outcome, health, smoke, errors since and schedules' `last_run` and `next_due`. It uses platform records, without application requests or console. `last_release` is null if no version serves. Clear `refusals` in order. Use each `next` given. An empty list with `zip_checked: false` clears state, never code. Check code in `detail`'s order. Use `without_command` (`deploy_files` with `check_only: true` and your files), or run the returned check command from your application's folder. Tell the person your route and why.",
  "owners": [
    "API-L0-24",
    "MAPI-25",
    "PLD-L0-107",
    "PLD-L0-94"
  ]
}

request #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["application"]
/properties/application Your account's application id from list_applications, not its name or label.

Type: string
/properties/local_path On the check line: the application's folder or a .zip file, absolute or relative to where the command runs, passed as check's --path. Absent, it checks that folder. A path deploy_command's local_path refuses is refused invalid_request.

Type: string
Minimum length: 1
Maximum length: 1024
Pattern: ^(?:[^"$`%!&\|<>^\u201c-\u201e\u0000-\u001f\u007f\\]|\\[^"$`%!&\|<>^\u201c-\u201e\u0000-\u001f\u007f\\])+$

response #

JSON pointer Description and constraints
"" (root) 200 at once: nothing was written, started, or spent. refusals holds what the application's state would draw; the zip's checks run on your computer through command.

Type: object
Required fields: ["contract_version","application","environment","refusals","checks","zip_checked","kind","credentials_missing","provider_credentials_missing","first_deploy","recorded_health_path","last_release","without_command","fallback","detail","page"]
/properties/contract_version Required value: 1
/properties/reference The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call.

Type: string
Pattern: ^[0-9a-f]{10}$
/properties/application The application id the call passed.

Type: string
/properties/environment The environment a deploy would target now: production on an application with one environment, development on one with two.

Type: string
/properties/refusals Each refusal a deploy's start would make now on the application's state, the platform side alone, in the deploy's order. Empty where none would; a later deploy reads every check again.

Type: array
/properties/refusals/items Type: object
Required fields: ["error","status","detail"]
/properties/refusals/items/properties/error The refusal's name, a row of schemas/wire_errors.json.

Type: string
/properties/refusals/items/properties/status The status the deploy would refuse it with.

Type: integer
/properties/refusals/items/properties/detail The refusal's detail, within a refusal's budget.

Type: string
/properties/refusals/items/properties/next Present where the refusal gives its remedy's one exact call, as the refusal's own body carries it: for setting_secret_missing, the store_secret call for the application and the environment a deploy would target, with no value. Absent otherwise.

Type: object
Required fields: ["action","arguments"]
Additional properties: false
/properties/refusals/items/properties/next/properties/action Type: string
/properties/refusals/items/properties/next/properties/arguments Type: object
/properties/checks The results of the platform and file checks. Your code is checked by command, or, where it cannot run, by deploy_files with check_only. Skipping the file check loses only early warning of code a deploy would refuse.

Type: object
Required fields: ["platform_readiness","files"]
Additional properties: false
/properties/checks/properties/platform_readiness passed where refusals is empty, otherwise refused.

Type: string
Allowed values: ["passed","refused"]
/properties/checks/properties/files not_checked in every answer. This action reads no zip.

Type: string
Allowed values: ["not_checked"]
/properties/zip_checked False in every answer because this action reads no zip.

Type: boolean
/properties/kind The application's kind. The command runs the zip's checks for this kind.

Type: string
Allowed values: ["server","serverless"]
/properties/credentials_missing Each upstream whose key the target environment reads at neither its own scope of the application nor the account scope, by name; empty where every key is stored. A deploy is not refused for it: it serves, the gateway refusing that upstream's calls credential_not_in_custody until store_secret stores the key, and its version row lists the same entries in outcome.credentials_missing.

Type: array
/properties/credentials_missing/items Type: object
Required fields: ["upstream","credential_name"]
Additional properties: false
/properties/credentials_missing/items/properties/upstream The upstream's name.

Type: string
/properties/credentials_missing/items/properties/credential_name The stored name of the upstream's key.

Type: string
/properties/provider_credentials_missing Each credential the recorded manifest's realm member or push entry refers to that the target environment's provider cannot read; empty where every one is stored. A deploy is not refused for it: it serves, the sign-in method's sign-ins failing and the push provider's deliveries ending credential_unreadable until store_secret stores the credential at that environment's scope of the application, and its version row lists the same entries in outcome.provider_credentials_missing. A sign-in credential, entra or apple, then moves into place at the manifest's next submission, and stays listed until then.

Type: array
/properties/provider_credentials_missing/items Type: object
Required fields: ["provider","credential_name"]
Additional properties: false
/properties/provider_credentials_missing/items/properties/provider The provider the credential serves: a sign-in method, entra or apple, or a push provider, apns or fcm.

Type: string
Allowed values: ["entra","apple","apns","fcm"]
/properties/provider_credentials_missing/items/properties/credential_name The credential's stored name.

Type: string
/properties/first_deploy True where the target environment serves no version. For a server, the start would read the zip for the health path and command checks it; a static site has no health-path check.

Type: boolean
/properties/recorded_health_path The recorded manifest's health path, whole and never cut, which command reads the zip for on a server where first_deploy is true; the preparing answer carries the same fact under the same name.

Type: string
/properties/last_release What the version the target environment serves did since it began serving, composed from reads the platform already makes, with no request to the application. It is null where first_deploy is true, and unread with its reason where the serving version's own read fails or passes its bound. A part whose read fails or passes its bound holds unread and the reason in its value's place, and never fails the call. The member holds at most 4,096 code points of JSON text, newest trimmed first, then schedules from its end.

Type: ["object","null"]
/properties/last_release/anyOf/0 Required fields: ["version","ended_at","outcome","health","smoke","server_errors_since","log_errors_since","usage"]
/properties/last_release/anyOf/1 $ref: #/shapes/LastReleaseUnread
/properties/last_release/properties/version The serving version's number.

Type: integer
/properties/last_release/properties/ended_at When the serving version's deploy ended, as its row records it.

Type: ["string","null"]
/properties/last_release/properties/outcome The serving version's outcome, as the deploy member of read_status gives it, opening with result.

Type: ["object","null"]
/properties/last_release/properties/health Whether the row passed the health gate, and its step's start and end. Null where the row entered no health gate and its outcome holds no gate record, as on a row written before its step list. The gate's own record, where one was kept, is in outcome alone.

Type: ["object","null"]
Required fields: ["passed","started_at","ended_at"]
/properties/last_release/properties/health/properties/passed Type: boolean
/properties/last_release/properties/health/properties/started_at Type: ["string","null"]
/properties/last_release/properties/health/properties/ended_at Type: ["string","null"]
/properties/last_release/properties/smoke The smoke check in health's form, its own record in outcome alone. Null where the row entered no smoke check: the manifest listed no smoke path, or the act runs none.

Type: ["object","null"]
Required fields: ["passed","started_at","ended_at"]
/properties/last_release/properties/smoke/properties/passed Type: boolean
/properties/last_release/properties/smoke/properties/started_at Type: ["string","null"]
/properties/last_release/properties/smoke/properties/ended_at Type: ["string","null"]
/properties/last_release/properties/server_errors_since The router's 5xx responses as read_status's server_errors member counts them: count, counted from since, the later of the release's end (ended_at) and seven days before the read, and capped at 500, capped true where the cap was met, the count then a floor. It covers only the routes requested in that time, so a route nobody requested counts nothing. A route listed in the manifest's smoke_paths is checked before each deploy and promote switches, and that check is not in this count.

/properties/last_release/properties/server_errors_since/oneOf/0 Type: object
Required fields: ["count","since","capped"]
/properties/last_release/properties/server_errors_since/oneOf/0/properties/count Type: integer
Minimum: 0
Maximum: 500
/properties/last_release/properties/server_errors_since/oneOf/0/properties/since Type: string
/properties/last_release/properties/server_errors_since/oneOf/0/properties/capped Type: boolean
/properties/last_release/properties/server_errors_since/oneOf/1 $ref: #/shapes/LastReleaseUnread
/properties/last_release/properties/log_errors_since The application's own log entries at error since ended_at, count at most the store's read ceiling (1,000), and newest at most the three newest, newest first, each its first line cut to 200 code points.

/properties/last_release/properties/log_errors_since/oneOf/0 Type: object
Required fields: ["count","newest"]
/properties/last_release/properties/log_errors_since/oneOf/0/properties/count Type: integer
Minimum: 0
/properties/last_release/properties/log_errors_since/oneOf/0/properties/newest Type: array
Maximum items: 3
/properties/last_release/properties/log_errors_since/oneOf/0/properties/newest/items Type: string
Maximum length: 200
/properties/last_release/properties/log_errors_since/oneOf/1 $ref: #/shapes/LastReleaseUnread
/properties/last_release/properties/usage The usage reading's freshness: checked_at, the last usage check's stamp, from the application's row where it holds one, else as read_usage gives it.

/properties/last_release/properties/usage/oneOf/0 Type: object
Required fields: ["checked_at"]
/properties/last_release/properties/usage/oneOf/0/properties/checked_at Type: ["string","null"]
/properties/last_release/properties/usage/oneOf/1 $ref: #/shapes/LastReleaseUnread
/properties/last_release/properties/schedules Present where the recorded manifest declares schedules: each one's name, its last run's outcome and time, and its next_due as read_schedules gives them.

/properties/last_release/properties/schedules/oneOf/0 Type: array
Maximum items: 20
/properties/last_release/properties/schedules/oneOf/0/items Type: object
Required fields: ["name","last_run","next_due"]
/properties/last_release/properties/schedules/oneOf/0/items/properties/name Type: string
/properties/last_release/properties/schedules/oneOf/0/items/properties/last_run Type: ["object","null"]
Required fields: ["outcome","at"]
/properties/last_release/properties/schedules/oneOf/0/items/properties/last_run/properties/outcome Type: string
/properties/last_release/properties/schedules/oneOf/0/items/properties/last_run/properties/at Type: ["string","null"]
/properties/last_release/properties/schedules/oneOf/0/items/properties/next_due Type: ["string","null"]
/properties/last_release/properties/schedules/oneOf/1 $ref: #/shapes/LastReleaseUnread
/properties/without_command The call a tool that cannot run the line makes to check its code instead: with no shell, command_npx refused and the command not installed (turnzero --version does not respond), or no connection. It is deploy_files with check_only true for the application, in next's form. Add files, the complete list as deploy_files reads it, with a file too large for the list's call sent first as file. The call whose list leaves nothing missing runs every check a deploy makes before it starts, and starts nothing.

Type: object
Required fields: ["action","arguments"]
Additional properties: false
/properties/without_command/properties/action Allowed values: ["deploy_files","tzcloud_deploy_files"]
/properties/without_command/properties/arguments Type: object
Required fields: ["application","check_only"]
Additional properties: false
/properties/without_command/properties/arguments/properties/application Type: string
/properties/without_command/properties/arguments/properties/check_only Required value: true
/properties/fallback Always present: the action for a tool that cannot run a command, deploy_files on the wire and tzcloud_deploy_files over MCP; never null. For a minted token or a session with no authorized computer, detail opens with the without_command check and its state. A returned command follows, with its shell and credential conditions. A session with an authorized computer gets the command-first form where a line is returned. A tool that uses deploy_files tells the person why.

Type: ["string","null"]
Allowed values: ["deploy_files","tzcloud_deploy_files",null]
/properties/command One line running the installed turnzero command's check with the application, bare, composed as the deploy line is, with --path where the call passed local_path. A tool runs command_npx, its npx form, first, and this line where npx cannot run and turnzero --version responds. Run it through your shell tool on Node.js 24 or later, from the application's folder or, where the call passed local_path, from the folder that path is relative to. It uploads nothing. Left out on a hosted connector's session, a client whose every registered redirect is an https address on a host that is not a loopback address, as a chat service's connector registers.

Type: string
/properties/command_windows The same line in its Windows form. Left out on a hosted connector's session, as command is.

Type: string
/properties/command_npx The same line run through npx, npx --no-update-notifier -y turnzero@<tag> in place of turnzero, the tag latest on production's platform and next on every other. Use Node.js 24 or later. Use read_documentation with page /cloud/getting-started/prerequisites/ for ways to put Node.js 24 first on PATH. Run this line first, or command_npx_windows on Windows; it runs whether or not the command is installed. If npx can't run, use command where turnzero --version responds; else use the answer's without_command call, deploy_files with check_only. Run npm install -g turnzero@<tag> only if the person wants to keep it. If your tool's permissions blocked the command, tell the person which route you took. A person or a job may run any of the four forms. Left out on a hosted connector's session, as command is.

Type: string
/properties/command_npx_windows command_npx's line for every Windows shell, with npx.cmd where its head says npx. Left out on a hosted connector's session, as command is.

Type: string
/properties/detail detail reports whether a deploy would be refused now and says that this call checked no code. Where refusals is empty, it says that the platform side would refuse nothing; that clause leaves where the budget asks. Otherwise it points to refusals. Every form closes on the ways-to-deploy pointer and opens with no version check.

On a minted-token answer or a session with no live authorized computer's token, it opens with the without_command check, deploy_files with check_only, with the caller's folder files added. It says that the check deploys nothing. One command sentence follows as the alternative. Its credential condition is a signed-in computer for a session, or this connection's token in TURNZERO_CLOUD_MINTED_TOKEN for a minted token. The minted-token condition says to keep TURNZERO_CLOUD_MINTED_TOKEN if set, or set it to this connection's token outside commands.

A session's first run without the computer's sign-in prints the sign-in path; signing in to this connection authorizes no computer. Where an authorized computer's token exists, the session's command line stays first, with its other-computer sentence. Only that line-first form points to command_npx to check the code, or after the refusals are cleared. command_npx_windows joins only where room remains once every other part is in place.

The folder, result and ways-to-deploy pointer stay whole. A minted-token answer over 600 code points may use shorter wording, preserving every token and origin precondition. The line's --origin may give the origin. On a hosted connector's session, no command member is carried: the without_command check stays, no sentence tells the tool to run command_npx, and the install sentence omits command_npx.

Type: string
/properties/page The reference page's address on the origin that responded, ending /cloud/reference/actions/check-deploy/, which read_documentation reads as page.

Type: string

Complete payload contract #

{
  "request": {
    "type": "object",
    "required": [
      "application"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "Your account's application `id` from `list_applications`, not its name or label."
      },
      "local_path": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024,
        "pattern": "^(?:[^\"$`%!&\\|<>^\\u201c-\\u201e\\u0000-\\u001f\\u007f\\\\]|\\\\[^\"$`%!&\\|<>^\\u201c-\\u201e\\u0000-\\u001f\\u007f\\\\])+$",
        "description": "On the check line: the application's folder or a `.zip` file, absolute or relative to where the command runs, passed as `check`'s `--path`. Absent, it checks that folder. A path `deploy_command`'s `local_path` refuses is refused `invalid_request`."
      }
    }
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "application",
      "environment",
      "refusals",
      "checks",
      "zip_checked",
      "kind",
      "credentials_missing",
      "provider_credentials_missing",
      "first_deploy",
      "recorded_health_path",
      "last_release",
      "without_command",
      "fallback",
      "detail",
      "page"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "reference": {
        "type": "string",
        "pattern": "^[0-9a-f]{10}$",
        "description": "The short reference the platform recorded your call under: ten lowercase hexadecimal characters, the value in the call’s record row. Quote it when you report the call."
      },
      "application": {
        "type": "string",
        "description": "The application id the call passed."
      },
      "environment": {
        "type": "string",
        "description": "The environment a deploy would target now: production on an application with one environment, development on one with two (PLD-L0-96)."
      },
      "refusals": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "error",
            "status",
            "detail"
          ],
          "properties": {
            "error": {
              "type": "string",
              "description": "The refusal's name, a row of `schemas/wire_errors.json` (MAPI-15)."
            },
            "status": {
              "type": "integer",
              "description": "The status the deploy would refuse it with."
            },
            "detail": {
              "type": "string",
              "description": "The refusal's detail, within a refusal's budget (MCP-12)."
            },
            "next": {
              "type": "object",
              "required": [
                "action",
                "arguments"
              ],
              "properties": {
                "action": {
                  "type": "string"
                },
                "arguments": {
                  "type": "object"
                }
              },
              "additionalProperties": false,
              "description": "Present where the refusal gives its remedy's one exact call, as the refusal's own body carries it (MAPI-24): for `setting_secret_missing`, the `store_secret` call for the application and the environment a deploy would target, with no value. Absent otherwise."
            }
          }
        },
        "description": "Each refusal a deploy's start would make now on the application's state, the platform side alone, in the deploy's order. Empty where none would; a later deploy reads every check again."
      },
      "checks": {
        "type": "object",
        "required": [
          "platform_readiness",
          "files"
        ],
        "properties": {
          "platform_readiness": {
            "type": "string",
            "enum": [
              "passed",
              "refused"
            ],
            "description": "`passed` where `refusals` is empty, otherwise `refused`."
          },
          "files": {
            "type": "string",
            "enum": [
              "not_checked"
            ],
            "description": "`not_checked` in every answer. This action reads no zip."
          }
        },
        "additionalProperties": false,
        "description": "The results of the platform and file checks. Your code is checked by `command`, or, where it cannot run, by `deploy_files` with `check_only`. Skipping the file check loses only early warning of code a deploy would refuse."
      },
      "zip_checked": {
        "type": "boolean",
        "description": "False in every answer because this action reads no zip."
      },
      "kind": {
        "type": "string",
        "enum": [
          "server",
          "serverless"
        ],
        "description": "The application's kind. The command runs the zip's checks for this kind."
      },
      "credentials_missing": {
        "type": "array",
        "description": "Each upstream whose key the target environment reads at neither its own scope of the application nor the account scope, by name; empty where every key is stored. A deploy is not refused for it: it serves, the gateway refusing that upstream's calls `credential_not_in_custody` until `store_secret` stores the key, and its version row lists the same entries in `outcome.credentials_missing` (EGW-L0-02; PLD-L0-107).",
        "items": {
          "type": "object",
          "required": [
            "upstream",
            "credential_name"
          ],
          "properties": {
            "upstream": {
              "type": "string",
              "description": "The upstream's name."
            },
            "credential_name": {
              "type": "string",
              "description": "The stored name of the upstream's key."
            }
          },
          "additionalProperties": false
        }
      },
      "provider_credentials_missing": {
        "type": "array",
        "description": "Each credential the recorded manifest's `realm` member or push entry refers to that the target environment's provider cannot read; empty where every one is stored. A deploy is not refused for it: it serves, the sign-in method's sign-ins failing and the push provider's deliveries ending `credential_unreadable` until `store_secret` stores the credential at that environment's scope of the application, and its version row lists the same entries in `outcome.provider_credentials_missing`. A sign-in credential, `entra` or `apple`, then moves into place at the manifest's next submission, and stays listed until then (ACS-L0-09; PSH-L0-01; PLD-L0-107).",
        "items": {
          "type": "object",
          "required": [
            "provider",
            "credential_name"
          ],
          "properties": {
            "provider": {
              "type": "string",
              "enum": [
                "entra",
                "apple",
                "apns",
                "fcm"
              ],
              "description": "The provider the credential serves: a sign-in method, `entra` or `apple`, or a push provider, `apns` or `fcm`."
            },
            "credential_name": {
              "type": "string",
              "description": "The credential's stored name."
            }
          },
          "additionalProperties": false
        }
      },
      "first_deploy": {
        "type": "boolean",
        "description": "True where the target environment serves no version. For a server, the start would read the zip for the health path and `command` checks it; a static site has no health-path check (PLD-L0-107)."
      },
      "recorded_health_path": {
        "type": "string",
        "description": "The recorded manifest's health path, whole and never cut, which `command` reads the zip for on a server where `first_deploy` is true; the preparing answer carries the same fact under the same name (PLD-L0-107; PLD-L0-86)."
      },
      "last_release": {
        "type": [
          "object",
          "null"
        ],
        "anyOf": [
          {
            "required": [
              "version",
              "ended_at",
              "outcome",
              "health",
              "smoke",
              "server_errors_since",
              "log_errors_since",
              "usage"
            ]
          },
          {
            "$ref": "#/shapes/LastReleaseUnread"
          }
        ],
        "properties": {
          "version": {
            "type": "integer",
            "description": "The serving version's number."
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the serving version's deploy ended, as its row records it."
          },
          "outcome": {
            "type": [
              "object",
              "null"
            ],
            "description": "The serving version's outcome, as the deploy member of `read_status` gives it, opening with `result`."
          },
          "health": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "passed",
              "started_at",
              "ended_at"
            ],
            "properties": {
              "passed": {
                "type": "boolean"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ended_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "Whether the row passed the health gate, and its step's start and end. Null where the row entered no health gate and its outcome holds no `gate` record, as on a row written before its step list. The gate's own record, where one was kept, is in `outcome` alone (PLD-L0-59; PLD-L0-89)."
          },
          "smoke": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "passed",
              "started_at",
              "ended_at"
            ],
            "properties": {
              "passed": {
                "type": "boolean"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ended_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "The smoke check in `health`'s form, its own record in `outcome` alone. Null where the row entered no smoke check: the manifest listed no smoke path, or the act runs none."
          },
          "server_errors_since": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "count",
                  "since",
                  "capped"
                ],
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 500
                  },
                  "since": {
                    "type": "string"
                  },
                  "capped": {
                    "type": "boolean"
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "The router's 5xx responses as `read_status`'s `server_errors` member counts them: `count`, counted from `since`, the later of the release's end (`ended_at`) and seven days before the read, and capped at 500, `capped` true where the cap was met, the count then a floor. It covers only the routes requested in that time, so a route nobody requested counts nothing. A route listed in the manifest's `smoke_paths` is checked before each deploy and promote switches, and that check is not in this count."
          },
          "log_errors_since": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "count",
                  "newest"
                ],
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "newest": {
                    "type": "array",
                    "maxItems": 3,
                    "items": {
                      "type": "string",
                      "maxLength": 200
                    }
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "The application's own log entries at `error` since `ended_at`, `count` at most the store's read ceiling (1,000), and `newest` at most the three newest, newest first, each its first line cut to 200 code points."
          },
          "usage": {
            "oneOf": [
              {
                "type": "object",
                "required": [
                  "checked_at"
                ],
                "properties": {
                  "checked_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "The usage reading's freshness: `checked_at`, the last usage check's stamp, from the application's row where it holds one, else as `read_usage` gives it."
          },
          "schedules": {
            "oneOf": [
              {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "last_run",
                    "next_due"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "last_run": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "outcome",
                        "at"
                      ],
                      "properties": {
                        "outcome": {
                          "type": "string"
                        },
                        "at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "next_due": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              },
              {
                "$ref": "#/shapes/LastReleaseUnread"
              }
            ],
            "description": "Present where the recorded manifest declares schedules: each one's `name`, its last run's `outcome` and time, and its `next_due` as `read_schedules` gives them."
          }
        },
        "description": "What the version the target environment serves did since it began serving, composed from reads the platform already makes, with no request to the application. It is null where `first_deploy` is true, and `unread` with its reason where the serving version's own read fails or passes its bound. A part whose read fails or passes its bound holds `unread` and the reason in its value's place, and never fails the call. The member holds at most 4,096 code points of JSON text, `newest` trimmed first, then `schedules` from its end (PLD-L0-107)."
      },
      "without_command": {
        "type": "object",
        "required": [
          "action",
          "arguments"
        ],
        "properties": {
          "action": {
            "enum": [
              "deploy_files",
              "tzcloud_deploy_files"
            ]
          },
          "arguments": {
            "type": "object",
            "required": [
              "application",
              "check_only"
            ],
            "properties": {
              "application": {
                "type": "string"
              },
              "check_only": {
                "const": true
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "description": "The call a tool that cannot run the line makes to check its code instead: with no shell, `command_npx` refused and the command not installed (`turnzero --version` does not respond), or no connection. It is `deploy_files` with `check_only` true for the application, in `next`'s form. Add `files`, the complete list as `deploy_files` reads it, with a file too large for the list's call sent first as `file`. The call whose list leaves nothing `missing` runs every check a deploy makes before it starts, and starts nothing (PLD-L0-107; MAPI-24; MAPI-26)."
      },
      "fallback": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "deploy_files",
          "tzcloud_deploy_files",
          null
        ],
        "description": "Always present: the action for a tool that cannot run a command, `deploy_files` on the wire and `tzcloud_deploy_files` over MCP; never null. For a minted token or a session with no authorized computer, `detail` opens with the `without_command` check and its state. A returned command follows, with its shell and credential conditions. A session with an authorized computer gets the command-first form where a line is returned. A tool that uses `deploy_files` tells the person why."
      },
      "command": {
        "type": "string",
        "description": "One line running the installed turnzero command's `check` with the application, bare, composed as the deploy line is, with `--path` where the call passed `local_path`. A tool runs `command_npx`, its npx form, first, and this line where npx cannot run and `turnzero --version` responds. Run it through your shell tool on Node.js 24 or later, from the application's folder or, where the call passed `local_path`, from the folder that path is relative to. It uploads nothing (PLD-L0-94). Left out on a hosted connector's session, a client whose every registered redirect is an `https` address on a host that is not a loopback address, as a chat service's connector registers (PLD-L0-107)."
      },
      "command_windows": {
        "type": "string",
        "description": "The same line in its Windows form (PLD-L0-94). Left out on a hosted connector's session, as `command` is."
      },
      "command_npx": {
        "type": "string",
        "description": "The same line run through npx, `npx --no-update-notifier -y turnzero@<tag>` in place of `turnzero`, the tag `latest` on production's platform and `next` on every other. Use Node.js 24 or later. Use `read_documentation` with page `/cloud/getting-started/prerequisites/` for ways to put Node.js 24 first on PATH. Run this line first, or `command_npx_windows` on Windows; it runs whether or not the command is installed. If npx can't run, use `command` where `turnzero --version` responds; else use the answer's `without_command` call, `deploy_files` with `check_only`. Run `npm install -g turnzero@<tag>` only if the person wants to keep it. If your tool's permissions blocked the command, tell the person which route you took. A person or a job may run any of the four forms (PLD-L0-94). Left out on a hosted connector's session, as `command` is."
      },
      "command_npx_windows": {
        "type": "string",
        "description": "`command_npx`'s line for every Windows shell, with `npx.cmd` where its head says `npx` (PLD-L0-94). Left out on a hosted connector's session, as `command` is."
      },
      "detail": {
        "type": "string",
        "description": "`detail` reports whether a deploy would be refused now and says that this call checked no code. Where `refusals` is empty, it says that the platform side would refuse nothing; that clause leaves where the budget asks. Otherwise it points to `refusals`. Every form closes on the ways-to-deploy pointer and opens with no version check.\n\nOn a minted-token answer or a session with no live authorized computer's token, it opens with the `without_command` check, `deploy_files` with `check_only`, with the caller's folder files added. It says that the check deploys nothing. One command sentence follows as the alternative. Its credential condition is a signed-in computer for a session, or this connection's token in `TURNZERO_CLOUD_MINTED_TOKEN` for a minted token. The minted-token condition says to keep `TURNZERO_CLOUD_MINTED_TOKEN` if set, or set it to this connection's token outside commands.\n\nA session's first run without the computer's sign-in prints the sign-in path; signing in to this connection authorizes no computer. Where an authorized computer's token exists, the session's command line stays first, with its other-computer sentence. Only that line-first form points to `command_npx` to check the code, or after the refusals are cleared. `command_npx_windows` joins only where room remains once every other part is in place.\n\nThe folder, result and ways-to-deploy pointer stay whole. A minted-token answer over 600 code points may use shorter wording, preserving every token and origin precondition. The line's `--origin` may give the origin. On a hosted connector's session, no command member is carried: the `without_command` check stays, no sentence tells the tool to run `command_npx`, and the install sentence omits `command_npx`."
      },
      "page": {
        "type": "string",
        "description": "The reference page's address on the origin that responded, ending /cloud/reference/actions/check-deploy/, which `read_documentation` reads as `page`."
      }
    },
    "description": "200 at once: nothing was written, started, or spent. `refusals` holds what the application's state would draw; the zip's checks run on your computer through `command` (API-L0-24; PLD-L0-107)."
  }
}

Shared contracts #