{
  "components": {
    "schemas": {
      "AcquireLeaseRequest": {
        "properties": {
          "exclusive": {
            "default": false,
            "type": "boolean"
          },
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "scope": {
            "default": "",
            "description": "A path glob such as \"src/auth/\\*\\*\".",
            "type": "string"
          },
          "task_id": {
            "default": "",
            "type": "string"
          },
          "ttl_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AcquireLeaseResponse": {
        "description": "Soft leases always succeed and report who else works nearby; exclusive\nleases are refused (lease_conflict) when another exclusive lease overlaps.",
        "properties": {
          "lease": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Lease"
              },
              {
                "type": "null"
              }
            ]
          },
          "overlapping": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Lease"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "AddDependencyRequest": {
        "properties": {
          "depends_on": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "task": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Agent": {
        "properties": {
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "disabled": {
            "default": false,
            "type": "boolean"
          },
          "identity": {
            "default": "",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "public_key": {
            "default": "",
            "type": "string"
          },
          "role": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AncestorsRequest": {
        "properties": {
          "have": {
            "default": [],
            "description": "... excluding everything reachable from these.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "page_token": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "want": {
            "default": [],
            "description": "Changesets wanted (and, transitively, their ancestors) ...",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "AncestorsResponse": {
        "properties": {
          "changeset_ids": {
            "default": [],
            "description": "Parents before children.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "next_page_token": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Attestation": {
        "properties": {
          "check": {
            "default": "",
            "type": "string"
          },
          "environment_digest": {
            "default": "",
            "type": "string"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "issued_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "issuer": {
            "default": "",
            "type": "string"
          },
          "policy_version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "public_key": {
            "default": "",
            "description": "Hex Ed25519 public key and signature (see docs/architecture/object-format.md).",
            "type": "string"
          },
          "result": {
            "default": "",
            "description": "\"pass\" or \"fail\".",
            "type": "string"
          },
          "signature": {
            "default": "",
            "type": "string"
          },
          "tree_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AuditEntry": {
        "properties": {
          "action": {
            "default": "",
            "type": "string"
          },
          "actor": {
            "default": "",
            "type": "string"
          },
          "details": {
            "type": "object"
          },
          "hash": {
            "default": "",
            "type": "string"
          },
          "seq": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "target": {
            "default": "",
            "type": "string"
          },
          "timestamp_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AuthConfig": {
        "description": "How a browser can sign in to this server. Public: it needs no credentials.",
        "properties": {
          "mode": {
            "description": "`token` when the only way in is a pasted credential, `oidc` when at least one identity provider is offered\nfor redirect sign-in (pasting a credential keeps working in both modes).",
            "type": "string"
          },
          "providers": {
            "description": "The providers to offer, in configuration order (`oidc` mode only).",
            "items": {
              "$ref": "#/components/schemas/AuthProvider"
            },
            "type": "array"
          }
        },
        "required": [
          "mode"
        ],
        "type": "object"
      },
      "AuthConfigRequest": {
        "description": "Request of `GET /v1/auth/config` (it takes no parameters).",
        "type": "object"
      },
      "AuthProvider": {
        "description": "One identity provider for redirect sign-in (OpenID Connect authorization code with PKCE).",
        "properties": {
          "authorization_endpoint": {
            "description": "Authorization endpoint, when configured (otherwise read it from discovery).",
            "type": [
              "string",
              "null"
            ]
          },
          "client_id": {
            "description": "The OAuth client id of the Web UI.",
            "type": "string"
          },
          "end_session_endpoint": {
            "description": "Logout endpoint, when configured (otherwise read it from discovery).",
            "type": [
              "string",
              "null"
            ]
          },
          "issuer": {
            "description": "Issuer; discovery is at `<issuer>/.well-known/openid-configuration`.",
            "type": "string"
          },
          "name": {
            "description": "Text for the sign-in button.",
            "type": "string"
          },
          "scopes": {
            "description": "Scopes to request.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "token": {
            "$ref": "#/components/schemas/LoginToken",
            "description": "Which token to present to this server: `id_token` or `access_token`."
          },
          "token_endpoint": {
            "description": "Token endpoint, when configured (otherwise read it from discovery).",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "issuer",
          "client_id",
          "scopes",
          "token"
        ],
        "type": "object"
      },
      "BlameLine": {
        "properties": {
          "author": {
            "default": "",
            "type": "string"
          },
          "boundary": {
            "default": false,
            "description": "True if the walk stopped before finding the real origin.",
            "type": "boolean"
          },
          "changeset": {
            "default": "",
            "description": "The changeset that introduced it.",
            "type": "string"
          },
          "line": {
            "default": 0,
            "description": "Line number at the requested revision (1-based).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "original_line": {
            "default": 0,
            "description": "The line's number in that changeset's version (1-based).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "path": {
            "default": "",
            "description": "The path the file had in that changeset (differs after a rename).",
            "type": "string"
          },
          "summary": {
            "default": "",
            "description": "First line of that changeset's message.",
            "type": "string"
          },
          "text": {
            "default": "",
            "description": "The line's text without its terminator (lossy UTF-8).",
            "type": "string"
          },
          "timestamp_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "BlameRequest": {
        "properties": {
          "first_line": {
            "default": 0,
            "description": "Only lines first_line..=last_line (1-based); both 0 = the whole file.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "last_line": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_commits": {
            "default": 0,
            "description": "Visit at most this many changesets (0 = the server default).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "path": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "description": "Revision expression (default: the repository's default stream).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "BlameResponse": {
        "properties": {
          "lines": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/BlameLine"
            },
            "type": "array"
          },
          "path": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "description": "The revision, resolved to a changeset id.",
            "type": "string"
          },
          "truncated": {
            "default": false,
            "description": "True if max_commits was reached before every line found its origin.",
            "type": "boolean"
          },
          "visited": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Blocker": {
        "properties": {
          "code": {
            "default": "",
            "description": "A stable code: missing_validation, failed_validation, insufficient_approvals, changes_requested,\nmissing_provenance, too_many_changed_files, actor_not_allowed, author_not_allowed, or lease (an exclusive\nlease held by someone else covers a changed path).",
            "type": "string"
          },
          "detail": {
            "description": "Structured details as a JSON object.",
            "type": "object"
          },
          "message": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Changeset": {
        "properties": {
          "author": {
            "default": "",
            "type": "string"
          },
          "generation": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "message": {
            "default": "",
            "type": "string"
          },
          "namespace": {
            "default": "",
            "type": "string"
          },
          "ops": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/FileOp"
            },
            "type": "array"
          },
          "parents": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "published": {
            "default": false,
            "type": "boolean"
          },
          "timestamp_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ClaimJobRequest": {
        "properties": {
          "kinds": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "lease_ms": {
            "default": 0,
            "description": "How long the claim lasts without a heartbeat (\\<= 0 = 120000; at most 3600000, larger values are lowered).",
            "format": "int64",
            "type": "integer"
          },
          "repo": {
            "default": "",
            "description": "Empty = any repository the caller has the `runner` role on.",
            "type": "string"
          },
          "wait_ms": {
            "default": 0,
            "description": "Long-poll for up to this many ms when nothing is queued (at most 30000, larger values are lowered).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "worker": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ClaimJobResponse": {
        "properties": {
          "job": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Job",
                "description": "Unset when nothing was available."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "CloseProposalRequest": {
        "properties": {
          "id": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompareAndSwapRequest": {
        "properties": {
          "expected_head": {
            "default": "",
            "type": "string"
          },
          "expected_version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "force": {
            "default": false,
            "description": "Allow non-fast-forward moves. Administrators only.",
            "type": "boolean"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "new_head": {
            "default": "",
            "type": "string"
          },
          "reason": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompleteJobRequest": {
        "properties": {
          "attestation": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Attestation",
                "description": "The signed attestation produced for the job, submitted atomically with\ncompletion. Required for kind = \"validate\" unless `stale` is set."
              },
              {
                "type": "null"
              }
            ]
          },
          "fencing_token": {
            "default": 0,
            "description": "The claim this request is for; see HeartbeatJobRequest.fencing_token. 0 = not given.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "job_id": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "result": {
            "description": "Free-form result (e.g. exit code, durations, log excerpt) as JSON.",
            "type": "object"
          },
          "stale": {
            "default": false,
            "description": "The candidate no longer matched the job's tree id: no attestation.",
            "type": "boolean"
          },
          "worker": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompleteRunRequest": {
        "description": "A run is finished by its own agent (a run-bound credential: by that run alone) or by an operator\n(`agent.operate`), whose action is recorded in the audit log as an operator's.",
        "properties": {
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "run_id": {
            "default": "",
            "type": "string"
          },
          "status": {
            "default": "",
            "type": "string"
          },
          "summary": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ConfigureRepoRequest": {
        "properties": {
          "description": {
            "default": null,
            "type": [
              "string",
              "null"
            ]
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "quota": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Quota",
                "description": "Replaces the repository quota when set."
              },
              {
                "type": "null"
              }
            ]
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Conflict": {
        "properties": {
          "kind": {
            "default": "",
            "description": "A stable code: \"content\", \"both_added\", \"delete_modify\", \"binary\", \"type_change\",\n\"too_large\", \"file_directory\", \"rename_rename\", \"rename_delete\", \"directory_rename_ambiguous\"\nor \"directory_rename_collision\" (the last two: ag-merge/3 found a directory move it cannot follow\nwithout guessing). The set is open: tolerate a code you do not know. Clients may switch on it;\n`message` is for people.",
            "type": "string"
          },
          "message": {
            "default": "",
            "description": "The conflict in words, with the details the code leaves out (e.g. \"content conflict (2 region(s))\").\nEmpty for outcomes stored before the field existed. Do not parse it.",
            "type": "string"
          },
          "path": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateProposalRequest": {
        "properties": {
          "description": {
            "default": "",
            "type": "string"
          },
          "head": {
            "default": "",
            "description": "Revision to propose; it is published first if needed.",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          },
          "task_id": {
            "default": "",
            "type": "string"
          },
          "title": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateRepoRequest": {
        "properties": {
          "default_stream": {
            "default": "",
            "type": "string"
          },
          "description": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateStreamRequest": {
        "properties": {
          "from_rev": {
            "default": "",
            "description": "Start the stream at this revision (default: empty stream).",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateTaskRequest": {
        "properties": {
          "depends_on": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "scope": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CreateWorkspaceRequest": {
        "properties": {
          "from_rev": {
            "default": "",
            "description": "Start from this revision instead of the stream head.",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Credential": {
        "properties": {
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "created_by": {
            "default": "",
            "type": "string"
          },
          "description": {
            "default": "",
            "type": "string"
          },
          "expires_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "kind": {
            "default": "",
            "type": "string"
          },
          "last_used_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "revoked_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "scope": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CredentialScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "CredentialScope": {
        "description": "Restrictions attached to a credential. Every field narrows; empty = no\nrestriction on that dimension.",
        "properties": {
          "operations": {
            "default": [],
            "description": "Operation capabilities, e.g. \"objects.write\", \"proposal.create\"\n(see docs/protocol/authorization.md).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "repos": {
            "default": [],
            "description": "Repository patterns, e.g. \"acme/webapp\" or \"acme/\\*\".",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "run_id": {
            "default": "",
            "description": "Binds the credential to one run of one agent (ADR-0010). `repos` must then name exactly one literal\nrepository (the one that holds the run). A run-bound credential acts only as that run, only in that\nrepository, and stops working when the run is no longer running (completed, failed, abandoned). Minting\nneeds the run to be running and to belong to the credential's subject. Empty = bound to the agent's\nname only (every run of the agent).",
            "type": "string"
          },
          "streams": {
            "default": [],
            "description": "Stream patterns (glob), e.g. \"main\", \"agents/\\*\".",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "DeleteWorkspaceRequest": {
        "properties": {
          "name": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DiffRequest": {
        "properties": {
          "context": {
            "default": 0,
            "description": "Lines of context around each hunk: 0 = the default of 3, at most 100 (larger values are lowered); a diff\nwith no context lines cannot be asked for.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "from": {
            "default": "",
            "type": "string"
          },
          "paths": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "to": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DiffResponse": {
        "properties": {
          "files": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/FileDiff"
            },
            "type": "array"
          },
          "truncated": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "DirEntry": {
        "properties": {
          "blob_id": {
            "default": "",
            "type": "string"
          },
          "executable": {
            "default": false,
            "type": "boolean"
          },
          "kind": {
            "default": "",
            "description": "\"file\", \"symlink\" or \"dir\".",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "size": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Empty": {
        "type": "object"
      },
      "EnqueueRequest": {
        "properties": {
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorInfo"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ErrorInfo": {
        "description": "Structured error detail. `code` values:\nunauthenticated, permission_denied, not_found, already_exists,\ninvalid_argument, failed_precondition, stream_moved,\nidempotency_key_reused, object_missing, object_corrupt, too_large,\nrate_limited, quota_exceeded, unavailable, deadline_exceeded, aborted,\nlease_conflict, stale_candidate, unimplemented, internal.",
        "properties": {
          "code": {
            "default": "",
            "type": "string"
          },
          "details": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "message": {
            "default": "",
            "type": "string"
          },
          "request_id": {
            "default": "",
            "type": "string"
          },
          "retry_after_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "retryable": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Event": {
        "description": "A durable, ordered event. `seq` is strictly increasing per repository and\nnever reused: clients resume with `after_seq` (SSE: Last-Event-ID).",
        "properties": {
          "payload": {
            "description": "JSON object with the event's data.",
            "type": "object"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "seq": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "timestamp_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "topic": {
            "default": "",
            "description": "The audit action the event is a view of, e.g. \"stream.integrate\", \"proposal.create\", \"proposal.review\",\n\"changeset.publish\", \"lease.acquire\", \"run.start\", \"job.enqueue\", \"policy.set\". SubscribeRequest.topics\nmatches by exact name, by dotted prefix (\"proposal\" matches \"proposal.create\" and \"proposal.review\") or\n\"\\*\" (everything).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ExtendLeaseRequest": {
        "properties": {
          "lease_id": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "ttl_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "FailJobRequest": {
        "properties": {
          "error": {
            "default": "",
            "type": "string"
          },
          "fencing_token": {
            "default": 0,
            "description": "The claim this request is for; see HeartbeatJobRequest.fencing_token. 0 = not given.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "job_id": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "retry_after_ms": {
            "default": 0,
            "description": "Retry after this many ms (0 = fail permanently).",
            "format": "int64",
            "type": "integer"
          },
          "worker": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FileChange": {
        "properties": {
          "blob_id": {
            "default": "",
            "type": "string"
          },
          "content": {
            "default": [],
            "description": "Inline content (put). Alternatively reference an uploaded blob.",
            "format": "byte",
            "type": "string"
          },
          "executable": {
            "default": false,
            "type": "boolean"
          },
          "file_type": {
            "default": "",
            "description": "\"regular\" (default) or \"symlink\" (content = target path).",
            "type": "string"
          },
          "op": {
            "default": "",
            "description": "\"put\" or \"delete\".",
            "type": "string"
          },
          "path": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FileDiff": {
        "properties": {
          "additions": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "binary": {
            "default": false,
            "type": "boolean"
          },
          "deletions": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "patch": {
            "default": "",
            "description": "Unified diff text (empty for binary files).",
            "type": "string"
          },
          "path": {
            "default": "",
            "type": "string"
          },
          "status": {
            "default": "",
            "description": "\"added\", \"modified\", \"deleted\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FileOp": {
        "properties": {
          "blob_id": {
            "default": "",
            "description": "Content blob (put only).",
            "type": "string"
          },
          "executable": {
            "default": false,
            "type": "boolean"
          },
          "file_type": {
            "default": "",
            "description": "\"regular\" or \"symlink\".",
            "type": "string"
          },
          "op": {
            "default": "",
            "description": "\"put\" or \"delete\".",
            "type": "string"
          },
          "path": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FinishTaskRequest": {
        "description": "Only the task's owner may finish it - or an operator (`agent.operate`), whose action is recorded in the audit\nlog as an operator's, with the owner it overrode.",
        "properties": {
          "id": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "description": "\"done\" or \"cancelled\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FsckIssue": {
        "properties": {
          "detail": {
            "default": "",
            "type": "string"
          },
          "kind": {
            "default": "",
            "type": "string"
          },
          "object": {
            "default": "",
            "description": "The object or changeset id the problem is about; empty when it is about a stream or the audit chain.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FsckRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "FsckResponse": {
        "properties": {
          "issues": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/FsckIssue"
            },
            "type": "array"
          },
          "objects_checked": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "ok": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "GcRequest": {
        "properties": {
          "dry_run": {
            "default": false,
            "type": "boolean"
          },
          "grace_ms": {
            "default": 0,
            "description": "0 = server default (24 h).",
            "format": "int64",
            "type": "integer"
          },
          "reflog_retention_ms": {
            "default": 0,
            "description": "0 = server default (90 days).",
            "format": "int64",
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GcResponse": {
        "properties": {
          "bytes": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "deleted": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "dry_run": {
            "default": false,
            "type": "boolean"
          },
          "kept_staged": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "kept_young": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reachable_blobs": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reachable_changesets": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "scanned": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "GetCandidateRequest": {
        "properties": {
          "expected_tree_id": {
            "default": "",
            "type": "string"
          },
          "page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "page_token": {
            "default": "",
            "type": "string"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetChangesetRequest": {
        "properties": {
          "include_ops": {
            "default": false,
            "description": "Include the operations (can be large).",
            "type": "boolean"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "description": "Revision expression: id, id prefix, stream, proposal id, with ~N / ^N suffixes.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetJobRequest": {
        "properties": {
          "job_id": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetOperationRequest": {
        "properties": {
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "operation_id": {
            "default": "",
            "description": "Either id works; the idempotency key is the one a client always knows.",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetPolicyRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "description": "Empty = the repository's default stream.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetProposalRequest": {
        "properties": {
          "id": {
            "default": "",
            "description": "Id or unique prefix.",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetRepoRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetTaskRequest": {
        "properties": {
          "id": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetTreeRequest": {
        "properties": {
          "page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "page_token": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "description": "Revision whose resulting tree is wanted.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetTreeResponse": {
        "properties": {
          "entries": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/TreeEntry"
            },
            "type": "array"
          },
          "next_page_token": {
            "default": "",
            "type": "string"
          },
          "total_entries": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "tree_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GetWorkspaceRequest": {
        "properties": {
          "name": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GrantRoleRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "role": {
            "default": "",
            "type": "string"
          },
          "subject": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "HeartbeatJobRequest": {
        "properties": {
          "fencing_token": {
            "default": 0,
            "description": "The claim this request is for: the `attempts` of the Job that ClaimJob returned (every claim of a job, by any\nworker including the same one, has a larger number than the one before). If it is not the job's current claim the\nrequest is refused (`failed_precondition`: the claim was lost), so a worker whose lease expired and whose job\nwas claimed again cannot act on the new claim. 0 = not given: only the worker's identity is checked, as before.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "job_id": {
            "default": "",
            "type": "string"
          },
          "lease_ms": {
            "default": 0,
            "description": "The new lease (\\<= 0 = 120000; at most 3600000, larger values are lowered).",
            "format": "int64",
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "worker": {
            "default": "",
            "description": "The worker that holds the claim.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "HeartbeatRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "run_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "HeartbeatResponse": {
        "properties": {
          "server_time_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "IntegrateRequest": {
        "properties": {
          "fencing_tokens": {
            "default": [],
            "description": "Fencing tokens of exclusive leases the author holds.",
            "items": {
              "format": "int64",
              "minimum": 0,
              "type": "integer"
            },
            "type": "array"
          },
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "IntegrationOutcome": {
        "description": "The decided outcome of an integration. `status` selects which fields are set:\nintegrated: new_head, previous_head, version, strategy, tree_id, changed_files\nblocked:    candidate_changeset, candidate_tree, policy_version, blockers\nconflict:   conflicts, base\ndenied:     blockers\ninvalid:    reason",
        "properties": {
          "base": {
            "default": "",
            "type": "string"
          },
          "blockers": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Blocker"
            },
            "type": "array"
          },
          "candidate_changeset": {
            "default": "",
            "type": "string"
          },
          "candidate_tree": {
            "default": "",
            "type": "string"
          },
          "changed_files": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "conflicts": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Conflict"
            },
            "type": "array"
          },
          "new_head": {
            "default": "",
            "type": "string"
          },
          "policy_version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "previous_head": {
            "default": "",
            "type": "string"
          },
          "reason": {
            "default": "",
            "type": "string"
          },
          "status": {
            "default": "",
            "type": "string"
          },
          "strategy": {
            "default": "",
            "description": "\"fast_forward\", \"merge\" or \"already_integrated\".",
            "type": "string"
          },
          "tree_id": {
            "default": "",
            "type": "string"
          },
          "version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "IntegrationResult": {
        "properties": {
          "operation_id": {
            "default": "",
            "type": "string"
          },
          "outcome": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/IntegrationOutcome"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "default": "",
            "description": "Intent state: prepared, ready, integrated, blocked, rejected, aborted, ...",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Job": {
        "properties": {
          "attempts": {
            "default": 0,
            "description": "How many times the job has been claimed. While the job is `claimed` this is the number of the current claim -\nthe fencing token for HeartbeatJob, CompleteJob and FailJob.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "claimed_by": {
            "default": "",
            "type": "string"
          },
          "claimed_until_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "error": {
            "default": "",
            "type": "string"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "kind": {
            "default": "",
            "description": "\"validate\".",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "result": {
            "type": "object"
          },
          "state": {
            "default": "",
            "description": "\"queued\", \"claimed\", \"succeeded\", \"failed\", \"cancelled\".",
            "type": "string"
          },
          "updated_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "validation": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ValidationTask",
                "description": "Set for kind = \"validate\"."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Lease": {
        "properties": {
          "acquired_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "exclusive": {
            "default": false,
            "type": "boolean"
          },
          "expires_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "fencing_token": {
            "default": 0,
            "description": "Strictly increasing across all exclusive leases of the repository.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "holder": {
            "default": "",
            "type": "string"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "released_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "scope": {
            "default": "",
            "type": "string"
          },
          "task_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LeaseRef": {
        "properties": {
          "lease_id": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Limits": {
        "properties": {
          "max_batch": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_changeset_ops": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_changesets_per_publication": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_object_bytes": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "max_page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_request_bytes": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ListAgentsRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListAgentsResponse": {
        "properties": {
          "agents": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Agent"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListAttestationsRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "tree_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListAttestationsResponse": {
        "properties": {
          "attestations": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Attestation"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListAuditRequest": {
        "properties": {
          "contains": {
            "default": "",
            "description": "Case-insensitive substring match on action, target, actor and details.",
            "type": "string"
          },
          "limit": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListAuditResponse": {
        "properties": {
          "entries": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AuditEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListCredentialsRequest": {
        "properties": {
          "include_revoked": {
            "default": false,
            "type": "boolean"
          },
          "subject": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListCredentialsResponse": {
        "properties": {
          "credentials": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Credential"
            },
            "type": "array"
          },
          "truncated": {
            "default": false,
            "description": "True if there were more credentials than one listing returns (the newest are listed first). Narrow the\nrequest with `subject` to see the rest.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ListDirectoryRequest": {
        "properties": {
          "page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "page_token": {
            "default": "",
            "type": "string"
          },
          "path": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListDirectoryResponse": {
        "properties": {
          "entries": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/DirEntry"
            },
            "type": "array"
          },
          "next_page_token": {
            "default": "",
            "type": "string"
          },
          "tree_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListJobsRequest": {
        "properties": {
          "limit": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListJobsResponse": {
        "properties": {
          "jobs": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Job"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListLeasesRequest": {
        "properties": {
          "active_only": {
            "default": false,
            "description": "Only the leases that are in force now. Without it the newest leases of any state are listed, up to `limit`.",
            "type": "boolean"
          },
          "limit": {
            "default": 0,
            "description": "At most this many leases when `active_only` is not set (0 = 100, maximum 1000). Active leases are all returned.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListLeasesResponse": {
        "properties": {
          "leases": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Lease"
            },
            "type": "array"
          },
          "truncated": {
            "default": false,
            "description": "True if more leases matched than `limit` allowed.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ListPinsRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListPinsResponse": {
        "properties": {
          "pins": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Pin"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListProposalsRequest": {
        "properties": {
          "author": {
            "default": "",
            "type": "string"
          },
          "page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "page_token": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListProposalsResponse": {
        "properties": {
          "next_page_token": {
            "default": "",
            "type": "string"
          },
          "proposals": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Proposal"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListProvenanceRequest": {
        "properties": {
          "changeset": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListProvenanceResponse": {
        "properties": {
          "entries": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ProvenanceEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListQueueRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListQueueResponse": {
        "properties": {
          "entries": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/QueueEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListReposRequest": {
        "properties": {
          "page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "page_token": {
            "default": "",
            "type": "string"
          },
          "prefix": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListReposResponse": {
        "properties": {
          "next_page_token": {
            "default": "",
            "type": "string"
          },
          "repos": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Repo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListRolesRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "subject": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListRolesResponse": {
        "properties": {
          "bindings": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/RoleBinding"
            },
            "type": "array"
          },
          "truncated": {
            "default": false,
            "description": "True if there were more role bindings than one listing returns. Narrow the request with `subject` or `repo`.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ListRunsRequest": {
        "properties": {
          "active_only": {
            "default": false,
            "type": "boolean"
          },
          "agent": {
            "default": "",
            "type": "string"
          },
          "limit": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListRunsResponse": {
        "properties": {
          "runs": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Run"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListStreamsRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListStreamsResponse": {
        "properties": {
          "streams": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Stream"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListTasksRequest": {
        "properties": {
          "ready_only": {
            "default": false,
            "type": "boolean"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListTasksResponse": {
        "properties": {
          "tasks": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Task"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ListWorkspacesRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ListWorkspacesResponse": {
        "properties": {
          "workspaces": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Workspace"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "LogRequest": {
        "properties": {
          "page_size": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "page_token": {
            "default": "",
            "type": "string"
          },
          "path": {
            "default": "",
            "description": "Restrict to changesets touching this path.",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LogResponse": {
        "properties": {
          "changesets": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Changeset"
            },
            "type": "array"
          },
          "next_page_token": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "LoginToken": {
        "description": "Which token of the authorization-code response is the bearer credential.",
        "enum": [
          "id_token",
          "access_token"
        ],
        "type": "string"
      },
      "MergeBaseRequest": {
        "properties": {
          "a": {
            "default": "",
            "type": "string"
          },
          "b": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MergeBaseResponse": {
        "properties": {
          "bases": {
            "default": [],
            "description": "Empty = unrelated histories; more than one = criss-cross (refused by merge).",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "MintCredentialRequest": {
        "properties": {
          "description": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "scope": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CredentialScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject": {
            "default": "",
            "description": "Identity the credential authenticates as. A caller may mint credentials\nfor itself, with `credentials.mint` (administrators) for anybody, or with `credentials.delegate`\n(the `delegator` role) for `agent:<name>` only - and then only with the capabilities the caller itself\nholds on the scope's repositories (ADR-0010).",
            "type": "string"
          },
          "ttl_secs": {
            "default": 0,
            "description": "Lifetime in seconds; capped by server policy (agents: short).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MintCredentialResponse": {
        "properties": {
          "credential": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Credential"
              },
              {
                "type": "null"
              }
            ]
          },
          "token": {
            "default": "",
            "description": "The secret token. Shown exactly once; only its hash is stored.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MissingObjectsRequest": {
        "properties": {
          "object_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "MissingObjectsResponse": {
        "properties": {
          "missing": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ModifyWorkspaceRequest": {
        "properties": {
          "changes": {
            "default": [],
            "description": "Applied atomically as ONE new changeset on top of the workspace head.",
            "items": {
              "$ref": "#/components/schemas/FileChange"
            },
            "type": "array"
          },
          "expected_head": {
            "default": "",
            "description": "Reject if the workspace head moved (optimistic concurrency); empty = skip.",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "message": {
            "default": "",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "NegotiateRequest": {
        "properties": {
          "client_name": {
            "default": "",
            "type": "string"
          },
          "client_version": {
            "default": "",
            "type": "string"
          },
          "features": {
            "default": [],
            "description": "Optional features the client would like to use.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "supported_versions": {
            "default": [],
            "description": "Protocol versions the client speaks, e.g. \\[\"agwp.v1\"\\].",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "NegotiateResponse": {
        "properties": {
          "auth_methods": {
            "default": [],
            "description": "Accepted credential types: \"bearer\", \"oidc\".",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "features": {
            "default": [],
            "description": "Features supported by both sides (e.g. \"events.replay\", \"workspaces.virtual\",\n\"execution.jobs\", \"objects.chunked\").",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "limits": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Limits"
              },
              {
                "type": "null"
              }
            ]
          },
          "protocol_version": {
            "default": "",
            "description": "The version selected for this session, e.g. \"agwp.v1\".",
            "type": "string"
          },
          "server_version": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ObjectStatus": {
        "properties": {
          "detail": {
            "default": "",
            "type": "string"
          },
          "object_id": {
            "default": "",
            "type": "string"
          },
          "size": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "status": {
            "default": "",
            "description": "\"ok\", \"missing\" or \"corrupt\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Operation": {
        "properties": {
          "actor": {
            "default": "",
            "type": "string"
          },
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "integration": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/IntegrationResult",
                "description": "Set for kind = \"integrate\"."
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "default": "",
            "type": "string"
          },
          "operation_id": {
            "default": "",
            "type": "string"
          },
          "publication": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Publication",
                "description": "Set for kind = \"publish\"."
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          },
          "updated_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Overlap": {
        "properties": {
          "a": {
            "default": "",
            "type": "string"
          },
          "b": {
            "default": "",
            "type": "string"
          },
          "kind": {
            "default": "",
            "type": "string"
          },
          "paths": {
            "default": [],
            "description": "The overlapping paths, sorted, at most 20: a longer list is cut and the cut is not signalled, so treat the\nlist as a sample. The overlap itself (the entry's existence) is what matters.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Pin": {
        "properties": {
          "changeset": {
            "default": "",
            "type": "string"
          },
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "reason": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PinRequest": {
        "properties": {
          "name": {
            "default": "",
            "type": "string"
          },
          "reason": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PolicyHistoryRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "description": "Empty = the repository's default stream.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PolicyHistoryResponse": {
        "properties": {
          "versions": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/PolicyVersion"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PolicyVersion": {
        "properties": {
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "created_by": {
            "default": "",
            "type": "string"
          },
          "doc_hash": {
            "default": "",
            "type": "string"
          },
          "document": {
            "default": "",
            "description": "The policy document (JSON, see docs/guides/policy.md).",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          },
          "version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PredictRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PredictResponse": {
        "properties": {
          "overlaps": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Overlap"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Preparation": {
        "description": "What integrating a proposal would do right now, without doing it.",
        "properties": {
          "algorithm": {
            "default": "",
            "type": "string"
          },
          "base": {
            "default": "",
            "type": "string"
          },
          "blockers": {
            "default": [],
            "description": "What policy would say right now (empty = it would allow the integration).",
            "items": {
              "$ref": "#/components/schemas/Blocker"
            },
            "type": "array"
          },
          "candidate_tree": {
            "default": "",
            "type": "string"
          },
          "changed_files": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "conflicts": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Conflict"
            },
            "type": "array"
          },
          "jobs": {
            "default": [],
            "description": "Jobs enqueued by this call (or already queued for the same candidate).",
            "items": {
              "$ref": "#/components/schemas/Job"
            },
            "type": "array"
          },
          "policy_version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "problem": {
            "default": "",
            "type": "string"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "strategy": {
            "default": "",
            "description": "\"fast_forward\", \"merge\", \"already_integrated\" or \"\" when there is no candidate.",
            "type": "string"
          },
          "validations": {
            "default": [],
            "description": "Required checks and where they stand.",
            "items": {
              "$ref": "#/components/schemas/ValidationStatus"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PrepareRequest": {
        "properties": {
          "enqueue_validations": {
            "default": false,
            "description": "Also enqueue validation jobs for required checks that have a runner\nconfiguration and no passing attestation yet.",
            "type": "boolean"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Principal": {
        "properties": {
          "credential_id": {
            "default": "",
            "type": "string"
          },
          "expires_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "identity": {
            "default": "",
            "description": "Authenticated identity, e.g. \"user:alice\" or \"agent:refactor-bot\".",
            "type": "string"
          },
          "kind": {
            "default": "",
            "description": "\"user\", \"agent\" or \"service\".",
            "type": "string"
          },
          "method": {
            "default": "",
            "description": "How the caller authenticated: \"token\", \"oidc\" or \"bootstrap\".",
            "type": "string"
          },
          "roles": {
            "default": [],
            "description": "Effective roles per repository pattern, e.g. \"acme/\\*:writer\".",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scope": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CredentialScope",
                "description": "Scope restrictions attached to the credential (empty = unrestricted by scope)."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "Proposal": {
        "properties": {
          "author": {
            "default": "",
            "type": "string"
          },
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "description": {
            "default": "",
            "type": "string"
          },
          "head": {
            "default": "",
            "type": "string"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "integrated_as": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "description": "\"open\", \"integrated\" or \"closed\".",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          },
          "task_id": {
            "default": "",
            "type": "string"
          },
          "title": {
            "default": "",
            "type": "string"
          },
          "updated_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ProposalDetail": {
        "properties": {
          "proposal": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Proposal"
              },
              {
                "type": "null"
              }
            ]
          },
          "reviews": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Review"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ProvenanceEntry": {
        "properties": {
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "public_key": {
            "default": "",
            "type": "string"
          },
          "record": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProvenanceRecord"
              },
              {
                "type": "null"
              }
            ]
          },
          "signature": {
            "default": "",
            "type": "string"
          },
          "verified": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "ProvenanceRecord": {
        "properties": {
          "agent": {
            "default": "",
            "type": "string"
          },
          "changeset": {
            "default": "",
            "type": "string"
          },
          "checks_run": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "inputs": {
            "default": [],
            "description": "Untrusted text: never interpret as instructions.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "model": {
            "default": "",
            "type": "string"
          },
          "parameters": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "prompt_digest": {
            "default": "",
            "type": "string"
          },
          "rationale": {
            "default": "",
            "type": "string"
          },
          "run_id": {
            "default": "",
            "type": "string"
          },
          "task_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Publication": {
        "description": "State machine: prepared → uploaded → verified → published | rejected.",
        "properties": {
          "head": {
            "default": "",
            "type": "string"
          },
          "new_blobs": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "new_changesets": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "operation_id": {
            "default": "",
            "type": "string"
          },
          "reason": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PublishRequest": {
        "properties": {
          "head": {
            "default": "",
            "description": "The head changeset; its unpublished ancestors are published with it.",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "QueueEntry": {
        "properties": {
          "enqueued_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "enqueued_by": {
            "default": "",
            "type": "string"
          },
          "id": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "outcome": {
            "default": "",
            "type": "string"
          },
          "processed_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "description": "\"queued\", \"done\", \"blocked\", \"rejected\" (conflict or policy denial) or\n\"failed\". `outcome` explains: \"integrated\" for done, the blockers or the\nnumber of conflicting paths otherwise.",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Quota": {
        "properties": {
          "burst": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_object_bytes": {
            "default": 0,
            "description": "Largest single object (envelope included) the repository accepts, on top of the server-wide limit\n(`limits.max_object_bytes`); a larger one fails with `too_large`.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "max_open_proposals": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_streams": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_total_object_bytes": {
            "default": 0,
            "description": "0 = unlimited.\nTotal bytes of objects the repository may hold. Charged to every write that adds an object (uploads,\nworkspace edits, merges); a write that would pass it fails with `quota_exceeded`. The tracked total is an\nestimate that garbage collection recounts.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "requests_per_second": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ReadHeadRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          },
          "wait_ms": {
            "default": 0,
            "description": "At most 30000; larger values are lowered.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "wait_version_gt": {
            "default": 0,
            "description": "Long-poll: wait up to `wait_ms` for the stream version to exceed this value.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ReapRunsRequest": {
        "description": "Ends the runs of a repository that stopped heartbeating, releases the leases they (and finished runs) still\nhold, and revokes the credentials bound to them. An operator action (capability `agent.operate`); every\nrun it ends is recorded in the audit log under the operator's identity.",
        "properties": {
          "dry_run": {
            "default": false,
            "description": "Report what would be reaped without changing anything.",
            "type": "boolean"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "stale_after_ms": {
            "default": 0,
            "description": "A running run whose last heartbeat is older than this is abandoned. 0 = the server's\n`\\[agents\\] run_stale_after_secs`. Values below the server's `\\[agents\\] min_stale_after_secs` are refused, so\nthat a typo cannot end every live run.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ReapRunsResponse": {
        "properties": {
          "dry_run": {
            "default": false,
            "type": "boolean"
          },
          "released_leases": {
            "default": [],
            "description": "Ids of the leases that were (or would be) released: those of the reaped runs and any active lease whose\nholder is a run that is no longer running.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "revoked_credentials": {
            "default": 0,
            "description": "How many credentials bound to the reaped runs were revoked (0 with `dry_run`).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "runs": {
            "default": [],
            "description": "The runs that were (or, with `dry_run`, would be) ended as \"abandoned\".",
            "items": {
              "$ref": "#/components/schemas/Run"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ReflogEntry": {
        "properties": {
          "actor": {
            "default": "",
            "type": "string"
          },
          "new_head": {
            "default": "",
            "type": "string"
          },
          "old_head": {
            "default": "",
            "type": "string"
          },
          "operation_id": {
            "default": "",
            "type": "string"
          },
          "reason": {
            "default": "",
            "type": "string"
          },
          "seq": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "timestamp_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ReflogRequest": {
        "properties": {
          "limit": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReflogResponse": {
        "properties": {
          "entries": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ReflogEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "RegisterAgentRequest": {
        "properties": {
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "public_key": {
            "default": "",
            "description": "Hex Ed25519 public key. The private key never leaves the agent.",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "role": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ReplayRequest": {
        "properties": {
          "after_seq": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "limit": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "topics": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ReplayResponse": {
        "properties": {
          "events": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array"
          },
          "latest_seq": {
            "default": 0,
            "description": "Highest seq currently stored; more events remain if the last returned\nseq is below it.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Repo": {
        "properties": {
          "changeset_count": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "counts_error": {
            "default": "",
            "description": "Empty when `stream_count` and `changeset_count` are exact; otherwise why they could not be read.",
            "type": "string"
          },
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "created_by": {
            "default": "",
            "type": "string"
          },
          "default_stream": {
            "default": "",
            "type": "string"
          },
          "description": {
            "default": "",
            "type": "string"
          },
          "durability": {
            "default": "",
            "description": "Human-readable durability contract of the object backend. Filled by Describe only (it is a property of the\nopen object store).",
            "type": "string"
          },
          "meta_backend": {
            "default": "",
            "description": "Storage in use: \"sqlite\"/\"postgres\" and \"fs\"/\"s3\", as configured for this repository (create, describe\nand list all report the same).",
            "type": "string"
          },
          "name": {
            "default": "",
            "description": "\"owner/name\".",
            "type": "string"
          },
          "namespace": {
            "default": "",
            "description": "The namespace hashed into every changeset of this repository.",
            "type": "string"
          },
          "object_backend": {
            "default": "",
            "type": "string"
          },
          "quota": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Quota"
              },
              {
                "type": "null"
              }
            ]
          },
          "stream_count": {
            "default": 0,
            "description": "Exact: read from the repository's own metadata by Create, Describe and List alike. When the repository\ncannot be read (its storage is unreachable or damaged), both are 0 and `counts_error` says why.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RequestValidationRequest": {
        "properties": {
          "checks": {
            "default": [],
            "description": "Checks to validate (default: all required checks that have a runner).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RequestValidationResponse": {
        "properties": {
          "jobs": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Job"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ResolvePathRequest": {
        "properties": {
          "path": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResolvePathResponse": {
        "properties": {
          "entry": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/TreeEntry"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "default": "",
            "description": "\"file\", \"symlink\", \"dir\" or \"missing\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResolveRevRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "rev": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ResolveRevResponse": {
        "properties": {
          "changeset_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Review": {
        "properties": {
          "body": {
            "default": "",
            "type": "string"
          },
          "decision": {
            "default": "",
            "description": "\"approve\", \"request_changes\" or \"comment\".",
            "type": "string"
          },
          "head": {
            "default": "",
            "description": "The head the reviewer looked at; approvals of other heads do not count.",
            "type": "string"
          },
          "id": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "reviewer": {
            "default": "",
            "type": "string"
          },
          "timestamp_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ReviewProposalRequest": {
        "properties": {
          "body": {
            "default": "",
            "type": "string"
          },
          "decision": {
            "default": "",
            "type": "string"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RevokeCredentialRequest": {
        "properties": {
          "credential_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RevokeCredentialResponse": {
        "properties": {
          "revoked": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "RevokeRoleRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          },
          "role": {
            "default": "",
            "type": "string"
          },
          "subject": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RoleBinding": {
        "properties": {
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "created_by": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "description": "Repository pattern, e.g. \"acme/webapp\", \"acme/*\", \"*\".",
            "type": "string"
          },
          "role": {
            "default": "",
            "description": "reader, writer, reviewer, integrator, runner, delegator, admin.",
            "type": "string"
          },
          "subject": {
            "default": "",
            "description": "Identity pattern, e.g. \"user:alice\", \"agent:\\*\", \"group:platform\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Run": {
        "properties": {
          "agent": {
            "default": "",
            "type": "string"
          },
          "finished_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "identity": {
            "default": "",
            "description": "e.g. \"agent:bot#run_ab12…\" — the identity to act as for this run.",
            "type": "string"
          },
          "last_heartbeat_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "run_id": {
            "default": "",
            "type": "string"
          },
          "started_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "default": "",
            "description": "\"running\", \"completed\", \"failed\" or \"abandoned\" (ended by a reap: no heartbeat within the operator's\nthreshold; see ReapRuns).",
            "type": "string"
          },
          "summary": {
            "default": "",
            "type": "string"
          },
          "task_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RunQueueRequest": {
        "properties": {
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RunQueueResponse": {
        "properties": {
          "processed": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/QueueEntry"
            },
            "type": "array"
          },
          "stopped_at": {
            "default": "",
            "description": "Proposals that stopped the run (blocked / conflict), if any.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "RunSpec": {
        "description": "How a trusted worker runs a check. Configured by administrators in the\nstream policy (never taken from repository contents).",
        "properties": {
          "argv": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "cpu_secs": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "env": {
            "additionalProperties": {
              "type": "string"
            },
            "default": {},
            "description": "Non-secret environment variables.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "image": {
            "default": "",
            "description": "Pinned image reference for OCI workers (optional).",
            "type": "string"
          },
          "max_pids": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "memory_mb": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "network": {
            "default": false,
            "description": "Network access is off unless explicitly requested here.",
            "type": "boolean"
          },
          "timeout_secs": {
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SetPolicyRequest": {
        "properties": {
          "document": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StartRunRequest": {
        "properties": {
          "agent": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "task_id": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Stream": {
        "properties": {
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "created_by": {
            "default": "",
            "type": "string"
          },
          "head": {
            "default": "",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "policy_version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SubmitAttestationRequest": {
        "properties": {
          "attestation": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Attestation"
              },
              {
                "type": "null"
              }
            ]
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SubmitAttestationResponse": {
        "properties": {
          "accepted": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SubmitProvenanceRequest": {
        "properties": {
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "record": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProvenanceRecord"
              },
              {
                "type": "null"
              }
            ]
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "signature": {
            "default": "",
            "description": "Ed25519 signature (hex) over the canonical record bytes, made with the\nagent's own key.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SyncWorkspaceRequest": {
        "properties": {
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          },
          "resolutions": {
            "default": [],
            "description": "Resolved files for every conflicting path. Without them a conflicting\nsync changes nothing and reports the conflicts; with them the clean\nparts of the merge plus these files become a two-parent merge changeset.",
            "items": {
              "$ref": "#/components/schemas/FileChange"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SyncWorkspaceResponse": {
        "properties": {
          "conflicts": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Conflict"
            },
            "type": "array"
          },
          "head": {
            "default": "",
            "type": "string"
          },
          "status": {
            "default": "",
            "description": "\"up_to_date\", \"fast_forwarded\", \"merged\" or \"conflicted\".",
            "type": "string"
          }
        },
        "type": "object"
      },
      "Task": {
        "properties": {
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "created_by": {
            "default": "",
            "type": "string"
          },
          "depends_on": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": {
            "default": "",
            "type": "string"
          },
          "id": {
            "default": "",
            "type": "string"
          },
          "owner": {
            "default": "",
            "type": "string"
          },
          "ready": {
            "default": false,
            "description": "True when every dependency is done.",
            "type": "boolean"
          },
          "scope": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "state": {
            "default": "",
            "description": "\"open\", \"in_progress\", \"done\", \"cancelled\".",
            "type": "string"
          },
          "title": {
            "default": "",
            "type": "string"
          },
          "updated_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "TreeEntry": {
        "properties": {
          "blob_id": {
            "default": "",
            "type": "string"
          },
          "executable": {
            "default": false,
            "type": "boolean"
          },
          "file_type": {
            "default": "",
            "type": "string"
          },
          "path": {
            "default": "",
            "type": "string"
          },
          "size": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "UnpinRequest": {
        "properties": {
          "name": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateProposalRequest": {
        "properties": {
          "id": {
            "default": "",
            "type": "string"
          },
          "idempotency_key": {
            "default": "",
            "description": "Accepted and ignored: this operation does not deduplicate (see Conventions above).",
            "type": "string"
          },
          "new_head": {
            "default": "",
            "type": "string"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ValidationStatus": {
        "properties": {
          "attestation_id": {
            "default": "",
            "type": "string"
          },
          "check": {
            "default": "",
            "type": "string"
          },
          "job_id": {
            "default": "",
            "type": "string"
          },
          "state": {
            "default": "",
            "description": "\"passed\", \"failed\", \"pending\" (job queued/running), \"missing\" (no runner configured).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ValidationTask": {
        "properties": {
          "check": {
            "default": "",
            "type": "string"
          },
          "policy_version": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "proposal": {
            "default": "",
            "type": "string"
          },
          "required_environment_digest": {
            "default": "",
            "description": "If set, the attestation must carry exactly this environment digest.",
            "type": "string"
          },
          "run": {
            "default": null,
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "stream": {
            "default": "",
            "type": "string"
          },
          "tree_id": {
            "default": "",
            "description": "The exact tree to check. A worker must refuse a candidate with another id.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VerifyAuditRequest": {
        "properties": {
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VerifyAuditResponse": {
        "properties": {
          "detail": {
            "default": "",
            "type": "string"
          },
          "entries": {
            "default": 0,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "ok": {
            "default": false,
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "VerifyObjectsRequest": {
        "properties": {
          "object_ids": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "repo": {
            "default": "",
            "type": "string"
          }
        },
        "type": "object"
      },
      "VerifyObjectsResponse": {
        "properties": {
          "objects": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/ObjectStatus"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "WhoamiRequest": {
        "type": "object"
      },
      "Workspace": {
        "properties": {
          "base": {
            "default": "",
            "type": "string"
          },
          "created_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          },
          "head": {
            "default": "",
            "type": "string"
          },
          "name": {
            "default": "",
            "type": "string"
          },
          "owner": {
            "default": "",
            "type": "string"
          },
          "stream": {
            "default": "",
            "type": "string"
          },
          "updated_at_ms": {
            "default": 0,
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "A scoped token (agt_…), an OIDC token, or the bootstrap token.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The HTTP/JSON gateway of AGWP v1. The same messages are served over gRPC; see proto/agwp/v1/agwp.proto. Mutating requests that create something (repositories, proposals, objects, tasks, runs, leases, integrations) accept an `Idempotency-Key` header; see docs/protocol/agwp-v1.md for exactly which. Free-form names (streams, revisions, paths) travel in the query string or body.",
    "license": {
      "name": "Apache-2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "AgentGit AGWP HTTP/JSON API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/auth/config": {
      "get": {
        "operationId": "session.auth_config",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthConfig"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "How a browser can sign in: the identity providers the Web UI redirects to, or `token` (no credentials needed)",
        "tags": [
          "Session"
        ]
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "session.negotiate",
        "parameters": [
          {
            "in": "query",
            "name": "client_name",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "client_version",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "features",
            "required": false,
            "schema": {
              "default": [],
              "description": "Optional features the client would like to use.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "supported_versions",
            "required": false,
            "schema": {
              "default": [],
              "description": "Protocol versions the client speaks, e.g. \\[\"agwp.v1\"\\].",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NegotiateResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [],
        "summary": "Protocol version, features, limits and accepted authentication methods (no credentials needed)",
        "tags": [
          "Session"
        ]
      }
    },
    "/v1/credentials": {
      "get": {
        "operationId": "admin.credentials.list",
        "parameters": [
          {
            "in": "query",
            "name": "include_revoked",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCredentialsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List credentials",
        "tags": [
          "Admin"
        ]
      },
      "post": {
        "operationId": "admin.credentials.mint",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MintCredentialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintCredentialResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Mint a scoped, expiring credential (the token is shown once)",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/credentials/{credential_id}": {
      "delete": {
        "operationId": "admin.credentials.revoke",
        "parameters": [
          {
            "description": "",
            "in": "path",
            "name": "credential_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeCredentialResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Revoke a credential",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/jobs/claim": {
      "post": {
        "operationId": "jobs.claim",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimJobResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Claim the next queued job (long-poll with wait_ms); repo is optional",
        "tags": [
          "Execution"
        ]
      }
    },
    "/v1/repos": {
      "get": {
        "operationId": "repo.list",
        "parameters": [
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "prefix",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListReposResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List repositories the caller can read",
        "tags": [
          "Repository"
        ]
      },
      "post": {
        "operationId": "repo.create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRepoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Repo"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Create a repository",
        "tags": [
          "Repository"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}": {
      "get": {
        "operationId": "repo.describe",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Repo"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Describe a repository",
        "tags": [
          "Repository"
        ]
      },
      "patch": {
        "operationId": "repo.configure",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfigureRepoRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Repo"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Change repository settings and quota",
        "tags": [
          "Repository"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/agents": {
      "get": {
        "operationId": "agent.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAgentsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List agents",
        "tags": [
          "Agent"
        ]
      },
      "post": {
        "operationId": "agent.register",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Agent"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Register an agent and its public key",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/attestations": {
      "get": {
        "operationId": "integration.attestations",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tree_id",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAttestationsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Attestations for a tree",
        "tags": [
          "Integration"
        ]
      },
      "post": {
        "operationId": "integration.attest",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitAttestationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitAttestationResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Submit a signed attestation",
        "tags": [
          "Integration"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/audit": {
      "get": {
        "operationId": "admin.audit",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "contains",
            "required": false,
            "schema": {
              "default": "",
              "description": "Case-insensitive substring match on action, target, actor and details.",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAuditResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Audit entries (newest first)",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/audit/verify": {
      "get": {
        "operationId": "admin.audit.verify",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyAuditResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Verify the audit hash chain",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/blame": {
      "get": {
        "operationId": "history.blame",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "first_line",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Only lines first_line..=last_line (1-based); both 0 = the whole file.",
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "last_line",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "max_commits",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Visit at most this many changesets (0 = the server default).",
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "default": "",
              "description": "Revision expression (default: the repository's default stream).",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlameResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Which changeset introduced each line of a file (follows renames)",
        "tags": [
          "History"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/changeset": {
      "get": {
        "operationId": "history.changeset",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_ops",
            "required": false,
            "schema": {
              "default": false,
              "description": "Include the operations (can be large).",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "default": "",
              "description": "Revision expression: id, id prefix, stream, proposal id, with ~N / ^N suffixes.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Changeset"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "One changeset by revision expression",
        "tags": [
          "History"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/diff": {
      "post": {
        "operationId": "tree.diff",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiffRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiffResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Per-file diffs between two revisions",
        "tags": [
          "Tree"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/events": {
      "get": {
        "operationId": "events.subscribe",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Replay events with a larger sequence number first; absent means follow from now",
            "in": "query",
            "name": "after_seq",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Comma-separated topic prefixes, e.g. stream,proposal",
            "in": "query",
            "name": "topics",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Interval of keep-alive comments (0 = server default)",
            "in": "query",
            "name": "heartbeat_ms",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Server-Sent Events: replay after after_seq (or Last-Event-ID), then follow live",
        "tags": [
          "Events"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/events/replay": {
      "get": {
        "operationId": "events.replay",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after_seq",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int64",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "topics",
            "required": false,
            "schema": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Replay events after a sequence number (query: after_seq, limit, topics=a,b)",
        "tags": [
          "Events"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/files/{*path}": {
      "get": {
        "operationId": "tree.file",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Revision expression; empty means the repository's default stream",
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "File content at a revision (query: rev); binary body",
        "tags": [
          "Tree"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/fsck": {
      "post": {
        "operationId": "admin.fsck",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FsckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FsckResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Integrity check",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/gc": {
      "post": {
        "operationId": "admin.gc",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GcRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GcResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Garbage collection",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/history/ancestors": {
      "post": {
        "operationId": "history.ancestors",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AncestorsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AncestorsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Changesets reachable from want but not from have, parents first",
        "tags": [
          "History"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/history/merge-base": {
      "get": {
        "operationId": "history.merge_base",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "a",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "b",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MergeBaseResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Merge bases of two revisions",
        "tags": [
          "History"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/history/resolve": {
      "get": {
        "operationId": "history.resolve",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveRevResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Resolve a revision expression to a changeset id",
        "tags": [
          "History"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/jobs": {
      "get": {
        "operationId": "jobs.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListJobsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List jobs",
        "tags": [
          "Execution"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/jobs/{job_id}": {
      "get": {
        "operationId": "jobs.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "One job",
        "tags": [
          "Execution"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/jobs/{job_id}/complete": {
      "post": {
        "operationId": "jobs.complete",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Complete a job (with its signed attestation)",
        "tags": [
          "Execution"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/jobs/{job_id}/fail": {
      "post": {
        "operationId": "jobs.fail",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FailJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Fail a job, optionally scheduling a retry",
        "tags": [
          "Execution"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/jobs/{job_id}/heartbeat": {
      "post": {
        "operationId": "jobs.heartbeat",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HeartbeatJobRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Extend the claim on a job",
        "tags": [
          "Execution"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/leases": {
      "get": {
        "operationId": "lease.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "active_only",
            "required": false,
            "schema": {
              "default": false,
              "description": "Only the leases that are in force now. Without it the newest leases of any state are listed, up to `limit`.",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 0,
              "description": "At most this many leases when `active_only` is not set (0 = 100, maximum 1000). Active leases are all returned.",
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListLeasesResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List leases",
        "tags": [
          "Agent"
        ]
      },
      "post": {
        "operationId": "lease.acquire",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcquireLeaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcquireLeaseResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Acquire a soft or exclusive lease",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/leases/{lease_id}": {
      "delete": {
        "operationId": "lease.release",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "lease_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Empty"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Release a lease",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/leases/{lease_id}/extend": {
      "post": {
        "operationId": "lease.extend",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "lease_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendLeaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lease"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Extend a lease",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/log": {
      "get": {
        "operationId": "history.log",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "default": "",
              "description": "Restrict to changesets touching this path.",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "History from a revision, newest first",
        "tags": [
          "History"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/objects/missing": {
      "post": {
        "operationId": "objects.missing",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MissingObjectsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MissingObjectsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Which of these objects does the repository lack?",
        "tags": [
          "Objects"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/objects/verify": {
      "post": {
        "operationId": "objects.verify",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyObjectsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyObjectsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Re-read and hash objects",
        "tags": [
          "Objects"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/objects/{object_id}": {
      "get": {
        "operationId": "objects.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Download one object envelope (binary body)",
        "tags": [
          "Objects"
        ]
      },
      "put": {
        "operationId": "objects.put",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "object_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Upload one object envelope (binary body); the server verifies that it hashes to object_id and answers {object_id, stored}",
        "tags": [
          "Objects"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/operations": {
      "get": {
        "operationId": "operations.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "idempotency_key",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "operation_id",
            "required": false,
            "schema": {
              "default": "",
              "description": "Either id works; the idempotency key is the one a client always knows.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The recorded outcome of an operation (by operation_id or idempotency_key)",
        "tags": [
          "Objects"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/pins": {
      "delete": {
        "operationId": "admin.unpin",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Empty"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Remove a pin (query: name)",
        "tags": [
          "Admin"
        ]
      },
      "get": {
        "operationId": "admin.pins",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPinsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List pins",
        "tags": [
          "Admin"
        ]
      },
      "post": {
        "operationId": "admin.pin",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pin"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Pin a revision as a GC root",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/policy": {
      "get": {
        "operationId": "admin.policy.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "stream",
            "required": false,
            "schema": {
              "default": "",
              "description": "Empty = the repository's default stream.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyVersion"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The policy in force for a stream",
        "tags": [
          "Admin"
        ]
      },
      "put": {
        "operationId": "admin.policy.set",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPolicyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyVersion"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Store a new policy version",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/policy/history": {
      "get": {
        "operationId": "admin.policy.history",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "stream",
            "required": false,
            "schema": {
              "default": "",
              "description": "Empty = the repository's default stream.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyHistoryResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "All versions of a stream's policy",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/predict": {
      "get": {
        "operationId": "agent.predict",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "stream",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Predict overlapping work on a stream",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals": {
      "get": {
        "operationId": "proposal.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "author",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "stream",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProposalsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List proposals",
        "tags": [
          "Proposal"
        ]
      },
      "post": {
        "operationId": "proposal.create",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Proposal"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Open a proposal",
        "tags": [
          "Proposal"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals/{id}": {
      "get": {
        "operationId": "proposal.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProposalDetail"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "One proposal with its reviews",
        "tags": [
          "Proposal"
        ]
      },
      "patch": {
        "operationId": "proposal.update",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Proposal"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Move a proposal to a newer head",
        "tags": [
          "Proposal"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals/{id}/close": {
      "post": {
        "operationId": "proposal.close",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CloseProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Proposal"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Close without integrating",
        "tags": [
          "Proposal"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals/{id}/reviews": {
      "post": {
        "operationId": "proposal.review",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewProposalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Review"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Review the current head",
        "tags": [
          "Proposal"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals/{proposal}/candidate": {
      "get": {
        "operationId": "jobs.candidate",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "proposal",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "expected_tree_id",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTreeResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The candidate tree of a proposal, for a worker to check out",
        "tags": [
          "Execution"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals/{proposal}/integrate": {
      "post": {
        "operationId": "integration.integrate",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "proposal",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationResult"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Integrate the proposal into its stream",
        "tags": [
          "Integration"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals/{proposal}/prepare": {
      "post": {
        "operationId": "integration.prepare",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "proposal",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preparation"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "What integrating would do now, and what is missing",
        "tags": [
          "Integration"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/proposals/{proposal}/validate": {
      "post": {
        "operationId": "integration.validate",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "proposal",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestValidationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestValidationResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Queue validation jobs for the candidate",
        "tags": [
          "Integration"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/provenance": {
      "get": {
        "operationId": "provenance.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "changeset",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProvenanceResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Provenance records of a changeset",
        "tags": [
          "Agent"
        ]
      },
      "post": {
        "operationId": "provenance.submit",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitProvenanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvenanceEntry"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Submit a signed provenance record",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/publish": {
      "post": {
        "operationId": "objects.publish",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Publication"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Publish a head and its unpublished ancestors",
        "tags": [
          "Objects"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/queue": {
      "get": {
        "operationId": "queue.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "stream",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListQueueResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The queue of a stream",
        "tags": [
          "Integration"
        ]
      },
      "post": {
        "operationId": "queue.enqueue",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnqueueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueEntry"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Append a proposal to the integration queue",
        "tags": [
          "Integration"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/queue/run": {
      "post": {
        "operationId": "queue.run",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunQueueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunQueueResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Process queued proposals in order",
        "tags": [
          "Integration"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/reflog": {
      "get": {
        "operationId": "stream.reflog",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "stream",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReflogResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The reflog of a stream",
        "tags": [
          "Stream"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/runs": {
      "get": {
        "operationId": "agent.list_runs",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "active_only",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "agent",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRunsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List runs",
        "tags": [
          "Agent"
        ]
      },
      "post": {
        "operationId": "agent.start_run",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Start a run (returns the identity to act as)",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/runs/reap": {
      "post": {
        "operationId": "agent.reap_runs",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReapRunsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReapRunsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Operator: end the runs that stopped heartbeating, release their leases and revoke their credentials",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/runs/{run_id}/complete": {
      "post": {
        "operationId": "agent.complete",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Run"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Finish a run",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/runs/{run_id}/heartbeat": {
      "post": {
        "operationId": "agent.heartbeat",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HeartbeatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeartbeatResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Run heartbeat",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/streams": {
      "get": {
        "operationId": "stream.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListStreamsResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List streams",
        "tags": [
          "Stream"
        ]
      },
      "post": {
        "operationId": "stream.create",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStreamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stream"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Create a stream",
        "tags": [
          "Stream"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/streams/cas": {
      "post": {
        "operationId": "stream.cas",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompareAndSwapRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stream"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Administrative compare-and-swap of a stream head",
        "tags": [
          "Stream"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/streams/head": {
      "get": {
        "operationId": "stream.head",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "stream",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "wait_ms",
            "required": false,
            "schema": {
              "default": 0,
              "description": "At most 30000; larger values are lowered.",
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "wait_version_gt",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Long-poll: wait up to `wait_ms` for the stream version to exceed this value.",
              "format": "int64",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stream"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Read a stream head (optionally long-poll for a newer version)",
        "tags": [
          "Stream"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/tasks": {
      "get": {
        "operationId": "task.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ready_only",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTasksResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List tasks",
        "tags": [
          "Agent"
        ]
      },
      "post": {
        "operationId": "task.create",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Create a task",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/tasks/{id}": {
      "get": {
        "operationId": "task.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "One task",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/tasks/{id}/finish": {
      "post": {
        "operationId": "task.finish",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishTaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Mark a task done or cancelled",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/tasks/{task}/dependencies": {
      "post": {
        "operationId": "task.depend",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "task",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDependencyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Add a task dependency",
        "tags": [
          "Agent"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/tree": {
      "get": {
        "operationId": "tree.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "default": "",
              "description": "Revision whose resulting tree is wanted.",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTreeResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The whole tree of a revision (paginated manifest)",
        "tags": [
          "Tree"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/tree/list": {
      "get": {
        "operationId": "tree.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 0,
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_token",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDirectoryResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List a directory",
        "tags": [
          "Tree"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/tree/resolve": {
      "get": {
        "operationId": "tree.resolve",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rev",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvePathResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "What exists at a path",
        "tags": [
          "Tree"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/workspaces": {
      "get": {
        "operationId": "workspace.list",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListWorkspacesResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List workspaces",
        "tags": [
          "Workspace"
        ]
      },
      "post": {
        "operationId": "workspace.create",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Create a virtual workspace",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/workspaces/{name}": {
      "delete": {
        "operationId": "workspace.delete",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Empty"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Remove a workspace",
        "tags": [
          "Workspace"
        ]
      },
      "get": {
        "operationId": "workspace.get",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "One workspace",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/workspaces/{name}/changes": {
      "post": {
        "operationId": "workspace.modify",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ModifyWorkspaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Apply file changes as one new changeset",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/v1/repos/{owner}/{rname}/workspaces/{name}/sync": {
      "post": {
        "operationId": "workspace.sync",
        "parameters": [
          {
            "description": "Repository owner (first half of owner/name)",
            "in": "path",
            "name": "owner",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Repository name (second half of owner/name)",
            "in": "path",
            "name": "rname",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncWorkspaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncWorkspaceResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Bring the stream head into the workspace (with optional conflict resolutions)",
        "tags": [
          "Workspace"
        ]
      }
    },
    "/v1/roles": {
      "delete": {
        "operationId": "admin.roles.revoke",
        "parameters": [
          {
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Empty"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Revoke a role (query: subject, repo, role)",
        "tags": [
          "Admin"
        ]
      },
      "get": {
        "operationId": "admin.roles.list",
        "parameters": [
          {
            "in": "query",
            "name": "repo",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListRolesResponse"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "List role bindings",
        "tags": [
          "Admin"
        ]
      },
      "post": {
        "operationId": "admin.roles.grant",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleBinding"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "Grant a role",
        "tags": [
          "Admin"
        ]
      }
    },
    "/v1/whoami": {
      "get": {
        "operationId": "session.whoami",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Principal"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Error"
          }
        },
        "summary": "The authenticated identity, its roles and credential scope",
        "tags": [
          "Session"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "/"
    }
  ]
}
