{"openapi":"3.1.0","info":{"title":"网站自动化资料 API","version":"1.0.0","description":"私有网站资料API V1。Bearer使用高强度不透明API密钥，服务端只保存摘要；不使用JWT。写操作需Idempotency-Key；更新需If-Match。大文件上限2GiB，8MiB分块。MySQL 8.x正式运行，SQLite仅用于隔离测试。"},"servers":[{"url":"https://api.yunce.online"}],"paths":{"/v1/sites":{"get":{"operationId":"listSites","summary":"列出授权站点","description":"权限 site:read。","x-required-permission":"site:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SitePage"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"createSite","summary":"创建隔离站点","description":"权限 site:admin。","x-required-permission":"site:admin","security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInput"}}}}}},"/v1/sites/{site_id}/files":{"get":{"operationId":"listFiles","summary":"分页查询虚拟目录","description":"权限 file:read。","x-required-permission":"file:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"prefix","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePage"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"createFile","summary":"创建逻辑文件","description":"权限 file:write。path为规范化相对路径，拒绝盘符、UNC、..及敏感目录。","x-required-permission":"file:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileInput"}}}}}},"/v1/sites/{site_id}/files/{file_id}":{"get":{"operationId":"getFile","summary":"读取当前版本","description":"权限 file:read。","x-required-permission":"file:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}},"delete":{"operationId":"hideFile","summary":"创建文件墓碑","description":"权限 file:delete。有引用、活动租约或永久保护时409。不直接删除物理文件。","x-required-permission":"file:delete","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/files/{file_id}/versions":{"get":{"operationId":"listVersions","summary":"查看不可变版本历史","description":"权限 file:read。","x-required-permission":"file:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionPage"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"commitVersion","summary":"提交已校验上传为新版本","description":"权限 file:write。同站点verified上传才可提交；If-Match同时控制文件头CAS。","x-required-permission":"file:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionInput"}}}}}},"/v1/sites/{site_id}/versions/{version_id}":{"get":{"operationId":"getVersion","summary":"读取版本元数据","description":"权限 file:read。","x-required-permission":"file:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/versions/{version_id}/content":{"get":{"operationId":"downloadVersion","summary":"流式下载原始字节","description":"权限 file:read。下载恢复原字节；HTML为attachment或隔离预览；支持Range与If-None-Match。","x-required-permission":"file:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Range","in":"header","required":false,"schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"原始字节流","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"},"206":{"description":"部分字节流","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Range":{"schema":{"type":"string"}}}},"304":{"description":"本地缓存版本有效"}}}},"/v1/sites/{site_id}/uploads":{"post":{"operationId":"createUpload","summary":"建立分块上传会话","description":"权限 file:write。去重仅限授权站点；只进入暂存区，不产生可用文件版本。","x-required-permission":"file:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadInput"}}}}}},"/v1/sites/{site_id}/uploads/{upload_id}":{"get":{"operationId":"getUpload","summary":"查询上传及验证状态","description":"权限 file:write。","x-required-permission":"file:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/uploads/{upload_id}/parts/{part_number}":{"put":{"operationId":"putPart","summary":"上传或重传单块","description":"权限 file:write。块序号为正整数。同块同SHA重试幂等，不同SHA返回409。","x-required-permission":"file:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"part_number","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"Content-Range","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Part-SHA256","in":"header","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Part"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"/v1/sites/{site_id}/uploads/{upload_id}/complete":{"post":{"operationId":"completeUpload","summary":"异步合并并验证整体SHA","description":"权限 file:write。服务端重算SHA和大小；不能将对象存储ETag当SHA；客户端轮询verified后再提交版本。","x-required-permission":"file:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"202":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadComplete"}}}}}},"/v1/sites/{site_id}/context-releases":{"post":{"operationId":"createContext","summary":"创建全量context快照","description":"权限 context:write。校验本站所有必需及扩展文件，不只保存初始化要求的7份。","x-required-permission":"context:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRelease"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextInput"}}}}}},"/v1/sites/{site_id}/context-releases/current":{"get":{"operationId":"currentContext","summary":"读取当前context快照","description":"权限 context:read。","x-required-permission":"context:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRelease"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/context-releases/{release_id}":{"get":{"operationId":"getContext","summary":"按版本读取context快照","description":"权限 context:read。","x-required-permission":"context:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"release_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRelease"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/context-releases/{release_id}/activate":{"post":{"operationId":"activateContext","summary":"CAS激活context","description":"权限 context:activate。If-Match为当前context head修订号；已有任务不切换输入版本。","x-required-permission":"context:activate","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"release_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRelease"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/clusters":{"get":{"operationId":"listClusters","summary":"查看主题集群及计划成员","description":"权限 cluster:read。","x-required-permission":"cluster:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterPage"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"createCluster","summary":"登记完整主题集群计划","description":"权限 run:controller。计划成员与本地入队清单一致。先登记完整计划，不能只同步已完成的部分文章。","x-required-permission":"run:controller","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cluster"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterInput"}}}}}},"/v1/sites/{site_id}/clusters/{cluster_id}":{"get":{"operationId":"getCluster","summary":"查看集群当前成员修订","description":"权限 cluster:read。","x-required-permission":"cluster:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cluster"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}},"put":{"operationId":"updateCluster","summary":"CAS更新计划成员并使旧验收失效","description":"权限 run:controller。新成员或变化即增加revision，阻止原清理计划；run关联须匹配已登记local_job_id。","x-required-permission":"run:controller","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cluster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cluster"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClusterInput"}}}}}},"/v1/sites/{site_id}/runs":{"post":{"operationId":"createRun","summary":"登记任务及固定输入","description":"权限 run:write。local_job_id+attempt去重；本地SQLite仍是第一阶段调度事实源。","x-required-permission":"run:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunInput"}}}}}},"/v1/sites/{site_id}/runs/{run_id}":{"get":{"operationId":"getRun","summary":"查看任务同步状态","description":"权限 run:read。","x-required-permission":"run:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/runs/{run_id}/manifest":{"put":{"operationId":"commitManifest","summary":"原子提交产物清单","description":"权限 run:write。所有版本须同站点且verified，清单SHA按文档规范计算。","x-required-permission":"run:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunManifest"}}}}}},"/v1/sites/{site_id}/runs/{run_id}/state":{"put":{"operationId":"mirrorRunState","summary":"递增序号同步执行状态","description":"权限 run:controller。只有可信协调器可写；completed不等于已发布，API不持有WordPress凭据。","x-required-permission":"run:controller","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunState"}}}}}},"/v1/sites/{site_id}/runs/{run_id}/leases":{"post":{"operationId":"createLease","summary":"建立资料使用租约","description":"权限 run:write。","x-required-permission":"run:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lease"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseInput"}}}}}},"/v1/sites/{site_id}/leases/{lease_id}/renew":{"post":{"operationId":"renewLease","summary":"续租原资料集合","description":"权限 run:write。只允许原持有人续租原版本集合。","x-required-permission":"run:write","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"lease_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lease"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseInput"}}}}}},"/v1/sites/{site_id}/cluster-acceptances":{"post":{"operationId":"acceptCluster","summary":"校验并登记集群验收","description":"权限 cluster:accept。成员须完整且修订匹配；record版本须有每篇site/post_id/URL/source/html SHA及verified/publish回执，并核对无未完成事项。不接受仅accepted=true。","x-required-permission":"cluster:accept","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"201":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Acceptance"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptanceInput"}}}}}},"/v1/sites/{site_id}/retention/previews":{"post":{"operationId":"previewRetention","summary":"计算清理预览","description":"权限 retention:preview。只读计算，不删除资料。","x-required-permission":"retention:preview","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}}],"responses":{"202":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preview"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewInput"}}}}}},"/v1/sites/{site_id}/retention/previews/{preview_id}":{"get":{"operationId":"getPreview","summary":"读取预览或执行结果","description":"权限 retention:preview。","x-required-permission":"retention:preview","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"preview_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preview"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/retention/previews/{preview_id}/apply":{"post":{"operationId":"applyRetention","summary":"重验保护条件后分批清理","description":"权限 retention:apply。专用维护身份；过期或引用变化409/412；永久材料和活动租约优先保护。","x-required-permission":"retention:apply","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"preview_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":128}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"版本清理已提交或完成；deleted_bytes为逻辑版本字节，底层无引用blob在24小时宽限后物理回收。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preview"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"资源修订标识，不是文件SHA。"}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}},"/v1/sites/{site_id}/audit-events":{"get":{"operationId":"auditEvents","summary":"读取脱敏审计日志","description":"权限 audit:read。","x-required-permission":"audit:read","security":[{"BearerAuth":[]}],"parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"请求成功；资料上传不等于WordPress发布成功。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventPage"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Opaque API key"}},"schemas":{"Problem":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"retryable":{"type":"boolean"}},"required":["code","message","request_id","retryable"],"additionalProperties":false},"SiteInput":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":253},"name":{"type":"string","minLength":1,"maxLength":255}},"required":["slug","name"],"additionalProperties":false},"Site":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"logical_bytes":{"type":"integer","minimum":0},"stored_bytes":{"type":"integer","minimum":0}},"required":["id","slug","name"],"additionalProperties":false},"FileInput":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?!/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*:)(?!.*\\/$)[^\\u0000-\\u001f]+$"},"category":{"type":"string","enum":["context","source","artifact","backup","publication_record","incident_record"]}},"required":["path","category"],"additionalProperties":false},"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"site_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"category":{"type":"string"},"revision":{"type":"integer","minimum":0},"current_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"tombstoned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","site_id","path","revision","current_version_id"],"additionalProperties":false},"VersionInput":{"type":"object","properties":{"upload_id":{"type":"string","format":"uuid"},"retention_class":{"type":"string","enum":["context_permanent","source_permanent","core_permanent","raw_7d","intermediate_14d","backup_180d","unknown_protected"]},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"expected_current_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"dependency_version_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["upload_id","retention_class","expected_current_version_id"],"additionalProperties":false},"Version":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"site_id":{"type":"string","format":"uuid"},"file_id":{"type":"string","format":"uuid"},"version":{"type":"integer","minimum":0},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"size":{"type":"integer","minimum":0},"created_at":{"type":"string","format":"date-time"},"availability":{"type":"string","enum":["verified","quarantined","missing","deleted"]},"media_type":{"type":"string"},"retention_class":{"type":"string","enum":["context_permanent","source_permanent","core_permanent","raw_7d","intermediate_14d","backup_180d","unknown_protected"]},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","site_id","file_id","version","sha256","size","availability"],"additionalProperties":false},"UploadInput":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"size":{"type":"integer","minimum":1},"media_type":{"type":"string"}},"required":["sha256","size","media_type"],"additionalProperties":false},"Upload":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["receiving","verifying","verified","rejected","expired"]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"size":{"type":"integer","minimum":0},"part_bytes":{"type":"integer","minimum":0},"received_parts":{"type":"array","items":{"type":"integer","minimum":1}},"expires_at":{"type":"string","format":"date-time"},"error_code":{"type":"string"}},"required":["id","status","sha256","size","received_parts","expires_at"],"additionalProperties":false},"Part":{"type":"object","properties":{"part_number":{"type":"integer","minimum":1},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"size":{"type":"integer","minimum":0}},"required":["part_number","sha256","size"],"additionalProperties":false},"UploadComplete":{"type":"object","properties":{"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}}},"required":["parts"],"additionalProperties":false},"ContextEntry":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?!/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*:)(?!.*\\/$)[^\\u0000-\\u001f]+$"},"file_version_id":{"type":"string","format":"uuid"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64}},"required":["path","file_version_id","sha256"],"additionalProperties":false},"ContextInput":{"type":"object","properties":{"name":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ContextEntry"}},"expected_parent_release_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["name","entries","expected_parent_release_id"],"additionalProperties":false},"ContextRelease":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"site_id":{"type":"string","format":"uuid"},"manifest_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ContextEntry"}},"revision":{"type":"integer","minimum":0}},"required":["id","site_id","manifest_sha256","entries","revision"],"additionalProperties":false},"RunInput":{"type":"object","properties":{"local_job_id":{"type":"string","maxLength":128},"attempt":{"type":"integer","minimum":1},"cluster_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"context_release_id":{"type":"string","format":"uuid"},"input_version_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"policy_version":{"type":"string"}},"required":["local_job_id","attempt","context_release_id","input_version_ids","policy_version"],"additionalProperties":false},"Run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"site_id":{"type":"string","format":"uuid"},"local_job_id":{"type":"string"},"context_release_id":{"type":"string","format":"uuid"},"state":{"type":"string"},"revision":{"type":"integer","minimum":0},"sync_state":{"type":"string","enum":["pending","partial","verified"]}},"required":["id","site_id","local_job_id","context_release_id","state","revision","sync_state"],"additionalProperties":false},"ManifestEntry":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?!/)(?!.*\\\\)(?!.*//)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*:)(?!.*\\/$)[^\\u0000-\\u001f]+$"},"file_version_id":{"type":"string","format":"uuid"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"purpose":{"type":"string"}},"required":["path","file_version_id","sha256","purpose"],"additionalProperties":false},"RunManifest":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/ManifestEntry"}},"manifest_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"source_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"qa_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"publication_record_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["entries","manifest_sha256"],"additionalProperties":false,"description":"SHA覆盖entries（按path排序）和source_version_id/qa_version_id/publication_record_version_id，缺省ID取null；键排序、紧凑分隔符、UTF-8 JSON编码，不含manifest_sha256本身。"},"RunState":{"type":"object","properties":{"state":{"type":"string","enum":["pending","running","retry","review_required","waiting_images","completed","skipped","no_action"]},"sequence":{"type":"integer","minimum":0},"checkpoint_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["state","sequence","checkpoint_sha256"],"additionalProperties":false},"LeaseInput":{"type":"object","properties":{"file_version_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"ttl_seconds":{"type":"integer","minimum":60,"maximum":86400}},"required":["file_version_ids","ttl_seconds"],"additionalProperties":false},"Lease":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"expires_at":{"type":"string","format":"date-time"},"file_version_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["id","expires_at","file_version_ids"],"additionalProperties":false},"AcceptanceInput":{"type":"object","properties":{"cluster_key":{"type":"string"},"expected_cluster_revision":{"type":"integer","minimum":0},"members":{"type":"array","items":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"run_revision":{"type":"integer","minimum":0}},"required":["run_id","run_revision"],"additionalProperties":false}},"record_version_id":{"type":"string","format":"uuid"},"signature_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64}},"required":["cluster_key","expected_cluster_revision","members","record_version_id","signature_sha256"],"additionalProperties":false,"description":"signature_sha256覆盖cluster_id/cluster_revision/members（按run_id排序）的规范JSON。record_version_id指向永久JSON：site为域名，run_ids为全量成员ID，unresolved必须显式含tasks/images/review/links/deferred五个空数组。"},"Acceptance":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cluster_key":{"type":"string"},"accepted_at":{"type":"string","format":"date-time"},"signature_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"revision":{"type":"integer","minimum":0},"invalidated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","cluster_key","accepted_at","signature_sha256","revision"],"additionalProperties":false},"PreviewInput":{"type":"object","properties":{"policy_version":{"type":"string"},"max_files":{"type":"integer","minimum":1,"maximum":10000},"target_bytes":{"type":"integer","minimum":1}},"required":["policy_version"],"additionalProperties":false},"Preview":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","ready","expired","applying","completed","failed"]},"snapshot_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","minLength":64,"maxLength":64},"candidate_count":{"type":"integer","minimum":0},"candidate_bytes":{"type":"integer","minimum":0},"protected_count":{"type":"integer","minimum":0},"expires_at":{"type":"string","format":"date-time"},"deleted_count":{"type":"integer","minimum":0},"deleted_bytes":{"type":"integer","minimum":0}},"required":["id","status","snapshot_sha256","candidate_count","candidate_bytes","protected_count","expires_at"],"additionalProperties":false},"AuditEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"at":{"type":"string","format":"date-time"},"actor_id":{"type":"string","format":"uuid"},"action":{"type":"string"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"request_id":{"type":"string","format":"uuid"},"result":{"type":"string"}},"required":["id","at","actor_id","action","request_id","result"],"additionalProperties":false},"ClusterInput":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"planned_members":{"type":"array","items":{"type":"object","properties":{"local_job_id":{"type":"string"},"content_key":{"type":"string"},"topic":{"type":"string"},"keyword":{"type":"string"}},"required":["local_job_id","content_key","topic"],"additionalProperties":false}}},"required":["key","name","planned_members"],"additionalProperties":false},"Cluster":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0},"planned_members":{"type":"array","items":{"type":"object","properties":{"local_job_id":{"type":"string"},"content_key":{"type":"string"},"topic":{"type":"string"},"keyword":{"type":"string"}},"required":["local_job_id","content_key","topic"],"additionalProperties":false}}},"required":["id","key","name","revision","planned_members"],"additionalProperties":false},"SitePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Site"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"FilePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"VersionPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Version"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"AuditEventPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"ClusterPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Cluster"}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false}},"responses":{"Problem":{"description":"统一错误；412版本冲突、409状态冲突、422哈希错误、503暂不可用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}