# Generated public contract; edit the source and localization catalog.
openapi: 3.1.0
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
info:
  title: OrbitSpace Tasks and approvals API
  version: 1.0.0
  description: Public v1 application contract for tasks and approvals. Protocol lifecycle and capability availability are documented in the integration guides.
servers:
  - url: https://api.orbitspace.dev
security:
  - bearerAuth: []
paths:
  /api/v1/approvals:
    get:
      tags:
        - ApprovalService
      operationId: ApprovalService_ListApprovals
      parameters:
        - name: status
          in: query
          schema:
            enum:
              - APPROVAL_STATUS_UNSPECIFIED
              - APPROVAL_STATUS_PENDING
              - APPROVAL_STATUS_APPROVED
              - APPROVAL_STATUS_DENIED
              - APPROVAL_STATUS_EXPIRED
              - APPROVAL_STATUS_CANCELLED
            type: string
            format: enum
            description: Status.
            x-enum-descriptions:
              APPROVAL_STATUS_UNSPECIFIED: unspecified
              APPROVAL_STATUS_PENDING: pending
              APPROVAL_STATUS_APPROVED: approved
              APPROVAL_STATUS_DENIED: denied
              APPROVAL_STATUS_EXPIRED: expired
              APPROVAL_STATUS_CANCELLED: cancelled
          description: Status.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: Requested page size, subject to the endpoint limits.
        - name: page_token
          in: query
          schema:
            type: string
          description: Opaque pagination token returned by the previous page. Do not construct or modify it.
        - name: status_group
          in: query
          schema:
            type: string
          description: Status group used to filter current or historical records. See the endpoint contract for accepted values.
        - name: query
          in: query
          schema:
            type: string
          description: Query.
        - name: summary_only
          in: query
          schema:
            type: boolean
          description: Request summary records instead of the full resource representation.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListApprovalsResponse"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: List approvals
      description: List approvals. Use the declared pagination parameters to continue through results.
  /api/v1/approvals/{id}:
    get:
      tags:
        - ApprovalService
      operationId: ApprovalService_GetApproval
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Approval"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Get approval
      description: Get approval.
  /api/v1/approvals/{id}/approve:
    post:
      tags:
        - ApprovalService
      operationId: ApprovalService_ApproveApproval
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApproveApprovalRequest"
        required: true
        description: Request body for approve approval.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Approval"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Approve approval
      description: Approve approval. Supply the fields defined in the request schema.
  /api/v1/approvals/{id}/deny:
    post:
      tags:
        - ApprovalService
      operationId: ApprovalService_DenyApproval
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DenyApprovalRequest"
        required: true
        description: Request body for deny approval.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Approval"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Deny approval
      description: Deny approval. Supply the fields defined in the request schema.
  /api/v1/conversations/{conversation_id}/settings:
    get:
      tags:
        - TaskService
      operationId: TaskService_GetConversationSettings
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
          description: Conversation id.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConversationSettings"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Get conversation settings
      description: Get conversation settings.
    put:
      tags:
        - TaskService
      operationId: TaskService_UpdateConversationSettings
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
          description: Conversation id.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateConversationSettingsRequest"
        required: true
        description: Request body for update conversation settings.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConversationSettings"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Update conversation settings
      description: Update conversation settings. Supply the fields defined in the request schema.
  /api/v1/delegation-joins/{id}:
    get:
      tags:
        - TaskService
      operationId: TaskService_GetDelegationJoin
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DelegationJoin"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Get delegation join
      description: Get delegation join.
  /api/v1/delegations/{id}:
    get:
      tags:
        - TaskService
      operationId: TaskService_GetDelegation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Delegation"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Get delegation
      description: Get delegation.
  /api/v1/delegations/{id}/cancel:
    post:
      tags:
        - TaskService
      operationId: TaskService_CancelDelegation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CancelDelegationRequest"
        required: true
        description: Request body for cancel delegation.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Delegation"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Cancel delegation
      description: Cancel delegation. Supply the fields defined in the request schema.
  /api/v1/input-requests/{id}:
    get:
      tags:
        - TaskService
      operationId: TaskService_GetTaskInputRequest
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RunInputRequest"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Get task input request
      description: Get task input request.
  /api/v1/input-requests/{id}:reply:
    post:
      tags:
        - TaskService
      operationId: TaskService_ReplyTaskInputRequest
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReplyTaskInputRequestRequest"
            examples:
              answer-question:
                summary: Answer the exact pending Input Request
                description: Replace the request ID in the URL. Copy state_version into expected_state_version as a decimal string and supply a response matching the pending question's JSON Schema. Reuse the idempotency key only for the same answer.
                value:
                  expected_state_version: "9007199254740993"
                  idempotency_key: input-answer-example-001
                  response:
                    approved: true
        required: true
        description: Request body for reply to task input request.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RunInputRequest"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Reply to task input request
      description: Answer the exact pending Input Request identified in the URL. Copy its state_version into expected_state_version without numeric rounding, and send a response conforming to the requested JSON Schema. Keep the same idempotency_key only when retrying the same answer. This is an input continuation, not creation of a new Task.
  /api/v1/skills:package-repository:
    post:
      tags:
        - TaskService
      description: |-
        Deterministic, authorized Runtime operation; does not call a model or
         publish a Registry version. The resulting Artifact is previewed first.
      operationId: TaskService_RequestSkillRepositoryPackage
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RequestSkillRepositoryPackageRequest"
        required: true
        description: Request body for request skill repository package.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Request Skill repository package
  /api/v1/tasks:
    get:
      tags:
        - TaskService
      operationId: TaskService_ListTasks
      parameters:
        - name: status
          in: query
          schema:
            enum:
              - TASK_STATUS_UNSPECIFIED
              - TASK_STATUS_QUEUED
              - TASK_STATUS_PLANNING
              - TASK_STATUS_PROVISIONING
              - TASK_STATUS_RUNNING
              - TASK_STATUS_WAITING_APPROVAL
              - TASK_STATUS_WAITING_INPUT
              - TASK_STATUS_PAUSED
              - TASK_STATUS_COMPLETED
              - TASK_STATUS_FAILED
              - TASK_STATUS_CANCELLED
            type: string
            format: enum
            description: Status.
            x-enum-descriptions:
              TASK_STATUS_UNSPECIFIED: unspecified
              TASK_STATUS_QUEUED: queued
              TASK_STATUS_PLANNING: planning
              TASK_STATUS_PROVISIONING: provisioning
              TASK_STATUS_RUNNING: running
              TASK_STATUS_WAITING_APPROVAL: waiting approval
              TASK_STATUS_WAITING_INPUT: waiting input
              TASK_STATUS_PAUSED: paused
              TASK_STATUS_COMPLETED: completed
              TASK_STATUS_FAILED: failed
              TASK_STATUS_CANCELLED: cancelled
          description: Status.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: Requested page size, subject to the endpoint limits.
        - name: page_token
          in: query
          schema:
            type: string
          description: Opaque pagination token returned by the previous page. Do not construct or modify it.
        - name: conversation_id
          in: query
          schema:
            type: string
          description: Conversation id.
        - name: root_only
          in: query
          schema:
            type: boolean
          description: Root only.
        - name: status_group
          in: query
          description: |-
            Empty/all preserves the existing behavior; current excludes terminal Tasks,
             history includes completed, failed and cancelled Tasks. Intersects status.
          schema:
            type: string
        - name: query
          in: query
          description: Case-insensitive input search or an exact Task/Workspace UUID (max 256 chars).
          schema:
            type: string
        - name: summary_only
          in: query
          description: Omit full input and other execution configuration from operational lists.
          schema:
            type: boolean
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTasksResponse"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: List tasks
      description: List tasks. Use the declared pagination parameters to continue through results.
    post:
      tags:
        - TaskService
      operationId: TaskService_CreateTask
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateTaskRequest"
            examples:
              workspace-binding:
                summary: Submit a Task using an active Workspace binding
                description: Replace both UUIDs with an accessible Workspace and one of its active Agent bindings. The server resolves the admitted Agent and Environment versions from that binding.
                value:
                  workspace_id: 11111111-1111-4111-8111-111111111111
                  workspace_agent_binding_id: 22222222-2222-4222-8222-222222222222
                  input: Summarize the supplied document.
        required: true
        description: Request body for create task.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Create task
      description: Submit work with an accessible Workspace and an active workspace_agent_binding_id. The binding resolves the admitted Agent and Environment versions. A Task is the durable work item; its Runs record execution attempts. Follow Task events and pending Input Requests after submission.
  /api/v1/tasks/{id}:
    get:
      tags:
        - TaskService
      operationId: TaskService_GetTask
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Get task
      description: Read the Task snapshot, including execution state and associated Run information. Use the events endpoint for ordered progress and the Input Requests endpoint for questions awaiting a response.
  /api/v1/tasks/{id}/cancel:
    post:
      tags:
        - TaskService
      operationId: TaskService_CancelTask
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CancelTaskRequest"
        required: true
        description: Request body for cancel task.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Cancel task
      description: Cancel task. Supply the fields defined in the request schema.
  /api/v1/tasks/{id}/pause:
    post:
      tags:
        - TaskService
      operationId: TaskService_PauseTask
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PauseTaskRequest"
        required: true
        description: Request body for pause task.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Pause task
      description: Pause task. Supply the fields defined in the request schema.
  /api/v1/tasks/{id}/resume:
    post:
      tags:
        - TaskService
      operationId: TaskService_ResumeTask
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResumeTaskRequest"
        required: true
        description: Request body for resume task.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Resume task
      description: Resume task. Supply the fields defined in the request schema.
  /api/v1/tasks/{id}/retry:
    post:
      tags:
        - TaskService
      operationId: TaskService_RetryTask
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the resource addressed by this schema or URL.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RetryTaskRequest"
        required: true
        description: Request body for retry task.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Task"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: Retry task
      description: Request a new execution attempt for a Task that permits retry. Keep Task identity separate from Run identity when displaying attempts or reconciling events.
  /api/v1/tasks/{parent_task_id}/delegations:
    get:
      tags:
        - TaskService
      operationId: TaskService_ListTaskDelegations
      parameters:
        - name: parent_task_id
          in: path
          required: true
          schema:
            type: string
          description: Parent task id.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: Requested page size, subject to the endpoint limits.
        - name: page_token
          in: query
          schema:
            type: string
          description: Opaque pagination token returned by the previous page. Do not construct or modify it.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTaskDelegationsResponse"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: List task delegations
      description: List task delegations. Use the declared pagination parameters to continue through results.
  /api/v1/tasks/{task_id}/events:
    get:
      tags:
        - TaskService
      operationId: TaskService_ListTaskEvents
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the durable Task; do not substitute an execution Run ID.
        - name: after_sequence
          in: query
          schema:
            type: string
          description: Read events after this sequence number. Preserve exact integer precision when persisting a cursor.
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: Requested page size, subject to the endpoint limits.
        - name: tail
          in: query
          description: |-
            Return the newest page in ascending sequence order. This is intended for
             conversation previews; callers can still request the complete history by
             paging forward from after_sequence=0.
          schema:
            type: boolean
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTaskEventsResponse"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: List task events
      description: Read persisted Task events using the declared cursor and page parameters. Keep the event sequence for ordering and deduplication. The integration guide describes snapshot recovery and the separate live event stream.
  /api/v1/tasks/{task_id}/input-requests:
    get:
      tags:
        - TaskService
      operationId: TaskService_ListTaskInputRequests
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: Identifier of the durable Task; do not substitute an execution Run ID.
      responses:
        "200":
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTaskInputRequestsResponse"
        default:
          description: RFC 9457 Problem Details.
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: List task input requests
      description: List the questions or input requests associated with this Task. Read each request state, state_version and response schema before submitting an answer.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    Approval:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        tenant_id:
          type: string
          description: Tenant identifier used with the authenticated access context. Supplying an ID does not grant access.
        task_id:
          type: string
          description: Identifier of the durable Task; do not substitute an execution Run ID.
        run_id:
          type: string
          description: Identifier of an execution Run associated with a Task.
        tool_call_id:
          type: string
          description: Tool call id.
        provider_call_id:
          type: string
          description: Provider call id.
        kind:
          type: string
          description: Kind.
        request_json:
          type: string
          format: bytes
          description: Request json encoded as Base64.
        request_hash:
          type: string
          description: Request hash.
        status:
          enum:
            - APPROVAL_STATUS_UNSPECIFIED
            - APPROVAL_STATUS_PENDING
            - APPROVAL_STATUS_APPROVED
            - APPROVAL_STATUS_DENIED
            - APPROVAL_STATUS_EXPIRED
            - APPROVAL_STATUS_CANCELLED
          type: string
          format: enum
          description: Status.
          x-enum-descriptions:
            APPROVAL_STATUS_UNSPECIFIED: unspecified
            APPROVAL_STATUS_PENDING: pending
            APPROVAL_STATUS_APPROVED: approved
            APPROVAL_STATUS_DENIED: denied
            APPROVAL_STATUS_EXPIRED: expired
            APPROVAL_STATUS_CANCELLED: cancelled
        decision:
          type: string
          description: Decision.
        decided_by:
          type: string
          description: Decided by.
        expires_at:
          type: string
          format: date-time
          description: Expires at as an RFC 3339 timestamp.
        decided_at:
          type: string
          format: date-time
          description: Decided at as an RFC 3339 timestamp.
        created_at:
          type: string
          format: date-time
          description: Created at as an RFC 3339 timestamp.
        updated_at:
          type: string
          format: date-time
          description: Updated at as an RFC 3339 timestamp.
        scope_task_id:
          type: string
          description: Scope task id.
        delegation_approval_policy:
          enum:
            - DELEGATION_APPROVAL_POLICY_UNSPECIFIED
            - DELEGATION_APPROVAL_POLICY_INHERIT
            - DELEGATION_APPROVAL_POLICY_INDEPENDENT
          type: string
          format: enum
          description: Delegation approval policy.
          x-enum-descriptions:
            DELEGATION_APPROVAL_POLICY_UNSPECIFIED: unspecified
            DELEGATION_APPROVAL_POLICY_INHERIT: inherit
            DELEGATION_APPROVAL_POLICY_INDEPENDENT: independent
        policy_scope_id:
          type: string
          description: Policy scope id.
        request_summary:
          type: string
          description: Request summary.
        manual_decision_required:
          type: boolean
          description: |-
            True when an immutable policy forbids system auto-approval for this
             specific Tool request.
      description: Approval representation.
    ApproveApprovalRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
      description: Approve approval request.
    CancelDelegationRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        expected_child_task_state_version:
          type: string
          description: Expected child task state version.
      description: Cancel delegation request.
    CancelTaskRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        expected_state_version:
          type: string
          description: Expected state revision for optimistic concurrency. Copy the current revision exactly; do not round it through a JavaScript Number.
      description: Cancel task request.
    ConversationSettings:
      type: object
      properties:
        conversation_id:
          type: string
          description: Conversation id.
        tenant_id:
          type: string
          description: Tenant identifier used with the authenticated access context. Supplying an ID does not grant access.
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: Approval mode.
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: unspecified
            EXECUTION_APPROVAL_MODE_MANUAL: manual
            EXECUTION_APPROVAL_MODE_AUTO: auto
        state_version:
          type: string
          description: State revision used for optimistic concurrency. Preserve its exact decimal representation.
        created_at:
          type: string
          format: date-time
          description: Created at as an RFC 3339 timestamp.
        updated_at:
          type: string
          format: date-time
          description: Updated at as an RFC 3339 timestamp.
        workspace_id:
          type: string
          description: Set by the first Task or Goal and immutable for the Conversation.
      description: Conversation settings representation.
    CreateTaskRequest:
      type: object
      properties:
        agent_version_id:
          type: string
          description: Agent version id.
        workspace_id:
          type: string
          description: Workspace identifier. A Workspace is a persistent collaboration context, distinct from a per-task worktree.
        input:
          type: string
          description: Input accepted by this request. Its declared schema and, for invocations, the configured input adapter determine the shape.
        priority:
          type: integer
          format: int32
          description: Priority.
        idempotency_key:
          type: string
          description: Idempotency key for this operation. Reuse it only when retrying the same submission with the same payload.
        environment_version_id:
          type: string
          description: Environment version id.
        policy_scope_id:
          type: string
          description: Policy scope id.
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: Model config.
        participants:
          type: array
          items:
            $ref: "#/components/schemas/TaskParticipant"
          description: Participants list.
        conversation_id:
          type: string
          description: Conversation id.
        workspace_agent_binding_id:
          type: string
          description: |-
            When present, agent_version_id and environment_version_id are resolved
             from this active Workspace team binding.
        result_contract:
          type: object
          description: Result contract.
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: Approval mode.
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: unspecified
            EXECUTION_APPROVAL_MODE_MANUAL: manual
            EXECUTION_APPROVAL_MODE_AUTO: auto
        input_attachments:
          type: array
          items:
            $ref: "#/components/schemas/TaskInputAttachment"
          description: Input attachments list.
        worktree_id:
          type: string
          description: |-
            Optional explicit branch. When empty, a Conversation reuses its Worktree;
             otherwise a root Task forks an isolated Worktree from Workspace main.
        token_budget:
          type: string
          description: |-
            Optional aggregate limits for this Task's complete Run, across every
             model/tool round. Zero keeps the corresponding dimension unlimited.
        cost_budget_microunits:
          type: string
          description: This monetary envelope includes all retries and delegated descendants.
        compute_budget_ms:
          type: string
          description: Compute budget ms.
        skill_invocations:
          type: array
          items:
            type: string
          description: |-
            Explicit caller invocation of Skills already pinned in the Environment.
             Workers cannot supply this field; no implicit delegation inheritance.
        work_contract:
          $ref: "#/components/schemas/WorkContract"
          description: Work contract.
        cost_budget_currency:
          type: string
          description: Optional assertion against the accepted charge price currency; never FX.
      description: Create task request.
    Delegation:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        tenant_id:
          type: string
          description: Tenant identifier used with the authenticated access context. Supplying an ID does not grant access.
        parent_task_id:
          type: string
          description: Parent task id.
        parent_run_id:
          type: string
          description: Parent run id.
        child_task_id:
          type: string
          description: Child task id.
        child_agent_version_id:
          type: string
          description: Child agent version id.
        child_environment_version_id:
          type: string
          description: Child environment version id.
        child_workspace_id:
          type: string
          description: Child workspace id.
        input:
          type: string
          description: Input accepted by this request. Its declared schema and, for invocations, the configured input adapter determine the shape.
        context_refs:
          type: array
          items:
            type: string
          description: Context refs list.
        input_artifact_ids:
          type: array
          items:
            type: string
          description: Input artifact ids list.
        result_contract:
          type: object
          description: Result contract.
        deadline:
          type: string
          format: date-time
          description: Deadline as an RFC 3339 timestamp.
        token_budget:
          type: string
          description: Token budget.
        cost_budget_microunits:
          type: string
          description: Cost budget microunits.
        compute_budget_ms:
          type: string
          description: Compute budget ms.
        depth:
          type: integer
          format: int32
          description: Depth.
        max_depth:
          type: integer
          format: int32
          description: Max depth.
        cancellation_policy:
          enum:
            - DELEGATION_CANCELLATION_POLICY_UNSPECIFIED
            - DELEGATION_CANCELLATION_POLICY_CASCADE
            - DELEGATION_CANCELLATION_POLICY_DETACH
          type: string
          format: enum
          description: Cancellation policy.
          x-enum-descriptions:
            DELEGATION_CANCELLATION_POLICY_UNSPECIFIED: unspecified
            DELEGATION_CANCELLATION_POLICY_CASCADE: cascade
            DELEGATION_CANCELLATION_POLICY_DETACH: detach
        approval_policy:
          enum:
            - DELEGATION_APPROVAL_POLICY_UNSPECIFIED
            - DELEGATION_APPROVAL_POLICY_INHERIT
            - DELEGATION_APPROVAL_POLICY_INDEPENDENT
          type: string
          format: enum
          description: Approval policy.
          x-enum-descriptions:
            DELEGATION_APPROVAL_POLICY_UNSPECIFIED: unspecified
            DELEGATION_APPROVAL_POLICY_INHERIT: inherit
            DELEGATION_APPROVAL_POLICY_INDEPENDENT: independent
        child_task_status:
          enum:
            - TASK_STATUS_UNSPECIFIED
            - TASK_STATUS_QUEUED
            - TASK_STATUS_PLANNING
            - TASK_STATUS_PROVISIONING
            - TASK_STATUS_RUNNING
            - TASK_STATUS_WAITING_APPROVAL
            - TASK_STATUS_WAITING_INPUT
            - TASK_STATUS_PAUSED
            - TASK_STATUS_COMPLETED
            - TASK_STATUS_FAILED
            - TASK_STATUS_CANCELLED
          type: string
          format: enum
          description: Child task status.
          x-enum-descriptions:
            TASK_STATUS_UNSPECIFIED: unspecified
            TASK_STATUS_QUEUED: queued
            TASK_STATUS_PLANNING: planning
            TASK_STATUS_PROVISIONING: provisioning
            TASK_STATUS_RUNNING: running
            TASK_STATUS_WAITING_APPROVAL: waiting approval
            TASK_STATUS_WAITING_INPUT: waiting input
            TASK_STATUS_PAUSED: paused
            TASK_STATUS_COMPLETED: completed
            TASK_STATUS_FAILED: failed
            TASK_STATUS_CANCELLED: cancelled
        created_at:
          type: string
          format: date-time
          description: Created at as an RFC 3339 timestamp.
        updated_at:
          type: string
          format: date-time
          description: Updated at as an RFC 3339 timestamp.
        child_run_id:
          type: string
          description: Child run id.
        child_run_status:
          enum:
            - RUN_STATUS_UNSPECIFIED
            - RUN_STATUS_QUEUED
            - RUN_STATUS_CLAIMED
            - RUN_STATUS_RUNNING
            - RUN_STATUS_WAITING_APPROVAL
            - RUN_STATUS_WAITING_INPUT
            - RUN_STATUS_PAUSED
            - RUN_STATUS_COMPLETED
            - RUN_STATUS_FAILED
            - RUN_STATUS_INTERRUPTED
            - RUN_STATUS_CANCELLED
          type: string
          format: enum
          description: Child run status.
          x-enum-descriptions:
            RUN_STATUS_UNSPECIFIED: unspecified
            RUN_STATUS_QUEUED: queued
            RUN_STATUS_CLAIMED: claimed
            RUN_STATUS_RUNNING: running
            RUN_STATUS_WAITING_APPROVAL: waiting approval
            RUN_STATUS_WAITING_INPUT: waiting input
            RUN_STATUS_PAUSED: paused
            RUN_STATUS_COMPLETED: completed
            RUN_STATUS_FAILED: failed
            RUN_STATUS_INTERRUPTED: interrupted
            RUN_STATUS_CANCELLED: cancelled
        child_final_output:
          type: string
          description: Child final output.
        child_failure_code:
          type: string
          description: Child failure code.
        child_failure_message:
          type: string
          description: Child failure message.
        wait_for_completion:
          type: boolean
          description: Wait for completion.
        input_token_usage:
          type: string
          description: Input token usage.
        output_token_usage:
          type: string
          description: Output token usage.
        cost_usage_microunits:
          type: string
          description: Cost usage microunits.
        compute_usage_ms:
          type: string
          description: Compute usage ms.
        budget_exhausted:
          type: boolean
          description: Budget exhausted.
        budget_exhausted_dimension:
          type: string
          description: Budget exhausted dimension.
        budget_exhausted_at:
          type: string
          format: date-time
          description: Budget exhausted at as an RFC 3339 timestamp.
        token_usage:
          type: string
          description: Token usage.
        join_id:
          type: string
          description: Join id.
        result_artifact_ids:
          type: array
          items:
            type: string
          description: Result artifact ids list.
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: Model config.
        child_workspace_agent_binding_id:
          type: string
          description: Child workspace agent binding id.
        workspace_delegation_grant_id:
          type: string
          description: Workspace delegation grant id.
        workspace_delegation_grant_state_version:
          type: string
          description: Workspace delegation grant state version.
        handoff:
          type: object
          description: Optional immutable, domain-neutral orbitspace.handoff/v1 envelope.
        cost_budget_currency:
          type: string
          description: Cost budget currency.
      description: Delegation representation.
    DelegationJoin:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        tenant_id:
          type: string
          description: Tenant identifier used with the authenticated access context. Supplying an ID does not grant access.
        parent_task_id:
          type: string
          description: Parent task id.
        parent_run_id:
          type: string
          description: Parent run id.
        delegation_ids:
          type: array
          items:
            type: string
          description: Delegation ids list.
        result_policy:
          enum:
            - DELEGATION_JOIN_RESULT_POLICY_UNSPECIFIED
            - DELEGATION_JOIN_RESULT_POLICY_REQUIRE_ALL
            - DELEGATION_JOIN_RESULT_POLICY_ALL_SETTLED
          type: string
          format: enum
          description: Result policy.
          x-enum-descriptions:
            DELEGATION_JOIN_RESULT_POLICY_UNSPECIFIED: unspecified
            DELEGATION_JOIN_RESULT_POLICY_REQUIRE_ALL: require all
            DELEGATION_JOIN_RESULT_POLICY_ALL_SETTLED: all settled
        status:
          enum:
            - DELEGATION_JOIN_STATUS_UNSPECIFIED
            - DELEGATION_JOIN_STATUS_WAITING
            - DELEGATION_JOIN_STATUS_COMPLETED
            - DELEGATION_JOIN_STATUS_FAILED
            - DELEGATION_JOIN_STATUS_CANCELLED
          type: string
          format: enum
          description: Status.
          x-enum-descriptions:
            DELEGATION_JOIN_STATUS_UNSPECIFIED: unspecified
            DELEGATION_JOIN_STATUS_WAITING: waiting
            DELEGATION_JOIN_STATUS_COMPLETED: completed
            DELEGATION_JOIN_STATUS_FAILED: failed
            DELEGATION_JOIN_STATUS_CANCELLED: cancelled
        delegations:
          type: array
          items:
            $ref: "#/components/schemas/Delegation"
          description: Delegations list.
        result:
          type: object
          description: Result.
        completed_at:
          type: string
          format: date-time
          description: Completed at as an RFC 3339 timestamp.
        created_at:
          type: string
          format: date-time
          description: Created at as an RFC 3339 timestamp.
        updated_at:
          type: string
          format: date-time
          description: Updated at as an RFC 3339 timestamp.
      description: Delegation join representation.
    DenyApprovalRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
      description: Deny approval request.
    GoogleProtobufValue:
      description: Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
    ListApprovalsResponse:
      type: object
      properties:
        approvals:
          type: array
          items:
            $ref: "#/components/schemas/Approval"
          description: Approvals list.
        next_page_token:
          type: string
          description: Pagination token for the next page. An empty value indicates there is no next page.
        total_count:
          type: string
          description: Total count.
      description: List approvals response.
    ListTaskDelegationsResponse:
      type: object
      properties:
        delegations:
          type: array
          items:
            $ref: "#/components/schemas/Delegation"
          description: Delegations list.
        next_page_token:
          type: string
          description: Pagination token for the next page. An empty value indicates there is no next page.
      description: List task delegations response.
    ListTaskEventsResponse:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: "#/components/schemas/TaskEvent"
          description: Events list.
        next_sequence:
          type: string
          description: Next sequence.
      description: List task events response.
    ListTaskInputRequestsResponse:
      type: object
      properties:
        requests:
          type: array
          items:
            $ref: "#/components/schemas/RunInputRequest"
          description: Requests list.
      description: List task input requests response.
    ListTasksResponse:
      type: object
      properties:
        tasks:
          type: array
          items:
            $ref: "#/components/schemas/Task"
          description: Tasks list.
        next_page_token:
          type: string
          description: Pagination token for the next page. An empty value indicates there is no next page.
        total_count:
          type: string
          description: Total count.
      description: List tasks response.
    ModelContextCompactionAttempt:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        input_digest:
          type: string
          description: Input digest.
        source_digest:
          type: string
          description: Source digest.
        round:
          type: string
          description: Round.
        state:
          type: string
          description: State.
        compaction_id:
          type: string
          description: Compaction id.
      description: Latest durable compaction attempt, including suppressed or failed attempts.
    ModelContextComposition:
      type: object
      properties:
        request_bytes:
          type: string
          description: Request bytes.
        history_bytes:
          type: string
          description: History bytes.
        media_bytes:
          type: string
          description: Media bytes.
        media_items:
          type: string
          description: Media items.
        protected_text_bytes:
          type: string
          description: Protected text bytes.
        compactable_text_bytes:
          type: string
          description: Compactable text bytes.
        recent_text_bytes:
          type: string
          description: Recent text bytes.
        tool_bytes:
          type: string
          description: Tool bytes.
      description: |-
        Measured serialized request categories. These byte counts are not token
         estimates and media nodes are not mixed into the text categories.
    ModelContextProgress:
      type: object
      properties:
        last_event_sequence:
          type: string
          description: Last event sequence.
        session_id:
          type: string
          description: Session id.
        model:
          type: string
          description: Model.
        context_window_tokens:
          type: string
          description: Context window tokens.
        max_output_tokens:
          type: string
          description: Max output tokens.
        output_reserve_tokens:
          type: string
          description: Output reserve tokens.
        input_limit_tokens:
          type: string
          description: Input limit tokens.
        input_tokens:
          type: string
          description: Input tokens.
        tokens_reported:
          type: boolean
          description: Tokens reported.
        request_bytes:
          type: string
          description: Request bytes.
        bytes_reported:
          type: boolean
          description: Bytes reported.
        trigger_bytes:
          type: string
          description: Trigger bytes.
        limits_source:
          type: string
          description: Limits source.
        usage_source:
          type: string
          description: Usage source.
        compaction_count:
          type: string
          description: Compaction count.
        compaction_state:
          type: string
          description: Compaction state.
        last_compaction_id:
          type: string
          description: Last compaction id.
        before_bytes:
          type: string
          description: Before bytes.
        after_bytes:
          type: string
          description: After bytes.
        source_digest:
          type: string
          description: Source digest.
        composition:
          $ref: "#/components/schemas/ModelContextComposition"
          description: Composition.
        retention:
          $ref: "#/components/schemas/ModelContextRetention"
          description: Retention.
        compaction_skip_reason:
          type: string
          description: Compaction skip reason.
        compaction_attempt_count:
          type: string
          description: Compaction attempt count.
        constraint_count:
          type: string
          description: Constraint count.
        overflow_recovery_count:
          type: string
          description: Overflow recovery count.
        latest_compaction_attempt:
          $ref: "#/components/schemas/ModelContextCompactionAttempt"
          description: Latest compaction attempt.
      description: |-
        Last request measurements and compaction provenance; zero without the reporting
         flag means unknown. Cumulative consumption remains in TaskStatistics.
    ModelContextRetention:
      type: object
      properties:
        items:
          type: string
          description: Items.
        text_bytes:
          type: string
          description: Text bytes.
        text_budget_bytes:
          type: string
          description: Text budget bytes.
        estimated_text_tokens:
          type: string
          description: Estimated text tokens.
        token_budget:
          type: string
          description: Token budget.
        tokens_reported:
          type: boolean
          description: Tokens reported.
        token_source:
          type: string
          description: Token source.
        indivisible_floor_exceeds_budget:
          type: boolean
          description: Indivisible floor exceeds budget.
      description: Most recent bounded retention decision used by the context engine.
    ModelInvocationConfig:
      type: object
      properties:
        model:
          type: string
          description: Model.
        reasoning_effort:
          type: string
          description: Reasoning effort.
      description: |-
        ModelInvocationConfig is shared by Agent defaults, Task overrides and the
         effective Run snapshot. reasoning_effort is a provider-advertised identifier
         such as low, xhigh, max, ultra or thinking; OrbitSpace does not freeze the
         provider's evolving vocabulary into a protobuf enum. Empty Task fields
         inherit the Agent/provider default.
    PauseTaskRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        expected_state_version:
          type: string
          description: Expected state revision for optimistic concurrency. Copy the current revision exactly; do not round it through a JavaScript Number.
      description: Pause task request.
    ProblemDetails:
      type: object
      description: RFC 9457 Problem Details with OrbitSpace correlation extensions.
      required:
        - type
        - title
        - status
        - detail
        - request_id
      properties:
        type:
          type: string
          format: uri
          description: Type.
        title:
          type: string
          description: Title.
        status:
          type: integer
          minimum: 400
          maximum: 599
          description: Status.
        detail:
          type: string
          description: Detail.
        instance:
          type: string
          format: uri-reference
          description: Instance.
        code:
          type: string
          pattern: ^[A-Z][A-Z0-9_]*$
          description: Code.
        request_id:
          type: string
          format: uuid
          description: Request id.
    ReplyTaskInputRequestRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        expected_state_version:
          type: string
          description: Expected state revision for optimistic concurrency. Copy the current revision exactly; do not round it through a JavaScript Number.
        response:
          $ref: "#/components/schemas/GoogleProtobufValue"
          description: Response.
        artifact_ids:
          type: array
          items:
            type: string
          description: Artifact ids list.
        idempotency_key:
          type: string
          description: Idempotency key for this operation. Reuse it only when retrying the same submission with the same payload.
      description: Reply to task input request request.
    RepositoryChangeSet:
      type: object
      properties:
        binding_id:
          type: string
          description: Binding id.
        repository_id:
          type: string
          description: Repository id.
        key:
          type: string
          description: Key.
        mount_path:
          type: string
          description: Mount path.
        base_commit:
          type: string
          description: Base commit.
        head_commit:
          type: string
          description: Head commit.
        dirty:
          type: boolean
          description: Dirty.
        conflicted:
          type: boolean
          description: Conflicted.
        ahead_count:
          type: string
          description: Ahead count.
        changed_paths:
          type: array
          items:
            $ref: "#/components/schemas/RepositoryChangedPath"
          description: Changed paths list.
        insertions:
          type: string
          description: Insertions.
        deletions:
          type: string
          description: Deletions.
        patch_artifact_id:
          type: string
          description: Patch artifact id.
        patch_complete:
          type: boolean
          description: |-
            False means untracked files or a size limit prevented the patch Artifact
             from representing every changed byte. Workspace Snapshot remains the
             durable source for those files.
        status_digest:
          type: string
          description: |-
            Digest of the versioned canonical Git base, HEAD, porcelain status and
             tracked binary diff captured when the Run completed.
        checkout_id:
          type: string
          description: |-
            The operation ID and monotonic Worktree fence under which this state was
             captured. They let the Control Plane reject a late completion from an old
             Worker after another Host has acquired the Worktree.
        checkout_fence:
          type: string
          description: Checkout fence.
      description: Repository change set representation.
    RepositoryChangedPath:
      type: object
      properties:
        path:
          type: string
          description: Path.
        status:
          type: string
          description: Status.
      description: Repository changed path representation.
    RequestSkillRepositoryPackageRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: Workspace identifier. A Workspace is a persistent collaboration context, distinct from a per-task worktree.
        workspace_agent_binding_id:
          type: string
          description: Identifier of the Agent binding in the selected Workspace.
        repository_binding_id:
          type: string
          description: Repository binding id.
        commit:
          type: string
          description: Commit.
        skill_path:
          type: string
          description: Skill path.
        name:
          type: string
          description: Name.
        version:
          type: string
          description: Version.
        license_expression:
          type: string
          description: License expression.
        invocation_policy:
          type: string
          description: Invocation policy.
        idempotency_key:
          type: string
          description: Idempotency key for this operation. Reuse it only when retrying the same submission with the same payload.
      description: Request Skill repository package request.
    ResumeTaskRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        expected_state_version:
          type: string
          description: Expected state revision for optimistic concurrency. Copy the current revision exactly; do not round it through a JavaScript Number.
      description: Resume task request.
    RetryTaskRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        expected_state_version:
          type: string
          description: Expected state revision for optimistic concurrency. Copy the current revision exactly; do not round it through a JavaScript Number.
      description: Retry task request.
    RunInputRequest:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        task_id:
          type: string
          description: Identifier of the durable Task; do not substitute an execution Run ID.
        run_id:
          type: string
          description: Identifier of an execution Run associated with a Task.
        scope_task_id:
          type: string
          description: Scope task id.
        message:
          type: string
          description: Message.
        response_schema:
          type: object
          description: Response schema.
        status:
          type: string
          description: Status.
        state_version:
          type: string
          description: State revision used for optimistic concurrency. Preserve its exact decimal representation.
        response:
          $ref: "#/components/schemas/GoogleProtobufValue"
          description: Response.
        response_artifact_ids:
          type: array
          items:
            type: string
          description: Response artifact ids list.
        requested_by:
          type: string
          description: Requested by.
        responded_by:
          type: string
          description: Responded by.
        expires_at:
          type: string
          format: date-time
          description: Expires at as an RFC 3339 timestamp.
        created_at:
          type: string
          format: date-time
          description: Created at as an RFC 3339 timestamp.
        updated_at:
          type: string
          format: date-time
          description: Updated at as an RFC 3339 timestamp.
        responded_at:
          type: string
          format: date-time
          description: Responded at as an RFC 3339 timestamp.
      description: Run input request representation.
    SkillInvocation:
      type: object
      properties:
        reference:
          type: string
          description: Reference.
        registry_version_id:
          type: string
          description: Registry version id.
        content_digest:
          type: string
          description: Content digest.
        actor_identity_id:
          type: string
          description: Actor identity id.
      description: Server-derived immutable selection; an Agent cannot mint operator consent.
    Task:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the resource addressed by this schema or URL.
        tenant_id:
          type: string
          description: Tenant identifier used with the authenticated access context. Supplying an ID does not grant access.
        agent_version_id:
          type: string
          description: Agent version id.
        workspace_id:
          type: string
          description: Workspace identifier. A Workspace is a persistent collaboration context, distinct from a per-task worktree.
        input:
          type: string
          description: Input accepted by this request. Its declared schema and, for invocations, the configured input adapter determine the shape.
        status:
          enum:
            - TASK_STATUS_UNSPECIFIED
            - TASK_STATUS_QUEUED
            - TASK_STATUS_PLANNING
            - TASK_STATUS_PROVISIONING
            - TASK_STATUS_RUNNING
            - TASK_STATUS_WAITING_APPROVAL
            - TASK_STATUS_WAITING_INPUT
            - TASK_STATUS_PAUSED
            - TASK_STATUS_COMPLETED
            - TASK_STATUS_FAILED
            - TASK_STATUS_CANCELLED
          type: string
          format: enum
          description: Status.
          x-enum-descriptions:
            TASK_STATUS_UNSPECIFIED: unspecified
            TASK_STATUS_QUEUED: queued
            TASK_STATUS_PLANNING: planning
            TASK_STATUS_PROVISIONING: provisioning
            TASK_STATUS_RUNNING: running
            TASK_STATUS_WAITING_APPROVAL: waiting approval
            TASK_STATUS_WAITING_INPUT: waiting input
            TASK_STATUS_PAUSED: paused
            TASK_STATUS_COMPLETED: completed
            TASK_STATUS_FAILED: failed
            TASK_STATUS_CANCELLED: cancelled
        priority:
          type: integer
          format: int32
          description: Priority.
        state_version:
          type: string
          description: State revision used for optimistic concurrency. Preserve its exact decimal representation.
        created_at:
          type: string
          format: date-time
          description: Created at as an RFC 3339 timestamp.
        updated_at:
          type: string
          format: date-time
          description: Updated at as an RFC 3339 timestamp.
        environment_version_id:
          type: string
          description: Environment version id.
        parent_task_id:
          type: string
          description: Parent task id.
        parent_run_id:
          type: string
          description: Parent run id.
        delegation_id:
          type: string
          description: Delegation id.
        delegation_depth:
          type: integer
          format: int32
          description: Delegation depth.
        policy_scope_id:
          type: string
          description: Policy scope id.
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: Model config.
        participants:
          type: array
          items:
            $ref: "#/components/schemas/TaskParticipant"
          description: Participants list.
        conversation_id:
          type: string
          description: |-
            Top-level Chat conversation. A conversation may contain Tasks that use
             different Workspaces.
        workspace_agent_binding_id:
          type: string
          description: |-
            The immutable executable Agent/Environment member selected from the
             Workspace team for this Task.
        result_contract:
          type: object
          description: |-
            Immutable JSON Schema for the Task's complete final response. When set,
             Runtime completion is rejected unless final_output is one JSON value that
             satisfies the schema.
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: Approval mode.
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: unspecified
            EXECUTION_APPROVAL_MODE_MANUAL: manual
            EXECUTION_APPROVAL_MODE_AUTO: auto
        goal_id:
          type: string
          description: |-
            Present for every Task created as part of a long-running Goal, including
             delegated and Workflow step Tasks.
        execution_input:
          type: string
          description: |-
            Immutable input executed by the Agent Runtime. For a direct Chat turn the
             Control Plane derives this from the conversation history and the raw input.
        progress:
          allOf:
            - $ref: "#/components/schemas/TaskProgress"
          description: |-
            Rebuildable cumulative progress projected from the durable Task event
             stream and current tool, approval, and delegation state.
        input_artifact_ids:
          type: array
          items:
            type: string
          description: Immutable user-supplied files materialized into the Runtime Workspace.
        worktree_id:
          type: string
          description: |-
            Mutable filesystem branch used by this Task. workspace_id remains the
             collaboration, authorization and shared-memory boundary.
        statistics:
          allOf:
            - $ref: "#/components/schemas/TaskStatistics"
          description: |-
            Cumulative execution statistics across every Run attempt. This summary is
             returned by both GetTask and ListTasks so Chat and operational lists use
             one metering and timing model.
        repository_checkouts:
          type: array
          items:
            $ref: "#/components/schemas/TaskRepositoryCheckout"
          description: Immutable repository inputs captured when the Task is admitted.
        repository_change_sets:
          type: array
          items:
            $ref: "#/components/schemas/RepositoryChangeSet"
          description: |-
            Reviewable Git results captured from the terminal Run. These records are
             durable even when the Runtime sandbox and its local .git directory are gone.
        initiator:
          allOf:
            - $ref: "#/components/schemas/TaskInitiator"
          description: |-
            Trusted admission-time identity snapshot. Absent on historical Tasks
             where the initiator was not recorded. Never supplied by the caller.
        input_summary:
          type: string
          description: Short plain-text input for list views; the full input is available via GetTask.
        inference_only:
          type: boolean
          description: Service-derived bounded model task with no tools, memory or delegation.
        handoff_required:
          type: boolean
          description: "Output-only: requires a Worker capable of materializing the pinned handoff."
        input_requests_used:
          type: boolean
          description: Input requests used.
        skill_invocations:
          type: array
          items:
            $ref: "#/components/schemas/SkillInvocation"
          description: Skill invocations list.
        work_contract:
          allOf:
            - $ref: "#/components/schemas/WorkContract"
          description: |-
            Immutable contract used by every Harness implementation. Legacy callers
             receive a server-derived reported contract.
        work_contract_outcome:
          allOf:
            - $ref: "#/components/schemas/WorkContractOutcome"
          description: Durable Control Plane evaluation; never supplied by the model or Worker.
        platform_operation:
          type: object
          description: Platform operation.
        cost_budget_microunits:
          type: string
          description: |-
            Explicit Task ceiling covers all attempts and delegated descendants.
             Currency is fixed at admission from the accepted tenant-charge price.
        cost_budget_currency:
          type: string
          description: Cost budget currency.
      description: Durable unit of requested work. Runs record its execution attempts; events and Input Requests expose progress and pending interaction.
    TaskContextSource:
      type: object
      properties:
        kind:
          type: string
          description: Kind.
        resource_id:
          type: string
          description: Resource id.
        reference:
          type: string
          description: Reference.
        version_id:
          type: string
          description: Version id.
        content_digest:
          type: string
          description: Content digest.
        scope:
          type: string
          description: Scope.
        revision:
          type: string
          description: Revision.
        path:
          type: string
          description: Path.
        source_kind:
          type: string
          description: Source kind.
        source_id:
          type: string
          description: Source id.
        source_uri:
          type: string
          description: Source uri.
        index_generation_id:
          type: string
          description: Index generation id.
        first_event_sequence:
          type: string
          description: First event sequence.
        last_event_sequence:
          type: string
          description: Last event sequence.
        access_count:
          type: string
          description: Access count.
      description: Task context source representation.
    TaskEvent:
      type: object
      properties:
        event_id:
          type: string
          description: Event id.
        schema_version:
          type: integer
          format: int32
          description: Schema version.
        type:
          type: string
          description: Type.
        tenant_id:
          type: string
          description: Tenant identifier used with the authenticated access context. Supplying an ID does not grant access.
        task_id:
          type: string
          description: Identifier of the durable Task; do not substitute an execution Run ID.
        run_id:
          type: string
          description: Identifier of an execution Run associated with a Task.
        sequence:
          type: string
          description: Event sequence number used for ordering and deduplication.
        occurred_at:
          type: string
          format: date-time
          description: Occurred at as an RFC 3339 timestamp.
        trace_id:
          type: string
          description: Trace id.
        payload:
          type: object
          description: Payload.
      description: Persisted progress event associated with a Task. Use sequence and identity to order and deduplicate events.
    TaskInitiator:
      type: object
      properties:
        identity_id:
          type: string
          description: Identity id.
        display_name:
          type: string
          description: Display name.
        kind:
          type: string
          description: Kind.
        integration_client_id:
          type: string
          description: Integration client id.
        source:
          type: string
          description: chat, api, goal, workflow, delegation, or a2a.
      description: Task initiator representation.
    TaskInputAttachment:
      type: object
      properties:
        id:
          type: string
          description: Client-generated UUID used for idempotency and Artifact identity.
        name:
          type: string
          description: Name.
        content_type:
          type: string
          description: Content type.
        content:
          type: string
          format: bytes
          description: Content encoded as Base64.
      description: Task input attachment representation.
    TaskParticipant:
      type: object
      properties:
        agent_version_id:
          type: string
          description: Agent version id.
        model_config:
          allOf:
            - $ref: "#/components/schemas/ModelInvocationConfig"
          description: |-
            Non-empty fields are operator constraints. Empty fields are selected by
             the primary Agent and inherit the participant Agent default if omitted.
        default_model_config:
          allOf:
            - $ref: "#/components/schemas/ModelInvocationConfig"
          description: Resolved immutable Agent Version default, returned by the server.
        workspace_agent_binding_id:
          type: string
          description: |-
            When selected from a Workspace team these fields pin delegation to the
             participant's authorized execution and shared-memory boundary.
        workspace_id:
          type: string
          description: Workspace identifier. A Workspace is a persistent collaboration context, distinct from a per-task worktree.
        environment_version_id:
          type: string
          description: Environment version id.
        role:
          type: string
          description: Role.
        delegation_grant_id:
          type: string
          description: |-
            Server-resolved authorization snapshot for a participant in another
             persistent Workspace. Request callers must leave these fields empty.
        delegation_grant_state_version:
          type: string
          description: Delegation grant state version.
        delegation_grant_max_depth:
          type: integer
          format: int32
          description: Delegation grant max depth.
        delegation_grant_token_budget:
          type: string
          description: Delegation grant token budget.
        delegation_grant_cost_budget_microunits:
          type: string
          description: Delegation grant cost budget microunits.
        delegation_grant_compute_budget_ms:
          type: string
          description: Delegation grant compute budget ms.
        delegation_grant_expires_at:
          type: string
          format: date-time
          description: Delegation grant expires at as an RFC 3339 timestamp.
        delegation_grant_cost_budget_currency:
          type: string
          description: Delegation grant cost budget currency.
      description: |-
        TaskParticipant selects an immutable Agent Version and optionally overrides
         its provider-advertised model and reasoning effort for this Task.
    TaskProgress:
      type: object
      properties:
        last_event_sequence:
          type: string
          description: Last event sequence.
        model_round:
          type: string
          description: Model round.
        model_round_count:
          type: string
          description: Model round count.
        model_retry_count:
          type: string
          description: Model retry count.
        model_turn_active:
          type: boolean
          description: Model turn active.
        tool_call_count:
          type: string
          description: Tool call count.
        tool_running_count:
          type: string
          description: Tool running count.
        tool_completed_count:
          type: string
          description: Tool completed count.
        tool_failed_count:
          type: string
          description: Tool failed count.
        approval_count:
          type: string
          description: Approval count.
        approval_pending_count:
          type: string
          description: Approval pending count.
        approval_approved_count:
          type: string
          description: Approval approved count.
        approval_denied_count:
          type: string
          description: Approval denied count.
        delegation_count:
          type: string
          description: Delegation count.
        delegation_running_count:
          type: string
          description: Delegation running count.
        delegation_completed_count:
          type: string
          description: Delegation completed count.
        delegation_failed_count:
          type: string
          description: Delegation failed count.
        context:
          $ref: "#/components/schemas/ModelContextProgress"
          description: Context.
        context_sources:
          type: array
          items:
            $ref: "#/components/schemas/TaskContextSource"
          description: |-
            Bounded immutable Memory/Skill identities actually returned to the model.
             Source content remains behind its authoritative service and authorization.
        context_source_omitted_count:
          type: string
          description: Context source omitted count.
      description: Task progress representation.
    TaskRepositoryCheckout:
      type: object
      properties:
        binding_id:
          type: string
          description: Binding id.
        repository_id:
          type: string
          description: Repository id.
        key:
          type: string
          description: Key.
        mount_path:
          type: string
          description: Mount path.
        remote_url:
          type: string
          description: Remote url.
        source_ref:
          type: string
          description: Source ref.
        resolved_commit:
          type: string
          description: Resolved commit.
        primary:
          type: boolean
          description: Primary.
        binding_state_version:
          type: string
          description: Binding state version.
        connection_id:
          type: string
          description: Connection id.
        repository_grant_id:
          type: string
          description: Repository grant id.
        access_mode:
          enum:
            - REPOSITORY_ACCESS_MODE_UNSPECIFIED
            - REPOSITORY_ACCESS_MODE_READ
            - REPOSITORY_ACCESS_MODE_WRITE
            - REPOSITORY_ACCESS_MODE_PUBLISH
          type: string
          format: enum
          description: Access mode.
          x-enum-descriptions:
            REPOSITORY_ACCESS_MODE_UNSPECIFIED: unspecified
            REPOSITORY_ACCESS_MODE_READ: read
            REPOSITORY_ACCESS_MODE_WRITE: write
            REPOSITORY_ACCESS_MODE_PUBLISH: publish
        grant_state_version:
          type: string
          description: Grant state version.
        resolved_ref:
          type: string
          description: Resolved ref.
        credential_required:
          type: boolean
          description: Credential required.
        comparison_commit:
          type: string
          description: |-
            Trusted orchestration may pin a second read-only snapshot for comparison.
             Runtime fetches this object without moving the checkout's HEAD.
        comparison_ref:
          type: string
          description: Comparison ref.
      description: Task repository checkout representation.
    TaskStatistics:
      type: object
      properties:
        input_tokens:
          type: string
          description: Input tokens.
        output_tokens:
          type: string
          description: Output tokens.
        model_cost_microunits:
          type: string
          description: Model cost microunits.
        compute_ms:
          type: string
          description: Compute ms.
        gpu_ms:
          type: string
          description: Gpu ms.
        attempt_count:
          type: string
          description: Attempt count.
        elapsed_ms:
          type: string
          description: End-to-end wall time from the first Run start through completion or now.
        run_time_ms:
          type: string
          description: Sum of active wall time across Run attempts.
        started_at:
          type: string
          format: date-time
          description: Started at as an RFC 3339 timestamp.
        finished_at:
          type: string
          format: date-time
          description: Finished at as an RFC 3339 timestamp.
        cache_read_input_tokens:
          type: string
          description: Cache read input tokens.
        cache_write_input_tokens:
          type: string
          description: Cache write input tokens.
        cache_usage_reported:
          type: boolean
          description: |-
            False means the Provider did not return a cache-usage breakdown. This is
             different from a reported zero cache hit/write count.
        cache_read_reported:
          type: boolean
          description: Cache read reported.
        cache_write_reported:
          type: boolean
          description: Cache write reported.
      description: Task statistics representation.
    UpdateConversationSettingsRequest:
      type: object
      properties:
        conversation_id:
          type: string
          description: Conversation id.
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: Approval mode.
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: unspecified
            EXECUTION_APPROVAL_MODE_MANUAL: manual
            EXECUTION_APPROVAL_MODE_AUTO: auto
      description: Update conversation settings request.
    WorkContract:
      type: object
      properties:
        schema_version:
          type: string
          description: Must be orbitspace.work-contract/v1 when supplied by a caller.
        objective:
          type: string
          description: Objective.
        constraints:
          type: array
          items:
            type: string
          description: Constraints list.
        deliverables:
          type: array
          items:
            type: string
          description: Deliverables list.
        result_schema:
          type: object
          description: |-
            Schema for the complete final response. result_contract remains a
             backwards-compatible alias and must match when both are supplied.
        evidence_requirements:
          type: array
          items:
            $ref: "#/components/schemas/WorkEvidenceRequirement"
          description: Evidence requirements list.
        completion_mode:
          enum:
            - WORK_COMPLETION_MODE_UNSPECIFIED
            - WORK_COMPLETION_MODE_REPORTED
            - WORK_COMPLETION_MODE_VERIFIED
          type: string
          format: enum
          description: Completion mode.
          x-enum-descriptions:
            WORK_COMPLETION_MODE_UNSPECIFIED: unspecified
            WORK_COMPLETION_MODE_REPORTED: reported
            WORK_COMPLETION_MODE_VERIFIED: verified
      description: Work contract representation.
    WorkContractOutcome:
      type: object
      properties:
        status:
          enum:
            - WORK_CONTRACT_STATUS_UNSPECIFIED
            - WORK_CONTRACT_STATUS_PENDING
            - WORK_CONTRACT_STATUS_REPORTED
            - WORK_CONTRACT_STATUS_VERIFIED
            - WORK_CONTRACT_STATUS_REJECTED
          type: string
          format: enum
          description: Status.
          x-enum-descriptions:
            WORK_CONTRACT_STATUS_UNSPECIFIED: unspecified
            WORK_CONTRACT_STATUS_PENDING: pending
            WORK_CONTRACT_STATUS_REPORTED: reported
            WORK_CONTRACT_STATUS_VERIFIED: verified
            WORK_CONTRACT_STATUS_REJECTED: rejected
        checks:
          type: array
          items:
            $ref: "#/components/schemas/WorkEvidenceCheck"
          description: Checks list.
        reason:
          type: string
          description: Reason.
        evaluated_at:
          type: string
          format: date-time
          description: Evaluated at as an RFC 3339 timestamp.
      description: Work contract outcome representation.
    WorkEvidenceCheck:
      type: object
      properties:
        key:
          type: string
          description: Key.
        kind:
          enum:
            - WORK_EVIDENCE_KIND_UNSPECIFIED
            - WORK_EVIDENCE_KIND_FINAL_OUTPUT
            - WORK_EVIDENCE_KIND_ARTIFACT
            - WORK_EVIDENCE_KIND_REPOSITORY_CHANGE
            - WORK_EVIDENCE_KIND_TOOL_CALL
          type: string
          format: enum
          description: Kind.
          x-enum-descriptions:
            WORK_EVIDENCE_KIND_UNSPECIFIED: unspecified
            WORK_EVIDENCE_KIND_FINAL_OUTPUT: final output
            WORK_EVIDENCE_KIND_ARTIFACT: artifact
            WORK_EVIDENCE_KIND_REPOSITORY_CHANGE: repository change
            WORK_EVIDENCE_KIND_TOOL_CALL: tool call
        required:
          type: boolean
          description: Required.
        passed:
          type: boolean
          description: Passed.
        matched_count:
          type: string
          description: Matched count.
        summary:
          type: string
          description: Summary.
        description:
          type: string
          description: Description.
      description: Work evidence check representation.
    WorkEvidenceRequirement:
      type: object
      properties:
        key:
          type: string
          description: Stable caller-defined key used by evidence checks and UI projections.
        kind:
          enum:
            - WORK_EVIDENCE_KIND_UNSPECIFIED
            - WORK_EVIDENCE_KIND_FINAL_OUTPUT
            - WORK_EVIDENCE_KIND_ARTIFACT
            - WORK_EVIDENCE_KIND_REPOSITORY_CHANGE
            - WORK_EVIDENCE_KIND_TOOL_CALL
          type: string
          format: enum
          description: Kind.
          x-enum-descriptions:
            WORK_EVIDENCE_KIND_UNSPECIFIED: unspecified
            WORK_EVIDENCE_KIND_FINAL_OUTPUT: final output
            WORK_EVIDENCE_KIND_ARTIFACT: artifact
            WORK_EVIDENCE_KIND_REPOSITORY_CHANGE: repository change
            WORK_EVIDENCE_KIND_TOOL_CALL: tool call
        required:
          type: boolean
          description: Required.
        description:
          type: string
          description: Description.
        selector:
          type: object
          description: |-
            Kind-specific, bounded selector. V1 supports final-output min_bytes;
             Artifact kind/name/content_type/min_count; repository binding_id/key,
             path_globs/exclude_path_globs/min_changed_paths/require_commit/
             require_task_progress; and Tool Call
             kind/min_count.
        deadline_model_round:
          type: integer
          description: |-
            Optional live progress deadline. At this model round the Runtime begins
             rejecting completion until the required evidence exists. V1 supports
             deadlines for repository_change evidence; 0 defers verification to Task
             completion.
          format: int32
        when_result:
          type: object
          description: |-
            Optional bounded JSON Schema applied to the Task's normalized final
             response. This evidence requirement is evaluated only when the response
             matches the schema. Conditional requirements cannot declare live model
             round deadlines because their applicability is known only at completion.
      description: Work evidence requirement representation.
tags:
  - name: ApprovalService
    x-displayName: Approvals
    description: Approvals operations.
  - name: TaskService
    x-displayName: Tasks
    description: Tasks operations.
