iii-cloud
v0.1.0Take any project to iii cloud from your harness — sign in, check the cloud plan and run the app here the way the cloud runs it, keep secret values out of the agent's context, merge and deploy pinned to the plan you saw, and follow the deploy to Ready.
Install
iii call compose::add worker=iii-cloud@0.1.0Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.
Full markdown
/registry/workers/iii-cloud.md?version=0.1.0. Paste it into an LLM prompt or pipe it through curl from a worker.Install
iii call compose::add worker=iii-cloud@0.1.0Configuration
- auto_fix: true
cloud_url: https://cloud.iii.dev
data_dir: data/iii-cloud
iii_bin: iii
merge_method: squash
postgres_image: pgvector/pgvector:pg17
run_timeout_s: 900Dependencies
Readme
iii-cloud
Take any project to iii cloud from your harness. The worker signs in to iii
cloud, shows the cloud's plan for a commit, runs your app on this machine the
way the cloud runs it, and keeps secret values out of your agent's context.
When you are ready, it merges the pull request (production) or, for any other
environment, sends the checked commit to the environment's own branch (an
assisted deploy), and deploys, pinned to the plan you saw, and follows the deploy to Ready. Your agent knows the path through the
cloud-ready profile and the iii-cloud skill. The worker adds the
iii cloud page to the console.
Install
Add the worker to your harness, not to the project you are taking to the cloud.
iii call compose::add worker=iii-cloudiii call compose::add resolves the worker and its dependencies, writes exact
declarations to worker-compose.yaml, and reconciles the Compose project.
The worker needs these on the machine:
git.- The GitHub CLI, logged in with
gh auth login. The worker uses it to read and merge your pull request with your own login. - Docker, only when your app has a database resource. The run here starts a local Postgres in it. Without a database resource, no Docker is needed.
- The same iii version as the cloud's engine (0.27.0 today). The run here
uses it, and 0.26 refuses the
cloud:block.iii --versionshows yours.
Quickstart
Ask your agent: "Put this project on iii cloud." Pick the Cloud ready profile
if you want it from the start. It plans the steps, does them, and calls you for
two things: approving a device code and authorizing GitHub.
To drive it yourself, use the functions in order:
# 1. Sign in. Type the code it returns at <cloud_url>/device.
iii call iii-cloud::connect method=browser
# 2. Find the project and its environment from the folder's git remote.
iii call iii-cloud::project::resolve path=/path/to/your/project
# 3. Select the environment and create a worktree to work in.
iii call iii-cloud::project::use path=/path/to/your/project \
environment_id=<environment id> mode=worktree
# 4. Check: the cloud plan plus the fast checks here. Add run=true to run the app.
iii call iii-cloud::check run=trueThe answer of check lists each problem with its file, line and who fixes it,
and a ready flag. When it is ready, open a pull request (production) and press "Merge and
deploy" on the iii cloud page. Any other environment gets an assisted deploy:
press "Deploy <commit> to <env>".
manifest=<path> checks another worker-compose*.yaml of the repository
instead of the environment's; iii cloud changes nothing. Deploying a ready
check of that file is what switches the environment to it: the deploy sets
the environment's compose file first, and puts the old one back if the deploy
fails before a deployment exists.
To sign in with an API key instead, save the key in the secrets vault from the page, then pass only its name:
iii call iii-cloud::connect method=api_key secret=<secret name>The worker finds the key's team and environment through the cloud. Older
clouds cannot do that: pass team_id and environment_id too. A key can check
and deploy one environment. It cannot import a project or change settings.
Configuration
The entry is iii-cloud. Changes apply without a restart.
cloud_url: https://cloud.iii.dev # the console; calls go to its functions at <cloud_url>/_iii/ws (<cloud_url>/api/v1 while that socket is down). A change signs you out
iii_bin: iii # the iii the run here uses; it must match the cloud's engine
merge_method: squash # merge, squash or rebase: the gh pr merge flag
postgres_image: pgvector/pgvector:pg17 # the local Postgres for a database resource
run_timeout_s: 900 # the whole run here, from install to healthcheck
data_dir: data/iii-cloud # records and run logs, relative to the compose directory
auto_fix: true # a check the person starts hands the agent the problems that are its to fixEvent functions
| Function | Args | Called when | Event (what observers receive) |
|---|---|---|---|
iii-cloud::on-change |
none; filter on input.kind, input.id, input.terminal |
After every change to a record | { "kind": "connection" | "project" | "check" | "run" | "secret" | "deploy", "id", "terminal", "summary", "record" } |
terminal is true when a run or deploy finished, a secret was answered, or a
sign-in settled. Wake an agent only on the end of something:
iii call harness::observe function_id=iii-cloud::on-change \
filters='{"input.kind":{"$eq":"deploy"},"input.terminal":{"$eq":true}}'The page observes the same function to stay live. Filter a deploy on its
input.id. A deploy replaced by the worker's own confirmation is not the end, one replaced by someone else's deployment ends with replaced_by, and needs_action means the
cloud waits for a confirmation.
A failed call returns a code, such as WORKTREE_FAILED, IDEMPOTENCY_KEY_REUSED,
WORKER_RESTARTED, DEVICE_CODE_EXPIRED or ACCOUNT_BLOCKED. The message
says what to do. When secret::provide answers local: "skipped", your .env
is tracked by git and the worker did not write it.
What the run here does not cover
The run here repeats the cloud's steps in the cloud's order: the frozen install, the build command, the release command, the compose file, every worker, the routes and the healthcheck. It does not cover:
- The cloud's build container.
- Production's secret values.
- Its machine size.
- Real traffic.
- Queue, state and storage resources. They run with local defaults here.
The run here moves every engine, http and ade port to a free one. It never uses 3111, 3112, 3113 or 49134, so your harness keeps running.
For these, the worker follows the deploy after the merge. When it fails, the evidence goes back to your agent.
Secret values never enter your agent's context. You type them on the page. They
go to iii cloud and to the project's local .env, and the agent only sees that
they were saved.
The skill and the profile ship in this worker: see the
skill
and the
cloud-ready profile.
Skills
API reference (JSON)
{
"functions": [
{
"description": "What iii cloud says now that needs a look, newest first: a deployment that failed, one waiting for the person's approval, an engine restarting or down, a worker that keeps restarting (a crash loop). They come from each watched environment's own event stream, so deployments started elsewhere count too. Each is {id, environment_id, cloud_project_id, project, environment, kind (failed, needs_action, engine_restarting, engine_down, crashloop), deployment {id, number}, title, detail, at}. It reads only; the page draws them over every screen and the person dismisses them there. Every change also reaches iii-cloud::on-change as kind alerts.",
"metadata": {},
"name": "iii-cloud::alerts",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::alerts` input: none.",
"title": "AlertsRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Alert": {
"description": "What iii cloud says while the person works elsewhere: one per event that needs a look.",
"properties": {
"at": {
"description": "When it began (RFC 3339).",
"type": "string"
},
"cloud_project_id": {
"default": null,
"description": "The cloud project's id, to open it when it is not the selected one.",
"type": [
"string",
"null"
]
},
"deployment": {
"anyOf": [
{
"$ref": "#/definitions/AlertDeployment"
},
{
"type": "null"
}
],
"default": null
},
"detail": {
"type": "string"
},
"environment": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"id": {
"description": "The event's: `failed:<deployment>`, `needs_action:<deployment>` or `engine:<environment>:<since>`. A dismissed id does not come back.",
"type": "string"
},
"kind": {
"$ref": "#/definitions/AlertKind"
},
"project": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"at",
"detail",
"environment",
"environment_id",
"id",
"kind",
"project",
"title"
],
"type": "object"
},
"AlertDeployment": {
"properties": {
"id": {
"type": "string"
},
"number": {
"description": "The project's own count, not the environment's.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"id",
"number"
],
"type": "object"
},
"AlertKind": {
"oneOf": [
{
"enum": [
"engine_restarting",
"engine_down"
],
"type": "string"
},
{
"description": "A deployment failed.",
"enum": [
"failed"
],
"type": "string"
},
{
"description": "A deployment waits for the person's approval.",
"enum": [
"needs_action"
],
"type": "string"
},
{
"description": "A worker of the environment keeps restarting.",
"enum": [
"crashloop"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::alerts` output, and the record of an `alerts` change event: newest first.",
"properties": {
"alerts": {
"items": {
"$ref": "#/definitions/Alert"
},
"type": "array"
}
},
"required": [
"alerts"
],
"title": "Alerts",
"type": "object"
}
},
{
"description": "The page's own: dismiss one alert by id, or all with all: true. A dismissed alert does not come back for the same event. Agents never call it.",
"metadata": {},
"name": "iii-cloud::alerts::dismiss",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::alerts::dismiss` input: one alert by id, or `all: true`.",
"properties": {
"all": {
"default": null,
"type": [
"boolean",
"null"
]
},
"id": {
"default": null,
"type": [
"string",
"null"
]
}
},
"title": "AlertDismiss",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"dismissed": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"dismissed"
],
"title": "AlertsDismissed",
"type": "object"
}
},
{
"description": "Read any iii cloud route as the person (GET only); temporary credentials are refused. A change is PERSON_ONLY: the person makes it on the page. Every path starts with /teams/{team_id}: an environment is /teams/{team}/environments/{env} (+ /deployments, /deployments/{id}, /health, /machines, /logs, /logs/histogram, /plan, /resources, /domains, /variables, /commits), a project /teams/{team}/projects/{project} (+ /environments, /activity). Filters go in `query`, never `?` in `path`. The ids are in iii-cloud::status (project.team.id, project.environments, recent_projects). Skill iii-cloud, Reading what runs: what each answers.",
"metadata": {},
"name": "iii-cloud::api",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"HttpMethod": {
"enum": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"type": "string"
}
},
"description": "`iii-cloud::api` input.",
"properties": {
"body": {
"default": null
},
"idempotency_key": {
"default": null,
"type": [
"string",
"null"
]
},
"if_match": {
"default": null,
"type": [
"string",
"null"
]
},
"method": {
"$ref": "#/definitions/HttpMethod"
},
"path": {
"description": "Relative to `/api/v1`; starts with `/`, no `..`, `//` or scheme.",
"type": "string"
},
"query": {
"default": null
}
},
"required": [
"method",
"path"
],
"title": "ApiRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::api` output: the cloud's answer, passed through.",
"properties": {
"body": true,
"status": {
"format": "uint16",
"minimum": 0,
"type": "integer"
}
},
"required": [
"body",
"status"
],
"title": "ApiResponse",
"type": "object"
}
},
{
"description": "The page's own: change an iii cloud route as the person (POST, PUT, PATCH, DELETE); secret values are refused. Agents never call it.",
"metadata": {},
"name": "iii-cloud::api::write",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"HttpMethod": {
"enum": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"type": "string"
}
},
"description": "`iii-cloud::api` input.",
"properties": {
"body": {
"default": null
},
"idempotency_key": {
"default": null,
"type": [
"string",
"null"
]
},
"if_match": {
"default": null,
"type": [
"string",
"null"
]
},
"method": {
"$ref": "#/definitions/HttpMethod"
},
"path": {
"description": "Relative to `/api/v1`; starts with `/`, no `..`, `//` or scheme.",
"type": "string"
},
"query": {
"default": null
}
},
"required": [
"method",
"path"
],
"title": "ApiRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::api` output: the cloud's answer, passed through.",
"properties": {
"body": true,
"status": {
"format": "uint16",
"minimum": 0,
"type": "integer"
}
},
"required": [
"body",
"status"
],
"title": "ApiResponse",
"type": "object"
}
},
{
"description": "The cloud plan for a commit plus the fast checks here; with run: true, also the run here. Without manifest it checks the file the work is on: the newest check's of this environment if it named one and the environment's file is unchanged since, else the environment's own. manifest checks another worker-compose*.yaml instead, changing nothing in iii cloud. push: true pushes the workspace's fix branch first, never an environment's branch.",
"metadata": {},
"name": "iii-cloud::check",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::check` input.",
"properties": {
"commit": {
"default": null,
"description": "Default: the workspace's `HEAD`.",
"type": [
"string",
"null"
]
},
"force": {
"default": null,
"description": "With `run`: run again even when a passed run of the same commit, compose file, engine and run environment exists.",
"type": [
"boolean",
"null"
]
},
"from_page": {
"default": false,
"description": "The page's own: a check the person started on the page. When the hand-off's agent waits on a wake, it hears what is left for it. Agents never send it.",
"type": "boolean"
},
"handoff_id": {
"default": null,
"description": "An agent works on its own hand-off: use that one's environment and worktree.",
"type": [
"string",
"null"
]
},
"manifest": {
"default": null,
"description": "Check another `worker-compose*.yaml` of the repository (from its root) instead of the environment's. Nothing changes in iii cloud: the environment switches to it only when the person deploys this check. Default: the hand-off's file, else the environment's.",
"type": [
"string",
"null"
]
},
"push": {
"default": null,
"description": "Push the workspace's fix branch first (`--force-with-lease`), so the cloud can plan its head. `PUSH_REFUSED` for a branch an environment tracks or that is not an `iii-cloud/` fix branch.",
"type": [
"boolean",
"null"
]
},
"run": {
"default": null,
"description": "Also run the app here the way the cloud runs it.",
"type": [
"boolean",
"null"
]
}
},
"title": "CheckRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CommitLine": {
"properties": {
"message": {
"description": "The subject line.",
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"message",
"sha"
],
"type": "object"
},
"Confirmations": {
"properties": {
"overrides": {
"items": {
"$ref": "#/definitions/OverrideConfirmation"
},
"type": "array"
},
"resources": {
"items": {
"$ref": "#/definitions/ResourceConfirmation"
},
"type": "array"
}
},
"required": [
"overrides",
"resources"
],
"type": "object"
},
"Excerpt": {
"properties": {
"lines": {
"items": {
"type": "string"
},
"type": "array"
},
"start_line": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"lines",
"start_line"
],
"type": "object"
},
"HealthResult": {
"properties": {
"path": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"path"
],
"type": "object"
},
"HerePart": {
"properties": {
"accepts_cloud_block": {
"type": "boolean"
},
"iii_version": {
"type": [
"string",
"null"
]
},
"problems": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"accepts_cloud_block",
"problems"
],
"type": "object"
},
"OverrideConfirmation": {
"properties": {
"console": true,
"file": true,
"setting": {
"type": "string"
}
},
"required": [
"console",
"file",
"setting"
],
"type": "object"
},
"Owner": {
"oneOf": [
{
"enum": [
"agent",
"person"
],
"type": "string"
},
{
"description": "Info only: nothing to do.",
"enum": [
"none"
],
"type": "string"
}
]
},
"PlanPart": {
"properties": {
"at_least": {
"description": "The plan stops at its first blocking step: more may follow.",
"type": "boolean"
},
"blocking": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"confirmations": {
"$ref": "#/definitions/Confirmations"
},
"digest": {
"type": [
"string",
"null"
]
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"fingerprint": {
"type": [
"string",
"null"
]
},
"status": {
"$ref": "#/definitions/PlanStatus"
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/PlanSummary"
},
{
"type": "null"
}
],
"default": null,
"description": "What the plan runs: its workers and machine groups. Null without a plan."
},
"warnings": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"web_candidates": true
},
"required": [
"at_least",
"blocking",
"confirmations",
"status",
"warnings"
],
"type": "object"
},
"PlanStatus": {
"enum": [
"clean",
"blocked",
"not_pushed",
"commit_not_planned",
"unavailable"
],
"type": "string"
},
"PlanSummary": {
"properties": {
"groups": {
"description": "The groups' names, in the plan's order.",
"items": {
"type": "string"
},
"type": "array"
},
"workers": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"groups",
"workers"
],
"type": "object"
},
"Problem": {
"properties": {
"cloud_code": {
"type": [
"string",
"null"
]
},
"code": {
"type": "string"
},
"detail": {
"type": [
"string",
"null"
]
},
"excerpt": {
"anyOf": [
{
"$ref": "#/definitions/Excerpt"
},
{
"type": "null"
}
]
},
"file": {
"type": [
"string",
"null"
]
},
"fix": {
"type": [
"string",
"null"
]
},
"id": {
"description": "sha1(source, code, file, line), stable across checks.",
"type": "string"
},
"line": {
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"owner": {
"$ref": "#/definitions/Owner"
},
"severity": {
"$ref": "#/definitions/Severity"
},
"skipped": {
"description": "The person skipped its name for now (`values::skip`). `EMPTY_DEFAULT_VARIABLE` then has severity `info`; `SECRET_MISSING` stays `block`.",
"type": "boolean"
},
"source": {
"$ref": "#/definitions/Source"
},
"title": {
"type": "string"
},
"variable": {
"description": "The variable a value problem is about (`SECRET_MISSING`, `EMPTY_DEFAULT_VARIABLE`, `LOCAL_VARIABLE_UNSET`), as the problem itself knows it.",
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"id",
"owner",
"severity",
"source",
"title"
],
"type": "object"
},
"ResourceConfirmation": {
"properties": {
"alias": {
"type": "string"
},
"binding": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string"
},
"tier": {
"type": [
"string",
"null"
]
}
},
"required": [
"alias",
"kind"
],
"type": "object"
},
"RouteCount": {
"properties": {
"count": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"prefix": {
"type": [
"string",
"null"
]
}
},
"required": [
"count"
],
"type": "object"
},
"Run": {
"properties": {
"check_id": {
"type": "string"
},
"commit": {
"type": "string"
},
"engine": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/RunError"
},
{
"type": "null"
}
]
},
"finished_at": {
"type": [
"string",
"null"
]
},
"healthcheck": {
"anyOf": [
{
"$ref": "#/definitions/HealthResult"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"left_redacted": {
"default": false,
"description": "The copies under this run's `left/` were written with the run's secret values replaced. Absent (an older run): `check::read` refuses its kept files.",
"type": "boolean"
},
"log_path": {
"default": null,
"description": "The run's whole redacted log, an absolute path (`log_tail` is only its last 40 lines).",
"type": [
"string",
"null"
]
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"moved": {
"default": [],
"description": "The untracked files the run created, moved out of the copy into the run's `left/` folder when it ended (at most 500).",
"items": {
"type": "string"
},
"type": "array"
},
"not_covered": {
"items": {
"type": "string"
},
"type": "array"
},
"restored": {
"default": [],
"description": "The tracked files the run rewrote and the worker put back as committed when it ended (at most 500; their rewritten versions are kept in the run's `left/` folder).",
"items": {
"type": "string"
},
"type": "array"
},
"reused": {
"default": false,
"description": "A passed run of an earlier check answered this one: nothing ran again.",
"type": "boolean"
},
"routes": {
"$ref": "#/definitions/RouteCount"
},
"stages": {
"items": {
"$ref": "#/definitions/Stage"
},
"type": "array"
},
"started_at": {
"type": "string"
},
"status": {
"$ref": "#/definitions/RunStatus"
},
"waiting_on": {
"anyOf": [
{
"$ref": "#/definitions/WaitingOn"
},
{
"type": "null"
}
],
"default": null,
"description": "The workers stage has gone a minute with no new worker: who it waits for. The run is still `running`; null otherwise."
},
"workers": {
"$ref": "#/definitions/WorkerCount"
}
},
"required": [
"check_id",
"commit",
"engine",
"id",
"log_tail",
"not_covered",
"routes",
"stages",
"started_at",
"status",
"workers"
],
"type": "object"
},
"RunError": {
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"owner": {
"anyOf": [
{
"$ref": "#/definitions/RunOwner"
},
{
"type": "null"
}
],
"default": null,
"description": "Whose the failure is (`run_code_owner`): the agent fixes it, the person must, or the run was cut short. Set whenever the check is stored."
},
"stage": {
"$ref": "#/definitions/StageName"
},
"withheld": {
"default": false,
"description": "The worker would not send this failure to the agent now: the person has a blocking problem open (a missing value fails the run too), so it is theirs first.",
"type": "boolean"
}
},
"required": [
"code",
"message",
"stage"
],
"type": "object"
},
"RunOwner": {
"description": "Who a failed local run's code belongs to.",
"oneOf": [
{
"description": "A newer run of the workspace replaced this one: nothing to fix and nothing to send (the newer run is judged in its turn).",
"enum": [
"replaced"
],
"type": "string"
},
{
"description": "The agent fixes it in the worktree.",
"enum": [
"agent"
],
"type": "string"
},
{
"description": "The person's: Docker, a tool, the iii binary, or a decision about the routes.",
"enum": [
"person"
],
"type": "string"
},
{
"description": "Nobody's fault: the run was cut short; run it again.",
"enum": [
"interrupted"
],
"type": "string"
}
]
},
"RunStatus": {
"enum": [
"running",
"passed",
"failed"
],
"type": "string"
},
"Severity": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
},
"Source": {
"enum": [
"cloud_plan",
"check_here"
],
"type": "string"
},
"Stage": {
"properties": {
"detail": {
"type": [
"string",
"null"
]
},
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"name": {
"$ref": "#/definitions/StageName"
},
"status": {
"$ref": "#/definitions/StageStatus"
}
},
"required": [
"name",
"status"
],
"type": "object"
},
"StageName": {
"enum": [
"install",
"build",
"release",
"compose_up",
"workers",
"routes",
"healthcheck"
],
"type": "string"
},
"StageStatus": {
"enum": [
"pending",
"running",
"passed",
"failed",
"skipped"
],
"type": "string"
},
"WaitingOn": {
"properties": {
"containers": {
"description": "The containers that have not connected.",
"items": {
"type": "string"
},
"type": "array"
},
"since": {
"description": "When the wait was noticed (RFC 3339).",
"type": "string"
}
},
"required": [
"containers",
"since"
],
"type": "object"
},
"WorkerCount": {
"properties": {
"ready": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"total": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"ready",
"total"
],
"type": "object"
},
"WorkerError": {
"description": "`{code, message, status?, fix?}` inside records.",
"properties": {
"code": {
"type": "string"
},
"fix": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
}
},
"properties": {
"base": {
"description": "The environment branch's head when checked.",
"type": "string"
},
"checked_at": {
"type": "string"
},
"commit": {
"type": "string"
},
"commits": {
"default": [],
"description": "The commits of `base..commit`, newest first, at most 50. Empty when the base was not read or the commit is not on this machine.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": "array"
},
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"environment_id": {
"type": "string"
},
"handoff_id": {
"default": null,
"description": "The hand-off whose agent asked for it; null for the page's own checks.",
"type": [
"string",
"null"
]
},
"here": {
"$ref": "#/definitions/HerePart"
},
"id": {
"type": "string"
},
"manifest": {
"default": null,
"description": "The compose file it was checked with, from the repository root. When it is not the environment's, deploying this check switches the environment to it.",
"type": [
"string",
"null"
]
},
"plan": {
"$ref": "#/definitions/PlanPart"
},
"problems": {
"description": "Cloud plan first, then the checks here.",
"items": {
"$ref": "#/definitions/Problem"
},
"type": "array"
},
"ready": {
"type": "boolean"
},
"report": {
"type": "string"
},
"run": {
"anyOf": [
{
"$ref": "#/definitions/Run"
},
{
"type": "null"
}
]
}
},
"required": [
"base",
"checked_at",
"commit",
"duration_ms",
"environment_id",
"here",
"id",
"plan",
"problems",
"ready",
"report"
],
"title": "Check",
"type": "object"
}
},
{
"description": "Read one kept check by id (status.checks lists them, a deploy names its check_id), as it was recorded; nothing runs again.",
"metadata": {},
"name": "iii-cloud::check::get",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::check::get` input.",
"properties": {
"id": {
"description": "A check's id: `status.checks[].id`, a deploy's `check_id`.",
"type": "string"
}
},
"required": [
"id"
],
"title": "CheckGetRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CommitLine": {
"properties": {
"message": {
"description": "The subject line.",
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"message",
"sha"
],
"type": "object"
},
"Confirmations": {
"properties": {
"overrides": {
"items": {
"$ref": "#/definitions/OverrideConfirmation"
},
"type": "array"
},
"resources": {
"items": {
"$ref": "#/definitions/ResourceConfirmation"
},
"type": "array"
}
},
"required": [
"overrides",
"resources"
],
"type": "object"
},
"Excerpt": {
"properties": {
"lines": {
"items": {
"type": "string"
},
"type": "array"
},
"start_line": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"lines",
"start_line"
],
"type": "object"
},
"HealthResult": {
"properties": {
"path": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"path"
],
"type": "object"
},
"HerePart": {
"properties": {
"accepts_cloud_block": {
"type": "boolean"
},
"iii_version": {
"type": [
"string",
"null"
]
},
"problems": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"accepts_cloud_block",
"problems"
],
"type": "object"
},
"OverrideConfirmation": {
"properties": {
"console": true,
"file": true,
"setting": {
"type": "string"
}
},
"required": [
"console",
"file",
"setting"
],
"type": "object"
},
"Owner": {
"oneOf": [
{
"enum": [
"agent",
"person"
],
"type": "string"
},
{
"description": "Info only: nothing to do.",
"enum": [
"none"
],
"type": "string"
}
]
},
"PlanPart": {
"properties": {
"at_least": {
"description": "The plan stops at its first blocking step: more may follow.",
"type": "boolean"
},
"blocking": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"confirmations": {
"$ref": "#/definitions/Confirmations"
},
"digest": {
"type": [
"string",
"null"
]
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"fingerprint": {
"type": [
"string",
"null"
]
},
"status": {
"$ref": "#/definitions/PlanStatus"
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/PlanSummary"
},
{
"type": "null"
}
],
"default": null,
"description": "What the plan runs: its workers and machine groups. Null without a plan."
},
"warnings": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"web_candidates": true
},
"required": [
"at_least",
"blocking",
"confirmations",
"status",
"warnings"
],
"type": "object"
},
"PlanStatus": {
"enum": [
"clean",
"blocked",
"not_pushed",
"commit_not_planned",
"unavailable"
],
"type": "string"
},
"PlanSummary": {
"properties": {
"groups": {
"description": "The groups' names, in the plan's order.",
"items": {
"type": "string"
},
"type": "array"
},
"workers": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"groups",
"workers"
],
"type": "object"
},
"Problem": {
"properties": {
"cloud_code": {
"type": [
"string",
"null"
]
},
"code": {
"type": "string"
},
"detail": {
"type": [
"string",
"null"
]
},
"excerpt": {
"anyOf": [
{
"$ref": "#/definitions/Excerpt"
},
{
"type": "null"
}
]
},
"file": {
"type": [
"string",
"null"
]
},
"fix": {
"type": [
"string",
"null"
]
},
"id": {
"description": "sha1(source, code, file, line), stable across checks.",
"type": "string"
},
"line": {
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"owner": {
"$ref": "#/definitions/Owner"
},
"severity": {
"$ref": "#/definitions/Severity"
},
"skipped": {
"description": "The person skipped its name for now (`values::skip`). `EMPTY_DEFAULT_VARIABLE` then has severity `info`; `SECRET_MISSING` stays `block`.",
"type": "boolean"
},
"source": {
"$ref": "#/definitions/Source"
},
"title": {
"type": "string"
},
"variable": {
"description": "The variable a value problem is about (`SECRET_MISSING`, `EMPTY_DEFAULT_VARIABLE`, `LOCAL_VARIABLE_UNSET`), as the problem itself knows it.",
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"id",
"owner",
"severity",
"source",
"title"
],
"type": "object"
},
"ResourceConfirmation": {
"properties": {
"alias": {
"type": "string"
},
"binding": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string"
},
"tier": {
"type": [
"string",
"null"
]
}
},
"required": [
"alias",
"kind"
],
"type": "object"
},
"RouteCount": {
"properties": {
"count": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"prefix": {
"type": [
"string",
"null"
]
}
},
"required": [
"count"
],
"type": "object"
},
"Run": {
"properties": {
"check_id": {
"type": "string"
},
"commit": {
"type": "string"
},
"engine": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/RunError"
},
{
"type": "null"
}
]
},
"finished_at": {
"type": [
"string",
"null"
]
},
"healthcheck": {
"anyOf": [
{
"$ref": "#/definitions/HealthResult"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"left_redacted": {
"default": false,
"description": "The copies under this run's `left/` were written with the run's secret values replaced. Absent (an older run): `check::read` refuses its kept files.",
"type": "boolean"
},
"log_path": {
"default": null,
"description": "The run's whole redacted log, an absolute path (`log_tail` is only its last 40 lines).",
"type": [
"string",
"null"
]
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"moved": {
"default": [],
"description": "The untracked files the run created, moved out of the copy into the run's `left/` folder when it ended (at most 500).",
"items": {
"type": "string"
},
"type": "array"
},
"not_covered": {
"items": {
"type": "string"
},
"type": "array"
},
"restored": {
"default": [],
"description": "The tracked files the run rewrote and the worker put back as committed when it ended (at most 500; their rewritten versions are kept in the run's `left/` folder).",
"items": {
"type": "string"
},
"type": "array"
},
"reused": {
"default": false,
"description": "A passed run of an earlier check answered this one: nothing ran again.",
"type": "boolean"
},
"routes": {
"$ref": "#/definitions/RouteCount"
},
"stages": {
"items": {
"$ref": "#/definitions/Stage"
},
"type": "array"
},
"started_at": {
"type": "string"
},
"status": {
"$ref": "#/definitions/RunStatus"
},
"waiting_on": {
"anyOf": [
{
"$ref": "#/definitions/WaitingOn"
},
{
"type": "null"
}
],
"default": null,
"description": "The workers stage has gone a minute with no new worker: who it waits for. The run is still `running`; null otherwise."
},
"workers": {
"$ref": "#/definitions/WorkerCount"
}
},
"required": [
"check_id",
"commit",
"engine",
"id",
"log_tail",
"not_covered",
"routes",
"stages",
"started_at",
"status",
"workers"
],
"type": "object"
},
"RunError": {
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"owner": {
"anyOf": [
{
"$ref": "#/definitions/RunOwner"
},
{
"type": "null"
}
],
"default": null,
"description": "Whose the failure is (`run_code_owner`): the agent fixes it, the person must, or the run was cut short. Set whenever the check is stored."
},
"stage": {
"$ref": "#/definitions/StageName"
},
"withheld": {
"default": false,
"description": "The worker would not send this failure to the agent now: the person has a blocking problem open (a missing value fails the run too), so it is theirs first.",
"type": "boolean"
}
},
"required": [
"code",
"message",
"stage"
],
"type": "object"
},
"RunOwner": {
"description": "Who a failed local run's code belongs to.",
"oneOf": [
{
"description": "A newer run of the workspace replaced this one: nothing to fix and nothing to send (the newer run is judged in its turn).",
"enum": [
"replaced"
],
"type": "string"
},
{
"description": "The agent fixes it in the worktree.",
"enum": [
"agent"
],
"type": "string"
},
{
"description": "The person's: Docker, a tool, the iii binary, or a decision about the routes.",
"enum": [
"person"
],
"type": "string"
},
{
"description": "Nobody's fault: the run was cut short; run it again.",
"enum": [
"interrupted"
],
"type": "string"
}
]
},
"RunStatus": {
"enum": [
"running",
"passed",
"failed"
],
"type": "string"
},
"Severity": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
},
"Source": {
"enum": [
"cloud_plan",
"check_here"
],
"type": "string"
},
"Stage": {
"properties": {
"detail": {
"type": [
"string",
"null"
]
},
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"name": {
"$ref": "#/definitions/StageName"
},
"status": {
"$ref": "#/definitions/StageStatus"
}
},
"required": [
"name",
"status"
],
"type": "object"
},
"StageName": {
"enum": [
"install",
"build",
"release",
"compose_up",
"workers",
"routes",
"healthcheck"
],
"type": "string"
},
"StageStatus": {
"enum": [
"pending",
"running",
"passed",
"failed",
"skipped"
],
"type": "string"
},
"WaitingOn": {
"properties": {
"containers": {
"description": "The containers that have not connected.",
"items": {
"type": "string"
},
"type": "array"
},
"since": {
"description": "When the wait was noticed (RFC 3339).",
"type": "string"
}
},
"required": [
"containers",
"since"
],
"type": "object"
},
"WorkerCount": {
"properties": {
"ready": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"total": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"ready",
"total"
],
"type": "object"
},
"WorkerError": {
"description": "`{code, message, status?, fix?}` inside records.",
"properties": {
"code": {
"type": "string"
},
"fix": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
}
},
"properties": {
"base": {
"description": "The environment branch's head when checked.",
"type": "string"
},
"checked_at": {
"type": "string"
},
"commit": {
"type": "string"
},
"commits": {
"default": [],
"description": "The commits of `base..commit`, newest first, at most 50. Empty when the base was not read or the commit is not on this machine.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": "array"
},
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"environment_id": {
"type": "string"
},
"handoff_id": {
"default": null,
"description": "The hand-off whose agent asked for it; null for the page's own checks.",
"type": [
"string",
"null"
]
},
"here": {
"$ref": "#/definitions/HerePart"
},
"id": {
"type": "string"
},
"manifest": {
"default": null,
"description": "The compose file it was checked with, from the repository root. When it is not the environment's, deploying this check switches the environment to it.",
"type": [
"string",
"null"
]
},
"plan": {
"$ref": "#/definitions/PlanPart"
},
"problems": {
"description": "Cloud plan first, then the checks here.",
"items": {
"$ref": "#/definitions/Problem"
},
"type": "array"
},
"ready": {
"type": "boolean"
},
"report": {
"type": "string"
},
"run": {
"anyOf": [
{
"$ref": "#/definitions/Run"
},
{
"type": "null"
}
]
}
},
"required": [
"base",
"checked_at",
"commit",
"duration_ms",
"environment_id",
"here",
"id",
"plan",
"problems",
"ready",
"report"
],
"title": "Check",
"type": "object"
}
},
{
"description": "Read, for a kept check, a slice of its run's whole redacted log (`log: {from_line, lines}`, at most 400 lines a call, with the line count) and/or a file the run left that the worker kept (`left: <path>`, only a path in the run's `restored` or `moved`, text up to 256 KiB). No path is read from disk by you.",
"metadata": {},
"name": "iii-cloud::check::read",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"LogSlice": {
"properties": {
"from_line": {
"default": null,
"description": "The first line (1-based; default 1).",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"lines": {
"default": null,
"description": "How many (default and most: 400).",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
},
"description": "`iii-cloud::check::read` input: a slice of a check's run's whole redacted log, and/or a file the worker kept of that run (`left`).",
"properties": {
"id": {
"description": "A check's id.",
"type": "string"
},
"left": {
"default": null,
"description": "A path listed in the run's `restored` or `moved`: what the run left there, kept in `left/`.",
"type": [
"string",
"null"
]
},
"log": {
"anyOf": [
{
"$ref": "#/definitions/LogSlice"
},
{
"type": "null"
}
],
"description": "Lines of the run's log (`run.log_path`'s file), 1-based."
}
},
"required": [
"id"
],
"title": "CheckReadRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"LeftFile": {
"properties": {
"content": {
"description": "The kept file's text, redacted with the run's secrets.",
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"content",
"path"
],
"type": "object"
},
"LogLines": {
"properties": {
"from_line": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"lines": {
"items": {
"type": "string"
},
"type": "array"
},
"total_lines": {
"description": "All the lines the log has now.",
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"from_line",
"lines",
"total_lines"
],
"type": "object"
}
},
"properties": {
"left": {
"anyOf": [
{
"$ref": "#/definitions/LeftFile"
},
{
"type": "null"
}
]
},
"log": {
"anyOf": [
{
"$ref": "#/definitions/LogLines"
},
{
"type": "null"
}
]
}
},
"title": "CheckRead",
"type": "object"
}
},
{
"description": "The page's own: copy the compose file's local config folder (engine.workers.configuration, fs adapter, from the person's folder) into the selected environment's console config in iii cloud, one entry per container. dry_run previews it and writes nothing; applying needs the dry run's version as expected_version. Secret-looking keys and values are left out, by name. Agents never call it.",
"metadata": {
"trace_hidden": true
},
"name": "iii-cloud::config::import",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::config::import` input: the page's own.",
"properties": {
"dry_run": {
"description": "Preview only: nothing is written.",
"type": "boolean"
},
"environment_id": {
"description": "The selected environment, as a guard (`ENVIRONMENT_CHANGED`).",
"type": "string"
},
"expected_version": {
"default": null,
"description": "The `version` the dry run returned. Needed to apply.",
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"required": [
"dry_run",
"environment_id"
],
"title": "ConfigImport",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ConfigImportField": {
"properties": {
"key": {
"type": "string"
},
"value": true
},
"required": [
"key",
"value"
],
"type": "object"
},
"ConfigImportWorker": {
"properties": {
"fields": {
"description": "The fields copied, as dotted keys; lists stay JSON values. `value` is null once applied.",
"items": {
"$ref": "#/definitions/ConfigImportField"
},
"type": "array"
},
"file": {
"description": "The file, from the repository root.",
"type": "string"
},
"left_out": {
"description": "Secret-looking keys or credential-looking values, by key only.",
"items": {
"type": "string"
},
"type": "array"
},
"set_elsewhere": {
"description": "Keys iii cloud or the compose file set, which the console can't change.",
"items": {
"type": "string"
},
"type": "array"
},
"worker": {
"description": "The container key iii cloud keeps the config by.",
"type": "string"
}
},
"required": [
"fields",
"file",
"left_out",
"set_elsewhere",
"worker"
],
"type": "object"
},
"ConfigSkipReason": {
"oneOf": [
{
"description": "No container iii cloud runs has that config entry.",
"enum": [
"not_a_worker"
],
"type": "string"
},
{
"description": "A link, or outside the repository.",
"enum": [
"not_a_plain_file"
],
"type": "string"
},
{
"description": "Over 1 MiB.",
"enum": [
"too_large"
],
"type": "string"
},
{
"description": "Not a configuration entry (`id`, `name`, `description`, `value`).",
"enum": [
"unreadable"
],
"type": "string"
}
]
},
"ConfigSkippedFile": {
"properties": {
"file": {
"type": "string"
},
"reason": {
"$ref": "#/definitions/ConfigSkipReason"
}
},
"required": [
"file",
"reason"
],
"type": "object"
}
},
"description": "What `iii-cloud::config::import` copies. Values only in a dry run's preview, never a secret-looking one: no `Debug`, so they never reach a log.",
"properties": {
"applied": {
"description": "False for a dry run.",
"type": "boolean"
},
"directory": {
"description": "The config folder, from the repository root (`api/config`).",
"type": "string"
},
"draft_changed": {
"description": "iii cloud has unapplied console edits for this environment: applying is refused until they're applied or dropped there.",
"type": "boolean"
},
"environment_id": {
"type": "string"
},
"skipped": {
"description": "Files of the folder not copied, and why.",
"items": {
"$ref": "#/definitions/ConfigSkippedFile"
},
"type": "array"
},
"version": {
"description": "The config version the dry run read, or the one the apply made.",
"format": "int64",
"type": "integer"
},
"workers": {
"items": {
"$ref": "#/definitions/ConfigImportWorker"
},
"type": "array"
}
},
"required": [
"applied",
"directory",
"draft_changed",
"environment_id",
"skipped",
"version",
"workers"
],
"title": "ConfigImported",
"type": "object"
}
},
{
"description": "Sign in with the browser (the person types a code) or with an API key saved in the vault. A key connects with the secret's name alone.",
"metadata": {
"trace_hidden": true
},
"name": "iii-cloud::connect",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::connect` input.",
"oneOf": [
{
"description": "Sign in with a code typed in the browser (the main path).",
"properties": {
"method": {
"enum": [
"browser"
],
"type": "string"
}
},
"required": [
"method"
],
"type": "object"
},
{
"description": "Use an environment-scoped API key saved in the vault.",
"properties": {
"environment_id": {
"default": null,
"description": "Only for an older cloud without `GET /keys/self`: the key's environment.",
"type": [
"string",
"null"
]
},
"method": {
"enum": [
"api_key"
],
"type": "string"
},
"secret": {
"description": "The vault secret that holds the key. Never the key itself.",
"type": "string"
},
"team_id": {
"default": null,
"description": "Only for an older cloud without `GET /keys/self`: the key's team.",
"type": [
"string",
"null"
]
}
},
"required": [
"method",
"secret"
],
"type": "object"
}
],
"title": "ConnectRequest"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ApiKeyRef": {
"properties": {
"environment_id": {
"type": "string"
},
"secret": {
"type": "string"
},
"team_id": {
"type": "string"
}
},
"required": [
"environment_id",
"secret",
"team_id"
],
"type": "object"
},
"ConnStatus": {
"enum": [
"signed_out",
"waiting",
"connected",
"expired",
"error"
],
"type": "string"
},
"Device": {
"properties": {
"expires_at": {
"type": "string"
},
"user_code": {
"type": "string"
},
"verification_uri": {
"type": "string"
}
},
"required": [
"expires_at",
"user_code",
"verification_uri"
],
"type": "object"
},
"Method": {
"enum": [
"browser",
"api_key"
],
"type": "string"
},
"TeamRole": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"id",
"name",
"role",
"slug"
],
"type": "object"
},
"User": {
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
}
},
"required": [
"email",
"id"
],
"type": "object"
},
"WorkerError": {
"description": "`{code, message, status?, fix?}` inside records.",
"properties": {
"code": {
"type": "string"
},
"fix": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
}
},
"properties": {
"api_key": {
"anyOf": [
{
"$ref": "#/definitions/ApiKeyRef"
},
{
"type": "null"
}
]
},
"cloud_url": {
"type": "string"
},
"device": {
"anyOf": [
{
"$ref": "#/definitions/Device"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": [
"string",
"null"
]
},
"method": {
"anyOf": [
{
"$ref": "#/definitions/Method"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/ConnStatus"
},
"teams": {
"items": {
"$ref": "#/definitions/TeamRole"
},
"type": "array"
},
"user": {
"anyOf": [
{
"$ref": "#/definitions/User"
},
{
"type": "null"
}
]
}
},
"required": [
"cloud_url",
"status",
"teams"
],
"title": "Connection",
"type": "object"
}
},
{
"description": "The page's own: merge the pull request and deploy, push the checked commit to an environment's own branch and deploy it, or confirm a waiting deployment, pinned to the plan the person saw. A check of another compose file switches the environment to it first. Only the person deploys; agents never call it.",
"metadata": {},
"name": "iii-cloud::deploy",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::deploy` input.",
"properties": {
"check_id": {
"type": "string"
},
"deployment_id": {
"default": null,
"description": "Confirm this waiting deployment (a merge made directly on GitHub); its plan digest must match the check's.",
"type": [
"string",
"null"
]
},
"handoff_id": {
"default": null,
"type": [
"string",
"null"
]
},
"pr": {
"default": null,
"description": "Merge this pull request first (or resume after its merge).",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"check_id"
],
"title": "DeployRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"DeployCommit": {
"properties": {
"message": {
"type": [
"string",
"null"
]
},
"sha": {
"type": "string"
}
},
"required": [
"sha"
],
"type": "object"
},
"DeployError": {
"properties": {
"action": {
"type": [
"string",
"null"
]
},
"code": {
"type": "string"
},
"hint": {
"type": "string"
},
"stage": {
"type": "string"
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"hint",
"stage"
],
"type": "object"
},
"DeployFailure": {
"description": "A failed deploy in plain words (spec: readable failures).",
"properties": {
"code": {
"type": "string"
},
"diagnosis": {
"anyOf": [
{
"$ref": "#/definitions/Diagnosis"
},
{
"type": "null"
}
],
"default": null,
"description": "iii cloud's diagnosis of the failure, when it has a likely cause."
},
"hint": {
"type": "string"
},
"log_tail": {
"description": "The last ~40 lines of the failing stage's log, oldest first, redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"release_command": {
"default": null,
"description": "The release command from the manifest, for a release failure.",
"type": [
"string",
"null"
]
},
"silent": {
"default": false,
"description": "The log shows an exit status but no error text.",
"type": "boolean"
},
"stage": {
"type": "string"
},
"title": {
"description": "Plain, per code: \"The release command failed: `pnpm migrate`\".",
"type": "string"
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"hint",
"log_tail",
"stage",
"title"
],
"type": "object"
},
"DeployStage": {
"properties": {
"detail": {
"type": [
"string",
"null"
]
},
"finished_at": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"started_at": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
}
},
"required": [
"name",
"status"
],
"type": "object"
},
"Diagnosis": {
"description": "iii cloud's read-only diagnosis of a failed deployment: a lead, not proof.",
"properties": {
"cause": {
"type": "string"
},
"evidence": {
"description": "What it rests on, one line each (a log line, a file and its lines), redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"next_step": {
"type": "string"
}
},
"required": [
"cause",
"evidence",
"next_step"
],
"type": "object"
},
"Outcome": {
"enum": [
"running",
"ready",
"failed",
"no_route",
"canceled",
"replaced"
],
"type": "string"
},
"ReleaseRow": {
"properties": {
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"status": {
"$ref": "#/definitions/ReleaseRowStatus"
}
},
"required": [
"status"
],
"type": "object"
},
"ReleaseRowStatus": {
"enum": [
"pending",
"running",
"passed",
"failed"
],
"type": "string"
}
},
"properties": {
"approved_by_worker": {
"type": "boolean"
},
"check_id": {
"default": null,
"description": "The check this worker deployed (`deploy {check_id}`); null for a deployment made elsewhere.",
"type": [
"string",
"null"
]
},
"checked_ready": {
"type": "boolean"
},
"commit": {
"$ref": "#/definitions/DeployCommit"
},
"console_url": {
"type": "string"
},
"created_at": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/DeployError"
},
{
"type": "null"
}
]
},
"failure": {
"anyOf": [
{
"$ref": "#/definitions/DeployFailure"
},
{
"type": "null"
}
],
"default": null,
"description": "For a failed deploy: what failed, in plain words, with the failing stage's log."
},
"finished_at": {
"type": [
"string",
"null"
]
},
"from_console": {
"default": false,
"description": "This worker did not create it: made in the console (the cloud's `type` is `manual` for both).",
"type": "boolean"
},
"id": {
"type": "string"
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"number": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"outcome": {
"$ref": "#/definitions/Outcome"
},
"pr": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"release_row": {
"anyOf": [
{
"$ref": "#/definitions/ReleaseRow"
},
{
"type": "null"
}
]
},
"replaced_by": {
"default": null,
"description": "The deployment that replaced this one, when it is `replaced`.",
"type": [
"string",
"null"
]
},
"stages": {
"items": {
"$ref": "#/definitions/DeployStage"
},
"type": "array"
},
"status": {
"type": "string"
},
"status_detail": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"approved_by_worker",
"checked_ready",
"commit",
"console_url",
"created_at",
"environment_id",
"id",
"log_tail",
"number",
"outcome",
"stages",
"status",
"type"
],
"title": "Deploy",
"type": "object"
}
},
{
"description": "The page's own: hand work to the agent. Returns a marker for the top of the prompt; the worker finds the agent's session by it and publishes what the agent is doing as status.agent.",
"metadata": {},
"name": "iii-cloud::handoff",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"HandoffKind": {
"oneOf": [
{
"enum": [
"ready",
"deploy_fix",
"pull_request"
],
"type": "string"
},
{
"description": "The project is not in iii cloud yet.",
"enum": [
"import"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::handoff` input: the page hands work to the agent.",
"properties": {
"candidate": {
"default": null,
"description": "true when sent from the add-project steps: brief the folder being added.",
"type": [
"boolean",
"null"
]
},
"check_id": {
"default": null,
"description": "Required for every kind but `import`.",
"type": [
"string",
"null"
]
},
"deployment_id": {
"default": null,
"description": "For `deploy_fix`: the deployment that failed.",
"type": [
"string",
"null"
]
},
"kind": {
"$ref": "#/definitions/HandoffKind"
},
"text": {
"default": null,
"description": "The plain chat text the page would post. With it, a follow-up goes into the agent's existing chat: the worker sends it itself.",
"type": [
"string",
"null"
]
}
},
"required": [
"kind"
],
"title": "HandoffRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::handoff` output.",
"properties": {
"asks": {
"default": false,
"description": "With `reused`: the agent has a real ask of its own open. Nothing was delivered, not even the page's `text` (it would read as the answer): the person answers in the chat.",
"type": "boolean"
},
"delivered": {
"description": "False: nothing was sent; the page starts a new chat with the marker.",
"type": "boolean"
},
"id": {
"type": "string"
},
"marker": {
"description": "A short line the page puts at the top of the prompt; the worker finds the agent's session by it.",
"type": "string"
},
"reused": {
"default": false,
"description": "True: an equal hand-off was already open (a double click), and this is it.",
"type": "boolean"
},
"sent": {
"default": null,
"description": "With `reused`: the worker sent the open hand-off's agent on (the same \"continue\" as after a person's check: the newest check's blocking problems of the agent's, and its failed run). False: nothing was sent (it works, asks the person something, or has nothing open). Absent for a new hand-off.",
"type": [
"boolean",
"null"
]
},
"session_id": {
"description": "The existing chat the worker sent the hand-off into.",
"type": [
"string",
"null"
]
}
},
"required": [
"delivered",
"id",
"marker"
],
"title": "HandoffResponse",
"type": "object"
}
},
{
"description": "Your brief, and only it: where to work, the base, the compose file, the problems (id, code, owner, severity, title, detail, file, line, fix) split into yours and the person's, the deploy failure when there is one, the next step, and run_failure ({stage, code, message, log_tail}) when your hand-off's latest local run failed. handoff_id is the id or the 8 characters of the marker line.",
"metadata": {},
"name": "iii-cloud::handoff::brief",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::handoff::brief` input.",
"properties": {
"handoff_id": {
"description": "The hand-off's id, or the 8 characters of its marker line.",
"type": "string"
}
},
"required": [
"handoff_id"
],
"title": "HandoffBriefRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"BriefBase": {
"properties": {
"branch": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"branch",
"sha"
],
"type": "object"
},
"BriefDeploy": {
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"diagnosis": {
"anyOf": [
{
"$ref": "#/definitions/Diagnosis"
},
{
"type": "null"
}
],
"default": null,
"description": "iii cloud's diagnosis, read when the hand-off was made (`None`: it had no likely cause)."
},
"hint": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"release_command": {
"default": null,
"description": "The release command from the manifest, when the failure is the release's.",
"type": [
"string",
"null"
]
},
"silent": {
"default": false,
"type": "boolean"
},
"stage": {
"type": [
"string",
"null"
]
},
"title": {
"type": [
"string",
"null"
]
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"log_tail"
],
"type": "object"
},
"BriefProblem": {
"properties": {
"code": {
"type": "string"
},
"detail": {
"type": [
"string",
"null"
]
},
"file": {
"type": [
"string",
"null"
]
},
"fix": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"line": {
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"owner": {
"$ref": "#/definitions/Owner"
},
"severity": {
"$ref": "#/definitions/Severity"
},
"title": {
"type": "string"
}
},
"required": [
"code",
"id",
"owner",
"severity",
"title"
],
"type": "object"
},
"BriefWorkspace": {
"properties": {
"branch": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"branch",
"path"
],
"type": "object"
},
"Diagnosis": {
"description": "iii cloud's read-only diagnosis of a failed deployment: a lead, not proof.",
"properties": {
"cause": {
"type": "string"
},
"evidence": {
"description": "What it rests on, one line each (a log line, a file and its lines), redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"next_step": {
"type": "string"
}
},
"required": [
"cause",
"evidence",
"next_step"
],
"type": "object"
},
"HandoffKind": {
"oneOf": [
{
"enum": [
"ready",
"deploy_fix",
"pull_request"
],
"type": "string"
},
{
"description": "The project is not in iii cloud yet.",
"enum": [
"import"
],
"type": "string"
}
]
},
"Owner": {
"oneOf": [
{
"enum": [
"agent",
"person"
],
"type": "string"
},
{
"description": "Info only: nothing to do.",
"enum": [
"none"
],
"type": "string"
}
]
},
"RunFailure": {
"description": "Why the hand-off's latest local run failed.",
"properties": {
"code": {
"type": "string"
},
"log_tail": {
"description": "The run's last lines, oldest first, redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"message": {
"type": "string"
},
"stage": {
"$ref": "#/definitions/StageName"
}
},
"required": [
"code",
"log_tail",
"message",
"stage"
],
"type": "object"
},
"Severity": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
},
"StageName": {
"enum": [
"install",
"build",
"release",
"compose_up",
"workers",
"routes",
"healthcheck"
],
"type": "string"
}
},
"description": "`iii-cloud::handoff::brief` output: the brief, and the failed run when there is one.",
"properties": {
"agent_problems": {
"description": "The problems that are the agent's to fix.",
"items": {
"$ref": "#/definitions/BriefProblem"
},
"type": "array"
},
"base": {
"anyOf": [
{
"$ref": "#/definitions/BriefBase"
},
{
"type": "null"
}
],
"default": null,
"description": "The base branch and its sha when the worktree was made: reset to it to start again (`OLD_ATTEMPT_COMMITS`)."
},
"check_id": {
"type": [
"string",
"null"
]
},
"checkout_path": {
"description": "The person's own checkout: do not touch it.",
"type": [
"string",
"null"
]
},
"commit": {
"type": [
"string",
"null"
]
},
"deploy": {
"anyOf": [
{
"$ref": "#/definitions/BriefDeploy"
},
{
"type": "null"
}
]
},
"handoff_id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/HandoffKind"
},
"manifest": {
"description": "The compose file checked and deployed, relative to the worktree: the hand-off's, else the environment's.",
"type": "string"
},
"next_step": {
"type": "string"
},
"other_compose_files": {
"description": "Other compose files tracked in the worktree that declare `containers:` (at most 10). They are not checked or deployed.",
"items": {
"type": "string"
},
"type": "array"
},
"person_problems": {
"description": "The ones the person decides: bring each with a recommendation.",
"items": {
"$ref": "#/definitions/BriefProblem"
},
"type": "array"
},
"project": {
"description": "`<project> · <environment>`.",
"type": [
"string",
"null"
]
},
"pushes_directly": {
"default": false,
"description": "The environment is not production: it gets an assisted deploy, no pull request. Push only your fix branch; the person's deploy on the page sends the checked commit to the environment's own branch.",
"type": "boolean"
},
"remote_branch_note": {
"default": null,
"description": "One line when an earlier try left the fix branch on origin: the first push replaces it with `--force-with-lease`.",
"type": [
"string",
"null"
]
},
"repository": {
"type": [
"string",
"null"
]
},
"run_failure": {
"anyOf": [
{
"$ref": "#/definitions/RunFailure"
},
{
"type": "null"
}
]
},
"worktree": {
"anyOf": [
{
"$ref": "#/definitions/BriefWorkspace"
},
{
"type": "null"
}
],
"description": "Where to work."
}
},
"required": [
"agent_problems",
"handoff_id",
"kind",
"manifest",
"next_step",
"other_compose_files",
"person_problems"
],
"title": "HandoffBriefResponse",
"type": "object"
}
},
{
"description": "Tell the person which problems you start on: call it before each group of fixes with the problem ids or codes (a code stands for every open problem of it) and a short plain note. Clears itself when those problems leave a newer check or the hand-off ends.",
"metadata": {},
"name": "iii-cloud::handoff::progress",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::handoff::progress` input: the agent says what it starts on.",
"properties": {
"handoff_id": {
"default": null,
"description": "The hand-off this progress is for, by its id or the 8 characters of the marker (default: the selected environment's open one).",
"type": [
"string",
"null"
]
},
"note": {
"default": null,
"type": [
"string",
"null"
]
},
"working_on": {
"description": "Problem ids, or codes (a code stands for every open problem of that code).",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"working_on"
],
"title": "HandoffProgressRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"note": {
"type": [
"string",
"null"
]
},
"working_on": {
"description": "The problem ids the names resolved to in the newest check.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"working_on"
],
"title": "HandoffProgressResponse",
"type": "object"
}
},
{
"description": "The page's own: stop the agent's running turn for a hand-off, with the harness's own stop. Agents never call it.",
"metadata": {},
"name": "iii-cloud::handoff::stop",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::handoff::stop` input.",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"title": "HandoffStopRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"id": {
"type": "string"
},
"stopping": {
"description": "The harness accepted the stop of the session's running turn.",
"type": "boolean"
}
},
"required": [
"id",
"stopping"
],
"title": "HandoffStopResponse",
"type": "object"
}
},
{
"description": "Your hand-off's own worktree: {path, branch, base, created, merged_from, conflict}. Work only there, never in the person's folder. A hand-off that points at the person's folder gets one now (from the environment's branch, the person's branch merged in) and works there from then on; the page's selection does not change. handoff_id defaults to the selected environment's open hand-off.",
"metadata": {},
"name": "iii-cloud::handoff::worktree",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::handoff::worktree` input.",
"properties": {
"handoff_id": {
"default": null,
"description": "The hand-off (default: the selected environment's open one). `id` works too.",
"type": [
"string",
"null"
]
}
},
"title": "HandoffWorktreeRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"BriefBase": {
"properties": {
"branch": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"branch",
"sha"
],
"type": "object"
}
},
"description": "The worktree a hand-off works in: never the person's checkout.",
"properties": {
"base": {
"anyOf": [
{
"$ref": "#/definitions/BriefBase"
},
{
"type": "null"
}
],
"description": "What the worktree started from: the person's commit it took, else the environment's head."
},
"branch": {
"description": "The fix branch, `iii-cloud/ready-<env>` (or `-2`, ...).",
"type": "string"
},
"conflict": {
"description": "The person's commits conflict with the environment's branch: the worktree is at the base, and this says what to merge.",
"type": [
"string",
"null"
]
},
"created": {
"description": "This call made the worktree; false: it was there.",
"type": "boolean"
},
"merged_from": {
"description": "The person's branch (or the check's `source`) this call merged in on top of the environment's branch; null when nothing came in.",
"type": [
"string",
"null"
]
},
"path": {
"type": "string"
}
},
"required": [
"branch",
"created",
"path"
],
"title": "HandoffWorktree",
"type": "object"
}
},
{
"description": "The page's own: open the environment's live log tail (iii cloud's logs/tail, as the person). Returns {follow_id}; every line, gap and the end reach iii-cloud::on-log with that follow_id. worker: only that worker's lines. It ends by itself when the stream ends and after 30 minutes. Agents never call it.",
"metadata": {},
"name": "iii-cloud::logs::follow",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::logs::follow` input.",
"properties": {
"environment_id": {
"type": "string"
},
"follow_id": {
"default": null,
"description": "The page's own id for the follow (letters, digits, `-`, `_`; at most 64), so it can listen before the first event. Default: the worker makes one.",
"type": [
"string",
"null"
]
},
"worker": {
"default": null,
"description": "Only this worker's lines.",
"type": [
"string",
"null"
]
}
},
"required": [
"environment_id"
],
"title": "LogsFollowRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::logs::follow` and `iii-cloud::stream::follow` output.",
"properties": {
"follow_id": {
"type": "string"
}
},
"required": [
"follow_id"
],
"title": "FollowStarted",
"type": "object"
}
},
{
"description": "The page's own: close a follow of logs::follow. Agents never call it.",
"metadata": {},
"name": "iii-cloud::logs::unfollow",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::logs::unfollow` and `iii-cloud::stream::unfollow` input.",
"properties": {
"follow_id": {
"type": "string"
}
},
"required": [
"follow_id"
],
"title": "UnfollowRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::logs::unfollow` and `iii-cloud::stream::unfollow` output.",
"properties": {
"closed": {
"description": "False when no such follow was open (it had ended).",
"type": "boolean"
}
},
"required": [
"closed"
],
"title": "Unfollowed",
"type": "object"
}
},
{
"description": "Called after each iii-cloud record changes (connection, project, check, run, secret, deploy, alerts); returns the event. Takes no args; observe it with filters on input.kind and input.terminal. Only the iii-cloud worker calls it.",
"metadata": {},
"name": "iii-cloud::on-change",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"EventKind": {
"oneOf": [
{
"enum": [
"agent",
"connection",
"project",
"check",
"run",
"secret",
"deploy"
],
"type": "string"
},
{
"description": "The current alerts changed: the record is `Alerts`.",
"enum": [
"alerts"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::on-change` event: one record changed.",
"properties": {
"id": {
"description": "The record's id (`current` for `connection` and `project`).",
"type": "string"
},
"kind": {
"$ref": "#/definitions/EventKind"
},
"record": {
"description": "Connection, Project, Check, Run, SecretRequest, Deploy or Alerts."
},
"summary": {
"description": "One line, e.g. \"deploy 7a1f3b2 failed at workers: OOMKilled\".",
"type": "string"
},
"terminal": {
"description": "A run or deploy finished, a secret resolved, the connection settled.",
"type": "boolean"
}
},
"required": [
"id",
"kind",
"record",
"summary",
"terminal"
],
"title": "ChangeEvent",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"EventKind": {
"oneOf": [
{
"enum": [
"agent",
"connection",
"project",
"check",
"run",
"secret",
"deploy"
],
"type": "string"
},
{
"description": "The current alerts changed: the record is `Alerts`.",
"enum": [
"alerts"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::on-change` event: one record changed.",
"properties": {
"id": {
"description": "The record's id (`current` for `connection` and `project`).",
"type": "string"
},
"kind": {
"$ref": "#/definitions/EventKind"
},
"record": {
"description": "Connection, Project, Check, Run, SecretRequest, Deploy or Alerts."
},
"summary": {
"description": "One line, e.g. \"deploy 7a1f3b2 failed at workers: OOMKilled\".",
"type": "string"
},
"terminal": {
"description": "A run or deploy finished, a secret resolved, the connection settled.",
"type": "boolean"
}
},
"required": [
"id",
"kind",
"record",
"summary",
"terminal"
],
"title": "ChangeEvent",
"type": "object"
}
},
{
"description": "Internal: reload iii-cloud configuration when it changes.",
"metadata": {
"internal": true
},
"name": "iii-cloud::on-config-change",
"request_schema": {
"properties": {},
"type": "object"
},
"response_schema": {
"properties": {
"ok": {
"type": "boolean"
}
},
"type": "object"
}
},
{
"description": "Called for each event of a followed log tail (logs::follow): type line (with line), gap (with missed) or end (with reason); carries follow_id. Observe it and filter on input.follow_id. Only the iii-cloud worker calls it.",
"metadata": {},
"name": "iii-cloud::on-log",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"LogEventType": {
"enum": [
"line",
"gap",
"end"
],
"type": "string"
}
},
"description": "`iii-cloud::on-log` event: one event of a followed log tail.",
"properties": {
"environment_id": {
"type": "string"
},
"follow_id": {
"type": "string"
},
"line": {
"description": "On `line`: the cloud's LogLine."
},
"missed": {
"description": "On `gap`: how many lines were dropped.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"reason": {
"description": "On `end`: `stream_ended`, `time_limit`, `not_connected`, `not_allowed`, `not_found` or `unreachable`.",
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/LogEventType"
}
},
"required": [
"environment_id",
"follow_id",
"type"
],
"title": "LogEvent",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"LogEventType": {
"enum": [
"line",
"gap",
"end"
],
"type": "string"
}
},
"description": "`iii-cloud::on-log` event: one event of a followed log tail.",
"properties": {
"environment_id": {
"type": "string"
},
"follow_id": {
"type": "string"
},
"line": {
"description": "On `line`: the cloud's LogLine."
},
"missed": {
"description": "On `gap`: how many lines were dropped.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"reason": {
"description": "On `end`: `stream_ended`, `time_limit`, `not_connected`, `not_allowed`, `not_found` or `unreachable`.",
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/definitions/LogEventType"
}
},
"required": [
"environment_id",
"follow_id",
"type"
],
"title": "LogEvent",
"type": "object"
}
},
{
"description": "Called for each event of a followed deployment or machines stream (stream::follow): type event (with the cloud's event) or end (with reason); carries follow_id and kind. Observe it and filter on input.follow_id. Only the iii-cloud worker calls it.",
"metadata": {},
"name": "iii-cloud::on-stream",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"StreamEventType": {
"enum": [
"event",
"end"
],
"type": "string"
},
"StreamKind": {
"oneOf": [
{
"description": "A deployment's stages, log lines and statuses.",
"enum": [
"deployment"
],
"type": "string"
},
{
"description": "The environment's machines: a snapshot on every change, and scaling steps.",
"enum": [
"machines"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::on-stream` event: one event of a followed deployment or machines stream.",
"properties": {
"environment_id": {
"type": "string"
},
"event": {
"description": "On `event`: the cloud's DeploymentEvent or MachinesEvent, as it came."
},
"follow_id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/StreamKind"
},
"reason": {
"description": "On `end`: as in `LogEvent`; a deployment's follow also ends with `stream_ended` after its terminal status.",
"type": [
"string",
"null"
]
},
"type": {
"allOf": [
{
"$ref": "#/definitions/StreamEventType"
}
],
"description": "`event` carries the cloud's event; `end` closes the follow."
}
},
"required": [
"environment_id",
"follow_id",
"kind",
"type"
],
"title": "StreamEvent",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"StreamEventType": {
"enum": [
"event",
"end"
],
"type": "string"
},
"StreamKind": {
"oneOf": [
{
"description": "A deployment's stages, log lines and statuses.",
"enum": [
"deployment"
],
"type": "string"
},
{
"description": "The environment's machines: a snapshot on every change, and scaling steps.",
"enum": [
"machines"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::on-stream` event: one event of a followed deployment or machines stream.",
"properties": {
"environment_id": {
"type": "string"
},
"event": {
"description": "On `event`: the cloud's DeploymentEvent or MachinesEvent, as it came."
},
"follow_id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/StreamKind"
},
"reason": {
"description": "On `end`: as in `LogEvent`; a deployment's follow also ends with `stream_ended` after its terminal status.",
"type": [
"string",
"null"
]
},
"type": {
"allOf": [
{
"$ref": "#/definitions/StreamEventType"
}
],
"description": "`event` carries the cloud's event; `end` closes the follow."
}
},
"required": [
"environment_id",
"follow_id",
"kind",
"type"
],
"title": "StreamEvent",
"type": "object"
}
},
{
"description": "The page's own: keep the person's choice for a console override of the newest check (file: the file's value wins at deploy; console: keep the console's, which takes a change to the file). A changed console or file value drops it. Agents never call it.",
"metadata": {},
"name": "iii-cloud::override::choose",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"OverrideChoice": {
"description": "Which value of a console override the person keeps.",
"oneOf": [
{
"description": "The file's value wins at deploy (what the deploy does already).",
"enum": [
"file"
],
"type": "string"
},
{
"description": "The console's value is kept, which takes a change to the file.",
"enum": [
"console"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::override::choose` input: the page's own.",
"properties": {
"choice": {
"$ref": "#/definitions/OverrideChoice"
},
"environment_id": {
"description": "The selected environment, as a guard (`ENVIRONMENT_CHANGED`).",
"type": "string"
},
"setting": {
"description": "The override's setting (`web`), as the newest check lists it.",
"type": "string"
}
},
"required": [
"choice",
"environment_id",
"setting"
],
"title": "OverrideChoose",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"OverrideChoice": {
"description": "Which value of a console override the person keeps.",
"oneOf": [
{
"description": "The file's value wins at deploy (what the deploy does already).",
"enum": [
"file"
],
"type": "string"
},
{
"description": "The console's value is kept, which takes a change to the file.",
"enum": [
"console"
],
"type": "string"
}
]
}
},
"description": "The environment's choices after `iii-cloud::override::choose`, as `Status.override_choices`.",
"properties": {
"environment_id": {
"type": "string"
},
"override_choices": {
"additionalProperties": {
"$ref": "#/definitions/OverrideChoice"
},
"type": "object"
}
},
"required": [
"environment_id",
"override_choices"
],
"title": "OverrideChosen",
"type": "object"
}
},
{
"description": "The page's own: skip a cloud warning for now in the selected environment (`skip: false` undoes it); only LOCAL_CONFIG_NOT_SET. The next check shows it skipped, as info. Agents never call it.",
"metadata": {},
"name": "iii-cloud::problem::skip",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::problem::skip` input: the page's own. Only the warnings in `values::SKIPPABLE_PROBLEMS` (`LOCAL_CONFIG_NOT_SET`).",
"properties": {
"code": {
"type": "string"
},
"environment_id": {
"description": "The selected environment, as a guard (`ENVIRONMENT_CHANGED`).",
"type": "string"
},
"skip": {
"description": "`false` undoes the skip.",
"type": "boolean"
}
},
"required": [
"code",
"environment_id",
"skip"
],
"title": "ProblemSkip",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "The environment's skipped warning codes after `iii-cloud::problem::skip`, sorted.",
"properties": {
"codes": {
"items": {
"type": "string"
},
"type": "array"
},
"environment_id": {
"type": "string"
}
},
"required": [
"codes",
"environment_id"
],
"title": "ProblemsSkipped",
"type": "object"
}
},
{
"description": "The page's own: import the repository as a new cloud project with its first environment, on the person's explicit choice, then select it (while another project is selected, it becomes status.candidate instead). Agents never call it.",
"metadata": {},
"name": "iii-cloud::project::create",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::project::create` input: import this repository as a new cloud project.",
"properties": {
"environment_name": {
"description": "Lowercase letters, digits and hyphens, at most 30.",
"type": "string"
},
"manifest": {
"description": "One of the repository's choosable compose files, relative to its root.",
"type": "string"
},
"path": {
"description": "A local folder inside the repository.",
"type": "string"
},
"production": {
"default": null,
"description": "The first environment is production (default true).",
"type": [
"boolean",
"null"
]
},
"team_id": {
"type": "string"
}
},
"required": [
"environment_name",
"manifest",
"path",
"team_id"
],
"title": "ProjectCreateRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"BranchRef": {
"description": "A branch `project::use {from: checkout, source: name}` can take.",
"properties": {
"ahead": {
"description": "Commits the selected environment's branch (`origin/<branch>`) does not have; null when that branch is not on origin.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"committed_at": {
"type": "string"
},
"is_env_branch": {
"description": "The selected environment deploys this branch.",
"type": "boolean"
},
"name": {
"description": "`main`, or `origin/feature-x` for a branch only on origin.",
"type": "string"
},
"remote": {
"type": "boolean"
},
"sha": {
"type": "string"
}
},
"required": [
"committed_at",
"is_env_branch",
"name",
"remote",
"sha"
],
"type": "object"
},
"Checkout": {
"properties": {
"ahead": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"branch": {
"type": [
"string",
"null"
]
},
"branches": {
"default": [],
"description": "Local branches and origin's, newest commit first, at most 30; a local branch hides its origin twin. Read on refresh, from the refs as they are.",
"items": {
"$ref": "#/definitions/BranchRef"
},
"type": "array"
},
"changed_files": {
"items": {
"type": "string"
},
"type": "array"
},
"head": {
"type": "string"
},
"not_served": {
"default": null,
"description": "The checkout's commits the selected environment does not serve (`<served>..HEAD`, newest first, at most 50), read on refresh. Null when nothing is served yet or the served commit could not be fetched.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": [
"array",
"null"
]
}
},
"required": [
"ahead",
"changed_files",
"head"
],
"type": "object"
},
"CloudProject": {
"properties": {
"created_at": {
"default": null,
"description": "When the project was made (for choosing between several).",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"description": "Its newest deployment, when more than one project uses the repository.",
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"description": "The console's `$project` URL segment (`endpoint_slug`).",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"CloudProjectInfo": {
"description": "A cloud project of the repository, for the page's project and environment selectors.",
"properties": {
"created_at": {
"default": null,
"type": [
"string",
"null"
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentFull"
},
"type": "array"
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"environments",
"id",
"name",
"team"
],
"type": "object"
},
"CommitLine": {
"properties": {
"message": {
"description": "The subject line.",
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"message",
"sha"
],
"type": "object"
},
"EnvironmentBrief": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentFull": {
"properties": {
"branch": {
"type": "string"
},
"head": {
"default": null,
"description": "Its branch's head on origin, read on refresh. Null before the first refresh, or when origin did not answer or has no such branch.",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentInfo": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"Importable": {
"properties": {
"manifests": {
"items": {
"$ref": "#/definitions/ImportableManifest"
},
"type": "array"
},
"repository_id": {
"format": "int64",
"type": "integer"
},
"team_id": {
"type": "string"
}
},
"required": [
"manifests",
"repository_id",
"team_id"
],
"type": "object"
},
"ImportableManifest": {
"properties": {
"choosable": {
"type": "boolean"
},
"has_cloud_block": {
"default": false,
"description": "The file on this machine has a `cloud:` section.",
"type": "boolean"
},
"issue": {
"type": [
"string",
"null"
]
},
"path": {
"type": "string"
},
"suggested_environment": {
"type": [
"string",
"null"
]
},
"workers": {
"default": null,
"description": "Its containers, as the file on this machine says (else as iii cloud lists them); null when neither knows.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"choosable",
"path"
],
"type": "object"
},
"OtherCloudProject": {
"description": "A live cloud project of the person's teams that deploys another repository: it can't be used with this folder.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"repository": {
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"id",
"name",
"repository",
"team"
],
"type": "object"
},
"Project": {
"properties": {
"checkout": {
"$ref": "#/definitions/Checkout"
},
"cloud_project": {
"anyOf": [
{
"$ref": "#/definitions/CloudProject"
},
{
"type": "null"
}
]
},
"cloud_projects": {
"default": [],
"description": "Every cloud project that uses this repository, across the person's teams, with its environments. The chosen one is `cloud_project`; `project::use {cloud_project_id}` picks another.",
"items": {
"$ref": "#/definitions/CloudProjectInfo"
},
"type": "array"
},
"default_branch": {
"default": null,
"description": "The repository's default branch.",
"type": [
"string",
"null"
]
},
"environment": {
"anyOf": [
{
"$ref": "#/definitions/EnvironmentInfo"
},
{
"type": "null"
}
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentBrief"
},
"type": "array"
},
"fell_back_from": {
"description": "Only in `project::use`'s answer: the `environment_id` asked for, which the cloud project no longer lists, so its default environment was taken.",
"type": [
"string",
"null"
]
},
"github_access": {
"type": [
"boolean",
"null"
]
},
"importable": {
"anyOf": [
{
"$ref": "#/definitions/Importable"
},
{
"type": "null"
}
]
},
"other_cloud_projects": {
"default": [],
"description": "Live projects of the person's teams that deploy another repository.",
"items": {
"$ref": "#/definitions/OtherCloudProject"
},
"type": "array"
},
"path": {
"type": "string"
},
"repository": {
"description": "`owner/name`.",
"type": "string"
},
"team": {
"anyOf": [
{
"$ref": "#/definitions/TeamRef"
},
{
"type": "null"
}
]
},
"teams": {
"items": {
"$ref": "#/definitions/TeamRef"
},
"type": "array"
},
"workspace": {
"anyOf": [
{
"$ref": "#/definitions/Workspace"
},
{
"type": "null"
}
]
}
},
"required": [
"checkout",
"environments",
"path",
"repository",
"teams"
],
"type": "object"
},
"TeamName": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"TeamRef": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"id",
"name",
"slug"
],
"type": "object"
},
"Workspace": {
"properties": {
"branch": {
"type": "string"
},
"from_head": {
"default": null,
"description": "The last commit the worktree took from the person's checkout (`from: checkout`): commits after it are the agent's. Null for a worktree made from the environment's branch.",
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/definitions/WorkspaceMode"
},
"path": {
"type": "string"
},
"source": {
"default": null,
"description": "The branch `use {from: checkout, source}` took; null: the checkout's HEAD.",
"type": [
"string",
"null"
]
},
"source_sha": {
"default": null,
"description": "The commit `source` (else the checkout's HEAD) pointed at when the worktree was prepared: \"moved since\" compares the source's tip with it.",
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"mode",
"path"
],
"type": "object"
},
"WorkspaceMode": {
"enum": [
"worktree",
"checkout"
],
"type": "string"
}
},
"description": "The answer of `project::create` and `project::create_environment`: the cloud projects read fresh, the new ids, and what is selected now.",
"properties": {
"cloud_projects": {
"items": {
"$ref": "#/definitions/CloudProjectInfo"
},
"type": "array"
},
"environment_id": {
"type": [
"string",
"null"
]
},
"project": {
"allOf": [
{
"$ref": "#/definitions/Project"
}
],
"description": "The project as selected after `project::use`; while another project with a workspace is selected, the new one as `Status.candidate`, not selected."
},
"project_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"cloud_projects",
"project"
],
"title": "CreateResponse",
"type": "object"
}
},
{
"description": "The page's own: make a new environment in a cloud project (branch, compose file and copy_from default sensibly), on the person's explicit choice, then select it (an environment of status.candidate's project is not selected). Agents never call it.",
"metadata": {},
"name": "iii-cloud::project::create_environment",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::project::create_environment` input.",
"properties": {
"branch": {
"default": null,
"description": "Default: the repository's default branch.",
"type": [
"string",
"null"
]
},
"cloud_project_id": {
"type": "string"
},
"copy_from": {
"default": null,
"description": "Default: the project's production environment, so secrets and settings carry over.",
"type": [
"string",
"null"
]
},
"manifest": {
"default": null,
"description": "Default: the selected environment's compose file.",
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"default": null,
"type": [
"boolean",
"null"
]
},
"start_empty": {
"default": null,
"description": "Copy nothing: no `copy_from` default. Not with `copy_from`.",
"type": [
"boolean",
"null"
]
}
},
"required": [
"cloud_project_id",
"name"
],
"title": "EnvironmentCreateRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"BranchRef": {
"description": "A branch `project::use {from: checkout, source: name}` can take.",
"properties": {
"ahead": {
"description": "Commits the selected environment's branch (`origin/<branch>`) does not have; null when that branch is not on origin.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"committed_at": {
"type": "string"
},
"is_env_branch": {
"description": "The selected environment deploys this branch.",
"type": "boolean"
},
"name": {
"description": "`main`, or `origin/feature-x` for a branch only on origin.",
"type": "string"
},
"remote": {
"type": "boolean"
},
"sha": {
"type": "string"
}
},
"required": [
"committed_at",
"is_env_branch",
"name",
"remote",
"sha"
],
"type": "object"
},
"Checkout": {
"properties": {
"ahead": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"branch": {
"type": [
"string",
"null"
]
},
"branches": {
"default": [],
"description": "Local branches and origin's, newest commit first, at most 30; a local branch hides its origin twin. Read on refresh, from the refs as they are.",
"items": {
"$ref": "#/definitions/BranchRef"
},
"type": "array"
},
"changed_files": {
"items": {
"type": "string"
},
"type": "array"
},
"head": {
"type": "string"
},
"not_served": {
"default": null,
"description": "The checkout's commits the selected environment does not serve (`<served>..HEAD`, newest first, at most 50), read on refresh. Null when nothing is served yet or the served commit could not be fetched.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": [
"array",
"null"
]
}
},
"required": [
"ahead",
"changed_files",
"head"
],
"type": "object"
},
"CloudProject": {
"properties": {
"created_at": {
"default": null,
"description": "When the project was made (for choosing between several).",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"description": "Its newest deployment, when more than one project uses the repository.",
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"description": "The console's `$project` URL segment (`endpoint_slug`).",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"CloudProjectInfo": {
"description": "A cloud project of the repository, for the page's project and environment selectors.",
"properties": {
"created_at": {
"default": null,
"type": [
"string",
"null"
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentFull"
},
"type": "array"
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"environments",
"id",
"name",
"team"
],
"type": "object"
},
"CommitLine": {
"properties": {
"message": {
"description": "The subject line.",
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"message",
"sha"
],
"type": "object"
},
"EnvironmentBrief": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentFull": {
"properties": {
"branch": {
"type": "string"
},
"head": {
"default": null,
"description": "Its branch's head on origin, read on refresh. Null before the first refresh, or when origin did not answer or has no such branch.",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentInfo": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"Importable": {
"properties": {
"manifests": {
"items": {
"$ref": "#/definitions/ImportableManifest"
},
"type": "array"
},
"repository_id": {
"format": "int64",
"type": "integer"
},
"team_id": {
"type": "string"
}
},
"required": [
"manifests",
"repository_id",
"team_id"
],
"type": "object"
},
"ImportableManifest": {
"properties": {
"choosable": {
"type": "boolean"
},
"has_cloud_block": {
"default": false,
"description": "The file on this machine has a `cloud:` section.",
"type": "boolean"
},
"issue": {
"type": [
"string",
"null"
]
},
"path": {
"type": "string"
},
"suggested_environment": {
"type": [
"string",
"null"
]
},
"workers": {
"default": null,
"description": "Its containers, as the file on this machine says (else as iii cloud lists them); null when neither knows.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"choosable",
"path"
],
"type": "object"
},
"OtherCloudProject": {
"description": "A live cloud project of the person's teams that deploys another repository: it can't be used with this folder.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"repository": {
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"id",
"name",
"repository",
"team"
],
"type": "object"
},
"Project": {
"properties": {
"checkout": {
"$ref": "#/definitions/Checkout"
},
"cloud_project": {
"anyOf": [
{
"$ref": "#/definitions/CloudProject"
},
{
"type": "null"
}
]
},
"cloud_projects": {
"default": [],
"description": "Every cloud project that uses this repository, across the person's teams, with its environments. The chosen one is `cloud_project`; `project::use {cloud_project_id}` picks another.",
"items": {
"$ref": "#/definitions/CloudProjectInfo"
},
"type": "array"
},
"default_branch": {
"default": null,
"description": "The repository's default branch.",
"type": [
"string",
"null"
]
},
"environment": {
"anyOf": [
{
"$ref": "#/definitions/EnvironmentInfo"
},
{
"type": "null"
}
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentBrief"
},
"type": "array"
},
"fell_back_from": {
"description": "Only in `project::use`'s answer: the `environment_id` asked for, which the cloud project no longer lists, so its default environment was taken.",
"type": [
"string",
"null"
]
},
"github_access": {
"type": [
"boolean",
"null"
]
},
"importable": {
"anyOf": [
{
"$ref": "#/definitions/Importable"
},
{
"type": "null"
}
]
},
"other_cloud_projects": {
"default": [],
"description": "Live projects of the person's teams that deploy another repository.",
"items": {
"$ref": "#/definitions/OtherCloudProject"
},
"type": "array"
},
"path": {
"type": "string"
},
"repository": {
"description": "`owner/name`.",
"type": "string"
},
"team": {
"anyOf": [
{
"$ref": "#/definitions/TeamRef"
},
{
"type": "null"
}
]
},
"teams": {
"items": {
"$ref": "#/definitions/TeamRef"
},
"type": "array"
},
"workspace": {
"anyOf": [
{
"$ref": "#/definitions/Workspace"
},
{
"type": "null"
}
]
}
},
"required": [
"checkout",
"environments",
"path",
"repository",
"teams"
],
"type": "object"
},
"TeamName": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"TeamRef": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"id",
"name",
"slug"
],
"type": "object"
},
"Workspace": {
"properties": {
"branch": {
"type": "string"
},
"from_head": {
"default": null,
"description": "The last commit the worktree took from the person's checkout (`from: checkout`): commits after it are the agent's. Null for a worktree made from the environment's branch.",
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/definitions/WorkspaceMode"
},
"path": {
"type": "string"
},
"source": {
"default": null,
"description": "The branch `use {from: checkout, source}` took; null: the checkout's HEAD.",
"type": [
"string",
"null"
]
},
"source_sha": {
"default": null,
"description": "The commit `source` (else the checkout's HEAD) pointed at when the worktree was prepared: \"moved since\" compares the source's tip with it.",
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"mode",
"path"
],
"type": "object"
},
"WorkspaceMode": {
"enum": [
"worktree",
"checkout"
],
"type": "string"
}
},
"description": "The answer of `project::create` and `project::create_environment`: the cloud projects read fresh, the new ids, and what is selected now.",
"properties": {
"cloud_projects": {
"items": {
"$ref": "#/definitions/CloudProjectInfo"
},
"type": "array"
},
"environment_id": {
"type": [
"string",
"null"
]
},
"project": {
"allOf": [
{
"$ref": "#/definitions/Project"
}
],
"description": "The project as selected after `project::use`; while another project with a workspace is selected, the new one as `Status.candidate`, not selected."
},
"project_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"cloud_projects",
"project"
],
"title": "CreateResponse",
"type": "object"
}
},
{
"description": "Read the local folder and find its project and environment in iii cloud. While a project with a workspace is selected, the folder is kept as status.candidate, not selected: project::use selects it.",
"metadata": {},
"name": "iii-cloud::project::resolve",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::project::resolve` input.",
"properties": {
"cloud_project_id": {
"default": null,
"description": "Several cloud projects use the repository: take this one.",
"type": [
"string",
"null"
]
},
"path": {
"description": "A local folder inside the repository.",
"type": "string"
},
"team_id": {
"default": null,
"description": "Look only in this team.",
"type": [
"string",
"null"
]
}
},
"required": [
"path"
],
"title": "ResolveRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"BranchRef": {
"description": "A branch `project::use {from: checkout, source: name}` can take.",
"properties": {
"ahead": {
"description": "Commits the selected environment's branch (`origin/<branch>`) does not have; null when that branch is not on origin.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"committed_at": {
"type": "string"
},
"is_env_branch": {
"description": "The selected environment deploys this branch.",
"type": "boolean"
},
"name": {
"description": "`main`, or `origin/feature-x` for a branch only on origin.",
"type": "string"
},
"remote": {
"type": "boolean"
},
"sha": {
"type": "string"
}
},
"required": [
"committed_at",
"is_env_branch",
"name",
"remote",
"sha"
],
"type": "object"
},
"Checkout": {
"properties": {
"ahead": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"branch": {
"type": [
"string",
"null"
]
},
"branches": {
"default": [],
"description": "Local branches and origin's, newest commit first, at most 30; a local branch hides its origin twin. Read on refresh, from the refs as they are.",
"items": {
"$ref": "#/definitions/BranchRef"
},
"type": "array"
},
"changed_files": {
"items": {
"type": "string"
},
"type": "array"
},
"head": {
"type": "string"
},
"not_served": {
"default": null,
"description": "The checkout's commits the selected environment does not serve (`<served>..HEAD`, newest first, at most 50), read on refresh. Null when nothing is served yet or the served commit could not be fetched.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": [
"array",
"null"
]
}
},
"required": [
"ahead",
"changed_files",
"head"
],
"type": "object"
},
"CloudProject": {
"properties": {
"created_at": {
"default": null,
"description": "When the project was made (for choosing between several).",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"description": "Its newest deployment, when more than one project uses the repository.",
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"description": "The console's `$project` URL segment (`endpoint_slug`).",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"CloudProjectInfo": {
"description": "A cloud project of the repository, for the page's project and environment selectors.",
"properties": {
"created_at": {
"default": null,
"type": [
"string",
"null"
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentFull"
},
"type": "array"
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"environments",
"id",
"name",
"team"
],
"type": "object"
},
"CommitLine": {
"properties": {
"message": {
"description": "The subject line.",
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"message",
"sha"
],
"type": "object"
},
"EnvironmentBrief": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentFull": {
"properties": {
"branch": {
"type": "string"
},
"head": {
"default": null,
"description": "Its branch's head on origin, read on refresh. Null before the first refresh, or when origin did not answer or has no such branch.",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentInfo": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"Importable": {
"properties": {
"manifests": {
"items": {
"$ref": "#/definitions/ImportableManifest"
},
"type": "array"
},
"repository_id": {
"format": "int64",
"type": "integer"
},
"team_id": {
"type": "string"
}
},
"required": [
"manifests",
"repository_id",
"team_id"
],
"type": "object"
},
"ImportableManifest": {
"properties": {
"choosable": {
"type": "boolean"
},
"has_cloud_block": {
"default": false,
"description": "The file on this machine has a `cloud:` section.",
"type": "boolean"
},
"issue": {
"type": [
"string",
"null"
]
},
"path": {
"type": "string"
},
"suggested_environment": {
"type": [
"string",
"null"
]
},
"workers": {
"default": null,
"description": "Its containers, as the file on this machine says (else as iii cloud lists them); null when neither knows.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"choosable",
"path"
],
"type": "object"
},
"OtherCloudProject": {
"description": "A live cloud project of the person's teams that deploys another repository: it can't be used with this folder.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"repository": {
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"id",
"name",
"repository",
"team"
],
"type": "object"
},
"TeamName": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"TeamRef": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"id",
"name",
"slug"
],
"type": "object"
},
"Workspace": {
"properties": {
"branch": {
"type": "string"
},
"from_head": {
"default": null,
"description": "The last commit the worktree took from the person's checkout (`from: checkout`): commits after it are the agent's. Null for a worktree made from the environment's branch.",
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/definitions/WorkspaceMode"
},
"path": {
"type": "string"
},
"source": {
"default": null,
"description": "The branch `use {from: checkout, source}` took; null: the checkout's HEAD.",
"type": [
"string",
"null"
]
},
"source_sha": {
"default": null,
"description": "The commit `source` (else the checkout's HEAD) pointed at when the worktree was prepared: \"moved since\" compares the source's tip with it.",
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"mode",
"path"
],
"type": "object"
},
"WorkspaceMode": {
"enum": [
"worktree",
"checkout"
],
"type": "string"
}
},
"properties": {
"checkout": {
"$ref": "#/definitions/Checkout"
},
"cloud_project": {
"anyOf": [
{
"$ref": "#/definitions/CloudProject"
},
{
"type": "null"
}
]
},
"cloud_projects": {
"default": [],
"description": "Every cloud project that uses this repository, across the person's teams, with its environments. The chosen one is `cloud_project`; `project::use {cloud_project_id}` picks another.",
"items": {
"$ref": "#/definitions/CloudProjectInfo"
},
"type": "array"
},
"default_branch": {
"default": null,
"description": "The repository's default branch.",
"type": [
"string",
"null"
]
},
"environment": {
"anyOf": [
{
"$ref": "#/definitions/EnvironmentInfo"
},
{
"type": "null"
}
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentBrief"
},
"type": "array"
},
"fell_back_from": {
"description": "Only in `project::use`'s answer: the `environment_id` asked for, which the cloud project no longer lists, so its default environment was taken.",
"type": [
"string",
"null"
]
},
"github_access": {
"type": [
"boolean",
"null"
]
},
"importable": {
"anyOf": [
{
"$ref": "#/definitions/Importable"
},
{
"type": "null"
}
]
},
"other_cloud_projects": {
"default": [],
"description": "Live projects of the person's teams that deploy another repository.",
"items": {
"$ref": "#/definitions/OtherCloudProject"
},
"type": "array"
},
"path": {
"type": "string"
},
"repository": {
"description": "`owner/name`.",
"type": "string"
},
"team": {
"anyOf": [
{
"$ref": "#/definitions/TeamRef"
},
{
"type": "null"
}
]
},
"teams": {
"items": {
"$ref": "#/definitions/TeamRef"
},
"type": "array"
},
"workspace": {
"anyOf": [
{
"$ref": "#/definitions/Workspace"
},
{
"type": "null"
}
]
}
},
"required": [
"checkout",
"environments",
"path",
"repository",
"teams"
],
"title": "Project",
"type": "object"
}
},
{
"description": "Select the environment and prepare a worktree for you to work in.",
"metadata": {},
"name": "iii-cloud::project::use",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"UseFrom": {
"enum": [
"environment",
"checkout"
],
"type": "string"
},
"WorkspaceMode": {
"enum": [
"worktree",
"checkout"
],
"type": "string"
}
},
"description": "`iii-cloud::project::use` input.",
"properties": {
"cloud_project_id": {
"default": null,
"description": "Several cloud projects use the repository: take this one.",
"type": [
"string",
"null"
]
},
"environment_id": {
"default": null,
"description": "The environment; or only `cloud_project_id`, for that project's default one.",
"type": [
"string",
"null"
]
},
"from": {
"anyOf": [
{
"$ref": "#/definitions/UseFrom"
},
{
"type": "null"
}
],
"default": null,
"description": "Where the worktree's commits come from. `environment` (default): the environment's branch. `checkout`: the person's own HEAD with the environment's head: a fast-forward when one contains the other, else a merge commit made in the worktree (never in the checkout); a conflict leaves the worktree as it was (`MERGE_CONFLICT`, the files in the message). Only commits move: nothing uncommitted is copied. Never for production, which goes through a pull request."
},
"mode": {
"allOf": [
{
"$ref": "#/definitions/WorkspaceMode"
}
],
"description": "`worktree` (recommended) or `checkout`."
},
"path": {
"type": "string"
},
"source": {
"default": null,
"description": "With `from: checkout`: take this branch (`main`, `origin/feature-x`, one of `checkout.branches`) instead of the checkout's HEAD, by the same rule.",
"type": [
"string",
"null"
]
}
},
"required": [
"mode",
"path"
],
"title": "UseRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"BranchRef": {
"description": "A branch `project::use {from: checkout, source: name}` can take.",
"properties": {
"ahead": {
"description": "Commits the selected environment's branch (`origin/<branch>`) does not have; null when that branch is not on origin.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"committed_at": {
"type": "string"
},
"is_env_branch": {
"description": "The selected environment deploys this branch.",
"type": "boolean"
},
"name": {
"description": "`main`, or `origin/feature-x` for a branch only on origin.",
"type": "string"
},
"remote": {
"type": "boolean"
},
"sha": {
"type": "string"
}
},
"required": [
"committed_at",
"is_env_branch",
"name",
"remote",
"sha"
],
"type": "object"
},
"Checkout": {
"properties": {
"ahead": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"branch": {
"type": [
"string",
"null"
]
},
"branches": {
"default": [],
"description": "Local branches and origin's, newest commit first, at most 30; a local branch hides its origin twin. Read on refresh, from the refs as they are.",
"items": {
"$ref": "#/definitions/BranchRef"
},
"type": "array"
},
"changed_files": {
"items": {
"type": "string"
},
"type": "array"
},
"head": {
"type": "string"
},
"not_served": {
"default": null,
"description": "The checkout's commits the selected environment does not serve (`<served>..HEAD`, newest first, at most 50), read on refresh. Null when nothing is served yet or the served commit could not be fetched.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": [
"array",
"null"
]
}
},
"required": [
"ahead",
"changed_files",
"head"
],
"type": "object"
},
"CloudProject": {
"properties": {
"created_at": {
"default": null,
"description": "When the project was made (for choosing between several).",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"description": "Its newest deployment, when more than one project uses the repository.",
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"description": "The console's `$project` URL segment (`endpoint_slug`).",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"CloudProjectInfo": {
"description": "A cloud project of the repository, for the page's project and environment selectors.",
"properties": {
"created_at": {
"default": null,
"type": [
"string",
"null"
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentFull"
},
"type": "array"
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"environments",
"id",
"name",
"team"
],
"type": "object"
},
"CommitLine": {
"properties": {
"message": {
"description": "The subject line.",
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"message",
"sha"
],
"type": "object"
},
"EnvironmentBrief": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentFull": {
"properties": {
"branch": {
"type": "string"
},
"head": {
"default": null,
"description": "Its branch's head on origin, read on refresh. Null before the first refresh, or when origin did not answer or has no such branch.",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentInfo": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"Importable": {
"properties": {
"manifests": {
"items": {
"$ref": "#/definitions/ImportableManifest"
},
"type": "array"
},
"repository_id": {
"format": "int64",
"type": "integer"
},
"team_id": {
"type": "string"
}
},
"required": [
"manifests",
"repository_id",
"team_id"
],
"type": "object"
},
"ImportableManifest": {
"properties": {
"choosable": {
"type": "boolean"
},
"has_cloud_block": {
"default": false,
"description": "The file on this machine has a `cloud:` section.",
"type": "boolean"
},
"issue": {
"type": [
"string",
"null"
]
},
"path": {
"type": "string"
},
"suggested_environment": {
"type": [
"string",
"null"
]
},
"workers": {
"default": null,
"description": "Its containers, as the file on this machine says (else as iii cloud lists them); null when neither knows.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"choosable",
"path"
],
"type": "object"
},
"OtherCloudProject": {
"description": "A live cloud project of the person's teams that deploys another repository: it can't be used with this folder.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"repository": {
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"id",
"name",
"repository",
"team"
],
"type": "object"
},
"TeamName": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"TeamRef": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"id",
"name",
"slug"
],
"type": "object"
},
"Workspace": {
"properties": {
"branch": {
"type": "string"
},
"from_head": {
"default": null,
"description": "The last commit the worktree took from the person's checkout (`from: checkout`): commits after it are the agent's. Null for a worktree made from the environment's branch.",
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/definitions/WorkspaceMode"
},
"path": {
"type": "string"
},
"source": {
"default": null,
"description": "The branch `use {from: checkout, source}` took; null: the checkout's HEAD.",
"type": [
"string",
"null"
]
},
"source_sha": {
"default": null,
"description": "The commit `source` (else the checkout's HEAD) pointed at when the worktree was prepared: \"moved since\" compares the source's tip with it.",
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"mode",
"path"
],
"type": "object"
},
"WorkspaceMode": {
"enum": [
"worktree",
"checkout"
],
"type": "string"
}
},
"properties": {
"checkout": {
"$ref": "#/definitions/Checkout"
},
"cloud_project": {
"anyOf": [
{
"$ref": "#/definitions/CloudProject"
},
{
"type": "null"
}
]
},
"cloud_projects": {
"default": [],
"description": "Every cloud project that uses this repository, across the person's teams, with its environments. The chosen one is `cloud_project`; `project::use {cloud_project_id}` picks another.",
"items": {
"$ref": "#/definitions/CloudProjectInfo"
},
"type": "array"
},
"default_branch": {
"default": null,
"description": "The repository's default branch.",
"type": [
"string",
"null"
]
},
"environment": {
"anyOf": [
{
"$ref": "#/definitions/EnvironmentInfo"
},
{
"type": "null"
}
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentBrief"
},
"type": "array"
},
"fell_back_from": {
"description": "Only in `project::use`'s answer: the `environment_id` asked for, which the cloud project no longer lists, so its default environment was taken.",
"type": [
"string",
"null"
]
},
"github_access": {
"type": [
"boolean",
"null"
]
},
"importable": {
"anyOf": [
{
"$ref": "#/definitions/Importable"
},
{
"type": "null"
}
]
},
"other_cloud_projects": {
"default": [],
"description": "Live projects of the person's teams that deploy another repository.",
"items": {
"$ref": "#/definitions/OtherCloudProject"
},
"type": "array"
},
"path": {
"type": "string"
},
"repository": {
"description": "`owner/name`.",
"type": "string"
},
"team": {
"anyOf": [
{
"$ref": "#/definitions/TeamRef"
},
{
"type": "null"
}
]
},
"teams": {
"items": {
"$ref": "#/definitions/TeamRef"
},
"type": "array"
},
"workspace": {
"anyOf": [
{
"$ref": "#/definitions/Workspace"
},
{
"type": "null"
}
]
}
},
"required": [
"checkout",
"environments",
"path",
"repository",
"teams"
],
"title": "Project",
"type": "object"
}
},
{
"description": "The page's own: open a pull request from one environment's branch into another's (dev into production) with the person's gh, in their project folder, listing the commits; returns the one already open for that head and base instead of a second. Merging it and the deploy stay the person's. Agents never call it.",
"metadata": {},
"name": "iii-cloud::promote",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::promote` input: the page's own.",
"properties": {
"from_environment_id": {
"description": "The environment whose branch goes into the other (dev).",
"type": "string"
},
"to_environment_id": {
"description": "The environment that takes it (production).",
"type": "string"
}
},
"required": [
"from_environment_id",
"to_environment_id"
],
"title": "PromoteRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "The pull request `iii-cloud::promote` opened, or found already open.",
"properties": {
"base": {
"description": "The `to` environment's branch.",
"type": "string"
},
"created": {
"description": "False when a pull request from `head` into `base` was already open.",
"type": "boolean"
},
"head": {
"description": "The `from` environment's branch.",
"type": "string"
},
"number": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"base",
"created",
"head",
"number",
"title",
"url"
],
"title": "Promoted",
"type": "object"
}
},
{
"description": "Prepare a rollback, a cancel or a retry of one deployment for the person to confirm. It only reads (GET) and changes nothing in iii cloud: it checks the deployment can take the action, and answers the proposal (action, environment, project, the deployment, what serves now, and for a rollback what comes back and what stays) or an error with a code and a message to repeat to the person (ALREADY_LIVE, NOT_A_ROLLBACK_TARGET, NOT_RUNNING, NOT_RETRYABLE). The chat draws a card from the answer, and the person confirms there, on the page; you never do. Say the confirmation waits on the card, never that it was done.",
"metadata": {},
"name": "iii-cloud::propose",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ProposeAction": {
"description": "What `iii-cloud::propose` prepares for the person to confirm.",
"enum": [
"rollback",
"cancel",
"retry"
],
"type": "string"
}
},
"description": "`iii-cloud::propose` input.",
"properties": {
"action": {
"$ref": "#/definitions/ProposeAction"
},
"deployment_id": {
"description": "The deployment to roll back to, cancel or retry.",
"type": "string"
},
"environment_id": {
"description": "The environment the deployment belongs to.",
"type": "string"
}
},
"required": [
"action",
"deployment_id",
"environment_id"
],
"title": "ProposeRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ProposalDeployment": {
"properties": {
"finished_at": {
"description": "When the deployment ended, if it did.",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"message": {
"type": [
"string",
"null"
]
},
"number": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"sha": {
"type": "string"
},
"status": {
"description": "The cloud's status: queued, in_progress, needs_action, ready, failed, replaced or canceled.",
"type": "string"
}
},
"required": [
"id",
"number",
"sha",
"status"
],
"type": "object"
},
"ProposalPreview": {
"description": "What a rollback brings back and what stays, as iii cloud's preview says.",
"properties": {
"queue": {
"default": null,
"type": [
"string",
"null"
]
},
"returns": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"side_effects": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"stays": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"ProposeAction": {
"description": "What `iii-cloud::propose` prepares for the person to confirm.",
"enum": [
"rollback",
"cancel",
"retry"
],
"type": "string"
}
},
"description": "A proposal the person confirms on the card in the chat. Nothing was changed in iii cloud.",
"properties": {
"action": {
"$ref": "#/definitions/ProposeAction"
},
"deployment": {
"$ref": "#/definitions/ProposalDeployment"
},
"environment": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"preview": {
"anyOf": [
{
"$ref": "#/definitions/ProposalPreview"
},
{
"type": "null"
}
],
"description": "A rollback's preview; null for cancel and retry."
},
"project": {
"type": "string"
},
"serving": {
"anyOf": [
{
"$ref": "#/definitions/ProposalDeployment"
},
{
"type": "null"
}
],
"description": "What the environment serves now; null when nothing is live."
}
},
"required": [
"action",
"deployment",
"environment",
"environment_id",
"project"
],
"title": "Proposal",
"type": "object"
}
},
{
"description": "Ask the person, on the page, for the value of one secret the compose file reads (a name like STRIPE_KEY in ${STRIPE_KEY}), or mark such a name as not needed or their decision. It is not for workers, groups or any choice that is not a variable: a decision goes to the person with harness::ask.",
"metadata": {},
"name": "iii-cloud::secret",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"SecretMode": {
"enum": [
"ask",
"not_needed",
"decide"
],
"type": "string"
}
},
"description": "`iii-cloud::secret` input.",
"properties": {
"description": {
"description": "What the person needs to know to give the value.",
"type": "string"
},
"external": {
"default": null,
"description": "The person chose a database outside iii cloud: only then may a database URL be asked for.",
"type": [
"boolean",
"null"
]
},
"handoff_id": {
"default": null,
"type": [
"string",
"null"
]
},
"mode": {
"anyOf": [
{
"$ref": "#/definitions/SecretMode"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"description": "`^[A-Z_][A-Z0-9_]*$`, not starting with `III_`.",
"type": "string"
}
},
"required": [
"description",
"name"
],
"title": "SecretAsk",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CloudOutcome": {
"enum": [
"set",
"skipped",
"failed"
],
"type": "string"
},
"EnvironmentInfo": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"LocalOutcome": {
"enum": [
"set",
"skipped"
],
"type": "string"
},
"SecretMode": {
"enum": [
"ask",
"not_needed",
"decide"
],
"type": "string"
},
"SecretState": {
"enum": [
"waiting",
"set",
"left_empty",
"noted",
"failed"
],
"type": "string"
},
"Selected": {
"properties": {
"env": {
"$ref": "#/definitions/EnvironmentInfo"
},
"team_id": {
"type": "string"
},
"workspace": {
"type": "string"
}
},
"required": [
"env",
"team_id",
"workspace"
],
"type": "object"
},
"WorkerError": {
"description": "`{code, message, status?, fix?}` inside records.",
"properties": {
"code": {
"type": "string"
},
"fix": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
}
},
"properties": {
"asked_at": {
"type": "string"
},
"cloud": {
"anyOf": [
{
"$ref": "#/definitions/CloudOutcome"
},
{
"type": "null"
}
]
},
"description": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"external": {
"default": false,
"description": "Asked for a database URL the person chose to keep outside iii cloud.",
"type": "boolean"
},
"id": {
"type": "string"
},
"local": {
"anyOf": [
{
"$ref": "#/definitions/LocalOutcome"
},
{
"type": "null"
}
]
},
"mode": {
"$ref": "#/definitions/SecretMode"
},
"name": {
"type": "string"
},
"resolved_at": {
"type": [
"string",
"null"
]
},
"state": {
"$ref": "#/definitions/SecretState"
},
"target": {
"anyOf": [
{
"$ref": "#/definitions/Selected"
},
{
"type": "null"
}
],
"description": "Where the value goes: the team, worktree and environment the request was asked for, whatever the page has selected when the value is saved."
}
},
"required": [
"asked_at",
"description",
"environment_id",
"id",
"mode",
"name",
"state"
],
"title": "SecretRequest",
"type": "object"
}
},
{
"description": "The page's own: the person's secret value goes to iii cloud and the worktree's .env. Agents never call it, and the value never comes back.",
"metadata": {
"trace_hidden": true
},
"name": "iii-cloud::secret::provide",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::secret::provide` input. Page only.",
"properties": {
"leave_empty": {
"default": null,
"type": [
"boolean",
"null"
]
},
"request_id": {
"type": "string"
},
"value": {
"default": null,
"description": "The secret value. Never logged, never returned.",
"type": [
"string",
"null"
]
}
},
"required": [
"request_id"
],
"title": "ProvideRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CloudOutcome": {
"enum": [
"set",
"skipped",
"failed"
],
"type": "string"
},
"EnvironmentInfo": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"LocalOutcome": {
"enum": [
"set",
"skipped"
],
"type": "string"
},
"SecretMode": {
"enum": [
"ask",
"not_needed",
"decide"
],
"type": "string"
},
"SecretState": {
"enum": [
"waiting",
"set",
"left_empty",
"noted",
"failed"
],
"type": "string"
},
"Selected": {
"properties": {
"env": {
"$ref": "#/definitions/EnvironmentInfo"
},
"team_id": {
"type": "string"
},
"workspace": {
"type": "string"
}
},
"required": [
"env",
"team_id",
"workspace"
],
"type": "object"
},
"WorkerError": {
"description": "`{code, message, status?, fix?}` inside records.",
"properties": {
"code": {
"type": "string"
},
"fix": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
}
},
"properties": {
"asked_at": {
"type": "string"
},
"cloud": {
"anyOf": [
{
"$ref": "#/definitions/CloudOutcome"
},
{
"type": "null"
}
]
},
"description": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"external": {
"default": false,
"description": "Asked for a database URL the person chose to keep outside iii cloud.",
"type": "boolean"
},
"id": {
"type": "string"
},
"local": {
"anyOf": [
{
"$ref": "#/definitions/LocalOutcome"
},
{
"type": "null"
}
]
},
"mode": {
"$ref": "#/definitions/SecretMode"
},
"name": {
"type": "string"
},
"resolved_at": {
"type": [
"string",
"null"
]
},
"state": {
"$ref": "#/definitions/SecretState"
},
"target": {
"anyOf": [
{
"$ref": "#/definitions/Selected"
},
{
"type": "null"
}
],
"description": "Where the value goes: the team, worktree and environment the request was asked for, whatever the page has selected when the value is saved."
}
},
"required": [
"asked_at",
"description",
"environment_id",
"id",
"mode",
"name",
"state"
],
"title": "SecretRequest",
"type": "object"
}
},
{
"description": "The stored state: connection, project, latest check, run, secrets, pull request and deploy. refresh re-reads the checkout, the pull request, the variables and the deployments.",
"metadata": {},
"name": "iii-cloud::status",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::status` input.",
"properties": {
"refresh": {
"default": null,
"description": "Re-read the checkout, the pull request, the variables and the deployments first.",
"type": [
"boolean",
"null"
]
}
},
"title": "StatusRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AgentPhase": {
"oneOf": [
{
"enum": [
"starting",
"working",
"waiting_for_you",
"stalled",
"done",
"stopped"
],
"type": "string"
},
{
"description": "The turn ended on a wake the agent armed (an observer that notifies its chat, unfired and unexpired): it waits on an event, not on the person.",
"enum": [
"waiting"
],
"type": "string"
}
]
},
"AgentState": {
"description": "What the agent is doing for a hand-off, as the worker sees it. Descriptions only: no message body, tool input or result is ever copied here.",
"properties": {
"current": {
"description": "The last call's description, plain text, at most 120 characters.",
"type": [
"string",
"null"
]
},
"handoff_id": {
"type": "string"
},
"kind": {
"anyOf": [
{
"$ref": "#/definitions/HandoffKind"
},
{
"type": "null"
}
],
"default": null,
"description": "What the hand-off is for, so the page can place its row."
},
"last_activity_at": {
"type": [
"string",
"null"
]
},
"note": {
"default": null,
"description": "One plain line from the agent about what it is doing, at most 120 characters.",
"type": [
"string",
"null"
]
},
"question": {
"description": "The open question's text, when the agent waits for an answer.",
"type": [
"string",
"null"
]
},
"question_source": {
"anyOf": [
{
"$ref": "#/definitions/QuestionSource"
},
{
"type": "null"
}
],
"default": null,
"description": "Where `question` comes from: a real ask from the agent's session, or text this worker made from the check's open problems. Absent when there is no question."
},
"session_id": {
"type": [
"string",
"null"
]
},
"started_at": {
"type": "string"
},
"state": {
"$ref": "#/definitions/AgentPhase"
},
"steps": {
"description": "Function calls the session has made.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"waiting_for": {
"default": null,
"description": "What the agent waits for when `state` is `waiting` (\"the run here to end\").",
"type": [
"string",
"null"
]
},
"working_on": {
"default": [],
"description": "Ids of the newest check's problems the agent is working on now (the page shows a spinner on them). Cleared when they leave a newer check or the hand-off ends.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"handoff_id",
"started_at",
"state",
"steps"
],
"type": "object"
},
"ApiKeyRef": {
"properties": {
"environment_id": {
"type": "string"
},
"secret": {
"type": "string"
},
"team_id": {
"type": "string"
}
},
"required": [
"environment_id",
"secret",
"team_id"
],
"type": "object"
},
"BranchRef": {
"description": "A branch `project::use {from: checkout, source: name}` can take.",
"properties": {
"ahead": {
"description": "Commits the selected environment's branch (`origin/<branch>`) does not have; null when that branch is not on origin.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"committed_at": {
"type": "string"
},
"is_env_branch": {
"description": "The selected environment deploys this branch.",
"type": "boolean"
},
"name": {
"description": "`main`, or `origin/feature-x` for a branch only on origin.",
"type": "string"
},
"remote": {
"type": "boolean"
},
"sha": {
"type": "string"
}
},
"required": [
"committed_at",
"is_env_branch",
"name",
"remote",
"sha"
],
"type": "object"
},
"BriefBase": {
"properties": {
"branch": {
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"branch",
"sha"
],
"type": "object"
},
"BriefDeploy": {
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"diagnosis": {
"anyOf": [
{
"$ref": "#/definitions/Diagnosis"
},
{
"type": "null"
}
],
"default": null,
"description": "iii cloud's diagnosis, read when the hand-off was made (`None`: it had no likely cause)."
},
"hint": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"release_command": {
"default": null,
"description": "The release command from the manifest, when the failure is the release's.",
"type": [
"string",
"null"
]
},
"silent": {
"default": false,
"type": "boolean"
},
"stage": {
"type": [
"string",
"null"
]
},
"title": {
"type": [
"string",
"null"
]
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"log_tail"
],
"type": "object"
},
"BriefProblem": {
"properties": {
"code": {
"type": "string"
},
"detail": {
"type": [
"string",
"null"
]
},
"file": {
"type": [
"string",
"null"
]
},
"fix": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"line": {
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"owner": {
"$ref": "#/definitions/Owner"
},
"severity": {
"$ref": "#/definitions/Severity"
},
"title": {
"type": "string"
}
},
"required": [
"code",
"id",
"owner",
"severity",
"title"
],
"type": "object"
},
"BriefWorkspace": {
"properties": {
"branch": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"branch",
"path"
],
"type": "object"
},
"Check": {
"properties": {
"base": {
"description": "The environment branch's head when checked.",
"type": "string"
},
"checked_at": {
"type": "string"
},
"commit": {
"type": "string"
},
"commits": {
"default": [],
"description": "The commits of `base..commit`, newest first, at most 50. Empty when the base was not read or the commit is not on this machine.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": "array"
},
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"environment_id": {
"type": "string"
},
"handoff_id": {
"default": null,
"description": "The hand-off whose agent asked for it; null for the page's own checks.",
"type": [
"string",
"null"
]
},
"here": {
"$ref": "#/definitions/HerePart"
},
"id": {
"type": "string"
},
"manifest": {
"default": null,
"description": "The compose file it was checked with, from the repository root. When it is not the environment's, deploying this check switches the environment to it.",
"type": [
"string",
"null"
]
},
"plan": {
"$ref": "#/definitions/PlanPart"
},
"problems": {
"description": "Cloud plan first, then the checks here.",
"items": {
"$ref": "#/definitions/Problem"
},
"type": "array"
},
"ready": {
"type": "boolean"
},
"report": {
"type": "string"
},
"run": {
"anyOf": [
{
"$ref": "#/definitions/Run"
},
{
"type": "null"
}
]
}
},
"required": [
"base",
"checked_at",
"commit",
"duration_ms",
"environment_id",
"here",
"id",
"plan",
"problems",
"ready",
"report"
],
"type": "object"
},
"CheckSummary": {
"description": "A check in short, for the page's history (`Status.checks`); the whole record is `iii-cloud::check::get {id}`.",
"properties": {
"checked_at": {
"type": "string"
},
"commit": {
"type": "string"
},
"duration_ms": {
"description": "The plan and the checks here; a run's time is in its stages.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"environment_id": {
"type": "string"
},
"handoff_id": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"problems": {
"description": "The problems someone acts on (owner `agent` or `person`).",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"ready": {
"type": "boolean"
}
},
"required": [
"checked_at",
"commit",
"duration_ms",
"environment_id",
"id",
"problems",
"ready"
],
"type": "object"
},
"Checkout": {
"properties": {
"ahead": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"branch": {
"type": [
"string",
"null"
]
},
"branches": {
"default": [],
"description": "Local branches and origin's, newest commit first, at most 30; a local branch hides its origin twin. Read on refresh, from the refs as they are.",
"items": {
"$ref": "#/definitions/BranchRef"
},
"type": "array"
},
"changed_files": {
"items": {
"type": "string"
},
"type": "array"
},
"head": {
"type": "string"
},
"not_served": {
"default": null,
"description": "The checkout's commits the selected environment does not serve (`<served>..HEAD`, newest first, at most 50), read on refresh. Null when nothing is served yet or the served commit could not be fetched.",
"items": {
"$ref": "#/definitions/CommitLine"
},
"type": [
"array",
"null"
]
}
},
"required": [
"ahead",
"changed_files",
"head"
],
"type": "object"
},
"CloudOutcome": {
"enum": [
"set",
"skipped",
"failed"
],
"type": "string"
},
"CloudProject": {
"properties": {
"created_at": {
"default": null,
"description": "When the project was made (for choosing between several).",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"description": "Its newest deployment, when more than one project uses the repository.",
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"description": "The console's `$project` URL segment (`endpoint_slug`).",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"CloudProjectInfo": {
"description": "A cloud project of the repository, for the page's project and environment selectors.",
"properties": {
"created_at": {
"default": null,
"type": [
"string",
"null"
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentFull"
},
"type": "array"
},
"id": {
"type": "string"
},
"last_deployment_at": {
"default": null,
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"slug": {
"default": "",
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"environments",
"id",
"name",
"team"
],
"type": "object"
},
"CommitLine": {
"properties": {
"message": {
"description": "The subject line.",
"type": "string"
},
"sha": {
"type": "string"
}
},
"required": [
"message",
"sha"
],
"type": "object"
},
"Confirmations": {
"properties": {
"overrides": {
"items": {
"$ref": "#/definitions/OverrideConfirmation"
},
"type": "array"
},
"resources": {
"items": {
"$ref": "#/definitions/ResourceConfirmation"
},
"type": "array"
}
},
"required": [
"overrides",
"resources"
],
"type": "object"
},
"ConnStatus": {
"enum": [
"signed_out",
"waiting",
"connected",
"expired",
"error"
],
"type": "string"
},
"Connection": {
"properties": {
"api_key": {
"anyOf": [
{
"$ref": "#/definitions/ApiKeyRef"
},
{
"type": "null"
}
]
},
"cloud_url": {
"type": "string"
},
"device": {
"anyOf": [
{
"$ref": "#/definitions/Device"
},
{
"type": "null"
}
]
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"expires_at": {
"type": [
"string",
"null"
]
},
"method": {
"anyOf": [
{
"$ref": "#/definitions/Method"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/ConnStatus"
},
"teams": {
"items": {
"$ref": "#/definitions/TeamRole"
},
"type": "array"
},
"user": {
"anyOf": [
{
"$ref": "#/definitions/User"
},
{
"type": "null"
}
]
}
},
"required": [
"cloud_url",
"status",
"teams"
],
"type": "object"
},
"Deploy": {
"properties": {
"approved_by_worker": {
"type": "boolean"
},
"check_id": {
"default": null,
"description": "The check this worker deployed (`deploy {check_id}`); null for a deployment made elsewhere.",
"type": [
"string",
"null"
]
},
"checked_ready": {
"type": "boolean"
},
"commit": {
"$ref": "#/definitions/DeployCommit"
},
"console_url": {
"type": "string"
},
"created_at": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/DeployError"
},
{
"type": "null"
}
]
},
"failure": {
"anyOf": [
{
"$ref": "#/definitions/DeployFailure"
},
{
"type": "null"
}
],
"default": null,
"description": "For a failed deploy: what failed, in plain words, with the failing stage's log."
},
"finished_at": {
"type": [
"string",
"null"
]
},
"from_console": {
"default": false,
"description": "This worker did not create it: made in the console (the cloud's `type` is `manual` for both).",
"type": "boolean"
},
"id": {
"type": "string"
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"number": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"outcome": {
"$ref": "#/definitions/Outcome"
},
"pr": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"release_row": {
"anyOf": [
{
"$ref": "#/definitions/ReleaseRow"
},
{
"type": "null"
}
]
},
"replaced_by": {
"default": null,
"description": "The deployment that replaced this one, when it is `replaced`.",
"type": [
"string",
"null"
]
},
"stages": {
"items": {
"$ref": "#/definitions/DeployStage"
},
"type": "array"
},
"status": {
"type": "string"
},
"status_detail": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"approved_by_worker",
"checked_ready",
"commit",
"console_url",
"created_at",
"environment_id",
"id",
"log_tail",
"number",
"outcome",
"stages",
"status",
"type"
],
"type": "object"
},
"DeployCommit": {
"properties": {
"message": {
"type": [
"string",
"null"
]
},
"sha": {
"type": "string"
}
},
"required": [
"sha"
],
"type": "object"
},
"DeployError": {
"properties": {
"action": {
"type": [
"string",
"null"
]
},
"code": {
"type": "string"
},
"hint": {
"type": "string"
},
"stage": {
"type": "string"
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"hint",
"stage"
],
"type": "object"
},
"DeployFailure": {
"description": "A failed deploy in plain words (spec: readable failures).",
"properties": {
"code": {
"type": "string"
},
"diagnosis": {
"anyOf": [
{
"$ref": "#/definitions/Diagnosis"
},
{
"type": "null"
}
],
"default": null,
"description": "iii cloud's diagnosis of the failure, when it has a likely cause."
},
"hint": {
"type": "string"
},
"log_tail": {
"description": "The last ~40 lines of the failing stage's log, oldest first, redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"release_command": {
"default": null,
"description": "The release command from the manifest, for a release failure.",
"type": [
"string",
"null"
]
},
"silent": {
"default": false,
"description": "The log shows an exit status but no error text.",
"type": "boolean"
},
"stage": {
"type": "string"
},
"title": {
"description": "Plain, per code: \"The release command failed: `pnpm migrate`\".",
"type": "string"
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"hint",
"log_tail",
"stage",
"title"
],
"type": "object"
},
"DeployStage": {
"properties": {
"detail": {
"type": [
"string",
"null"
]
},
"finished_at": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"started_at": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
}
},
"required": [
"name",
"status"
],
"type": "object"
},
"Device": {
"properties": {
"expires_at": {
"type": "string"
},
"user_code": {
"type": "string"
},
"verification_uri": {
"type": "string"
}
},
"required": [
"expires_at",
"user_code",
"verification_uri"
],
"type": "object"
},
"Diagnosis": {
"description": "iii cloud's read-only diagnosis of a failed deployment: a lead, not proof.",
"properties": {
"cause": {
"type": "string"
},
"evidence": {
"description": "What it rests on, one line each (a log line, a file and its lines), redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"next_step": {
"type": "string"
}
},
"required": [
"cause",
"evidence",
"next_step"
],
"type": "object"
},
"EnvironmentBrief": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentFull": {
"properties": {
"branch": {
"type": "string"
},
"head": {
"default": null,
"description": "Its branch's head on origin, read on refresh. Null before the first refresh, or when origin did not answer or has no such branch.",
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"EnvironmentInfo": {
"properties": {
"branch": {
"type": "string"
},
"id": {
"type": "string"
},
"manifest": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"production": {
"type": "boolean"
},
"url": {
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"id",
"name",
"production"
],
"type": "object"
},
"Excerpt": {
"properties": {
"lines": {
"items": {
"type": "string"
},
"type": "array"
},
"start_line": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"lines",
"start_line"
],
"type": "object"
},
"HandoffBrief": {
"description": "Everything the agent needs for a hand-off, so the prompt can be one plain sentence plus the marker. No secret value is in it.",
"properties": {
"agent_problems": {
"description": "The problems that are the agent's to fix.",
"items": {
"$ref": "#/definitions/BriefProblem"
},
"type": "array"
},
"base": {
"anyOf": [
{
"$ref": "#/definitions/BriefBase"
},
{
"type": "null"
}
],
"default": null,
"description": "The base branch and its sha when the worktree was made: reset to it to start again (`OLD_ATTEMPT_COMMITS`)."
},
"check_id": {
"type": [
"string",
"null"
]
},
"checkout_path": {
"description": "The person's own checkout: do not touch it.",
"type": [
"string",
"null"
]
},
"commit": {
"type": [
"string",
"null"
]
},
"deploy": {
"anyOf": [
{
"$ref": "#/definitions/BriefDeploy"
},
{
"type": "null"
}
]
},
"handoff_id": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/HandoffKind"
},
"manifest": {
"description": "The compose file checked and deployed, relative to the worktree: the hand-off's, else the environment's.",
"type": "string"
},
"next_step": {
"type": "string"
},
"other_compose_files": {
"description": "Other compose files tracked in the worktree that declare `containers:` (at most 10). They are not checked or deployed.",
"items": {
"type": "string"
},
"type": "array"
},
"person_problems": {
"description": "The ones the person decides: bring each with a recommendation.",
"items": {
"$ref": "#/definitions/BriefProblem"
},
"type": "array"
},
"project": {
"description": "`<project> · <environment>`.",
"type": [
"string",
"null"
]
},
"pushes_directly": {
"default": false,
"description": "The environment is not production: it gets an assisted deploy, no pull request. Push only your fix branch; the person's deploy on the page sends the checked commit to the environment's own branch.",
"type": "boolean"
},
"remote_branch_note": {
"default": null,
"description": "One line when an earlier try left the fix branch on origin: the first push replaces it with `--force-with-lease`.",
"type": [
"string",
"null"
]
},
"repository": {
"type": [
"string",
"null"
]
},
"worktree": {
"anyOf": [
{
"$ref": "#/definitions/BriefWorkspace"
},
{
"type": "null"
}
],
"description": "Where to work."
}
},
"required": [
"agent_problems",
"handoff_id",
"kind",
"manifest",
"next_step",
"other_compose_files",
"person_problems"
],
"type": "object"
},
"HandoffKind": {
"oneOf": [
{
"enum": [
"ready",
"deploy_fix",
"pull_request"
],
"type": "string"
},
{
"description": "The project is not in iii cloud yet.",
"enum": [
"import"
],
"type": "string"
}
]
},
"HealthResult": {
"properties": {
"path": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"path"
],
"type": "object"
},
"HerePart": {
"properties": {
"accepts_cloud_block": {
"type": "boolean"
},
"iii_version": {
"type": [
"string",
"null"
]
},
"problems": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"accepts_cloud_block",
"problems"
],
"type": "object"
},
"Importable": {
"properties": {
"manifests": {
"items": {
"$ref": "#/definitions/ImportableManifest"
},
"type": "array"
},
"repository_id": {
"format": "int64",
"type": "integer"
},
"team_id": {
"type": "string"
}
},
"required": [
"manifests",
"repository_id",
"team_id"
],
"type": "object"
},
"ImportableManifest": {
"properties": {
"choosable": {
"type": "boolean"
},
"has_cloud_block": {
"default": false,
"description": "The file on this machine has a `cloud:` section.",
"type": "boolean"
},
"issue": {
"type": [
"string",
"null"
]
},
"path": {
"type": "string"
},
"suggested_environment": {
"type": [
"string",
"null"
]
},
"workers": {
"default": null,
"description": "Its containers, as the file on this machine says (else as iii cloud lists them); null when neither knows.",
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"choosable",
"path"
],
"type": "object"
},
"LocalOutcome": {
"enum": [
"set",
"skipped"
],
"type": "string"
},
"Method": {
"enum": [
"browser",
"api_key"
],
"type": "string"
},
"OtherCloudProject": {
"description": "A live cloud project of the person's teams that deploys another repository: it can't be used with this folder.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"repository": {
"type": "string"
},
"team": {
"$ref": "#/definitions/TeamName"
}
},
"required": [
"id",
"name",
"repository",
"team"
],
"type": "object"
},
"Outcome": {
"enum": [
"running",
"ready",
"failed",
"no_route",
"canceled",
"replaced"
],
"type": "string"
},
"OverrideChoice": {
"description": "Which value of a console override the person keeps.",
"oneOf": [
{
"description": "The file's value wins at deploy (what the deploy does already).",
"enum": [
"file"
],
"type": "string"
},
{
"description": "The console's value is kept, which takes a change to the file.",
"enum": [
"console"
],
"type": "string"
}
]
},
"OverrideConfirmation": {
"properties": {
"console": true,
"file": true,
"setting": {
"type": "string"
}
},
"required": [
"console",
"file",
"setting"
],
"type": "object"
},
"Owner": {
"oneOf": [
{
"enum": [
"agent",
"person"
],
"type": "string"
},
{
"description": "Info only: nothing to do.",
"enum": [
"none"
],
"type": "string"
}
]
},
"PlanPart": {
"properties": {
"at_least": {
"description": "The plan stops at its first blocking step: more may follow.",
"type": "boolean"
},
"blocking": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"confirmations": {
"$ref": "#/definitions/Confirmations"
},
"digest": {
"type": [
"string",
"null"
]
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"fingerprint": {
"type": [
"string",
"null"
]
},
"status": {
"$ref": "#/definitions/PlanStatus"
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/PlanSummary"
},
{
"type": "null"
}
],
"default": null,
"description": "What the plan runs: its workers and machine groups. Null without a plan."
},
"warnings": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"web_candidates": true
},
"required": [
"at_least",
"blocking",
"confirmations",
"status",
"warnings"
],
"type": "object"
},
"PlanStatus": {
"enum": [
"clean",
"blocked",
"not_pushed",
"commit_not_planned",
"unavailable"
],
"type": "string"
},
"PlanSummary": {
"properties": {
"groups": {
"description": "The groups' names, in the plan's order.",
"items": {
"type": "string"
},
"type": "array"
},
"workers": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"groups",
"workers"
],
"type": "object"
},
"PrChecks": {
"enum": [
"none",
"pending",
"passing",
"failing"
],
"type": "string"
},
"PrState": {
"enum": [
"OPEN",
"MERGED",
"CLOSED"
],
"type": "string"
},
"Problem": {
"properties": {
"cloud_code": {
"type": [
"string",
"null"
]
},
"code": {
"type": "string"
},
"detail": {
"type": [
"string",
"null"
]
},
"excerpt": {
"anyOf": [
{
"$ref": "#/definitions/Excerpt"
},
{
"type": "null"
}
]
},
"file": {
"type": [
"string",
"null"
]
},
"fix": {
"type": [
"string",
"null"
]
},
"id": {
"description": "sha1(source, code, file, line), stable across checks.",
"type": "string"
},
"line": {
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"owner": {
"$ref": "#/definitions/Owner"
},
"severity": {
"$ref": "#/definitions/Severity"
},
"skipped": {
"description": "The person skipped its name for now (`values::skip`). `EMPTY_DEFAULT_VARIABLE` then has severity `info`; `SECRET_MISSING` stays `block`.",
"type": "boolean"
},
"source": {
"$ref": "#/definitions/Source"
},
"title": {
"type": "string"
},
"variable": {
"description": "The variable a value problem is about (`SECRET_MISSING`, `EMPTY_DEFAULT_VARIABLE`, `LOCAL_VARIABLE_UNSET`), as the problem itself knows it.",
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"id",
"owner",
"severity",
"source",
"title"
],
"type": "object"
},
"Project": {
"properties": {
"checkout": {
"$ref": "#/definitions/Checkout"
},
"cloud_project": {
"anyOf": [
{
"$ref": "#/definitions/CloudProject"
},
{
"type": "null"
}
]
},
"cloud_projects": {
"default": [],
"description": "Every cloud project that uses this repository, across the person's teams, with its environments. The chosen one is `cloud_project`; `project::use {cloud_project_id}` picks another.",
"items": {
"$ref": "#/definitions/CloudProjectInfo"
},
"type": "array"
},
"default_branch": {
"default": null,
"description": "The repository's default branch.",
"type": [
"string",
"null"
]
},
"environment": {
"anyOf": [
{
"$ref": "#/definitions/EnvironmentInfo"
},
{
"type": "null"
}
]
},
"environments": {
"items": {
"$ref": "#/definitions/EnvironmentBrief"
},
"type": "array"
},
"fell_back_from": {
"description": "Only in `project::use`'s answer: the `environment_id` asked for, which the cloud project no longer lists, so its default environment was taken.",
"type": [
"string",
"null"
]
},
"github_access": {
"type": [
"boolean",
"null"
]
},
"importable": {
"anyOf": [
{
"$ref": "#/definitions/Importable"
},
{
"type": "null"
}
]
},
"other_cloud_projects": {
"default": [],
"description": "Live projects of the person's teams that deploy another repository.",
"items": {
"$ref": "#/definitions/OtherCloudProject"
},
"type": "array"
},
"path": {
"type": "string"
},
"repository": {
"description": "`owner/name`.",
"type": "string"
},
"team": {
"anyOf": [
{
"$ref": "#/definitions/TeamRef"
},
{
"type": "null"
}
]
},
"teams": {
"items": {
"$ref": "#/definitions/TeamRef"
},
"type": "array"
},
"workspace": {
"anyOf": [
{
"$ref": "#/definitions/Workspace"
},
{
"type": "null"
}
]
}
},
"required": [
"checkout",
"environments",
"path",
"repository",
"teams"
],
"type": "object"
},
"PullRequest": {
"properties": {
"base": {
"type": "string"
},
"body": {
"type": "string"
},
"checks": {
"$ref": "#/definitions/PrChecks"
},
"head": {
"type": "string"
},
"head_sha": {
"type": "string"
},
"main_moved": {
"type": "boolean"
},
"mergeable": {
"type": [
"string",
"null"
]
},
"number": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"state": {
"$ref": "#/definitions/PrState"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"base",
"body",
"checks",
"head",
"head_sha",
"main_moved",
"number",
"state",
"title",
"url"
],
"type": "object"
},
"QuestionSource": {
"oneOf": [
{
"description": "An ask the agent made in its session.",
"enum": [
"agent"
],
"type": "string"
},
{
"description": "The worker's own words about what the check leaves open.",
"enum": [
"check"
],
"type": "string"
}
]
},
"RecentProject": {
"description": "A project the person used before, to switch back with `project::use {path, cloud_project_id, environment_id, mode}` (no `resolve` needed first).",
"properties": {
"cloud_project_id": {
"type": "string"
},
"cloud_project_name": {
"type": "string"
},
"environment_id": {
"default": null,
"type": [
"string",
"null"
]
},
"environment_name": {
"default": null,
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/definitions/WorkspaceMode"
},
"path": {
"description": "The repository's root on this machine.",
"type": "string"
},
"repository": {
"description": "`owner/name`.",
"type": "string"
},
"team_id": {
"default": null,
"type": [
"string",
"null"
]
},
"team_name": {
"default": null,
"type": [
"string",
"null"
]
},
"used_at": {
"type": "string"
}
},
"required": [
"cloud_project_id",
"cloud_project_name",
"mode",
"path",
"repository",
"used_at"
],
"type": "object"
},
"ReleaseRow": {
"properties": {
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"status": {
"$ref": "#/definitions/ReleaseRowStatus"
}
},
"required": [
"status"
],
"type": "object"
},
"ReleaseRowStatus": {
"enum": [
"pending",
"running",
"passed",
"failed"
],
"type": "string"
},
"ResourceConfirmation": {
"properties": {
"alias": {
"type": "string"
},
"binding": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string"
},
"tier": {
"type": [
"string",
"null"
]
}
},
"required": [
"alias",
"kind"
],
"type": "object"
},
"RouteCount": {
"properties": {
"count": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"prefix": {
"type": [
"string",
"null"
]
}
},
"required": [
"count"
],
"type": "object"
},
"Run": {
"properties": {
"check_id": {
"type": "string"
},
"commit": {
"type": "string"
},
"engine": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/RunError"
},
{
"type": "null"
}
]
},
"finished_at": {
"type": [
"string",
"null"
]
},
"healthcheck": {
"anyOf": [
{
"$ref": "#/definitions/HealthResult"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"left_redacted": {
"default": false,
"description": "The copies under this run's `left/` were written with the run's secret values replaced. Absent (an older run): `check::read` refuses its kept files.",
"type": "boolean"
},
"log_path": {
"default": null,
"description": "The run's whole redacted log, an absolute path (`log_tail` is only its last 40 lines).",
"type": [
"string",
"null"
]
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"moved": {
"default": [],
"description": "The untracked files the run created, moved out of the copy into the run's `left/` folder when it ended (at most 500).",
"items": {
"type": "string"
},
"type": "array"
},
"not_covered": {
"items": {
"type": "string"
},
"type": "array"
},
"restored": {
"default": [],
"description": "The tracked files the run rewrote and the worker put back as committed when it ended (at most 500; their rewritten versions are kept in the run's `left/` folder).",
"items": {
"type": "string"
},
"type": "array"
},
"reused": {
"default": false,
"description": "A passed run of an earlier check answered this one: nothing ran again.",
"type": "boolean"
},
"routes": {
"$ref": "#/definitions/RouteCount"
},
"stages": {
"items": {
"$ref": "#/definitions/Stage"
},
"type": "array"
},
"started_at": {
"type": "string"
},
"status": {
"$ref": "#/definitions/RunStatus"
},
"waiting_on": {
"anyOf": [
{
"$ref": "#/definitions/WaitingOn"
},
{
"type": "null"
}
],
"default": null,
"description": "The workers stage has gone a minute with no new worker: who it waits for. The run is still `running`; null otherwise."
},
"workers": {
"$ref": "#/definitions/WorkerCount"
}
},
"required": [
"check_id",
"commit",
"engine",
"id",
"log_tail",
"not_covered",
"routes",
"stages",
"started_at",
"status",
"workers"
],
"type": "object"
},
"RunError": {
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"owner": {
"anyOf": [
{
"$ref": "#/definitions/RunOwner"
},
{
"type": "null"
}
],
"default": null,
"description": "Whose the failure is (`run_code_owner`): the agent fixes it, the person must, or the run was cut short. Set whenever the check is stored."
},
"stage": {
"$ref": "#/definitions/StageName"
},
"withheld": {
"default": false,
"description": "The worker would not send this failure to the agent now: the person has a blocking problem open (a missing value fails the run too), so it is theirs first.",
"type": "boolean"
}
},
"required": [
"code",
"message",
"stage"
],
"type": "object"
},
"RunOwner": {
"description": "Who a failed local run's code belongs to.",
"oneOf": [
{
"description": "A newer run of the workspace replaced this one: nothing to fix and nothing to send (the newer run is judged in its turn).",
"enum": [
"replaced"
],
"type": "string"
},
{
"description": "The agent fixes it in the worktree.",
"enum": [
"agent"
],
"type": "string"
},
{
"description": "The person's: Docker, a tool, the iii binary, or a decision about the routes.",
"enum": [
"person"
],
"type": "string"
},
{
"description": "Nobody's fault: the run was cut short; run it again.",
"enum": [
"interrupted"
],
"type": "string"
}
]
},
"RunStatus": {
"enum": [
"running",
"passed",
"failed"
],
"type": "string"
},
"RunningDeploy": {
"description": "A deploy still moving, with where it was made from. A field is null when the worker never knew it.",
"properties": {
"cloud_project_id": {
"type": [
"string",
"null"
]
},
"deploy": {
"$ref": "#/definitions/Deploy"
},
"environment_name": {
"type": [
"string",
"null"
]
},
"path": {
"description": "The local folder it was made from: `project::use {path}` goes back to it.",
"type": [
"string",
"null"
]
},
"project_name": {
"type": [
"string",
"null"
]
},
"repository": {
"type": [
"string",
"null"
]
}
},
"required": [
"deploy"
],
"type": "object"
},
"SecretMode": {
"enum": [
"ask",
"not_needed",
"decide"
],
"type": "string"
},
"SecretRequest": {
"properties": {
"asked_at": {
"type": "string"
},
"cloud": {
"anyOf": [
{
"$ref": "#/definitions/CloudOutcome"
},
{
"type": "null"
}
]
},
"description": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"external": {
"default": false,
"description": "Asked for a database URL the person chose to keep outside iii cloud.",
"type": "boolean"
},
"id": {
"type": "string"
},
"local": {
"anyOf": [
{
"$ref": "#/definitions/LocalOutcome"
},
{
"type": "null"
}
]
},
"mode": {
"$ref": "#/definitions/SecretMode"
},
"name": {
"type": "string"
},
"resolved_at": {
"type": [
"string",
"null"
]
},
"state": {
"$ref": "#/definitions/SecretState"
},
"target": {
"anyOf": [
{
"$ref": "#/definitions/Selected"
},
{
"type": "null"
}
],
"description": "Where the value goes: the team, worktree and environment the request was asked for, whatever the page has selected when the value is saved."
}
},
"required": [
"asked_at",
"description",
"environment_id",
"id",
"mode",
"name",
"state"
],
"type": "object"
},
"SecretState": {
"enum": [
"waiting",
"set",
"left_empty",
"noted",
"failed"
],
"type": "string"
},
"Selected": {
"properties": {
"env": {
"$ref": "#/definitions/EnvironmentInfo"
},
"team_id": {
"type": "string"
},
"workspace": {
"type": "string"
}
},
"required": [
"env",
"team_id",
"workspace"
],
"type": "object"
},
"Severity": {
"enum": [
"block",
"warn",
"info"
],
"type": "string"
},
"Source": {
"enum": [
"cloud_plan",
"check_here"
],
"type": "string"
},
"Stage": {
"properties": {
"detail": {
"type": [
"string",
"null"
]
},
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"name": {
"$ref": "#/definitions/StageName"
},
"status": {
"$ref": "#/definitions/StageStatus"
}
},
"required": [
"name",
"status"
],
"type": "object"
},
"StageName": {
"enum": [
"install",
"build",
"release",
"compose_up",
"workers",
"routes",
"healthcheck"
],
"type": "string"
},
"StageStatus": {
"enum": [
"pending",
"running",
"passed",
"failed",
"skipped"
],
"type": "string"
},
"TeamName": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"TeamRef": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"id",
"name",
"slug"
],
"type": "object"
},
"TeamRole": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"required": [
"id",
"name",
"role",
"slug"
],
"type": "object"
},
"User": {
"properties": {
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
}
},
"required": [
"email",
"id"
],
"type": "object"
},
"VariableRow": {
"properties": {
"name": {
"type": "string"
},
"required_by": {
"items": {
"type": "string"
},
"type": "array"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name",
"required_by",
"status",
"type"
],
"type": "object"
},
"WaitingOn": {
"properties": {
"containers": {
"description": "The containers that have not connected.",
"items": {
"type": "string"
},
"type": "array"
},
"since": {
"description": "When the wait was noticed (RFC 3339).",
"type": "string"
}
},
"required": [
"containers",
"since"
],
"type": "object"
},
"WorkerCount": {
"properties": {
"ready": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"total": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"ready",
"total"
],
"type": "object"
},
"WorkerError": {
"description": "`{code, message, status?, fix?}` inside records.",
"properties": {
"code": {
"type": "string"
},
"fix": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"WorkerInfo": {
"properties": {
"cloud_engine": {
"type": [
"string",
"null"
]
},
"iii_version": {
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
}
},
"required": [
"version"
],
"type": "object"
},
"Workspace": {
"properties": {
"branch": {
"type": "string"
},
"from_head": {
"default": null,
"description": "The last commit the worktree took from the person's checkout (`from: checkout`): commits after it are the agent's. Null for a worktree made from the environment's branch.",
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/definitions/WorkspaceMode"
},
"path": {
"type": "string"
},
"source": {
"default": null,
"description": "The branch `use {from: checkout, source}` took; null: the checkout's HEAD.",
"type": [
"string",
"null"
]
},
"source_sha": {
"default": null,
"description": "The commit `source` (else the checkout's HEAD) pointed at when the worktree was prepared: \"moved since\" compares the source's tip with it.",
"type": [
"string",
"null"
]
}
},
"required": [
"branch",
"mode",
"path"
],
"type": "object"
},
"WorkspaceMode": {
"enum": [
"worktree",
"checkout"
],
"type": "string"
}
},
"properties": {
"agent": {
"anyOf": [
{
"$ref": "#/definitions/AgentState"
},
{
"type": "null"
}
],
"description": "The agent's work on the selected environment's open hand-off."
},
"auto_fix": {
"description": "The worker's `auto_fix` setting: a person's check hands the agent its problems.",
"type": "boolean"
},
"candidate": {
"anyOf": [
{
"$ref": "#/definitions/Project"
},
{
"type": "null"
}
],
"default": null,
"description": "A folder `project::resolve` read while another project is selected: Setup's add-project steps show it. `project::use` selects it and clears this."
},
"check": {
"anyOf": [
{
"$ref": "#/definitions/Check"
},
{
"type": "null"
}
],
"description": "The selected environment's latest check."
},
"checks": {
"default": [],
"description": "Every kept check in short, of every environment, newest first (the latest 20, and the ones a merge, hand-off, pull request or deploy points at).",
"items": {
"$ref": "#/definitions/CheckSummary"
},
"type": "array"
},
"compose_files": {
"default": [],
"description": "The worktree's tracked compose files that declare `containers:`, for the page's app file picker. `choosable` is false for a file iii cloud can't plan by its name (`issue`: `NOT_WORKER_COMPOSE`).",
"items": {
"$ref": "#/definitions/ImportableManifest"
},
"type": "array"
},
"connection": {
"$ref": "#/definitions/Connection"
},
"deploys": {
"description": "Newest first, at most 20.",
"items": {
"$ref": "#/definitions/Deploy"
},
"type": "array"
},
"handoff_brief": {
"anyOf": [
{
"$ref": "#/definitions/HandoffBrief"
},
{
"type": "null"
}
],
"description": "What the agent needs for the open hand-off, in one place."
},
"override_choices": {
"additionalProperties": {
"$ref": "#/definitions/OverrideChoice"
},
"default": {},
"description": "The person's choice per console override of the selected environment (`override::choose`), by setting: only choices made for the newest check's console and file values.",
"type": "object"
},
"pr": {
"anyOf": [
{
"$ref": "#/definitions/PullRequest"
},
{
"type": "null"
}
]
},
"pr_error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"problems": {
"default": [],
"description": "What is wrong with the selection itself: `PROJECT_DELETED`, `ENVIRONMENT_DELETED`.",
"items": {
"$ref": "#/definitions/WorkerError"
},
"type": "array"
},
"project": {
"anyOf": [
{
"$ref": "#/definitions/Project"
},
{
"type": "null"
}
]
},
"recent_projects": {
"default": [],
"description": "Projects used before, newest first: not the current one, nor a folder that is gone.",
"items": {
"$ref": "#/definitions/RecentProject"
},
"type": "array"
},
"refreshed_at": {
"type": [
"string",
"null"
]
},
"running_deploys": {
"default": [],
"description": "Every deploy still moving, of every project and environment, newest first (`deploys` has the selected environment's only).",
"items": {
"$ref": "#/definitions/RunningDeploy"
},
"type": "array"
},
"secrets": {
"description": "Open first, then the latest 20 resolved.",
"items": {
"$ref": "#/definitions/SecretRequest"
},
"type": "array"
},
"skipped_problems": {
"default": [],
"description": "The warning codes the person skipped for now (`problem::skip`) in the selected environment, sorted.",
"items": {
"type": "string"
},
"type": "array"
},
"skipped_values": {
"default": [],
"description": "The names the person skipped for now (`values::skip`) in the selected environment, sorted.",
"items": {
"type": "string"
},
"type": "array"
},
"variables": {
"items": {
"$ref": "#/definitions/VariableRow"
},
"type": "array"
},
"work_file": {
"default": null,
"description": "The compose file the selected environment's work is on when it is not the environment's own (`State::work_file`): the newest check's, unless the environment's file changed since. Null: the environment's file.",
"type": [
"string",
"null"
]
},
"worker": {
"$ref": "#/definitions/WorkerInfo"
}
},
"required": [
"auto_fix",
"connection",
"deploys",
"secrets",
"variables",
"worker"
],
"title": "Status",
"type": "object"
}
},
{
"description": "The page's own: open a deployment's events (kind deployment, with deployment_id: stages, log lines, statuses) or the environment's machines stream (kind machines: a snapshot on every change, scaling steps). Returns {follow_id}; every event reaches iii-cloud::on-stream with that follow_id. Ends by itself with the deployment's terminal status, when the stream ends and after 30 minutes. Agents never call it.",
"metadata": {},
"name": "iii-cloud::stream::follow",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"StreamKind": {
"oneOf": [
{
"description": "A deployment's stages, log lines and statuses.",
"enum": [
"deployment"
],
"type": "string"
},
{
"description": "The environment's machines: a snapshot on every change, and scaling steps.",
"enum": [
"machines"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::stream::follow` input.",
"properties": {
"deployment_id": {
"default": null,
"description": "Required for `deployment`.",
"type": [
"string",
"null"
]
},
"environment_id": {
"type": "string"
},
"follow_id": {
"default": null,
"description": "As in `iii-cloud::logs::follow`.",
"type": [
"string",
"null"
]
},
"kind": {
"$ref": "#/definitions/StreamKind"
}
},
"required": [
"environment_id",
"kind"
],
"title": "StreamFollowRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::logs::follow` and `iii-cloud::stream::follow` output.",
"properties": {
"follow_id": {
"type": "string"
}
},
"required": [
"follow_id"
],
"title": "FollowStarted",
"type": "object"
}
},
{
"description": "The page's own: close a follow of stream::follow. Agents never call it.",
"metadata": {},
"name": "iii-cloud::stream::unfollow",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::logs::unfollow` and `iii-cloud::stream::unfollow` input.",
"properties": {
"follow_id": {
"type": "string"
}
},
"required": [
"follow_id"
],
"title": "UnfollowRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::logs::unfollow` and `iii-cloud::stream::unfollow` output.",
"properties": {
"closed": {
"description": "False when no such follow was open (it had ended).",
"type": "boolean"
}
},
"required": [
"closed"
],
"title": "Unfollowed",
"type": "object"
}
},
{
"description": "Serve the iii-cloud worker's injected console UI assets (the target of its ade::ui::asset observers; the console calls it through each asset's observer with {path}).",
"metadata": {
"internal": true
},
"name": "iii-cloud::ui-content",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Input of the content function: the console asks for one asset by path.",
"properties": {
"path": {
"description": "The asset path from the observer's args (e.g. `state/page.js`).",
"type": "string"
}
},
"required": [
"path"
],
"title": "UiContentInput",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Output of the content function.",
"properties": {
"content": {
"description": "The asset source, verbatim.",
"type": "string"
},
"content_type": {
"description": "MIME type the console should serve the asset with.",
"type": "string"
}
},
"required": [
"content",
"content_type"
],
"title": "UiContentResult",
"type": "object"
}
},
{
"description": "The names the compose file reads (`${NAME}`, `${NAME:-}`, `${NAME:-default}` in containers) for the selected environment: whether each is set in iii cloud, secret or variable, and where its value can come from (a .env file of the person's folder, the environment's address, a copy from another environment). Names, file names and flags only: never a secret's value. manifest: another worker-compose*.yaml; from: checkout reads the person's folder.",
"metadata": {},
"name": "iii-cloud::values",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ValuesFrom": {
"description": "Where `iii-cloud::values` reads the compose file.",
"oneOf": [
{
"description": "The selected workspace (the worktree, or the checkout in \"edits this folder\").",
"enum": [
"workspace"
],
"type": "string"
},
{
"description": "The person's checkout.",
"enum": [
"checkout"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::values` input.",
"properties": {
"from": {
"anyOf": [
{
"$ref": "#/definitions/ValuesFrom"
},
{
"type": "null"
}
],
"default": null,
"description": "Default `workspace`."
},
"manifest": {
"default": null,
"description": "A `worker-compose*.yaml` from the repository root. Default: the newest check's file when it is of this environment, else the environment's.",
"type": [
"string",
"null"
]
}
},
"title": "ValuesRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CloudRead": {
"oneOf": [
{
"enum": [
"read"
],
"type": "string"
},
{
"description": "iii cloud's variables could not be read: every `in_cloud` is `unknown`.",
"enum": [
"unreadable"
],
"type": "string"
}
]
},
"Here": {
"description": "Whether the run here has a value for a name.",
"oneOf": [
{
"description": "In the run's `.env`.",
"enum": [
"set"
],
"type": "string"
},
{
"description": "Taken from an env file of the person's folder, into the run's environment only.",
"enum": [
"from_file"
],
"type": "string"
},
{
"description": "Nowhere here: `LOCAL_VARIABLE_UNSET`.",
"enum": [
"unset"
],
"type": "string"
},
{
"description": "It has a default (or the compose file doesn't read it).",
"enum": [
"not_needed"
],
"type": "string"
}
]
},
"InCloud": {
"enum": [
"set",
"unset",
"unknown"
],
"type": "string"
},
"Need": {
"oneOf": [
{
"description": "`${X}`",
"enum": [
"required"
],
"type": "string"
},
{
"description": "`${X:-}`",
"enum": [
"optional"
],
"type": "string"
},
{
"description": "`${X:-v}`",
"enum": [
"has_default"
],
"type": "string"
}
]
},
"SaveAllowed": {
"oneOf": [
{
"enum": [
"ok"
],
"type": "string"
},
{
"description": "An API key can't write values.",
"enum": [
"api_key"
],
"type": "string"
},
{
"description": "Production's values take Owner or Admin.",
"enum": [
"role"
],
"type": "string"
}
]
},
"Suggestion": {
"description": "Where a value can come from. Never the value itself.",
"oneOf": [
{
"description": "A `.env*` file of the person's folder has the name.",
"properties": {
"file": {
"description": "From the repository root, such as `api/.env.test`.",
"type": "string"
},
"local": {
"description": "The value points at this machine (`localhost`, `127.0.0.1`, ...).",
"type": "boolean"
},
"preselect": {
"type": "boolean"
},
"source": {
"enum": [
"env_file"
],
"type": "string"
}
},
"required": [
"file",
"local",
"preselect",
"source"
],
"type": "object"
},
{
"description": "The environment's own address.",
"properties": {
"preselect": {
"type": "boolean"
},
"source": {
"enum": [
"env_url"
],
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"preselect",
"source",
"url"
],
"type": "object"
},
{
"description": "Another environment of the project has it set (copied by iii cloud).",
"properties": {
"environment": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"preselect": {
"type": "boolean"
},
"source": {
"enum": [
"copy"
],
"type": "string"
}
},
"required": [
"environment",
"environment_id",
"preselect",
"source"
],
"type": "object"
}
]
},
"ValueAsked": {
"description": "An open `iii-cloud::secret` ask for the name.",
"properties": {
"description": {
"type": "string"
},
"request_id": {
"type": "string"
}
},
"required": [
"description",
"request_id"
],
"type": "object"
},
"ValueItem": {
"description": "One name the compose file reads (or an agent asked for).",
"properties": {
"asked": {
"anyOf": [
{
"$ref": "#/definitions/ValueAsked"
},
{
"type": "null"
}
]
},
"containers": {
"items": {
"type": "string"
},
"type": "array"
},
"database": {
"description": "Shaped like a database URL: iii cloud makes the database.",
"type": "boolean"
},
"default": {
"description": "The file's literal default; `\"\"` for `${X:-}`; null for `${X}`.",
"type": [
"string",
"null"
]
},
"here": {
"allOf": [
{
"$ref": "#/definitions/Here"
}
],
"description": "Whether the run here has a value for it."
},
"here_file": {
"description": "With `here: from_file`: the person's env file it comes from, such as `api/.env.test`.",
"type": [
"string",
"null"
]
},
"in_cloud": {
"$ref": "#/definitions/InCloud"
},
"invalid_name": {
"description": "Why iii cloud can't store this name (lower case, say): nothing is preselected and `values::save` refuses the row.",
"type": [
"string",
"null"
]
},
"line": {
"format": "uint32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"name": {
"type": "string"
},
"need": {
"$ref": "#/definitions/Need"
},
"skipped": {
"description": "The person skipped it for now (`values::skip`).",
"type": "boolean"
},
"suggestions": {
"description": "In preselect order: the page takes the first with `preselect: true`.",
"items": {
"$ref": "#/definitions/Suggestion"
},
"type": "array"
},
"type": {
"allOf": [
{
"$ref": "#/definitions/ValueKind"
}
],
"description": "Secret unless iii cloud stores it as a variable or it is the environment's address."
},
"updated_at": {
"type": [
"string",
"null"
]
},
"value": {
"description": "Only a set variable's value in iii cloud; never a secret's.",
"type": [
"string",
"null"
]
}
},
"required": [
"containers",
"database",
"here",
"in_cloud",
"name",
"need",
"skipped",
"suggestions",
"type"
],
"type": "object"
},
"ValueKind": {
"enum": [
"secret",
"variable"
],
"type": "string"
},
"ValuesFrom": {
"description": "Where `iii-cloud::values` reads the compose file.",
"oneOf": [
{
"description": "The selected workspace (the worktree, or the checkout in \"edits this folder\").",
"enum": [
"workspace"
],
"type": "string"
},
{
"description": "The person's checkout.",
"enum": [
"checkout"
],
"type": "string"
}
]
}
},
"description": "`iii-cloud::values` answer: names, sources and flags, never a secret's value.",
"properties": {
"cloud": {
"$ref": "#/definitions/CloudRead"
},
"environment": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"items": {
"items": {
"$ref": "#/definitions/ValueItem"
},
"type": "array"
},
"manifest": {
"type": "string"
},
"read_from": {
"$ref": "#/definitions/ValuesFrom"
},
"save": {
"$ref": "#/definitions/SaveAllowed"
}
},
"required": [
"cloud",
"environment",
"environment_id",
"items",
"manifest",
"read_from",
"save"
],
"title": "Values",
"type": "object"
}
},
{
"description": "The page's own: write the values the person chose to iii cloud, one by one, and the run's .env where the compose file reads `${NAME}`. Agents never call it.",
"metadata": {
"trace_hidden": true
},
"name": "iii-cloud::values::save",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"SaveItem": {
"description": "One value `iii-cloud::values::save` writes. No `Debug`: it can hold a value.",
"oneOf": [
{
"properties": {
"from": {
"enum": [
"typed"
],
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/ValueKind"
},
"value": {
"type": "string"
}
},
"required": [
"from",
"name",
"type",
"value"
],
"type": "object"
},
{
"description": "Read again from the file at save time.",
"properties": {
"file": {
"type": "string"
},
"from": {
"enum": [
"env_file"
],
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"$ref": "#/definitions/ValueKind"
}
},
"required": [
"file",
"from",
"name",
"type"
],
"type": "object"
},
{
"description": "The environment's address, as a variable.",
"properties": {
"from": {
"enum": [
"env_url"
],
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"from",
"name"
],
"type": "object"
},
{
"description": "The variable `\"\"`.",
"properties": {
"from": {
"enum": [
"leave_empty"
],
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"from",
"name"
],
"type": "object"
},
{
"description": "Copied by iii cloud from another environment of the project; never overwrites.",
"properties": {
"environment_id": {
"type": "string"
},
"from": {
"enum": [
"copy"
],
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"environment_id",
"from",
"name"
],
"type": "object"
}
]
},
"ValueKind": {
"enum": [
"secret",
"variable"
],
"type": "string"
}
},
"description": "`iii-cloud::values::save` input: the page's own. No `Debug`.",
"properties": {
"environment_id": {
"description": "The selected environment, as a guard (`ENVIRONMENT_CHANGED`).",
"type": "string"
},
"items": {
"items": {
"$ref": "#/definitions/SaveItem"
},
"type": "array"
},
"manifest": {
"default": null,
"type": [
"string",
"null"
]
}
},
"required": [
"environment_id",
"items"
],
"title": "ValuesSave",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"SaveResult": {
"properties": {
"error": {
"anyOf": [
{
"$ref": "#/definitions/WorkerError"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"ok": {
"type": "boolean"
}
},
"required": [
"name",
"ok"
],
"type": "object"
},
"WorkerError": {
"description": "`{code, message, status?, fix?}` inside records.",
"properties": {
"code": {
"type": "string"
},
"fix": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"status": {
"format": "uint16",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"code",
"message"
],
"type": "object"
}
},
"description": "`iii-cloud::values::save` answer, per item in order.",
"properties": {
"environment_id": {
"type": "string"
},
"results": {
"items": {
"$ref": "#/definitions/SaveResult"
},
"type": "array"
}
},
"required": [
"environment_id",
"results"
],
"title": "ValuesSaved",
"type": "object"
}
},
{
"description": "The page's own: skip names for now in the selected environment (`skip: false` undoes it). A skipped name gets an empty value in the run here and no LOCAL_VARIABLE_UNSET; EMPTY_DEFAULT_VARIABLE turns to info; SECRET_MISSING stays a block. Agents never call it.",
"metadata": {},
"name": "iii-cloud::values::skip",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::values::skip` input: the page's own. Names only.",
"properties": {
"environment_id": {
"description": "The selected environment, as a guard (`ENVIRONMENT_CHANGED`).",
"type": "string"
},
"names": {
"items": {
"type": "string"
},
"type": "array"
},
"skip": {
"description": "`false` undoes the skip.",
"type": "boolean"
}
},
"required": [
"environment_id",
"names",
"skip"
],
"title": "ValuesSkip",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "The environment's skipped names after `iii-cloud::values::skip`, sorted.",
"properties": {
"environment_id": {
"type": "string"
},
"names": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"environment_id",
"names"
],
"title": "ValuesSkipped",
"type": "object"
}
},
{
"description": "Follow a deploy to Ready and bring back the evidence when it fails.",
"metadata": {},
"name": "iii-cloud::watch",
"request_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "`iii-cloud::watch` input.",
"properties": {
"deployment_id": {
"default": null,
"description": "Default: the newest deployment of the selected environment.",
"type": [
"string",
"null"
]
},
"handoff_id": {
"default": null,
"type": [
"string",
"null"
]
}
},
"title": "WatchRequest",
"type": "object"
},
"response_schema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"DeployCommit": {
"properties": {
"message": {
"type": [
"string",
"null"
]
},
"sha": {
"type": "string"
}
},
"required": [
"sha"
],
"type": "object"
},
"DeployError": {
"properties": {
"action": {
"type": [
"string",
"null"
]
},
"code": {
"type": "string"
},
"hint": {
"type": "string"
},
"stage": {
"type": "string"
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"hint",
"stage"
],
"type": "object"
},
"DeployFailure": {
"description": "A failed deploy in plain words (spec: readable failures).",
"properties": {
"code": {
"type": "string"
},
"diagnosis": {
"anyOf": [
{
"$ref": "#/definitions/Diagnosis"
},
{
"type": "null"
}
],
"default": null,
"description": "iii cloud's diagnosis of the failure, when it has a likely cause."
},
"hint": {
"type": "string"
},
"log_tail": {
"description": "The last ~40 lines of the failing stage's log, oldest first, redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"release_command": {
"default": null,
"description": "The release command from the manifest, for a release failure.",
"type": [
"string",
"null"
]
},
"silent": {
"default": false,
"description": "The log shows an exit status but no error text.",
"type": "boolean"
},
"stage": {
"type": "string"
},
"title": {
"description": "Plain, per code: \"The release command failed: `pnpm migrate`\".",
"type": "string"
},
"worker": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"hint",
"log_tail",
"stage",
"title"
],
"type": "object"
},
"DeployStage": {
"properties": {
"detail": {
"type": [
"string",
"null"
]
},
"finished_at": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"started_at": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
}
},
"required": [
"name",
"status"
],
"type": "object"
},
"Diagnosis": {
"description": "iii cloud's read-only diagnosis of a failed deployment: a lead, not proof.",
"properties": {
"cause": {
"type": "string"
},
"evidence": {
"description": "What it rests on, one line each (a log line, a file and its lines), redacted.",
"items": {
"type": "string"
},
"type": "array"
},
"next_step": {
"type": "string"
}
},
"required": [
"cause",
"evidence",
"next_step"
],
"type": "object"
},
"Outcome": {
"enum": [
"running",
"ready",
"failed",
"no_route",
"canceled",
"replaced"
],
"type": "string"
},
"ReleaseRow": {
"properties": {
"duration_ms": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"status": {
"$ref": "#/definitions/ReleaseRowStatus"
}
},
"required": [
"status"
],
"type": "object"
},
"ReleaseRowStatus": {
"enum": [
"pending",
"running",
"passed",
"failed"
],
"type": "string"
}
},
"properties": {
"approved_by_worker": {
"type": "boolean"
},
"check_id": {
"default": null,
"description": "The check this worker deployed (`deploy {check_id}`); null for a deployment made elsewhere.",
"type": [
"string",
"null"
]
},
"checked_ready": {
"type": "boolean"
},
"commit": {
"$ref": "#/definitions/DeployCommit"
},
"console_url": {
"type": "string"
},
"created_at": {
"type": "string"
},
"environment_id": {
"type": "string"
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/DeployError"
},
{
"type": "null"
}
]
},
"failure": {
"anyOf": [
{
"$ref": "#/definitions/DeployFailure"
},
{
"type": "null"
}
],
"default": null,
"description": "For a failed deploy: what failed, in plain words, with the failing stage's log."
},
"finished_at": {
"type": [
"string",
"null"
]
},
"from_console": {
"default": false,
"description": "This worker did not create it: made in the console (the cloud's `type` is `manual` for both).",
"type": "boolean"
},
"id": {
"type": "string"
},
"log_tail": {
"items": {
"type": "string"
},
"type": "array"
},
"number": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"outcome": {
"$ref": "#/definitions/Outcome"
},
"pr": {
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"release_row": {
"anyOf": [
{
"$ref": "#/definitions/ReleaseRow"
},
{
"type": "null"
}
]
},
"replaced_by": {
"default": null,
"description": "The deployment that replaced this one, when it is `replaced`.",
"type": [
"string",
"null"
]
},
"stages": {
"items": {
"$ref": "#/definitions/DeployStage"
},
"type": "array"
},
"status": {
"type": "string"
},
"status_detail": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string"
}
},
"required": [
"approved_by_worker",
"checked_ready",
"commit",
"console_url",
"created_at",
"environment_id",
"id",
"log_tail",
"number",
"outcome",
"stages",
"status",
"type"
],
"title": "Deploy",
"type": "object"
}
}
]
}