submit_manifest #

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/submit_manifest, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_submit_manifest.

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 #

Declare or change your application's manifest, its services, region and permitted external hosts. Submission provisions declarations, except production's database and its issue space where the app keeps one per environment. Those are created at the first production deploy or promote. A deploy never adds a service or host as a side effect. Your code's settings are stored secrets or plain values. Declare outside API keys through upstreams or declare_outbound_api, whose description gives the exception. A deploy uses only the last submitted manifest. Submit edits to your project's manifest.json again before a deploy can use them. An edit to application alone is the exception. Use check_manifest to check without recording. Then follow this answer's next store_secret calls. Schedule bounds may refuse your declarations. The regions europe, uk, and global are refused region_unavailable.

More about this action #

The answer's top-level custom_domain, when present, gives domain, state, DNS records, passkeys_to_strand, and reason where one exists.

The answer's next lists a store_secret call for each secret the manifest uses that is not stored yet, in each environment that lacks it. To run the application on your own machine, and only then, run turnzero provision --application <id> on that machine with nothing piped to it, and make any call it prints.

The manifest also declares the application's audience and the library entries it includes. It gives the settings (environment variables) its code reads, each a bound stored secret or a plain value, and it lists the upstreams the application calls with a stored key.

The first submission that declares the database creates the database and owner role that local runs use, development's own once the application has a development environment. Production's database is created at its first deploy, or at its first promote where development is turned on. Where an application keeps one issue space per environment, its production space is created at that first production deploy or promote. The first submission that declares accounts creates a realm for each environment the application has; on a new application, that is production's alone. The first submission mints the platform credential local runs use, and the first that declares the database mints that database's credential; with a development environment, these are the development credentials. This tool returns no platform-minted credential value. When this call mints one, its answer gives credentials: withheld; a resubmission mints nothing and omits credentials.

The call that turnzero provision prints passes local_run: true beside code_challenge. Its answer's provisioning contains command, and command_windows for Windows: one command that re-mints the platform credential, and the database credential where the manifest declares the database, and writes the environment file. A hosted deploy needs neither the command nor the file.

A refusal gives the failing path. The health.gated member says whether sign-in covers the health path from outside. The deploy's health_gate step calls the path from inside, where sign-in never applies. At each submission, a realm member and a push entry's apns and fcm members configure each environment the application has. A field they set belongs to the manifest: change it there and submit again.

A copy in the zip is optional and never used: where it differs, application aside, the deploy returns manifest_notice and is not refused. An outside API key is declared through the manifest's upstreams member or declare_outbound_api. check_manifest checks without recording. Schedule bounds refuse schedule_interval_below_plan or schedule_count_over_plan. Change the declarations; both sizes have the same bounds. If a refusal follows recording, the manifest stays recorded; correct the fault and submit again to complete what remains.

Access and action metadata #

{
  "name": "submit_manifest",
  "resource": "application",
  "tier": "reversible",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "summary": "Declare or change the manifest, a deliberate act, refused with the failing path. It records the upstreams member's declarations as declare_outbound_api records them. A deploy runs under the recorded manifest alone, so submit again after each edit to the project's manifest.json, except an edit to its `application` member alone. The submission `turnzero provision` prints, passing `local_run` beside `code_challenge`, also returns four command forms under `provisioning`. `provisioning.command_npx` writes a local run's settings under a short-lived grant; `provisioning.command_npx_windows` is its Windows form. `provisioning.command` and `provisioning.command_windows` use the installed turnzero command. That answer withholds the credential values a first submission otherwise returns once, and over the HTTP API its `provisioning.next` says where they are. `next` lists each `store_secret` call a name not stored yet waits on.\n\nThe answer's `health.gated` says whether the router's sign-in check covers the health path for a request with no session. The deploy's `health_gate` step calls the path from inside the platform whatever `gated` says.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": true
  }
}

MCP catalog entry #

{
  "name": "submit_manifest",
  "title": "Submit app manifest",
  "tier": "reversible",
  "scenario": "CHI-L0-07",
  "summary": "Declare or change your application's manifest, its services, region and permitted external hosts. Submission provisions declarations, except production's database and its issue space where the app keeps one per environment. Those are created at the first production deploy or promote. A deploy never adds a service or host as a side effect. Your code's `settings` are stored secrets or plain values. Declare outside API keys through `upstreams` or `declare_outbound_api`, whose description gives the exception. A deploy uses only the last submitted manifest. Submit edits to your project's `manifest.json` again before a deploy can use them. An edit to `application` alone is the exception. Use `check_manifest` to check without recording. Then follow this answer's `next` `store_secret` calls. Schedule bounds may refuse your declarations. The regions `europe`, `uk`, and `global` are refused `region_unavailable`.",
  "owners": [
    "SEC-L0-07",
    "ADM-L0-07",
    "MAN-12",
    "PLD-L0-39",
    "MAN-14",
    "SCH-L0-07",
    "PLD-L0-63"
  ]
}

request #

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

Type: string
/properties/manifest Pass the whole manifest as a JSON object. Keep application if scaffold or deploy wrote it. That member is optional. The platform checks only that member's form. The call's application ID sets the target. See manifest_schema. A refusal gives the failing path. The platform reads no local files.

Type: object
/properties/local_run Optional, on any submission, the first included. Beside code_challenge, provisioning holds the local run's line, which re-mints the local run's credentials when run and revokes those they replace; the answer withholds credential and platform_credential. Refused on a browser session's call.

Type: boolean
Required value: true
/properties/code_challenge Beside local_run alone: the S256 challenge of a verifier the turnzero command keeps. The line's grant then re-mints only with that verifier, so a copy of the line re-mints nothing. Without it, local_run mints no grant and returns no line.

Type: string
Pattern: ^[A-Za-z0-9_-]{43}$

response #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["contract_version","application","outcome"]
/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 Type: string
/properties/outcome Type: string
Pattern: ^recorded$
/properties/changed On every recorded submission: true where the manifest it recorded differs from the one recorded before it, or none was, and false where it repeats the recorded manifest. A repeat still completes what an earlier submission left undone.

Type: boolean
/properties/deploy_reads On every recorded submission: one sentence saying a deploy runs under the manifest this submission recorded and reads the zip's manifest.json only to compare it, returning manifest_notice where the two differ.

Type: string
/properties/cost_reads Present where changed is true: one sentence pointing to skill:cost-estimate and read_rate_card for the caller's estimate before deploying, with no figure or fit verdict.

Type: string
/properties/signed_in_test Present when the manifest declares accounts under a public or invited audience and production serves no version, including on a resubmission; absent if the version read fails. One sentence directs the caller to create production test end users after deploying and test their reads or AI chat, with saved turns allowed. Where the credential is not admitted, it gives the credentials the step admits.

Type: string
/properties/hostnames On every recorded submission, one member per environment the application has, production and, where development is on, development, each the hostname list_applications returns for that environment. The application and its realm's sign-in pages respond there once a version serves.

Type: object
Additional properties: false
/properties/hostnames/properties/production Type: string
/properties/hostnames/properties/development Type: string
/properties/custom_domain Present where the manifest declares custom_domain, at the answer's top level, the production environment's row being the one such row. It carries the row's domain, its state, its reason where one exists, its records (the CNAME record, and the TXT record once the provider mints it), passkeys_to_strand, and since. On the submission that removes the declaration it is the detaching row, with passkeys_stranded. Absent where no row exists.

Type: object
/properties/database The production database's connection facts — host, database name, role name, and the setting name. They are present whenever the manifest declares the database kind and the production database is provisioned, which the application's first production deploy or promote does. The production role's password is composed by the promote from custody and never returned.

Type: object
Required fields: ["host","dbName","roleName","connection_setting"]
/properties/database/properties/host Type: string
/properties/database/properties/dbName Type: string
/properties/database/properties/roleName Type: string
/properties/database/properties/connection_setting Required value: APP_DATABASE_URL
/properties/credential The development database role's password, present exactly when this call minted or ALTER-completed the development database and its owner role, ran on the wire surface, and passed no local_run. It is never returned again, and never returned on the MCP surface or beside the local run's line, which state credentials: withheld instead. store_secret with replace: true on the development scope over the wire is the re-mint, and the production role's password is never returned.

Type: string
/properties/detail Type: string
/properties/page $ref: #/shapes/page
/properties/realm The end-user realms, present whenever the manifest declares the accounts kind: realm is the production realm's identifier, the application's own. The development realm, that identifier followed by :development, exists once development is on.

Type: object
Required fields: ["realm","outcome"]
/properties/realm/properties/realm Type: string
/properties/realm/properties/outcome Allowed values: ["created","confirmed"]
/properties/realm/properties/entra_callback Present where the manifest's realm member includes entra: the work-account route's redirect address, the realm reads' callbacks.entra. List it, exactly as returned, as a web redirect URI of the tenant's app registration; both environments use it, and it is never the application's hostname.

Type: string
/properties/schedules Present when the manifest declares the schedule kind: one row per schedule for each environment the application has, or the rows ended by a resubmission without the kind. Each row's starts_with says when its environment starts firing it, and next_due is its next due time once it runs. window_seconds is the schedule kind's window in seconds, and cron_preview the instants the cron yields after the submission. The detail lists each environment that needs a deploy.

Type: array
/properties/schedules/items Type: object
Required fields: ["environment","name","next_due","starts_with"]
/properties/schedules/items/properties/environment Type: string
/properties/schedules/items/properties/name Type: string
/properties/schedules/items/properties/next_due The next due time in UTC where starts_with reads already running; null otherwise, on a row the submission ended too.

Type: ["string","null"]
/properties/schedules/items/properties/starts_with already running where the environment holds a deploy or promote made at or after the row's declaration and is not halted, and the environment's resume where it holds one and is halted. Otherwise the act that makes the declaration effective: the deploy, or the promote for production on two environments. Null on a row the submission ended.

Type: ["string","null"]
Allowed values: ["already running","the next deploy to development","the next deploy to production","the next promote to production","the environment's resume",null]
/properties/schedules/items/properties/window_seconds The seconds a run has before the platform ends it, the schedule kind's window.

Type: integer
/properties/schedules/items/properties/cron_preview Up to three instants the cron yields, in order, the first after the submission's time, as read_schedules computes them, so a tool checks the cron before it deploys. Null on a row the submission ended.

Type: ["array","null"]
Maximum items: 3
/properties/schedules/items/properties/cron_preview/items an instant in UTC (ISO 8601)

Type: string
/properties/development_database The database local runs use, and a deployed development environment where one is turned on, so an application with production alone has it for its local runs. The deployed production copy uses production's own database, the database member, never this one. Its connection facts are present whenever the manifest declares the database kind and the development database is provisioned. Its password is credential, returned once at the mint. The host is the operated server's own name, the one provider value the rule excepts: an implementation detail read from the composed APP_DATABASE_URL alone and copied nowhere else.

Type: object
Required fields: ["host","dbName","roleName","connection_setting"]
/properties/development_database/properties/host Type: string
/properties/development_database/properties/dbName Type: string
/properties/development_database/properties/roleName Type: string
/properties/development_database/properties/connection_setting Required value: APP_DATABASE_URL
/properties/development_database/properties/for local_run appears when the application has only a production environment. This database is for local runs.

Required value: local_run
/properties/connection_limit Present whenever the manifest declares the database kind, on a first submission and a resubmission alike. It is the application's served database-connection-limit quantity, read from its size's row: the connections each process of the application holds open at once, the client pool's maximum, which the pool reads from APP_DATABASE_CONNECTION_LIMIT. The role's CONNECTION LIMIT admits twice it, the second half a deploy's overlap of the previous and the new container, so a pool of this size is refused nothing. The read_status action returns the same number and read_plan_quotas each size's.

Type: integer
/properties/platform_credential The platform credential local runs use, and a deployed development environment where one is turned on, present exactly when this call minted it, at the application's first submission, on the wire surface, to a request with no local_run. Every other answer withholds it and states credentials: withheld; the local run's line re-mints it through store_secret with replace: true on your machine. A resubmission that finds the existing credential returns nothing; store_secret with replace: true on the development scope is the re-mint.

Type: string
/properties/credentials Present exactly when this call minted a credential local runs use: answered on the wire surface for a request with no local_run, where credential and platform_credential hold the values, and withheld otherwise. The MCP surface returns no platform-minted credential value, and a request passing local_run gets its line alone. That line then re-mints them through store_secret with replace: true on your machine and writes the environment file. Absent on a resubmission, which mints nothing.

Type: string
Allowed values: ["answered","withheld"]
/properties/health The health gate's terms for this manifest, present where the manifest declares health and the application is not serverless. At each deploy, promote, and restart the gate requests path, the manifest's health path, with GET, and passes on three consecutive passes_on answers, 200 exactly, within waits_seconds. That bound in seconds is read from the platform's configuration at each answer and written in no schema. The manifest schema's health description states how the route responds while the application starts. Request path on a local run before the first deploy. gated is false where the audience is public or path is under /__account/, which the sign-in check never covers. Otherwise it is true, unless the kind is invited or workforce and a prefix in its session_free_paths covers path, its query cut away as a request's path is. Where it is true, a request to path from outside without a session is refused 401 authentication_required, or sent to sign-in in a browser. The deploy's check reaches the compute directly, so it still passes.

Type: object
Required fields: ["path","passes_on","waits_seconds","gated"]
/properties/health/properties/path Type: string
Pattern: ^/[^\s]*$
/properties/health/properties/passes_on Required value: 200
/properties/health/properties/waits_seconds Type: integer
Minimum: 1
/properties/health/properties/gated Whether the audience's sign-in check covers path for a request from outside the platform: true where such a request without a session is refused. It is not the deploy's health check, read_status's health_gate step, which calls path from inside the platform and is never refused by sign-in.

Type: boolean
/properties/provisioning The local run's setup, its for always local_run. Where your request passed local_run and code_challenge: command, the line turnzero provision --application <id> --claim; command_windows, the same line for Windows; command_npx and command_npx_windows, the same line through npx, which a tool runs first; and expires_at, its grant's expiry. The line carries no credential, and command_version and install_command give the command version that runs it and the install line. Run one once, as given, in the application's folder on the computer that printed the challenge. It re-mints the platform credential, and the database credential where the manifest declares the database, and writes the environment file, .env, which the turnzero command leaves out of every folder it zips for a deploy. Where development is deployed or a deploy of it is in flight, after says the line revokes the credentials that copy holds. It also says that the line's last re-mint restarts that copy, or, where a deploy of it is still in flight, that the re-mint's answer points to restart_application. Over the wire next sits beside the line and says where the withheld values are. Otherwise, and where local_run came without code_challenge, next alone, one sentence giving the bare turnzero provision line, and no grant is minted. Absent over the wire without local_run, and where the line could not be prepared, which detail then says. Off the wire without local_run, absent too where the manifest declares no package, no upstream, and no service other than a schedule or a custom domain, and no development database and no upstream exist for the application.

Type: object
Required fields: ["for"]
/properties/provisioning/properties/for Required value: local_run
/properties/provisioning/properties/next On a call with no local_run, or with it and no code_challenge, the sentence giving the bare provision line: nothing was provisioned and no grant was minted. Where the manifest declares a database, it adds the Database package's test double and the no-shell way of Add a database's step 5, by the application's environment count. Over the wire beside the line, where the withheld values are.

Type: string
/properties/provisioning/properties/command Type: string
/properties/provisioning/properties/command_windows Type: string
/properties/provisioning/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. It is present exactly where command is. 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 give the person the line to run on their computer. 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.

Type: string
/properties/provisioning/properties/command_npx_windows Type: string
/properties/provisioning/properties/expires_at Type: string
/properties/provisioning/properties/command_version The turnzero command version from which the command accepts --claim, the version command needs; an older command refuses the line as an unknown option before sending anything.

Type: string
/properties/provisioning/properties/install_command This estate's install line, npm install -g turnzero, with the estate's tag after @ off production, which installs a version that runs command.

Type: string
/properties/provisioning/properties/after Type: string
/properties/issue_tracking The issue-tracking spaces the application's calls reach, one entry per space, present whenever the manifest declares the issue_tracking kind.

Type: array
/properties/issue_tracking/items Type: object
Required fields: ["space","scope","environments","outcome","level"]
/properties/issue_tracking/items/properties/space The space's identifier, a lower-case UUID the platform derives.

Type: string
/properties/issue_tracking/items/properties/scope application for its own space, account for a bound space of the account, or the environment's name for a space per environment.

Allowed values: ["application","account","development","production"]
/properties/issue_tracking/items/properties/environments The environments whose calls reach the space.

Type: array
/properties/issue_tracking/items/properties/environments/items Allowed values: ["development","production"]
/properties/issue_tracking/items/properties/outcome created where this submission created the space, confirmed where it already existed, and bound for a space of the account.

Allowed values: ["created","confirmed","bound"]
/properties/issue_tracking/items/properties/level The calls the gateway admits: report files and reads, contribute adds the working calls, and owner, a space per environment's, every call.

Allowed values: ["report","contribute","owner"]
/properties/issue_tracking/items/properties/note Why no release line was declared: present only where a space of the account's own already held its 50 release lines.

Type: string
/properties/settings Present when the manifest's settings member binds a setting: one row per binding and environment the application has, a plain setting having none, giving the stored secret and whether it is stored at that environment's scope of the application. A deploy or promote of an environment whose row reads stored: false is refused setting_secret_missing until store_secret stores the name there.

Type: array
/properties/settings/items Type: object
Required fields: ["setting","secret","environment","stored"]
/properties/settings/items/properties/setting The setting name the process reads.

Type: string
/properties/settings/items/properties/secret The stored name whose value the setting holds.

Type: string
/properties/settings/items/properties/environment The environment, development or production.

Type: string
/properties/settings/items/properties/stored True where the name is stored at that environment's scope of the application.

Type: boolean
/properties/upstreams Present when the manifest's upstreams member lists an upstream: one row per upstream and environment, giving the upstream's stored key and whether that environment reads a value under it, at its own scope of the application or at the account scope. For calls from a deployed copy, the gateway refuses an upstream with credential_not_in_custody when the copy's environment row reads stored: false, until store_secret stores the key.

Type: array
/properties/upstreams/items Type: object
Required fields: ["upstream","credential_name","environment","stored"]
/properties/upstreams/items/properties/upstream The upstream's name.

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

Type: string
/properties/upstreams/items/properties/environment The environment, development or production.

Type: string
/properties/upstreams/items/properties/stored True where the environment reads a stored value under the name.

Type: boolean
/properties/upstreams/items/properties/for local_run appears on the development row when the application has only a production environment. This row reports key custody for local runs.

Required value: local_run
/properties/egress_keys_ended Present where an upstreams entry left an existing upstream with no key setting: the count of the upstream egress keys the submission ended, in both environments, zero where no deployed copy held one. A copy that held one has no working key until the entry's sdk_settings.key is restored, the manifest submitted again, and its environment's next deploy, promote, or restart_application. Where the count is above zero, the detail lists those environments and the route back: restore sdk_settings.key, submit again, then restart_application each.

Type: integer
Minimum: 0
/properties/egress_notice Present where an entry of the manifest's egress member admits the host of one of the application's declared upstreams. It lists each such host with its upstreams, at most twenty hosts and then a count of the rest. It says a direct call to the host carries no key the gateway applies, and refuses nothing.

Type: string
/properties/storage_areas The storage areas the manifest's object_storage entry lists, each with its outcome and its file address, present where the entry carries areas. An area listed here needs no mintArea at the server's start; where the code mints it too, the mint passes the same declarations, or every start fails declarations_differ.

Type: array
/properties/storage_areas/items Type: object
Required fields: ["area","outcome","address"]
/properties/storage_areas/items/properties/area Type: object
/properties/storage_areas/items/properties/area/properties/application Type: ["string","null"]
/properties/storage_areas/items/properties/outcome Type: string
Allowed values: ["created","unchanged"]
/properties/storage_areas/items/properties/address The area's whole file address, with <name> in place of a file's name.

Type: string
/properties/next Present where a name a setting, an upstream, a sign-in method, or a push provider uses is stored at no scope its environment reads. One entry per name and environment the detail's not-stored line counts, in its order, each the exact store_secret call to make. On an application with no development environment, an upstream key's development step serves local runs alone and has no entry. A key an upstream uses may be stored at the account scope instead. Absent where nothing is owed.

Type: array
/properties/next/items Type: object
Required fields: ["action","arguments"]
Additional properties: false
/properties/next/items/properties/action Required value: store_secret
/properties/next/items/properties/arguments Type: object
Required fields: ["name","application","environment"]
Additional properties: false
/properties/next/items/properties/arguments/properties/name Type: string
/properties/next/items/properties/arguments/properties/application Type: string
/properties/next/items/properties/arguments/properties/environment Type: string
Pattern: ^(development|production)$

Complete payload contract #

{
  "request": {
    "type": "object",
    "required": [
      "application",
      "manifest"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "Your account's application `id` from `list_applications`, not its name or label."
      },
      "manifest": {
        "type": "object",
        "description": "Pass the whole manifest as a JSON object. Keep `application` if scaffold or deploy wrote it. That member is optional. The platform checks only that member's form. The call's application ID sets the target. See `manifest_schema`. A refusal gives the failing path. The platform reads no local files."
      },
      "local_run": {
        "type": "boolean",
        "const": true,
        "description": "Optional, on any submission, the first included. Beside `code_challenge`, `provisioning` holds the local run's line, which re-mints the local run's credentials when run and revokes those they replace; the answer withholds `credential` and `platform_credential`. Refused on a browser session's call."
      },
      "code_challenge": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_-]{43}$",
        "description": "Beside `local_run` alone: the S256 challenge of a verifier the turnzero command keeps. The line's grant then re-mints only with that verifier, so a copy of the line re-mints nothing. Without it, `local_run` mints no grant and returns no line."
      }
    }
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "application",
      "outcome"
    ],
    "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"
      },
      "outcome": {
        "type": "string",
        "pattern": "^recorded$"
      },
      "changed": {
        "type": "boolean",
        "description": "On every recorded submission: true where the manifest it recorded differs from the one recorded before it, or none was, and false where it repeats the recorded manifest. A repeat still completes what an earlier submission left undone."
      },
      "deploy_reads": {
        "type": "string",
        "description": "On every recorded submission: one sentence saying a deploy runs under the manifest this submission recorded and reads the zip's `manifest.json` only to compare it, returning `manifest_notice` where the two differ (MAN-17)."
      },
      "cost_reads": {
        "type": "string",
        "description": "Present where `changed` is true: one sentence pointing to `skill:cost-estimate` and `read_rate_card` for the caller's estimate before deploying, with no figure or fit verdict (PRC-L0-16)."
      },
      "signed_in_test": {
        "type": "string",
        "description": "Present when the manifest declares `accounts` under a `public` or `invited` audience and production serves no version, including on a resubmission; absent if the version read fails. One sentence directs the caller to create production test end users after deploying and test their reads or AI chat, with saved turns allowed. Where the credential is not admitted, it gives the credentials the step admits (ACS-L0-21)."
      },
      "hostnames": {
        "type": "object",
        "description": "On every recorded submission, one member per environment the application has, `production` and, where development is on, `development`, each the hostname `list_applications` returns for that environment. The application and its realm's sign-in pages respond there once a version serves (MAPI-02; PLD-L0-40).",
        "properties": {
          "production": {
            "type": "string"
          },
          "development": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "custom_domain": {
        "type": "object",
        "description": "Present where the manifest declares `custom_domain`, at the answer's top level, the production environment's row being the one such row (SVC-L0-25). It carries the row's `domain`, its `state`, its `reason` where one exists, its `records` (the CNAME record, and the TXT record once the provider mints it), `passkeys_to_strand`, and `since`. On the submission that removes the declaration it is the detaching row, with `passkeys_stranded`. Absent where no row exists."
      },
      "database": {
        "type": "object",
        "description": "The production database's connection facts — host, database name, role name, and the setting name. They are present whenever the manifest declares the database kind and the production database is provisioned, which the application's first production deploy or promote does (DBS-L0-01; PLD-L0-44). The production role's password is composed by the promote from custody and never returned (DBS-L0-02).",
        "required": [
          "host",
          "dbName",
          "roleName",
          "connection_setting"
        ],
        "properties": {
          "host": {
            "type": "string"
          },
          "dbName": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "connection_setting": {
            "const": "APP_DATABASE_URL"
          }
        }
      },
      "credential": {
        "type": "string",
        "description": "The development database role's password, present exactly when this call minted or ALTER-completed the development database and its owner role, ran on the wire surface, and passed no `local_run`. It is never returned again, and never returned on the MCP surface or beside the local run's line, which state `credentials: withheld` instead. `store_secret` with `replace: true` on the development scope over the wire is the re-mint, and the production role's password is never returned (DBS-L0-02; SEC-L0-07)."
      },
      "detail": {
        "type": "string"
      },
      "page": {
        "$ref": "#/shapes/page"
      },
      "realm": {
        "type": "object",
        "description": "The end-user realms, present whenever the manifest declares the accounts kind: `realm` is the production realm's identifier, the application's own. The development realm, that identifier followed by `:development`, exists once development is on.",
        "required": [
          "realm",
          "outcome"
        ],
        "properties": {
          "realm": {
            "type": "string"
          },
          "outcome": {
            "enum": [
              "created",
              "confirmed"
            ]
          },
          "entra_callback": {
            "type": "string",
            "description": "Present where the manifest's realm member includes `entra`: the work-account route's redirect address, the realm reads' `callbacks.entra`. List it, exactly as returned, as a web redirect URI of the tenant's app registration; both environments use it, and it is never the application's hostname."
          }
        }
      },
      "schedules": {
        "type": "array",
        "description": "Present when the manifest declares the schedule kind: one row per schedule for each environment the application has, or the rows ended by a resubmission without the kind (PLD-L0-40). Each row's `starts_with` says when its environment starts firing it, and `next_due` is its next due time once it runs (SCH-L0-07). `window_seconds` is the schedule kind's window in seconds (SCH-L0-05), and `cron_preview` the instants the cron yields after the submission (SCH-L0-07). The detail lists each environment that needs a deploy (SCH-L0-01).",
        "items": {
          "type": "object",
          "required": [
            "environment",
            "name",
            "next_due",
            "starts_with"
          ],
          "properties": {
            "environment": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "next_due": {
              "type": [
                "string",
                "null"
              ],
              "description": "The next due time in UTC where `starts_with` reads `already running`; null otherwise, on a row the submission ended too."
            },
            "starts_with": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "already running",
                "the next deploy to development",
                "the next deploy to production",
                "the next promote to production",
                "the environment's resume",
                null
              ],
              "description": "`already running` where the environment holds a deploy or promote made at or after the row's declaration and is not halted, and `the environment's resume` where it holds one and is halted. Otherwise the act that makes the declaration effective: the deploy, or the promote for production on two environments. Null on a row the submission ended (SCH-L0-07)."
            },
            "window_seconds": {
              "type": "integer",
              "description": "The seconds a run has before the platform ends it, the schedule kind's window (SCH-L0-05)."
            },
            "cron_preview": {
              "type": [
                "array",
                "null"
              ],
              "maxItems": 3,
              "items": {
                "type": "string",
                "description": "an instant in UTC (ISO 8601)"
              },
              "description": "Up to three instants the cron yields, in order, the first after the submission's time, as `read_schedules` computes them, so a tool checks the cron before it deploys. Null on a row the submission ended (SCH-L0-07)."
            }
          }
        }
      },
      "development_database": {
        "type": "object",
        "description": "The database local runs use, and a deployed development environment where one is turned on, so an application with production alone has it for its local runs. The deployed production copy uses production's own database, the `database` member, never this one. Its connection facts are present whenever the manifest declares the database kind and the development database is provisioned (DBS-L0-01). Its password is `credential`, returned once at the mint (DBS-L0-02). The `host` is the operated server's own name, the one provider value the rule excepts: an implementation detail read from the composed `APP_DATABASE_URL` alone and copied nowhere else (SVC-L0-02).",
        "required": [
          "host",
          "dbName",
          "roleName",
          "connection_setting"
        ],
        "properties": {
          "host": {
            "type": "string"
          },
          "dbName": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "connection_setting": {
            "const": "APP_DATABASE_URL"
          },
          "for": {
            "const": "local_run",
            "description": "`local_run` appears when the application has only a production environment. This database is for local runs."
          }
        }
      },
      "connection_limit": {
        "type": "integer",
        "description": "Present whenever the manifest declares the database kind, on a first submission and a resubmission alike. It is the application's served `database-connection-limit` quantity, read from its size's row: the connections each process of the application holds open at once, the client pool's maximum, which the pool reads from `APP_DATABASE_CONNECTION_LIMIT`. The role's CONNECTION LIMIT admits twice it, the second half a deploy's overlap of the previous and the new container, so a pool of this size is refused nothing (DBS-L0-04). The `read_status` action returns the same number and `read_plan_quotas` each size's."
      },
      "platform_credential": {
        "type": "string",
        "description": "The platform credential local runs use, and a deployed development environment where one is turned on, present exactly when this call minted it, at the application's first submission, on the wire surface, to a request with no `local_run`. Every other answer withholds it and states `credentials: withheld`; the local run's line re-mints it through `store_secret` with `replace: true` on your machine. A resubmission that finds the existing credential returns nothing; `store_secret` with `replace: true` on the development scope is the re-mint (SEC-L0-07; PLD-L0-39)."
      },
      "credentials": {
        "type": "string",
        "enum": [
          "answered",
          "withheld"
        ],
        "description": "Present exactly when this call minted a credential local runs use: `answered` on the wire surface for a request with no `local_run`, where `credential` and `platform_credential` hold the values, and `withheld` otherwise. The MCP surface returns no platform-minted credential value, and a request passing `local_run` gets its line alone (SEC-L0-07). That line then re-mints them through `store_secret` with `replace: true` on your machine and writes the environment file. Absent on a resubmission, which mints nothing."
      },
      "health": {
        "type": "object",
        "description": "The health gate's terms for this manifest, present where the manifest declares `health` and the application is not serverless (MAN-05; FNS-L0-04). At each deploy, promote, and restart the gate requests `path`, the manifest's `health` path, with GET, and passes on three consecutive `passes_on` answers, 200 exactly, within `waits_seconds`. That bound in seconds is read from the platform's configuration at each answer and written in no schema. The manifest schema's `health` description states how the route responds while the application starts. Request `path` on a local run before the first deploy. `gated` is false where the audience is `public` or `path` is under `/__account/`, which the sign-in check never covers. Otherwise it is true, unless the kind is `invited` or `workforce` and a prefix in its `session_free_paths` covers `path`, its query cut away as a request's path is. Where it is true, a request to `path` from outside without a session is refused 401 `authentication_required`, or sent to sign-in in a browser. The deploy's check reaches the compute directly, so it still passes.",
        "required": [
          "path",
          "passes_on",
          "waits_seconds",
          "gated"
        ],
        "properties": {
          "path": {
            "type": "string",
            "pattern": "^/[^\\s]*$"
          },
          "passes_on": {
            "const": 200
          },
          "waits_seconds": {
            "type": "integer",
            "minimum": 1
          },
          "gated": {
            "type": "boolean",
            "description": "Whether the audience's sign-in check covers `path` for a request from outside the platform: true where such a request without a session is refused. It is not the deploy's health check, `read_status`'s `health_gate` step, which calls `path` from inside the platform and is never refused by sign-in."
          }
        }
      },
      "provisioning": {
        "type": "object",
        "description": "The local run's setup, its `for` always `local_run` (SEC-L0-07; DBS-L0-02). Where your request passed `local_run` and `code_challenge`: `command`, the line `turnzero provision --application <id> --claim`; `command_windows`, the same line for Windows; `command_npx` and `command_npx_windows`, the same line through npx, which a tool runs first; and `expires_at`, its grant's expiry (PLD-L0-94). The line carries no credential, and `command_version` and `install_command` give the command version that runs it and the install line (PLD-L0-109). Run one once, as given, in the application's folder on the computer that printed the challenge. It re-mints the platform credential, and the database credential where the manifest declares the database, and writes the environment file, `.env`, which the turnzero command leaves out of every folder it zips for a deploy (PLD-L0-94). Where development is deployed or a deploy of it is in flight, `after` says the line revokes the credentials that copy holds. It also says that the line's last re-mint restarts that copy, or, where a deploy of it is still in flight, that the re-mint's answer points to `restart_application`. Over the wire `next` sits beside the line and says where the withheld values are. Otherwise, and where `local_run` came without `code_challenge`, `next` alone, one sentence giving the bare `turnzero provision` line, and no grant is minted. Absent over the wire without `local_run`, and where the line could not be prepared, which `detail` then says. Off the wire without `local_run`, absent too where the manifest declares no package, no upstream, and no service other than a schedule or a custom domain, and no development database and no upstream exist for the application.",
        "required": [
          "for"
        ],
        "properties": {
          "for": {
            "const": "local_run"
          },
          "next": {
            "type": "string",
            "description": "On a call with no `local_run`, or with it and no `code_challenge`, the sentence giving the bare provision line: nothing was provisioned and no grant was minted. Where the manifest declares a database, it adds the Database package's test double and the no-shell way of Add a database's step 5, by the application's environment count (SEC-L0-07). Over the wire beside the line, where the withheld values are."
          },
          "command": {
            "type": "string"
          },
          "command_windows": {
            "type": "string"
          },
          "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. It is present exactly where `command` is. 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 give the person the line to run on their computer. 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)."
          },
          "command_npx_windows": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "command_version": {
            "type": "string",
            "description": "The turnzero command version from which the command accepts `--claim`, the version `command` needs; an older command refuses the line as an unknown option before sending anything (PLD-L0-109)."
          },
          "install_command": {
            "type": "string",
            "description": "This estate's install line, `npm install -g turnzero`, with the estate's tag after `@` off production, which installs a version that runs `command` (PLD-L0-94)."
          },
          "after": {
            "type": "string"
          }
        }
      },
      "issue_tracking": {
        "type": "array",
        "description": "The issue-tracking spaces the application's calls reach, one entry per space, present whenever the manifest declares the issue_tracking kind (ITS-L0-01).",
        "items": {
          "type": "object",
          "required": [
            "space",
            "scope",
            "environments",
            "outcome",
            "level"
          ],
          "properties": {
            "space": {
              "type": "string",
              "description": "The space's identifier, a lower-case UUID the platform derives."
            },
            "scope": {
              "enum": [
                "application",
                "account",
                "development",
                "production"
              ],
              "description": "`application` for its own space, `account` for a bound space of the account, or the environment's name for a space per environment."
            },
            "environments": {
              "type": "array",
              "items": {
                "enum": [
                  "development",
                  "production"
                ]
              },
              "description": "The environments whose calls reach the space."
            },
            "outcome": {
              "enum": [
                "created",
                "confirmed",
                "bound"
              ],
              "description": "`created` where this submission created the space, `confirmed` where it already existed, and `bound` for a space of the account."
            },
            "level": {
              "enum": [
                "report",
                "contribute",
                "owner"
              ],
              "description": "The calls the gateway admits: `report` files and reads, `contribute` adds the working calls, and `owner`, a space per environment's, every call."
            },
            "note": {
              "type": "string",
              "description": "Why no release line was declared: present only where a space of the account's own already held its 50 release lines."
            }
          }
        }
      },
      "settings": {
        "type": "array",
        "description": "Present when the manifest's `settings` member binds a setting: one row per binding and environment the application has, a plain setting having none, giving the stored secret and whether it is `stored` at that environment's scope of the application (MAN-14). A deploy or promote of an environment whose row reads `stored: false` is refused `setting_secret_missing` until `store_secret` stores the name there.",
        "items": {
          "type": "object",
          "required": [
            "setting",
            "secret",
            "environment",
            "stored"
          ],
          "properties": {
            "setting": {
              "type": "string",
              "description": "The setting name the process reads."
            },
            "secret": {
              "type": "string",
              "description": "The stored name whose value the setting holds."
            },
            "environment": {
              "type": "string",
              "description": "The environment, `development` or `production`."
            },
            "stored": {
              "type": "boolean",
              "description": "True where the name is stored at that environment's scope of the application."
            }
          }
        }
      },
      "upstreams": {
        "type": "array",
        "description": "Present when the manifest's `upstreams` member lists an upstream: one row per upstream and environment, giving the upstream's stored key and whether that environment reads a value under it, at its own scope of the application or at the account scope (EGW-L0-02). For calls from a deployed copy, the gateway refuses an upstream with `credential_not_in_custody` when the copy's environment row reads `stored: false`, until `store_secret` stores the key.",
        "items": {
          "type": "object",
          "required": [
            "upstream",
            "credential_name",
            "environment",
            "stored"
          ],
          "properties": {
            "upstream": {
              "type": "string",
              "description": "The upstream's name."
            },
            "credential_name": {
              "type": "string",
              "description": "The stored name of the upstream's key."
            },
            "environment": {
              "type": "string",
              "description": "The environment, `development` or `production`."
            },
            "stored": {
              "type": "boolean",
              "description": "True where the environment reads a stored value under the name."
            },
            "for": {
              "const": "local_run",
              "description": "`local_run` appears on the `development` row when the application has only a production environment. This row reports key custody for local runs."
            }
          }
        }
      },
      "egress_keys_ended": {
        "type": "integer",
        "minimum": 0,
        "description": "Present where an `upstreams` entry left an existing upstream with no key setting: the count of the upstream egress keys the submission ended, in both environments, zero where no deployed copy held one. A copy that held one has no working key until the entry's `sdk_settings.key` is restored, the manifest submitted again, and its environment's next deploy, promote, or `restart_application`. Where the count is above zero, the detail lists those environments and the route back: restore `sdk_settings.key`, submit again, then `restart_application` each."
      },
      "egress_notice": {
        "type": "string",
        "description": "Present where an entry of the manifest's `egress` member admits the host of one of the application's declared upstreams (EGW-L0-02). It lists each such host with its upstreams, at most twenty hosts and then a count of the rest. It says a direct call to the host carries no key the gateway applies, and refuses nothing."
      },
      "storage_areas": {
        "type": "array",
        "description": "The storage areas the manifest's object_storage entry lists, each with its outcome and its file address, present where the entry carries areas (OST-L0-01; MAN-03). An area listed here needs no `mintArea` at the server's start; where the code mints it too, the mint passes the same declarations, or every start fails `declarations_differ`.",
        "items": {
          "type": "object",
          "required": [
            "area",
            "outcome",
            "address"
          ],
          "properties": {
            "area": {
              "type": "object",
              "properties": {
                "application": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            "outcome": {
              "type": "string",
              "enum": [
                "created",
                "unchanged"
              ]
            },
            "address": {
              "type": "string",
              "description": "The area's whole file address, with `<name>` in place of a file's name (OST-L0-02)."
            }
          }
        }
      },
      "next": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "action",
            "arguments"
          ],
          "properties": {
            "action": {
              "const": "store_secret"
            },
            "arguments": {
              "type": "object",
              "required": [
                "name",
                "application",
                "environment"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "application": {
                  "type": "string"
                },
                "environment": {
                  "type": "string",
                  "pattern": "^(development|production)$"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "description": "Present where a name a setting, an upstream, a sign-in method, or a push provider uses is stored at no scope its environment reads. One entry per name and environment the detail's not-stored line counts, in its order, each the exact `store_secret` call to make. On an application with no development environment, an upstream key's development step serves local runs alone and has no entry. A key an upstream uses may be stored at the account scope instead. Absent where nothing is owed (MAN-16)."
      }
    }
  }
}

Shared contracts #