{ "openapi": "3.1.0", "info": { "title": "Amane API", "version": "0.30.0" }, "paths": { "/api/health": { "get": { "tags": [ "health" ], "summary": "Health Check", "operationId": "health_check", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthResponse" } } } } } } }, "/api/agent-guide": { "get": { "tags": [ "agent-guide" ], "summary": "Get Agent Guide", "operationId": "get_agent_guide", "responses": { "200": { "description": "Successful Response", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/api/config": { "get": { "tags": [ "config" ], "summary": "Get Config", "operationId": "get_config", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HotSettings" } } } } } }, "patch": { "tags": [ "config" ], "summary": "Update Config", "description": "先用当前会话的插件目录校验新路由和插件配置, 再持久化.", "operationId": "update_config", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Req" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HotSettings" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/config/schema": { "get": { "tags": [ "config" ], "summary": "Get Config Schema", "operationId": "get_config_schema", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Config Schema" } } } } } } }, "/api/libraries/{library_id}/cleanup/inventory": { "get": { "tags": [ "cleanup" ], "summary": "Get Cleanup Inventory", "description": "面板的入口: 有清单给状态与范围, 无清单只给 ``exists=False``; 节点经 ``/inventory/nodes`` 另取.\n\n遍历设置与当前库配置不一致的清单按不存在处理: 面板只渲染代表整库的规则来源清单,\n否则一次不递归或带自定义匹配模式的扫描会被当成整库可以清理.", "operationId": "get_cleanup_inventory", "parameters": [ { "name": "library_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Library Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InventorySummaryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/libraries/{library_id}/cleanup/inventory/nodes": { "get": { "tags": [ "cleanup" ], "summary": "Get Cleanup Inventory Nodes", "description": "展开某个节点的一页子节点. 库可能有上万条候选, 因此不整份下发.", "operationId": "get_cleanup_inventory_nodes", "parameters": [ { "name": "library_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Library Id" } }, { "name": "path", "in": "query", "required": false, "schema": { "type": "string", "description": "节点路径: 库内相对库根, 库外为绝对路径; 空串取根", "default": "", "title": "Path" }, "description": "节点路径: 库内相对库根, 库外为绝对路径; 空串取根" }, { "name": "inventory_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "指定清单; 缺省用规则来源的最新一份", "title": "Inventory Id" }, "description": "指定清单; 缺省用规则来源的最新一份" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "description": "从第几个子节点开始", "default": 0, "title": "Offset" }, "description": "从第几个子节点开始" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "description": "本页最多返回多少个子节点", "default": 200, "title": "Limit" }, "description": "本页最多返回多少个子节点" }, { "name": "noise", "in": "query", "required": false, "schema": { "type": "boolean", "description": "是否列出系统与同步工具的产物", "default": false, "title": "Noise" }, "description": "是否列出系统与同步工具的产物" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InventoryNodePage" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/libraries/{library_id}/cleanup/trash": { "get": { "tags": [ "cleanup" ], "summary": "Get Cleanup Trash", "description": "展开回收目录的历史内容: 产出回收目录来源的清单, 前端拿到要展开的目录再按页读.\n\n展开本身是只读遍历, 但代价随回收目录大小增长, 而同一个打开动作可能重复发请求 (渲染两次 / 重连):\n窗口内已有的一份直接复用, 免得重走整棵树并往存放里堆用不到的清单.", "operationId": "get_cleanup_trash", "parameters": [ { "name": "library_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Library Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrashSummaryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/libraries/{library_id}/cleanup/selection": { "post": { "tags": [ "cleanup" ], "summary": "Expand Cleanup Selection", "description": "由选中项展开显式来源清单: 文件表与详情页的删除入口据此预览. 只读, 不改磁盘与索引.", "operationId": "expand_cleanup_selection", "parameters": [ { "name": "library_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Library Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelectionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SelectionSummaryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/files": { "get": { "tags": [ "files" ], "summary": "List files and directories at a server path", "description": "仅允许安全目录内的路径; ``safe_dirs is None`` 时不限制.", "operationId": "list_files", "parameters": [ { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "description": "Server path to list. Relative paths resolve against `base` or the first safe dir.", "title": "Path" }, "description": "Server path to list. Relative paths resolve against `base` or the first safe dir." }, { "name": "base", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Base directory (absolute canonical) for relative `path`; defaults to the first safe dir.", "title": "Base" }, "description": "Base directory (absolute canonical) for relative `path`; defaults to the first safe dir." }, { "name": "show_hidden", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Whether to include hidden files (dotfiles).", "default": false, "title": "Show Hidden" }, "description": "Whether to include hidden files (dotfiles)." } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media": { "get": { "tags": [ "media" ], "summary": "List Media", "operationId": "list_media", "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/MediaFileStatus" }, { "type": "null" } ], "description": "Filter by media file status", "title": "Status" }, "description": "Filter by media file status" }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Search by path or number", "title": "Search" }, "description": "Search by path or number" }, { "name": "library_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Filter by owning library", "title": "Library Id" }, "description": "Filter by owning library" }, { "name": "has_subtitle", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by subtitle marker", "title": "Has Subtitle" }, "description": "Filter by subtitle marker" }, { "name": "mosaic", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/Mosaic" }, { "type": "null" } ], "description": "Filter by mosaic marker", "title": "Mosaic" }, "description": "Filter by mosaic marker" }, { "name": "uncensored", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by uncensored (own marker or uncensored number content type)", "title": "Uncensored" }, "description": "Filter by uncensored (own marker or uncensored number content type)" }, { "name": "definition", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by definition (8K/4K/1440p/1080p/720p/480p; SD/HD aliases)", "title": "Definition" }, "description": "Filter by definition (8K/4K/1440p/1080p/720p/480p; SD/HD aliases)" }, { "name": "content_type", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/ContentType" }, { "type": "null" } ], "description": "Filter by owning number content type", "title": "Content Type" }, "description": "Filter by owning number content type" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/MediaSortField", "description": "Sort field", "default": "updated_at" }, "description": "Sort field" }, { "name": "order", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SortOrder", "description": "Sort order", "default": "desc" }, "description": "Sort order" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/batch/delete": { "post": { "tags": [ "media" ], "summary": "Batch Delete Media", "description": "批量删除媒体文件记录; 不存在的 id 计入 missing 而不是报错.", "operationId": "batch_delete_media", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaBatchDeleteRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaBatchDeleteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/media/{media_id}": { "get": { "tags": [ "media" ], "summary": "Get Media", "operationId": "get_media", "parameters": [ { "name": "media_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Media Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaFileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "media" ], "summary": "Update Media", "operationId": "update_media", "parameters": [ { "name": "media_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Media Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaFileUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MediaFileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "media" ], "summary": "Delete Media", "operationId": "delete_media", "parameters": [ { "name": "media_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Media Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/schema": { "get": { "tags": [ "metadata" ], "summary": "Get Metadata Schema", "operationId": "get_metadata_schema", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Metadata Schema" } } } } } } }, "/api/metadata": { "get": { "tags": [ "metadata" ], "summary": "List Metadata", "operationId": "list_metadata", "parameters": [ { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/MetadataSortField", "description": "Sort field", "default": "updated_at" }, "description": "Sort field" }, { "name": "order", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SortOrder", "description": "Sort order", "default": "desc" }, "description": "Sort order" }, { "name": "semantic_query", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 200 }, { "type": "null" } ], "description": "按画面描述排序; 提供时忽略 sort_by / order", "title": "Semantic Query" }, "description": "按画面描述排序; 提供时忽略 sort_by / order" }, { "name": "semantic_kind", "in": "query", "required": false, "schema": { "enum": [ "all", "cover", "still" ], "type": "string", "description": "参与语义排序的图片来源", "default": "all", "title": "Semantic Kind" }, "description": "参与语义排序的图片来源" }, { "name": "actor_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by actor facet id(s); AND", "title": "Actor Id" }, "description": "Filter by actor facet id(s); AND" }, { "name": "director_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by director facet id(s); AND", "title": "Director Id" }, "description": "Filter by director facet id(s); AND" }, { "name": "tag_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by scraped tag facet id(s); AND", "title": "Tag Id" }, "description": "Filter by scraped tag facet id(s); AND" }, { "name": "studio_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by studio facet id(s); OR", "title": "Studio Id" }, "description": "Filter by studio facet id(s); OR" }, { "name": "publisher_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by publisher facet id(s); OR", "title": "Publisher Id" }, "description": "Filter by publisher facet id(s); OR" }, { "name": "series_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by series facet id(s); OR", "title": "Series Id" }, "description": "Filter by series facet id(s); OR" }, { "name": "user_tag_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by user tag id(s); AND", "title": "User Tag Id" }, "description": "Filter by user tag id(s); AND" }, { "name": "library_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "Filter by linked MediaFile library id(s); OR", "title": "Library Id" }, "description": "Filter by linked MediaFile library id(s); OR" }, { "name": "has_files", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by presence of linked MediaFile(s)", "title": "Has Files" }, "description": "Filter by presence of linked MediaFile(s)" }, { "name": "has_subtitle", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by linked file subtitle marker", "title": "Has Subtitle" }, "description": "Filter by linked file subtitle marker" }, { "name": "vr", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by VR marker (entry tag vocabulary)", "title": "Vr" }, "description": "Filter by VR marker (entry tag vocabulary)" }, { "name": "mosaic", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/Mosaic" }, { "type": "null" } ], "description": "Filter by linked file mosaic marker", "title": "Mosaic" }, "description": "Filter by linked file mosaic marker" }, { "name": "uncensored", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by uncensored number (own content type or linked file marker)", "title": "Uncensored" }, "description": "Filter by uncensored number (own content type or linked file marker)" }, { "name": "definition", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by linked file definition (8K/4K/1440p/1080p/720p/480p; SD/HD aliases)", "title": "Definition" }, "description": "Filter by linked file definition (8K/4K/1440p/1080p/720p/480p; SD/HD aliases)" }, { "name": "content_type", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/ContentType" }, { "type": "null" } ], "description": "Filter by number content type", "title": "Content Type" }, "description": "Filter by number content type" }, { "name": "saved_query_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Saved query preset id; AND with other filters via SQL subquery", "title": "Saved Query Id" }, "description": "Saved query preset id; AND with other filters via SQL subquery" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/batch/delete": { "post": { "tags": [ "metadata" ], "summary": "Batch Delete Metadata", "description": "级联行为与单条删除一致; 重复 id 去重后只处理一次.", "operationId": "batch_delete_metadata", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataBatchIdsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataBatchDeleteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/batch/scrape": { "post": { "tags": [ "metadata" ], "summary": "Batch Scrape Metadata", "description": "以各自 number 重新刮削; 重复 id 去重后只提交一次.", "operationId": "batch_scrape_metadata", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataBatchScrapeRequest" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataBatchScrapeResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/batch/user-tags": { "post": { "tags": [ "metadata" ], "summary": "Batch Metadata User Tags", "description": "把一组用户标签应用到一组影片; 未知标签 id 返回 404, 不存在的影片 id 计入 missing.", "operationId": "batch_metadata_user_tags", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataUserTagsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataUserTagsResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/merge-entries": { "post": { "tags": [ "metadata" ], "summary": "Merge Metadata Entries", "description": "把来源条目的 raw 快照补入目标并删除来源: 目标字段不变, 关联记录迁入目标.\n\n``rescrape`` 要求合并提交后再按目标番号入队 SCRAPE: 只有 raw 已落库, 复用快照的聚合\n才能按当前优先级重建字段与站点级字典.", "operationId": "merge_metadata_entries", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataMergeEntriesRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/{metadata_id}": { "get": { "tags": [ "metadata" ], "summary": "Get Metadata", "operationId": "get_metadata", "parameters": [ { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Metadata Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataDetailResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "metadata" ], "summary": "Update Metadata", "operationId": "update_metadata", "parameters": [ { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Metadata Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataPartial" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "metadata" ], "summary": "Delete Metadata", "operationId": "delete_metadata", "parameters": [ { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Metadata Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/{metadata_id}/locks": { "put": { "tags": [ "metadata" ], "summary": "Set Metadata Locks", "description": "整体替换锁定字段集合.", "operationId": "set_metadata_locks", "parameters": [ { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Metadata Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataLocksRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/{metadata_id}/crop-poster": { "post": { "tags": [ "metadata" ], "summary": "Crop Poster From Thumb", "description": "从封面 (thumb) 按像素框裁切海报, 写入派生 Resource 并更新 poster_urls.\n\n先按 EXIF 转正、再顺时针旋转 ``req.rotation``, 框相对旋转后的图像.", "operationId": "crop_poster_from_thumb", "parameters": [ { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Metadata Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CropPosterRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/{metadata_id}/merge": { "post": { "tags": [ "metadata" ], "summary": "Merge Metadata", "operationId": "merge_metadata", "parameters": [ { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Metadata Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MergeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MetadataResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/network/browser": { "get": { "tags": [ "network" ], "summary": "Browser Backends", "description": "探测各浏览器后端是否可用于本实例.\n\n结论就是响应体, 端点始终 200; ``selected`` 由当前热配置给出, 界面据此标出「已选但不可用」.", "operationId": "browser_backends", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserBackendReportResponse" } } } } } } }, "/api/network/check": { "post": { "tags": [ "network" ], "summary": "Check Connectivity", "description": "探测来源连通性.\n\n单个来源失败只体现在自己的条目里, 端点始终 200 — 与 ``GET /api/system/release`` 同一取向:\n探测结果本身就是响应体, 用 5xx 表达「上游不通」会让前端无法展示逐来源原因.", "operationId": "check_connectivity", "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ConnectivityCheckRequest" }, { "type": "null" } ], "title": "Req" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectivityReportResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/sources": { "get": { "tags": [ "playback" ], "summary": "List Playback Sources", "description": "列出可选的播放源; 不调用插件, 因此不发任何上游请求.", "operationId": "list_playback_sources", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlaybackSourceListResponse" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/streams": { "get": { "tags": [ "playback" ], "summary": "List Playback Streams", "description": "探测一个来源在这个条目上的流.\n\n由前端在切到该来源时调用, 因此没有人工预算: 慢就慢在用户等待的那一次, 结果按来源与条目缓存\n一小段时间, 来回切换不重复探测. 探测失败也是一行不可用记录, 前端按 ``detail`` 显示原因.", "operationId": "list_playback_streams", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlaybackStreamListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/index.m3u8": { "get": { "tags": [ "playback" ], "summary": "Play Metadata Playlist", "operationId": "play_metadata_playlist", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/streams/{key}/index.m3u8": { "get": { "tags": [ "playback" ], "summary": "Play Stream Playlist", "operationId": "play_stream_playlist", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } }, { "name": "key", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-zA-Z0-9._-]{1,64}$", "title": "Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/hls/{token}": { "get": { "tags": [ "playback" ], "summary": "Play Metadata Hls Part", "operationId": "play_metadata_hls_part", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[0-9a-f]{32}$", "title": "Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/streams/{key}/hls/{token}": { "get": { "tags": [ "playback" ], "summary": "Play Stream Hls Part", "operationId": "play_stream_hls_part", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } }, { "name": "key", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-zA-Z0-9._-]{1,64}$", "title": "Key" } }, { "name": "token", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[0-9a-f]{32}$", "title": "Token" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/subtitles/{track_id}": { "get": { "tags": [ "playback" ], "summary": "Play Metadata Subtitle", "operationId": "play_metadata_subtitle", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } }, { "name": "track_id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-zA-Z0-9._-]{1,64}$", "title": "Track Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/streams/{key}/subtitles/{track_id}": { "get": { "tags": [ "playback" ], "summary": "Play Stream Subtitle", "operationId": "play_stream_subtitle", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } }, { "name": "key", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-zA-Z0-9._-]{1,64}$", "title": "Key" } }, { "name": "track_id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-zA-Z0-9._-]{1,64}$", "title": "Track Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}": { "get": { "tags": [ "playback" ], "summary": "Play Metadata", "operationId": "play_metadata", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/playback/{source_id}/{metadata_id}/streams/{key}": { "get": { "tags": [ "playback" ], "summary": "Play Stream", "operationId": "play_stream", "parameters": [ { "name": "source_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Source Id" } }, { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "minimum": 1, "title": "Metadata Id" } }, { "name": "key", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[a-zA-Z0-9._-]{1,64}$", "title": "Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/plugins": { "get": { "tags": [ "plugins" ], "summary": "List Plugins", "operationId": "list_plugins", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PluginListResponse" } } } } } }, "post": { "tags": [ "plugins" ], "summary": "Install Plugin", "operationId": "install_plugin", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_install_plugin" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PluginListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/plugins/reload": { "post": { "tags": [ "plugins" ], "summary": "Reload Plugins", "operationId": "reload_plugins", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PluginListResponse" } } } } } } }, "/api/plugins/{plugin_id}": { "get": { "tags": [ "plugins" ], "summary": "Get Plugin", "operationId": "get_plugin", "parameters": [ { "name": "plugin_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Plugin Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PluginResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "plugins" ], "summary": "Update Plugin", "operationId": "update_plugin", "parameters": [ { "name": "plugin_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Plugin Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PluginConfigUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PluginResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "plugins" ], "summary": "Uninstall Plugin", "operationId": "uninstall_plugin", "parameters": [ { "name": "plugin_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Plugin Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors": { "get": { "tags": [ "actors" ], "summary": "List Actors", "operationId": "list_actors", "parameters": [ { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ActorSortField", "default": "name" } }, { "name": "order", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SortOrder", "default": "asc" } }, { "name": "has_person", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "是否已有人物标量/简介", "title": "Has Person" }, "description": "是否已有人物标量/简介" }, { "name": "has_image", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "是否已有头像 URL", "title": "Has Image" }, "description": "是否已有头像 URL" }, { "name": "gender", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ActorGender" } }, { "type": "null" } ], "description": "性别多选 (可重复)", "title": "Gender" }, "description": "性别多选 (可重复)" }, { "name": "birthday_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "生日下界 YYYY-MM-DD", "title": "Birthday Min" }, "description": "生日下界 YYYY-MM-DD" }, { "name": "birthday_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "生日上界 YYYY-MM-DD", "title": "Birthday Max" }, "description": "生日上界 YYYY-MM-DD" }, { "name": "height_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "身高下界 cm", "title": "Height Min" }, "description": "身高下界 cm" }, { "name": "height_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "身高上界 cm", "title": "Height Max" }, "description": "身高上界 cm" }, { "name": "bust_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "胸围下界 cm", "title": "Bust Min" }, "description": "胸围下界 cm" }, { "name": "bust_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "胸围上界 cm", "title": "Bust Max" }, "description": "胸围上界 cm" }, { "name": "waist_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "腰围下界 cm", "title": "Waist Min" }, "description": "腰围下界 cm" }, { "name": "waist_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "腰围上界 cm", "title": "Waist Max" }, "description": "腰围上界 cm" }, { "name": "hip_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "臀围下界 cm", "title": "Hip Min" }, "description": "臀围下界 cm" }, { "name": "hip_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "description": "臀围上界 cm", "title": "Hip Max" }, "description": "臀围上界 cm" }, { "name": "cup_min", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "罩杯下界 (字母序, 大小写不敏感)", "title": "Cup Min" }, "description": "罩杯下界 (字母序, 大小写不敏感)" }, { "name": "cup_max", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "罩杯上界", "title": "Cup Max" }, "description": "罩杯上界" }, { "name": "birthplace", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "出生地包含匹配", "title": "Birthplace" }, "description": "出生地包含匹配" }, { "name": "ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "限制为这些演员主键", "title": "Ids" }, "description": "限制为这些演员主键" }, { "name": "user_tag_ids", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "type": "integer" } }, { "type": "null" } ], "description": "按用户标签筛选; 多值为 AND", "title": "User Tag Ids" }, "description": "按用户标签筛选; 多值为 AND" }, { "name": "saved_query_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Saved query preset id; AND with other filters via SQL subquery", "title": "Saved Query Id" }, "description": "Saved query preset id; AND with other filters via SQL subquery" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/batch/user-tags": { "post": { "tags": [ "actors" ], "summary": "Batch Actor User Tags", "description": "把一组用户标签应用到一组演员; 未知标签 id 返回 404, 不存在的演员 id 计入 missing.", "operationId": "batch_actor_user_tags", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorUserTagsRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserTagLinksResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/batch/gender": { "post": { "tags": [ "actors" ], "summary": "Batch Actor Gender", "description": "批量写入性别; 写入字段与单条 PATCH 一样自动加锁, 不存在的演员 id 计入 missing.", "operationId": "batch_actor_gender", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorGenderBatchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorGenderBatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/batch/clear-person": { "post": { "tags": [ "actors" ], "summary": "Batch Clear Actor Person", "description": "批量清空人物档案并解除全部锁 (保留 ``name`` / ``gender``); 不存在的演员 id 计入 missing.", "operationId": "batch_clear_actor_person", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorClearPersonBatchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorClearPersonBatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/{actor_id}": { "get": { "tags": [ "actors" ], "summary": "Get Actor", "operationId": "get_actor", "parameters": [ { "name": "actor_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Actor Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "actors" ], "summary": "Update Actor", "description": "更新演员规范人物字段 (不含 name/raw/field_sources); 写入字段自动加锁.", "operationId": "update_actor", "parameters": [ { "name": "actor_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Actor Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/{actor_id}/locks": { "put": { "tags": [ "actors" ], "summary": "Set Actor Locks", "description": "整体替换锁定字段集合.", "operationId": "set_actor_locks", "parameters": [ { "name": "actor_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Actor Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorLocksRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/{actor_id}/clear-person": { "post": { "tags": [ "actors" ], "summary": "Clear Actor Person", "description": "已弃用: 改用 `POST /actors/batch/clear-person` 的单元素列表 (只回计数).", "operationId": "clear_actor_person", "deprecated": true, "parameters": [ { "name": "actor_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Actor Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/{actor_id}/crop-avatar": { "post": { "tags": [ "actors" ], "summary": "Crop Actor Avatar", "description": "从当前主图 (image_urls[0]) 按像素框裁切头像, 结果前插为主图并保留原图.\n\n先按 EXIF 转正、再顺时针旋转 ``req.rotation``, 框相对旋转后的图像.", "operationId": "crop_actor_avatar", "parameters": [ { "name": "actor_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Actor Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CropAvatarRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/actors/{actor_id}/scrape": { "post": { "tags": [ "actors" ], "summary": "Scrape Actor", "description": "已弃用: 改用 `POST /tasks/batch/submit` 的单元素 `actor_scrape` 提交.", "operationId": "scrape_actor", "deprecated": true, "parameters": [ { "name": "actor_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Actor Id" } } ], "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/ActorScrapeRequest" }, { "type": "null" } ], "title": "Req" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/facets/user_tag": { "post": { "tags": [ "facets" ], "summary": "Create User Tags", "description": "按名称取回或新建用户标签; 已存在的名称直接复用, 响应与入参同序.", "operationId": "create_user_tags", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserTagsCreateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserTagsCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/facets/{kind}": { "get": { "tags": [ "facets" ], "summary": "List Facets", "operationId": "list_facets", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "favorite", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "description": "Filter by favorite marker", "title": "Favorite" }, "description": "Filter by favorite marker" }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/FacetSortField", "description": "Sort field", "default": "name" }, "description": "Sort field" }, { "name": "order", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SortOrder", "description": "Sort order", "default": "asc" }, "description": "Sort order" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/facets/{kind}/rules": { "get": { "tags": [ "facets" ], "summary": "List Facet Rules", "operationId": "list_facet_rules", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetRuleListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/facets/{kind}/rules/{rule_id}": { "delete": { "tags": [ "facets" ], "summary": "Delete Facet Rule", "description": "删除单条规则; 不回填历史 Metadata.", "operationId": "delete_facet_rule", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } }, { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Rule Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/facets/{kind}/batch": { "post": { "tags": [ "facets" ], "summary": "Batch Facets", "description": "对一批分类执行同一个动作, 单个事务; 分类不支持收藏返回 400.\n\n不存在的 id 计入 ``missing`` 而不报 404 — 批量请求里某个 id 已失效不该让整批无结果. 动作语义\n与扩展位见 ``FacetBatchAction``.", "operationId": "batch_facets", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetBatchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetBatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/facets/{kind}/{facet_id}": { "get": { "tags": [ "facets" ], "summary": "Get Facet", "operationId": "get_facet", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } }, { "name": "facet_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Facet Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "facets" ], "summary": "Rename Facet", "description": "新名称与另一实体冲突时返回 409 (应使用合并).", "operationId": "rename_facet", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } }, { "name": "facet_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Facet Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetRenameRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "facets" ], "summary": "Delete Facet", "description": "删除分类并从 Metadata 真值移除该名字.\n\n``add_rule`` 为真时另写剔除规则, 名字不会在下次刮削时复活; 否则只删实体, 由用户显式选择.\nuser_tag 硬删, 不进规则表.", "operationId": "delete_facet", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } }, { "name": "facet_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Facet Id" } }, { "name": "add_rule", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Add Rule" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/facets/{kind}/merge": { "post": { "tags": [ "facets" ], "summary": "Merge Facets", "description": "将 source_ids 合并入 target_id: 关联迁移到 target, source 实体被删除.", "operationId": "merge_facets", "parameters": [ { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/FacetKind" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetMergeRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FacetResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/feeds": { "get": { "tags": [ "feeds" ], "summary": "List Feeds", "operationId": "list_feeds", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedListResponse" } } } } } }, "post": { "tags": [ "feeds" ], "summary": "Create Feed", "operationId": "create_feed", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/feeds/items": { "get": { "tags": [ "feeds" ], "summary": "List All Feed Items", "description": "跨源条目列表. feed_id 优先于 group; group 空串只含未分组源, 非空为前缀匹配.", "operationId": "list_all_feed_items", "parameters": [ { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "state", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/FeedItemState", "default": "active" } }, { "name": "read", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/FeedItemReadState", "default": "all" } }, { "name": "feed_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Feed Id" } }, { "name": "group", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Group" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedItemListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/feeds/{feed_id}": { "get": { "tags": [ "feeds" ], "summary": "Get Feed", "operationId": "get_feed", "parameters": [ { "name": "feed_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Feed Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "feeds" ], "summary": "Update Feed", "operationId": "update_feed", "parameters": [ { "name": "feed_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Feed Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "feeds" ], "summary": "Delete Feed", "operationId": "delete_feed", "parameters": [ { "name": "feed_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Feed Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/feeds/{feed_id}/poll": { "post": { "tags": [ "feeds" ], "summary": "Poll Feed", "operationId": "poll_feed", "parameters": [ { "name": "feed_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Feed Id" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/feeds/{feed_id}/items": { "get": { "tags": [ "feeds" ], "summary": "List Feed Items", "operationId": "list_feed_items", "parameters": [ { "name": "feed_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Feed Id" } }, { "name": "search", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Search" } }, { "name": "state", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/FeedItemState", "default": "active" } }, { "name": "read", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/FeedItemReadState", "default": "all" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedItemListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/feeds/{feed_id}/items/batch": { "post": { "tags": [ "feeds" ], "summary": "Batch Feed Items", "operationId": "batch_feed_items", "parameters": [ { "name": "feed_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Feed Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedItemBatchRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeedItemBatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/metadata/{metadata_id}/comments": { "post": { "tags": [ "comments" ], "summary": "Create Comment", "operationId": "create_comment", "parameters": [ { "name": "metadata_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Metadata Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/comments/{comment_id}": { "patch": { "tags": [ "comments" ], "summary": "Update Comment", "operationId": "update_comment", "parameters": [ { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Comment Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "comments" ], "summary": "Delete Comment", "operationId": "delete_comment", "parameters": [ { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Comment Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/resources/proxy": { "get": { "tags": [ "resources" ], "summary": "Proxy Image", "description": "上游失败记入进程内负缓存 (15 分钟), 窗口内同 URL 直接 502.\n同 URL 进行中请求合并为一次 acquire.\n使用图片 token 的请求只从缓存读取资源: 未命中返回 404, 不发起对外请求, 不写入负缓存.\n缓存命中先于地址判定: 只有下载会发起对外请求, 已缓存的资源即使指向内网也直接返回.\n不论是否命中缓存, 内容不是图片时一律 502, 不回放正文.", "operationId": "proxy_image", "parameters": [ { "name": "url", "in": "query", "required": true, "schema": { "type": "string", "description": "External image URL to proxy", "title": "Url" }, "description": "External image URL to proxy" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/resources/{url_hash}": { "get": { "tags": [ "resources" ], "summary": "Serve Resource", "operationId": "serve_resource", "parameters": [ { "name": "url_hash", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[0-9a-f]{16}$", "title": "Url Hash" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/schedules": { "get": { "tags": [ "schedules" ], "summary": "List Schedules", "operationId": "list_schedules", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleListResponse" } } } } } }, "post": { "tags": [ "schedules" ], "summary": "Create Schedule", "operationId": "create_schedule", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/schedules/schema": { "get": { "tags": [ "schedules" ], "summary": "Get Schedule Schema", "operationId": "get_schedule_schema", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Schedule Schema" } } } } } } }, "/api/schedules/{schedule_id}": { "get": { "tags": [ "schedules" ], "summary": "Get Schedule", "operationId": "get_schedule", "parameters": [ { "name": "schedule_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Schedule Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "schedules" ], "summary": "Update Schedule", "description": "仅 name/cron/enabled. 修改任务内容须删除后重建.", "operationId": "update_schedule", "parameters": [ { "name": "schedule_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Schedule Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "schedules" ], "summary": "Delete Schedule", "operationId": "delete_schedule", "parameters": [ { "name": "schedule_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Schedule Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/schedules/{schedule_id}/trigger": { "post": { "tags": [ "schedules" ], "summary": "Trigger Schedule", "description": "将 next_run 设置为当前时间, 由 cron 在下一个 tick 执行.", "operationId": "trigger_schedule", "parameters": [ { "name": "schedule_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Schedule Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/system/desktop": { "get": { "tags": [ "system" ], "summary": "Desktop Info", "operationId": "desktop_info", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DesktopResponse" } } } } } } }, "/api/system/restart": { "post": { "tags": [ "system" ], "summary": "Restart Server", "description": "优雅停机并以退出码 3 退出. 仅监督者在场时可用.", "operationId": "restart_server", "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/system/release": { "get": { "tags": [ "system" ], "summary": "Get Release", "description": "查 GitHub latest; 失败时 latest 为空, 不 5xx.", "operationId": "get_release", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReleaseResponse" } } } } } } }, "/api/tasks": { "get": { "tags": [ "tasks" ], "summary": "List Tasks", "description": "默认只返回链根 (roots_only). 子任务由 /children 按需加载;\n显式 root_task_id 时返回该链全部任务.", "operationId": "list_tasks", "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/TaskStatus" } }, { "type": "null" } ], "description": "Filter by task status (multiple)", "title": "Status" }, "description": "Filter by task status (multiple)" }, { "name": "type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/TaskType" } }, { "type": "null" } ], "description": "Filter by task type (multiple)", "title": "Type" }, "description": "Filter by task type (multiple)" }, { "name": "root_task_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Filter to a task chain (all tasks sharing the root)", "title": "Root Task Id" }, "description": "Filter to a task chain (all tasks sharing the root)" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/TaskSortField", "description": "Sort field", "default": "created_at" }, "description": "Sort field" }, { "name": "order", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SortOrder", "description": "Sort order", "default": "desc" }, "description": "Sort order" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "tasks" ], "summary": "Submit Task", "operationId": "submit_task", "requestBody": { "required": true, "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/RefreshSubmission" }, { "$ref": "#/components/schemas/OrganizeSubmission" }, { "$ref": "#/components/schemas/ScanInvalidSubmission" }, { "$ref": "#/components/schemas/DeleteSubmission" }, { "$ref": "#/components/schemas/ScrapeSubmission" }, { "$ref": "#/components/schemas/CleanupSubmission" }, { "$ref": "#/components/schemas/UpscaleSubmission" }, { "$ref": "#/components/schemas/R18ImportSubmission" }, { "$ref": "#/components/schemas/ActorScrapeSubmission" }, { "$ref": "#/components/schemas/ActorPushSubmission" }, { "$ref": "#/components/schemas/RescrapeSubmission" }, { "$ref": "#/components/schemas/SemanticIndexSubmission" }, { "$ref": "#/components/schemas/SemanticBenchmarkSubmission" } ], "discriminator": { "propertyName": "type", "mapping": { "refresh": "#/components/schemas/RefreshSubmission", "organize": "#/components/schemas/OrganizeSubmission", "scan_invalid": "#/components/schemas/ScanInvalidSubmission", "delete": "#/components/schemas/DeleteSubmission", "scrape": "#/components/schemas/ScrapeSubmission", "cleanup": "#/components/schemas/CleanupSubmission", "upscale": "#/components/schemas/UpscaleSubmission", "r18_import": "#/components/schemas/R18ImportSubmission", "actor_scrape": "#/components/schemas/ActorScrapeSubmission", "actor_push": "#/components/schemas/ActorPushSubmission", "rescrape": "#/components/schemas/RescrapeSubmission", "semantic_index": "#/components/schemas/SemanticIndexSubmission", "semantic_benchmark": "#/components/schemas/SemanticBenchmarkSubmission" } }, "title": "Req" } } } }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tasks/{task_id}/children": { "get": { "tags": [ "tasks" ], "summary": "Get Task Children", "description": "直接后继 (TaskLink 出边). total 为出边总数, 不受本页截断.", "operationId": "get_task_children", "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 200, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskChildListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tasks/schema": { "get": { "tags": [ "tasks" ], "summary": "Get Task Schema", "operationId": "get_task_schema", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Response Get Task Schema" } } } } } } }, "/api/tasks/worker": { "get": { "tags": [ "tasks" ], "summary": "Get Task Worker", "operationId": "get_task_worker", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWorkerResponse" } } } } } } }, "/api/tasks/worker/pause": { "post": { "tags": [ "tasks" ], "summary": "Pause Task Worker", "operationId": "pause_task_worker", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWorkerResponse" } } } } } } }, "/api/tasks/worker/resume": { "post": { "tags": [ "tasks" ], "summary": "Resume Task Worker", "operationId": "resume_task_worker", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskWorkerResponse" } } } } } } }, "/api/tasks/batch": { "post": { "tags": [ "tasks" ], "summary": "Batch Tasks", "description": "``task_ids`` 与 status/type 互斥.", "operationId": "batch_tasks", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskBatchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskBatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tasks/batch/submit": { "post": { "tags": [ "tasks" ], "summary": "Batch Submit Tasks", "description": "批量提交任务. 逐项解析同单条提交, 同类型合并为一次入队事务.\n\n``missing`` 只覆盖目标实体不存在 (404); 路径越界 / 参数互斥等仍是整批中断.", "operationId": "batch_submit_tasks", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskBatchSubmitRequest" } } }, "required": true }, "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskBatchSubmitResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tasks/{task_id}": { "get": { "tags": [ "tasks" ], "summary": "Get Task", "operationId": "get_task", "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tasks/{task_id}/log": { "get": { "tags": [ "tasks" ], "summary": "Get Task Log", "description": "任务日志尾部. 记录文件不存在时返回空页.", "operationId": "get_task_log", "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 5000, "minimum": 1, "description": "Max entries from the end of task.log", "default": 5000, "title": "Limit" }, "description": "Max entries from the end of task.log" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskLogPage" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tasks/{task_id}/record": { "get": { "tags": [ "tasks" ], "summary": "Get Task Record", "description": "导出任务记录 (zip). 默认脱敏; include_secrets=true 需本地存在 .secrets.hot.json.", "operationId": "get_task_record", "parameters": [ { "name": "task_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Task Id" } }, { "name": "include_secrets", "in": "query", "required": false, "schema": { "type": "boolean", "description": "Include plaintext cookies/tokens from local secrets snapshot", "default": false, "title": "Include Secrets" }, "description": "Include plaintext cookies/tokens from local secrets snapshot" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/tools": { "get": { "tags": [ "tools" ], "summary": "Get Tool Catalog", "description": "工具索引: 客户端据此选工具, 不必内置工具清单.", "operationId": "get_tool_catalog", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolCatalog" } } } } } } }, "/api/tools/{name}": { "get": { "tags": [ "tools" ], "summary": "Get Tool Detail", "description": "单个工具的完整入参.", "operationId": "get_tool_detail", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "tools" ], "summary": "Call Tool", "description": "派发一次工具调用.\n\n上下文固定为「已批准」且无会话: 外部通道没有可等用户点击的界面, 审批只对内置助理生效;\n无会话使交付的查询预设直接保留并进入预设列表.", "operationId": "call_tool", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string", "title": "Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToolCallRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "title": "Response Call Tool" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/db-schema": { "get": { "tags": [ "tools" ], "summary": "Get Db Schema", "description": "库结构摘要, 供编写只读 SQL 时参考.", "operationId": "get_db_schema", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Get Db Schema" } } } } } } }, "/api/libraries/path-template-schema": { "get": { "tags": [ "libraries" ], "summary": "Get Path Template Schema", "description": "与 ORGANIZE 实际使用的默认值同源.", "operationId": "get_path_template_schema", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PathTemplateSchemaResponse" } } } } } } }, "/api/libraries": { "get": { "tags": [ "libraries" ], "summary": "List Libraries", "operationId": "list_libraries", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryListResponse" } } } } } }, "post": { "tags": [ "libraries" ], "summary": "Create Library", "operationId": "create_library", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryCreateRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/libraries/{library_id}": { "get": { "tags": [ "libraries" ], "summary": "Get Library", "operationId": "get_library", "parameters": [ { "name": "library_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Library Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "libraries" ], "summary": "Update Library", "operationId": "update_library", "parameters": [ { "name": "library_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Library Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LibraryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "libraries" ], "summary": "Delete Library", "description": "级联删除该库 MediaFile (library_id 非空 FK). 仅删除数据库索引, 不动磁盘文件.", "operationId": "delete_library", "parameters": [ { "name": "library_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Library Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/webhooks/clouddrive": { "post": { "tags": [ "webhooks" ], "summary": "Clouddrive Notify", "description": "CloudDrive file_system_watcher 回调. 鉴权与其它 /api 相同 (Bearer).", "operationId": "clouddrive_notify", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CloudDriveNotifyRequest" } } }, "required": true }, "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agent/sessions": { "get": { "tags": [ "agent" ], "summary": "List Agent Sessions", "operationId": "list_agent_sessions", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentSessionListResponse" } } } } } }, "post": { "tags": [ "agent" ], "summary": "Create Agent Session", "operationId": "create_agent_session", "requestBody": { "content": { "application/json": { "schema": { "anyOf": [ { "$ref": "#/components/schemas/AgentSessionCreateRequest" }, { "type": "null" } ], "title": "Req" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agent/sessions/{session_id}": { "patch": { "tags": [ "agent" ], "summary": "Update Agent Session", "operationId": "update_agent_session", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentSessionUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentSessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "agent" ], "summary": "Delete Agent Session", "operationId": "delete_agent_session", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Session Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agent/sessions/{session_id}/title": { "post": { "tags": [ "agent" ], "summary": "Generate Agent Session Title", "description": "按首条输入生成标题. 与主回合并行执行, 前端不等回合结束即可刷新列表.", "operationId": "generate_agent_session_title", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentSessionTitleRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentSessionTitleResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agent/sessions/{session_id}/trace": { "get": { "tags": [ "agent" ], "summary": "Get Agent Trace", "operationId": "get_agent_trace", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTraceResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agent/sessions/{session_id}/agui": { "post": { "tags": [ "agent" ], "summary": "Run Agent Agui", "description": "启动 AG-UI 回合 (后台执行) 并订阅其事件. ``threadId`` 由适配器映射为 ``conversation_id``.", "operationId": "run_agent_agui", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "text/event-stream": {} } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agent/sessions/{session_id}/agui/events": { "get": { "tags": [ "agent" ], "summary": "Follow Agent Events", "description": "跟随 ``after_seq`` 之后的回放行, 供页面接上进度: 整段历史经 ``/trace``, 这里只接新行.\n\n页面发起的回合也经由这条通道 (展示只认回放行), 因此必须能给出起始位置: 否则每接一次都要重发整段历史.\n\n只订阅, **不**启动回合, 故进行中的回合也不会 409; 回合结束且追平后关闭.", "operationId": "follow_agent_events", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Session Id" } }, { "name": "after_seq", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "After Seq" } } ], "responses": { "200": { "description": "Successful Response", "content": { "text/event-stream": {} } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/agent/sessions/{session_id}/agui/cancel": { "post": { "tags": [ "agent" ], "summary": "Cancel Agui Turn", "description": "显式终止后台回合: 客户端 abort 只是断开订阅, 回合会继续运行.", "operationId": "cancel_agui_turn", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentCancelResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/saved-queries": { "get": { "tags": [ "saved-queries" ], "summary": "List Saved Queries", "operationId": "list_saved_queries", "parameters": [ { "name": "session_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "仅该会话下的预设", "title": "Session Id" }, "description": "仅该会话下的预设" }, { "name": "persisted_only", "in": "query", "required": false, "schema": { "type": "boolean", "description": "仅已保留 (persisted) 的预设", "default": false, "title": "Persisted Only" }, "description": "仅已保留 (persisted) 的预设" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "saved-queries" ], "summary": "Create Saved Query", "description": "手动创建: 无会话归属, 直接已保留.", "operationId": "create_saved_query", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/saved-queries/{query_id}": { "get": { "tags": [ "saved-queries" ], "summary": "Get Saved Query", "operationId": "get_saved_query", "parameters": [ { "name": "query_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Query Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "saved-queries" ], "summary": "Update Saved Query", "description": "SQL 变化才重校验并失效缓存.", "operationId": "update_saved_query", "parameters": [ { "name": "query_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Query Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryUpdateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/saved-queries/batch": { "post": { "tags": [ "saved-queries" ], "summary": "Batch Saved Queries", "description": "不存在的 id 计入 missing; 重复 id 只处理一次. AgentService 未装配时 delete 跳过缓存失效.", "operationId": "batch_saved_queries", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryBatchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryBatchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/saved-queries/{query_id}/result": { "get": { "tags": [ "saved-queries" ], "summary": "Get Saved Query Result", "operationId": "get_saved_query_result", "parameters": [ { "name": "query_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Query Id" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 5000, "minimum": 1, "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedQueryResultResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/semantic/status": { "get": { "tags": [ "semantic" ], "summary": "Semantic Status", "operationId": "semantic_status", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SemanticStatusResponse" } } } } } } }, "/api/semantic/diagnostics": { "get": { "tags": [ "semantic" ], "summary": "Semantic Diagnostics", "operationId": "semantic_diagnostics", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SemanticDiagnosticsResponse" } } } } } } }, "/api/semantic/release": { "post": { "tags": [ "semantic" ], "summary": "Release Semantic", "description": "释放内存里的向量索引与两个塔; 下次检索重新装载. 内存紧张时手动触发, 不影响库内向量.", "operationId": "release_semantic", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SemanticStatusResponse" } } } } } } } }, "components": { "schemas": { "ActorClearPersonBatchRequest": { "properties": { "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "演员 ID 列表; 上限防 SQLite 绑定变量超限" } }, "type": "object", "required": [ "ids" ], "title": "ActorClearPersonBatchRequest", "description": "批量清空人物档案并解除全部锁 (保留 ``name`` / ``gender``)." }, "ActorClearPersonBatchResponse": { "properties": { "cleared": { "type": "integer", "title": "Cleared", "description": "清空的演员数" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的演员 id 数" } }, "type": "object", "required": [ "cleared", "missing" ], "title": "ActorClearPersonBatchResponse" }, "ActorField": { "type": "string", "enum": [ "gender", "birthday", "birthplace", "height", "bust", "waist", "hip", "cup", "overview", "tagline", "image_urls", "aliases" ], "title": "ActorField", "description": "演员人物档案的可锁字段; 除 ``ALIASES`` 外取值与 Actor 列名同形." }, "ActorGender": { "type": "string", "enum": [ "female", "male", "unknown" ], "title": "ActorGender", "description": "演员性别 - 用于展示与按站裁剪刮削源." }, "ActorGenderBatchRequest": { "properties": { "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "演员 ID 列表; 上限防 SQLite 绑定变量超限" }, "gender": { "$ref": "#/components/schemas/ActorGender", "description": "统一写入的性别" } }, "type": "object", "required": [ "ids", "gender" ], "title": "ActorGenderBatchRequest", "description": "批量把同一性别写给一组演员; 写入字段按 MANUAL 语义加锁." }, "ActorGenderBatchResponse": { "properties": { "updated": { "type": "integer", "title": "Updated", "description": "实际写入的演员数" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的演员 id 数" } }, "type": "object", "required": [ "updated", "missing" ], "title": "ActorGenderBatchResponse" }, "ActorListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ActorResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "ActorListResponse" }, "ActorLocksRequest": { "properties": { "fields": { "items": { "$ref": "#/components/schemas/ActorField" }, "type": "array", "title": "Fields", "description": "锁定的字段集合; 空集解除全部锁定" } }, "type": "object", "title": "ActorLocksRequest", "description": "整体替换锁定字段集合." }, "ActorPushResult": { "properties": { "type": { "type": "string", "const": "actor_push", "title": "Type", "default": "actor_push" }, "requested": { "type": "integer", "title": "Requested" }, "matched": { "type": "integer", "title": "Matched" }, "updated": { "type": "integer", "title": "Updated" }, "images": { "type": "integer", "title": "Images" }, "skipped": { "type": "integer", "title": "Skipped" }, "not_found": { "type": "integer", "title": "Not Found" }, "no_image": { "type": "integer", "title": "No Image" }, "missing": { "type": "integer", "title": "Missing" }, "failed": { "type": "integer", "title": "Failed" }, "failures": { "items": { "type": "string" }, "type": "array", "title": "Failures" } }, "type": "object", "required": [ "requested", "matched", "updated", "images", "skipped", "not_found", "no_image", "missing", "failed", "failures" ], "title": "ActorPushResult" }, "ActorPushSubmission": { "properties": { "actor_ids": { "items": { "type": "integer" }, "type": "array", "title": "Actor Ids", "description": "要推送的演员 ID; 空表示全部演员" }, "force": { "type": "boolean", "title": "Force", "description": "覆盖媒体服务器上已有的头像与人物字段", "default": false }, "type": { "type": "string", "const": "actor_push", "title": "Type" } }, "type": "object", "required": [ "type" ], "title": "ActorPushSubmission" }, "ActorResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "count": { "type": "integer", "title": "Count", "default": 0 }, "aliases": { "items": { "type": "string" }, "type": "array", "title": "Aliases", "description": "别名行 (保序; 不含展示名)" }, "user_tags": { "items": { "$ref": "#/components/schemas/UserTagResponse" }, "type": "array", "title": "User Tags", "description": "用户标签 (仅详情)" }, "gender": { "$ref": "#/components/schemas/ActorGender", "default": "unknown" }, "birthday": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Birthday" }, "birthplace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Birthplace" }, "height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Height" }, "bust": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bust" }, "waist": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Waist" }, "hip": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Hip" }, "cup": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cup" }, "overview": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Overview" }, "tagline": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tagline" }, "image_urls": { "items": { "type": "string" }, "type": "array", "title": "Image Urls" }, "provider_ids": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Provider Ids" }, "source_urls": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Source Urls" }, "field_sources": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Field Sources" }, "raw": { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object", "title": "Raw" }, "locked_fields": { "items": { "$ref": "#/components/schemas/ActorField" }, "type": "array", "title": "Locked Fields", "default": [] }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "name" ], "title": "ActorResponse", "description": "详情填全量; 列表 (`GET /actors`) 只填卡片/表格字段, 其余 (简介/别名/标签/源字典/raw/锁) 为空." }, "ActorScrapeRequest": { "properties": { "use_cache": { "items": { "$ref": "#/components/schemas/CacheKind" }, "type": "array", "uniqueItems": true, "title": "Use Cache", "description": "启用的缓存种类 (metadata: 复用 Actor.raw; trans: 预留译文). 空集 = 全部强制刷新" } }, "type": "object", "title": "ActorScrapeRequest" }, "ActorScrapeResult": { "properties": { "type": { "type": "string", "const": "actor_scrape", "title": "Type", "default": "actor_scrape" }, "actor_id": { "type": "integer", "title": "Actor Id" }, "field_sources": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Field Sources" }, "failed_sites": { "items": { "type": "string" }, "type": "array", "title": "Failed Sites" }, "image_count": { "type": "integer", "title": "Image Count" }, "outcomes": { "items": { "$ref": "#/components/schemas/SiteOutcomeRecord" }, "type": "array", "title": "Outcomes" } }, "type": "object", "required": [ "actor_id", "field_sources", "failed_sites", "image_count" ], "title": "ActorScrapeResult" }, "ActorScrapeSubmission": { "properties": { "type": { "type": "string", "const": "actor_scrape", "title": "Type" }, "actor_id": { "type": "integer", "title": "Actor Id", "description": "Actor 实体 ID" }, "use_cache": { "items": { "$ref": "#/components/schemas/CacheKind" }, "type": "array", "uniqueItems": true, "title": "Use Cache", "description": "启用的缓存种类 (metadata: 复用 Actor.raw; trans: 预留译文). 空集 = 全部强制刷新" } }, "type": "object", "required": [ "type", "actor_id" ], "title": "ActorScrapeSubmission" }, "ActorScrapingConfig": { "properties": { "profile_sites": { "items": { "type": "string", "enum": [ "minnano", "javdb", "wikipedia", "theporndb", "avbase" ] }, "type": "array", "title": "Profile Sites", "description": "资料来源顺序 (单源字段填空优先级); 仅演员资料来源", "x-ordered": true }, "image_sites": { "items": { "type": "string", "enum": [ "gfriends" ] }, "type": "array", "title": "Image Sites", "description": "头像来源顺序 (优先于资料来源附图); 仅演员头像来源", "x-ordered": true }, "download_images": { "type": "boolean", "title": "Download Images", "default": true }, "auto_scrape": { "type": "boolean", "title": "Auto Scrape", "default": true }, "auto_push": { "type": "boolean", "title": "Auto Push", "description": "演员刮削成功后自动将该演员推送到媒体服务器", "default": false }, "gfriends_repo": { "type": "string", "title": "Gfriends Repo", "description": "gFriends GitHub 仓库 URL", "default": "https://github.com/gfriends/gfriends" } }, "type": "object", "title": "ActorScrapingConfig", "description": "资料来源顺序填空, 头像来源优先." }, "ActorSortField": { "type": "string", "enum": [ "name", "count", "updated_at", "has_image", "birthday", "height", "bust", "waist", "hip", "cup" ], "title": "ActorSortField" }, "ActorUpdateRequest": { "properties": { "gender": { "anyOf": [ { "$ref": "#/components/schemas/ActorGender" }, { "type": "null" } ] }, "birthday": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Birthday" }, "birthplace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Birthplace" }, "height": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Height" }, "bust": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Bust" }, "waist": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Waist" }, "hip": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Hip" }, "cup": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cup" }, "overview": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Overview" }, "tagline": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tagline" }, "image_urls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Image Urls" }, "provider_ids": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Provider Ids" }, "source_urls": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Source Urls" }, "aliases": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Aliases", "description": "别名行 (保序), 整表替换" } }, "type": "object", "title": "ActorUpdateRequest" }, "ActorUserTagsRequest": { "properties": { "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "演员 ID 列表" }, "user_tag_ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "User Tag Ids", "description": "用户标签 ID 列表" }, "action": { "type": "string", "enum": [ "attach", "detach" ], "title": "Action", "description": "attach 为并入, detach 为移除; 两者均幂等" } }, "type": "object", "required": [ "ids", "user_tag_ids", "action" ], "title": "ActorUserTagsRequest" }, "AgentCancelResponse": { "properties": { "cancelled": { "type": "boolean", "title": "Cancelled" } }, "type": "object", "required": [ "cancelled" ], "title": "AgentCancelResponse" }, "AgentConfig": { "properties": { "api_type": { "$ref": "#/components/schemas/ApiType", "default": "response" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "base_url": { "type": "string", "title": "Base Url", "default": "https://api.openai.com/v1" }, "model": { "type": "string", "title": "Model", "default": "gpt-4o-mini" }, "thinking": { "anyOf": [ { "$ref": "#/components/schemas/AgentThinkingMode" }, { "type": "null" } ] }, "max_tokens": { "type": "integer", "minimum": 1.0, "title": "Max Tokens", "default": 128000 }, "rate_limit": { "type": "number", "maximum": 100.0, "minimum": 0.1, "title": "Rate Limit", "default": 2.0 }, "retry_initial_s": { "type": "number", "maximum": 60.0, "minimum": 0.1, "title": "Retry Initial S", "default": 1.0 }, "retry_max_s": { "type": "number", "maximum": 600.0, "minimum": 1.0, "title": "Retry Max S", "default": 60.0 }, "sql_timeout_ms": { "type": "integer", "maximum": 60000.0, "minimum": 50.0, "title": "Sql Timeout Ms", "default": 5000, "x-hidden": true }, "result_cache_ttl_s": { "type": "integer", "maximum": 86400.0, "minimum": 60.0, "title": "Result Cache Ttl S", "default": 3600, "x-hidden": true }, "result_cache_max_entries": { "type": "integer", "maximum": 1000.0, "minimum": 1.0, "title": "Result Cache Max Entries", "default": 64, "x-hidden": true }, "history_ttl_s": { "type": "integer", "maximum": 86400.0, "minimum": 60.0, "title": "History Ttl S", "default": 3600, "x-hidden": true }, "history_max_sessions": { "type": "integer", "maximum": 500.0, "minimum": 1.0, "title": "History Max Sessions", "default": 32, "x-hidden": true } }, "type": "object", "title": "AgentConfig", "description": "与 llm 翻译 section 分离: 凭据/模型/限速各自独立." }, "AgentSessionCreateRequest": { "properties": { "title": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Title", "default": "新会话" } }, "type": "object", "title": "AgentSessionCreateRequest" }, "AgentSessionListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AgentSessionResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "AgentSessionListResponse" }, "AgentSessionResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "status": { "$ref": "#/components/schemas/AgentSessionStatus" }, "thinking": { "anyOf": [ { "$ref": "#/components/schemas/AgentThinkingMode" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "title", "status", "created_at", "updated_at" ], "title": "AgentSessionResponse" }, "AgentSessionStatus": { "type": "string", "enum": [ "active", "awaiting_approval", "closed" ], "title": "AgentSessionStatus" }, "AgentSessionTitleRequest": { "properties": { "prompt": { "type": "string", "maxLength": 4000, "minLength": 1, "title": "Prompt" } }, "type": "object", "required": [ "prompt" ], "title": "AgentSessionTitleRequest", "description": "首条用户输入: 标题只依据它生成." }, "AgentSessionTitleResponse": { "properties": { "title": { "type": "string", "title": "Title" } }, "type": "object", "required": [ "title" ], "title": "AgentSessionTitleResponse" }, "AgentSessionUpdateRequest": { "properties": { "title": { "anyOf": [ { "type": "string", "maxLength": 200, "minLength": 1 }, { "type": "null" } ], "title": "Title" }, "thinking": { "anyOf": [ { "$ref": "#/components/schemas/AgentThinkingMode" }, { "type": "null" } ] } }, "type": "object", "title": "AgentSessionUpdateRequest", "description": "title / thinking 均可选; thinking=null 表示取消覆盖, 继承全局默认." }, "AgentThinkingMode": { "type": "string", "enum": [ "off", "minimal", "low", "medium", "high", "xhigh" ], "title": "AgentThinkingMode", "description": "会话可覆盖; 全局为新建会话的回退默认." }, "AgentTraceResponse": { "properties": { "meta": { "additionalProperties": true, "type": "object", "title": "Meta" }, "events": { "items": { "oneOf": [ { "$ref": "#/components/schemas/UserMessageRow" }, { "$ref": "#/components/schemas/ReasoningDeltaRow" }, { "$ref": "#/components/schemas/TextDeltaRow" }, { "$ref": "#/components/schemas/ToolCallRow" }, { "$ref": "#/components/schemas/ToolResultRow" }, { "$ref": "#/components/schemas/RequestUsageRow" }, { "$ref": "#/components/schemas/TurnUsageRow" }, { "$ref": "#/components/schemas/ApprovalsRow" }, { "$ref": "#/components/schemas/RetriedRow" }, { "$ref": "#/components/schemas/ErrorRow" }, { "$ref": "#/components/schemas/CancelledRow" } ], "discriminator": { "propertyName": "type", "mapping": { "approvals": "#/components/schemas/ApprovalsRow", "cancelled": "#/components/schemas/CancelledRow", "error": "#/components/schemas/ErrorRow", "reasoning_delta": "#/components/schemas/ReasoningDeltaRow", "request_usage": "#/components/schemas/RequestUsageRow", "retried": "#/components/schemas/RetriedRow", "text_delta": "#/components/schemas/TextDeltaRow", "tool_call": "#/components/schemas/ToolCallRow", "tool_result": "#/components/schemas/ToolResultRow", "turn_usage": "#/components/schemas/TurnUsageRow", "user_message": "#/components/schemas/UserMessageRow" } } }, "type": "array", "title": "Events" }, "turn_running": { "type": "boolean", "title": "Turn Running", "default": false }, "last_seq": { "type": "integer", "title": "Last Seq", "default": 0 } }, "type": "object", "required": [ "meta", "events" ], "title": "AgentTraceResponse" }, "ApiType": { "type": "string", "enum": [ "chat", "response", "anthropic" ], "title": "ApiType" }, "ApprovalsRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "approvals", "title": "Type" }, "interrupts": { "items": { "$ref": "#/components/schemas/Interrupt" }, "type": "array", "title": "Interrupts" } }, "additionalProperties": false, "type": "object", "required": [ "type", "interrupts" ], "title": "ApprovalsRow", "description": "未决审批快照. 每个回合结束发一条, **空列表表示已无未决**, 后者覆盖前者.\n\n原样携带 AG-UI 中断: 前端既用它渲染审批入口, 也把它交给 runtime 完成 `resume`." }, "Body_install_plugin": { "properties": { "file": { "anyOf": [ { "type": "string", "contentMediaType": "application/octet-stream" }, { "type": "null" } ], "title": "File", "description": "Zip containing plugin.py" }, "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path", "description": "Server path to a plugin directory or zip" } }, "type": "object", "title": "Body_install_plugin" }, "BrowserBackendItemResponse": { "properties": { "backend": { "$ref": "#/components/schemas/BrowserBackendName" }, "available": { "type": "boolean", "title": "Available" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Version" }, "browsers": { "items": { "$ref": "#/components/schemas/BrowserInstanceResponse" }, "type": "array", "title": "Browsers" } }, "additionalProperties": false, "type": "object", "required": [ "backend", "available" ], "title": "BrowserBackendItemResponse", "description": "一个后端的可用性.\n\n``detail`` 是环境抛出的原文 (缺模块、缺 CLI、浏览器未连接、solver 应答错误), 界面原样展示;\n``version`` 目前只有 bsk 有 (daemon 版本)." }, "BrowserBackendName": { "type": "string", "enum": [ "off", "patchright", "camoufox", "bsk", "solver" ], "title": "BrowserBackendName" }, "BrowserBackendReportResponse": { "properties": { "selected": { "$ref": "#/components/schemas/BrowserBackendName" }, "items": { "items": { "$ref": "#/components/schemas/BrowserBackendItemResponse" }, "type": "array", "title": "Items" } }, "additionalProperties": false, "type": "object", "required": [ "selected" ], "title": "BrowserBackendReportResponse", "description": "``selected`` 是当前生效的后端, 供界面标出「已选但不可用」这一种组合." }, "BrowserConfig": { "properties": { "backend": { "$ref": "#/components/schemas/BrowserBackendName", "default": "off" }, "bsk_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Bsk Path", "x-path-type": "file", "x-widget": "PathPicker" }, "timeout": { "type": "integer", "maximum": 120000.0, "minimum": 5000.0, "title": "Timeout", "default": 30000 }, "solver_url": { "type": "string", "pattern": "^https?://.+", "title": "Solver Url", "default": "http://127.0.0.1:8191" } }, "type": "object", "title": "BrowserConfig" }, "BrowserInstanceResponse": { "properties": { "instance_id": { "type": "string", "title": "Instance Id" }, "name": { "type": "string", "title": "Name" }, "extension_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extension Version" }, "unresponsive": { "type": "boolean", "title": "Unresponsive", "default": false } }, "additionalProperties": false, "type": "object", "required": [ "instance_id", "name" ], "title": "BrowserInstanceResponse", "description": "bsk 已连接的浏览器实例; 只用于展示, 选择实例属于后续能力." }, "BrowserMode": { "type": "string", "enum": [ "off", "auto", "always" ], "title": "BrowserMode" }, "CacheKind": { "type": "string", "enum": [ "metadata", "trans" ], "title": "CacheKind", "description": "刮削可复用的缓存种类. use_cache 为其集合: 含某项 = 该缓存生效, 不含 = 强制刷新该项." }, "CancelledRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "cancelled", "title": "Type" } }, "additionalProperties": false, "type": "object", "required": [ "type" ], "title": "CancelledRow", "description": "回合被显式终止." }, "CleanupResult": { "properties": { "type": { "type": "string", "const": "cleanup", "title": "Type", "default": "cleanup" }, "files_removed": { "type": "integer", "title": "Files Removed" }, "resources_removed": { "type": "integer", "title": "Resources Removed" } }, "type": "object", "required": [ "files_removed", "resources_removed" ], "title": "CleanupResult" }, "CleanupSubmission": { "properties": { "remove_missing_files": { "type": "boolean", "title": "Remove Missing Files", "description": "删除磁盘上不存在的 MediaFile 记录 (不触碰 Metadata)", "default": true }, "remove_unreferenced_resources": { "type": "boolean", "title": "Remove Unreferenced Resources", "description": "删除不被任何 Metadata URL 字段引用的 Resource (含派生裁剪)", "default": true }, "type": { "type": "string", "const": "cleanup", "title": "Type" } }, "type": "object", "required": [ "type" ], "title": "CleanupSubmission" }, "CloudDriveChangeItem": { "properties": { "action": { "type": "string", "enum": [ "create", "delete", "rename" ], "title": "Action" }, "is_dir": { "type": "boolean", "title": "Is Dir" }, "source_file": { "type": "string", "title": "Source File" }, "destination_file": { "type": "string", "title": "Destination File", "default": "" } }, "type": "object", "required": [ "action", "is_dir", "source_file" ], "title": "CloudDriveChangeItem" }, "CloudDriveNotifyRequest": { "properties": { "data": { "items": { "$ref": "#/components/schemas/CloudDriveChangeItem" }, "type": "array", "title": "Data" } }, "type": "object", "title": "CloudDriveNotifyRequest", "description": "CloudDrive file_system_watcher 模板体. 未知字段忽略." }, "CommentCreateRequest": { "properties": { "body": { "type": "string", "maxLength": 10000, "minLength": 1, "title": "Body" } }, "type": "object", "required": [ "body" ], "title": "CommentCreateRequest" }, "CommentResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "metadata_id": { "type": "integer", "title": "Metadata Id" }, "body": { "type": "string", "title": "Body" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "metadata_id", "body", "created_at", "updated_at" ], "title": "CommentResponse" }, "CommentUpdateRequest": { "properties": { "body": { "type": "string", "maxLength": 10000, "minLength": 1, "title": "Body" } }, "type": "object", "required": [ "body" ], "title": "CommentUpdateRequest" }, "ConnectivityCheckRequest": { "properties": { "source_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Source Ids" } }, "additionalProperties": false, "type": "object", "title": "ConnectivityCheckRequest", "description": "缺省或空 ``source_ids`` = 探测当前配置真正会请求的全部来源." }, "ConnectivityItemResponse": { "properties": { "source_id": { "type": "string", "title": "Source Id" }, "name": { "type": "string", "title": "Name" }, "kind": { "$ref": "#/components/schemas/SourceKind" }, "status": { "$ref": "#/components/schemas/ConnectivityStatus" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url" }, "http_status": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Http Status" }, "reason": { "anyOf": [ { "$ref": "#/components/schemas/FailureReason" }, { "type": "null" } ] }, "skip_reason": { "anyOf": [ { "$ref": "#/components/schemas/SkipReason" }, { "type": "null" } ] }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" }, "elapsed_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Elapsed Ms" } }, "additionalProperties": false, "type": "object", "required": [ "source_id", "name", "kind", "status" ], "title": "ConnectivityItemResponse", "description": "一个来源的探测结果.\n\n``reason`` (失败) 与 ``skip_reason`` (未探测) 都是枚举, 本地化由前端完成; ``detail`` 是语言中立的\n补充说明 (例如异常类名), 界面原样渲染. ``elapsed_ms`` 只在真正探测过时有值." }, "ConnectivityReportResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ConnectivityItemResponse" }, "type": "array", "title": "Items" } }, "additionalProperties": false, "type": "object", "title": "ConnectivityReportResponse" }, "ConnectivityStatus": { "type": "string", "enum": [ "ok", "failed", "skipped" ], "title": "ConnectivityStatus", "description": "一次探测的结论. ``SKIPPED`` 是该来源本次不探测, 不是失败." }, "ContentType": { "type": "string", "enum": [ "censored", "uncensored", "chinese", "western", "fc2", "amateur", "hentai" ], "title": "ContentType" }, "CropAvatarRequest": { "properties": { "left": { "type": "integer", "minimum": 0.0, "title": "Left", "description": "裁切框左边界 (含)" }, "top": { "type": "integer", "minimum": 0.0, "title": "Top", "description": "裁切框上边界 (含)" }, "right": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Right", "description": "裁切框右边界 (不含)" }, "bottom": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Bottom", "description": "裁切框下边界 (不含)" }, "rotation": { "type": "integer", "enum": [ 0, 90, 180, 270 ], "title": "Rotation", "description": "裁切前顺时针旋转的角度 (仅 90° 整数倍); 90° / 270° 后宽高互换", "default": 0 } }, "type": "object", "required": [ "left", "top", "right", "bottom" ], "title": "CropAvatarRequest", "description": "从当前主图按像素框裁切头像 (相对 image_urls[0] 当前本地文件像素; 含就地超分后尺寸)." }, "CropPosterRequest": { "properties": { "left": { "type": "integer", "minimum": 0.0, "title": "Left", "description": "裁切框左边界 (含)" }, "top": { "type": "integer", "minimum": 0.0, "title": "Top", "description": "裁切框上边界 (含)" }, "right": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Right", "description": "裁切框右边界 (不含)" }, "bottom": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Bottom", "description": "裁切框下边界 (不含)" }, "rotation": { "type": "integer", "enum": [ 0, 90, 180, 270 ], "title": "Rotation", "description": "裁切前顺时针旋转的角度 (仅 90° 整数倍); 90° / 270° 后宽高互换", "default": 0 } }, "type": "object", "required": [ "left", "top", "right", "bottom" ], "title": "CropPosterRequest", "description": "从封面图按像素框裁切海报 (相对 thumb 当前本地文件像素; 含就地超分后尺寸)." }, "DeleteResult": { "properties": { "type": { "type": "string", "const": "delete", "title": "Type", "default": "delete" }, "deleted": { "type": "integer", "title": "Deleted" }, "changed": { "type": "integer", "title": "Changed" }, "failed": { "type": "integer", "title": "Failed" }, "freed_bytes": { "type": "integer", "title": "Freed Bytes", "default": 0 }, "hardlink_items": { "type": "integer", "title": "Hardlink Items", "default": 0 }, "pruned_dirs": { "type": "integer", "title": "Pruned Dirs", "default": 0 }, "excluded": { "type": "integer", "title": "Excluded", "default": 0 }, "indexed": { "type": "integer", "title": "Indexed", "default": 0 }, "reverify_rejected": { "type": "integer", "title": "Reverify Rejected", "default": 0 } }, "type": "object", "required": [ "deleted", "changed", "failed" ], "title": "DeleteResult" }, "DeleteSubmission": { "properties": { "library_id": { "type": "integer", "title": "Library Id", "description": "清单所属 Library ID" }, "inventory_id": { "type": "string", "title": "Inventory Id", "description": "后端生成的清单标识; 不存在或已过期则失败" }, "exclude": { "items": { "type": "string" }, "type": "array", "title": "Exclude", "description": "排除项: 库内为清单库根下的相对路径, 库外为绝对路径; 按路径分量匹配" }, "include": { "items": { "type": "string" }, "type": "array", "title": "Include", "description": "在排除项内重新纳入的路径 (路径约定同 exclude); 与排除项互为祖先时按最深的一条判定, 同一路径同时命中两组时按纳入处理" }, "prune_empty_dirs": { "type": "boolean", "title": "Prune Empty Dirs", "description": "删除本次腾空的目录 (库根与 .amane_trash 除外)", "default": true }, "type": { "type": "string", "const": "delete", "title": "Type" } }, "type": "object", "required": [ "library_id", "inventory_id", "type" ], "title": "DeleteSubmission" }, "DesktopResponse": { "properties": { "version": { "type": "string", "title": "Version" }, "data_dir": { "type": "string", "title": "Data Dir" }, "supervised": { "type": "boolean", "title": "Supervised", "default": false } }, "type": "object", "required": [ "version", "data_dir" ], "title": "DesktopResponse" }, "DownloadableResource": { "type": "string", "enum": [ "thumb", "poster", "extrafanart", "trailer" ], "title": "DownloadableResource", "description": "影片附属资源类型: 刮削写入 Resource, 整理时按库配置复制到库路径." }, "EmbeddingKind": { "type": "string", "enum": [ "cover", "still" ], "title": "EmbeddingKind" }, "ErrorRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "error", "title": "Type" }, "message": { "type": "string", "title": "Message" } }, "additionalProperties": false, "type": "object", "required": [ "type", "message" ], "title": "ErrorRow", "description": "回合异常; 文案直接进助手气泡." }, "FacetBatchAction": { "type": "string", "enum": [ "favorite", "unfavorite" ], "title": "FacetBatchAction", "description": "分类批量动作; 两个动作都是整体赋值且幂等.\n\n不设逐项取反 (toggle): 多选混合态下点「收藏」必须保持收藏, 取反会取消已收藏的条目. 枚举是\n动作信封的扩展位, 新增动作 (如批量删除) 时 ``FacetBatchResponse`` 的字段按动作解释." }, "FacetBatchRequest": { "properties": { "facet_ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Facet Ids", "description": "分类 ID 列表" }, "action": { "$ref": "#/components/schemas/FacetBatchAction", "description": "favorite 置为已收藏, unfavorite 置为未收藏; 两者均幂等" } }, "type": "object", "required": [ "facet_ids", "action" ], "title": "FacetBatchRequest", "description": "对一批分类执行同一个动作; 重复 id 去重, 使结果计数以去重后的条目数为准." }, "FacetBatchResponse": { "properties": { "changed": { "type": "integer", "title": "Changed", "description": "收藏位确实发生写入的分类数" }, "unchanged": { "type": "integer", "title": "Unchanged", "description": "已处于目标取值的分类数" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的分类 id 数" } }, "type": "object", "required": [ "changed", "unchanged", "missing" ], "title": "FacetBatchResponse", "description": "批量动作的结果计数, 字段按 action 解释; 两个已实现动作下三者之和等于去重后的条目数." }, "FacetKind": { "type": "string", "enum": [ "actor", "director", "tag", "studio", "publisher", "series", "user_tag" ], "title": "FacetKind" }, "FacetListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/FacetResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "FacetListResponse" }, "FacetMergeRequest": { "properties": { "target_id": { "type": "integer", "title": "Target Id" }, "source_ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Source Ids", "description": "待合并的来源 facet id 列表" } }, "type": "object", "required": [ "target_id", "source_ids" ], "title": "FacetMergeRequest" }, "FacetRenameRequest": { "properties": { "name": { "type": "string", "minLength": 1, "title": "Name", "description": "新名称" } }, "type": "object", "required": [ "name" ], "title": "FacetRenameRequest" }, "FacetResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "count": { "type": "integer", "title": "Count" }, "is_favorite": { "type": "boolean", "title": "Is Favorite" } }, "type": "object", "required": [ "id", "name", "count", "is_favorite" ], "title": "FacetResponse" }, "FacetRuleListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/FacetRuleResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "FacetRuleListResponse" }, "FacetRuleResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "kind": { "type": "string", "title": "Kind" }, "source_name": { "type": "string", "title": "Source Name" }, "action": { "type": "string", "title": "Action" }, "target_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Target Name" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "kind", "source_name", "action" ], "title": "FacetRuleResponse" }, "FacetSortField": { "type": "string", "enum": [ "name", "count" ], "title": "FacetSortField" }, "FailureReason": { "type": "string", "enum": [ "http_error", "api_error", "not_found", "rate_limited", "server_error", "timeout", "network", "cloudflare_challenge", "cloudflare_blocked", "ip_banned", "geo_restricted", "age_verification", "login_required", "empty_response", "no_usable_metadata", "parse_error", "crawler_unavailable", "unexpected" ], "title": "FailureReason", "description": "summary.json / task report 的 reason 字段." }, "FeedCreateRequest": { "properties": { "name": { "type": "string", "title": "Name", "default": "" }, "url": { "type": "string", "title": "Url" }, "group": { "type": "string", "title": "Group", "default": "" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "auto_enqueue": { "type": "boolean", "title": "Auto Enqueue", "default": true }, "interval_seconds": { "type": "integer", "maximum": 86400.0, "minimum": 60.0, "title": "Interval Seconds", "default": 3600 }, "number_pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Number Pattern" }, "content_type": { "anyOf": [ { "$ref": "#/components/schemas/ContentType" }, { "type": "null" } ] }, "use_cache": { "items": { "$ref": "#/components/schemas/CacheKind" }, "type": "array", "uniqueItems": true, "title": "Use Cache" }, "ignore_keywords": { "items": { "type": "string" }, "type": "array", "title": "Ignore Keywords" } }, "type": "object", "required": [ "url" ], "title": "FeedCreateRequest" }, "FeedItemBatchAction": { "type": "string", "enum": [ "ignore", "unignore", "read", "unread", "delete", "scrape" ], "title": "FeedItemBatchAction" }, "FeedItemBatchRequest": { "properties": { "action": { "$ref": "#/components/schemas/FeedItemBatchAction" }, "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids" } }, "type": "object", "required": [ "action", "ids" ], "title": "FeedItemBatchRequest" }, "FeedItemBatchResponse": { "properties": { "affected": { "type": "integer", "title": "Affected" }, "missing": { "type": "integer", "title": "Missing" }, "skipped": { "type": "integer", "title": "Skipped", "default": 0 }, "submitted": { "type": "integer", "title": "Submitted", "default": 0 }, "task_ids": { "items": { "type": "integer" }, "type": "array", "title": "Task Ids" } }, "type": "object", "required": [ "affected", "missing" ], "title": "FeedItemBatchResponse" }, "FeedItemListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/FeedItemResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "FeedItemListResponse" }, "FeedItemReadState": { "type": "string", "enum": [ "unread", "read", "all" ], "title": "FeedItemReadState" }, "FeedItemResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "feed_id": { "type": "integer", "title": "Feed Id" }, "item_key": { "type": "string", "title": "Item Key" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "link": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Number" }, "published_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Published At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "ignored_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ignored At" }, "read_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Read At" }, "metadata_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Metadata Id" } }, "type": "object", "required": [ "id", "feed_id", "item_key", "created_at" ], "title": "FeedItemResponse" }, "FeedItemState": { "type": "string", "enum": [ "active", "ignored", "all" ], "title": "FeedItemState" }, "FeedListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/FeedResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "FeedListResponse" }, "FeedResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "url": { "type": "string", "title": "Url" }, "group": { "type": "string", "title": "Group", "default": "" }, "enabled": { "type": "boolean", "title": "Enabled" }, "auto_enqueue": { "type": "boolean", "title": "Auto Enqueue" }, "interval_seconds": { "type": "integer", "title": "Interval Seconds" }, "number_pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Number Pattern" }, "content_type": { "anyOf": [ { "$ref": "#/components/schemas/ContentType" }, { "type": "null" } ] }, "use_cache": { "items": { "$ref": "#/components/schemas/CacheKind" }, "type": "array", "title": "Use Cache" }, "ignore_keywords": { "items": { "type": "string" }, "type": "array", "title": "Ignore Keywords" }, "next_fetch_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Next Fetch At" }, "last_fetched_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Fetched At" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "last_enqueued": { "type": "integer", "title": "Last Enqueued", "default": 0 }, "unread_count": { "type": "integer", "title": "Unread Count", "default": 0 } }, "type": "object", "required": [ "id", "name", "url", "enabled", "auto_enqueue", "interval_seconds" ], "title": "FeedResponse" }, "FeedUpdateRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url" }, "group": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Group" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "auto_enqueue": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Auto Enqueue" }, "interval_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Interval Seconds" }, "number_pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Number Pattern" }, "content_type": { "anyOf": [ { "$ref": "#/components/schemas/ContentType" }, { "type": "null" } ] }, "use_cache": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Use Cache" }, "ignore_keywords": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Ignore Keywords" } }, "type": "object", "title": "FeedUpdateRequest" }, "FileItem": { "properties": { "name": { "type": "string", "title": "Name", "description": "File or directory name." }, "path": { "type": "string", "title": "Path", "description": "Absolute POSIX path." }, "type": { "type": "string", "enum": [ "file", "directory" ], "title": "Type", "description": "Entry type." }, "size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Size", "description": "File size in bytes (omitted for directories)." }, "last_modified": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Modified", "description": "Last modification time." } }, "type": "object", "required": [ "name", "path", "type" ], "title": "FileItem" }, "FileListResponse": { "properties": { "path": { "type": "string", "title": "Path", "description": "Canonical absolute path of the listed directory (POSIX-style)." }, "items": { "items": { "$ref": "#/components/schemas/FileItem" }, "type": "array", "title": "Items", "description": "Entries sorted directories-first, then by name (case-insensitive). Truncated to 1000." }, "total": { "type": "integer", "title": "Total", "description": "Total entry count before truncation." } }, "type": "object", "required": [ "path", "items", "total" ], "title": "FileListResponse" }, "FilePhaseSummary": { "properties": { "has_subtitle": { "type": "boolean", "title": "Has Subtitle", "default": false }, "censored": { "type": "boolean", "title": "Censored", "default": false }, "uncensored": { "type": "boolean", "title": "Uncensored", "default": false }, "mosaics": { "items": { "$ref": "#/components/schemas/Mosaic" }, "type": "array", "title": "Mosaics", "default": [] }, "definition": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Definition" } }, "type": "object", "title": "FilePhaseSummary", "description": "条目相位聚合; 判定见 ``parsing/file_info.py::summarize_file_phases``, definition 取最高档." }, "FootprintNoticeKind": { "type": "string", "enum": [ "missing", "outside_root", "work_dir_is_root", "work_dir_multiple", "template_error" ], "title": "FootprintNoticeKind", "description": "未能纳入清单的项. 只给码与参数, 文案由面板按界面语言给出." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HealthResponse": { "properties": { "status": { "type": "string", "title": "Status", "default": "ok" }, "version": { "type": "string", "title": "Version" } }, "type": "object", "required": [ "version" ], "title": "HealthResponse" }, "HotSettings": { "properties": { "scraping": { "$ref": "#/components/schemas/ScrapingConfig", "default": { "download_resources": [ "thumb", "poster", "extrafanart" ], "crop_poster": true, "poster_ratio": 0.7, "poster_crop_skip_ratio": 0.9, "jpeg_quality": 95, "content_routes": { "amateur": [ "mgstage", "dmm", "javdb", "javbus" ], "censored": [ "dmm", "javdb", "javbus", "official" ], "chinese": [ "iqqtv", "javdb", "airav", "freejavbt" ], "fc2": [ "javdb", "fc2ppvdb", "fc2", "freejavbt", "airav" ], "hentai": [ "getchu", "dmm", "javdb" ], "uncensored": [ "javdb", "javbus", "avsox", "freejavbt", "1pondo", "caribbeancom", "10musume", "pacopacomama", "muramura", "h4610", "c0930", "h0930", "heyzo" ], "western": [ "theporndb", "javdb", "freejavbt" ] }, "field_priority": {}, "field_blacklist": {}, "field_language": { "actors": "zh_cn", "directors": "zh_cn", "plot": "zh_cn", "publisher": "zh_cn", "series": "zh_cn", "studio": "zh_cn", "tags": "zh_cn", "title": "zh_cn" }, "site_config": { "10musume": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "1pondo": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "airav": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "avbase": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "avsox": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "c0930": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "caribbeancom": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "dahlia": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "dmm": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "faleno": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "fc2": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "fc2club": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "fc2ppvdb": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "freejavbt": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "getchu": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "gfriends": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "giga": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "h0930": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "h4610": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "heyzo": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "iqqtv": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "jav321": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "javbus": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "javdb": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "javlibrary": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "kin8": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "mgstage": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "minnano": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "muramura": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "official": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "pacopacomama": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "prestige": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "r18dev": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "theporndb": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "wikipedia": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true }, "xcity": { "cookie": {}, "languages": [ "zh", "ja", "en" ], "official_routes": {}, "rate_limit": 2.0, "use_browser": "auto", "use_proxy": true } } } }, "media_server": { "$ref": "#/components/schemas/MediaServerConfig", "default": { "kind": "jellyfin", "verify_tls": true } }, "actor_scraping": { "$ref": "#/components/schemas/ActorScrapingConfig", "default": { "profile_sites": [ "minnano", "javdb", "wikipedia", "theporndb", "avbase" ], "image_sites": [ "gfriends" ], "download_images": true, "auto_scrape": true, "auto_push": false, "gfriends_repo": "https://github.com/gfriends/gfriends" } }, "agent": { "$ref": "#/components/schemas/AgentConfig", "default": { "api_type": "response", "base_url": "https://api.openai.com/v1", "model": "gpt-4o-mini", "max_tokens": 128000, "rate_limit": 2.0, "retry_initial_s": 1.0, "retry_max_s": 60.0, "sql_timeout_ms": 5000, "result_cache_ttl_s": 3600, "result_cache_max_entries": 64, "history_ttl_s": 3600, "history_max_sessions": 32 } }, "network": { "$ref": "#/components/schemas/NetworkConfig", "default": { "timeout": 10.0, "max_retries": 2, "max_clients": 50, "browser": { "backend": "off", "solver_url": "http://127.0.0.1:8191", "timeout": 30000 }, "chunked_threshold": 2097152, "chunk_size": 1048576, "concurrency": 10, "rate_limits": {}, "default_rate_limit": 5.0 } }, "sr": { "$ref": "#/components/schemas/SrConfig", "default": { "enabled": false, "max_dim_threshold": 1200, "max_bytes_threshold": 2097152, "preset": "waifu-photo-2x", "output_format": "jpg", "tta": false } }, "semantic": { "$ref": "#/components/schemas/SemanticConfig", "default": { "auto_maintain": false } }, "watermark": { "$ref": "#/components/schemas/WatermarkConfig", "default": { "enabled": false, "scale": 0.08, "corners": { "cracked": "top_left", "definition": "top_left", "leaked": "top_left", "subtitle": "top_left", "uncensored": "top_left" } } }, "llm": { "$ref": "#/components/schemas/LLMConfig", "default": { "enabled": false, "translate_fields": [ "title", "plot" ], "field_prompts": {}, "api_type": "chat", "base_url": "https://api.openai.com/v1", "model": "", "rate_limit": 2.0 } }, "r18": { "$ref": "#/components/schemas/R18Config", "default": { "db_name": "r18dev", "read_user": "r18dev_readonly", "read_password": "r18dev_readonly", "read_timeout": 30, "psql_path": "psql" } }, "watcher": { "$ref": "#/components/schemas/WatcherConfig", "default": { "use_polling": false, "debounce_seconds": 3.0, "media_extensions": [ ".mp4", ".mkv", ".avi", ".wmv", ".flv", ".mov", ".ts", ".iso", ".strm" ] } }, "worker": { "$ref": "#/components/schemas/WorkerConfig", "default": { "concurrency": 10, "poll_interval": 2.0, "shutdown_timeout": 0.0 } }, "logging": { "$ref": "#/components/schemas/LoggingConfig", "default": { "level": "INFO", "debug_capture": false } }, "plugins": { "additionalProperties": { "$ref": "#/components/schemas/PluginConfig" }, "type": "object", "title": "Plugins", "x-hidden": true } }, "additionalProperties": false, "type": "object", "title": "HotSettings", "description": "运行时可更新, 持久化到 TOML. extra=forbid, 未知字段须校验失败." }, "Interrupt": { "properties": { "id": { "type": "string", "title": "Id" }, "reason": { "type": "string", "title": "Reason" }, "message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message" }, "toolCallId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Toolcallid" }, "responseSchema": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Responseschema" }, "expiresAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expiresat" }, "metadata": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Metadata" }, "subagentRunId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subagentrunid" } }, "additionalProperties": true, "type": "object", "required": [ "id", "reason" ], "title": "Interrupt", "description": "A pause carried inside ``RunFinishedEvent.outcome`` when the outcome is\n``RunFinishedInterruptOutcome``. The client resumes\nby addressing this interrupt in the resume array of the next RunAgentInput." }, "InventoryEntryKind": { "type": "string", "enum": [ "file", "dir", "symlink" ], "title": "InventoryEntryKind" }, "InventoryNodePage": { "properties": { "path": { "type": "string", "title": "Path" }, "items": { "items": { "$ref": "#/components/schemas/InventoryNodeResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "offset": { "type": "integer", "title": "Offset" }, "limit": { "type": "integer", "title": "Limit" }, "entry_count": { "type": "integer", "title": "Entry Count" }, "entry_bytes": { "type": "integer", "title": "Entry Bytes" } }, "type": "object", "required": [ "path", "items", "total", "offset", "limit", "entry_count", "entry_bytes" ], "title": "InventoryNodePage", "description": "一个目录的子节点切片. 面板只渲染 ``items``, 滚到底再按 ``offset`` 取下一页." }, "InventoryNodeResponse": { "properties": { "path": { "type": "string", "title": "Path" }, "name": { "type": "string", "title": "Name" }, "kind": { "$ref": "#/components/schemas/InventoryEntryKind" }, "reason": { "anyOf": [ { "$ref": "#/components/schemas/InventoryReason" }, { "type": "null" } ] }, "size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Size" }, "hardlink": { "type": "boolean", "title": "Hardlink", "default": false }, "entry_count": { "type": "integer", "title": "Entry Count" }, "entry_bytes": { "type": "integer", "title": "Entry Bytes" }, "will_be_empty": { "type": "boolean", "title": "Will Be Empty", "default": false }, "noise": { "type": "boolean", "title": "Noise", "default": false }, "has_children": { "type": "boolean", "title": "Has Children", "default": false }, "children": { "anyOf": [ { "items": { "$ref": "#/components/schemas/InventoryNodeResponse" }, "type": "array" }, { "type": "null" } ], "title": "Children" } }, "type": "object", "required": [ "path", "name", "kind", "entry_count", "entry_bytes" ], "title": "InventoryNodeResponse", "description": "树节点. ``path`` 库内为相对路径, 库外为绝对路径, 一律 `/` 分隔; 子节点按需再取." }, "InventoryReason": { "type": "string", "enum": [ "blacklist", "undersized", "empty_dir", "explicit", "orphan" ], "title": "InventoryReason" }, "InventorySummaryResponse": { "properties": { "exists": { "type": "boolean", "title": "Exists" }, "inventory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Inventory Id" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "scope_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Path" }, "truncated": { "type": "boolean", "title": "Truncated", "default": false }, "dropped": { "type": "integer", "title": "Dropped", "default": 0 }, "skipped_dirs": { "type": "integer", "title": "Skipped Dirs", "default": 0 }, "skipped_files": { "type": "integer", "title": "Skipped Files", "default": 0 }, "blocked_dirs": { "type": "integer", "title": "Blocked Dirs", "default": 0 }, "scan_running": { "type": "boolean", "title": "Scan Running", "default": false }, "last_scan_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Scan Error" } }, "type": "object", "required": [ "exists" ], "title": "InventorySummaryResponse", "description": "面板入口: 状态与范围. ``exists`` 为假时其余字段无意义; 节点一律经分页接口另取." }, "JsonValue": {}, "LLMConfig": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false }, "translate_fields": { "items": { "$ref": "#/components/schemas/MetadataField" }, "type": "array", "title": "Translate Fields" }, "system_prompt": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "System Prompt", "x-long": true }, "field_prompts": { "additionalProperties": { "type": "string", "maxLength": 2000, "x-long": true }, "propertyNames": { "$ref": "#/components/schemas/MetadataField" }, "type": "object", "title": "Field Prompts" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "api_type": { "$ref": "#/components/schemas/ApiType", "default": "chat" }, "base_url": { "type": "string", "title": "Base Url", "default": "https://api.openai.com/v1" }, "model": { "type": "string", "title": "Model", "default": "" }, "rate_limit": { "type": "number", "maximum": 100.0, "minimum": 0.1, "title": "Rate Limit", "default": 2.0 } }, "type": "object", "title": "LLMConfig", "description": "凭据放 Hot, 可在 UI 修改并热生效. 与 agent section 隔离." }, "Language": { "type": "string", "enum": [ "zh_cn", "zh_tw", "jp", "en" ], "title": "Language" }, "LibraryAutomation": { "type": "string", "enum": [ "none", "watch", "scrape" ], "title": "LibraryAutomation", "description": "媒体库自动化级别 (只控制发现侧). 含更低级别的行为; 自动整理由 `Library.auto_organize` 单独控制." }, "LibraryCreateRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "path": { "type": "string", "title": "Path" }, "automation": { "$ref": "#/components/schemas/LibraryAutomation", "default": "scrape" }, "auto_organize": { "type": "boolean", "title": "Auto Organize", "default": false }, "ingest": { "$ref": "#/components/schemas/LibraryIngest", "default": "native" }, "cloud_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cloud Path" }, "recursive": { "type": "boolean", "title": "Recursive", "default": true }, "patterns": { "items": { "type": "string" }, "type": "array", "title": "Patterns", "default": [] }, "move_mode": { "$ref": "#/components/schemas/MoveMode", "default": "move" }, "video_template": { "type": "string", "title": "Video Template", "default": "{studio}/{number}/{number}[-CD{cd?}][-{sub?}].{ext}" }, "link_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link Template" }, "link_mode": { "$ref": "#/components/schemas/LinkMode", "default": "strm" }, "strm_content_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Strm Content Template" }, "thumb_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumb Template" }, "poster_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Poster Template" }, "fanart_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fanart Template" }, "extrafanart_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrafanart Template" }, "extrafanart_name_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrafanart Name Template" }, "nfo_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nfo Template" }, "trailer_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trailer Template" }, "subtitle_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subtitle Template" }, "subtitle_extensions": { "items": { "type": "string" }, "type": "array", "title": "Subtitle Extensions" }, "write_nfo": { "type": "boolean", "title": "Write Nfo", "default": true }, "copy_resources": { "items": { "$ref": "#/components/schemas/DownloadableResource" }, "type": "array", "title": "Copy Resources" }, "trailer_pattern": { "type": "string", "title": "Trailer Pattern", "default": "(?i)trailer" }, "blacklist_patterns": { "items": { "type": "string" }, "type": "array", "title": "Blacklist Patterns", "default": [] }, "min_file_size": { "type": "integer", "title": "Min File Size", "default": 0 }, "scan": { "type": "boolean", "title": "Scan", "default": true } }, "type": "object", "required": [ "path" ], "title": "LibraryCreateRequest" }, "LibraryIngest": { "type": "string", "enum": [ "native", "clouddrive" ], "title": "LibraryIngest", "description": "媒体库文件发现通道. automation=none 时两边都不收事件." }, "LibraryListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/LibraryResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "LibraryListResponse" }, "LibraryResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "path": { "type": "string", "title": "Path" }, "automation": { "$ref": "#/components/schemas/LibraryAutomation" }, "auto_organize": { "type": "boolean", "title": "Auto Organize" }, "ingest": { "$ref": "#/components/schemas/LibraryIngest" }, "cloud_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cloud Path" }, "recursive": { "type": "boolean", "title": "Recursive" }, "patterns": { "items": { "type": "string" }, "type": "array", "title": "Patterns", "default": [] }, "move_mode": { "$ref": "#/components/schemas/MoveMode" }, "video_template": { "type": "string", "title": "Video Template" }, "link_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link Template" }, "link_mode": { "$ref": "#/components/schemas/LinkMode" }, "strm_content_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Strm Content Template" }, "thumb_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumb Template" }, "poster_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Poster Template" }, "fanart_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fanart Template" }, "extrafanart_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrafanart Template" }, "extrafanart_name_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrafanart Name Template" }, "nfo_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nfo Template" }, "trailer_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trailer Template" }, "subtitle_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subtitle Template" }, "subtitle_extensions": { "items": { "type": "string" }, "type": "array", "title": "Subtitle Extensions" }, "write_nfo": { "type": "boolean", "title": "Write Nfo" }, "copy_resources": { "items": { "$ref": "#/components/schemas/DownloadableResource" }, "type": "array", "title": "Copy Resources" }, "trailer_pattern": { "type": "string", "title": "Trailer Pattern" }, "blacklist_patterns": { "items": { "type": "string" }, "type": "array", "title": "Blacklist Patterns" }, "min_file_size": { "type": "integer", "title": "Min File Size" } }, "type": "object", "required": [ "id", "name", "path", "automation", "auto_organize", "ingest", "recursive", "move_mode", "video_template", "link_mode", "subtitle_extensions", "write_nfo", "copy_resources", "trailer_pattern", "blacklist_patterns", "min_file_size" ], "title": "LibraryResponse" }, "LibraryUpdateRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path" }, "automation": { "anyOf": [ { "$ref": "#/components/schemas/LibraryAutomation" }, { "type": "null" } ] }, "auto_organize": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Auto Organize" }, "ingest": { "anyOf": [ { "$ref": "#/components/schemas/LibraryIngest" }, { "type": "null" } ] }, "cloud_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cloud Path" }, "recursive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Recursive" }, "patterns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Patterns" }, "move_mode": { "anyOf": [ { "$ref": "#/components/schemas/MoveMode" }, { "type": "null" } ] }, "video_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Video Template" }, "link_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Link Template" }, "link_mode": { "anyOf": [ { "$ref": "#/components/schemas/LinkMode" }, { "type": "null" } ] }, "strm_content_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Strm Content Template" }, "thumb_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumb Template" }, "poster_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Poster Template" }, "fanart_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Fanart Template" }, "extrafanart_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrafanart Template" }, "extrafanart_name_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Extrafanart Name Template" }, "nfo_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nfo Template" }, "trailer_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trailer Template" }, "subtitle_template": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Subtitle Template" }, "subtitle_extensions": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Subtitle Extensions" }, "write_nfo": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Write Nfo" }, "copy_resources": { "anyOf": [ { "items": { "$ref": "#/components/schemas/DownloadableResource" }, "type": "array" }, { "type": "null" } ], "title": "Copy Resources" }, "trailer_pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trailer Pattern" }, "blacklist_patterns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Blacklist Patterns" }, "min_file_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Min File Size" } }, "type": "object", "title": "LibraryUpdateRequest" }, "LinkMode": { "type": "string", "enum": [ "strm", "symlink" ], "title": "LinkMode", "description": "整理后在 link_template 位置如何指向真实视频." }, "LoggingConfig": { "properties": { "level": { "type": "string", "enum": [ "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" ], "title": "Level", "default": "INFO" }, "debug_capture": { "type": "boolean", "title": "Debug Capture", "default": false } }, "type": "object", "title": "LoggingConfig" }, "Manufacturer": { "type": "string", "enum": [ "attackers", "befree", "bi", "bibian", "das", "ebody", "fitch", "hajime_kikaku", "honnaka", "hunter", "idea_pocket", "kawaii", "kirakira", "madonna", "miman", "mko_labo", "moodyz", "muku", "mvg", "nanpa_japan", "oppai", "opera", "premium_beauty", "rookie", "s1", "tameikegoro", "tosatsu", "v", "wanz_factory" ], "title": "Manufacturer" }, "MediaBatchDeleteRequest": { "properties": { "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "MediaFile ID 列表; 上限防 SQLite 绑定变量超限" } }, "type": "object", "required": [ "ids" ], "title": "MediaBatchDeleteRequest", "description": "批量删除媒体文件记录; 不存在的 id 计入 missing." }, "MediaBatchDeleteResponse": { "properties": { "deleted": { "type": "integer", "title": "Deleted", "description": "成功删除的数量" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的 id 数量" } }, "type": "object", "required": [ "deleted", "missing" ], "title": "MediaBatchDeleteResponse" }, "MediaFileResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "library_id": { "type": "integer", "title": "Library Id" }, "path": { "type": "string", "title": "Path" }, "oshash": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oshash" }, "size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Size" }, "duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Duration" }, "codec": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Codec" }, "number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Number" }, "status": { "$ref": "#/components/schemas/MediaFileStatus" }, "mosaic": { "anyOf": [ { "$ref": "#/components/schemas/Mosaic" }, { "type": "null" } ] }, "censored": { "type": "boolean", "title": "Censored", "default": false }, "uncensored": { "type": "boolean", "title": "Uncensored", "default": false }, "has_subtitle": { "type": "boolean", "title": "Has Subtitle", "default": false }, "definition": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Definition" }, "metadata_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Metadata Id" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "library_id", "path", "status" ], "title": "MediaFileResponse" }, "MediaFileStatus": { "type": "string", "enum": [ "pending", "scraped", "failed", "skip" ], "title": "MediaFileStatus" }, "MediaFileUpdateRequest": { "properties": { "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path" }, "number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Number" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/MediaFileStatus" }, { "type": "null" } ] }, "metadata_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Metadata Id" } }, "type": "object", "title": "MediaFileUpdateRequest" }, "MediaListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MediaFileResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "MediaListResponse" }, "MediaServerConfig": { "properties": { "kind": { "type": "string", "enum": [ "emby", "jellyfin" ], "title": "Kind", "description": "媒体服务器类型", "default": "jellyfin" }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Url", "description": "服务器地址, 含协议、端口与可选子路径" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key", "description": "管理员 API Key" }, "verify_tls": { "type": "boolean", "title": "Verify Tls", "description": "校验 HTTPS 证书; 自签名证书可关闭", "default": true } }, "type": "object", "title": "MediaServerConfig", "description": "Emby / Jellyfin 人物推送; url 与 api_key 齐备才启用." }, "MediaSortField": { "type": "string", "enum": [ "number", "path", "status", "size", "created_at", "updated_at" ], "title": "MediaSortField" }, "MergeRequest": { "properties": { "selections": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Selections", "description": "field_name -> source_key 映射" } }, "type": "object", "required": [ "selections" ], "title": "MergeRequest" }, "MetadataBatchDeleteResponse": { "properties": { "deleted": { "type": "integer", "title": "Deleted", "description": "成功删除的数量" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的 id 数量" }, "skipped": { "type": "integer", "title": "Skipped", "description": "请求内重复的 id 数量; 已去重", "default": 0 } }, "type": "object", "required": [ "deleted", "missing" ], "title": "MetadataBatchDeleteResponse" }, "MetadataBatchIdsRequest": { "properties": { "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "Metadata ID 列表" } }, "type": "object", "required": [ "ids" ], "title": "MetadataBatchIdsRequest" }, "MetadataBatchScrapeRequest": { "properties": { "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "Metadata ID 列表" }, "content_type": { "anyOf": [ { "$ref": "#/components/schemas/ContentType" }, { "type": "null" } ], "description": "内容类型; None = 用条目已落定的类型 (不重新推断)" }, "use_cache": { "items": { "$ref": "#/components/schemas/CacheKind" }, "type": "array", "uniqueItems": true, "title": "Use Cache", "description": "启用的缓存种类 (metadata: 复用 DB per-site 快照; trans: 复用译文). 空集 = 全部强制刷新" } }, "type": "object", "required": [ "ids" ], "title": "MetadataBatchScrapeRequest" }, "MetadataBatchScrapeResponse": { "properties": { "submitted": { "type": "integer", "title": "Submitted", "description": "成功提交的任务数" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的 id 数量" }, "skipped": { "type": "integer", "title": "Skipped", "description": "请求内重复的 id 数量; 已去重", "default": 0 }, "task_ids": { "items": { "type": "integer" }, "type": "array", "title": "Task Ids", "description": "提交的任务 id 列表" } }, "type": "object", "required": [ "submitted", "missing", "task_ids" ], "title": "MetadataBatchScrapeResponse" }, "MetadataDetailResponse": { "properties": { "metadata": { "$ref": "#/components/schemas/MetadataResponse" }, "files": { "items": { "$ref": "#/components/schemas/MediaFileResponse" }, "type": "array", "title": "Files" }, "user_tags": { "items": { "$ref": "#/components/schemas/UserTagResponse" }, "type": "array", "title": "User Tags", "default": [] }, "comments": { "items": { "$ref": "#/components/schemas/CommentResponse" }, "type": "array", "title": "Comments", "default": [] }, "actor_ids": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Actor Ids", "default": {} }, "actor_genders": { "additionalProperties": { "$ref": "#/components/schemas/ActorGender" }, "type": "object", "title": "Actor Genders", "default": {} }, "director_ids": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Director Ids", "default": {} }, "tag_ids": { "additionalProperties": { "type": "integer" }, "type": "object", "title": "Tag Ids", "default": {} }, "studio_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Studio Id" }, "publisher_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Publisher Id" }, "series_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Series Id" } }, "type": "object", "required": [ "metadata", "files" ], "title": "MetadataDetailResponse" }, "MetadataField": { "type": "string", "enum": [ "title", "plot", "actors", "directors", "tags", "series", "release", "runtime", "publisher", "studio", "poster_urls", "thumb_urls", "trailer_urls", "extrafanart", "score" ], "title": "MetadataField" }, "MetadataListItem": { "properties": { "id": { "type": "integer", "title": "Id" }, "number": { "type": "string", "title": "Number" }, "content_type": { "$ref": "#/components/schemas/ContentType" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "actors": { "items": { "type": "string" }, "type": "array", "title": "Actors", "default": [] }, "studio": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Studio" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Publisher" }, "release": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Release" }, "runtime": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Runtime" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "default": [] }, "series": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Series" }, "plot": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Plot" }, "directors": { "items": { "type": "string" }, "type": "array", "title": "Directors", "default": [] }, "poster_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Poster Url" }, "thumb_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumb Url" }, "trailer_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trailer Url" }, "extrafanart": { "items": { "type": "string" }, "type": "array", "title": "Extrafanart", "default": [] }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" }, "vr": { "type": "boolean", "title": "Vr", "default": false }, "poster_urls": { "items": { "type": "string" }, "type": "array", "title": "Poster Urls", "default": [] }, "thumb_urls": { "items": { "type": "string" }, "type": "array", "title": "Thumb Urls", "default": [] }, "trailer_urls": { "items": { "type": "string" }, "type": "array", "title": "Trailer Urls", "default": [] }, "extrafanart_urls": { "additionalProperties": true, "type": "object", "title": "Extrafanart Urls", "default": {} }, "scores": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Scores", "default": {} }, "external_ids": { "additionalProperties": true, "type": "object", "title": "External Ids", "default": {} }, "source_urls": { "additionalProperties": true, "type": "object", "title": "Source Urls", "default": {} }, "locked_fields": { "items": { "$ref": "#/components/schemas/MetadataField" }, "type": "array", "title": "Locked Fields", "default": [] }, "file_count": { "type": "integer", "title": "File Count", "default": 0 }, "file_phase": { "$ref": "#/components/schemas/FilePhaseSummary" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "number", "content_type" ], "title": "MetadataListItem", "description": "列表与语义检索的条目: 不含 raw / field_sources, 详情才返回全量." }, "MetadataListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MetadataListItem" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "semantic_hits": { "items": { "$ref": "#/components/schemas/SemanticHitInfo" }, "type": "array", "title": "Semantic Hits" } }, "type": "object", "required": [ "items", "total" ], "title": "MetadataListResponse" }, "MetadataLocksRequest": { "properties": { "fields": { "items": { "$ref": "#/components/schemas/MetadataField" }, "type": "array", "title": "Fields", "description": "锁定的字段集合; 空集解除全部锁定" } }, "type": "object", "title": "MetadataLocksRequest", "description": "整体替换锁定字段集合." }, "MetadataMergeEntriesRequest": { "properties": { "target_id": { "type": "integer", "title": "Target Id", "description": "合并目标 Metadata ID; 其字段与已有站点快照保持不变" }, "source_ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Source Ids", "description": "待合并的 Metadata ID 列表; 按顺序补入 raw 快照" }, "rescrape": { "type": "boolean", "title": "Rescrape", "description": "合并后按当前优先级对目标番号入队 SCRAPE, 复用 raw 缓存重新聚合字段", "default": false } }, "type": "object", "required": [ "target_id", "source_ids" ], "title": "MetadataMergeEntriesRequest" }, "MetadataPartial": { "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "actors": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Actors" }, "studio": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Studio" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Publisher" }, "release": { "anyOf": [ { "type": "string", "description": "发行日 (YYYY-MM-DD); 也可输入带时刻的 ISO 串, 服务端只保留日期", "examples": [ "2020-01-01" ] }, { "type": "null" } ], "title": "Release" }, "runtime": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Runtime" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" }, "series": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Series" }, "plot": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Plot" }, "directors": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Directors" }, "poster_urls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Poster Urls" }, "thumb_urls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Thumb Urls" }, "trailer_urls": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Trailer Urls" }, "extrafanart_urls": { "anyOf": [ { "additionalProperties": { "items": { "type": "string" }, "type": "array", "x-long": true }, "type": "object" }, { "type": "null" } ], "title": "Extrafanart Urls" }, "scores": { "anyOf": [ { "additionalProperties": { "type": "number" }, "type": "object" }, { "type": "null" } ], "title": "Scores" }, "external_ids": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "External Ids" }, "source_urls": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Source Urls" } }, "type": "object", "title": "MetadataPartial" }, "MetadataResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "number": { "type": "string", "title": "Number" }, "content_type": { "$ref": "#/components/schemas/ContentType" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "actors": { "items": { "type": "string" }, "type": "array", "title": "Actors", "default": [] }, "studio": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Studio" }, "publisher": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Publisher" }, "release": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Release" }, "runtime": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Runtime" }, "tags": { "items": { "type": "string" }, "type": "array", "title": "Tags", "default": [] }, "series": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Series" }, "plot": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Plot" }, "directors": { "items": { "type": "string" }, "type": "array", "title": "Directors", "default": [] }, "poster_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Poster Url" }, "thumb_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thumb Url" }, "trailer_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Trailer Url" }, "extrafanart": { "items": { "type": "string" }, "type": "array", "title": "Extrafanart", "default": [] }, "score": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Score" }, "vr": { "type": "boolean", "title": "Vr", "default": false }, "poster_urls": { "items": { "type": "string" }, "type": "array", "title": "Poster Urls", "default": [] }, "thumb_urls": { "items": { "type": "string" }, "type": "array", "title": "Thumb Urls", "default": [] }, "trailer_urls": { "items": { "type": "string" }, "type": "array", "title": "Trailer Urls", "default": [] }, "extrafanart_urls": { "additionalProperties": true, "type": "object", "title": "Extrafanart Urls", "default": {} }, "scores": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Scores", "default": {} }, "external_ids": { "additionalProperties": true, "type": "object", "title": "External Ids", "default": {} }, "source_urls": { "additionalProperties": true, "type": "object", "title": "Source Urls", "default": {} }, "locked_fields": { "items": { "$ref": "#/components/schemas/MetadataField" }, "type": "array", "title": "Locked Fields", "default": [] }, "file_count": { "type": "integer", "title": "File Count", "default": 0 }, "file_phase": { "$ref": "#/components/schemas/FilePhaseSummary" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" }, "field_sources": { "additionalProperties": true, "type": "object", "title": "Field Sources", "default": {} }, "raw": { "additionalProperties": true, "type": "object", "title": "Raw", "default": {} } }, "type": "object", "required": [ "id", "number", "content_type" ], "title": "MetadataResponse", "description": "详情与单条写接口的全量条目: 在列表项之上补 raw / field_sources." }, "MetadataSortField": { "type": "string", "enum": [ "number", "title", "studio", "release", "created_at", "updated_at", "file_count", "score" ], "title": "MetadataSortField" }, "MetadataUserTagsRequest": { "properties": { "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "Metadata ID 列表" }, "user_tag_ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "User Tag Ids", "description": "用户标签 ID 列表" }, "action": { "type": "string", "enum": [ "attach", "detach" ], "title": "Action", "description": "attach 为并入, detach 为移除; 两者均幂等" } }, "type": "object", "required": [ "ids", "user_tag_ids", "action" ], "title": "MetadataUserTagsRequest" }, "MetadataUserTagsResponse": { "properties": { "changed": { "type": "integer", "title": "Changed", "description": "至少一处挂载关系发生变更的条目数" }, "unchanged": { "type": "integer", "title": "Unchanged", "description": "已处于目标态、未修改的条目数" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的条目 id 数" }, "skipped": { "type": "integer", "title": "Skipped", "description": "请求内重复的条目 id 数量; 已去重", "default": 0 } }, "type": "object", "required": [ "changed", "unchanged", "missing" ], "title": "MetadataUserTagsResponse" }, "Mosaic": { "type": "string", "enum": [ "uncensored", "cracked", "leaked" ], "title": "Mosaic", "description": "马赛克标记; 有码是条目类型, 不在此列." }, "MoveMode": { "type": "string", "enum": [ "move", "copy", "hardlink", "symlink" ], "title": "MoveMode", "description": "整理时将源文件写入模板路径的方式." }, "NetworkConfig": { "properties": { "proxy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Proxy" }, "timeout": { "type": "number", "maximum": 300.0, "minimum": 5.0, "title": "Timeout", "default": 10.0 }, "max_retries": { "type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Max Retries", "default": 2 }, "max_clients": { "type": "integer", "maximum": 500.0, "minimum": 5.0, "title": "Max Clients", "default": 50, "x-hidden": true }, "browser": { "$ref": "#/components/schemas/BrowserConfig" }, "chunked_threshold": { "type": "integer", "maximum": 104857600.0, "minimum": 524288.0, "title": "Chunked Threshold", "default": 2097152 }, "chunk_size": { "type": "integer", "maximum": 52428800.0, "minimum": 262144.0, "title": "Chunk Size", "default": 1048576 }, "concurrency": { "type": "integer", "maximum": 50.0, "minimum": 1.0, "title": "Concurrency", "default": 10 }, "rate_limits": { "additionalProperties": { "type": "number" }, "type": "object", "title": "Rate Limits" }, "default_rate_limit": { "type": "number", "maximum": 100.0, "minimum": 0.1, "title": "Default Rate Limit", "default": 5 } }, "type": "object", "title": "NetworkConfig" }, "OptionalPathTemplateDefaults": { "properties": { "thumb_template": { "type": "string", "title": "Thumb Template" }, "poster_template": { "type": "string", "title": "Poster Template" }, "fanart_template": { "type": "string", "title": "Fanart Template" }, "extrafanart_template": { "type": "string", "title": "Extrafanart Template" }, "extrafanart_name_template": { "type": "string", "title": "Extrafanart Name Template" }, "nfo_template": { "type": "string", "title": "Nfo Template" }, "trailer_template": { "type": "string", "title": "Trailer Template" }, "subtitle_template": { "type": "string", "title": "Subtitle Template" } }, "type": "object", "required": [ "thumb_template", "poster_template", "fanart_template", "extrafanart_template", "extrafanart_name_template", "nfo_template", "trailer_template", "subtitle_template" ], "title": "OptionalPathTemplateDefaults", "description": "附属模板缺省 (Library 对应列为 None 时 ORGANIZE 使用; 剧照文件名在写盘时按张数渲染)." }, "OrganizeConflict": { "properties": { "path": { "type": "string", "title": "Path" }, "target": { "type": "string", "title": "Target" }, "reason": { "$ref": "#/components/schemas/OrganizeConflictReason" } }, "type": "object", "required": [ "path", "target", "reason" ], "title": "OrganizeConflict", "description": "一条未落盘的整理项: 源路径 + 被占用的目标路径." }, "OrganizeConflictReason": { "type": "string", "enum": [ "target_exists", "subtitle_target_exists" ], "title": "OrganizeConflictReason", "description": "整理未处理的原因." }, "OrganizeResult": { "properties": { "type": { "type": "string", "const": "organize", "title": "Type", "default": "organize" }, "organized": { "type": "integer", "title": "Organized" }, "skipped": { "type": "integer", "title": "Skipped" }, "conflicted": { "type": "integer", "title": "Conflicted" }, "failed": { "type": "integer", "title": "Failed" }, "pruned_dirs": { "type": "integer", "title": "Pruned Dirs" }, "conflicts": { "items": { "$ref": "#/components/schemas/OrganizeConflict" }, "type": "array", "title": "Conflicts" } }, "type": "object", "required": [ "organized", "skipped", "conflicted", "failed", "pruned_dirs", "conflicts" ], "title": "OrganizeResult" }, "OrganizeSubmission": { "properties": { "library_id": { "type": "integer", "title": "Library Id", "description": "所属 Library ID; 扫描/整理在该媒体库下进行", "x-widget": "LibraryPicker" }, "path": { "type": "string", "title": "Path", "description": "要扫描的目录路径 (覆盖 Library 路径, 必须为 Library 子目录).", "default": "", "x-path-type": "directory", "x-widget": "PathPicker" }, "write_nfo": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Write Nfo", "description": "覆盖 Library.write_nfo; None 沿用库设置" }, "copy_resources": { "anyOf": [ { "items": { "$ref": "#/components/schemas/DownloadableResource" }, "type": "array" }, { "type": "null" } ], "title": "Copy Resources", "description": "覆盖 Library.copy_resources; None 沿用库设置" }, "media_file_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "title": "Media File Ids", "description": "勾选快照; 与 path 不能同时指定. None 表示 path 范围内的全部索引" }, "prune_empty_dirs": { "type": "boolean", "title": "Prune Empty Dirs", "description": "移动后删除本次腾空的目录 (库根与 .amane_trash 除外); 复制 / 硬链接 / 符号链接方式不移走源文件, 该开关无效", "default": true }, "type": { "type": "string", "const": "organize", "title": "Type" } }, "type": "object", "required": [ "library_id", "type" ], "title": "OrganizeSubmission" }, "PathTemplatePlaceholder": { "properties": { "name": { "type": "string", "title": "Name" }, "map_keys": { "items": { "type": "string" }, "type": "array", "title": "Map Keys", "description": "有闭合取值时列出规范 key, 供 `{name|k=v}` 映射校验与 UI 提示. 空则不校验映射 key." } }, "type": "object", "required": [ "name" ], "title": "PathTemplatePlaceholder" }, "PathTemplateSchemaResponse": { "properties": { "video_default": { "type": "string", "title": "Video Default" }, "optional_defaults": { "$ref": "#/components/schemas/OptionalPathTemplateDefaults" }, "placeholders": { "items": { "$ref": "#/components/schemas/PathTemplatePlaceholder" }, "type": "array", "title": "Placeholders" }, "subtitle_extensions_default": { "items": { "type": "string" }, "type": "array", "title": "Subtitle Extensions Default" } }, "type": "object", "required": [ "video_default", "optional_defaults", "placeholders", "subtitle_extensions_default" ], "title": "PathTemplateSchemaResponse", "description": "与 ORGANIZE 实际使用的默认值同源; 路径模板由 resolve_paths 解析, 剧照文件名模板由写盘阶段渲染." }, "PlaybackSourceListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PlaybackSourceOption" }, "type": "array", "title": "Items" } }, "additionalProperties": false, "type": "object", "title": "PlaybackSourceListResponse" }, "PlaybackSourceOption": { "properties": { "source_id": { "type": "string", "title": "Source Id" }, "name": { "type": "string", "title": "Name" } }, "additionalProperties": false, "type": "object", "required": [ "source_id", "name" ], "title": "PlaybackSourceOption", "description": "一个可选的播放源. 只有名字, 不含探测结果: 切到它时才去问它有哪些流." }, "PlaybackStreamItem": { "properties": { "source_id": { "type": "string", "title": "Source Id" }, "key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Key" }, "name": { "type": "string", "title": "Name" }, "content_type": { "type": "string", "title": "Content Type" }, "seekable": { "type": "boolean", "title": "Seekable" }, "available": { "type": "boolean", "title": "Available" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" }, "href": { "type": "string", "title": "Href" }, "subtitles": { "items": { "$ref": "#/components/schemas/PlaybackSubtitleItem" }, "type": "array", "title": "Subtitles" } }, "additionalProperties": false, "type": "object", "required": [ "source_id", "name", "content_type", "seekable", "available", "href" ], "title": "PlaybackStreamItem", "description": "某个来源的一条流. ``name`` 是主机拼好的展示名 (来源名 · 流的展示名).\n\n``key`` 是这条流的标识, 同时出现在 ``href`` 里; 来源整个不可用时为 ``None``." }, "PlaybackStreamListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PlaybackStreamItem" }, "type": "array", "title": "Items" } }, "additionalProperties": false, "type": "object", "title": "PlaybackStreamListResponse" }, "PlaybackSubtitleItem": { "properties": { "id": { "type": "string", "title": "Id" }, "label": { "type": "string", "title": "Label" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Language" }, "href": { "type": "string", "title": "Href" } }, "additionalProperties": false, "type": "object", "required": [ "id", "label", "href" ], "title": "PlaybackSubtitleItem" }, "PluginConfig": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "config": { "additionalProperties": true, "type": "object", "title": "Config" } }, "additionalProperties": false, "type": "object", "title": "PluginConfig", "description": "Persisted configuration envelope for one external plugin." }, "PluginConfigUpdate": { "properties": { "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" }, "config": { "additionalProperties": true, "type": "object", "title": "Config" } }, "type": "object", "title": "PluginConfigUpdate" }, "PluginListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PluginResponse" }, "type": "array", "title": "Items" }, "failures": { "items": { "$ref": "#/components/schemas/PluginLoadFailure" }, "type": "array", "title": "Failures" } }, "type": "object", "required": [ "items" ], "title": "PluginListResponse" }, "PluginLoadFailure": { "properties": { "name": { "type": "string", "title": "Name" }, "value": { "type": "string", "title": "Value" }, "error": { "type": "string", "title": "Error" } }, "type": "object", "required": [ "name", "value", "error" ], "title": "PluginLoadFailure", "description": "A plugin drop-in that could not be loaded." }, "PluginResponse": { "properties": { "descriptor": { "$ref": "#/components/schemas/SourceDescriptor" }, "config": { "$ref": "#/components/schemas/PluginConfig" }, "config_schema": { "additionalProperties": true, "type": "object", "title": "Config Schema" }, "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path" } }, "type": "object", "required": [ "descriptor", "config", "config_schema" ], "title": "PluginResponse" }, "R18Config": { "properties": { "dsn": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Dsn" }, "db_name": { "type": "string", "title": "Db Name", "default": "r18dev" }, "read_user": { "type": "string", "title": "Read User", "default": "r18dev_readonly" }, "read_password": { "type": "string", "title": "Read Password", "default": "r18dev_readonly" }, "read_timeout": { "type": "integer", "maximum": 600.0, "minimum": 1.0, "title": "Read Timeout", "default": 30 }, "download_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Download Url" }, "psql_path": { "type": "string", "title": "Psql Path", "default": "psql" } }, "type": "object", "title": "R18Config", "description": "放 Hot: 修改 dsn 经 AppRuntime.apply_rebuild() 重建只读引擎. 未配置 dsn 时整个数据源禁用.\n定时导入不在此节, 须经 Schedule API 创建 r18_import." }, "R18ImportResult": { "properties": { "type": { "type": "string", "const": "r18_import", "title": "Type", "default": "r18_import" }, "imported": { "type": "boolean", "title": "Imported" }, "etag": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Etag" } }, "type": "object", "required": [ "imported" ], "title": "R18ImportResult" }, "R18ImportSubmission": { "properties": { "force": { "type": "boolean", "title": "Force", "default": false }, "type": { "type": "string", "const": "r18_import", "title": "Type" } }, "type": "object", "required": [ "type" ], "title": "R18ImportSubmission" }, "ReasoningDeltaRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "reasoning_delta", "title": "Type" }, "block_id": { "type": "string", "title": "Block Id" }, "text": { "type": "string", "title": "Text" } }, "additionalProperties": false, "type": "object", "required": [ "type", "block_id", "text" ], "title": "ReasoningDeltaRow", "description": "思考增量; `block_id` 取自协议的消息 id, 前端据此归块而不靠相邻关系." }, "RefreshResult": { "properties": { "type": { "type": "string", "const": "refresh", "title": "Type", "default": "refresh" }, "added": { "type": "integer", "title": "Added" }, "removed": { "type": "integer", "title": "Removed" }, "scrape": { "type": "integer", "title": "Scrape" } }, "type": "object", "required": [ "added", "removed", "scrape" ], "title": "RefreshResult" }, "RefreshSubmission": { "properties": { "library_id": { "type": "integer", "title": "Library Id", "description": "所属 Library ID; 扫描/整理在该媒体库下进行", "x-widget": "LibraryPicker" }, "path": { "type": "string", "title": "Path", "description": "要扫描的目录路径 (覆盖 Library 路径, 必须为 Library 子目录).", "default": "", "x-path-type": "directory", "x-widget": "PathPicker" }, "recursive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Recursive", "description": "覆盖 Library 的 recursive; None 沿用库设置" }, "patterns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Patterns", "description": "覆盖 Library 的 patterns; None 沿用库设置" }, "scan": { "items": { "$ref": "#/components/schemas/ScanMode" }, "type": "array", "uniqueItems": true, "title": "Scan", "default": [ "add" ] }, "scrape": { "items": { "$ref": "#/components/schemas/MediaFileStatus" }, "type": "array", "uniqueItems": true, "title": "Scrape", "default": [ "pending" ] }, "use_cache": { "items": { "$ref": "#/components/schemas/CacheKind" }, "type": "array", "uniqueItems": true, "title": "Use Cache", "default": [ "metadata", "trans" ] }, "type": { "type": "string", "const": "refresh", "title": "Type" } }, "type": "object", "required": [ "library_id", "type" ], "title": "RefreshSubmission" }, "ReleaseResponse": { "properties": { "current": { "type": "string", "title": "Current" }, "latest": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Latest" }, "html_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Html Url" }, "newer": { "type": "boolean", "title": "Newer" } }, "type": "object", "required": [ "current", "latest", "html_url", "newer" ], "title": "ReleaseResponse" }, "RequestTokenUsage": { "properties": { "input": { "type": "integer", "title": "Input" }, "cache_read": { "type": "integer", "title": "Cache Read" }, "cache_write": { "type": "integer", "title": "Cache Write" }, "output": { "type": "integer", "title": "Output" }, "duration_ms": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Duration Ms" } }, "type": "object", "required": [ "input", "cache_read", "cache_write", "output" ], "title": "RequestTokenUsage", "description": "单次模型请求的用量. `duration_ms` 是请求发出到响应收到的本地时间差, 不含工具执行." }, "RequestUsageRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "request_usage", "title": "Type" }, "usage": { "$ref": "#/components/schemas/RequestTokenUsage" } }, "additionalProperties": false, "type": "object", "required": [ "type", "usage" ], "title": "RequestUsageRow", "description": "单次模型请求的用量; 该次响应一到即写行, 到达顺序即它在回合里的位置 (这次响应的正文与工具调用之后)." }, "RescrapeResult": { "properties": { "type": { "type": "string", "const": "rescrape", "title": "Type", "default": "rescrape" }, "submitted": { "type": "integer", "title": "Submitted" }, "metadata": { "type": "integer", "title": "Metadata", "default": 0 }, "actors": { "type": "integer", "title": "Actors", "default": 0 } }, "type": "object", "required": [ "submitted" ], "title": "RescrapeResult" }, "RescrapeSubmission": { "properties": { "limit": { "type": "integer", "maximum": 1000.0, "minimum": 1.0, "title": "Limit", "description": "每个已选目标单次最多补刮的条数 (避免长占 worker 队列)", "default": 100 }, "min_age_days": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Min Age Days", "description": "仅补刮 updated_at 距今超过该天数的条目; None 不设门槛" }, "targets": { "items": { "$ref": "#/components/schemas/RescrapeTarget" }, "type": "array", "minItems": 1, "uniqueItems": true, "title": "Targets", "description": "补刮对象; 每个已选项各自选取 limit 条. 缺省仅影片, 兼容既有 Schedule.payload", "default": [ "metadata" ] }, "type": { "type": "string", "const": "rescrape", "title": "Type" } }, "type": "object", "required": [ "type" ], "title": "RescrapeSubmission" }, "RescrapeTarget": { "type": "string", "enum": [ "metadata", "actor" ], "title": "RescrapeTarget", "description": "滚动补刮选取的实体种类. 每个已选项各自选取 limit 条." }, "RetriedRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "retried", "title": "Type" }, "attempt": { "type": "integer", "title": "Attempt" }, "delay_ms": { "type": "integer", "title": "Delay Ms" }, "reason": { "type": "string", "title": "Reason" } }, "additionalProperties": false, "type": "object", "required": [ "type", "attempt", "delay_ms", "reason" ], "title": "RetriedRow", "description": "一次失败请求的重试记录; 成功的那次不留行.\n\n重试可能持续很久, 既不加行也不报错时页面只有转圈, 分不清是卡住还是在等." }, "RoutineType": { "type": "string", "enum": [ "cleanup", "upscale", "r18_import", "rescrape", "semantic_index" ], "title": "RoutineType" }, "RuntimePaths": { "properties": { "data_dir": { "type": "string", "title": "Data Dir" }, "log_dir": { "type": "string", "title": "Log Dir" }, "db_path": { "type": "string", "title": "Db Path" }, "config_path": { "type": "string", "title": "Config Path" }, "env": { "items": { "type": "string" }, "type": "array", "title": "Env" } }, "type": "object", "required": [ "data_dir", "log_dir", "db_path", "config_path", "env" ], "title": "RuntimePaths", "description": "智能体可直接读取的位置; 供它自行查日志 / 配置 / 数据库, 不为这些能力做接口." }, "SavedQueryBatchAction": { "type": "string", "enum": [ "delete", "persist" ], "title": "SavedQueryBatchAction" }, "SavedQueryBatchRequest": { "properties": { "action": { "$ref": "#/components/schemas/SavedQueryBatchAction" }, "ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Ids", "description": "查询预设 ID 列表" } }, "type": "object", "required": [ "action", "ids" ], "title": "SavedQueryBatchRequest" }, "SavedQueryBatchResponse": { "properties": { "affected": { "type": "integer", "title": "Affected", "description": "成功处理的数量; delete 为实际删除的数量, persist 为找到并置为已保留的数量 (幂等, 已保留的也计入)" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的 id 数量" } }, "type": "object", "required": [ "affected", "missing" ], "title": "SavedQueryBatchResponse" }, "SavedQueryCreateRequest": { "properties": { "name": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Name" }, "description": { "type": "string", "maxLength": 2000, "title": "Description", "default": "" }, "sql": { "type": "string", "minLength": 1, "title": "Sql" }, "entity": { "$ref": "#/components/schemas/SavedQueryEntity" } }, "type": "object", "required": [ "name", "sql", "entity" ], "title": "SavedQueryCreateRequest", "description": "手动创建: 名称 / 描述 / SQL 与类型; 归属与保留态由服务端固定 (无会话, 已保留)." }, "SavedQueryEntity": { "type": "string", "enum": [ "metadata", "actor", "data" ], "title": "SavedQueryEntity", "description": "交付目标, 决定 Browse 深链与主键语义." }, "SavedQueryListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/SavedQueryResponse" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "SavedQueryListResponse" }, "SavedQueryResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "sql": { "type": "string", "title": "Sql" }, "entity": { "$ref": "#/components/schemas/SavedQueryEntity" }, "session_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Session Id" }, "persisted": { "type": "boolean", "title": "Persisted" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "name", "description", "sql", "entity", "session_id", "persisted", "created_at", "updated_at" ], "title": "SavedQueryResponse" }, "SavedQueryResultResponse": { "properties": { "saved_query_id": { "type": "integer", "title": "Saved Query Id" }, "columns": { "items": { "type": "string" }, "type": "array", "title": "Columns" }, "rows": { "items": { "items": {}, "type": "array" }, "type": "array", "title": "Rows" }, "offset": { "type": "integer", "title": "Offset" }, "limit": { "type": "integer", "title": "Limit" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "saved_query_id", "columns", "rows", "offset", "limit", "total" ], "title": "SavedQueryResultResponse" }, "SavedQueryUpdateRequest": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 200, "minLength": 1 }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string", "maxLength": 2000 }, { "type": "null" } ], "title": "Description" }, "sql": { "anyOf": [ { "type": "string", "minLength": 1 }, { "type": "null" } ], "title": "Sql" } }, "type": "object", "title": "SavedQueryUpdateRequest", "description": "仅名称 / 描述 / SQL 三项, 未知键被忽略; 显式 null 一律 422, 省略键才是「不更新」.\n\n字段不从 DB 模型派生: ``create_partial_model`` 会丢弃 ``StringConstraints``;\n约束别名与创建请求共用." }, "ScanInvalidResult": { "properties": { "type": { "type": "string", "const": "scan_invalid", "title": "Type", "default": "scan_invalid" }, "inventory_id": { "type": "string", "title": "Inventory Id" }, "entries": { "type": "integer", "title": "Entries" }, "dirs": { "type": "integer", "title": "Dirs" }, "scope_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scope Path" }, "truncated": { "type": "boolean", "title": "Truncated", "default": false }, "skipped_dirs": { "type": "integer", "title": "Skipped Dirs", "default": 0 }, "skipped_files": { "type": "integer", "title": "Skipped Files", "default": 0 }, "blocked_dirs": { "type": "integer", "title": "Blocked Dirs", "default": 0 } }, "type": "object", "required": [ "inventory_id", "entries", "dirs" ], "title": "ScanInvalidResult" }, "ScanInvalidSubmission": { "properties": { "library_id": { "type": "integer", "title": "Library Id", "description": "所属 Library ID; 扫描/整理在该媒体库下进行", "x-widget": "LibraryPicker" }, "path": { "type": "string", "title": "Path", "description": "要扫描的目录路径 (覆盖 Library 路径, 必须为 Library 子目录).", "default": "", "x-path-type": "directory", "x-widget": "PathPicker" }, "recursive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Recursive", "description": "覆盖 Library 的 recursive; None 沿用库设置" }, "patterns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Patterns", "description": "覆盖 Library 的 patterns; None 沿用库设置" }, "type": { "type": "string", "const": "scan_invalid", "title": "Type" } }, "type": "object", "required": [ "library_id", "type" ], "title": "ScanInvalidSubmission" }, "ScanMode": { "type": "string", "enum": [ "add", "remove" ], "title": "ScanMode" }, "ScheduleCreateRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "cron": { "type": "string", "title": "Cron" }, "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "submission": { "oneOf": [ { "$ref": "#/components/schemas/CleanupSubmission" }, { "$ref": "#/components/schemas/UpscaleSubmission" }, { "$ref": "#/components/schemas/R18ImportSubmission" }, { "$ref": "#/components/schemas/RescrapeSubmission" }, { "$ref": "#/components/schemas/SemanticIndexSubmission" } ], "title": "Submission", "discriminator": { "propertyName": "type", "mapping": { "cleanup": "#/components/schemas/CleanupSubmission", "r18_import": "#/components/schemas/R18ImportSubmission", "rescrape": "#/components/schemas/RescrapeSubmission", "semantic_index": "#/components/schemas/SemanticIndexSubmission", "upscale": "#/components/schemas/UpscaleSubmission" } } } }, "type": "object", "required": [ "cron", "submission" ], "title": "ScheduleCreateRequest" }, "ScheduleListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ScheduleResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "ScheduleListResponse" }, "ScheduleResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "cron": { "type": "string", "title": "Cron" }, "task_type": { "$ref": "#/components/schemas/RoutineType" }, "payload": { "oneOf": [ { "$ref": "#/components/schemas/CleanupSubmission" }, { "$ref": "#/components/schemas/UpscaleSubmission" }, { "$ref": "#/components/schemas/R18ImportSubmission" }, { "$ref": "#/components/schemas/RescrapeSubmission" }, { "$ref": "#/components/schemas/SemanticIndexSubmission" } ], "title": "Payload", "discriminator": { "propertyName": "type", "mapping": { "cleanup": "#/components/schemas/CleanupSubmission", "r18_import": "#/components/schemas/R18ImportSubmission", "rescrape": "#/components/schemas/RescrapeSubmission", "semantic_index": "#/components/schemas/SemanticIndexSubmission", "upscale": "#/components/schemas/UpscaleSubmission" } } }, "enabled": { "type": "boolean", "title": "Enabled" }, "last_run": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Run" }, "next_run": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Next Run" } }, "type": "object", "required": [ "id", "cron", "task_type", "payload", "enabled" ], "title": "ScheduleResponse" }, "ScheduleUpdateRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "cron": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cron" }, "enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Enabled" } }, "type": "object", "title": "ScheduleUpdateRequest" }, "ScrapeResult": { "properties": { "type": { "type": "string", "const": "scrape", "title": "Type", "default": "scrape" }, "metadata_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Metadata Id" }, "field_sources": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Field Sources" }, "failed_sites": { "items": { "type": "string" }, "type": "array", "title": "Failed Sites" }, "outcomes": { "items": { "$ref": "#/components/schemas/SiteOutcomeRecord" }, "type": "array", "title": "Outcomes" } }, "type": "object", "required": [ "field_sources", "failed_sites" ], "title": "ScrapeResult" }, "ScrapeSubmission": { "properties": { "number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Number" }, "media_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Media Id", "description": "MediaFile ID. 通常仅用于内部提交任务,手动提交无需指定" }, "content_type": { "anyOf": [ { "$ref": "#/components/schemas/ContentType" }, { "type": "null" } ], "description": "内容类型; 未给出时: 仅 media_id 按文件路径推断, 有 number 时按番号推断" }, "use_cache": { "items": { "$ref": "#/components/schemas/CacheKind" }, "type": "array", "uniqueItems": true, "title": "Use Cache", "description": "启用的缓存种类 (metadata: 复用 DB per-site 快照; trans: 复用译文). 空集 = 全部强制刷新" }, "type": { "type": "string", "const": "scrape", "title": "Type" } }, "type": "object", "required": [ "type" ], "title": "ScrapeSubmission" }, "ScrapingConfig": { "properties": { "download_resources": { "items": { "$ref": "#/components/schemas/DownloadableResource" }, "type": "array", "title": "Download Resources", "description": "刮削时自动下载到 Resource 目录的资源类型" }, "crop_poster": { "type": "boolean", "title": "Crop Poster", "default": true }, "poster_ratio": { "type": "number", "maximum": 1.0, "minimum": 0.3, "title": "Poster Ratio", "default": 0.7 }, "poster_crop_skip_ratio": { "type": "number", "maximum": 1.0, "minimum": 0.5, "title": "Poster Crop Skip Ratio", "default": 0.9 }, "jpeg_quality": { "type": "integer", "maximum": 100.0, "minimum": 50.0, "title": "Jpeg Quality", "default": 95, "x-hidden": true }, "content_routes": { "additionalProperties": { "items": { "type": "string", "enum": [ "10musume", "1pondo", "airav", "avbase", "avsox", "c0930", "caribbeancom", "dahlia", "dmm", "faleno", "fc2", "fc2club", "fc2ppvdb", "freejavbt", "getchu", "giga", "h0930", "h4610", "heyzo", "iqqtv", "jav321", "javbus", "javdb", "javlibrary", "kin8", "mgstage", "muramura", "official", "pacopacomama", "prestige", "r18dev", "theporndb", "xcity" ] }, "type": "array", "x-ordered": true }, "propertyNames": { "$ref": "#/components/schemas/ContentType" }, "type": "object", "title": "Content Routes", "x-frozen-keys": true }, "field_priority": { "additionalProperties": { "items": { "type": "string", "enum": [ "10musume", "1pondo", "airav", "avbase", "avsox", "c0930", "caribbeancom", "dahlia", "dmm", "faleno", "fc2", "fc2club", "fc2ppvdb", "freejavbt", "getchu", "giga", "h0930", "h4610", "heyzo", "iqqtv", "jav321", "javbus", "javdb", "javlibrary", "kin8", "mgstage", "muramura", "official", "pacopacomama", "prestige", "r18dev", "theporndb", "xcity" ] }, "type": "array", "default": [], "x-ordered": true }, "propertyNames": { "$ref": "#/components/schemas/MetadataField" }, "type": "object", "title": "Field Priority" }, "field_blacklist": { "additionalProperties": { "items": { "type": "string", "enum": [ "10musume", "1pondo", "airav", "avbase", "avsox", "c0930", "caribbeancom", "dahlia", "dmm", "faleno", "fc2", "fc2club", "fc2ppvdb", "freejavbt", "getchu", "giga", "h0930", "h4610", "heyzo", "iqqtv", "jav321", "javbus", "javdb", "javlibrary", "kin8", "mgstage", "muramura", "official", "pacopacomama", "prestige", "r18dev", "theporndb", "xcity" ] }, "type": "array", "default": [] }, "propertyNames": { "$ref": "#/components/schemas/MetadataField" }, "type": "object", "title": "Field Blacklist" }, "field_language": { "additionalProperties": { "$ref": "#/components/schemas/Language" }, "propertyNames": { "$ref": "#/components/schemas/MetadataField" }, "type": "object", "title": "Field Language", "x-frozen-keys": true }, "site_config": { "additionalProperties": { "$ref": "#/components/schemas/SiteConfig" }, "type": "object", "title": "Site Config", "x-frozen-keys": true } }, "type": "object", "title": "ScrapingConfig" }, "SelectionNoticeResponse": { "properties": { "kind": { "$ref": "#/components/schemas/FootprintNoticeKind" }, "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path" }, "count": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Count" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" } }, "type": "object", "required": [ "kind" ], "title": "SelectionNoticeResponse", "description": "展开时未能纳入清单的项. 面板按 ``kind`` 用界面语言给出文案, 因此服务端不带文案." }, "SelectionRequest": { "properties": { "media_file_ids": { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Media File Ids", "description": "选中的媒体文件 ID; 必须属于该库" }, "include_work_dir": { "type": "boolean", "title": "Include Work Dir", "description": "连同作品文件夹一起删除; 仅在该目录只含这一条媒体索引且不是库根时提供", "default": false } }, "type": "object", "required": [ "media_file_ids" ], "title": "SelectionRequest", "description": "由选中的媒体文件展开显式来源清单." }, "SelectionSummaryResponse": { "properties": { "exists": { "type": "boolean", "title": "Exists" }, "inventory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Inventory Id" }, "notices": { "items": { "$ref": "#/components/schemas/SelectionNoticeResponse" }, "type": "array", "title": "Notices", "default": [] }, "truncated": { "type": "boolean", "title": "Truncated", "default": false }, "dropped": { "type": "integer", "title": "Dropped", "default": 0 } }, "type": "object", "required": [ "exists" ], "title": "SelectionSummaryResponse", "description": "展开结果. 条目自库根展开 (库外产物挂在根下), 面板按分页接口读取." }, "SemanticBenchmarkResult": { "properties": { "type": { "type": "string", "const": "semantic_benchmark", "title": "Type", "default": "semantic_benchmark" }, "backend": { "type": "string", "title": "Backend" }, "model": { "type": "string", "title": "Model" }, "images_per_second": { "type": "number", "title": "Images Per Second" }, "query_ms": { "type": "number", "title": "Query Ms" }, "load_ms": { "type": "number", "title": "Load Ms" }, "samples": { "type": "integer", "title": "Samples" }, "measured_at": { "type": "string", "title": "Measured At" } }, "type": "object", "required": [ "backend", "model", "images_per_second", "query_ms", "load_ms", "samples", "measured_at" ], "title": "SemanticBenchmarkResult" }, "SemanticBenchmarkSubmission": { "properties": { "type": { "type": "string", "const": "semantic_benchmark", "title": "Type" } }, "type": "object", "required": [ "type" ], "title": "SemanticBenchmarkSubmission" }, "SemanticConfig": { "properties": { "auto_maintain": { "type": "boolean", "title": "Auto Maintain", "description": "条目图片变化后立即增量索引; 打开时视觉模型常驻", "default": false } }, "type": "object", "title": "SemanticConfig", "description": "封面与剧照语义检索. 模型身份由 ``semantic/models.py`` 的清单决定, 不随配置变化." }, "SemanticDiagnosticsResponse": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" }, "backend": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backend" }, "current_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Model" }, "current_model_label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Current Model Label" }, "backend_label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Backend Label" }, "text_loaded": { "type": "boolean", "title": "Text Loaded", "default": false }, "vision_loaded": { "type": "boolean", "title": "Vision Loaded", "default": false }, "search_ready": { "type": "boolean", "title": "Search Ready", "default": false }, "index_ready": { "type": "boolean", "title": "Index Ready", "default": false }, "download_size": { "type": "integer", "title": "Download Size", "default": 0 }, "vision_size": { "type": "integer", "title": "Vision Size", "default": 0 }, "text_size": { "type": "integer", "title": "Text Size", "default": 0 }, "model_path": { "type": "string", "title": "Model Path", "default": "" }, "model_bytes": { "type": "integer", "title": "Model Bytes", "default": 0 }, "embeddings_path": { "type": "string", "title": "Embeddings Path", "default": "" }, "embeddings_bytes": { "type": "integer", "title": "Embeddings Bytes", "default": 0 }, "indexed_metadata": { "type": "integer", "title": "Indexed Metadata", "default": 0 }, "indexed_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Indexed At" }, "models": { "additionalProperties": { "$ref": "#/components/schemas/SemanticModelCounts" }, "type": "object", "title": "Models", "default": {} } }, "type": "object", "required": [ "enabled" ], "title": "SemanticDiagnosticsResponse", "description": "用户手册的诊断数据: 运行时状态、路径、占用与索引统计; 不触发下载或加载." }, "SemanticHitInfo": { "properties": { "id": { "type": "integer", "title": "Id" }, "kind": { "$ref": "#/components/schemas/EmbeddingKind" }, "resource_url": { "type": "string", "title": "Resource Url" }, "similarity": { "type": "number", "title": "Similarity" } }, "type": "object", "required": [ "id", "kind", "resource_url", "similarity" ], "title": "SemanticHitInfo", "description": "语义检索的命中图片: 与列表项按 id 对应, 不扩展列表项模型本身." }, "SemanticIndexResult": { "properties": { "type": { "type": "string", "const": "semantic_index", "title": "Type", "default": "semantic_index" }, "scanned": { "type": "integer", "title": "Scanned" }, "indexed": { "type": "integer", "title": "Indexed" }, "skipped": { "type": "integer", "title": "Skipped" }, "missing": { "type": "integer", "title": "Missing" }, "failed": { "type": "integer", "title": "Failed" } }, "type": "object", "required": [ "scanned", "indexed", "skipped", "missing", "failed" ], "title": "SemanticIndexResult" }, "SemanticIndexSubmission": { "properties": { "type": { "type": "string", "const": "semantic_index", "title": "Type" }, "limit": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Limit", "description": "单次最多处理的条目数; 空表示全库" }, "force": { "type": "boolean", "title": "Force", "description": "忽略未变化的跳过判据, 全部重算", "default": false }, "kinds": { "items": { "$ref": "#/components/schemas/EmbeddingKind" }, "type": "array", "minItems": 1, "title": "Kinds" } }, "type": "object", "required": [ "type" ], "title": "SemanticIndexSubmission" }, "SemanticModelCounts": { "properties": { "count": { "type": "integer", "title": "Count" }, "covers": { "type": "integer", "title": "Covers" }, "stills": { "type": "integer", "title": "Stills" } }, "type": "object", "required": [ "count", "covers", "stills" ], "title": "SemanticModelCounts", "description": "单个模型的向量条数, 按来源拆分." }, "SemanticStatusResponse": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false }, "available": { "type": "boolean", "title": "Available", "default": false }, "search_ready": { "type": "boolean", "title": "Search Ready", "default": false }, "has_embeddings": { "type": "boolean", "title": "Has Embeddings", "default": false }, "download_size": { "type": "integer", "title": "Download Size", "default": 0 } }, "type": "object", "title": "SemanticStatusResponse", "description": "语义检索的轻量状态: 页面据此决定入口与提示, 不读取存储统计." }, "SiteConfig": { "properties": { "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Url" }, "use_proxy": { "type": "boolean", "title": "Use Proxy", "default": true }, "proxy": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Proxy" }, "use_browser": { "$ref": "#/components/schemas/BrowserMode", "default": "auto" }, "browser_backend": { "anyOf": [ { "$ref": "#/components/schemas/BrowserBackendName" }, { "type": "null" } ], "x-hidden": true }, "cookie": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Cookie", "default": {} }, "api_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Token", "x-visible-keys": [ "theporndb" ] }, "official_routes": { "additionalProperties": { "$ref": "#/components/schemas/Manufacturer" }, "type": "object", "title": "Official Routes", "x-visible-keys": [ "official" ] }, "rate_limit": { "anyOf": [ { "type": "number", "maximum": 100.0, "minimum": 0.1 }, { "type": "null" } ], "title": "Rate Limit", "default": 2 }, "languages": { "items": { "type": "string", "enum": [ "zh", "ja", "en" ] }, "type": "array", "title": "Languages", "description": "词条语言优先级, 依序取第一个有正文的词条", "x-ordered": true, "x-visible-keys": [ "wikipedia" ] } }, "type": "object", "title": "SiteConfig" }, "SiteName": { "type": "string", "enum": [ "10musume", "1pondo", "airav", "avbase", "avsox", "c0930", "caribbeancom", "dahlia", "dmm", "faleno", "fc2", "fc2club", "fc2ppvdb", "freejavbt", "getchu", "gfriends", "giga", "h0930", "h4610", "heyzo", "iqqtv", "jav321", "javbus", "javdb", "javlibrary", "kin8", "mgstage", "minnano", "muramura", "official", "pacopacomama", "prestige", "r18dev", "theporndb", "wikipedia", "xcity" ], "title": "SiteName", "description": "爬虫站点名称 (影片与演员源共用)." }, "SiteOutcomeKind": { "type": "string", "enum": [ "ok", "failed", "cache_hit" ], "title": "SiteOutcomeKind" }, "SiteOutcomeRecord": { "properties": { "site": { "type": "string", "title": "Site" }, "outcome": { "$ref": "#/components/schemas/SiteOutcomeKind" }, "reason": { "anyOf": [ { "$ref": "#/components/schemas/FailureReason" }, { "type": "null" } ] }, "http_status": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Http Status" }, "detail": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Detail" }, "detail_truncated": { "type": "boolean", "title": "Detail Truncated", "default": false } }, "type": "object", "required": [ "site", "outcome" ], "title": "SiteOutcomeRecord", "description": "由 Recorder.record_site_outcome 唯一写入." }, "SkipReason": { "type": "string", "enum": [ "unknown_source", "no_http_upstream", "missing_credential", "undeclared", "no_url" ], "title": "SkipReason", "description": "``SKIPPED`` 的原因.\n\n与 ``FailureReason`` 分开: 这一档不是失败, 文案也不进站点明细. 界面按它本地化, 因此每种原因\n都要能独立读懂, 不依赖 ``detail``." }, "SortOrder": { "type": "string", "enum": [ "asc", "desc" ], "title": "SortOrder" }, "SourceDescriptor": { "properties": { "id": { "type": "string", "title": "Id", "description": "Stable source identifier" }, "name": { "type": "string", "title": "Name", "description": "Human-readable source name" }, "version": { "type": "string", "title": "Version", "default": "builtin" }, "api_version": { "type": "string", "title": "Api Version", "default": "1" }, "capabilities": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Capabilities", "default": [ "film_metadata" ] }, "content_types": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Content Types", "default": [] }, "metadata_fields": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Metadata Fields", "default": [] }, "languages": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Languages", "default": [] }, "urls": { "items": { "type": "string" }, "type": "array", "title": "Urls", "default": [] }, "traits": { "items": { "type": "string" }, "type": "array", "uniqueItems": true, "title": "Traits", "default": [] }, "rate_limit": { "anyOf": [ { "type": "number", "maximum": 100.0, "minimum": 0.1 }, { "type": "null" } ], "title": "Rate Limit" } }, "additionalProperties": false, "type": "object", "required": [ "id", "name" ], "title": "SourceDescriptor", "description": "Stable, serializable description of a metadata source." }, "SourceKind": { "type": "string", "enum": [ "film", "actor", "plugin" ], "title": "SourceKind", "description": "来源类别, 供展示分组用. 插件来源的 ID 由插件命名空间决定, 不能从名字反推." }, "SrConfig": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false }, "max_dim_threshold": { "type": "integer", "maximum": 8192.0, "minimum": 64.0, "title": "Max Dim Threshold", "default": 1200 }, "max_bytes_threshold": { "type": "integer", "maximum": 67108864.0, "minimum": 65536.0, "title": "Max Bytes Threshold", "default": 2097152 }, "preset": { "$ref": "#/components/schemas/SrPreset", "default": "waifu-photo-2x" }, "output_format": { "type": "string", "enum": [ "jpg", "png", "webp" ], "title": "Output Format", "default": "jpg" }, "tta": { "type": "boolean", "title": "Tta", "default": false, "x-hidden": true } }, "type": "object", "title": "SrConfig" }, "SrPreset": { "type": "string", "enum": [ "realesr-photo-4x", "waifu-photo-2x" ], "title": "SrPreset" }, "TaskBatchAction": { "type": "string", "enum": [ "cancel", "delete", "retry" ], "title": "TaskBatchAction" }, "TaskBatchRequest": { "properties": { "action": { "$ref": "#/components/schemas/TaskBatchAction" }, "task_ids": { "anyOf": [ { "items": { "type": "integer" }, "type": "array", "maxItems": 1000, "minItems": 1 }, { "type": "null" } ], "title": "Task Ids" }, "status": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TaskStatus" }, "type": "array", "minItems": 1 }, { "type": "null" } ], "title": "Status" }, "type": { "anyOf": [ { "items": { "$ref": "#/components/schemas/TaskType" }, "type": "array", "minItems": 1 }, { "type": "null" } ], "title": "Type" } }, "type": "object", "required": [ "action" ], "title": "TaskBatchRequest" }, "TaskBatchResponse": { "properties": { "affected": { "type": "integer", "title": "Affected", "default": 0 }, "skipped": { "type": "integer", "title": "Skipped", "default": 0 }, "missing": { "type": "integer", "title": "Missing", "default": 0 }, "submitted": { "type": "integer", "title": "Submitted", "default": 0 }, "task_ids": { "items": { "type": "integer" }, "type": "array", "title": "Task Ids" } }, "type": "object", "title": "TaskBatchResponse" }, "TaskBatchSubmitRequest": { "properties": { "submissions": { "items": { "oneOf": [ { "$ref": "#/components/schemas/RefreshSubmission" }, { "$ref": "#/components/schemas/OrganizeSubmission" }, { "$ref": "#/components/schemas/ScanInvalidSubmission" }, { "$ref": "#/components/schemas/DeleteSubmission" }, { "$ref": "#/components/schemas/ScrapeSubmission" }, { "$ref": "#/components/schemas/CleanupSubmission" }, { "$ref": "#/components/schemas/UpscaleSubmission" }, { "$ref": "#/components/schemas/R18ImportSubmission" }, { "$ref": "#/components/schemas/ActorScrapeSubmission" }, { "$ref": "#/components/schemas/ActorPushSubmission" }, { "$ref": "#/components/schemas/RescrapeSubmission" }, { "$ref": "#/components/schemas/SemanticIndexSubmission" }, { "$ref": "#/components/schemas/SemanticBenchmarkSubmission" } ], "discriminator": { "propertyName": "type", "mapping": { "actor_push": "#/components/schemas/ActorPushSubmission", "actor_scrape": "#/components/schemas/ActorScrapeSubmission", "cleanup": "#/components/schemas/CleanupSubmission", "delete": "#/components/schemas/DeleteSubmission", "organize": "#/components/schemas/OrganizeSubmission", "r18_import": "#/components/schemas/R18ImportSubmission", "refresh": "#/components/schemas/RefreshSubmission", "rescrape": "#/components/schemas/RescrapeSubmission", "scan_invalid": "#/components/schemas/ScanInvalidSubmission", "scrape": "#/components/schemas/ScrapeSubmission", "semantic_benchmark": "#/components/schemas/SemanticBenchmarkSubmission", "semantic_index": "#/components/schemas/SemanticIndexSubmission", "upscale": "#/components/schemas/UpscaleSubmission" } } }, "type": "array", "maxItems": 1000, "minItems": 1, "title": "Submissions" } }, "type": "object", "required": [ "submissions" ], "title": "TaskBatchSubmitRequest", "description": "逐项与 ``POST /tasks`` 的 body 同形, 只是包成数组." }, "TaskBatchSubmitResponse": { "properties": { "submitted": { "type": "integer", "title": "Submitted" }, "missing": { "type": "integer", "title": "Missing" }, "skipped": { "type": "integer", "title": "Skipped" }, "task_ids": { "items": { "type": "integer" }, "type": "array", "title": "Task Ids" } }, "type": "object", "required": [ "submitted", "missing", "skipped", "task_ids" ], "title": "TaskBatchSubmitResponse" }, "TaskChildItem": { "properties": { "id": { "type": "integer", "title": "Id" }, "type": { "$ref": "#/components/schemas/TaskType" }, "status": { "$ref": "#/components/schemas/TaskStatus" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "retries": { "type": "integer", "title": "Retries", "default": 0 }, "priority": { "type": "integer", "title": "Priority", "default": 0 }, "root_task_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Root Task Id" }, "child_count": { "type": "integer", "title": "Child Count", "default": 0 }, "child_status": { "$ref": "#/components/schemas/TaskChildStatusCounts" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "link_key": { "type": "string", "title": "Link Key" } }, "type": "object", "required": [ "id", "type", "status", "link_key" ], "title": "TaskChildItem" }, "TaskChildListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/TaskChildItem" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "TaskChildListResponse" }, "TaskChildStatusCounts": { "properties": { "queued": { "type": "integer", "title": "Queued", "default": 0 }, "running": { "type": "integer", "title": "Running", "default": 0 }, "done": { "type": "integer", "title": "Done", "default": 0 }, "failed": { "type": "integer", "title": "Failed", "default": 0 } }, "type": "object", "title": "TaskChildStatusCounts", "description": "直接后继按状态计数. 四字段之和等于 child_count." }, "TaskListItem": { "properties": { "id": { "type": "integer", "title": "Id" }, "type": { "$ref": "#/components/schemas/TaskType" }, "status": { "$ref": "#/components/schemas/TaskStatus" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "retries": { "type": "integer", "title": "Retries", "default": 0 }, "priority": { "type": "integer", "title": "Priority", "default": 0 }, "root_task_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Root Task Id" }, "child_count": { "type": "integer", "title": "Child Count", "default": 0 }, "child_status": { "$ref": "#/components/schemas/TaskChildStatusCounts" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" } }, "type": "object", "required": [ "id", "type", "status" ], "title": "TaskListItem", "description": "列表与树: 不含 payload 与 result 等重字段, 展开时再取详情." }, "TaskListResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/TaskListItem" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "items", "total" ], "title": "TaskListResponse" }, "TaskLogEntry": { "properties": { "timestamp": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Timestamp" }, "level": { "type": "string", "title": "Level" }, "source": { "type": "string", "title": "Source" }, "message": { "type": "string", "title": "Message" }, "context": { "additionalProperties": { "$ref": "#/components/schemas/JsonValue" }, "type": "object", "title": "Context" } }, "type": "object", "required": [ "level", "source", "message" ], "title": "TaskLogEntry", "description": "与 WebSocket LOG 事件同形; ``context`` 是原日志里未映射到固定字段的键." }, "TaskLogPage": { "properties": { "entries": { "items": { "$ref": "#/components/schemas/TaskLogEntry" }, "type": "array", "title": "Entries" }, "truncated": { "type": "boolean", "title": "Truncated", "description": "``entries`` 之前还有未下发的行", "default": false } }, "type": "object", "title": "TaskLogPage" }, "TaskResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "type": { "$ref": "#/components/schemas/TaskType" }, "status": { "$ref": "#/components/schemas/TaskStatus" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Title" }, "error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error" }, "retries": { "type": "integer", "title": "Retries", "default": 0 }, "priority": { "type": "integer", "title": "Priority", "default": 0 }, "root_task_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Root Task Id" }, "child_count": { "type": "integer", "title": "Child Count", "default": 0 }, "child_status": { "$ref": "#/components/schemas/TaskChildStatusCounts" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "started_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Started At" }, "finished_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Finished At" }, "payload": { "additionalProperties": true, "type": "object", "title": "Payload" }, "result": { "anyOf": [ { "oneOf": [ { "$ref": "#/components/schemas/RefreshResult" }, { "$ref": "#/components/schemas/OrganizeResult" }, { "$ref": "#/components/schemas/ScanInvalidResult" }, { "$ref": "#/components/schemas/DeleteResult" }, { "$ref": "#/components/schemas/ScrapeResult" }, { "$ref": "#/components/schemas/CleanupResult" }, { "$ref": "#/components/schemas/UpscaleResult" }, { "$ref": "#/components/schemas/R18ImportResult" }, { "$ref": "#/components/schemas/ActorScrapeResult" }, { "$ref": "#/components/schemas/ActorPushResult" }, { "$ref": "#/components/schemas/RescrapeResult" }, { "$ref": "#/components/schemas/SemanticIndexResult" }, { "$ref": "#/components/schemas/SemanticBenchmarkResult" } ], "discriminator": { "propertyName": "type", "mapping": { "actor_push": "#/components/schemas/ActorPushResult", "actor_scrape": "#/components/schemas/ActorScrapeResult", "cleanup": "#/components/schemas/CleanupResult", "delete": "#/components/schemas/DeleteResult", "organize": "#/components/schemas/OrganizeResult", "r18_import": "#/components/schemas/R18ImportResult", "refresh": "#/components/schemas/RefreshResult", "rescrape": "#/components/schemas/RescrapeResult", "scan_invalid": "#/components/schemas/ScanInvalidResult", "scrape": "#/components/schemas/ScrapeResult", "semantic_benchmark": "#/components/schemas/SemanticBenchmarkResult", "semantic_index": "#/components/schemas/SemanticIndexResult", "upscale": "#/components/schemas/UpscaleResult" } } }, { "type": "null" } ], "title": "Result" } }, "type": "object", "required": [ "id", "type", "status" ], "title": "TaskResponse", "description": "详情: 额外带 payload 与按类型的 result." }, "TaskSortField": { "type": "string", "enum": [ "type", "status", "priority", "created_at", "started_at", "finished_at" ], "title": "TaskSortField" }, "TaskStatus": { "type": "string", "enum": [ "queued", "running", "done", "failed" ], "title": "TaskStatus" }, "TaskType": { "type": "string", "enum": [ "scrape", "organize", "refresh", "cleanup", "upscale", "r18_import", "actor_scrape", "rescrape", "scan_invalid", "delete", "semantic_index", "semantic_benchmark", "actor_push" ], "title": "TaskType" }, "TaskWorkerResponse": { "properties": { "paused": { "type": "boolean", "title": "Paused" } }, "type": "object", "required": [ "paused" ], "title": "TaskWorkerResponse" }, "TextDeltaRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "text_delta", "title": "Type" }, "block_id": { "type": "string", "title": "Block Id" }, "text": { "type": "string", "title": "Text" } }, "additionalProperties": false, "type": "object", "required": [ "type", "block_id", "text" ], "title": "TextDeltaRow", "description": "正文增量; 归块同 `ReasoningDeltaRow`." }, "ToolCallRequest": { "properties": { "args": { "additionalProperties": true, "type": "object", "title": "Args", "default": {} } }, "type": "object", "title": "ToolCallRequest" }, "ToolCallRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "tool_call", "title": "Type" }, "tool_call_id": { "type": "string", "title": "Tool Call Id" }, "name": { "type": "string", "title": "Name" }, "args": { "$ref": "#/components/schemas/JsonValue" } }, "additionalProperties": false, "type": "object", "required": [ "type", "tool_call_id", "name", "args" ], "title": "ToolCallRow", "description": "工具调用成形 (协议按增量传参, 这里已解析). 卡片的名字与参数由此行给出.\n\n`args` 在生成的 TS 类型里退化为 `unknown` (pydantic 的 `JsonValue` 无法表达到 schema),\n类型层面的保证到后端为止." }, "ToolCatalog": { "properties": { "version": { "type": "string", "title": "Version" }, "paths": { "$ref": "#/components/schemas/RuntimePaths" }, "tools": { "items": { "$ref": "#/components/schemas/ToolSummary" }, "type": "array", "title": "Tools" } }, "type": "object", "required": [ "version", "paths", "tools" ], "title": "ToolCatalog" }, "ToolDetail": { "properties": { "name": { "type": "string", "title": "Name" }, "group": { "type": "string", "title": "Group" }, "description": { "type": "string", "title": "Description" }, "params": { "additionalProperties": true, "type": "object", "title": "Params" } }, "type": "object", "required": [ "name", "group", "description", "params" ], "title": "ToolDetail", "description": "单个工具的完整入参. 响应不声明返回 Schema, 调用方按实际响应体处理." }, "ToolResultRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "tool_result", "title": "Type" }, "tool_call_id": { "type": "string", "title": "Tool Call Id" }, "result": { "$ref": "#/components/schemas/JsonValue" } }, "additionalProperties": false, "type": "object", "required": [ "type", "tool_call_id", "result" ], "title": "ToolResultRow", "description": "工具回执. 名字与参数在同 id 的 `ToolCallRow`, 故本行只带结果 (续批的回合不会再报调用名)." }, "ToolSummary": { "properties": { "name": { "type": "string", "title": "Name" }, "group": { "type": "string", "title": "Group" }, "summary": { "type": "string", "title": "Summary" }, "signature": { "type": "string", "title": "Signature" } }, "type": "object", "required": [ "name", "group", "summary", "signature" ], "title": "ToolSummary", "description": "目录索引里的一条: 够选工具, 不够直接构造复杂入参." }, "TrashSummaryResponse": { "properties": { "exists": { "type": "boolean", "title": "Exists" }, "inventory_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Inventory Id" }, "path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Path" }, "truncated": { "type": "boolean", "title": "Truncated", "default": false }, "dropped": { "type": "integer", "title": "Dropped", "default": 0 } }, "type": "object", "required": [ "exists" ], "title": "TrashSummaryResponse", "description": "回收目录历史内容: 展开即产出清单, 面板套用同一套审查与删除." }, "TurnTokenUsage": { "properties": { "input": { "type": "integer", "title": "Input" }, "cache_read": { "type": "integer", "title": "Cache Read" }, "cache_write": { "type": "integer", "title": "Cache Write" }, "output": { "type": "integer", "title": "Output" }, "requests": { "type": "integer", "title": "Requests" } }, "type": "object", "required": [ "input", "cache_read", "cache_write", "output", "requests" ], "title": "TurnTokenUsage", "description": "`input` 是非缓存输入 (总量减去 cache_read/cache_write). pydantic-ai 的 `input_tokens` 含缓存, 此处拆开.\n\n字段不给默认值: 回放行里的用量总是全字段, 前端因此可以直接参与算术." }, "TurnUsageRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "turn_usage", "title": "Type" }, "usage": { "$ref": "#/components/schemas/TurnTokenUsage" } }, "additionalProperties": false, "type": "object", "required": [ "type", "usage" ], "title": "TurnUsageRow", "description": "回合收尾: 聚合用量归属当前助手消息, 同时标志本轮结束.\n\n正文不在此行重复: 适配器对每段正文都发 `TEXT_MESSAGE_CONTENT`, 故正文必然已由\n`TextDeltaRow` 落盘, 无须回退到整段文本." }, "UpscaleResult": { "properties": { "type": { "type": "string", "const": "upscale", "title": "Type", "default": "upscale" }, "scanned": { "type": "integer", "title": "Scanned" }, "upscaled": { "type": "integer", "title": "Upscaled" }, "skipped": { "type": "integer", "title": "Skipped" }, "failed": { "type": "integer", "title": "Failed" } }, "type": "object", "required": [ "scanned", "upscaled", "skipped", "failed" ], "title": "UpscaleResult" }, "UpscaleSubmission": { "properties": { "max_dim_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Dim Threshold" }, "max_bytes_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Bytes Threshold" }, "limit": { "type": "integer", "title": "Limit", "default": 200 }, "type": { "type": "string", "const": "upscale", "title": "Type" } }, "type": "object", "required": [ "type" ], "title": "UpscaleSubmission" }, "UserMessageRow": { "properties": { "seq": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Seq" }, "at": { "type": "string", "title": "At" }, "type": { "type": "string", "const": "user_message", "title": "Type" }, "text": { "type": "string", "title": "Text" }, "message_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Message Id" } }, "additionalProperties": false, "type": "object", "required": [ "type", "text" ], "title": "UserMessageRow", "description": "用户输入. 批准 / 拒绝只以 tool return 进模型上下文, 不产生此行的附加说明." }, "UserTagLinksResponse": { "properties": { "changed": { "type": "integer", "title": "Changed", "description": "至少一处挂载关系发生变更的条目数" }, "unchanged": { "type": "integer", "title": "Unchanged", "description": "已处于目标态、未修改的条目数" }, "missing": { "type": "integer", "title": "Missing", "description": "不存在的条目 id 数" } }, "type": "object", "required": [ "changed", "unchanged", "missing" ], "title": "UserTagLinksResponse", "description": "用户标签挂载/卸载的结果计数; 三个字段均以条目 id 为单位, 之和等于去重后的条目数." }, "UserTagResponse": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created At" }, "updated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated At" } }, "type": "object", "required": [ "id", "name" ], "title": "UserTagResponse" }, "UserTagsCreateRequest": { "properties": { "names": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Names", "description": "用户标签名称列表" } }, "type": "object", "required": [ "names" ], "title": "UserTagsCreateRequest", "description": "批量取回或新建用户标签; 名称去重, 已存在的名称直接复用." }, "UserTagsCreateResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/UserTagResponse" }, "type": "array", "title": "Items", "description": "与入参同序的标签" }, "created": { "type": "integer", "title": "Created", "description": "本次新建的数量; 其余为已存在的名称" } }, "type": "object", "required": [ "items", "created" ], "title": "UserTagsCreateResponse" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WatcherConfig": { "properties": { "use_polling": { "type": "boolean", "title": "Use Polling", "default": false }, "debounce_seconds": { "type": "number", "maximum": 30.0, "minimum": 0.5, "title": "Debounce Seconds", "default": 3.0 }, "media_extensions": { "items": { "type": "string" }, "type": "array", "title": "Media Extensions" } }, "type": "object", "title": "WatcherConfig" }, "WatermarkConfig": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": false }, "scale": { "type": "number", "maximum": 0.25, "minimum": 0.03, "title": "Scale", "default": 0.08 }, "corners": { "additionalProperties": { "$ref": "#/components/schemas/WatermarkCorner" }, "propertyNames": { "$ref": "#/components/schemas/WatermarkKind" }, "type": "object", "title": "Corners", "x-frozen-keys": true } }, "type": "object", "title": "WatermarkConfig" }, "WatermarkCorner": { "type": "string", "enum": [ "top_left", "top_right", "bottom_left", "bottom_right" ], "title": "WatermarkCorner", "description": "角标锚点. 同角多枚按相位顺序向内叠 (上往下 / 下往上), 右角右对齐." }, "WatermarkKind": { "type": "string", "enum": [ "subtitle", "uncensored", "cracked", "leaked", "definition" ], "title": "WatermarkKind", "description": "整理落盘封面角标类别. 分辨率共用 definition, 不论 4K/1080p." }, "WorkerConfig": { "properties": { "concurrency": { "type": "integer", "maximum": 64.0, "minimum": 1.0, "title": "Concurrency", "default": 10 }, "poll_interval": { "type": "number", "maximum": 10.0, "minimum": 0.1, "title": "Poll Interval", "default": 2.0, "x-hidden": true }, "shutdown_timeout": { "type": "number", "maximum": 120.0, "minimum": 0.0, "title": "Shutdown Timeout", "default": 0, "x-hidden": true } }, "type": "object", "title": "WorkerConfig" } } } }