{"openapi":"3.1.0","info":{"title":"AppServerX","description":"AppServerX Application Server","version":"1.0.0"},"paths":{"/agents/status":{"get":{"tags":["Agents"],"summary":"Api Agents Status","description":"查询单个订阅会话的当前状态。\n\n接口要求：\n- 请求头必须携带 `X-Agent-Admin-Token`\n- 调用方通过查询参数精确指定目标会话\n\n响应会返回服务端视角下的当前会话状态与能力摘要。","operationId":"api_agents_status","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","description":"逻辑会话标识。","title":"Session Id"},"description":"逻辑会话标识。"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStatusResponse"}}}},"400":{"description":"Agents bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Agents unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Agents session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Agents conflict or ambiguous selector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/sessions":{"get":{"tags":["Agents"],"summary":"Api Agents Sessions","description":"按 `agent_id` 或 `device_id` 查询订阅会话列表。\n\n接口要求：\n- 请求头必须携带 `X-Agent-Admin-Token`\n- 支持按目标条件过滤\n- 可选择仅返回当前在线会话\n\n该接口主要用于运维排查、控制台展示和多实例选路确认。","operationId":"api_agents_sessions","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","description":"按 agent_id 过滤。","default":"","title":"Agent Id"},"description":"按 agent_id 过滤。"},{"name":"device_id","in":"query","required":false,"schema":{"type":"string","description":"按 device_id 过滤。","default":"","title":"Device Id"},"description":"按 device_id 过滤。"},{"name":"online_only","in":"query","required":false,"schema":{"type":"boolean","description":"是否仅返回在线会话。","default":true,"title":"Online Only"},"description":"是否仅返回在线会话。"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSessionListResponse"}}}},"400":{"description":"Agents bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Agents unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Agents session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Agents conflict or ambiguous selector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/open":{"post":{"tags":["Agents"],"summary":"Api Agents Open","description":"为订阅客户端创建逻辑会话。\n\n接口要求：\n- 请求头必须携带 `X-Agent-Token`\n- 请求体需给出客户端身份、运行环境和能力信息\n\n响应中会包含建立长连接、断线恢复以及后续调用所需的初始化信息。","operationId":"api_agents_open","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOpenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOpenResponse"}}}},"400":{"description":"Agents bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Agents unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Agents session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Agents conflict or ambiguous selector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/close":{"post":{"tags":["Agents"],"summary":"Api Agents Close","description":"主动关闭一个订阅会话。\n\n接口要求：\n- 请求头必须携带 `X-Agent-Admin-Token`\n- 请求体中必须提供目标会话标识\n\n服务端会尝试关闭对应 WebSocket，并把会话状态更新为离线。","operationId":"api_agents_close","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCloseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStatusResponse"}}}},"400":{"description":"Agents bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Agents unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Agents session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Agents conflict or ambiguous selector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/resume":{"post":{"tags":["Agents"],"summary":"Api Agents Resume","description":"校验指定订阅会话是否允许执行断线恢复。\n\n接口要求：\n- 请求头必须携带 `X-Agent-Token`\n- 请求体中提供恢复所需的基本信息\n\n响应中会返回恢复结论、补发窗口以及当前可展示的调用信息。","operationId":"api_agents_resume","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResumeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResumeResponse"}}}},"400":{"description":"Agents bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"401":{"description":"Agents unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"404":{"description":"Agents session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"409":{"description":"Agents conflict or ambiguous selector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/session":{"get":{"tags":["Mind Web"],"summary":"Api Web Session","description":"恢复浏览器登录状态并查询绑定设备是否在线。","operationId":"api_web_session","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSessionData"}}}}}},"post":{"tags":["Mind Web"],"summary":"Api Web Login","description":"将设备 API Key 交换为当前部署的浏览器会话。","operationId":"api_web_login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSessionData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Mind Web"],"summary":"Api Web Logout","description":"撤销当前浏览器会话并清除 Cookie。","operationId":"api_web_logout","responses":{"204":{"description":"Successful Response"}}}},"/mind/conversations":{"get":{"tags":["Mind Web"],"summary":"Api Web Conversations","description":"查询当前设备的持久对话列表。","operationId":"api_web_conversations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConversationData"},"type":"array","title":"Response Api Web Conversations"}}}}}},"post":{"tags":["Mind Web"],"summary":"Api Web Conversation Create","description":"创建可跨刷新恢复的对话。","operationId":"api_web_conversation_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/conversations/{conversation_id}":{"get":{"tags":["Mind Web"],"summary":"Api Web Conversation","description":"查询对话及其只读事件凭据。","operationId":"api_web_conversation","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Mind Web"],"summary":"Api Web Conversation Delete","description":"删除当前设备的已结束对话，重复请求恢复相同删除结果。","operationId":"api_web_conversation_delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDeletionData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/conversations/{conversation_id}/messages":{"get":{"tags":["Mind Web"],"summary":"Api Web Messages","description":"按提交游标加载有界历史消息及其回放范围。","operationId":"api_web_messages","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind":{"post":{"tags":["Mind Web"],"summary":"Api Mind Call","description":"持久接收一条对话消息，并经订阅连接派发至绑定设备。","operationId":"api_mind","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Mind"],"summary":"Api Mind Web","description":"返回对话页面，提供查看凭据时切换为只读回放。","operationId":"api_mind_web","parameters":[{"name":"view_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"description":"可选的短期只读会话凭据。","default":"","title":"View Id"},"description":"可选的短期只读会话凭据。"}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"text/html":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"text/html":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"text/html":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"text/html":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"text/html":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"text/html":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/mind/conversations/{conversation_id}/control":{"post":{"tags":["Mind Web"],"summary":"Api Web Control","description":"将停止或审批操作送交拥有任务的客户端。","operationId":"api_web_control","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatControlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatControlData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/inputs":{"post":{"tags":["Mind Web"],"summary":"Api Web Input","description":"向已授权设备的明确轮次提交持久补充，不创建新任务。","operationId":"api_web_input","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatInputRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebInputData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/conversations/{conversation_id}/updates":{"get":{"tags":["Mind Web"],"summary":"Api Web Updates","description":"按版本同步变化消息与当前交互，不扫描整段历史。","operationId":"api_web_updates","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"after_revision","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After Revision"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatUpdatePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/uploads":{"post":{"tags":["Mind Web"],"summary":"Api Web Upload","description":"通过当前浏览器会话上传受限制的图片或文件。","operationId":"api_web_upload","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","format":"binary"}},"type":"object","required":["file"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebAttachment"}}}}}}},"/mind/uploads/{upload_id}":{"get":{"tags":["Mind Web"],"summary":"Api Web Upload Preview","description":"为当前设备的暂存附件提供受保护预览或下载跳转。","operationId":"api_web_upload_preview","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"307":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/conversations/{conversation_id}/messages/{request_id}/attachments/{upload_id}":{"get":{"tags":["Mind Web"],"summary":"Api Web Message Attachment","description":"验证消息归属后重新签发附件地址，支持历史图片恢复预览。","operationId":"api_web_message_attachment","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"307":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind/conversations/{conversation_id}/inputs/{request_id}/attachments/{upload_id}":{"get":{"tags":["Mind Web"],"summary":"Api Web Input Attachment","description":"核对设备及补充归属后签发历史附件的短期访问地址。","operationId":"api_web_input_attachment","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"307":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bootstrap":{"get":{"tags":["Common"],"summary":"Api Bootstrap","description":"返回客户端初始化所需的基础配置。\n\n响应中通常包含启动参数、区域设置、初始模板和缓存控制信息。","operationId":"api_bootstrap","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/global-configuration":{"get":{"tags":["Common"],"summary":"Api Global Configuration","description":"返回远程全局配置中心中的配置结果。\n\n接口会先校验签名参数，再下发当前生效的全局配置数据。","operationId":"api_global_configuration","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keepalive-render":{"get":{"tags":["Common"],"summary":"Api Keepalive Render","description":"执行 Render 保活逻辑。\n\n通过轻量计算维持 Render 服务活跃，避免因长时间无访问进入休眠。","operationId":"api_keepalive_render","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/keepalive-postgresql":{"get":{"tags":["Common"],"summary":"Api Keepalive Postgresql","description":"执行 PostgreSQL 存活检查。\n\n通过轻量 SQL 查询确认当前数据库连接可用。","operationId":"api_keepalive_postgresql","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/keepalive-modal":{"get":{"tags":["Common"],"summary":"Api Keepalive Modal","description":"执行 Modal 容器保活逻辑。\n\n通常由定时任务触发，用于保持容器存活并防止超时回收。","operationId":"api_keepalive_modal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/keepalive-zilliz":{"get":{"tags":["Common"],"summary":"Api Keepalive Zilliz","description":"执行 Zilliz 向量服务保活逻辑。\n\n通常由定时任务触发，用于保持服务活跃并防止实例超时回收。","operationId":"api_keepalive_zilliz","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/events-ingest":{"post":{"tags":["Mind"],"summary":"Api Events Ingest","description":"写入并广播标准领域事件。\n\n事件会同时落库并广播给订阅端，用于历史回放、断线恢复和实时前端渲染。","operationId":"api_events_ingest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamEventIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/mind-heal-license":{"get":{"tags":["Mind"],"summary":"Api Mind Heal License","description":"返回元素自愈能力的授权开关信息。\n\n响应中包含签名后的授权数据，用于客户端判断是否启用元素自愈能力。","operationId":"api_mind_heal_license","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","description":"应用标识，用于定位目标应用或宿主。","title":"A"},"description":"应用标识，用于定位目标应用或宿主。"},{"name":"t","in":"query","required":true,"schema":{"type":"integer","description":"请求时间戳，用于签名校验。","title":"T"},"description":"请求时间戳，用于签名校验。"},{"name":"n","in":"query","required":true,"schema":{"type":"string","description":"请求 nonce，用于防重放。","title":"N"},"description":"请求 nonce，用于防重放。"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/mind-heal":{"post":{"tags":["Mind"],"summary":"Api Mind Heal","description":"执行自愈流程并返回对应的流式事件结果。\n\n响应返回与自愈流程对应的流式结果。","operationId":"api_mind_heal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/mind-replay":{"get":{"tags":["Mind"],"summary":"Api Mind Replay","description":"返回指定会话的历史事件回放数据。\n\n该接口用于分页或增量读取历史事件，供断线重连、回放和补拉场景使用。","operationId":"api_mind_replay","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","description":"会话 ID，用于定位目标事件序列。","title":"Cid"},"description":"会话 ID，用于定位目标事件序列。"},{"name":"sid","in":"query","required":true,"schema":{"type":"string","description":"流 ID，用于定位目标事件流。","title":"Sid"},"description":"流 ID，用于定位目标事件流。"},{"name":"vt","in":"query","required":true,"schema":{"type":"string","description":"短期查看 token，用于校验回放权限。","title":"Vt"},"description":"短期查看 token，用于校验回放权限。"},{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"上次已确认的持久事件序号。","default":0,"title":"After Seq"},"description":"上次已确认的持久事件序号。"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"单次回放返回的最大事件条数。","default":2000,"title":"Limit"},"description":"单次回放返回的最大事件条数。"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindReplayResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/stream-events":{"get":{"tags":["Mind"],"summary":"Api Stream Events","description":"按会话维度提供稳定的事件订阅流。\n\n该接口用于实时接收目标会话的事件流，并在订阅前校验只读访问权限。","operationId":"api_stream_events","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","description":"会话 ID，用于定位目标事件队列。","title":"Cid"},"description":"会话 ID，用于定位目标事件队列。"},{"name":"sid","in":"query","required":true,"schema":{"type":"string","description":"流 ID，用于定位目标事件流。","title":"Sid"},"description":"流 ID，用于定位目标事件流。"},{"name":"vt","in":"query","required":true,"schema":{"type":"string","description":"短期查看 token，用于校验订阅权限。","title":"Vt"},"description":"短期查看 token，用于校验订阅权限。"},{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"上次已确认的持久事件序号。","default":0,"title":"After Seq"},"description":"上次已确认的持久事件序号。"}],"responses":{"200":{"description":"Successful Response"},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/tool-result":{"post":{"tags":["Mind"],"summary":"Api Tool Result","description":"回传本地工具执行结果。\n\n客户端执行本地工具后，通过该接口持久化结果并供执行中的轮次消费。","operationId":"api_tool_result","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResultRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResultResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"工具调用尚未登记或不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"幂等键、工具身份或既有结果发生冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"工具结果信封不符合当前协议；旧云沙盒 handoff 字段会被拒绝。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"410":{"description":"托管工具执行预算耗尽、调用取消或所属轮次已关闭。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"500":{"description":"工具结果无法写入持久运行时。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/tool-result/status":{"get":{"tags":["Mind"],"summary":"Api Tool Result Status","description":"按业务调用唯一身份读取工具调用、轮次和效果状态。","operationId":"api_tool_result_status","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Cid"}},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Sid"}},{"name":"call_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":160,"title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResultStatusResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体不拥有目标会话。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"500":{"description":"权威工具状态无法读取。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/tool-result/renew":{"post":{"tags":["Mind"],"summary":"Api Tool Result Renew","description":"续期活动轮次中仍由当前 Worker lease 等待的工具调用。","operationId":"api_tool_result_renew","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResultRenewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResultRenewResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体或活动 Worker lease 不匹配。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"工具调用不存在或尚未登记。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"工具身份冲突或生命周期上限已耗尽。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"410":{"description":"工具调用或所属轮次已经终结。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/tool-approval":{"post":{"tags":["Mind"],"summary":"Api Tool Approval","description":"接收审批决定并同步给等待中的工具调用。","operationId":"api_tool_approval","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolApprovalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolApprovalResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"审批不存在或请求坐标不匹配。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"审批决定冲突或客户端附加数据不一致。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"审批服务不可用或持久回执不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/turn/steer":{"post":{"tags":["Mind"],"summary":"Api Turn Steer","description":"将引导输入写入活动轮次的输入暂存区。","operationId":"api_turn_steer","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":6,"maxLength":64,"description":"会话 ID。","title":"Cid"},"description":"会话 ID。"},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":6,"maxLength":96,"description":"流 ID。","title":"Sid"},"description":"流 ID。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnInputRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnControlResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/turn/reconcile":{"post":{"tags":["Mind"],"summary":"Api Turn Reconcile","description":"只读查询指定逻辑轮次中客户端输入的提交事实。","operationId":"api_turn_reconcile","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":6,"maxLength":64,"description":"会话 ID。","title":"Cid"},"description":"会话 ID。"},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":6,"maxLength":96,"description":"流 ID。","title":"Sid"},"description":"流 ID。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnReconcileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnReconcileResponse"}}}},"401":{"description":"缺少有效认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"调用方不拥有目标会话。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/turn/interrupt":{"post":{"tags":["Mind"],"summary":"Api Turn Interrupt","description":"接受活动轮次的中断命令并返回空确认。","operationId":"api_turn_interrupt","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":6,"maxLength":64,"description":"会话 ID。","title":"Cid"},"description":"会话 ID。"},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":6,"maxLength":96,"description":"流 ID。","title":"Sid"},"description":"流 ID。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnInterruptRequest"}}}},"responses":{"204":{"description":"中断命令已接受；权威终态通过 turn.completed 或 /turn/status 返回。"},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/fork":{"post":{"tags":["Mind"],"summary":"Api Fork","description":"创建远端会话上下文分支。","operationId":"api_fork","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindForkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindForkResponse"}}}},"401":{"description":"缺少认证主体。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证凭据无效。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"源会话上下文、指定轮次或其原始用户输入不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"源会话正在运行或目标会话冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求参数校验失败。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/effect/reconcile":{"post":{"tags":["Mind"],"summary":"Api Reconcile Effect","description":"显式核对不确定的持久外部效果。","operationId":"api_reconcile_effect","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindEffectReconcileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindEffectReconcileResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"效果不存在或不属于当前认证主体。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"核对请求冲突或效果已经关闭。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/compact":{"post":{"tags":["Mind"],"summary":"Api Compact","description":"手动压缩当前对话历史，并以流式事件返回运行状态。","operationId":"api_compact","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindCompactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"当前会话没有可压缩的历史。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"会话正在运行、存在未闭环工具调用或压缩快照发生冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"502":{"description":"摘要生成或压缩历史持久化失败。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/mind-review":{"post":{"tags":["Mind"],"summary":"Api Mind Review","description":"原子登记可恢复、可中断的结构化代码审查 Turn。","operationId":"api_mind_review","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindReviewRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindReviewResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"源会话不属于当前认证主体。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"命令幂等键、Turn 或 Session 发生确定性冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"Review 提交服务不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/mind-chat":{"post":{"tags":["Mind"],"summary":"Api Mind Chat","description":"发起对话并返回对应的流式事件结果。\n\n响应使用统一事件协议输出流式结果，并在发送\n`turn.completed` 后结束当前 SSE。","operationId":"api_mind_chat","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"同一会话已有其他活动轮次，或 turn_id 请求语义冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/session/delete":{"post":{"tags":["Mind"],"summary":"Api Session Delete","description":"删除客户端明确列出的会话集合，并返回持久完成回执。","operationId":"api_session_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDeletionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDeletionReceipt"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}},"description":"Unprocessable Entity"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Service Unavailable"}}},"get":{"tags":["Mind"],"summary":"Api Session Delete Status","description":"查询认证主体的删除结果，回执缺失不证明原请求未执行。","operationId":"api_session_delete_status","parameters":[{"name":"request_id","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":160,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDeletionReceipt"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Conflict"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}},"description":"Unprocessable Entity"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}},"description":"Service Unavailable"}}}},"/turn/status":{"get":{"tags":["Mind"],"summary":"Api Turn Status","description":"返回断线恢复和任务中心共用的权威轮次状态。","operationId":"api_turn_status","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"description":"会话 ID。","title":"Cid"},"description":"会话 ID。"},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"description":"流 ID。","title":"Sid"},"description":"流 ID。"},{"name":"turn_id","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$","description":"逻辑轮次 ID。","title":"Turn Id"},"description":"逻辑轮次 ID。"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnStatusResponse"}}}},"401":{"description":"缺少有效认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"调用方不拥有目标轮次。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标轮次不存在或已过期。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"轮次状态服务不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/turn/approval-snapshot":{"post":{"tags":["Mind"],"summary":"Api Turn Approval Snapshot","description":"对账并返回指定轮次的审批状态与事件水位。","operationId":"api_turn_approval_snapshot","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindApprovalSnapshotRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindApprovalSnapshotResponse"}}}},"401":{"description":"缺少有效认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"调用方不拥有目标轮次。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标轮次不存在或已过期。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"审批状态服务不可用或对账结果不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/mind-attach":{"post":{"tags":["Mind"],"summary":"Api Mind Attach","description":"重新接入已有轮次，补发 after_seq 之后的事件并继续监听。","operationId":"api_mind_attach","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindAttachRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response"},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/queue":{"post":{"tags":["Mind Queue"],"summary":"Api Queue Add","description":"在活动或空闲 Session 中添加显式持久队列项。","operationId":"api_queue_add","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Cid"}},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":96,"title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueMutationResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标 Session。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"Session 或 Queue item 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"命令与持久队列当前状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久队列服务暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}},"get":{"tags":["Mind Queue"],"summary":"Api Queue List","description":"返回指定 Session 的当前持久队列快照。","operationId":"api_queue_list","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Cid"}},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":96,"title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueSnapshotResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标 Session。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"Session 或 Queue item 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"命令与持久队列当前状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久队列服务暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/queue/{submission_id}":{"patch":{"tags":["Mind Queue"],"summary":"Api Queue Update","description":"更新尚未启动的持久队列执行快照。","operationId":"api_queue_update","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":160,"pattern":"^[A-Za-z0-9_-]+$","title":"Submission Id"}},{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Cid"}},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":96,"title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueMutationResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标 Session。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"Session 或 Queue item 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"命令与持久队列当前状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久队列服务暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}},"delete":{"tags":["Mind Queue"],"summary":"Api Queue Delete","description":"删除尚未启动的持久队列项。","operationId":"api_queue_delete","parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","minLength":8,"maxLength":160,"pattern":"^[A-Za-z0-9_-]+$","title":"Submission Id"}},{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Cid"}},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":96,"title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueDeleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueMutationResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标 Session。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"Session 或 Queue item 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"命令与持久队列当前状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久队列服务暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/queue/reorder":{"post":{"tags":["Mind Queue"],"summary":"Api Queue Reorder","description":"原子替换指定 Session 的完整 Queue 顺序。","operationId":"api_queue_reorder","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Cid"}},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":96,"title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueReorderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueReorderResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标 Session。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"Session 或 Queue item 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"命令与持久队列当前状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久队列服务暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/queue/start":{"post":{"tags":["Mind Queue"],"summary":"Api Queue Start","description":"仅在 Session idle 时原子把 Queue item 转换为 Turn。","operationId":"api_queue_start","parameters":[{"name":"cid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Cid"}},{"name":"sid","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":96,"title":"Sid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStartResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标 Session。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"Session 或 Queue item 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"命令与持久队列当前状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久队列服务暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/upload":{"post":{"tags":["Mind"],"summary":"Api Upload","description":"上传文件到对象存储。\n\n接口以流式方式写入对象存储，并返回对象键、文件信息和可访问的签名地址。","operationId":"api_upload","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_upload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/proxy-predict":{"get":{"tags":["Predict"],"summary":"Api Proxy Predict","description":"代理转发推理请求。\n\n接口会校验签名参数，并将客户端请求转发到后端 GPU 模型服务。","operationId":"api_proxy_predict","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/view-access":{"post":{"tags":["Mind"],"summary":"Api Session View Access","description":"签发指定会话的短期只读访问凭据。\n\n该接口用于在首条事件到达前生成页面、订阅和回放入口。","operationId":"api_session_view_access","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionViewAccessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionViewAccessResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"目标资源不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/template-meta":{"get":{"tags":["Resource"],"summary":"Api Template Meta","description":"返回模板资源的元信息列表。\n\n响应中通常包含模板名称、版本号和下载地址等信息。","operationId":"api_template_meta","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/toolkit-meta":{"get":{"tags":["Resource"],"summary":"Api Toolkit Meta","description":"返回工具资源的元信息列表。\n\n响应中通常包含工具名称、版本号和下载地址等信息。","operationId":"api_toolkit_meta","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}},{"name":"platform","in":"query","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/model-meta":{"get":{"tags":["Resource"],"summary":"Api Model Meta","description":"返回模型资源的元信息列表。\n\n响应中通常包含模型名称、版本号和下载地址等信息。","operationId":"api_model_meta","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/template-viewer":{"get":{"tags":["Resource"],"summary":"Api Template Viewer","description":"返回指定模板的纯文本内容。\n\n通过模板名获取模板原文，适用于 HTML、JSON 等纯文本模板查看或下载。","operationId":"api_template_viewer","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}},{"name":"page","in":"query","required":true,"schema":{"type":"string","title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/business-case":{"get":{"tags":["Resource"],"summary":"Api Business Case","description":"返回指定业务用例对应的指令集。\n\n根据 `case` 参数下发一组命令，用于客户端执行预设流程或场景配置。","operationId":"api_business_case","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}},{"name":"case","in":"query","required":true,"schema":{"type":"string","title":"Case"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mind-manifest":{"get":{"tags":["Mind"],"summary":"Api Mind Manifest","description":"返回运行时版本清单与安装包信息。\n\n响应中包含目标服务的版本、构建信息、发布时间、备注以及带签名的下载地址。","operationId":"api_mind_manifest","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","description":"应用标识，用于定位目标应用或宿主。","title":"A"},"description":"应用标识，用于定位目标应用或宿主。"},{"name":"t","in":"query","required":true,"schema":{"type":"integer","description":"请求时间戳，用于签名校验。","title":"T"},"description":"请求时间戳，用于签名校验。"},{"name":"n","in":"query","required":true,"schema":{"type":"string","description":"请求 nonce，用于防重放。","title":"N"},"description":"请求 nonce，用于防重放。"},{"name":"station","in":"query","required":true,"schema":{"enum":["win32","darwin"],"type":"string","description":"目标运行平台标识：win32 或 darwin。","title":"Station"},"description":"目标运行平台标识：win32 或 darwin。"},{"name":"arch","in":"query","required":true,"schema":{"type":"string","description":"目标系统架构标识，例如 x64 或 arm64。","title":"Arch"},"description":"目标系统架构标识，例如 x64 或 arm64。"},{"name":"service","in":"query","required":true,"schema":{"enum":["helix","cua"],"type":"string","description":"独立运行组件：helix 或 cua。","title":"Service"},"description":"独立运行组件：helix 或 cua。"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeManifestResponse"}}}},"401":{"description":"缺少或无法使用认证信息。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"403":{"description":"认证主体无权访问目标资源。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"404":{"description":"组件或平台安装包不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"409":{"description":"请求与当前持久状态冲突。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"422":{"description":"请求不符合协议。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindValidationErrorResponse"}}}},"503":{"description":"持久运行时暂时不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}},"500":{"description":"运行时版本清单无法读取。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindRuntimeErrorResponse"}}}}}}},"/sign":{"post":{"tags":["Signature"],"summary":"Api Sign","description":"生成授权签名结果。\n\n根据请求参数生成签名后的 License 数据，用于客户端激活、授权验证或续期。","operationId":"api_sign","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/speech-meta":{"get":{"tags":["Speech"],"summary":"Api Speech Meta","description":"返回语音合成能力的元信息。\n\n响应中通常包含可用的语音格式、音色能力、语调模型和语言设置。","operationId":"api_speech_meta","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string","title":"A"}},{"name":"t","in":"query","required":true,"schema":{"type":"integer","title":"T"}},{"name":"n","in":"query","required":true,"schema":{"type":"string","title":"N"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/speech-voice":{"post":{"tags":["Speech"],"summary":"Api Speech Voice","description":"执行语音合成并返回音频结果。\n\n提交待合成文本与目标参数后，返回可下载的音频文件地址或对应结果信息。","operationId":"api_speech_voice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentCapabilities":{"properties":{"file_upload":{"type":"boolean","title":"File Upload","description":"是否支持文件上传能力。","default":false},"screen_capture":{"type":"boolean","title":"Screen Capture","description":"是否支持截图或录屏能力。","default":false}},"type":"object","title":"AgentCapabilities","description":"订阅客户端能力声明。\n\n该模型用于：\n- `/agents/open` 注册客户端能力\n- `/agents/status` 与 `/agents/sessions` 回显能力摘要"},"AgentCloseRequest":{"properties":{"session_id":{"type":"string","maxLength":96,"minLength":6,"title":"Session Id","description":"待关闭的逻辑会话标识。"},"reason":{"type":"string","maxLength":128,"title":"Reason","description":"关闭原因。","default":"client_close"}},"type":"object","required":["session_id"],"title":"AgentCloseRequest","description":"关闭订阅会话请求。\n\n由管理侧通过 `/agents/close` 提交，\n用于要求服务端主动关闭指定会话。"},"AgentErrorDetail":{"properties":{"code":{"type":"string","title":"Code","description":"稳定错误码，供客户端分支处理。"},"message":{"type":"string","title":"Message","description":"面向调用方的错误说明。"},"extra":{"additionalProperties":true,"type":"object","title":"Extra","description":"可选补充上下文。"}},"type":"object","required":["code","message"],"title":"AgentErrorDetail","description":"Agents 路由统一错误细节。\n\n约定：\n- `code` 为稳定错误码，供客户端分支处理\n- `message` 为直接可读的错误说明\n- `extra` 为可选补充上下文，不要求固定结构"},"AgentErrorResponse":{"properties":{"error":{"type":"string","title":"Error","description":"错误总类。"},"details":{"$ref":"#/components/schemas/AgentErrorDetail","description":"结构化错误细节。"},"type":{"type":"string","title":"Type","description":"异常类型。"},"trace_id":{"type":"string","title":"Trace Id","description":"链路追踪 ID。"}},"type":"object","required":["error","details","type","trace_id"],"title":"AgentErrorResponse","description":"Agents 路由统一错误响应。\n\n该模型对应异常中间件最终返回的 JSON 结构，\n用于在 OpenAPI 中显式声明 agents 域的错误响应形态。"},"AgentInteractionApproval":{"properties":{"approval_id":{"type":"string","maxLength":128,"minLength":1,"title":"Approval Id"},"tool":{"type":"string","maxLength":256,"title":"Tool"},"kind":{"type":"string","maxLength":64,"title":"Kind"},"prompt":{"type":"string","maxLength":10000,"title":"Prompt"},"summary":{"type":"string","maxLength":10000,"title":"Summary"},"details":{"type":"string","maxLength":100000,"title":"Details"},"decisions":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Decisions"}},"additionalProperties":false,"type":"object","required":["approval_id","tool","kind","prompt","summary","details","decisions"],"title":"AgentInteractionApproval","description":"客户端当前审批的只读展示快照。"},"AgentOpenData":{"properties":{"session":{"$ref":"#/components/schemas/AgentSessionView","description":"创建后的会话视图。"},"ws_url":{"type":"string","title":"Ws Url","description":"WebSocket 连接地址。"},"ws_token":{"type":"string","title":"Ws Token","description":"短期 WebSocket 握手令牌。"},"resume_token":{"type":"string","title":"Resume Token","description":"断线恢复令牌。"},"credential":{"additionalProperties":true,"type":"object","title":"Credential","description":"面向订阅客户端保持稳定的长期 Mind 调用凭证信息。"},"web_url":{"type":"string","title":"Web Url","description":"当前部署的 Mind Web 地址。"},"heartbeat_interval_sec":{"type":"integer","title":"Heartbeat Interval Sec","description":"建议心跳间隔。"},"heartbeat_timeout_sec":{"type":"integer","title":"Heartbeat Timeout Sec","description":"心跳超时阈值。"},"resume_timeout_sec":{"type":"integer","title":"Resume Timeout Sec","description":"允许恢复的时间窗口。"},"server_time":{"type":"integer","title":"Server Time","description":"服务端当前时间，Unix 秒。"}},"type":"object","required":["session","ws_url","ws_token","resume_token","web_url","heartbeat_interval_sec","heartbeat_timeout_sec","resume_timeout_sec","server_time"],"title":"AgentOpenData","description":"`/agents/open` 的成功响应数据。\n\n除会话视图外，还包含建立 WS 长连接和断线恢复所需的令牌与时序配置。"},"AgentOpenRequest":{"properties":{"device_id":{"type":"string","maxLength":128,"minLength":3,"title":"Device Id","description":"设备唯一标识。"},"agent_id":{"type":"string","maxLength":64,"minLength":2,"title":"Agent Id","description":"订阅客户端或服务实例标识。"},"client_version":{"type":"string","maxLength":64,"minLength":1,"title":"Client Version","description":"客户端版本号。"},"platform":{"type":"string","maxLength":32,"minLength":2,"title":"Platform","description":"平台标识，例如 windows、darwin。"},"arch":{"type":"string","maxLength":32,"minLength":2,"title":"Arch","description":"架构标识，例如 x64、arm64。"},"hostname":{"type":"string","maxLength":128,"title":"Hostname","description":"主机名或设备名称。","default":""},"capabilities":{"$ref":"#/components/schemas/AgentCapabilities","description":"客户端声明的能力集合。"},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"附加元信息，例如 region、env、cluster。"}},"type":"object","required":["device_id","agent_id","client_version","platform","arch"],"title":"AgentOpenRequest","description":"创建订阅会话请求。\n\n由订阅客户端在 `/agents/open` 调用时提交，\n用于声明自身身份、运行环境和能力信息。"},"AgentOpenResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"接口是否成功。","default":true},"data":{"$ref":"#/components/schemas/AgentOpenData","description":"创建结果。"}},"type":"object","required":["data"],"title":"AgentOpenResponse","description":"创建订阅会话的标准成功响应包装。"},"AgentRequest":{"properties":{"llm_conf":{"$ref":"#/components/schemas/LLMConf","description":"模型配置结构，包含 primary 字段。"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context","description":"当前轮次使用的补充上下文，按顺序注入用户输入。"},"system_message":{"type":"string","maxLength":32000,"title":"System Message","description":"当前轮次使用的系统提示词扩展。","default":""},"attachments":{"anyOf":[{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array"},{"type":"null"}],"title":"Attachments","description":"可选的多模态输入附件列表，支持图片与文件。"},"streaming":{"type":"boolean","title":"Streaming","description":"是否开启流式输出（SSE/Streaming）。","default":false},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools","description":"可调用工具列表，默认用于传入客户端/执行端可实现的 MCP-like 工具定义：{name, description, inputSchema, meta}。meta.external=true 映射为 MCP 审批动作，meta.approval_kind 可显式声明六类规范审批动作之一。本地命令工具可选携带 justification 参数，仅用于 require_escalated 场景的用户可见审批理由。"},"hosted_tools":{"anyOf":[{"$ref":"#/components/schemas/HostedToolsConfig"},{"type":"null"}],"description":"可选的服务端 hosted tools 注入配置；不传则不注入 hosted tools，仅对支持 hosted tools 的运行链路生效。"},"skills":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentSkill"},"type":"array"},{"type":"null"}],"title":"Skills","description":"可选的技能声明列表，用于声明本次请求希望启用的能力集合。"},"tool_choice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Choice","description":"工具调用策略：'auto' 自动选择；'none' 禁用工具；'required' 要求模型至少发起一次工具调用。","default":"auto","examples":["auto","none","required"]},"sandbox_mode":{"type":"string","enum":["read-only","workspace-write","danger-full-access"],"title":"Sandbox Mode","description":"本次工具执行沙箱模式。","default":"workspace-write","examples":["workspace-write","danger-full-access"]},"approval_policy":{"anyOf":[{"type":"string","enum":["untrusted","on-request","never"]},{"$ref":"#/components/schemas/GranularApprovalPolicy"}],"title":"Approval Policy","description":"客户端工具审批同步策略；对象形式按动作类别启用审批流。该字段不构成执行授权，最终 allow 事实由客户端本地 ApprovalCore 提交。","default":"on-request","examples":["on-request",{"granular":{"mcp_elicitations":true,"request_permissions":true,"rules":true,"sandbox_approval":true,"skill_approval":false}}]},"approvals_reviewer":{"type":"string","enum":["user","auto_review"],"title":"Approvals Reviewer","description":"审批请求的评审方；auto_review 使服务端在 approval_required 前持久发送 approval_review started/completed 通知，但通知不授予执行权限。","default":"user","examples":["user","auto_review"]},"network_access":{"type":"string","enum":["restricted","enabled"],"title":"Network Access","description":"客户端本地执行环境的网络访问策略；服务端据此生成模型可见权限指令，最终执行仍由客户端本地策略裁决。","default":"restricted","examples":["restricted","enabled"]},"agent":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent","description":"可选的 Agent 运行参数，例如重试策略、步数上限、规划模式等。"},"exec_env":{"anyOf":[{"$ref":"#/components/schemas/ClientEnvironmentSnapshot"},{"type":"null"}],"description":"可选的客户端本地环境事实快照，包含快照身份、采集时间、平台、shell、工作区、运行时和工具能力；字段结构固定，不承载环境变量值、HTTP 配置或执行授权。"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"对话元信息；/mind-chat 必须携带稳定的 cid、sid，其它业务元信息可继续透传。"},"extras":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extras","description":"可选的协议扩展透传字段。"},"session_mode":{"type":"string","enum":["create","existing"],"title":"Session Mode","description":"冻结的会话意图；create 建立对话，existing 必须续用已存在的对话。"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id","description":"客户端生成的轮次标识；服务端会在本次对话事件中原样回显，并用于 steer/interrupt 请求精确匹配当前活动轮次；不参与鉴权或会话归属判断。","examples":["a1b2c3d4e5f6"]},"message":{"type":"string","title":"Message","description":"用户输入或目标描述；仅携带附件时可省略或传空字符串。","default":""}},"additionalProperties":false,"type":"object","required":["llm_conf","session_mode","turn_id"],"title":"AgentRequest","description":"通用 Agent 对话请求体，承载消息、附件与工具。"},"AgentResumeData":{"properties":{"resumable":{"type":"boolean","title":"Resumable","description":"当前是否允许恢复。"},"session_id":{"type":"string","title":"Session Id","description":"恢复后的逻辑会话标识。"},"next_seq":{"type":"integer","title":"Next Seq","description":"下一条可用序号。"},"replay_from_seq":{"type":"integer","title":"Replay From Seq","description":"补发起始序号。"},"replay_to_seq":{"type":"integer","title":"Replay To Seq","description":"补发结束序号。"},"ws_url":{"type":"string","title":"Ws Url","description":"WebSocket 连接地址。"},"ws_token":{"type":"string","title":"Ws Token","description":"短期 WebSocket 握手令牌。"},"resume_token":{"type":"string","title":"Resume Token","description":"断线恢复令牌。"},"credential":{"additionalProperties":true,"type":"object","title":"Credential","description":"面向订阅客户端保持稳定的长期 Mind 调用凭证信息。"},"web_url":{"type":"string","title":"Web Url","description":"当前部署的 Mind Web 地址。"}},"type":"object","required":["resumable","session_id","next_seq","replay_from_seq","replay_to_seq","ws_url","ws_token","resume_token","web_url"],"title":"AgentResumeData","description":"断线恢复结果。\n\n字段说明：\n- `resumable`：当前是否允许恢复\n- `next_seq`：服务端视角的下一条可用序号\n- `replay_from_seq` / `replay_to_seq`：建议补发窗口"},"AgentResumeRequest":{"properties":{"session_id":{"type":"string","maxLength":96,"minLength":6,"title":"Session Id","description":"逻辑会话标识。"},"resume_token":{"type":"string","minLength":16,"title":"Resume Token","description":"恢复令牌。"},"last_acked_seq":{"type":"integer","minimum":0.0,"title":"Last Acked Seq","description":"客户端最后确认的下发序号。","default":0}},"type":"object","required":["session_id","resume_token"],"title":"AgentResumeRequest","description":"断线恢复请求。\n\n由订阅客户端在 `/agents/resume` 调用时提交，\n用于校验恢复令牌并告知客户端最后确认的服务端消息序号。"},"AgentResumeResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"接口是否成功。","default":true},"data":{"$ref":"#/components/schemas/AgentResumeData","description":"恢复结果。"}},"type":"object","required":["data"],"title":"AgentResumeResponse","description":"断线恢复接口的标准成功响应包装。"},"AgentSessionListResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"接口是否成功。","default":true},"data":{"items":{"$ref":"#/components/schemas/AgentSessionView"},"type":"array","title":"Data","description":"会话列表。"}},"type":"object","title":"AgentSessionListResponse","description":"会话列表查询接口的标准成功响应包装。"},"AgentSessionView":{"properties":{"session_id":{"type":"string","title":"Session Id","description":"逻辑会话标识。"},"device_id":{"type":"string","title":"Device Id","description":"设备唯一标识。"},"agent_id":{"type":"string","title":"Agent Id","description":"订阅客户端标识。"},"client_version":{"type":"string","title":"Client Version","description":"客户端版本。"},"platform":{"type":"string","title":"Platform","description":"平台标识。"},"arch":{"type":"string","title":"Arch","description":"架构标识。"},"hostname":{"type":"string","title":"Hostname","description":"主机名或设备名称。","default":""},"connected":{"type":"boolean","title":"Connected","description":"当前是否已有活跃 WebSocket 连接。"},"online":{"type":"boolean","title":"Online","description":"当前是否视为在线。"},"created_at":{"type":"integer","title":"Created At","description":"会话创建时间，Unix 秒。"},"updated_at":{"type":"integer","title":"Updated At","description":"最近一次状态更新时间，Unix 秒。"},"session_epoch":{"type":"integer","minimum":0.0,"title":"Session Epoch","description":"连接生命周期 fencing epoch；每次新连接建立时递增。","default":0},"connected_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connected At","description":"最近一次连接建立时间。"},"last_seen_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Seen At","description":"最近一次收到任意 WS 消息时间。"},"last_ping_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Ping At","description":"最近一次服务端 ping 时间。"},"last_pong_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Pong At","description":"最近一次客户端 pong 时间。"},"disconnect_reason":{"type":"string","title":"Disconnect Reason","description":"最近一次断开原因。","default":""},"is_primary":{"type":"boolean","title":"Is Primary","description":"当前是否是该 agent_id 下的主会话。","default":false},"capabilities":{"$ref":"#/components/schemas/AgentCapabilities","description":"客户端能力声明。"},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"附加元信息。"},"current_tasks":{"type":"integer","title":"Current Tasks","description":"当前活跃任务数。","default":0}},"type":"object","required":["session_id","device_id","agent_id","client_version","platform","arch","connected","online","created_at","updated_at","capabilities"],"title":"AgentSessionView","description":"订阅会话视图。\n\n该模型用于：\n- `/agents/open` 返回会话摘要\n- `/agents/status` 查询单个会话\n- `/agents/sessions` 列出多个会话\n\n其中：\n- `connected` 表示当前进程内是否持有活跃 WS 句柄\n- `online` 表示当前是否被视为在线\n- `is_primary` 表示当前是否为该 `agent_id` 下的主会话\n- `session_epoch` 表示连接生命周期的 fencing 版本"},"AgentSkill":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"技能名称。"},"description":{"type":"string","title":"Description","description":"技能适用场景或用途说明。","default":""},"path":{"type":"string","title":"Path","description":"技能说明文件路径。","default":""},"scope":{"type":"string","title":"Scope","description":"技能作用域，例如 repo、user、global。","default":""}},"type":"object","required":["name"],"title":"AgentSkill","description":"Agent 请求中的技能声明。"},"AgentStatusResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"接口是否成功。","default":true},"data":{"$ref":"#/components/schemas/AgentSessionView","description":"会话状态。"}},"type":"object","required":["data"],"title":"AgentStatusResponse","description":"查询单个会话状态时使用的标准成功响应包装。"},"ApplyPatchApprovalAck":{"properties":{"kind":{"type":"string","const":"apply_patch","title":"Kind"},"request_id":{"type":"string","maxLength":160,"minLength":8,"title":"Request Id"},"decision":{"type":"string","enum":["accept","acceptForSession","decline","cancel"],"title":"Decision"},"tool_status":{"type":"string","enum":["approved","declined","cancelled"],"title":"Tool Status"},"turn_status":{"type":"string","enum":["active","interrupting"],"title":"Turn Status"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["kind","request_id","decision","tool_status","turn_status","additional_context"],"title":"ApplyPatchApprovalAck","description":"确认补丁动作的审批决定。"},"ApplyPatchApprovalEnvelope":{"properties":{"type":{"type":"string","const":"tool.approval_required","title":"Type"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"title":"Turn Id"},"kind":{"type":"string","const":"apply_patch","title":"Kind"},"started_at_ms":{"type":"integer","minimum":0.0,"title":"Started At Ms"},"available_decisions":{"items":{"type":"string","enum":["accept","acceptForSession","decline","cancel"]},"type":"array","minItems":1,"title":"Available Decisions"},"status":{"type":"string","enum":["pending","resolved","cancelled"],"title":"Status"},"environment_id":{"type":"string","minLength":1,"title":"Environment Id"},"cwd":{"type":"string","minLength":1,"title":"Cwd"},"cwd_raw":{"type":"string","minLength":1,"title":"Cwd Raw"},"patch":{"type":"string","minLength":1,"title":"Patch"},"files":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Files"},"reason":{"type":"string","title":"Reason"},"permissions_preapproved":{"type":"boolean","title":"Permissions Preapproved"},"ack":{"anyOf":[{"$ref":"#/components/schemas/ApplyPatchApprovalAck"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type","approval_id","call_id","turn_id","kind","started_at_ms","available_decisions","status","environment_id","cwd","cwd_raw","patch","files","reason","permissions_preapproved","ack"],"title":"ApplyPatchApprovalEnvelope","description":"描述需要审批的补丁应用动作。"},"ApplyPatchApprovalRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"kind":{"type":"string","const":"apply_patch","title":"Kind"},"decision":{"type":"string","enum":["accept","acceptForSession","decline","cancel"],"title":"Decision"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","call_id","approval_id","kind","decision"],"title":"ApplyPatchApprovalRequest","description":"提交补丁应用动作的审批决定。"},"Attachment":{"properties":{"kind":{"type":"string","enum":["image","file"],"title":"Kind","description":"附件类型：image 表示图片，file 表示通用文件（如 PDF、文本、日志等）。","examples":["image","file"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"图片或文件的可访问 URL（HTTP/HTTPS），用于直接引用远端资源；图片场景下优先推荐使用。","examples":["https://example.com/a.png"]},"data_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Url","description":"图片 data URL（base64），格式如 'data:image/png;base64,...'。适合本地截图或设备截图直接上传，但体积较大时不推荐使用。","examples":["data:image/png;base64,iVBORw0KGgoAAA..."]},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"已提取的文本正文。文本、代码、日志、JSON、CSV 等非图片附件应优先通过该字段作为模型上下文传入。","examples":["def hello():\n    return 'world'\n"]},"text_truncated":{"type":"boolean","title":"Text Truncated","description":"text 是否因大小限制被截断。","default":false},"text_encoding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Encoding","description":"text 的来源编码提示，例如 utf-8 或 utf-8-replace。","examples":["utf-8"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Size Bytes","description":"原始附件字节大小，用于提示模型和调用方判断文本是否完整。"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"对象存储中的原始文件 Key；用于下载、审计或后续解析，不代表模型一定能直接读取文件正文。"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"代码或文本语言提示，例如 python、json、markdown。","examples":["python"]},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename","description":"文件名；用于展示、下载和提示模型理解附件来源。","examples":["page_dump.xml","logcat.txt","report.pdf"]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type","description":"可选的 MIME 类型提示，例如 'application/pdf'、'text/plain'、'image/png'。","examples":["application/pdf","text/plain","image/png"]}},"type":"object","required":["kind"],"title":"Attachment","description":"统一的附件描述（支持图片与文件）。"},"Body_api_upload":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"待上传的文件内容。"},"agent_id":{"type":"string","title":"Agent Id","description":"上传来源的 agent 标识。"},"prefix":{"type":"string","title":"Prefix","description":"对象存储中的路径前缀。","default":"uploads"}},"type":"object","required":["file","agent_id"],"title":"Body_api_upload"},"CanonicalFileSystemPermissions-Input":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/FileSystemPermissionEntry-Input"},"type":"array","title":"Entries"},"glob_scan_max_depth":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Glob Scan Max Depth"}},"additionalProperties":false,"type":"object","title":"CanonicalFileSystemPermissions","description":"描述结构化文件系统权限集合。"},"CanonicalFileSystemPermissions-Output":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/FileSystemPermissionEntry-Output"},"type":"array","title":"Entries"},"glob_scan_max_depth":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Glob Scan Max Depth"}},"additionalProperties":false,"type":"object","title":"CanonicalFileSystemPermissions","description":"描述结构化文件系统权限集合。"},"ChatControlData":{"properties":{"status":{"type":"string","const":"submitted","title":"Status"},"request_id":{"type":"string","title":"Request Id"}},"type":"object","required":["status","request_id"],"title":"ChatControlData","description":"说明控制请求已送交客户端，执行结果由后续快照确认。"},"ChatControlRequest":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"call_id":{"type":"string","maxLength":96,"minLength":1,"title":"Call Id"},"action":{"type":"string","enum":["cancel","approval"],"title":"Action"},"approval_id":{"type":"string","maxLength":128,"title":"Approval Id","default":""},"decision":{"type":"string","maxLength":64,"title":"Decision","default":""}},"additionalProperties":false,"type":"object","required":["request_id","call_id","action"],"title":"ChatControlRequest","description":"向已绑定的客户端提交任务控制或审批决定。"},"ChatInputRequest":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"request_id":{"type":"string","format":"uuid","title":"Request Id"},"message":{"type":"string","maxLength":64000,"title":"Message","default":""},"attachment_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":8,"title":"Attachment Ids"},"turn_id":{"type":"string","maxLength":96,"minLength":1,"title":"Turn Id"}},"additionalProperties":false,"type":"object","required":["conversation_id","request_id","turn_id"],"title":"ChatInputRequest","description":"向明确的活动轮次提交文字或附件补充。"},"ChatInteractionData":{"properties":{"call_id":{"type":"string","title":"Call Id","default":""},"revision":{"type":"integer","title":"Revision","default":0},"approval":{"anyOf":[{"$ref":"#/components/schemas/AgentInteractionApproval"},{"type":"null"}]},"local_required":{"type":"boolean","title":"Local Required","default":false}},"type":"object","title":"ChatInteractionData","description":"描述当前任务可供用户处理的交互。"},"ChatMessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DispatchData"},"type":"array","title":"Items"},"next_before":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Before"},"revision":{"type":"integer","title":"Revision"},"replay_after_seq":{"type":"integer","title":"Replay After Seq"},"replay_until_seq":{"type":"integer","title":"Replay Until Seq"}},"type":"object","required":["items","next_before","revision","replay_after_seq","replay_until_seq"],"title":"ChatMessagePage","description":"提供有界消息页与对应的事件回放范围。"},"ChatMessageRequest":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"request_id":{"type":"string","format":"uuid","title":"Request Id"},"message":{"type":"string","maxLength":64000,"title":"Message","default":""},"attachment_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":8,"title":"Attachment Ids"}},"additionalProperties":false,"type":"object","required":["conversation_id","request_id"],"title":"ChatMessageRequest","description":"向指定对话提交一条可幂等重试的消息。"},"ChatUpdatePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DispatchData"},"type":"array","title":"Items"},"revision":{"type":"integer","title":"Revision"},"has_more":{"type":"boolean","title":"Has More"},"online":{"type":"boolean","title":"Online"},"interaction":{"$ref":"#/components/schemas/ChatInteractionData"}},"type":"object","required":["items","revision","has_more","online","interaction"],"title":"ChatUpdatePage","description":"按对话版本返回变更消息与最新交互状态。"},"ClientEnvironmentSnapshot":{"properties":{"snapshot_id":{"type":"string","maxLength":128,"minLength":9,"pattern":"^envsnap_[A-Za-z0-9_-]+$","title":"Snapshot Id","description":"客户端为本次环境采集生成的稳定快照标识。"},"source":{"type":"string","const":"client","title":"Source","description":"快照事实来源，固定为 client。"},"captured_at":{"type":"string","format":"date-time","title":"Captured At","description":"客户端采集快照的带时区时间。"},"environment_id":{"type":"string","maxLength":128,"minLength":1,"title":"Environment Id","description":"客户端执行环境标识。"},"cwd":{"type":"string","maxLength":2048,"minLength":1,"title":"Cwd","description":"客户端当前执行工作目录，与工作区根目录独立。"},"status":{"type":"string","enum":["available","starting","unavailable"],"title":"Status","description":"快照采集时执行环境的可用状态。"},"status_detail":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Status Detail","description":"starting 或 unavailable 状态的可观测原因。"},"shell":{"$ref":"#/components/schemas/EnvironmentShell","description":"客户端 shell 事实。"},"workspace":{"$ref":"#/components/schemas/EnvironmentWorkspace","description":"客户端工作区事实。"},"tools":{"additionalProperties":{"$ref":"#/components/schemas/EnvironmentCapability"},"type":"object","maxProperties":128,"title":"Tools","description":"客户端本地工具能力。"},"providers":{"additionalProperties":{"$ref":"#/components/schemas/EnvironmentProvider"},"type":"object","maxProperties":32,"title":"Providers","description":"客户端聚合的提供方能力。"},"extensions":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","maxProperties":64,"title":"Extensions","description":"不进入模型上下文的快照扩展事实。"}},"additionalProperties":false,"type":"object","required":["snapshot_id","source","captured_at","environment_id","cwd","status","shell","workspace"],"title":"ClientEnvironmentSnapshot","description":"表示一个 Turn 使用的完整客户端环境事实快照。"},"ClientReviewWorkspace":{"properties":{"revision":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Revision"},"patch":{"type":"string","maxLength":1500000,"title":"Patch","description":"可选的审查补丁证据；四种 target 均允许为空。","default":""},"files":{"items":{"$ref":"#/components/schemas/ReviewWorkspaceFile"},"type":"array","maxItems":256,"title":"Files","description":"可选的不可变文件证据；四种 target 均允许为空。"},"source":{"type":"string","const":"client","title":"Source"}},"additionalProperties":false,"type":"object","required":["revision","source"],"title":"ClientReviewWorkspace","description":"声明由客户端采集并随请求提交的工作区快照。"},"CommandApprovalAck":{"properties":{"kind":{"type":"string","const":"command","title":"Kind"},"request_id":{"type":"string","maxLength":160,"minLength":8,"title":"Request Id"},"decision":{"type":"string","enum":["accept","acceptForSession","acceptWithExecpolicyAmendment","decline","cancel"],"title":"Decision"},"tool_status":{"type":"string","enum":["approved","declined","cancelled"],"title":"Tool Status"},"turn_status":{"type":"string","enum":["active","interrupting"],"title":"Turn Status"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"execpolicy_amendment_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Execpolicy Amendment Id"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["kind","request_id","decision","tool_status","turn_status","additional_context"],"title":"CommandApprovalAck","description":"确认命令动作的审批决定。"},"CommandApprovalEnvelope":{"properties":{"type":{"type":"string","const":"tool.approval_required","title":"Type"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"title":"Turn Id"},"kind":{"type":"string","const":"command","title":"Kind"},"started_at_ms":{"type":"integer","minimum":0.0,"title":"Started At Ms"},"available_decisions":{"items":{"type":"string","enum":["accept","acceptForSession","acceptWithExecpolicyAmendment","decline","cancel"]},"type":"array","minItems":1,"title":"Available Decisions"},"status":{"type":"string","enum":["pending","resolved","cancelled"],"title":"Status"},"environment_id":{"type":"string","minLength":1,"title":"Environment Id"},"command":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Command"},"cwd":{"type":"string","minLength":1,"title":"Cwd"},"cwd_raw":{"type":"string","minLength":1,"title":"Cwd Raw"},"reason":{"type":"string","title":"Reason"},"tty":{"type":"boolean","title":"Tty"},"sandbox_permissions":{"type":"string","enum":["use_default","require_escalated","with_additional_permissions"],"title":"Sandbox Permissions"},"additional_permissions":{"anyOf":[{"$ref":"#/components/schemas/RequestPermissionProfile-Output"},{"type":"null"}]},"proposed_execpolicy_amendment":{"anyOf":[{"$ref":"#/components/schemas/ExecPolicyAmendment"},{"type":"null"}]},"parsed_cmd":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Parsed Cmd"},"ack":{"anyOf":[{"$ref":"#/components/schemas/CommandApprovalAck"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type","approval_id","call_id","turn_id","kind","started_at_ms","available_decisions","status","environment_id","command","cwd","cwd_raw","reason","tty","sandbox_permissions","additional_permissions","proposed_execpolicy_amendment","parsed_cmd","ack"],"title":"CommandApprovalEnvelope","description":"描述需要审批的命令执行动作。"},"CommandApprovalRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"kind":{"type":"string","const":"command","title":"Kind"},"decision":{"type":"string","enum":["accept","acceptForSession","acceptWithExecpolicyAmendment","decline","cancel"],"title":"Decision"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"execpolicy_amendment_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Execpolicy Amendment Id"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","call_id","approval_id","kind","decision"],"title":"CommandApprovalRequest","description":"提交命令执行动作的审批决定。"},"ContextUsageEvent":{"properties":{"proto":{"type":"string","const":"mind.chat","title":"Proto"},"type":{"type":"string","const":"context.usage.updated","title":"Type"},"cid":{"type":"string","minLength":1,"title":"Cid"},"sid":{"type":"string","minLength":1,"title":"Sid"},"turn_id":{"type":"string","title":"Turn Id"},"presentation_epoch":{"type":"integer","minimum":1.0,"title":"Presentation Epoch"},"event_seq":{"type":"integer","minimum":1.0,"title":"Event Seq"},"context_usage":{"$ref":"#/components/schemas/ContextUsageSnapshot"}},"additionalProperties":true,"type":"object","required":["proto","type","cid","sid","turn_id","presentation_epoch","event_seq","context_usage"],"title":"ContextUsageEvent","description":"保存可恢复的上下文用量事件及其权威序号。"},"ContextUsageSnapshot":{"properties":{"model_context_window":{"anyOf":[{"type":"integer","exclusiveMinimum":1.0},{"type":"null"}],"title":"Model Context Window"},"last_token_usage":{"anyOf":[{"$ref":"#/components/schemas/TokenUsage"},{"type":"null"}]},"total_token_usage":{"anyOf":[{"$ref":"#/components/schemas/SessionTokenUsage"},{"type":"null"}]},"usage_source":{"type":"string","enum":["provider","estimate","unknown"],"title":"Usage Source"},"model":{"type":"string","minLength":1,"title":"Model"},"route":{"type":"string","enum":["responses","chat_completions","messages"],"title":"Route"}},"additionalProperties":false,"type":"object","required":["model_context_window","last_token_usage","total_token_usage","usage_source","model","route"],"title":"ContextUsageSnapshot","description":"绑定同一次上下文提交的窗口、最近用量及来源。"},"ConversationCreateRequest":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"}},"additionalProperties":false,"type":"object","required":["conversation_id"],"title":"ConversationCreateRequest","description":"使用客户端生成的标识幂等创建对话。"},"ConversationData":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"title":{"type":"string","title":"Title"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["conversation_id","cid","sid","title","created_at","updated_at"],"title":"ConversationData","description":"描述持久对话的显示资料和远端会话身份。"},"ConversationDeletionData":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"status":{"type":"string","const":"deleted","title":"Status"}},"type":"object","required":["conversation_id","status"],"title":"ConversationDeletionData","description":"确认指定对话的服务端内容及缓存已完成删除。"},"ConversationDetail":{"properties":{"conversation":{"$ref":"#/components/schemas/ConversationData"},"page":{"$ref":"#/components/schemas/ChatMessagePage"},"vt":{"type":"string","title":"Vt"},"online":{"type":"boolean","title":"Online"}},"type":"object","required":["conversation","page","vt","online"],"title":"ConversationDetail","description":"提供对话消息、只读事件凭据和当前设备状态。"},"DispatchData":{"properties":{"request_id":{"type":"string","title":"Request Id"},"ordinal":{"type":"integer","title":"Ordinal"},"revision":{"type":"integer","title":"Revision"},"conversation_id":{"type":"string","title":"Conversation Id"},"call_id":{"type":"string","title":"Call Id"},"turn_id":{"type":"string","title":"Turn Id"},"message":{"type":"string","title":"Message"},"attachments":{"items":{"$ref":"#/components/schemas/WebAttachment"},"type":"array","title":"Attachments"},"inputs":{"items":{"$ref":"#/components/schemas/WebInputData"},"type":"array","title":"Inputs"},"approvals":{"items":{"$ref":"#/components/schemas/WebApproval"},"type":"array","title":"Approvals"},"delivery_status":{"type":"string","title":"Delivery Status"},"receipt_status":{"type":"string","title":"Receipt Status"},"runtime_status":{"type":"string","title":"Runtime Status","default":""},"settled":{"type":"boolean","title":"Settled"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["request_id","ordinal","revision","conversation_id","call_id","turn_id","message","delivery_status","receipt_status","settled","created_at"],"title":"DispatchData","description":"描述消息派发事实，终态以客户端和持久运行时为准。"},"DurableQueueItem":{"properties":{"queue_seq":{"type":"integer","minimum":1.0,"title":"Queue Seq"},"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"submission_id":{"type":"string","title":"Submission Id"},"client_message_id":{"type":"string","title":"Client Message Id"},"turn_id":{"type":"string","title":"Turn Id"},"position":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Position"},"status":{"type":"string","enum":["queued","started","deleted"],"title":"Status"},"input":{"$ref":"#/components/schemas/TurnInput"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"started_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Started At"},"deleted_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deleted At"}},"additionalProperties":false,"type":"object","required":["queue_seq","cid","sid","submission_id","client_message_id","turn_id","status","input","created_at","updated_at"],"title":"DurableQueueItem","description":"不包含执行凭据的持久队列项快照。"},"EnvironmentCapability":{"properties":{"available":{"type":"boolean","title":"Available","description":"客户端采集时该能力是否可用。"},"command":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Command","description":"调用该工具时使用的命令名。"},"executable":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Executable","description":"客户端发现的可执行文件路径。"},"path":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Path","description":"该能力对应的本地路径。"},"version":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Version","description":"客户端采集的版本文本。"},"source":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source","description":"能力事实的客户端采集来源。"}},"additionalProperties":false,"type":"object","required":["available"],"title":"EnvironmentCapability","description":"描述客户端声明的单项能力。"},"EnvironmentProvider":{"properties":{"tools":{"additionalProperties":{"$ref":"#/components/schemas/EnvironmentCapability"},"type":"object","maxProperties":128,"title":"Tools","description":"该提供方声明的工具能力。"},"extensions":{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"type":"object","maxProperties":64,"title":"Extensions","description":"不进入模型上下文的提供方扩展事实。"}},"additionalProperties":false,"type":"object","title":"EnvironmentProvider","description":"描述客户端聚合的单个能力提供方。"},"EnvironmentShell":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name","description":"本地 shell 名称。"},"syntax":{"type":"string","maxLength":128,"minLength":1,"title":"Syntax","description":"命令应遵循的 shell 语法。"},"executable":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Executable","description":"shell 可执行文件路径。"},"prefix":{"items":{"type":"string"},"type":"array","maxItems":16,"title":"Prefix","description":"执行单条命令时使用的 argv 前缀。"},"source":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source","description":"shell 事实的客户端采集来源。"}},"additionalProperties":false,"type":"object","required":["name","syntax"],"title":"EnvironmentShell","description":"描述客户端本地 shell 的调用语义。"},"EnvironmentWorkspace":{"properties":{"root":{"type":"string","maxLength":2048,"minLength":1,"title":"Root","description":"当前客户端工作区根目录。"},"allowed_roots":{"items":{"type":"string"},"type":"array","maxItems":64,"title":"Allowed Roots","description":"工作区之外的候选执行根目录事实。"},"source":{"type":"string","maxLength":128,"minLength":1,"title":"Source","description":"工作区事实的客户端采集来源。"}},"additionalProperties":false,"type":"object","required":["root","source"],"title":"EnvironmentWorkspace","description":"描述客户端当前工作区及其候选执行根目录。"},"ExecPolicyAmendment":{"properties":{"command":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Command"}},"additionalProperties":false,"type":"object","required":["command"],"title":"ExecPolicyAmendment","description":"描述允许加入执行策略的命令前缀。"},"FileSystemPermissionEntry-Input":{"properties":{"path":{"oneOf":[{"$ref":"#/components/schemas/LiteralFileSystemPath"},{"$ref":"#/components/schemas/GlobFileSystemPath"},{"$ref":"#/components/schemas/SpecialFileSystemPath"}],"title":"Path","discriminator":{"propertyName":"type","mapping":{"glob_pattern":"#/components/schemas/GlobFileSystemPath","path":"#/components/schemas/LiteralFileSystemPath","special":"#/components/schemas/SpecialFileSystemPath"}}},"access":{"type":"string","enum":["read","write","deny"],"title":"Access"},"missing_path_behavior":{"anyOf":[{"type":"string","const":"skip"},{"type":"null"}],"title":"Missing Path Behavior"}},"additionalProperties":false,"type":"object","required":["path","access"],"title":"FileSystemPermissionEntry","description":"描述单个文件系统目标的访问级别。"},"FileSystemPermissionEntry-Output":{"properties":{"path":{"oneOf":[{"$ref":"#/components/schemas/LiteralFileSystemPath"},{"$ref":"#/components/schemas/GlobFileSystemPath"},{"$ref":"#/components/schemas/SpecialFileSystemPath"}],"title":"Path","discriminator":{"propertyName":"type","mapping":{"glob_pattern":"#/components/schemas/GlobFileSystemPath","path":"#/components/schemas/LiteralFileSystemPath","special":"#/components/schemas/SpecialFileSystemPath"}}},"access":{"type":"string","enum":["read","write","deny"],"title":"Access"},"missing_path_behavior":{"anyOf":[{"type":"string","const":"skip"},{"type":"null"}],"title":"Missing Path Behavior"}},"additionalProperties":false,"type":"object","required":["path","access"],"title":"FileSystemPermissionEntry","description":"描述单个文件系统目标的访问级别。"},"FileSystemPermissions-Input":{"anyOf":[{"$ref":"#/components/schemas/CanonicalFileSystemPermissions-Input"},{"$ref":"#/components/schemas/SimplifiedFileSystemPermissions"}],"title":"FileSystemPermissions","description":"按原生序列化形状描述文件系统权限。"},"FileSystemPermissions-Output":{"anyOf":[{"$ref":"#/components/schemas/CanonicalFileSystemPermissions-Output"},{"$ref":"#/components/schemas/SimplifiedFileSystemPermissions"}],"title":"FileSystemPermissions","description":"按原生序列化形状描述文件系统权限。"},"GlobFileSystemPath":{"properties":{"type":{"type":"string","const":"glob_pattern","title":"Type"},"pattern":{"type":"string","minLength":1,"title":"Pattern"}},"additionalProperties":false,"type":"object","required":["type","pattern"],"title":"GlobFileSystemPath","description":"描述文件系统路径匹配模式。"},"GranularApprovalConfig":{"properties":{"sandbox_approval":{"type":"boolean","title":"Sandbox Approval"},"rules":{"type":"boolean","title":"Rules"},"skill_approval":{"type":"boolean","title":"Skill Approval","default":false},"request_permissions":{"type":"boolean","title":"Request Permissions","default":false},"mcp_elicitations":{"type":"boolean","title":"Mcp Elicitations"}},"additionalProperties":false,"type":"object","required":["sandbox_approval","rules","mcp_elicitations"],"title":"GranularApprovalConfig","description":"定义各类审批流程是否允许发起交互请求。"},"GranularApprovalPolicy":{"properties":{"granular":{"$ref":"#/components/schemas/GranularApprovalConfig"}},"additionalProperties":false,"type":"object","required":["granular"],"title":"GranularApprovalPolicy","description":"表示按动作类别配置的细粒度审批策略。"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealRequest":{"properties":{"llm_conf":{"$ref":"#/components/schemas/LLMConf","description":"模型配置结构，包含 primary 字段。"},"app_id":{"type":"string","title":"App Id","description":"应用标识，例如 Android 包名、Web 域名或业务系统代号。"},"page_id":{"type":"string","title":"Page Id","description":"页面标识，例如 Activity、URL、路由名或业务页面 ID。"},"platform":{"type":"string","title":"Platform","description":"目标运行平台，例如 android、web、ios。"},"locator":{"type":"string","title":"Locator","description":"用户输入的目标元素语义描述（自然语言/关键词），用于自愈检索与裁决。"},"page_dump":{"type":"string","title":"Page Dump","description":"页面结构快照，例如 Android XML 或 Web HTML。"},"screenshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot","description":"可选的页面截图（base64 编码），用于补充视觉上下文。"},"wm_size":{"$ref":"#/components/schemas/WmSize","description":"屏幕尺寸信息，包含宽高像素值。"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"可选的业务元信息，例如 cid、sid、request_id、session_id、标签或追踪字段。"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"补充上下文信息，例如 intent、测试 ID、入口参数等。"}},"type":"object","required":["llm_conf","app_id","page_id","platform","locator","page_dump","wm_size"],"title":"HealRequest","description":"元素自愈请求，提供页面上下文、目标描述与模型配置。"},"HostedToolsConfig":{"properties":{"enabled_groups":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Enabled Groups","description":"可选的 hosted tool 分组白名单；只有显式传入分组时才注入对应 hosted tool，未传或传空数组均表示不启用任何 hosted tool。","examples":[["perf_engine","sandbox_cloud"]]}},"type":"object","title":"HostedToolsConfig","description":"服务端 hosted tools 注入配置。"},"JsonValue":{},"LLMConf":{"properties":{"primary":{"$ref":"#/components/schemas/ModelAPI","description":"主模型配置，默认用于主链路请求；可按 route 选择 `responses`、`chat_completions` 或 `messages`。"}},"additionalProperties":false,"type":"object","required":["primary"],"title":"LLMConf","description":"LLM 路由配置，包含主模型定义。"},"LicenseRequest":{"properties":{"a":{"type":"string","title":"A","description":"应用标识，用于标记当前请求所属的应用、产品线或客户端实例。"},"t":{"type":"integer","title":"T","description":"请求时间戳（Unix 秒），用于签名校验与时效控制。"},"n":{"type":"string","title":"N","description":"节点或 Device/Client 标识，用于区分请求发起者。"},"code":{"type":"string","title":"Code","description":"授权码，用于生成 License 的密钥凭证。"},"castle":{"type":"string","title":"Castle","description":"环境标识，例如 prod、test、dev。"},"license_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Id","description":"续期场景下传入已有 License ID；首次生成时可不传。"}},"type":"object","required":["a","t","n","code","castle"],"title":"LicenseRequest","description":"授权请求参数，用于生成或续期 License。"},"LicenseResponse":{"properties":{"data":{"type":"string","title":"Data","description":"Base64 编码后的 License 数据载荷，内容通常为 JSON 序列化结果。"},"signature":{"type":"string","title":"Signature","description":"Base64 编码的数字签名，用于校验授权数据的完整性与合法性。"}},"type":"object","required":["data","signature"],"title":"LicenseResponse","description":"License 生成结果，包含载荷与签名。"},"LiteralFileSystemPath":{"properties":{"type":{"type":"string","const":"path","title":"Type"},"path":{"type":"string","minLength":1,"title":"Path"}},"additionalProperties":false,"type":"object","required":["type","path"],"title":"LiteralFileSystemPath","description":"描述明确的文件系统路径。"},"McpToolAnnotations":{"properties":{"destructive_hint":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Destructive Hint"},"open_world_hint":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Open World Hint"},"read_only_hint":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Read Only Hint"}},"additionalProperties":false,"type":"object","title":"McpToolAnnotations","description":"描述 MCP 工具调用的行为提示。"},"McpToolCallApprovalAck":{"properties":{"kind":{"type":"string","const":"mcp_tool_call","title":"Kind"},"request_id":{"type":"string","maxLength":160,"minLength":8,"title":"Request Id"},"decision":{"type":"string","enum":["accept","decline","cancel"],"title":"Decision"},"tool_status":{"type":"string","enum":["approved","declined","cancelled"],"title":"Tool Status"},"turn_status":{"type":"string","enum":["active","interrupting"],"title":"Turn Status"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"server":{"type":"string","maxLength":160,"minLength":1,"title":"Server"},"tool_name":{"type":"string","maxLength":160,"minLength":1,"title":"Tool Name"},"arguments":{"$ref":"#/components/schemas/JsonValue"},"mcp_request_id":{"type":"string","maxLength":160,"minLength":1,"title":"Mcp Request Id"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["kind","request_id","decision","tool_status","turn_status","additional_context","server","tool_name","arguments","mcp_request_id"],"title":"McpToolCallApprovalAck","description":"确认 MCP 工具调用及其请求关联信息。"},"McpToolCallApprovalEnvelope":{"properties":{"type":{"type":"string","const":"tool.approval_required","title":"Type"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"title":"Turn Id"},"kind":{"type":"string","const":"mcp_tool_call","title":"Kind"},"started_at_ms":{"type":"integer","minimum":0.0,"title":"Started At Ms"},"available_decisions":{"items":{"type":"string","enum":["accept","decline","cancel"]},"type":"array","minItems":1,"title":"Available Decisions"},"status":{"type":"string","enum":["pending","resolved","cancelled"],"title":"Status"},"server":{"type":"string","maxLength":160,"minLength":1,"title":"Server"},"tool_name":{"type":"string","maxLength":160,"minLength":1,"title":"Tool Name"},"arguments":{"$ref":"#/components/schemas/JsonValue"},"mcp_request_id":{"type":"string","maxLength":160,"minLength":1,"title":"Mcp Request Id"},"connector_id":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Connector Id"},"connector_name":{"anyOf":[{"type":"string","maxLength":240,"minLength":1},{"type":"null"}],"title":"Connector Name"},"connector_description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Connector Description"},"connected_account_email":{"anyOf":[{"type":"string","maxLength":320,"minLength":1},{"type":"null"}],"title":"Connected Account Email"},"tool_title":{"anyOf":[{"type":"string","maxLength":240,"minLength":1},{"type":"null"}],"title":"Tool Title"},"tool_description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Tool Description"},"annotations":{"anyOf":[{"$ref":"#/components/schemas/McpToolAnnotations"},{"type":"null"}]},"reason":{"type":"string","title":"Reason"},"ack":{"anyOf":[{"$ref":"#/components/schemas/McpToolCallApprovalAck"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type","approval_id","call_id","turn_id","kind","started_at_ms","available_decisions","status","server","tool_name","arguments","mcp_request_id","reason","ack"],"title":"McpToolCallApprovalEnvelope","description":"描述需要审批的 MCP 工具调用动作。"},"McpToolCallApprovalRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"kind":{"type":"string","const":"mcp_tool_call","title":"Kind"},"decision":{"type":"string","enum":["accept","decline","cancel"],"title":"Decision"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"server":{"type":"string","maxLength":160,"minLength":1,"title":"Server"},"tool_name":{"type":"string","maxLength":160,"minLength":1,"title":"Tool Name"},"arguments":{"$ref":"#/components/schemas/JsonValue"},"mcp_request_id":{"type":"string","maxLength":160,"minLength":1,"title":"Mcp Request Id"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","call_id","approval_id","kind","decision","server","tool_name","arguments","mcp_request_id"],"title":"McpToolCallApprovalRequest","description":"提交 MCP 工具调用动作的审批决定。"},"MindApprovalSnapshotData":{"properties":{"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid","description":"会话 ID。"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid","description":"流 ID。"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"title":"Turn Id","description":"逻辑轮次 ID。"},"turn_status":{"type":"string","enum":["queued","running","waiting_tool","waiting_approval","waiting_user","reconciliation_required","finalizing","completed","failed","interrupted","cancelled"],"title":"Turn Status","description":"轮次权威状态。"},"terminal":{"anyOf":[{"$ref":"#/components/schemas/TurnCompletedSnapshot"},{"type":"null"}],"description":"仅在轮次终态时返回、与 turn.completed 同构的快照。"},"last_event_seq":{"type":"integer","minimum":0.0,"title":"Last Event Seq","description":"快照读取时的权威事件序号；快照审批状态优先于不超过该序号的重放事件。"},"approvals":{"items":{"oneOf":[{"$ref":"#/components/schemas/CommandApprovalEnvelope"},{"$ref":"#/components/schemas/WriteStdinApprovalEnvelope"},{"$ref":"#/components/schemas/ApplyPatchApprovalEnvelope"},{"$ref":"#/components/schemas/NetworkAccessApprovalEnvelope"},{"$ref":"#/components/schemas/RequestPermissionsApprovalEnvelope"},{"$ref":"#/components/schemas/McpToolCallApprovalEnvelope"}],"discriminator":{"propertyName":"kind","mapping":{"apply_patch":"#/components/schemas/ApplyPatchApprovalEnvelope","command":"#/components/schemas/CommandApprovalEnvelope","mcp_tool_call":"#/components/schemas/McpToolCallApprovalEnvelope","network_access":"#/components/schemas/NetworkAccessApprovalEnvelope","request_permissions":"#/components/schemas/RequestPermissionsApprovalEnvelope","write_stdin":"#/components/schemas/WriteStdinApprovalEnvelope"}}},"type":"array","title":"Approvals","description":"当前轮次按创建顺序返回、与实时事件同构的权威审批信封。"}},"additionalProperties":false,"type":"object","required":["cid","sid","turn_id","turn_status","terminal","last_event_seq","approvals"],"title":"MindApprovalSnapshotData","description":"恢复连接所需的轮次水位和审批记录快照。"},"MindApprovalSnapshotRequest":{"properties":{"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid","description":"会话 ID。"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid","description":"流 ID。"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id","description":"逻辑轮次 ID。"}},"additionalProperties":false,"type":"object","required":["cid","sid","turn_id"],"title":"MindApprovalSnapshotRequest","description":"审批状态对账请求。"},"MindApprovalSnapshotResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"data":{"$ref":"#/components/schemas/MindApprovalSnapshotData"}},"additionalProperties":false,"type":"object","required":["data"],"title":"MindApprovalSnapshotResponse","description":"审批恢复快照接口的稳定成功响应。"},"MindAttachRequest":{"properties":{"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid","description":"会话 ID。"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid","description":"会话流 ID。"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id","description":"正在恢复的逻辑轮次 ID。"},"after_seq":{"type":"integer","minimum":0.0,"title":"After Seq","description":"客户端最后确认的持久事件序号。","default":0}},"additionalProperties":false,"type":"object","required":["cid","sid","turn_id"],"title":"MindAttachRequest","description":"重新挂载已有模型轮次的事件观察连接。"},"MindCompactRequest":{"properties":{"cid":{"type":"string","maxLength":64,"minLength":6,"title":"Cid","description":"会话 ID。"},"sid":{"type":"string","maxLength":96,"minLength":6,"title":"Sid","description":"流 ID。"},"llm_conf":{"$ref":"#/components/schemas/LLMConf","description":"用于生成 handoff summary 的模型配置。"},"strategy":{"type":"string","const":"memento","title":"Strategy","description":"压缩策略；当前仅支持 Memento handoff summary。","default":"memento"}},"additionalProperties":false,"type":"object","required":["cid","sid","llm_conf"],"title":"MindCompactRequest","description":"手动压缩当前对话历史的请求。"},"MindEffectReconcileRequest":{"properties":{"request_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9._:-]+$","title":"Request Id"},"effect_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Effect Id"},"resolution":{"type":"string","enum":["committed","failed","retry"],"title":"Resolution"},"result_payload":{"additionalProperties":true,"type":"object","title":"Result Payload"},"error":{"type":"string","maxLength":2000,"title":"Error","default":""},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"additionalProperties":false,"type":"object","required":["request_id","effect_id","resolution"],"title":"MindEffectReconcileRequest","description":"显式核对不确定持久效果的幂等请求。"},"MindEffectReconcileResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"status":{"type":"string","enum":["prepared","reconciled"],"title":"Status"},"effect":{"additionalProperties":true,"type":"object","title":"Effect"}},"type":"object","required":["status","effect"],"title":"MindEffectReconcileResponse","description":"不确定持久效果的核对响应。"},"MindForkData":{"properties":{"request_id":{"type":"string","title":"Request Id"},"source_cid":{"type":"string","title":"Source Cid"},"source_sid":{"type":"string","title":"Source Sid"},"before_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Turn Id"},"prompt_source":{"type":"string","enum":["none","server","client"],"title":"Prompt Source"},"prompt":{"anyOf":[{"$ref":"#/components/schemas/MindForkPrompt"},{"type":"null"}]},"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"copied_turns":{"type":"integer","minimum":0.0,"title":"Copied Turns","default":0},"copied_items":{"type":"integer","minimum":0.0,"title":"Copied Items"}},"type":"object","required":["request_id","source_cid","source_sid","prompt_source","cid","sid","copied_items"],"title":"MindForkData","description":"远端会话上下文分支结果。"},"MindForkPrompt":{"properties":{"message":{"type":"string","title":"Message","default":""},"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array","title":"Attachments"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context","description":"重提时按原顺序恢复的补充用户上下文。"},"extras":{"additionalProperties":true,"type":"object","title":"Extras"}},"additionalProperties":false,"type":"object","title":"MindForkPrompt","description":"客户端可直接用于重提被选轮次的原始用户输入。"},"MindForkRequest":{"properties":{"request_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9._:-]+$","title":"Request Id","description":"客户端生成的幂等请求标识。"},"cid":{"type":"string","maxLength":64,"minLength":6,"title":"Cid","description":"源会话 ID。"},"sid":{"type":"string","maxLength":96,"minLength":6,"title":"Sid","description":"源会话流 ID。"},"before_turn_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_:-]+$"},{"type":"null"}],"title":"Before Turn Id","description":"可选的分叉轮次；仅复制该轮次之前已经结束的上下文。"},"prompt_source":{"type":"string","enum":["none","server","client"],"title":"Prompt Source","description":"可编辑输入的来源；完整分支使用 none，bounded 分支由服务端恢复时使用 server，由客户端持有时使用 client。"},"target_cid":{"anyOf":[{"type":"string","maxLength":64,"minLength":6},{"type":"null"}],"title":"Target Cid","description":"可选的目标会话 ID；未提供时由服务端生成。"},"target_sid":{"anyOf":[{"type":"string","maxLength":96,"minLength":6},{"type":"null"}],"title":"Target Sid","description":"可选的目标会话流 ID；未提供时由服务端生成。"}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","prompt_source"],"title":"MindForkRequest","description":"远端会话上下文分支请求。"},"MindForkResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"data":{"$ref":"#/components/schemas/MindForkData"}},"type":"object","required":["data"],"title":"MindForkResponse","description":"远端会话上下文分支响应。"},"MindReplayData":{"properties":{"context_usage":{"anyOf":[{"$ref":"#/components/schemas/ContextUsageEvent"},{"type":"null"}],"description":"同一数据库快照中的最近上下文用量事件；历史裁剪后仍保留，不能作为回放游标。"},"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Events","description":"after_seq 之后按 event_seq 升序返回的持久事件。"},"next_seq":{"type":"integer","minimum":0.0,"title":"Next Seq","description":"本次响应中最后一条事件的 event_seq；无事件时等于请求的 after_seq。"},"first_seq":{"type":"integer","minimum":0.0,"title":"First Seq","description":"当前会话保留窗口中的首个 event_seq；0 表示尚未读取到窗口。","default":0},"cursor_floor":{"type":"integer","minimum":0.0,"title":"Cursor Floor","description":"客户端可提交的最小连续回放游标；更小游标会产生 retained_prefix gap。","default":0},"last_seq":{"type":"integer","minimum":0.0,"title":"Last Seq","description":"当前回放页中的最后一个 event_seq；无事件时为 0。","default":0},"has_more":{"type":"boolean","title":"Has More","description":"是否仍有事件页可按 next_seq 继续读取。","default":false},"gap":{"type":"string","enum":["none","retained_prefix","internal"],"title":"Gap","description":"事件缺口分类；retained_prefix 表示历史已裁剪，internal 表示权威序列损坏。","default":"none"},"expected_seq":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Expected Seq","description":"internal 缺口期望的下一个 event_seq。"},"observed_seq":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Observed Seq","description":"internal 缺口实际观察到的 event_seq。"}},"additionalProperties":false,"type":"object","required":["next_seq"],"title":"MindReplayData","description":"持久事件回放结果及其确认序号。"},"MindReplayResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"data":{"$ref":"#/components/schemas/MindReplayData"}},"additionalProperties":false,"type":"object","required":["data"],"title":"MindReplayResponse","description":"事件回放接口的稳定成功响应。"},"MindRequestValidationDetail":{"properties":{"code":{"type":"string","const":"request_validation","title":"Code","default":"request_validation"},"message":{"type":"string","title":"Message"},"retryable":{"type":"boolean","const":false,"title":"Retryable","default":false},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Errors"}},"type":"object","required":["message","errors"],"title":"MindRequestValidationDetail","description":"请求参数校验失败时返回的稳定错误详情。"},"MindReviewData":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","enum":["accepted","idempotent"],"title":"Status"},"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"turn_id":{"type":"string","title":"Turn Id"},"review_session":{"$ref":"#/components/schemas/MindReviewSession"},"delivery":{"type":"string","enum":["inline","detached"],"title":"Delivery"}},"additionalProperties":false,"type":"object","required":["request_id","status","cid","sid","turn_id","review_session","delivery"],"title":"MindReviewData","description":"Review 命令持久登记后的业务结果。"},"MindReviewRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"cid":{"type":"string","maxLength":64,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":96,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"target":{"oneOf":[{"$ref":"#/components/schemas/ReviewUncommittedTarget"},{"$ref":"#/components/schemas/ReviewBaseBranchTarget"},{"$ref":"#/components/schemas/ReviewCommitTarget"},{"$ref":"#/components/schemas/ReviewCustomTarget"}],"title":"Target","discriminator":{"propertyName":"type","mapping":{"base_branch":"#/components/schemas/ReviewBaseBranchTarget","commit":"#/components/schemas/ReviewCommitTarget","custom":"#/components/schemas/ReviewCustomTarget","uncommitted_changes":"#/components/schemas/ReviewUncommittedTarget"}}},"delivery":{"type":"string","enum":["inline","detached"],"title":"Delivery","default":"inline"},"workspace":{"oneOf":[{"$ref":"#/components/schemas/ClientReviewWorkspace"},{"$ref":"#/components/schemas/ServerReviewWorkspace"},{"$ref":"#/components/schemas/ReferenceReviewWorkspace"}],"title":"Workspace","discriminator":{"propertyName":"source","mapping":{"client":"#/components/schemas/ClientReviewWorkspace","reference":"#/components/schemas/ReferenceReviewWorkspace","server":"#/components/schemas/ServerReviewWorkspace"}}},"execution":{"$ref":"#/components/schemas/ReviewExecutionOptions"},"session_mode":{"type":"string","enum":["create","existing"],"title":"Session Mode"}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","target","workspace","execution","session_mode"],"title":"MindReviewRequest","description":"启动可靠代码审查 Turn 的严格请求。"},"MindReviewResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"data":{"$ref":"#/components/schemas/MindReviewData"}},"additionalProperties":false,"type":"object","required":["data"],"title":"MindReviewResponse","description":"Review 命令的稳定成功响应。"},"MindReviewSession":{"properties":{"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"}},"additionalProperties":false,"type":"object","required":["cid","sid"],"title":"MindReviewSession","description":"标识 Review 实际运行所在的会话。"},"MindRuntimeErrorDetail":{"properties":{"code":{"type":"string","maxLength":128,"minLength":1,"title":"Code"},"message":{"type":"string","title":"Message"},"requested_after_seq":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Requested After Seq"},"last_event_seq":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Last Event Seq"},"active_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Turn Id","description":"会话中当前占用资源的活动轮次 ID。"},"active_status":{"anyOf":[{"type":"string","enum":["queued","running","waiting_tool","waiting_approval","waiting_user","reconciliation_required","finalizing","completed","failed","interrupted","cancelled"]},{"type":"null"}],"title":"Active Status","description":"活动轮次的权威状态。"},"call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Id","description":"工具结果投递错误对应的业务调用标识。"},"tool_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Status","description":"工具结果投递错误对应的权威生命周期分类。"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Retryable","description":"保持 request_id 与载荷不变，稍后重试同一持久命令是否可能成功。"}},"type":"object","required":["code","message"],"title":"MindRuntimeErrorDetail","description":"Mind Runtime 业务错误的稳定详情。"},"MindRuntimeErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"details":{"$ref":"#/components/schemas/MindRuntimeErrorDetail"},"type":{"type":"string","title":"Type"},"trace_id":{"type":"string","title":"Trace Id"}},"type":"object","required":["error","details","type","trace_id"],"title":"MindRuntimeErrorResponse","description":"Mind Runtime 业务错误的全局响应信封。"},"MindValidationErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"details":{"$ref":"#/components/schemas/MindRequestValidationDetail"},"type":{"type":"string","title":"Type"},"trace_id":{"type":"string","title":"Trace Id"}},"type":"object","required":["error","details","type","trace_id"],"title":"MindValidationErrorResponse","description":"Mind Runtime 请求校验错误的全局响应信封。"},"ModelAPI":{"properties":{"provider":{"type":"string","title":"Provider","description":"模型提供方名称。`openai` 与 OpenAI-compatible provider 使用 OpenAI SDK；`anthropic` 使用 Anthropic 官方 SDK 和原生 Messages API。","default":""},"route":{"type":"string","enum":["","responses","chat_completions","messages"],"title":"Route","description":"调用路由。缺省或空字符串表示未指定，优先由服务端配置补齐，否则使用 provider 默认路由；`responses`、`chat_completions` 与 `messages` 都会映射到统一的内部 canonical contract；`responses` 更适合原生 Responses 能力链路，`chat_completions` 更适合兼容 OpenAI SDK 的 provider 或需要保留 Chat Completions 语义的场景；`messages` 用于 Anthropic 等原生 Messages API provider。","default":""},"model":{"type":"string","title":"Model","description":"模型名称，可由客户端传入，也可由服务端配置注入。服务端会进行最终完整性校验、白名单校验与模型名归一化：- OpenAI / Anthropic / Groq / Fireworks / DashScope / Qianfan / Volcengine Ark：直接传对应 provider 在所选 route 下支持的模型名。","default":"","examples":["gpt-4.1-mini","claude-opus-4-6","qwen3.5-flash","deepseek-v3.2"]},"apikey":{"type":"string","title":"Apikey","description":"API Key，可由客户端传入，也可由服务端配置注入，用于访问对应模型提供方的接口。","default":"","examples":["sk-***","sk-ant-***","bce-v3/***","volc-***"]},"base_url":{"type":"string","title":"Base Url","description":"自定义 API Base URL（可选）。为空时使用对应官方 SDK 的默认地址。Anthropic 原生 Messages provider 默认使用 `https://api.anthropic.com`；若使用 OpenAI-compatible 网关，必须确认其实现了所选 route；当前服务端仅接受：OpenAI（空 base_url 或官方 `/v1`）、Anthropic（空 base_url、官方地址或显式配置的 Messages 网关）、Groq（`https://api.groq.com/openai/v1`）、Fireworks（`https://api.fireworks.ai/inference/v1`）、DashScope（`https://dashscope.aliyuncs.com/compatible-mode/v1`）、Qianfan（`https://qianfan.baidubce.com/v2`）和 Volcengine Ark（`https://ark.<region>.volces.com/api/v3`）。","default":""},"reasoning_effort":{"type":"string","title":"Reasoning Effort","description":"模型内部推理强度配置；空字符串表示不显式传递，由 provider 或服务端默认策略决定。","default":""},"model_context_window":{"anyOf":[{"type":"integer","exclusiveMinimum":1.0},{"type":"null"}],"title":"Model Context Window","description":"模型上下文窗口 token 数；缺省时只使用服务端同 provider、model、base_url 的配置。"},"model_auto_compact_token_limit":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Model Auto Compact Token Limit","description":"当前模型输入触发自动压缩的 token 阈值；缺省使用服务端匹配模型的阈值，否则取窗口的 90% 与预留输出后的输入容量中的较小值。"}},"additionalProperties":false,"type":"object","title":"ModelAPI","description":"单个模型提供方配置，用于描述客户端直传的模型接入参数。"},"NetworkAccessApprovalAck":{"properties":{"kind":{"type":"string","const":"network_access","title":"Kind"},"request_id":{"type":"string","maxLength":160,"minLength":8,"title":"Request Id"},"decision":{"type":"string","enum":["accept","acceptForSession","applyNetworkPolicyAmendment","decline","cancel"],"title":"Decision"},"tool_status":{"type":"string","enum":["approved","declined","cancelled"],"title":"Tool Status"},"turn_status":{"type":"string","enum":["active","interrupting"],"title":"Turn Status"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"target":{"type":"string","minLength":1,"title":"Target"},"host":{"type":"string","maxLength":253,"minLength":1,"title":"Host"},"protocol":{"type":"string","enum":["http","https","socks5_tcp","socks5_udp"],"title":"Protocol"},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port"},"network_policy_amendment":{"anyOf":[{"$ref":"#/components/schemas/NetworkPolicyAmendment"},{"type":"null"}]},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["kind","request_id","decision","tool_status","turn_status","additional_context","target","host","protocol","port"],"title":"NetworkAccessApprovalAck","description":"确认网络访问动作及其可选策略修订。"},"NetworkAccessApprovalEnvelope":{"properties":{"type":{"type":"string","const":"tool.approval_required","title":"Type"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"title":"Turn Id"},"kind":{"type":"string","const":"network_access","title":"Kind"},"started_at_ms":{"type":"integer","minimum":0.0,"title":"Started At Ms"},"available_decisions":{"items":{"type":"string","enum":["accept","acceptForSession","applyNetworkPolicyAmendment","decline","cancel"]},"type":"array","minItems":1,"title":"Available Decisions"},"status":{"type":"string","enum":["pending","resolved","cancelled"],"title":"Status"},"environment_id":{"type":"string","minLength":1,"title":"Environment Id"},"target":{"type":"string","minLength":1,"title":"Target"},"host":{"type":"string","maxLength":253,"minLength":1,"title":"Host"},"protocol":{"type":"string","enum":["http","https","socks5_tcp","socks5_udp"],"title":"Protocol"},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port"},"command":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Command"},"cwd":{"type":"string","minLength":1,"title":"Cwd"},"cwd_raw":{"type":"string","minLength":1,"title":"Cwd Raw"},"reason":{"type":"string","title":"Reason"},"proposed_network_policy_amendment":{"anyOf":[{"$ref":"#/components/schemas/NetworkPolicyAmendment"},{"type":"null"}]},"ack":{"anyOf":[{"$ref":"#/components/schemas/NetworkAccessApprovalAck"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type","approval_id","call_id","turn_id","kind","started_at_ms","available_decisions","status","environment_id","target","host","protocol","port","command","cwd","cwd_raw","reason","proposed_network_policy_amendment","ack"],"title":"NetworkAccessApprovalEnvelope","description":"描述需要审批的网络访问动作。"},"NetworkAccessApprovalRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"kind":{"type":"string","const":"network_access","title":"Kind"},"decision":{"type":"string","enum":["accept","acceptForSession","applyNetworkPolicyAmendment","decline","cancel"],"title":"Decision"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"target":{"type":"string","minLength":1,"title":"Target"},"host":{"type":"string","maxLength":253,"minLength":1,"title":"Host"},"protocol":{"type":"string","enum":["http","https","socks5_tcp","socks5_udp"],"title":"Protocol"},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port"},"network_policy_amendment":{"anyOf":[{"$ref":"#/components/schemas/NetworkPolicyAmendment"},{"type":"null"}]},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","call_id","approval_id","kind","decision","target","host","protocol","port"],"title":"NetworkAccessApprovalRequest","description":"提交网络访问动作的审批决定。"},"NetworkPermissions":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"additionalProperties":false,"type":"object","title":"NetworkPermissions","description":"描述请求授予的网络访问能力。"},"NetworkPolicyAmendment":{"properties":{"host":{"type":"string","maxLength":253,"minLength":1,"title":"Host"},"action":{"type":"string","enum":["allow","deny"],"title":"Action"}},"additionalProperties":false,"type":"object","required":["host","action"],"title":"NetworkPolicyAmendment","description":"描述单个主机的网络策略修订。"},"OkResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"接口处理是否成功。","default":true},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data","description":"可选的数据载荷字段，具体结构由各业务接口自行定义。"}},"type":"object","title":"OkResponse","description":"通用成功响应包装。"},"ProjectRootsSpecialFileSystemPath":{"properties":{"kind":{"type":"string","const":"project_roots","title":"Kind"},"subpath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Subpath"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"ProjectRootsSpecialFileSystemPath","description":"描述项目根目录及其可选子路径。"},"QueueAddRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"submission_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Submission Id"},"client_message_id":{"type":"string","maxLength":128,"minLength":1,"title":"Client Message Id"},"request":{"$ref":"#/components/schemas/AgentRequest"}},"additionalProperties":false,"type":"object","required":["request_id","submission_id","client_message_id","request"],"title":"QueueAddRequest","description":"向指定 Session 的显式持久队列添加提交。"},"QueueDeleteRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"}},"additionalProperties":false,"type":"object","required":["request_id"],"title":"QueueDeleteRequest","description":"删除尚未启动的持久队列提交。"},"QueueMutationData":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","const":"accepted","title":"Status"},"queue_version":{"type":"integer","minimum":1.0,"title":"Queue Version"},"item":{"$ref":"#/components/schemas/DurableQueueItem"}},"additionalProperties":false,"type":"object","required":["request_id","status","queue_version","item"],"title":"QueueMutationData","description":"返回单个持久队列项变更事实。"},"QueueMutationResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"data":{"$ref":"#/components/schemas/QueueMutationData"}},"additionalProperties":false,"type":"object","required":["data"],"title":"QueueMutationResponse","description":"返回持久队列项变更结果。"},"QueueReorderData":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","const":"accepted","title":"Status"},"queue_version":{"type":"integer","minimum":1.0,"title":"Queue Version"},"submission_ids":{"items":{"type":"string"},"type":"array","title":"Submission Ids"}},"additionalProperties":false,"type":"object","required":["request_id","status","queue_version","submission_ids"],"title":"QueueReorderData","description":"返回持久队列顺序变更事实。"},"QueueReorderRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"submission_ids":{"items":{"type":"string"},"type":"array","maxItems":256,"minItems":1,"title":"Submission Ids"}},"additionalProperties":false,"type":"object","required":["request_id","submission_ids"],"title":"QueueReorderRequest","description":"提交持久队列的完整新顺序。"},"QueueReorderResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"data":{"$ref":"#/components/schemas/QueueReorderData"}},"additionalProperties":false,"type":"object","required":["data"],"title":"QueueReorderResponse","description":"返回持久队列顺序变更结果。"},"QueueSnapshotData":{"properties":{"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"queue_version":{"type":"integer","minimum":0.0,"title":"Queue Version"},"items":{"items":{"$ref":"#/components/schemas/DurableQueueItem"},"type":"array","title":"Items"}},"additionalProperties":false,"type":"object","required":["cid","sid","queue_version","items"],"title":"QueueSnapshotData","description":"描述某个 Session 的当前持久队列。"},"QueueSnapshotResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"data":{"$ref":"#/components/schemas/QueueSnapshotData"}},"additionalProperties":false,"type":"object","required":["data"],"title":"QueueSnapshotResponse","description":"返回持久队列快照。"},"QueueStartData":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","const":"started","title":"Status"},"queue_version":{"type":"integer","minimum":1.0,"title":"Queue Version"},"submission_id":{"type":"string","title":"Submission Id"},"turn_id":{"type":"string","title":"Turn Id"}},"additionalProperties":false,"type":"object","required":["request_id","status","queue_version","submission_id","turn_id"],"title":"QueueStartData","description":"返回 Queue item 到 Turn 的原子转换事实。"},"QueueStartRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"submission_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Submission Id"}},"additionalProperties":false,"type":"object","required":["request_id","submission_id"],"title":"QueueStartRequest","description":"从持久队列原子启动指定提交。"},"QueueStartResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"data":{"$ref":"#/components/schemas/QueueStartData"}},"additionalProperties":false,"type":"object","required":["data"],"title":"QueueStartResponse","description":"返回持久队列启动结果。"},"QueueUpdateRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"request":{"$ref":"#/components/schemas/AgentRequest"}},"additionalProperties":false,"type":"object","required":["request_id","request"],"title":"QueueUpdateRequest","description":"替换尚未启动的持久队列输入快照。"},"ReferenceReviewWorkspace":{"properties":{"revision":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Revision"},"patch":{"type":"string","maxLength":1500000,"title":"Patch","description":"可选的审查补丁证据；四种 target 均允许为空。","default":""},"files":{"items":{"$ref":"#/components/schemas/ReviewWorkspaceFile"},"type":"array","maxItems":256,"title":"Files","description":"可选的不可变文件证据；四种 target 均允许为空。"},"source":{"type":"string","const":"reference","title":"Source"},"reference_id":{"type":"string","maxLength":200,"minLength":8,"pattern":"^[A-Za-z0-9_.:-]+$","title":"Reference Id"},"signature":{"type":"string","maxLength":1024,"minLength":16,"title":"Signature"}},"additionalProperties":false,"type":"object","required":["revision","source","reference_id","signature"],"title":"ReferenceReviewWorkspace","description":"声明由签名引用标识绑定的外部不可变快照。"},"RequestPermissionProfile-Input":{"properties":{"network":{"anyOf":[{"$ref":"#/components/schemas/NetworkPermissions"},{"type":"null"}]},"file_system":{"anyOf":[{"$ref":"#/components/schemas/FileSystemPermissions-Input"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"RequestPermissionProfile","description":"描述一次权限申请的网络和文件系统能力。"},"RequestPermissionProfile-Output":{"properties":{"network":{"anyOf":[{"$ref":"#/components/schemas/NetworkPermissions"},{"type":"null"}]},"file_system":{"anyOf":[{"$ref":"#/components/schemas/FileSystemPermissions-Output"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"RequestPermissionProfile","description":"描述一次权限申请的网络和文件系统能力。"},"RequestPermissionsApprovalAck":{"properties":{"kind":{"type":"string","const":"request_permissions","title":"Kind"},"request_id":{"type":"string","maxLength":160,"minLength":8,"title":"Request Id"},"decision":{"type":"string","enum":["grantForTurn","grantForTurnWithStrictAutoReview","grantForSession","decline","cancel"],"title":"Decision"},"tool_status":{"type":"string","enum":["approved","declined","cancelled"],"title":"Tool Status"},"turn_status":{"type":"string","enum":["active","interrupting"],"title":"Turn Status"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"scope":{"anyOf":[{"type":"string","enum":["turn","session"]},{"type":"null"}],"title":"Scope"},"permissions":{"anyOf":[{"$ref":"#/components/schemas/RequestPermissionProfile-Output"},{"type":"null"}]},"strict_auto_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict Auto Review"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["kind","request_id","decision","tool_status","turn_status","additional_context"],"title":"RequestPermissionsApprovalAck","description":"确认权限申请及其授权范围。"},"RequestPermissionsApprovalEnvelope":{"properties":{"type":{"type":"string","const":"tool.approval_required","title":"Type"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"title":"Turn Id"},"kind":{"type":"string","const":"request_permissions","title":"Kind"},"started_at_ms":{"type":"integer","minimum":0.0,"title":"Started At Ms"},"available_decisions":{"items":{"type":"string","enum":["grantForTurn","grantForTurnWithStrictAutoReview","grantForSession","decline","cancel"]},"type":"array","minItems":1,"title":"Available Decisions"},"status":{"type":"string","enum":["pending","resolved","cancelled"],"title":"Status"},"environment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment Id"},"cwd":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Cwd"},"reason":{"type":"string","title":"Reason"},"permissions":{"$ref":"#/components/schemas/RequestPermissionProfile-Output"},"ack":{"anyOf":[{"$ref":"#/components/schemas/RequestPermissionsApprovalAck"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type","approval_id","call_id","turn_id","kind","started_at_ms","available_decisions","status","reason","permissions","ack"],"title":"RequestPermissionsApprovalEnvelope","description":"描述需要审批的权限申请动作。"},"RequestPermissionsApprovalRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"kind":{"type":"string","const":"request_permissions","title":"Kind"},"decision":{"type":"string","enum":["grantForTurn","grantForTurnWithStrictAutoReview","grantForSession","decline","cancel"],"title":"Decision"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"scope":{"anyOf":[{"type":"string","enum":["turn","session"]},{"type":"null"}],"title":"Scope"},"permissions":{"anyOf":[{"$ref":"#/components/schemas/RequestPermissionProfile-Input"},{"type":"null"}]},"strict_auto_review":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict Auto Review"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","call_id","approval_id","kind","decision"],"title":"RequestPermissionsApprovalRequest","description":"提交权限申请动作的审批决定。"},"ReviewBaseBranchTarget":{"properties":{"type":{"type":"string","const":"base_branch","title":"Type"},"branch":{"type":"string","maxLength":255,"minLength":1,"title":"Branch"},"merge_base_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merge Base Sha"}},"additionalProperties":false,"type":"object","required":["type","branch","merge_base_sha"],"title":"ReviewBaseBranchTarget","description":"声明以指定基础分支为比较基线。"},"ReviewClientTool":{"properties":{"name":{"type":"string","enum":["exec_command","write_stdin"],"title":"Name"},"description":{"type":"string","maxLength":4000,"minLength":1,"title":"Description"},"inputSchema":{"additionalProperties":true,"type":"object","title":"Inputschema"},"annotations":{"$ref":"#/components/schemas/ReviewToolAnnotations"}},"additionalProperties":false,"type":"object","required":["name","description","inputSchema","annotations"],"title":"ReviewClientTool","description":"定义 Review 只读沙箱中可调用的客户端命令工具。"},"ReviewCodeLocation":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path"},"line_range":{"$ref":"#/components/schemas/ReviewLineRange"}},"additionalProperties":false,"type":"object","required":["path","line_range"],"title":"ReviewCodeLocation","description":"审查发现对应的受信相对文件位置。"},"ReviewCommitTarget":{"properties":{"type":{"type":"string","const":"commit","title":"Type"},"sha":{"type":"string","title":"Sha"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title"}},"additionalProperties":false,"type":"object","required":["type","sha"],"title":"ReviewCommitTarget","description":"声明需要审查的不可变提交。"},"ReviewCustomTarget":{"properties":{"type":{"type":"string","const":"custom","title":"Type"},"instructions":{"type":"string","maxLength":20000,"minLength":1,"title":"Instructions"}},"additionalProperties":false,"type":"object","required":["type","instructions"],"title":"ReviewCustomTarget","description":"声明结构化自定义审查指令。"},"ReviewExecutionMetadata":{"properties":{"cid":{"type":"string","maxLength":64,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":96,"minLength":1,"title":"Sid"}},"additionalProperties":false,"type":"object","required":["cid","sid"],"title":"ReviewExecutionMetadata","description":"限定 Review execution 可携带的会话坐标。"},"ReviewExecutionOptions":{"properties":{"llm_conf":{"$ref":"#/components/schemas/LLMConf"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":0,"title":"Additional Context"},"system_message":{"type":"string","const":"","title":"System Message"},"attachments":{"type":"null","title":"Attachments"},"streaming":{"type":"boolean","const":false,"title":"Streaming"},"tools":{"items":{"$ref":"#/components/schemas/ReviewClientTool"},"type":"array","maxItems":64,"title":"Tools"},"hosted_tools":{"type":"null","title":"Hosted Tools"},"skills":{"type":"null","title":"Skills"},"sandbox_mode":{"type":"string","const":"read-only","title":"Sandbox Mode"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/ReviewExecutionMetadata"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["llm_conf","additional_context","system_message","attachments","streaming","tools","hosted_tools","skills","sandbox_mode","metadata"],"title":"ReviewExecutionOptions","description":"定义 Review 专用且不含普通 Agent 扩展字段的只读 wire 参数。"},"ReviewFinding":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":20000,"minLength":1,"title":"Body"},"confidence_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence Score"},"priority":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Priority"},"code_location":{"$ref":"#/components/schemas/ReviewCodeLocation"}},"additionalProperties":false,"type":"object","required":["title","body","confidence_score","priority","code_location"],"title":"ReviewFinding","description":"单条可定位、可排序的代码审查发现。"},"ReviewLineRange":{"properties":{"start":{"type":"integer","minimum":1.0,"title":"Start"},"end":{"type":"integer","minimum":1.0,"title":"End"}},"additionalProperties":false,"type":"object","required":["start","end"],"title":"ReviewLineRange","description":"审查发现对应的闭区间行号。"},"ReviewOutput":{"properties":{"findings":{"items":{"$ref":"#/components/schemas/ReviewFinding"},"type":"array","maxItems":200,"title":"Findings"},"overall_correctness":{"type":"string","enum":["correct","incorrect","unknown"],"title":"Overall Correctness"},"overall_explanation":{"type":"string","maxLength":50000,"minLength":1,"title":"Overall Explanation"},"overall_confidence_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Overall Confidence Score"}},"additionalProperties":false,"type":"object","required":["overall_correctness","overall_explanation","overall_confidence_score"],"title":"ReviewOutput","description":"Review Turn 的唯一结构化终态结果。"},"ReviewToolAnnotations":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":240,"minLength":1},{"type":"null"}],"title":"Title"},"readOnlyHint":{"type":"boolean","const":true,"title":"Readonlyhint"},"destructiveHint":{"anyOf":[{"type":"boolean","const":false},{"type":"null"}],"title":"Destructivehint"},"idempotentHint":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Idempotenthint"},"openWorldHint":{"anyOf":[{"type":"boolean","const":false},{"type":"null"}],"title":"Openworldhint"}},"additionalProperties":false,"type":"object","required":["readOnlyHint"],"title":"ReviewToolAnnotations","description":"声明命令工具在 Review 沙箱中的只读执行约束。"},"ReviewTurnSummary":{"properties":{"request_id":{"type":"string","title":"Request Id"},"source_cid":{"type":"string","title":"Source Cid"},"source_sid":{"type":"string","title":"Source Sid"},"delivery":{"type":"string","enum":["inline","detached"],"title":"Delivery"},"target":{"oneOf":[{"$ref":"#/components/schemas/ReviewUncommittedTarget"},{"$ref":"#/components/schemas/ReviewBaseBranchTarget"},{"$ref":"#/components/schemas/ReviewCommitTarget"},{"$ref":"#/components/schemas/ReviewCustomTarget"}],"title":"Target","discriminator":{"propertyName":"type","mapping":{"base_branch":"#/components/schemas/ReviewBaseBranchTarget","commit":"#/components/schemas/ReviewCommitTarget","custom":"#/components/schemas/ReviewCustomTarget","uncommitted_changes":"#/components/schemas/ReviewUncommittedTarget"}}},"workspace_revision":{"type":"string","title":"Workspace Revision"},"result":{"anyOf":[{"$ref":"#/components/schemas/ReviewOutput"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["request_id","source_cid","source_sid","delivery","target","workspace_revision"],"title":"ReviewTurnSummary","description":"权威 Turn 状态中的 Review 专属摘要。"},"ReviewUncommittedTarget":{"properties":{"type":{"type":"string","const":"uncommitted_changes","title":"Type"}},"additionalProperties":false,"type":"object","required":["type"],"title":"ReviewUncommittedTarget","description":"声明审查工作区中的未提交改动。"},"ReviewWorkspaceFile":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path"},"content":{"type":"string","maxLength":1000000,"title":"Content"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Sha256"}},"additionalProperties":false,"type":"object","required":["path","content","sha256"],"title":"ReviewWorkspaceFile","description":"审查快照中的单个不可变相对路径文件。"},"RuntimeEventEnvelope":{"allOf":[{"if":{"properties":{"type":{"enum":["text.delta","text.done","text.meta"]}},"required":["type"]},"then":{"properties":{"phase":{"anyOf":[{"type":"string","enum":["commentary","final_answer"]},{"type":"null"}]}}}},{"if":{"properties":{"type":{"const":"session.title.updated"}},"required":["type"]},"then":{"required":["title"]}},{"if":{"properties":{"type":{"const":"context.usage.updated"}},"required":["type"]},"then":{"properties":{"context_usage":{"type":"object"}},"required":["context_usage"]}},{"if":{"properties":{"type":{"const":"turn.retrying"}},"required":["type"]},"then":{"allOf":[{"if":{"properties":{"max_attempts":{"type":"null"}},"required":["max_attempts"]},"then":{"properties":{"error":{"properties":{"retry_kind":{"const":"connection"}},"required":["retry_kind"]}}}}],"properties":{"round":{"type":"integer","minimum":1.0},"attempt":{"type":"integer","minimum":2.0},"max_attempts":{"anyOf":[{"type":"integer","minimum":2.0},{"type":"null"}],"description":"有限上限必须覆盖 attempt；连接恢复使用显式 null。"},"retry_in_ms":{"type":"integer","minimum":0.0},"reason":{"type":"string","maxLength":128,"minLength":1,"pattern":"\\S"},"error_type":{"type":"string","maxLength":128,"minLength":1,"pattern":"\\S"},"error":{"properties":{"type":{"type":"string","maxLength":128,"minLength":1,"pattern":"\\S"},"source":{"type":"string","maxLength":128,"minLength":1,"pattern":"\\S"},"retryable":{"type":"boolean","const":true},"retry_kind":{"type":"string"}},"type":"object","required":["type","source","retryable"]}},"required":["round","attempt","max_attempts","retry_in_ms","reason","error_type","error"]}}],"properties":{"proto":{"type":"string","const":"mind.chat","title":"Proto","description":"固定的 Mind Runtime 事件协议标识。"},"type":{"type":"string","enum":["context.compaction.completed","context.compaction.failed","context.compaction.started","context.usage.updated","conversation.forked","error","heal.done","heal.failed","heal.result","heal.start","heal.step","lifecycle.display","mind.cancelled","mind.event","mind.forward","presentation.superseded","provider.effect.started","queue.changed","response.completed","response.created","response.failed","response.function_call_arguments.delta","response.function_call_output","response.in_progress","response.incomplete","response.output_item.added","response.output_text.delta","response.output_text.done","response.queued","response.reasoning.delta","response.retrying","response.web_search_call.in_progress","review.cancelled","review.completed","review.failed","review.reconciliation_required","review.started","session.title.updated","stream.gap","stream.overflow","test.event","text.delta","text.done","text.meta","text.reconcile_mismatch","tool.approval.unavailable","tool.approval_required","tool.approval_review.completed","tool.approval_review.started","tool.batch.emitted","tool.broker.deliver.matched","tool.broker.prepare.completed","tool.broker.prepare.exists","tool.broker.prepare.registered","tool.broker.wait.registered","tool.broker.wait.timeout","tool.builtin.call","tool.builtin.done","tool.call","tool.calls.done","tool.calls.start","tool.failed","tool.followup.decision","tool.hosted.dispatch","tool.image.link_fallback","tool.image.native","tool.invalid_function_call","tool.name.invalid","tool.output","tool.result.summary","tool.round.done","turn.completed","turn.id.mismatch","turn.input.accepted","turn.input.commit_after_cancel.failed","turn.reconciliation_required","turn.recovery.context_reused","turn.recovery.terminal_checkpoint","turn.recovery.tool_calls","turn.retrying","turn.started","turn.summary","turn.wait_state_failed"],"maxLength":128,"minLength":3,"title":"Type","description":"领域事件类型。"},"cid":{"type":"string","maxLength":64,"minLength":1,"title":"Cid","description":"会话 ID。"},"sid":{"type":"string","maxLength":96,"minLength":1,"title":"Sid","description":"流 ID。"},"turn_id":{"type":"string","maxLength":128,"title":"Turn Id","description":"事件所属轮次 ID；Session 级队列、手动压缩及其用量事件为空字符串。"},"presentation_epoch":{"type":"integer","minimum":1.0,"title":"Presentation Epoch","description":"Worker Attempt 对应的展示轮次。"},"item_id":{"anyOf":[{"type":"string","maxLength":256,"minLength":1},{"type":"null"}],"title":"Item Id","description":"可展示 Item 的稳定身份；仅 Item 事件携带。"},"item_kind":{"anyOf":[{"type":"string","enum":["context_compaction","message","text","reasoning","tool_call","tool_output","builtin_tool","approval","review","custom"]},{"type":"null"}],"title":"Item Kind","description":"Item 的领域类别。"},"item_status":{"anyOf":[{"type":"string","enum":["registered","in_progress","waiting_result","waiting_approval","result_received","completed","failed","cancelled","reconciliation_required"]},{"type":"null"}],"title":"Item Status","description":"该事件提交后对应的 Item 生命周期状态。"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase","description":"事件阶段；assistant text Item 只允许 commentary 或 final_answer，缺失或 null 表示上游未声明，客户端按 unknown 处理。"},"trigger":{"anyOf":[{"type":"string","enum":["automatic","manual"]},{"type":"null"}],"title":"Trigger","description":"上下文压缩触发来源。"},"reason":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Reason","description":"模型重试或上下文压缩的稳定原因。"},"error_type":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Error Type","description":"模型重试或压缩失败的稳定错误类别。"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Retryable","description":"压缩失败是否允许安全重试。"},"before_items":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Before Items"},"after_items":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"After Items"},"before_chars":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Before Chars"},"after_chars":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"After Chars"},"dropped_items":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Dropped Items"},"reduction_ratio":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Reduction Ratio"},"latency_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Latency Ms"},"replacement_version":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Replacement Version","description":"服务端持久化 replacement 的 Transcript 版本。"},"context_usage":{"anyOf":[{"$ref":"#/components/schemas/ContextUsageSnapshot"},{"type":"null"}],"description":"context.usage.updated 的不可变上下文快照。"},"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title","description":"会话标题更新事件携带的规范化展示标题。"}},"additionalProperties":true,"type":"object","required":["proto","type","cid","sid","turn_id","presentation_epoch"],"title":"RuntimeEventEnvelope","description":"持久领域事件共享的协议坐标与展示轮次信封。\n\nturn.retrying 的 attempt 在模型 round 内递增；有限重试的 max_attempts\n必须覆盖 attempt，连接恢复时 max_attempts 为 null 且 error.retry_kind 为 connection。\n流建立期限耗尽时 error.type 为 request_timeout，error.phase 为 open，\nerror.timeout_sec 和 error.http_attempt 分别表示建立期限秒数与 HTTP 尝试编号；\n此类错误的 error.retry_kind 为 stream，仅使用有限流重试预算。"},"RuntimeManifest":{"properties":{"host":{"type":"string","title":"Host"},"service":{"type":"string","enum":["helix","cua"],"title":"Service"},"channel":{"type":"string","const":"stable","title":"Channel"},"station":{"type":"string","enum":["win32","darwin"],"title":"Station"},"arch":{"type":"string","title":"Arch"},"version":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$","title":"Version"},"build":{"type":"string","title":"Build"},"published_at":{"type":"string","title":"Published At"},"notes":{"type":"string","title":"Notes"},"package":{"$ref":"#/components/schemas/RuntimePackage"}},"additionalProperties":false,"type":"object","required":["host","service","channel","station","arch","version","build","published_at","notes","package"],"title":"RuntimeManifest","description":"声明独立组件的当前稳定版本，平台与架构属于查询结果。"},"RuntimeManifestResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok"},"data":{"$ref":"#/components/schemas/RuntimeManifest"}},"additionalProperties":false,"type":"object","required":["ok","data"],"title":"RuntimeManifestResponse","description":"封装运行组件下载清单的成功响应。"},"RuntimePackage":{"properties":{"filename":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*\\.zip$","title":"Filename"},"size":{"type":"integer","exclusiveMinimum":0.0,"title":"Size"},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Hash"},"updated_at":{"type":"string","title":"Updated At"},"url":{"type":"string","title":"Url"}},"additionalProperties":false,"type":"object","required":["filename","size","hash","updated_at","url"],"title":"RuntimePackage","description":"声明签名下载包的文件身份和完整性要求。"},"ServerReviewWorkspace":{"properties":{"revision":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Revision"},"patch":{"type":"string","maxLength":1500000,"title":"Patch","description":"可选的审查补丁证据；四种 target 均允许为空。","default":""},"files":{"items":{"$ref":"#/components/schemas/ReviewWorkspaceFile"},"type":"array","maxItems":256,"title":"Files","description":"可选的不可变文件证据；四种 target 均允许为空。"},"source":{"type":"string","const":"server","title":"Source"},"workspace_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Workspace Id"}},"additionalProperties":false,"type":"object","required":["revision","source","workspace_id"],"title":"ServerReviewWorkspace","description":"声明由服务端受控标识绑定的工作区快照。"},"SessionDeletionReceipt":{"properties":{"cid":{"type":"string","maxLength":128,"pattern":"^cid_([0-9a-z]+)_[0-9a-f]{8}$","title":"Cid"},"sid":{"type":"string","maxLength":128,"pattern":"^sid_([0-9a-z]+)_[0-9a-z]+_[0-9a-f]{6}$","title":"Sid"},"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"status":{"type":"string","const":"deleted","title":"Status"},"targets":{"items":{"$ref":"#/components/schemas/SessionDeletionTarget"},"type":"array","maxItems":256,"minItems":1,"title":"Targets"}},"additionalProperties":false,"type":"object","required":["cid","sid","request_id","status","targets"],"title":"SessionDeletionReceipt","description":"证明指定集合已在数据库事务中删除；不包含对话内容。"},"SessionDeletionRequest":{"properties":{"cid":{"type":"string","maxLength":128,"pattern":"^cid_([0-9a-z]+)_[0-9a-f]{8}$","title":"Cid"},"sid":{"type":"string","maxLength":128,"pattern":"^sid_([0-9a-z]+)_[0-9a-z]+_[0-9a-f]{6}$","title":"Sid"},"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"descendants":{"items":{"$ref":"#/components/schemas/SessionDeletionTarget"},"type":"array","maxItems":255,"title":"Descendants"}},"additionalProperties":false,"type":"object","required":["cid","sid","request_id"],"title":"SessionDeletionRequest","description":"冻结客户端持有的根会话和子会话删除意图。"},"SessionDeletionTarget":{"properties":{"cid":{"type":"string","maxLength":128,"pattern":"^cid_([0-9a-z]+)_[0-9a-f]{8}$","title":"Cid"},"sid":{"type":"string","maxLength":128,"pattern":"^sid_([0-9a-z]+)_[0-9a-z]+_[0-9a-f]{6}$","title":"Sid"}},"additionalProperties":false,"type":"object","required":["cid","sid"],"title":"SessionDeletionTarget","description":"描述显式删除集合中的单个会话身份。"},"SessionTokenUsage":{"properties":{"total_tokens":{"type":"integer","minimum":0.0,"title":"Total Tokens"},"input_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Input Tokens"},"cached_input_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cached Input Tokens"},"cache_write_input_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cache Write Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Output Tokens"},"reasoning_output_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Reasoning Output Tokens"},"reported_calls":{"type":"integer","minimum":0.0,"title":"Reported Calls"},"unreported_calls":{"type":"integer","minimum":0.0,"title":"Unreported Calls"}},"additionalProperties":false,"type":"object","required":["total_tokens","input_tokens","cached_input_tokens","cache_write_input_tokens","output_tokens","reasoning_output_tokens","reported_calls","unreported_calls"],"title":"SessionTokenUsage","description":"保存本会话实际调用的累计实报、缺报数量及可用明细。"},"SessionViewAccessData":{"properties":{"view_url":{"type":"string","title":"View Url","description":"会话页面 URL；服务端打开时会自动注入 boot。"},"view_id":{"type":"string","title":"View Id","description":"服务端签发的查看会话 ID。"},"expires_at":{"type":"integer","title":"Expires At","description":"查看会话过期时间，Unix 秒。"},"vt":{"type":"string","title":"Vt","description":"对应 SSE 订阅使用的只读查看 token。"},"stream_url":{"type":"string","title":"Stream Url","description":"实时事件 SSE 地址。"},"replay_url":{"type":"string","title":"Replay Url","description":"历史事件回放地址。"}},"type":"object","required":["view_url","view_id","expires_at","vt","stream_url","replay_url"],"title":"SessionViewAccessData","description":"会话只读访问授权结果。"},"SessionViewAccessRequest":{"properties":{"cid":{"type":"string","maxLength":64,"minLength":6,"title":"Cid","description":"会话 ID。"},"sid":{"type":"string","maxLength":96,"minLength":6,"title":"Sid","description":"流 ID。"},"proto":{"type":"string","maxLength":64,"minLength":1,"title":"Proto","description":"发起方使用的上层协议标识。","default":"mind.batch"},"agent_id":{"type":"string","maxLength":64,"minLength":1,"title":"Agent Id","description":"发起查看会话的 agent 标识。","default":"mind"},"client_version":{"type":"string","maxLength":64,"title":"Client Version","description":"发起端版本号，用于审计。","default":""}},"additionalProperties":false,"type":"object","required":["cid","sid"],"title":"SessionViewAccessRequest","description":"创建一次会话只读访问授权。","examples":[{"agent_id":"mind","cid":"cid_tb0pol_897ae069","client_version":"1.0.0","proto":"mind.batch","sid":"sid_tb0pol_mm23tfa9_a07a67"}]},"SessionViewAccessResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"接口是否成功。","default":true},"data":{"$ref":"#/components/schemas/SessionViewAccessData","description":"查看会话数据。"}},"type":"object","required":["data"],"title":"SessionViewAccessResponse","description":"创建会话只读访问授权的标准响应。"},"SimpleSpecialFileSystemPath":{"properties":{"kind":{"type":"string","enum":["root","minimal","tmpdir","slash_tmp"],"title":"Kind"}},"additionalProperties":false,"type":"object","required":["kind"],"title":"SimpleSpecialFileSystemPath","description":"描述不携带附加参数的特殊路径。"},"SimplifiedFileSystemPermissions":{"properties":{"read":{"anyOf":[{"items":{"type":"string","minLength":1},"type":"array"},{"type":"null"}],"title":"Read"},"write":{"anyOf":[{"items":{"type":"string","minLength":1},"type":"array"},{"type":"null"}],"title":"Write"}},"additionalProperties":false,"type":"object","title":"SimplifiedFileSystemPermissions","description":"描述原生协议输出的简化读写路径集合。"},"SpecialFileSystemPath":{"properties":{"type":{"type":"string","const":"special","title":"Type"},"value":{"oneOf":[{"$ref":"#/components/schemas/SimpleSpecialFileSystemPath"},{"$ref":"#/components/schemas/ProjectRootsSpecialFileSystemPath"},{"$ref":"#/components/schemas/UnknownSpecialFileSystemPath"}],"title":"Value","discriminator":{"propertyName":"kind","mapping":{"minimal":"#/components/schemas/SimpleSpecialFileSystemPath","project_roots":"#/components/schemas/ProjectRootsSpecialFileSystemPath","root":"#/components/schemas/SimpleSpecialFileSystemPath","slash_tmp":"#/components/schemas/SimpleSpecialFileSystemPath","tmpdir":"#/components/schemas/SimpleSpecialFileSystemPath","unknown":"#/components/schemas/UnknownSpecialFileSystemPath"}}}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"SpecialFileSystemPath","description":"描述运行环境定义的特殊文件系统路径。"},"SpeechRequest":{"properties":{"a":{"type":"string","title":"A","description":"应用标识签名字段，用于标记请求来源并参与鉴权。"},"t":{"type":"integer","title":"T","description":"请求时间戳（秒级 Unix 时间），用于签名校验与时效控制。"},"n":{"type":"string","title":"N","description":"随机 nonce，用于防止重放或重复提交。"},"speak":{"type":"string","title":"Speak","description":"待合成的文本内容，服务端会将其转换为音频。"},"voice":{"type":"string","title":"Voice","description":"音色或发音人名称，用于指定语音合成所使用的声音模型。","default":"zh-CN-XiaoxiaoNeural"},"waver":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Waver","description":"输出音频格式，例如 mp3、wav 等。","default":"mp3"},"rater":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rater","description":"语速调节参数，例如 +20%、-10%。","default":"0%"},"pitch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pitch","description":"音调调节参数，例如 +5%、-5%。","default":"0%"},"volume":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volume","description":"输出音量参数，例如 default、+0dB、-6dB。","default":"default"},"manner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manner","description":"可选的情感或说话风格，例如 cheerful、sad、calm。"},"degree":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degree","description":"风格强度或情感程度参数，例如 1.0、2.0。"}},"type":"object","required":["a","t","n","speak"],"title":"SpeechRequest","description":"语音合成请求参数。"},"SpeechResponse":{"properties":{"url":{"type":"string","title":"Url","description":"语音音频文件的签名下载地址，用于客户端直接访问音频资源。","examples":["https://cdn.xxx.com/audio/20250101/voice_xxx.wav?token=abc123"]}},"type":"object","required":["url"],"title":"SpeechResponse","description":"语音合成结果，返回可访问的音频地址。"},"StreamEventIn":{"properties":{"cid":{"type":"string","maxLength":64,"minLength":6,"title":"Cid","description":"会话关联 ID。","examples":["cid_tb0pol_897ae069"]},"sid":{"type":"string","maxLength":96,"minLength":6,"title":"Sid","description":"子会话或流 ID。","examples":["sid_tb0pol_mm23tfa9_a07a67"]},"event":{"$ref":"#/components/schemas/RuntimeEventEnvelope","description":"标准领域事件载荷。","examples":[{"cid":"cid_tb0pol_897ae069","item_id":"cid:sid:p1:a1:r1:s1","item_kind":"text","item_status":"in_progress","presentation_epoch":1,"proto":"mind.chat","segment_id":"cid:sid:p1:a1:r1:s1","sid":"sid_tb0pol_mm23tfa9_a07a67","text":"hello","turn_id":"turn_01HXYZABC","type":"text.delta"}]}},"additionalProperties":false,"type":"object","required":["cid","sid","event"],"title":"StreamEventIn","description":"标准领域事件写入请求，用于主 events 流落库与广播。"},"TokenUsage":{"properties":{"total_tokens":{"type":"integer","minimum":0.0,"title":"Total Tokens"}},"additionalProperties":false,"type":"object","required":["total_tokens"],"title":"TokenUsage","description":"保存包含缓存输入及推理输出的总 token 数。"},"ToolApprovalRequest":{"oneOf":[{"$ref":"#/components/schemas/CommandApprovalRequest"},{"$ref":"#/components/schemas/WriteStdinApprovalRequest"},{"$ref":"#/components/schemas/ApplyPatchApprovalRequest"},{"$ref":"#/components/schemas/NetworkAccessApprovalRequest"},{"$ref":"#/components/schemas/RequestPermissionsApprovalRequest"},{"$ref":"#/components/schemas/McpToolCallApprovalRequest"}],"title":"ToolApprovalRequest","description":"按动作种类判别的审批决定请求。","discriminator":{"propertyName":"kind","mapping":{"apply_patch":"#/components/schemas/ApplyPatchApprovalRequest","command":"#/components/schemas/CommandApprovalRequest","mcp_tool_call":"#/components/schemas/McpToolCallApprovalRequest","network_access":"#/components/schemas/NetworkAccessApprovalRequest","request_permissions":"#/components/schemas/RequestPermissionsApprovalRequest","write_stdin":"#/components/schemas/WriteStdinApprovalRequest"}}},"ToolApprovalResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok"},"request_id":{"type":"string","maxLength":160,"minLength":8,"title":"Request Id"},"approval":{"oneOf":[{"$ref":"#/components/schemas/CommandApprovalEnvelope"},{"$ref":"#/components/schemas/WriteStdinApprovalEnvelope"},{"$ref":"#/components/schemas/ApplyPatchApprovalEnvelope"},{"$ref":"#/components/schemas/NetworkAccessApprovalEnvelope"},{"$ref":"#/components/schemas/RequestPermissionsApprovalEnvelope"},{"$ref":"#/components/schemas/McpToolCallApprovalEnvelope"}],"title":"Approval","discriminator":{"propertyName":"kind","mapping":{"apply_patch":"#/components/schemas/ApplyPatchApprovalEnvelope","command":"#/components/schemas/CommandApprovalEnvelope","mcp_tool_call":"#/components/schemas/McpToolCallApprovalEnvelope","network_access":"#/components/schemas/NetworkAccessApprovalEnvelope","request_permissions":"#/components/schemas/RequestPermissionsApprovalEnvelope","write_stdin":"#/components/schemas/WriteStdinApprovalEnvelope"}}}},"additionalProperties":false,"type":"object","required":["ok","request_id","approval"],"title":"ToolApprovalResponse","description":"返回包含当前权威审批信封的决定确认。"},"ToolResultDeliveryData":{"properties":{"status":{"type":"string","enum":["matched","already_received"],"title":"Status","description":"首次写入返回 matched；同内容幂等重放返回 already_received。"},"delivered":{"type":"boolean","const":true,"title":"Delivered","description":"结果已存在于持久工具调用记录中。"},"already_received":{"type":"boolean","title":"Already Received","description":"该工具调用是否在本次请求前已经收到相同结果。"},"request_id":{"type":"string","title":"Request Id","description":"已接受的工具结果命令幂等键。"}},"type":"object","required":["status","delivered","already_received","request_id"],"title":"ToolResultDeliveryData","description":"持久工具结果命令已被接受后的投递状态。"},"ToolResultEnvelope":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"工具结果信封中的执行结论。"},"tool":{"type":"string","maxLength":128,"minLength":1,"title":"Tool","description":"工具名称。"},"source":{"type":"string","maxLength":64,"minLength":1,"title":"Source","description":"工具结果来源。"},"args":{"additionalProperties":true,"type":"object","title":"Args","description":"工具执行时使用的参数。"},"text":{"type":"string","title":"Text","description":"适合展示和模型消费的结果摘要。"},"attachments":{"items":{},"type":"array","title":"Attachments","description":"工具产生的附件。"},"data":{"additionalProperties":true,"type":"object","title":"Data","description":"工具业务结果；状态、输出、会话和路径等字段均位于此对象。不得包含 pending_cloud_sandbox、sandbox_requests 或 cloud_schema。"}},"additionalProperties":false,"type":"object","required":["ok","tool","source","args","text","attachments","data"],"title":"ToolResultEnvelope","description":"客户端工具的标准结果信封；具体业务字段只允许出现在 data。"},"ToolResultRenewData":{"properties":{"status":{"type":"string","const":"renewed","title":"Status"},"request_id":{"type":"string","title":"Request Id"},"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"turn_id":{"type":"string","title":"Turn Id"},"call_id":{"type":"string","title":"Call Id"},"name":{"type":"string","title":"Name"},"execution_deadline_at":{"type":"string","format":"date-time","title":"Execution Deadline At"}},"type":"object","required":["status","request_id","cid","sid","turn_id","call_id","name","execution_deadline_at"],"title":"ToolResultRenewData","description":"描述一次成功的托管工具执行预算续期。"},"ToolResultRenewRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id","description":"本次续期命令的传输幂等键。"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":160,"minLength":1,"title":"Turn Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"extension_seconds":{"type":"integer","maximum":60.0,"minimum":1.0,"title":"Extension Seconds","description":"本次续期秒数，不得超过服务端单次续期上限。","default":60}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","call_id","name"],"title":"ToolResultRenewRequest","description":"请求延长仍在执行中的托管工具预算。"},"ToolResultRenewResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"data":{"$ref":"#/components/schemas/ToolResultRenewData"}},"type":"object","required":["data"],"title":"ToolResultRenewResponse","description":"pending 工具调用续期响应。"},"ToolResultRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id","description":"本次工具结果投递的幂等键。"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid","description":"会话标识。","examples":["c_01HXYZ...","conversation_123"]},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid","description":"流式会话标识。","examples":["s_01HXYZ...","stream_abc"]},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id","description":"工具调用唯一标识。","examples":["call_00_QmwFPq7m1bAeGagSlCuEXnt1"]},"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name","description":"工具名称。","examples":["tap","swipe","input"]},"ok":{"type":"boolean","title":"Ok","description":"工具执行是否成功。","examples":[true,false]},"result":{"$ref":"#/components/schemas/ToolResultEnvelope","description":"标准工具结果信封；工具业务字段必须放在 result.data。紧凑 UTF-8 JSON 总计最多 16 MiB，除内联图片数据外最多 2 MiB，每张内联图片解码后最多 8 MiB。","examples":[{"args":{"command":"echo ready"},"attachments":[],"data":{"command":"echo ready","exit_code":0,"stderr":"","stdout":"ready\n"},"ok":true,"source":"client","text":"ready","tool":"shell_command"}]},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context","description":"工具生命周期 Hook 生成的补充上下文；独立于 result 回灌模型。"}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","call_id","name","ok","result"],"title":"ToolResultRequest","description":"工具执行结果回传请求。"},"ToolResultResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"data":{"$ref":"#/components/schemas/ToolResultDeliveryData"}},"type":"object","required":["data"],"title":"ToolResultResponse","description":"工具结果命令的稳定成功响应。"},"ToolResultStatusData":{"properties":{"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"call_id":{"type":"string","title":"Call Id"},"turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turn Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tool_status":{"type":"string","enum":["waiting_result","result_received","execution_timed_out","cancelled","missing","not_ready","turn_closed"],"title":"Tool Status"},"completion_mode":{"type":"string","enum":["interactive","execution"],"title":"Completion Mode","default":"interactive"},"turn_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turn Status"},"result_received":{"type":"boolean","title":"Result Received"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"execution_deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Execution Deadline At"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"effect_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effect Id"},"effect_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effect Status"},"reconciliation_required":{"type":"boolean","title":"Reconciliation Required","default":false}},"type":"object","required":["cid","sid","call_id","tool_status","result_received"],"title":"ToolResultStatusData","description":"描述工具调用及其所属轮次的权威持久状态。"},"ToolResultStatusResponse":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"data":{"$ref":"#/components/schemas/ToolResultStatusData"}},"type":"object","required":["data"],"title":"ToolResultStatusResponse","description":"工具调用权威状态查询响应。"},"TurnCompletedSnapshot":{"properties":{"type":{"type":"string","const":"turn.completed","title":"Type"},"turn_id":{"type":"string","maxLength":128,"minLength":1,"title":"Turn Id"},"status":{"type":"string","enum":["completed","failed","interrupted","cancelled"],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"last_event_seq":{"type":"integer","minimum":1.0,"title":"Last Event Seq"},"completed_at":{"type":"number","exclusiveMinimum":0.0,"title":"Completed At"},"duration_ms":{"type":"integer","minimum":0.0,"title":"Duration Ms"}},"additionalProperties":false,"type":"object","required":["type","turn_id","status","error","last_event_seq","completed_at","duration_ms"],"title":"TurnCompletedSnapshot","description":"与 `turn.completed` 同构的权威轮次终态快照。"},"TurnControlResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","enum":["accepted","turn_not_active","turn_not_steerable","turn_mismatch","duplicate"],"title":"Status"},"turn_id":{"type":"string","title":"Turn Id"},"client_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Message Id"}},"type":"object","required":["request_id","status","turn_id"],"title":"TurnControlResponse","description":"轮次控制请求的明确处理结果。"},"TurnExecutionOwnerSnapshot":{"properties":{"worker_id":{"type":"string","minLength":1,"title":"Worker Id"},"lease_token":{"type":"integer","minimum":1.0,"title":"Lease Token"},"lease_expires_at":{"type":"number","exclusiveMinimum":0.0,"title":"Lease Expires At"}},"additionalProperties":false,"type":"object","required":["worker_id","lease_token","lease_expires_at"],"title":"TurnExecutionOwnerSnapshot","description":"描述活动轮次当前持有者的 fencing 租约。"},"TurnInput":{"properties":{"text":{"type":"string","maxLength":200000,"title":"Text","default":""},"attachments":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array","title":"Attachments"},"extras":{"additionalProperties":true,"type":"object","title":"Extras"}},"type":"object","title":"TurnInput","description":"当前活动轮次的引导输入项。"},"TurnInputRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id","description":"本次控制命令的幂等键；同一会话内不得跨轮次或命令复用。"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"client_message_id":{"type":"string","maxLength":128,"minLength":1,"title":"Client Message Id"},"input":{"$ref":"#/components/schemas/TurnInput"}},"additionalProperties":false,"type":"object","required":["request_id","turn_id","client_message_id","input"],"title":"TurnInputRequest","description":"活动逻辑轮次的输入控制请求。"},"TurnInterruptRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id","description":"本次控制命令的幂等键；同一会话内不得跨轮次或命令复用。"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"}},"additionalProperties":false,"type":"object","required":["request_id","turn_id"],"title":"TurnInterruptRequest","description":"活动逻辑轮次的中断请求。"},"TurnReconcileRequest":{"properties":{"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"client_message_ids":{"items":{"type":"string"},"type":"array","maxItems":256,"minItems":1,"title":"Client Message Ids"}},"additionalProperties":false,"type":"object","required":["turn_id","client_message_ids"],"title":"TurnReconcileRequest","description":"逻辑轮次输入提交事实的对账请求。"},"TurnReconcileResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"turn_id":{"type":"string","title":"Turn Id"},"turn_exists":{"type":"boolean","title":"Turn Exists"},"terminal":{"anyOf":[{"$ref":"#/components/schemas/TurnCompletedSnapshot"},{"type":"null"}]},"committed_ids":{"items":{"type":"string"},"type":"array","title":"Committed Ids"},"pending_ids":{"items":{"type":"string"},"type":"array","title":"Pending Ids"},"retry_ids":{"items":{"type":"string"},"type":"array","title":"Retry Ids"},"unknown_ids":{"items":{"type":"string"},"type":"array","title":"Unknown Ids"}},"type":"object","required":["turn_id","turn_exists","terminal"],"title":"TurnReconcileResponse","description":"逻辑轮次输入提交事实的权威对账结果。"},"TurnStatusResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"cid":{"type":"string","title":"Cid"},"sid":{"type":"string","title":"Sid"},"turn_id":{"type":"string","title":"Turn Id"},"run_id":{"type":"string","title":"Run Id","default":""},"status":{"type":"string","enum":["queued","running","waiting_tool","waiting_approval","waiting_user","reconciliation_required","finalizing","completed","failed","interrupted","cancelled"],"title":"Status"},"terminal":{"anyOf":[{"$ref":"#/components/schemas/TurnCompletedSnapshot"},{"type":"null"}]},"owner":{"anyOf":[{"$ref":"#/components/schemas/TurnExecutionOwnerSnapshot"},{"type":"null"}]},"attempt":{"type":"integer","minimum":1.0,"title":"Attempt"},"version":{"type":"integer","minimum":1.0,"title":"Version"},"last_event_seq":{"type":"integer","minimum":0.0,"title":"Last Event Seq"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"turn_kind":{"type":"string","enum":["chat","review"],"title":"Turn Kind"},"review":{"anyOf":[{"$ref":"#/components/schemas/ReviewTurnSummary"},{"type":"null"}]}},"type":"object","required":["cid","sid","turn_id","status","terminal","attempt","version","last_event_seq","created_at","updated_at","turn_kind"],"title":"TurnStatusResponse","description":"持久化逻辑轮次的权威运行状态。"},"UnknownSpecialFileSystemPath":{"properties":{"kind":{"type":"string","const":"unknown","title":"Kind"},"path":{"type":"string","minLength":1,"title":"Path"},"subpath":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Subpath"}},"additionalProperties":false,"type":"object","required":["kind","path"],"title":"UnknownSpecialFileSystemPath","description":"描述可透传的未知特殊路径标识。"},"UploadResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"执行本次上传的 agent 唯一标识。","examples":["agent_12345"]},"key":{"type":"string","title":"Key","description":"对象在存储桶中的 Key。","examples":["uploads/2026/02/04/9f2c0c3d1a2b4c5d8e7f6a.png"]},"url":{"type":"string","title":"Url","description":"上传后可访问的 URL。","examples":["https://r2.example.com/uploads/2026/02/04/9f2c0c3d1a2b4c5d8e7f6a.png?X-Amz-Signature=..."]},"filename":{"type":"string","title":"Filename","description":"对外展示/下载使用的文件名。","examples":["report.png"]},"mime_type":{"type":"string","title":"Mime Type","description":"文件的 MIME 类型。","examples":["image/png"]},"size_bytes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Size Bytes","description":"原始上传文件大小。"},"attachment":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attachment","description":"可直接透传到 AgentRequest.attachments 的附件结构。"}},"type":"object","required":["agent_id","key","url","filename","mime_type"],"title":"UploadResponse","description":"文件上传完成后的标准响应。"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebApproval":{"properties":{"approval_id":{"type":"string","maxLength":128,"minLength":1,"title":"Approval Id"},"tool":{"type":"string","maxLength":256,"title":"Tool"},"kind":{"type":"string","maxLength":64,"title":"Kind"},"prompt":{"type":"string","maxLength":10000,"title":"Prompt"},"summary":{"type":"string","maxLength":10000,"title":"Summary"},"details":{"type":"string","maxLength":100000,"title":"Details"},"decisions":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Decisions"},"status":{"type":"string","enum":["pending","resolved","expired"],"title":"Status"},"decision":{"type":"string","title":"Decision","default":""},"source":{"type":"string","title":"Source","default":""},"resolved_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Resolved At"}},"additionalProperties":false,"type":"object","required":["approval_id","tool","kind","prompt","summary","details","decisions","status"],"title":"WebApproval","description":"保留客户端确认的审批快照及最终处理结果。"},"WebAttachment":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"kind":{"type":"string","enum":["image","file"],"title":"Kind"},"filename":{"type":"string","title":"Filename"},"mime_type":{"type":"string","title":"Mime Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"url":{"type":"string","title":"Url"},"text_truncated":{"type":"boolean","title":"Text Truncated","default":false}},"type":"object","required":["upload_id","kind","filename","mime_type","size_bytes","url"],"title":"WebAttachment","description":"提供浏览器可展示的附件资料和受保护访问地址。"},"WebInputData":{"properties":{"request_id":{"type":"string","title":"Request Id"},"turn_id":{"type":"string","title":"Turn Id"},"input_seq":{"type":"integer","title":"Input Seq"},"after_event_seq":{"type":"integer","title":"After Event Seq"},"message":{"type":"string","title":"Message"},"attachments":{"items":{"$ref":"#/components/schemas/WebAttachment"},"type":"array","title":"Attachments"},"status":{"type":"string","enum":["pending","inflight","committed","retry"],"title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["request_id","turn_id","input_seq","after_event_seq","message","attachments","status","created_at"],"title":"WebInputData","description":"提供已持久化补充的内容、顺序及实际接入状态。"},"WebLoginRequest":{"properties":{"api_key":{"type":"string","maxLength":512,"minLength":20,"format":"password","title":"Api Key","writeOnly":true}},"additionalProperties":false,"type":"object","required":["api_key"],"title":"WebLoginRequest","description":"提交设备绑定凭据以建立浏览器会话。"},"WebSessionData":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"device_id":{"type":"string","title":"Device Id"},"online":{"type":"boolean","title":"Online"},"csrf_token":{"type":"string","title":"Csrf Token"},"expires_at":{"type":"integer","title":"Expires At"}},"type":"object","required":["agent_id","device_id","online","csrf_token","expires_at"],"title":"WebSessionData","description":"描述浏览器会话可访问的设备和防跨站令牌。"},"WmSize":{"properties":{"w":{"type":"integer","exclusiveMinimum":0.0,"title":"W","description":"屏幕宽度，单位为像素（px）。"},"h":{"type":"integer","exclusiveMinimum":0.0,"title":"H","description":"屏幕高度，单位为像素（px）。"}},"type":"object","required":["w","h"],"title":"WmSize","description":"屏幕尺寸信息。"},"WriteStdinApprovalAck":{"properties":{"kind":{"type":"string","const":"write_stdin","title":"Kind"},"request_id":{"type":"string","maxLength":160,"minLength":8,"title":"Request Id"},"decision":{"type":"string","enum":["accept","acceptForSession","decline","cancel"],"title":"Decision"},"tool_status":{"type":"string","enum":["approved","declined","cancelled"],"title":"Tool Status"},"turn_status":{"type":"string","enum":["active","interrupting"],"title":"Turn Status"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["kind","request_id","decision","tool_status","turn_status","additional_context"],"title":"WriteStdinApprovalAck","description":"确认标准输入动作的审批决定。"},"WriteStdinApprovalEnvelope":{"properties":{"type":{"type":"string","const":"tool.approval_required","title":"Type"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"title":"Turn Id"},"kind":{"type":"string","const":"write_stdin","title":"Kind"},"started_at_ms":{"type":"integer","minimum":0.0,"title":"Started At Ms"},"available_decisions":{"items":{"type":"string","enum":["accept","acceptForSession","decline","cancel"]},"type":"array","minItems":1,"title":"Available Decisions"},"status":{"type":"string","enum":["pending","resolved","cancelled"],"title":"Status"},"session_id":{"type":"string","maxLength":160,"minLength":1,"title":"Session Id"},"input":{"type":"string","title":"Input"},"control":{"type":"string","enum":["none","interrupt","terminate"],"title":"Control"},"reason":{"type":"string","title":"Reason"},"ack":{"anyOf":[{"$ref":"#/components/schemas/WriteStdinApprovalAck"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type","approval_id","call_id","turn_id","kind","started_at_ms","available_decisions","status","session_id","input","control","reason","ack"],"title":"WriteStdinApprovalEnvelope","description":"描述需要审批的标准输入写入动作。"},"WriteStdinApprovalRequest":{"properties":{"request_id":{"type":"string","maxLength":160,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Request Id"},"cid":{"type":"string","maxLength":128,"minLength":1,"title":"Cid"},"sid":{"type":"string","maxLength":128,"minLength":1,"title":"Sid"},"turn_id":{"type":"string","maxLength":128,"minLength":8,"pattern":"^[A-Za-z0-9_-]+$","title":"Turn Id"},"call_id":{"type":"string","maxLength":160,"minLength":1,"title":"Call Id"},"approval_id":{"type":"string","maxLength":160,"minLength":1,"title":"Approval Id"},"kind":{"type":"string","const":"write_stdin","title":"Kind"},"decision":{"type":"string","enum":["accept","acceptForSession","decline","cancel"],"title":"Decision"},"additional_context":{"items":{"type":"string"},"type":"array","maxItems":32,"title":"Additional Context"},"reason":{"type":"string","maxLength":1000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","required":["request_id","cid","sid","turn_id","call_id","approval_id","kind","decision"],"title":"WriteStdinApprovalRequest","description":"提交标准输入动作的审批决定。"}}}}