{ "swagger": "2.0", "info": { "title": "ADDP Orchestrator API", "contact": {}, "version": "1.0" }, "host": "localhost:8084", "basePath": "/api/v1/orchestrator", "paths": { "/execution-read-scope": { "get": { "security": [ { "BearerAuth": [] } ], "description": "仅第一方租户用户;范围由 Owner 的现有读取 Permission 裁决,任务历史与本人一次性执行使用不同条件。| First-party tenant users only; Owner permissions decide task history and own ad-hoc visibility.", "produces": [ "application/json" ], "tags": [ "Execution diagnostics" ], "summary": "获取任务执行读取范围 | Get execution read scope", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/execution.ReadScope" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "authenticated" } }, "/executions": { "get": { "security": [ { "BearerAuth": [] } ], "description": "当前租户授权 User 的编排任务历史与本人一次性执行,查询与总数使用相同 Owner 范围;不返回子任务业务结果或执行授权信息。| Authorized Tenant Users only: orchestration history and own ad-hoc executions share the same Owner scope for queries and totals; child business results and execution authorization facts are excluded.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取所有执行列表 | List all executions", "parameters": [ { "type": "integer", "default": 1, "description": "页码 | Page", "name": "page", "in": "query" }, { "type": "integer", "default": 20, "description": "每页数量 | Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.orchestrationExecutionListResponse" } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] } }, "/executions/{execution_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "限定当前租户的 orchestration 执行,返回安全步骤投影,不返回子任务业务结果或执行授权事实。| Scope to current-Tenant orchestration executions and return safe step projections without child business results or execution authorization facts.\n当前租户授权 User 的编排任务历史与本人一次性执行,查询与总数使用相同 Owner 范围;不返回子任务业务结果或执行授权信息。| Authorized Tenant Users only: orchestration history and own ad-hoc executions share the same Owner scope for queries and totals; child business results and execution authorization facts are excluded.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取 Orchestrator 编排执行状态 | Get Orchestrator execution status", "parameters": [ { "type": "string", "description": "执行 UUID | Execution UUID", "name": "execution_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.orchestrationExecutionResponse" } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": true } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] } }, "/orch-executions/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "返回编排当前执行状态、当前步骤和逐步更新的 metadata.step_results;步骤结束后即可查询安全状态与规范子执行引用;不包含子任务业务结果或执行授权事实,无需等待整个编排结束。| Return the current orchestration status, current step, and incrementally updated metadata.step_results; completed step status and canonical child execution references are available before the orchestration finishes; arbitrary child results and authorization facts are excluded.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取执行详情 | Get execution detail", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.orchestrationExecutionResponse" } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "执行不存在 | Execution not found", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] } }, "/orchestrations": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取编排列表 | List orchestrations", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "严格解析编排定义并拒绝未知字段,统一校验 Step、DAG、模板依赖、任务引用、递归引用和调度表达式 | Strictly parse the orchestration definition, reject unknown fields, and validate steps, DAG, template dependencies, task references, recursive references, and schedule expressions\n保存时从当前 User 为定义绑定任务授权主体,另需编排执行与执行授权创建权限;凭据仅在同步请求内转发 | Bind the definition to the current User task authorization subject when saving, requiring workflow execute and execution authorization create; forward credentials only within the synchronous request", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "创建编排 | Create orchestration", "parameters": [ { "description": "编排定义,steps 必须使用 provider/task_type/task_id 任务引用 | Orchestration definition, steps must use provider/task_type/task_id task references", "name": "orchestration", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.OrchestrationDefinitionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "编排定义或执行参数无效 | Invalid orchestration definition or execution parameters", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.create", "orchestrator.workflow.execute", "system.execution_authorization.create" ] } }, "/orchestrations/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取编排详情 | Get orchestration detail", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "编排不存在 | Orchestration not found", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "description": "严格解析编排定义并拒绝未知字段,统一校验 Step、DAG、模板依赖、任务引用、递归引用和调度表达式 | Strictly parse the orchestration definition, reject unknown fields, and validate steps, DAG, template dependencies, task references, recursive references, and schedule expressions\n保存时从当前 User 为定义绑定任务授权主体,另需编排执行与执行授权创建权限;凭据仅在同步请求内转发 | Bind the definition to the current User task authorization subject when saving, requiring workflow execute and execution authorization create; forward credentials only within the synchronous request", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "更新编排 | Update orchestration", "parameters": [ { "type": "integer", "description": "编排 ID | Orchestration ID", "name": "id", "in": "path", "required": true }, { "description": "编排定义,steps 必须使用 provider/task_type/task_id 任务引用 | Orchestration definition, steps must use provider/task_type/task_id task references", "name": "orchestration", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.OrchestrationDefinitionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "编排定义或执行参数无效 | Invalid orchestration definition or execution parameters", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "编排不存在 | Orchestration not found", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.update", "orchestrator.workflow.execute", "system.execution_authorization.create" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "删除编排 | Delete orchestration", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "编排不存在 | Orchestration not found", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.delete" ] } }, "/orchestrations/{id}/execute": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "执行编排 | Execute orchestration", "responses": { "202": { "description": "已创建冻结计划的待执行记录 | A pending execution with a frozen plan was created", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "编排步骤定义无效 | The orchestration step definition is invalid", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "编排不存在 | Orchestration not found", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.execute" ] } }, "/orchestrations/{id}/executions": { "get": { "security": [ { "BearerAuth": [] } ], "description": "当前租户授权 User 的编排任务历史与本人一次性执行,查询与总数使用相同 Owner 范围;不返回子任务业务结果或执行授权信息。| Authorized Tenant Users only: orchestration history and own ad-hoc executions share the same Owner scope for queries and totals; child business results and execution authorization facts are excluded.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取执行列表 | List executions", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.orchestrationExecutionListResponse" } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "编排不存在 | Orchestration not found", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] } }, "/task-provider/executions/{execution_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "仅当前租户 orchestrator/orchestration 执行,使用独立安全状态契约。| Current-Tenant orchestrator/orchestration executions only, using the independent safe status contract.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取 TaskProvider 编排执行状态 | Get TaskProvider orchestration execution status", "parameters": [ { "type": "string", "description": "执行 UUID | Execution UUID", "name": "execution_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/taskprovider.ExecutionStatusResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": true } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.task_provider.read" ] } }, "/task-provider/tasks": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按标准 TaskProvider 协议列出 Orchestrator 自身的编排任务;task_type 仅支持 orchestration。| List Orchestrator tasks through the standard TaskProvider protocol; task_type only supports orchestration.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "列出 TaskProvider 编排任务 | List TaskProvider orchestration tasks", "parameters": [ { "type": "string", "description": "任务类型,固定为 orchestration | Task type, fixed to orchestration", "name": "task_type", "in": "query" }, { "type": "integer", "default": 1, "description": "页码 | Page", "name": "page", "in": "query" }, { "type": "integer", "default": 100, "description": "每页数量 | Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ListProviderOrchestrationTasksResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "additionalProperties": true } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.task_provider.read" ] } }, "/task-provider/tasks/{task_type}/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按标准 TaskProvider 路径获取 Orchestrator 编排任务详情;task_type 仅支持 orchestration。| Get Orchestrator task detail through the standard TaskProvider path; task_type only supports orchestration.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "获取 TaskProvider 编排任务详情 | Get TaskProvider orchestration task detail", "parameters": [ { "type": "string", "description": "任务类型,固定为 orchestration | Task type, fixed to orchestration", "name": "task_type", "in": "path", "required": true }, { "type": "integer", "description": "编排 ID | Orchestration ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ProviderOrchestrationTask" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": true } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.task_provider.read" ] } }, "/task-provider/tasks/{task_type}/{id}/execute": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅接受 addp-orchestrator 以父 execution 血缘触发;task_type 仅支持 orchestration,请求必须提供 source=orchestrator 和 parent_execution_id。| Only accepts addp-orchestrator execution-lineage invocation; task_type only supports orchestration, and source=orchestrator plus parent_execution_id are required.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "执行 TaskProvider 编排任务 | Execute TaskProvider orchestration task", "parameters": [ { "type": "string", "description": "任务类型,固定为 orchestration | Task type, fixed to orchestration", "name": "task_type", "in": "path", "required": true }, { "type": "integer", "description": "编排 ID | Orchestration ID", "name": "id", "in": "path", "required": true }, { "description": "TaskProvider 执行请求 | TaskProvider execution request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/internal_api.orchestrationTaskProviderExecuteRequest" } } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/internal_api.orchestrationTaskProviderExecuteResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": true } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "additionalProperties": true } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.task_provider.execute" ] } }, "/task-providers": { "get": { "security": [ { "BearerAuth": [] } ], "description": "从 System 模块定义读取 TaskProvider 声明,并附带当前 Backend 租约投影的动态可用性 | Read TaskProvider declarations from System module definitions with dynamic availability projected from current Backend leases", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "列出任务提供者 | List task providers", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "additionalProperties": true } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] } }, "/task-providers/{module_name}/tasks/{task_type}/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "TaskProvider" ], "summary": "获取具体 TaskProvider 任务详情 | Get concrete TaskProvider task detail", "parameters": [ { "type": "string", "description": "任务提供者模块名 | Task provider module name", "name": "module_name", "in": "path", "required": true }, { "type": "string", "description": "任务类型 | Task type", "name": "task_type", "in": "path", "required": true }, { "type": "integer", "description": "任务 ID | Task ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "任务详情及 execution_contract | Task detail and execution_contract", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "参数无效 | Invalid parameters", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "503": { "description": "任务提供者当前不可用 | Task provider currently unavailable", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] } }, "/tasks": { "get": { "security": [ { "BearerAuth": [] } ], "description": "动态调用目标模块任务列表接口并标准化返回格式;module_name=orchestrator 时返回本模块已保存的编排任务。| Proxy and normalize module task list; when module_name=orchestrator, return saved orchestration tasks.", "produces": [ "application/json" ], "tags": [ "Orchestrator" ], "summary": "列出模块任务 | List module tasks", "parameters": [ { "type": "string", "description": "模块名;为空或 orchestrator 时返回编排任务 | Module name; empty or orchestrator returns orchestration tasks", "name": "module_name", "in": "query" }, { "type": "string", "description": "任务类型;Orchestrator 固定为 orchestration | Task type; orchestration for Orchestrator", "name": "task_type", "in": "query" }, { "type": "integer", "default": 1, "description": "页码 | Page", "name": "page", "in": "query" }, { "type": "integer", "default": 100, "description": "每页数量 | Page size", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": true } }, "403": { "description": "当前身份未绑定租户 | Current identity is not bound to a tenant", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": true } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "additionalProperties": true } }, "502": { "description": "Bad Gateway", "schema": { "type": "object", "additionalProperties": true } }, "503": { "description": "任务提供者当前不可用 | Task provider currently unavailable", "schema": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ErrorResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "orchestrator.workflow.read" ] } } }, "definitions": { "execution.DiagnosticStep": { "type": "object", "properties": { "duration": { "type": "integer" }, "ended_at": { "type": "string" }, "error_code": { "type": "string" }, "id": { "type": "string" }, "phase": { "type": "string" }, "started_at": { "type": "string" }, "status": { "type": "string" } } }, "execution.ReadGrant": { "type": "object", "properties": { "own_ad_hoc": { "type": "boolean" }, "task_history": { "type": "boolean" }, "task_type": { "type": "string" } } }, "execution.ReadScope": { "type": "object", "properties": { "grants": { "type": "array", "items": { "$ref": "#/definitions/execution.ReadGrant" } }, "module": { "type": "string" }, "principal_id": { "type": "integer" }, "tenant_id": { "type": "integer" } } }, "github_com_addp_orchestrator_internal_models.ErrorResponse": { "type": "object", "properties": { "error": { "type": "string", "example": "请求参数错误" } } }, "github_com_addp_orchestrator_internal_models.ListProviderOrchestrationTasksResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.ProviderOrchestrationTask" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" } } }, "github_com_addp_orchestrator_internal_models.OrchestrationDefinitionRequest": { "type": "object", "properties": { "description": { "type": "string" }, "editor_layout": { "description": "共享节点坐标 | Shared node positions", "allOf": [ { "$ref": "#/definitions/models.JSONMap" } ] }, "enabled": { "type": "boolean" }, "name": { "type": "string" }, "schedule": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.Step" } } } }, "github_com_addp_orchestrator_internal_models.ProviderOrchestrationTask": { "type": "object", "properties": { "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "display_name": { "type": "string" }, "enabled": { "type": "boolean" }, "execution_contract": { "$ref": "#/definitions/taskprovider.ExecutionContract" }, "id": { "type": "integer" }, "last_execution_id": { "type": "string" }, "last_execution_status": { "type": "string" }, "last_run_at": { "type": "string" }, "name": { "type": "string" }, "next_run_at": { "type": "string" }, "schedule": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_orchestrator_internal_models.Step" } }, "task_type": { "type": "string" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" } } }, "github_com_addp_orchestrator_internal_models.Step": { "type": "object", "properties": { "depends_on": { "description": "依赖步骤 ID 列表", "type": "array", "items": { "type": "string" } }, "id": { "description": "唯一ID", "type": "string" }, "name": { "description": "步骤名称", "type": "string" }, "parameters": { "description": "请求参数", "type": "object", "additionalProperties": true }, "provider": { "description": "任务引用(引用已有的 TaskProvider 任务定义)", "type": "string" }, "task_id": { "description": "具体任务定义 ID", "type": "integer" }, "task_type": { "description": "TaskProvider task type, e.g. \"scan\" | \"workflow\" | \"orchestration\"", "type": "string" }, "timeout": { "description": "超时秒数", "type": "integer" } } }, "internal_api.orchestrationChildReference": { "type": "object", "properties": { "execution_id": { "type": "string" } } }, "internal_api.orchestrationExecutionListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/internal_api.orchestrationExecutionResponse" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "internal_api.orchestrationExecutionMetadata": { "type": "object", "properties": { "step_results": { "type": "object", "additionalProperties": { "$ref": "#/definitions/internal_api.orchestrationStepResponse" } } } }, "internal_api.orchestrationExecutionResponse": { "type": "object", "properties": { "attempt": { "type": "integer" }, "bytes_read": { "type": "integer" }, "bytes_written": { "type": "integer" }, "completed_at": { "type": "string" }, "created_at": { "type": "string" }, "current_step": { "type": "string" }, "diagnostics_truncated": { "type": "boolean" }, "error_details": { "$ref": "#/definitions/models.JSONMap" }, "execution_boundary": { "type": "string" }, "execution_id": { "type": "string" }, "execution_time_ms": { "type": "integer" }, "id": { "type": "integer" }, "max_attempts": { "type": "integer" }, "metadata": { "$ref": "#/definitions/internal_api.orchestrationExecutionMetadata" }, "module": { "type": "string" }, "parent_execution_id": { "type": "string" }, "progress": { "type": "integer" }, "records_read": { "type": "integer" }, "records_written": { "type": "integer" }, "retry_of_execution_id": { "type": "string" }, "rows_affected": { "type": "integer" }, "source": { "type": "string" }, "source_task_id": { "type": "string" }, "source_task_name": { "type": "string" }, "started_at": { "type": "string" }, "status": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/execution.DiagnosticStep" } }, "steps_attempt_unverified": { "type": "boolean" }, "steps_truncated": { "type": "boolean" }, "task_type": { "type": "string" }, "trigger_type": { "type": "string" }, "triggered_by": { "type": "integer" }, "updated_at": { "type": "string" } } }, "internal_api.orchestrationStepResponse": { "type": "object", "properties": { "duration": { "type": "integer" }, "ended_at": { "type": "string" }, "error": { "type": "string" }, "error_code": { "type": "string" }, "id": { "type": "string" }, "phase": { "type": "string" }, "result": { "$ref": "#/definitions/internal_api.orchestrationChildReference" }, "started_at": { "type": "string" }, "status": { "type": "string" } } }, "internal_api.orchestrationTaskProviderExecuteRequest": { "type": "object", "properties": { "parameters": { "type": "object", "additionalProperties": true }, "parent_execution_id": { "type": "string" }, "source": { "type": "string" }, "trigger_type": { "type": "string" } } }, "internal_api.orchestrationTaskProviderExecuteResponse": { "type": "object", "properties": { "execution_id": { "type": "string" }, "status": { "type": "string" } } }, "models.JSONMap": { "type": "object", "additionalProperties": true }, "taskprovider.ExecutionContract": { "type": "object", "properties": { "input_defaults": { "type": "object", "additionalProperties": true }, "input_schema": { "type": "object", "additionalProperties": true }, "input_ui_schema": { "type": "object", "additionalProperties": true }, "output_schema": { "type": "object", "additionalProperties": true } } }, "taskprovider.ExecutionStatusResponse": { "type": "object", "required": [ "outputs" ], "properties": { "attempt": { "type": "integer" }, "bytes_read": { "type": "integer" }, "bytes_written": { "type": "integer" }, "completed_at": { "type": "string" }, "created_at": { "type": "string" }, "current_step": { "type": "string" }, "diagnostics_truncated": { "type": "boolean" }, "error_details": { "$ref": "#/definitions/models.JSONMap" }, "execution_boundary": { "type": "string" }, "execution_id": { "type": "string" }, "execution_time_ms": { "type": "integer" }, "id": { "type": "integer" }, "max_attempts": { "type": "integer" }, "metadata": { "$ref": "#/definitions/models.JSONMap" }, "module": { "type": "string" }, "outputs": { "$ref": "#/definitions/models.JSONMap" }, "parent_execution_id": { "type": "string" }, "progress": { "type": "integer" }, "records_read": { "type": "integer" }, "records_written": { "type": "integer" }, "retry_of_execution_id": { "type": "string" }, "rows_affected": { "type": "integer" }, "source": { "type": "string" }, "source_task_id": { "type": "string" }, "source_task_name": { "type": "string" }, "started_at": { "type": "string" }, "status": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/definitions/execution.DiagnosticStep" } }, "steps_attempt_unverified": { "type": "boolean" }, "steps_truncated": { "type": "boolean" }, "task_type": { "type": "string" }, "trigger_type": { "type": "string" }, "triggered_by": { "type": "integer" }, "updated_at": { "type": "string" } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }