# 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 目标与工作流 API
  version: 1.0.0
  description: 目标与工作流的公开 v1 应用接口契约。协议生命周期与能力可用状态见集成指南。
servers:
  - url: https://api.orbitspace.dev
security:
  - bearerAuth: []
paths:
  /api/v1/goal-experiences:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_CreateGoalExperience
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateGoalExperienceRequest"
        required: true
        description: 创建目标体验会话的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GoalExperience"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建目标体验会话
      description: 创建目标体验会话。 请求字段应遵循下方的 Schema。
  /api/v1/goal-experiences/{id}:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_GetGoalExperience
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GoalExperience"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取目标体验会话
      description: 读取目标体验会话。
  /api/v1/goal-experiences/{id}/approvals/{approval_id}:decide:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_DecideGoalExperienceApproval
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: approval_id
          in: path
          required: true
          schema:
            type: string
          description: 审批标识符。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DecideGoalExperienceApprovalRequest"
        required: true
        description: 决定目标体验审批的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GoalExperience"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 决定目标体验审批
      description: 决定目标体验审批。 请求字段应遵循下方的 Schema。
  /api/v1/goal-experiences/{id}:addRequirement:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_AddGoalExperienceRequirement
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AddGoalExperienceRequirementRequest"
        required: true
        description: 添加目标体验需求的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GoalExperience"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 添加目标体验需求
      description: 添加目标体验需求。 请求字段应遵循下方的 Schema。
  /api/v1/goal-experiences/{id}:control:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_ControlGoalExperience
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ControlGoalExperienceRequest"
        required: true
        description: 控制目标体验会话的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GoalExperience"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 控制目标体验会话
      description: 控制目标体验会话。 请求字段应遵循下方的 Schema。
  /api/v1/goals:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_ListGoals
      parameters:
        - name: status
          in: query
          schema:
            enum:
              - GOAL_STATUS_UNSPECIFIED
              - GOAL_STATUS_DRAFT
              - GOAL_STATUS_ACTIVE
              - GOAL_STATUS_PAUSED
              - GOAL_STATUS_ACHIEVED
              - GOAL_STATUS_FAILED
              - GOAL_STATUS_CANCELLED
            type: string
            format: enum
            description: 状态。
            x-enum-descriptions:
              GOAL_STATUS_UNSPECIFIED: 未指定
              GOAL_STATUS_DRAFT: 草稿
              GOAL_STATUS_ACTIVE: 进行中
              GOAL_STATUS_PAUSED: 已暂停
              GOAL_STATUS_ACHIEVED: 已达成
              GOAL_STATUS_FAILED: 失败
              GOAL_STATUS_CANCELLED: 已取消
          description: 状态。
        - name: workspace_id
          in: query
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: conversation_id
          in: query
          schema:
            type: string
          description: 会话标识符。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListGoalsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出自主目标
      description: 列出自主目标。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_CreateGoal
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateGoalRequest"
        required: true
        description: 创建自主目标的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Goal"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建自主目标
      description: 创建自主目标。 请求字段应遵循下方的 Schema。
  /api/v1/goals/{goal_id}/evaluations:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_ListGoalEvaluations
      parameters:
        - name: goal_id
          in: path
          required: true
          schema:
            type: string
          description: 目标标识符。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListEvaluationsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出目标评估记录
      description: 列出目标评估记录。 如需继续读取结果，请使用接口声明的分页参数。
  /api/v1/goals/{goal_id}/events:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_ListGoalEvents
      parameters:
        - name: goal_id
          in: path
          required: true
          schema:
            type: string
          description: 目标标识符。
        - name: after_sequence
          in: query
          schema:
            type: string
          description: 读取此序号之后的事件。保存游标时须保留整数精度。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListGoalEventsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出目标事件
      description: 列出目标事件。
  /api/v1/goals/{goal_id}/iterations:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_ListGoalIterations
      parameters:
        - name: goal_id
          in: path
          required: true
          schema:
            type: string
          description: 目标标识符。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListGoalIterationsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出目标迭代记录
      description: 列出目标迭代记录。 如需继续读取结果，请使用接口声明的分页参数。
  /api/v1/goals/{goal_id}/releases:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_ListGoalReleases
      parameters:
        - name: goal_id
          in: path
          required: true
          schema:
            type: string
          description: 目标标识符。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListReleasesResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出目标发布记录
      description: 列出目标发布记录。 如需继续读取结果，请使用接口声明的分页参数。
  /api/v1/goals/{id}:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_GetGoal
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Goal"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取自主目标
      description: 读取自主目标。
  /api/v1/goals/{id}/cancel:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_CancelGoal
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CancelGoalRequest"
        required: true
        description: 取消自主目标的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Goal"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 取消自主目标
      description: 取消自主目标。 请求字段应遵循下方的 Schema。
  /api/v1/goals/{id}/pause:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_PauseGoal
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PauseGoalRequest"
        required: true
        description: 暂停自主目标的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Goal"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 暂停自主目标
      description: 暂停自主目标。 请求字段应遵循下方的 Schema。
  /api/v1/goals/{id}/resume:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_ResumeGoal
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ResumeGoalRequest"
        required: true
        description: 恢复自主目标的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Goal"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 恢复自主目标
      description: 恢复自主目标。 请求字段应遵循下方的 Schema。
  /api/v1/goals/{id}/start:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_StartGoal
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StartGoalRequest"
        required: true
        description: 启动自主目标的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Goal"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 启动自主目标
      description: 启动自主目标。 请求字段应遵循下方的 Schema。
  /api/v1/promotions:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_ListPromotions
      parameters:
        - name: workspace_id
          in: query
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        - name: status
          in: query
          schema:
            enum:
              - PROMOTION_STATUS_UNSPECIFIED
              - PROMOTION_STATUS_PROPOSED
              - PROMOTION_STATUS_APPROVED
              - PROMOTION_STATUS_APPLIED
              - PROMOTION_STATUS_REJECTED
              - PROMOTION_STATUS_ROLLED_BACK
            type: string
            format: enum
            description: 状态。
            x-enum-descriptions:
              PROMOTION_STATUS_UNSPECIFIED: 未指定
              PROMOTION_STATUS_PROPOSED: 已提出
              PROMOTION_STATUS_APPROVED: 已批准
              PROMOTION_STATUS_APPLIED: 已应用
              PROMOTION_STATUS_REJECTED: 已拒绝
              PROMOTION_STATUS_ROLLED_BACK: 已回滚
          description: 状态。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListPromotionsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出发布晋级申请
      description: 列出发布晋级申请。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_ProposePromotion
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProposePromotionRequest"
        required: true
        description: 提出发布晋级申请的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Promotion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 提出发布晋级申请
      description: 提出发布晋级申请。 请求字段应遵循下方的 Schema。
  /api/v1/promotions/{id}:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_GetPromotion
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Promotion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取发布晋级申请
      description: 读取发布晋级申请。
  /api/v1/promotions/{id}/decide:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_DecidePromotion
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DecidePromotionRequest"
        required: true
        description: 决定发布晋级申请的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Promotion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 决定发布晋级申请
      description: 决定发布晋级申请。 请求字段应遵循下方的 Schema。
  /api/v1/promotions/{id}/rollback:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_RollbackPromotion
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RollbackPromotionRequest"
        required: true
        description: 回滚发布晋级申请的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Promotion"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 回滚发布晋级申请
      description: 回滚发布晋级申请。 请求字段应遵循下方的 Schema。
  /api/v1/releases/{id}/rollback:
    post:
      tags:
        - AutonomyService
      operationId: AutonomyService_RollbackRelease
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RollbackReleaseRequest"
        required: true
        description: 回滚发布版本的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Release"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 回滚发布版本
      description: 回滚发布版本。 请求字段应遵循下方的 Schema。
  /api/v1/workflow-executions:
    get:
      tags:
        - WorkflowService
      operationId: WorkflowService_ListWorkflowExecutions
      parameters:
        - name: status
          in: query
          schema:
            enum:
              - WORKFLOW_EXECUTION_STATUS_UNSPECIFIED
              - WORKFLOW_EXECUTION_STATUS_PENDING
              - WORKFLOW_EXECUTION_STATUS_RUNNING
              - WORKFLOW_EXECUTION_STATUS_COMPLETED
              - WORKFLOW_EXECUTION_STATUS_FAILED
              - WORKFLOW_EXECUTION_STATUS_CANCELLED
              - WORKFLOW_EXECUTION_STATUS_COMPENSATING
            type: string
            format: enum
            description: 状态。
            x-enum-descriptions:
              WORKFLOW_EXECUTION_STATUS_UNSPECIFIED: 未指定
              WORKFLOW_EXECUTION_STATUS_PENDING: 待处理
              WORKFLOW_EXECUTION_STATUS_RUNNING: 执行中
              WORKFLOW_EXECUTION_STATUS_COMPLETED: 已完成
              WORKFLOW_EXECUTION_STATUS_FAILED: 失败
              WORKFLOW_EXECUTION_STATUS_CANCELLED: 已取消
              WORKFLOW_EXECUTION_STATUS_COMPENSATING: 补偿中
          description: 状态。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
        - name: page_token
          in: query
          schema:
            type: string
          description: 上一页返回的不透明分页令牌，请勿自行构造或修改。
        - name: status_group
          in: query
          description: 空值或 all 保持既有行为；current 排除已进入终态的执行记录。
          schema:
            type: string
        - name: query
          in: query
          description: 按输入搜索，或输入完整的执行记录/Workspace UUID；最多 256 个字符。
          schema:
            type: string
        - name: summary_only
          in: query
          description: 在运维列表中返回 input_summary，而非完整输入。
          schema:
            type: boolean
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorkflowExecutionsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出工作流执行
      description: 列出工作流执行。 如需继续读取结果，请使用接口声明的分页参数。
    post:
      tags:
        - WorkflowService
      operationId: WorkflowService_CreateWorkflowExecution
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWorkflowExecutionRequest"
        required: true
        description: 创建工作流执行的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkflowExecution"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 创建工作流执行
      description: 创建工作流执行。 请求字段应遵循下方的 Schema。
  /api/v1/workflow-executions/{id}:
    get:
      tags:
        - WorkflowService
      operationId: WorkflowService_GetWorkflowExecution
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkflowExecution"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 读取工作流执行
      description: 读取工作流执行。
  /api/v1/workflow-executions/{id}/cancel:
    post:
      tags:
        - WorkflowService
      operationId: WorkflowService_CancelWorkflowExecution
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CancelWorkflowExecutionRequest"
        required: true
        description: 取消工作流执行的请求体。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WorkflowExecution"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 取消工作流执行
      description: 取消工作流执行。 请求字段应遵循下方的 Schema。
  /api/v1/workflow-executions/{id}/events:
    get:
      tags:
        - WorkflowService
      operationId: WorkflowService_ListWorkflowEvents
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        - name: after_sequence
          in: query
          schema:
            type: string
          description: 读取此序号之后的事件。保存游标时须保留整数精度。
        - name: page_size
          in: query
          schema:
            type: integer
            format: int32
          description: 请求的每页条数，受接口上限约束。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorkflowEventsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出工作流事件
      description: 列出工作流事件。
  /api/v1/workspaces/{workspace_id}/deployment-targets:
    get:
      tags:
        - AutonomyService
      operationId: AutonomyService_ListWorkspaceDeploymentTargets
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
      responses:
        "200":
          description: 请求成功。
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWorkspaceDeploymentTargetsResponse"
        default:
          description: RFC 9457 格式的错误详情。
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      summary: 列出工作空间部署目标
      description: 列出工作空间部署目标。
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
  schemas:
    AddGoalExperienceRequirementRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        requirement:
          type: string
          description: 要求。
      description: 添加目标体验需求的请求结构。
    CancelGoalRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
      description: 取消自主目标的请求结构。
    CancelWorkflowExecutionRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
      description: 取消工作流执行的请求结构。
    ControlGoalExperienceRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        action:
          enum:
            - GOAL_EXPERIENCE_CONTROL_ACTION_UNSPECIFIED
            - GOAL_EXPERIENCE_CONTROL_ACTION_START
            - GOAL_EXPERIENCE_CONTROL_ACTION_PAUSE
            - GOAL_EXPERIENCE_CONTROL_ACTION_RESUME
            - GOAL_EXPERIENCE_CONTROL_ACTION_CANCEL
          type: string
          format: enum
          description: 操作。
          x-enum-descriptions:
            GOAL_EXPERIENCE_CONTROL_ACTION_UNSPECIFIED: 未指定
            GOAL_EXPERIENCE_CONTROL_ACTION_START: 启动
            GOAL_EXPERIENCE_CONTROL_ACTION_PAUSE: 暂停
            GOAL_EXPERIENCE_CONTROL_ACTION_RESUME: 恢复
            GOAL_EXPERIENCE_CONTROL_ACTION_CANCEL: 取消
        additional_iterations:
          type: integer
          description: 恢复时显式增加迭代上限。恢复因 iteration_limit_exhausted 停止的 Goal 时必须提供；已消耗用量和既有迭代历史保留。
          format: int32
      description: 控制目标体验会话的请求结构。
    CreateGoalExperienceRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        title:
          type: string
          description: 标题。
        objective:
          type: string
          description: 目标。
        acceptance_contract:
          type: object
          description: 候选结果的验收 Schema，在独立审核和持续部署之前校验。审核与发布结果由 completion_target 选择，候选清单不能自行声明这些结果。
        completion_target:
          enum:
            - GOAL_COMPLETION_TARGET_UNSPECIFIED
            - GOAL_COMPLETION_TARGET_EVALUATED
            - GOAL_COMPLETION_TARGET_RELEASED
          type: string
          format: enum
          description: 完成目标。
          x-enum-descriptions:
            GOAL_COMPLETION_TARGET_UNSPECIFIED: 未指定
            GOAL_COMPLETION_TARGET_EVALUATED: 通过评估
            GOAL_COMPLETION_TARGET_RELEASED: 完成发布
        max_iterations:
          type: integer
          format: int32
          description: 最大迭代。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: 审批模式。
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: 未指定
            EXECUTION_APPROVAL_MODE_MANUAL: 人工
            EXECUTION_APPROVAL_MODE_AUTO: 自动
        token_budget:
          type: string
          description: Token预算。
        cost_budget_microunits:
          type: string
          description: 成本预算微单位。
        compute_budget_ms:
          type: string
          description: 计算预算毫秒。
        deadline:
          type: string
          format: date-time
          description: 截止时间，使用 RFC 3339 时间格式。
        start_immediately:
          type: boolean
          description: 启动立即。
        workflow_reference:
          type: string
          description: 可选的不可变 Workflow Registry 引用，例如 workflow://orbitspace/software-delivery@1.6.6。设置后，OrbitSpace 通过匹配的有效 Workspace Agent 槽位键解析工作流中的 Agent 和 Environment 绑定；省略时，Goal 使用自适应协调模式。
        candidate_step_key:
          type: string
          description: 提供 workflow_reference 时必填；指定由 Goal 生命周期评估其不可变候选结果的 Workflow 步骤。
        deployment_target:
          $ref: "#/components/schemas/GoalDeploymentTarget"
          description: 部署目标。
        maintenance_policy:
          $ref: "#/components/schemas/GoalMaintenancePolicy"
          description: 维护策略。
        input_token_budget:
          type: string
          description: 覆盖 Goal 所有任务的独立硬上限，零表示不设限；与合并 token_budget 取交集，且不提供完成阶段的额外宽限。
        output_token_budget:
          type: string
          description: 输出Token预算。
        cost_budget_currency:
          type: string
          description: 可选的一致性断言；已接受的计费报价决定金额单位。
      description: 创建目标体验会话的请求结构。
    CreateGoalRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        coordinator_binding_id:
          type: string
          description: 协调者绑定标识符。
        collaborator_binding_ids:
          type: array
          items:
            type: string
          description: 协作者绑定标识符列表列表。
        evaluator_binding_ids:
          type: array
          items:
            type: string
          description: 评估者绑定标识符列表列表。
        cd_binding_id:
          type: string
          description: 持续部署绑定标识符。
        title:
          type: string
          description: 标题。
        objective:
          type: string
          description: 目标。
        acceptance_contract:
          type: object
          description: 候选结果的验收 Schema。通过该 Schema 后，独立审核和持续部署的结果仍由 completion_target 校验。
        completion_target:
          enum:
            - GOAL_COMPLETION_TARGET_UNSPECIFIED
            - GOAL_COMPLETION_TARGET_EVALUATED
            - GOAL_COMPLETION_TARGET_RELEASED
          type: string
          format: enum
          description: 完成目标。
          x-enum-descriptions:
            GOAL_COMPLETION_TARGET_UNSPECIFIED: 未指定
            GOAL_COMPLETION_TARGET_EVALUATED: 通过评估
            GOAL_COMPLETION_TARGET_RELEASED: 完成发布
        max_iterations:
          type: integer
          format: int32
          description: 最大迭代。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
        execution_mode:
          enum:
            - GOAL_EXECUTION_MODE_UNSPECIFIED
            - GOAL_EXECUTION_MODE_ADAPTIVE
            - GOAL_EXECUTION_MODE_WORKFLOW
          type: string
          format: enum
          description: 执行模式。
          x-enum-descriptions:
            GOAL_EXECUTION_MODE_UNSPECIFIED: 未指定
            GOAL_EXECUTION_MODE_ADAPTIVE: 自适应
            GOAL_EXECUTION_MODE_WORKFLOW: 工作流
        workflow_version_id:
          type: string
          description: 工作流版本标识符。
        workflow_agent_bindings:
          type: array
          items:
            $ref: "#/components/schemas/GoalWorkflowBinding"
          description: 工作流Agent绑定列表。
        workflow_environment_bindings:
          type: array
          items:
            $ref: "#/components/schemas/GoalWorkflowBinding"
          description: 工作流执行环境绑定列表。
        candidate_step_key:
          type: string
          description: 候选步骤键。
        conversation_id:
          type: string
          description: 会话标识符。
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: 审批模式。
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: 未指定
            EXECUTION_APPROVAL_MODE_MANUAL: 人工
            EXECUTION_APPROVAL_MODE_AUTO: 自动
        token_budget:
          type: string
          description: 零表示不设限。
        cost_budget_microunits:
          type: string
          description: 成本预算微单位。
        compute_budget_ms:
          type: string
          description: 计算预算毫秒。
        deadline:
          type: string
          format: date-time
          description: 截止时间，使用 RFC 3339 时间格式。
        deployment_target:
          $ref: "#/components/schemas/GoalDeploymentTarget"
          description: 部署目标。
        maintenance_policy:
          $ref: "#/components/schemas/GoalMaintenancePolicy"
          description: 维护策略。
        input_token_budget:
          type: string
          description: 覆盖 Goal 所有任务的独立硬上限，零表示不设限；与合并 token_budget 取交集，且不提供完成阶段的额外宽限。
        output_token_budget:
          type: string
          description: 输出Token预算。
        cost_budget_currency:
          type: string
          description: 成本预算币种。
      description: 创建自主目标的请求结构。
    CreateWorkflowExecutionRequest:
      type: object
      properties:
        registry_version_id:
          type: string
          description: 注册表版本标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        input:
          type: string
          description: 本请求接受的输入。格式由字段 Schema 决定；应用调用还需遵循配置的输入适配器。
        priority:
          type: integer
          format: int32
          description: 优先级。
        idempotency_key:
          type: string
          description: 本次操作的幂等键，仅在重试同一次、同内容的提交时复用。
        agent_bindings:
          type: array
          items:
            $ref: "#/components/schemas/WorkflowBinding"
          description: Agent绑定列表。
        environment_bindings:
          type: array
          items:
            $ref: "#/components/schemas/WorkflowBinding"
          description: 执行环境绑定列表。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: 审批模式。
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: 未指定
            EXECUTION_APPROVAL_MODE_MANUAL: 人工
            EXECUTION_APPROVAL_MODE_AUTO: 自动
      description: 创建工作流执行的请求结构。
    DecideGoalExperienceApprovalRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        approval_id:
          type: string
          description: 审批标识符。
        approve:
          type: boolean
          description: 批准。
      description: 决定目标体验审批的请求结构。
    DecidePromotionRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        approve:
          type: boolean
          description: 批准。
      description: 决定发布晋级申请的请求结构。
    Evaluation:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        goal_id:
          type: string
          description: 目标标识符。
        iteration_id:
          type: string
          description: 迭代标识符。
        release_id:
          type: string
          description: 发布版本标识符。
        evaluator_binding_id:
          type: string
          description: 评估者绑定标识符。
        evaluator_agent_version_id:
          type: string
          description: 评估者Agent版本标识符。
        evaluator_environment_version_id:
          type: string
          description: 评估者执行环境版本标识符。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        status:
          enum:
            - EVALUATION_STATUS_UNSPECIFIED
            - EVALUATION_STATUS_RUNNING
            - EVALUATION_STATUS_PASSED
            - EVALUATION_STATUS_FAILED
            - EVALUATION_STATUS_ERROR
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            EVALUATION_STATUS_UNSPECIFIED: 未指定
            EVALUATION_STATUS_RUNNING: 执行中
            EVALUATION_STATUS_PASSED: 已通过
            EVALUATION_STATUS_FAILED: 失败
            EVALUATION_STATUS_ERROR: 错误
        score:
          type: number
          format: double
          description: 评分。
        summary:
          type: string
          description: 摘要。
        result:
          type: object
          description: 结果。
        evidence_artifact_ids:
          type: array
          items:
            type: string
          description: 证据产物标识符列表列表。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        finished_at:
          type: string
          format: date-time
          description: 完成时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
      description: 评估结构。
    Goal:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        coordinator_binding_id:
          type: string
          description: 协调者绑定标识符。
        collaborator_binding_ids:
          type: array
          items:
            type: string
          description: 协作者绑定标识符列表列表。
        evaluator_binding_ids:
          type: array
          items:
            type: string
          description: 评估者绑定标识符列表列表。
        cd_binding_id:
          type: string
          description: 持续部署绑定标识符。
        title:
          type: string
          description: 标题。
        objective:
          type: string
          description: 目标。
        acceptance_contract:
          type: object
          description: 验收契约。
        completion_target:
          enum:
            - GOAL_COMPLETION_TARGET_UNSPECIFIED
            - GOAL_COMPLETION_TARGET_EVALUATED
            - GOAL_COMPLETION_TARGET_RELEASED
          type: string
          format: enum
          description: 完成目标。
          x-enum-descriptions:
            GOAL_COMPLETION_TARGET_UNSPECIFIED: 未指定
            GOAL_COMPLETION_TARGET_EVALUATED: 通过评估
            GOAL_COMPLETION_TARGET_RELEASED: 完成发布
        max_iterations:
          type: integer
          format: int32
          description: 最大迭代。
        current_iteration:
          type: integer
          format: int32
          description: 当前迭代。
        status:
          enum:
            - GOAL_STATUS_UNSPECIFIED
            - GOAL_STATUS_DRAFT
            - GOAL_STATUS_ACTIVE
            - GOAL_STATUS_PAUSED
            - GOAL_STATUS_ACHIEVED
            - GOAL_STATUS_FAILED
            - GOAL_STATUS_CANCELLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            GOAL_STATUS_UNSPECIFIED: 未指定
            GOAL_STATUS_DRAFT: 草稿
            GOAL_STATUS_ACTIVE: 进行中
            GOAL_STATUS_PAUSED: 已暂停
            GOAL_STATUS_ACHIEVED: 已达成
            GOAL_STATUS_FAILED: 失败
            GOAL_STATUS_CANCELLED: 已取消
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        latest_iteration_id:
          type: string
          description: 最新迭代标识符。
        failure_code:
          type: string
          description: 失败代码。
        failure_message:
          type: string
          description: 失败消息。
        started_at:
          type: string
          format: date-time
          description: 启动时间，使用 RFC 3339 时间格式。
        finished_at:
          type: string
          format: date-time
          description: 完成时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        execution_mode:
          enum:
            - GOAL_EXECUTION_MODE_UNSPECIFIED
            - GOAL_EXECUTION_MODE_ADAPTIVE
            - GOAL_EXECUTION_MODE_WORKFLOW
          type: string
          format: enum
          description: 执行模式。
          x-enum-descriptions:
            GOAL_EXECUTION_MODE_UNSPECIFIED: 未指定
            GOAL_EXECUTION_MODE_ADAPTIVE: 自适应
            GOAL_EXECUTION_MODE_WORKFLOW: 工作流
        workflow_version_id:
          type: string
          description: 工作流版本标识符。
        workflow_agent_bindings:
          type: array
          items:
            $ref: "#/components/schemas/GoalWorkflowBinding"
          description: 工作流Agent绑定列表。
        workflow_environment_bindings:
          type: array
          items:
            $ref: "#/components/schemas/GoalWorkflowBinding"
          description: 工作流执行环境绑定列表。
        candidate_step_key:
          type: string
          description: 候选步骤键。
        conversation_id:
          type: string
          description: 会话标识符。
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: 审批模式。
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: 未指定
            EXECUTION_APPROVAL_MODE_MANUAL: 人工
            EXECUTION_APPROVAL_MODE_AUTO: 自动
        token_budget:
          type: string
          description: 零预算表示不设限；用量包括该 Goal 拥有的所有任务，包含委派、Workflow、评估和部署任务。
        cost_budget_microunits:
          type: string
          description: 成本预算微单位。
        compute_budget_ms:
          type: string
          description: 计算预算毫秒。
        deadline:
          type: string
          format: date-time
          description: 截止时间，使用 RFC 3339 时间格式。
        input_token_usage:
          type: string
          description: 输入Token用量。
        output_token_usage:
          type: string
          description: 输出Token用量。
        cost_usage_microunits:
          type: string
          description: 成本用量微单位。
        compute_usage_ms:
          type: string
          description: 计算用量毫秒。
        next_event_sequence:
          type: string
          description: 下一事件序号。
        requirements:
          type: array
          items:
            type: string
          description: 要求列表。
        deployment_target:
          $ref: "#/components/schemas/GoalDeploymentTarget"
          description: 部署目标。
        maintenance_policy:
          $ref: "#/components/schemas/GoalMaintenancePolicy"
          description: 维护策略。
        input_token_budget:
          type: string
          description: 覆盖 Goal 所有任务的独立硬上限，零表示不设限；与合并 token_budget 取交集，且不提供完成阶段的额外宽限。
        output_token_budget:
          type: string
          description: 输出Token预算。
        created_by:
          type: string
          description: 将不可变 Goal 权限范围提交准入的已认证调用者。
        cost_budget_currency:
          type: string
          description: 成本预算币种。
      description: 自主目标结构。
    GoalDeploymentTarget:
      type: object
      properties:
        deployment_key:
          type: string
          description: 部署键。
        expected_current_release_id:
          type: string
          description: 预期当前发布版本标识符。
      description: 不可变生产目标及乐观并发前提。expected_current_release_id 为空表示首次部署，不能覆盖已有实例；省略整个消息时保留旧 Goal 的行为。
    GoalEvent:
      type: object
      properties:
        event_id:
          type: string
          description: 事件标识符。
        schema_version:
          type: integer
          format: int32
          description: Schema版本。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        goal_id:
          type: string
          description: 目标标识符。
        iteration_id:
          type: string
          description: 迭代标识符。
        sequence:
          type: string
          description: 用于排序和去重的事件序号。
        type:
          type: string
          description: 类型。
        occurred_at:
          type: string
          format: date-time
          description: 发生时间，使用 RFC 3339 时间格式。
        trace_id:
          type: string
          description: 追踪标识符。
        payload:
          type: object
          description: 负载。
      description: 目标事件结构。
    GoalExperience:
      type: object
      properties:
        goal:
          $ref: "#/components/schemas/Goal"
          description: 目标。
        snapshot:
          type: object
          description: 快照。
        last_event_sequence:
          type: string
          description: 最近事件序号。
        phase:
          type: string
          description: 阶段。
        deep_link:
          type: string
          description: 深层链接。
        event_stream_url:
          type: string
          description: 事件流URL。
      description: 目标体验会话结构。
    GoalIteration:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        goal_id:
          type: string
          description: 目标标识符。
        sequence:
          type: integer
          format: int32
          description: 用于排序和去重的事件序号。
        status:
          enum:
            - GOAL_ITERATION_STATUS_UNSPECIFIED
            - GOAL_ITERATION_STATUS_RUNNING
            - GOAL_ITERATION_STATUS_EVALUATING
            - GOAL_ITERATION_STATUS_DEPLOYING
            - GOAL_ITERATION_STATUS_COMPLETED
            - GOAL_ITERATION_STATUS_FAILED
            - GOAL_ITERATION_STATUS_CANCELLED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            GOAL_ITERATION_STATUS_UNSPECIFIED: 未指定
            GOAL_ITERATION_STATUS_RUNNING: 执行中
            GOAL_ITERATION_STATUS_EVALUATING: 评估中
            GOAL_ITERATION_STATUS_DEPLOYING: 部署中
            GOAL_ITERATION_STATUS_COMPLETED: 已完成
            GOAL_ITERATION_STATUS_FAILED: 失败
            GOAL_ITERATION_STATUS_CANCELLED: 已取消
        coordinator_task_id:
          type: string
          description: 协调者任务标识符。
        release_id:
          type: string
          description: 发布版本标识符。
        input_context:
          type: string
          description: 输入上下文。
        outcome:
          type: string
          description: 结果。
        summary:
          type: string
          description: 摘要。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        started_at:
          type: string
          format: date-time
          description: 启动时间，使用 RFC 3339 时间格式。
        finished_at:
          type: string
          format: date-time
          description: 完成时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        workflow_execution_id:
          type: string
          description: 工作流执行标识符。
      description: 目标迭代结构。
    GoalMaintenancePolicy:
      type: object
      properties:
        schema_version:
          type: string
          description: Schema版本。
        permitted_tool_bindings:
          type: array
          items:
            type: string
          description: 获准工具绑定列表。
        approval_required_tool_bindings:
          type: array
          items:
            type: string
          description: 审批必需工具绑定列表。
        repository_binding_ids:
          type: array
          items:
            type: string
          description: 仓库绑定标识符列表列表。
        deployment_keys:
          type: array
          items:
            type: string
          description: 部署键列表。
        observation_artifact_ids:
          type: array
          items:
            type: string
          description: 观测产物标识符列表列表。
        required_evidence_kinds:
          type: array
          items:
            type: string
          description: 必需证据类别列表。
        configuration:
          type: object
          additionalProperties:
            type: string
          description: 配置映射。
        preauthorization:
          allOf:
            - $ref: "#/components/schemas/GoalMaintenancePreauthorization"
          description: 仅适用于 V2；创建该授权信封要求拥有项目内 approvals:write 权限。
      description: 受治理维护 Goal 的不可变授权边界，只收窄既有租户、Workspace、Environment 和工具权限，不新增权限。
    GoalMaintenancePreauthorization:
      type: object
      properties:
        environment:
          type: string
          description: 执行环境。
        tool_bindings:
          type: array
          items:
            type: string
          description: 工具绑定列表。
        repository_ref_prefixes:
          type: array
          items:
            type: string
          description: 仓库引用前缀列表。
        deployment_keys:
          type: array
          items:
            type: string
          description: 部署键列表。
      description: 调用者声明的开发操作权限，随 Goal 一起固定。该声明不属于模型提示，也不能代替后续工具调用所需的人工决定；生产目标和跨安全边界的操作不能通过本字段预先授权。
    GoalWorkflowBinding:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        workspace_agent_binding_id:
          type: string
          description: 所选工作空间中的 Agent 绑定标识。
      description: 目标工作流绑定结构。
    ListEvaluationsResponse:
      type: object
      properties:
        evaluations:
          type: array
          items:
            $ref: "#/components/schemas/Evaluation"
          description: 评估列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列表评估响应结构。
    ListGoalEventsResponse:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: "#/components/schemas/GoalEvent"
          description: 事件列表。
        next_sequence:
          type: string
          description: 下一序号。
      description: 列出目标事件的响应结构。
    ListGoalIterationsResponse:
      type: object
      properties:
        iterations:
          type: array
          items:
            $ref: "#/components/schemas/GoalIteration"
          description: 迭代列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出目标迭代记录的响应结构。
    ListGoalsResponse:
      type: object
      properties:
        goals:
          type: array
          items:
            $ref: "#/components/schemas/Goal"
          description: 目标列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出自主目标的响应结构。
    ListPromotionsResponse:
      type: object
      properties:
        promotions:
          type: array
          items:
            $ref: "#/components/schemas/Promotion"
          description: 晋级列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列出发布晋级申请的响应结构。
    ListReleasesResponse:
      type: object
      properties:
        releases:
          type: array
          items:
            $ref: "#/components/schemas/Release"
          description: 发布版本列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
      description: 列表发布版本响应结构。
    ListWorkflowEventsResponse:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: "#/components/schemas/WorkflowEvent"
          description: 事件列表。
        next_sequence:
          type: string
          description: 下一序号。
      description: 列出工作流事件的响应结构。
    ListWorkflowExecutionsResponse:
      type: object
      properties:
        executions:
          type: array
          items:
            $ref: "#/components/schemas/WorkflowExecution"
          description: 执行列表。
        next_page_token:
          type: string
          description: 下一页的分页令牌；为空表示没有下一页。
        total_count:
          type: string
          description: 总计数量。
      description: 列出工作流执行的响应结构。
    ListWorkspaceDeploymentTargetsResponse:
      type: object
      properties:
        releases:
          type: array
          items:
            $ref: "#/components/schemas/Release"
          description: 各部署键最近一次确认健康的 Release。执行任何生产变更前，Runtime 会重新核验所选 Release。
      description: 列出工作空间部署目标的响应结构。
    ModelInvocationConfig:
      type: object
      properties:
        model:
          type: string
          description: 模型。
        reasoning_effort:
          type: string
          description: 思考思考强度。
      description: Agent 默认值、Task 覆盖值和实际 Run 快照共用 ModelInvocationConfig。reasoning_effort 使用服务商公布的标识，例如 low、xhigh、max、ultra 或 thinking；OrbitSpace 不用固定的 protobuf 枚举限制服务商持续演进的取值。Task 留空的字段继承 Agent/服务商默认值。
    PauseGoalRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
      description: 暂停自主目标的请求结构。
    ProblemDetails:
      type: object
      description: RFC 9457 Problem Details 错误对象，包含 OrbitSpace 的关联标识扩展字段。
      required:
        - type
        - title
        - status
        - detail
        - request_id
      properties:
        type:
          type: string
          format: uri
          description: 类型。
        title:
          type: string
          description: 标题。
        status:
          type: integer
          minimum: 400
          maximum: 599
          description: 状态。
        detail:
          type: string
          description: 详情。
        instance:
          type: string
          format: uri-reference
          description: 实例。
        code:
          type: string
          pattern: ^[A-Z][A-Z0-9_]*$
          description: 代码。
        request_id:
          type: string
          format: uuid
          description: 请求标识符。
    Promotion:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        workspace_agent_binding_id:
          type: string
          description: 所选工作空间中的 Agent 绑定标识。
        goal_id:
          type: string
          description: 目标标识符。
        iteration_id:
          type: string
          description: 迭代标识符。
        from_agent_version_id:
          type: string
          description: 来源Agent版本标识符。
        from_environment_version_id:
          type: string
          description: 来源执行环境版本标识符。
        to_agent_version_id:
          type: string
          description: 目标Agent版本标识符。
        to_environment_version_id:
          type: string
          description: 目标执行环境版本标识符。
        to_model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 目标模型配置。
        evaluation_ids:
          type: array
          items:
            type: string
          description: 评估标识符列表列表。
        status:
          enum:
            - PROMOTION_STATUS_UNSPECIFIED
            - PROMOTION_STATUS_PROPOSED
            - PROMOTION_STATUS_APPROVED
            - PROMOTION_STATUS_APPLIED
            - PROMOTION_STATUS_REJECTED
            - PROMOTION_STATUS_ROLLED_BACK
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            PROMOTION_STATUS_UNSPECIFIED: 未指定
            PROMOTION_STATUS_PROPOSED: 已提出
            PROMOTION_STATUS_APPROVED: 已批准
            PROMOTION_STATUS_APPLIED: 已应用
            PROMOTION_STATUS_REJECTED: 已拒绝
            PROMOTION_STATUS_ROLLED_BACK: 已回滚
        expected_binding_state_version:
          type: string
          description: 预期绑定状态版本。
        reason:
          type: string
          description: 原因。
        decided_by:
          type: string
          description: 决定操作者。
        decided_at:
          type: string
          format: date-time
          description: 决定时间，使用 RFC 3339 时间格式。
        applied_at:
          type: string
          format: date-time
          description: 应用时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        from_model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 来源模型配置。
        rolled_back_by:
          type: string
          description: 回滚后退操作者。
        rolled_back_at:
          type: string
          format: date-time
          description: 回滚后退时间，使用 RFC 3339 时间格式。
        rollback_reason:
          type: string
          description: 回滚原因。
        rollback_binding_state_version:
          type: string
          description: 回滚绑定状态版本。
        rollback_capable:
          type: boolean
          description: 回滚具备能力。
      description: 发布晋级申请结构。
    ProposePromotionRequest:
      type: object
      properties:
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        workspace_agent_binding_id:
          type: string
          description: 所选工作空间中的 Agent 绑定标识。
        goal_id:
          type: string
          description: 目标标识符。
        iteration_id:
          type: string
          description: 迭代标识符。
        to_agent_version_id:
          type: string
          description: 目标Agent版本标识符。
        to_environment_version_id:
          type: string
          description: 目标执行环境版本标识符。
        to_model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 目标模型配置。
        evaluation_ids:
          type: array
          items:
            type: string
          description: 评估标识符列表列表。
        expected_binding_state_version:
          type: string
          description: 预期绑定状态版本。
        reason:
          type: string
          description: 原因。
      description: 提出发布晋级申请的请求结构。
    Release:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        goal_id:
          type: string
          description: 目标标识符。
        iteration_id:
          type: string
          description: 迭代标识符。
        sequence:
          type: integer
          format: int32
          description: 用于排序和去重的事件序号。
        source_revision:
          type: string
          description: 来源修订。
        summary:
          type: string
          description: 摘要。
        artifact_ids:
          type: array
          items:
            type: string
          description: 产物标识符列表列表。
        manifest:
          type: object
          description: 清单。
        status:
          enum:
            - RELEASE_STATUS_UNSPECIFIED
            - RELEASE_STATUS_CANDIDATE
            - RELEASE_STATUS_EVALUATING
            - RELEASE_STATUS_APPROVED
            - RELEASE_STATUS_DEPLOYING
            - RELEASE_STATUS_RELEASED
            - RELEASE_STATUS_FAILED
            - RELEASE_STATUS_ROLLED_BACK
            - RELEASE_STATUS_ROLLING_BACK
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            RELEASE_STATUS_UNSPECIFIED: 未指定
            RELEASE_STATUS_CANDIDATE: 候选
            RELEASE_STATUS_EVALUATING: 评估中
            RELEASE_STATUS_APPROVED: 已批准
            RELEASE_STATUS_DEPLOYING: 部署中
            RELEASE_STATUS_RELEASED: 已发布
            RELEASE_STATUS_FAILED: 失败
            RELEASE_STATUS_ROLLED_BACK: 已回滚
            RELEASE_STATUS_ROLLING_BACK: 回滚中
        deployment_task_id:
          type: string
          description: 部署任务标识符。
        deployment_ref:
          type: string
          description: 部署引用。
        failure_code:
          type: string
          description: 失败代码。
        failure_message:
          type: string
          description: 失败消息。
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        released_at:
          type: string
          format: date-time
          description: 释放时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        deployment_key:
          type: string
          description: 部署键。
        rollback_target_release_id:
          type: string
          description: 回滚目标发布版本标识符。
        rollback_task_id:
          type: string
          description: 回滚任务标识符。
        rollback_reason:
          type: string
          description: 回滚原因。
        rollback_requested_by:
          type: string
          description: 回滚请求操作者。
        rollback_requested_at:
          type: string
          format: date-time
          description: 回滚请求时间，使用 RFC 3339 时间格式。
        rollback_requested_state_version:
          type: string
          description: 回滚请求状态版本。
        rolled_back_at:
          type: string
          format: date-time
          description: 回滚后退时间，使用 RFC 3339 时间格式。
        rollback_capable:
          type: boolean
          description: 回滚具备能力。
        deployment_target:
          $ref: "#/components/schemas/GoalDeploymentTarget"
          description: 部署目标。
      description: 发布版本结构。
    ResumeGoalRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        additional_iterations:
          type: integer
          description: 显式增加可用的迭代次数，不会清零已消耗用量。
          format: int32
      description: 恢复自主目标的请求结构。
    RollbackPromotionRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_binding_state_version:
          type: string
          description: 预期绑定状态版本。
        reason:
          type: string
          description: 原因。
      description: 回滚发布晋级申请的请求结构。
    RollbackReleaseRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
        reason:
          type: string
          description: 原因。
      description: 回滚发布版本的请求结构。
    StartGoalRequest:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        expected_state_version:
          type: string
          description: 用于乐观并发控制的预期状态版本。请原样复制当前版本，不要经 JavaScript Number 转换而损失精度。
      description: 启动自主目标的请求结构。
    TaskInitiator:
      type: object
      properties:
        identity_id:
          type: string
          description: 身份标识符。
        display_name:
          type: string
          description: 展示名称。
        kind:
          type: string
          description: 类别。
        integration_client_id:
          type: string
          description: 集成客户端标识符。
        source:
          type: string
          description: 支持 chat、api、goal、workflow、delegation 或 a2a。
      description: 任务发起者结构。
    WorkflowBinding:
      type: object
      properties:
        name:
          type: string
          description: 名称。
        version_id:
          type: string
          description: 版本标识符。
      description: 工作流绑定结构。
    WorkflowEvent:
      type: object
      properties:
        event_id:
          type: string
          description: 事件标识符。
        schema_version:
          type: integer
          format: int32
          description: Schema版本。
        type:
          type: string
          description: 类型。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        workflow_execution_id:
          type: string
          description: 工作流执行标识符。
        step_key:
          type: string
          description: 步骤键。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        sequence:
          type: string
          description: 用于排序和去重的事件序号。
        occurred_at:
          type: string
          format: date-time
          description: 发生时间，使用 RFC 3339 时间格式。
        trace_id:
          type: string
          description: 追踪标识符。
        payload:
          type: object
          description: 负载。
      description: 工作流事件结构。
    WorkflowExecution:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        tenant_id:
          type: string
          description: 与已认证的访问上下文配合使用的租户标识；提供标识并不授予访问权。
        registry_version_id:
          type: string
          description: 注册表版本标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        workflow_content_digest:
          type: string
          description: 工作流内容摘要。
        input:
          type: string
          description: 本请求接受的输入。格式由字段 Schema 决定；应用调用还需遵循配置的输入适配器。
        priority:
          type: integer
          format: int32
          description: 优先级。
        max_parallelism:
          type: integer
          format: int32
          description: 最大并行度。
        failure_policy:
          type: string
          description: 失败策略。
        status:
          enum:
            - WORKFLOW_EXECUTION_STATUS_UNSPECIFIED
            - WORKFLOW_EXECUTION_STATUS_PENDING
            - WORKFLOW_EXECUTION_STATUS_RUNNING
            - WORKFLOW_EXECUTION_STATUS_COMPLETED
            - WORKFLOW_EXECUTION_STATUS_FAILED
            - WORKFLOW_EXECUTION_STATUS_CANCELLED
            - WORKFLOW_EXECUTION_STATUS_COMPENSATING
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            WORKFLOW_EXECUTION_STATUS_UNSPECIFIED: 未指定
            WORKFLOW_EXECUTION_STATUS_PENDING: 待处理
            WORKFLOW_EXECUTION_STATUS_RUNNING: 执行中
            WORKFLOW_EXECUTION_STATUS_COMPLETED: 已完成
            WORKFLOW_EXECUTION_STATUS_FAILED: 失败
            WORKFLOW_EXECUTION_STATUS_CANCELLED: 已取消
            WORKFLOW_EXECUTION_STATUS_COMPENSATING: 补偿中
        state_version:
          type: string
          description: 用于乐观并发控制的状态版本，须保留精确的十进制表示。
        failure_code:
          type: string
          description: 失败代码。
        failure_message:
          type: string
          description: 失败消息。
        started_at:
          type: string
          format: date-time
          description: 启动时间，使用 RFC 3339 时间格式。
        finished_at:
          type: string
          format: date-time
          description: 完成时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        steps:
          type: array
          items:
            $ref: "#/components/schemas/WorkflowStep"
          description: 步骤列表。
        last_event_sequence:
          type: string
          description: 最近事件序号。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        approval_mode:
          enum:
            - EXECUTION_APPROVAL_MODE_UNSPECIFIED
            - EXECUTION_APPROVAL_MODE_MANUAL
            - EXECUTION_APPROVAL_MODE_AUTO
          type: string
          format: enum
          description: 审批模式。
          x-enum-descriptions:
            EXECUTION_APPROVAL_MODE_UNSPECIFIED: 未指定
            EXECUTION_APPROVAL_MODE_MANUAL: 人工
            EXECUTION_APPROVAL_MODE_AUTO: 自动
        goal_id:
          type: string
          description: 目标标识符。
        initiator:
          $ref: "#/components/schemas/TaskInitiator"
          description: 发起者。
        input_summary:
          type: string
          description: 输入摘要。
      description: 工作流执行结构。
    WorkflowRetryPolicy:
      type: object
      properties:
        max_attempts:
          type: integer
          format: int32
          description: 最大尝试。
        initial_backoff_seconds:
          type: integer
          format: int32
          description: 初始退避秒。
        max_backoff_seconds:
          type: integer
          format: int32
          description: 最大退避秒。
        retryable_failure_codes:
          type: array
          items:
            type: string
          description: 可重试失败代码列表。
      description: 工作流重试策略结构。
    WorkflowStep:
      type: object
      properties:
        id:
          type: string
          description: 当前 Schema 或 URL 所指资源的标识。
        workflow_execution_id:
          type: string
          description: 工作流执行标识符。
        step_key:
          type: string
          description: 步骤键。
        instructions:
          type: string
          description: 指令。
        depends_on:
          type: array
          items:
            type: string
          description: 依赖依赖列表。
        agent_binding:
          type: string
          description: Agent绑定。
        environment_binding:
          type: string
          description: 执行环境绑定。
        approval_policy:
          type: string
          description: 审批策略。
        timeout_seconds:
          type: integer
          format: int32
          description: 超时秒。
        agent_version_id:
          type: string
          description: Agent版本标识符。
        environment_version_id:
          type: string
          description: 执行环境版本标识符。
        workspace_id:
          type: string
          description: 工作空间标识。工作空间是持续协作上下文，与按任务使用的工作树不同。
        status:
          enum:
            - WORKFLOW_STEP_STATUS_UNSPECIFIED
            - WORKFLOW_STEP_STATUS_BLOCKED
            - WORKFLOW_STEP_STATUS_SCHEDULED
            - WORKFLOW_STEP_STATUS_RUNNING
            - WORKFLOW_STEP_STATUS_COMPLETED
            - WORKFLOW_STEP_STATUS_FAILED
            - WORKFLOW_STEP_STATUS_CANCELLED
            - WORKFLOW_STEP_STATUS_SKIPPED
            - WORKFLOW_STEP_STATUS_RETRY_WAITING
            - WORKFLOW_STEP_STATUS_COMPENSATING
            - WORKFLOW_STEP_STATUS_COMPENSATION_RETRY_WAITING
            - WORKFLOW_STEP_STATUS_COMPENSATED
            - WORKFLOW_STEP_STATUS_COMPENSATION_FAILED
          type: string
          format: enum
          description: 状态。
          x-enum-descriptions:
            WORKFLOW_STEP_STATUS_UNSPECIFIED: 未指定
            WORKFLOW_STEP_STATUS_BLOCKED: 被阻塞
            WORKFLOW_STEP_STATUS_SCHEDULED: 已调度
            WORKFLOW_STEP_STATUS_RUNNING: 执行中
            WORKFLOW_STEP_STATUS_COMPLETED: 已完成
            WORKFLOW_STEP_STATUS_FAILED: 失败
            WORKFLOW_STEP_STATUS_CANCELLED: 已取消
            WORKFLOW_STEP_STATUS_SKIPPED: 已跳过
            WORKFLOW_STEP_STATUS_RETRY_WAITING: 等待重试
            WORKFLOW_STEP_STATUS_COMPENSATING: 补偿中
            WORKFLOW_STEP_STATUS_COMPENSATION_RETRY_WAITING: 等待补偿重试
            WORKFLOW_STEP_STATUS_COMPENSATED: 已补偿
            WORKFLOW_STEP_STATUS_COMPENSATION_FAILED: 补偿失败
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        failure_code:
          type: string
          description: 失败代码。
        failure_message:
          type: string
          description: 失败消息。
        scheduled_at:
          type: string
          format: date-time
          description: 计划时间，使用 RFC 3339 时间格式。
        started_at:
          type: string
          format: date-time
          description: 启动时间，使用 RFC 3339 时间格式。
        finished_at:
          type: string
          format: date-time
          description: 完成时间，使用 RFC 3339 时间格式。
        created_at:
          type: string
          format: date-time
          description: 创建时间，使用 RFC 3339 时间格式。
        updated_at:
          type: string
          format: date-time
          description: 更新时间，使用 RFC 3339 时间格式。
        topological_index:
          type: integer
          format: int32
          description: 拓扑索引。
        retry:
          $ref: "#/components/schemas/WorkflowRetryPolicy"
          description: 重试。
        attempt:
          type: integer
          format: int32
          description: 尝试。
        task_ids:
          type: array
          items:
            type: string
          description: 任务标识符列表列表。
        next_attempt_at:
          type: string
          format: date-time
          description: 下一尝试时间，使用 RFC 3339 时间格式。
        compensation:
          $ref: "#/components/schemas/WorkflowStepCompensation"
          description: 补偿。
        policy_scope_id:
          type: string
          description: 策略权限范围标识符。
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 模型配置。
        result_contract:
          type: object
          description: 结果契约。
        workspace_agent_binding_id:
          type: string
          description: 所选工作空间中的 Agent 绑定标识。
        participant_bindings:
          type: array
          items:
            type: string
          description: 已快照固定、必须参与委派的 Workspace Agent 逻辑槽位。
      description: 工作流步骤结构。
    WorkflowStepCompensation:
      type: object
      properties:
        instructions:
          type: string
          description: 指令。
        agent_binding:
          type: string
          description: Agent绑定。
        environment_binding:
          type: string
          description: 执行环境绑定。
        approval_policy:
          type: string
          description: 审批策略。
        timeout_seconds:
          type: integer
          format: int32
          description: 超时秒。
        retry:
          $ref: "#/components/schemas/WorkflowRetryPolicy"
          description: 重试。
        agent_version_id:
          type: string
          description: Agent版本标识符。
        environment_version_id:
          type: string
          description: 执行环境版本标识符。
        attempt:
          type: integer
          format: int32
          description: 尝试。
        task_id:
          type: string
          description: 任务标识，不能用一次执行的 Run ID 替代。
        task_ids:
          type: array
          items:
            type: string
          description: 任务标识符列表列表。
        next_attempt_at:
          type: string
          format: date-time
          description: 下一尝试时间，使用 RFC 3339 时间格式。
        failure_code:
          type: string
          description: 失败代码。
        failure_message:
          type: string
          description: 失败消息。
        scheduled_at:
          type: string
          format: date-time
          description: 计划时间，使用 RFC 3339 时间格式。
        started_at:
          type: string
          format: date-time
          description: 启动时间，使用 RFC 3339 时间格式。
        finished_at:
          type: string
          format: date-time
          description: 完成时间，使用 RFC 3339 时间格式。
        model_config:
          $ref: "#/components/schemas/ModelInvocationConfig"
          description: 模型配置。
        workspace_agent_binding_id:
          type: string
          description: 所选工作空间中的 Agent 绑定标识。
        participant_bindings:
          type: array
          items:
            type: string
          description: 参与者绑定列表。
      description: 工作流步骤补偿结构。
tags:
  - name: AutonomyService
    x-displayName: 自主目标与晋级
    description: 自主目标与晋级相关操作。
  - name: WorkflowService
    x-displayName: 工作流
    description: 工作流相关操作。
